RE: Troubles with subscripts and solve()

Соловьев Александр Александрович <[email protected]> Fri, 18 Jul 2008 17:23:28 +0400
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>

> 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?

_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail
axiom_test.txt (text/plain, 3.4 KB)
(2) -> f:= reduce(+, concat([[sb(a,[i,j])*x^i*y^j for i in 0..1] for j in 0..1])f:= reduce(+, concat([[sb(a,[i,j])*x^i*y^j for i in 0..1] for j in 0..1]) ) :: HDMP([x,y], ?)

   (2)  a   x y + a   x + a   y + a
         1,1       1,0     0,1     0,0
 Type: HomogeneousDistributedMultivariatePolynomial([x,y],Polynomial Integer)

(3) -> Sm:= concat([[eval(f,[x=i,y=j])=sb(m,[i,j]) for i in 0..1] for j in 0..1]Sm:= concat([[eval(f,[x=i,y=j])=sb(m,[i,j]) for i in 0..1] for j in 0..1])
   (3)
   [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 HomogeneousDistributedMultivariatePolynomial([x,y],Polynomial Integer)

(4) -> solve(Sm)
   (4)
   [
     [m   = - %B + %A, a   = - %B + %A, m   = - %D + %C - %B,
       0,0              0,0              1,0
      a   = - %D + %C - %A, m   = %A, a   = %B, m   = %C, a   = %D]
       1,0                   0,1       0,1       1,1       1,1
     ]
                         Type: List List Equation Fraction Polynomial Integer
(5) -> Vk:= concat([[sb(a,[i,j]) for i in 0..1] for j in 0..1])
(5) ->
   (5)  [a   ,a   ,a   ,a   ]
          0,0  1,0  0,1  1,1
                                                            Type: List Symbol
(6) -> Vl:= [index(i)$OVAR(Vk) for i in 1..4]
(6) ->
   (6)  [a   ,a   ,a   ,a   ]
          0,0  1,0  0,1  1,1
                 Type: List OrderedVariableList [*02a00,*02a10,*02a01,*02a11]
(7) -> solve(Sm)
(7) ->
   (7)
   [
     [m   = - %F + %E, a   = - %F + %E, m   = - %H + %G - %F,
       0,0              0,0              1,0
      a   = - %H + %G - %E, m   = %E, a   = %F, m   = %G, a   = %H]
       1,0                   0,1       0,1       1,1       1,1
     ]
                         Type: List List Equation Fraction Polynomial Integer
(8) -> solve(Sm, Vl)
   Loading /opt/axiom/algebra/AMR-.o for domain AbelianMonoidRing&
   Loading /opt/axiom/algebra/GCDDOM-.o for domain GcdDomain&
   Loading /opt/axiom/algebra/INTDOM-.o for domain IntegralDomain&
   Loading /opt/axiom/algebra/DIFEXT-.o for domain
      DifferentialExtension&
   Loading /opt/axiom/algebra/FLINEXP-.o for domain
      FullyLinearlyExplicitRingOver&
   Loading /opt/axiom/algebra/ALGEBRA-.o for domain Algebra&
   Loading /opt/axiom/algebra/DIFRING-.o for domain DifferentialRing&
   Loading /opt/axiom/algebra/MONOID-.o for domain Monoid&
   Loading /opt/axiom/algebra/SGROUP-.o for domain SemiGroup&
   Loading /opt/axiom/algebra/EVALAB-.o for domain Evalable&
   Loading /opt/axiom/algebra/FRETRCT-.o for domain FullyRetractableTo&

   There are 20 exposed and 3 unexposed library operations named solve
      having 2 argument(s) but none was determined to be applicable.
      Use HyperDoc Browse, or issue
                              )display op solve
      to learn more about the available operations. Perhaps
      package-calling the operation or using coercions on the arguments
      will allow you to apply the operation.

   Cannot find a definition or applicable library operation named solve
      with argument type(s)
List Equation HomogeneousDistributedMultivariatePolynomial([x,y],Polynomial Integer)
           List OrderedVariableList [*02a00,*02a10,*02a01,*02a11]

      Perhaps you should use "@" to indicate the required return type,
      or "$" to specify which version of the function you need.
(8) ->