axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-mail] Troubles with subscripts and solve()


From: Themos Tsikas
Subject: Re: [Axiom-mail] Troubles with subscripts and solve()
Date: Fri, 18 Jul 2008 14:41:01 +0100
User-agent: KMail/1.9.6 (enterprise 20070904.708012)

Is this what you want?


(1) -> macro sb == subscript
                                                                   Type: Void
(2) -> Vk:= concat([[sb(a,[i,j]) for i in 0..1] for j in 0..1])

   (2)  [a   ,a   ,a   ,a   ]
          0,0  1,0  0,1  1,1
                                                            Type: List Symbol
(3) -> Vl:= [index(i)$OVAR(Vk) for i in 1..4]

   (3)  [a   ,a   ,a   ,a   ]
          0,0  1,0  0,1  1,1
                 Type: List OrderedVariableList [*02a00,*02a10,*02a01,*02a11]
(4) -> f:= reduce(+, concat([[subscript(a,[i,j])*x^i*y^j for i in 0..1] for j 
in 0..1]) ) :: HDMP([x,y], HDMP(Vl,INT))

   (4)  a   x y + a   x + a   y + a
         1,1       1,0     0,1     0,0
Type: 
HomogeneousDistributedMultivariatePolynomial([x,y],HomogeneousDistributedMultivariatePolynomial([*02a00,*02a10,*02a01,*02a11],Integer))
(5) -> Sm:= concat([[eval(f,[x=i,y=j])=sb(m,[i,j]) for i in 0..1] for j in 
0..1])

   (5)
   [a   = m   , a    + a   = m   , a    + a   = m   ,
     0,0   0,0   1,0    0,0   1,0   0,1    0,0   0,1
    a    + a    + a    + a   = m   ]
     1,1    1,0    0,1    0,0   1,1
                                       Type: List Equation Polynomial Integer
(6) -> solve(Sm,Vl)

   (6)
   [
     [a   = m   , a   = m    - m   , a   = m    - m   ,
       0,0   0,0   1,0   1,0    0,0   0,1   0,1    0,0
      a   = m    - m    - m    + m   ]
       1,1   1,1    1,0    0,1    0,0
     ]
                         Type: List List Equation Fraction Polynomial Integer


On Friday 18 July 2008, Соловьев Александр Александрович wrote:
> > I was using Fricas. In Axiom, can you try this:
> >
> > (1) -> f:= [subscript(a,[i]) for i in 0..1]
> >
> >   (1)  [a ,a ]
> >          0  1
> >                                                            Type: List
> > >Symbol (2) -> [index(i)$OVAR(f) for i in 1..size()$OVAR(f)::PI]
> >
> >   (2)  [a ,a ]
> >          0  1
> >                                 Type: List OrderedVariableList
> > >[*01a0,*01a1]
>
> Ok, thanks. With one index variables solve() works. But with two indices
> doesn't. Look at the attachment with output from axiom. Is there any
> workarounds?
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.
> ________________________________________________________________________



________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]