Re: [Axiom-mail] finding source code

View: New views
7 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [Axiom-mail] finding source code

by Tim Daly-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Baker wrote:

>> May I ask how you found out about Axiom? What version did you
>> actually install on your computer?
>>    
>
> Ralf,
>
> I have been looking for an open source computer algebra system for some time
> although I did not try any, I came across Axiom in lists of such systems but I
> did not try it because (for some reason) I was put off when it said that it
> was based on LISP.
>
> Having tried it now it works well and it seems very good (I wish I had done so
> earlier). At first sight the user language reminds me a bit of 'Scala' in that
> the type is given after the variable if required, also the way that brackets
> can sometimes be omitted for what looks to me like function calls.
>
> I loaded the binary from this page:
> http://www.axiom-developer.org/axiom-website/download.html
> (suse,May2009)
>
> I recorded what I did on my web page here:
> http://www.euclideanspace.com/maths/standards/program/
>
> As you can see the program seems to work except the draw function which seems
> to fail with:
>
>  
>>> System error:
>>>      
> Unknown bfd format
>
> The only other problem is capturing the output to put on a web page, you can
> see what I mean about 2/3 of the way down this screen:
>
> http://www.euclideanspace.com/maths/algebra/equations/polynomial/cubic/
>
> Apart from being too big for the page, not all the LaTeX seemed to be
> recognised (I cut and pasted from Axiom to Lyx and then did a screen shot).
>
> So, that's my experience so far, apart from these small problems it looks like
> a very useful program.
>
> Martin
>
>
> _______________________________________________
> Axiom-mail mailing list
> Axiom-mail@...
> http://lists.nongnu.org/mailman/listinfo/axiom-mail
>
>  
Martin,

It appears that you have an interest in documenting the use of mathematics.
Axiom is being rewritten into literate form, which means that the source
code
is now taken directly from the books, such as bookvol10.3 which contains the
sources for the Axiom domains.

You may also find interesting examples in several places in Axiom.

1) EXAMPLES OF FUNCTION CALLS

First, there is documentation of example code use. You can type
  )display operation makeprod
and you will see the "Mappings" and some example code. In the case
of the "makeprod" function the example will look like:

  Examples of makeprod from Product

  f:(x:INT):INT +-> 3*x
  g:(x:INT):INT +-> x^3
  h(x:INT):Product(INT,INT) == makeprod(f x,g x)
  h(3)

This gives you sample input for the makeprod command.


2) FUNCTIONS FROM A DOMAIN

You have also expressed an interest in Quaternions. You can see
what functions are available for Quaternions by typing
   )show Quaternion
which gives the output shown below.


3) HELP FUNCTION

For some domains you can also type
   )help Quaternion
and see a help page for that domain with the output shown below.

Axiom is in the process of documenting all of the code. If you
would like to help, either with examples or with explanations of
areas like Quaternions that would be greatly appreciated.


4) INPUT FILES

The directory $AXIOM/input contains a large number of files
which can be read into Axiom and executed. There are examples
of quite a few domains.

5) HYPERDOC

Clearly you cannot get hyperdoc running. I am not sure what
the problem might be but if you send me email we can discuss
it further.

Tim Daly
Elder of the Internet





                        AXIOM Computer Algebra System
                       Version: Axiom (September 2009)
              Timestamp: Thursday October 29, 2009 at 06:43:59
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
 
   Re-reading compress.daase   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) ->
(1) -> )display operation makeprod

There is one unexposed function called makeprod :
   [1] (D1,D2) -> Product(D1,D2) from Product(D1,D2)
            if D1 has SETCAT and D2 has SETCAT

Examples of makeprod from Product

f:=(x:INT):INT +-> 3*x
g:=(x:INT):INT +-> x^3
h(x:INT):Product(INT,INT) == makeprod(f x, g x)
h(3)

(1) -> )show Quaternion
 Quaternion R: CommutativeRing  is a domain constructor
 Abbreviation for Quaternion is QUAT
 This constructor is exposed in this frame.
 Issue )edit bookvol10.3.spad.pamphlet to see algebra source code for QUAT

------------------------------- Operations --------------------------------
 ?*? : (R,%) -> %                      ?*? : (%,R) -> %
 ?*? : (%,%) -> %                      ?*? : (Integer,%) -> %
 ?*? : (PositiveInteger,%) -> %        ?**? : (%,PositiveInteger) -> %
 ?+? : (%,%) -> %                      ?-? : (%,%) -> %
 -? : % -> %                           ?=? : (%,%) -> Boolean
 D : (%,(R -> R)) -> %                 D : % -> % if R has DIFRING
 1 : () -> %                           0 : () -> %
 ?^? : (%,PositiveInteger) -> %        abs : % -> R if R has RNS
 coerce : R -> %                       coerce : Integer -> %
 coerce : % -> OutputForm              conjugate : % -> %
 hash : % -> SingleInteger             imagI : % -> R
 imagJ : % -> R                        imagK : % -> R
 inv : % -> % if R has FIELD           latex : % -> String
 map : ((R -> R),%) -> %               norm : % -> R
 one? : % -> Boolean                   quatern : (R,R,R,R) -> %
 real : % -> R                         recip : % -> Union(%,"failed")
 retract : % -> R                      sample : () -> %
 zero? : % -> Boolean                  ?~=? : (%,%) -> Boolean
 ?*? : (Fraction Integer,%) -> % if R has FIELD
 ?*? : (%,Fraction Integer) -> % if R has FIELD
 ?*? : (NonNegativeInteger,%) -> %
 ?**? : (%,Integer) -> % if R has FIELD
 ?**? : (%,NonNegativeInteger) -> %
 ?<? : (%,%) -> Boolean if R has ORDSET
 ?<=? : (%,%) -> Boolean if R has ORDSET
 ?>? : (%,%) -> Boolean if R has ORDSET
 ?>=? : (%,%) -> Boolean if R has ORDSET
 D : (%,(R -> R),NonNegativeInteger) -> %
 D : (%,List Symbol,List NonNegativeInteger) -> % if R has PDRING SYMBOL
 D : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL
 D : (%,List Symbol) -> % if R has PDRING SYMBOL
 D : (%,Symbol) -> % if R has PDRING SYMBOL
 D : (%,NonNegativeInteger) -> % if R has DIFRING
 ?^? : (%,Integer) -> % if R has FIELD
 ?^? : (%,NonNegativeInteger) -> %
 characteristic : () -> NonNegativeInteger
 charthRoot : % -> Union(%,"failed") if R has CHARNZ
 coerce : Fraction Integer -> % if R has FIELD or R has RETRACT FRAC INT
 convert : % -> InputForm if R has KONVERT INFORM
 differentiate : (%,(R -> R)) -> %
 differentiate : (%,(R -> R),NonNegativeInteger) -> %
 differentiate : (%,List Symbol,List NonNegativeInteger) -> % if R has
PDRING SYMBOL
 differentiate : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL
 differentiate : (%,List Symbol) -> % if R has PDRING SYMBOL
 differentiate : (%,Symbol) -> % if R has PDRING SYMBOL
 differentiate : (%,NonNegativeInteger) -> % if R has DIFRING
 differentiate : % -> % if R has DIFRING
 ?.? : (%,R) -> % if R has ELTAB(R,R)
 eval : (%,Symbol,R) -> % if R has IEVALAB(SYMBOL,R)
 eval : (%,List Symbol,List R) -> % if R has IEVALAB(SYMBOL,R)
 eval : (%,List Equation R) -> % if R has EVALAB R
 eval : (%,Equation R) -> % if R has EVALAB R
 eval : (%,R,R) -> % if R has EVALAB R
 eval : (%,List R,List R) -> % if R has EVALAB R
 max : (%,%) -> % if R has ORDSET
 min : (%,%) -> % if R has ORDSET
 rational : % -> Fraction Integer if R has INS
 rational? : % -> Boolean if R has INS
 rationalIfCan : % -> Union(Fraction Integer,"failed") if R has INS
 reducedSystem : Matrix % -> Matrix R
 reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix R,vec: Vector R)
 reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix Integer,vec:
Vector Integer) if R has LINEXP INT
 reducedSystem : Matrix % -> Matrix Integer if R has LINEXP INT
 retract : % -> Fraction Integer if R has RETRACT FRAC INT
 retract : % -> Integer if R has RETRACT INT
 retractIfCan : % -> Union(R,"failed")
 retractIfCan : % -> Union(Fraction Integer,"failed") if R has RETRACT
FRAC INT
 retractIfCan : % -> Union(Integer,"failed") if R has RETRACT INT
 subtractIfCan : (%,%) -> Union(%,"failed")

(1) -> )help Quaternion
====================================================================
Quaternion examples
====================================================================

The domain constructor Quaternion implements quaternions over
commutative rings.

The basic operation for creating quaternions is quatern.  This is a
quaternion over the rational numbers.

  q := quatern(2/11,-8,3/4,1)
     2        3
    -- - 8i + - j + k
    11        4
                        Type: Quaternion Fraction Integer

The four arguments are the real part, the i imaginary part, the j
imaginary part, and the k imaginary part, respectively.

  [real q, imagI q, imagJ q, imagK q]
      2     3
    [--,- 8,-,1]
     11     4
                        Type: List Fraction Integer

Because q is over the rationals (and nonzero), you can invert it.

  inv q
      352     15488      484       1936
    ------ + ------ i - ----- j - ------ k
    126993   126993     42331     126993
                        Type: Quaternion Fraction Integer

The usual arithmetic (ring) operations are available

  q^6
      2029490709319345   48251690851     144755072553     48251690851
    - ---------------- - ----------- i + ------------ j + ----------- k
         7256313856        1288408         41229056         10307264
                        Type: Quaternion Fraction Integer

  r := quatern(-2,3,23/9,-89); q + r
      20        119
    - -- - 5i + --- j - 88k
      11         36
                        Type: Quaternion Fraction Integer

In general, multiplication is not commutative.

  q * r - r * q
      2495             817
    - ---- i - 1418j - --- k
       18               18
                         Type: Quaternion Fraction Integer

There are no predefined constants for the imaginary i, j, and k parts,
but you can easily define them.

  i:=quatern(0,1,0,0)
    i
                         Type: Quaternion Integer

  j:=quatern(0,0,1,0)
    j
                         Type: Quaternion Integer
 
  k:=quatern(0,0,0,1)
    k
                         Type: Quaternion Integer

These satisfy the normal identities.

  [i*i, j*j, k*k, i*j, j*k, k*i, q*i]
                             2         3
     [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
                            11         4
                          Type: List Quaternion Fraction Integer

The norm is the quaternion times its conjugate.

  norm q
    126993
    ------
     1936
                          Type: Fraction Integer

  conjugate q
      2        3
     -- + 8i - - j - k
     11        4
                          Type: Quaternion Fraction Integer

  q * %
     126993
     ------
      1936
                          Type: Quaternion Fraction Integer

See Also:
o )help Octonion
o )help Complex
o )help CliffordAlgebra
o )show Quaternion

(1) -> )sys cat int/input/Quaternion.output
Starts dribbling to Quaternion.output (2009/10/29, 7:36:17).
)set message test on
 
)set message auto off
 
)clear all
 
--S 1 of 13
q := quatern(2/11,-8,3/4,1)
 

         2        3
   (1)  -- - 8i + - j + k
        11        4
                                            Type: Quaternion Fraction
Integer
--R
--R
--R         2        3
--R   (1)  -- - 8i + - j + k
--R        11        4
--R                                            Type: Quaternion Fraction
Integer
--E 1

--S 2 of 13
[real q, imagI q, imagJ q, imagK q]
 

          2     3
   (2)  [--,- 8,-,1]
         11     4
                                                  Type: List Fraction
Integer
--R
--R
--R          2     3
--R   (2)  [--,- 8,-,1]
--R         11     4
--R                                                  Type: List Fraction
Integer
--E 2

--S 3 of 13
inv q
 

          352     15488      484       1936
   (3)  ------ + ------ i - ----- j - ------ k
        126993   126993     42331     126993
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          352     15488      484       1936
--R   (3)  ------ + ------ i - ----- j - ------ k
--R        126993   126993     42331     126993
--R                                            Type: Quaternion Fraction
Integer
--E 3

--S 4 of 13
q^6
 

          2029490709319345   48251690851     144755072553     48251690851
   (4)  - ---------------- - ----------- i + ------------ j + ----------- k
             7256313856        1288408         41229056         10307264
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2029490709319345   48251690851     144755072553     48251690851
--R   (4)  - ---------------- - ----------- i + ------------ j +
----------- k
--R             7256313856        1288408         41229056         10307264
--R                                            Type: Quaternion Fraction
Integer
--E 4

--S 5 of 13
r := quatern(-2,3,23/9,-89); q + r
 

          20        119
   (5)  - -- - 5i + --- j - 88k
          11         36
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          20        119
--R   (5)  - -- - 5i + --- j - 88k
--R          11         36
--R                                            Type: Quaternion Fraction
Integer
--E 5

--S 6 of 13
q * r - r * q
 

          2495             817
   (6)  - ---- i - 1418j - --- k
           18               18
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2495             817
--R   (6)  - ---- i - 1418j - --- k
--R           18               18
--R                                            Type: Quaternion Fraction
Integer
--E 6

--S 7 of 13
i:=quatern(0,1,0,0)
 

   (7)  i
                                                     Type: Quaternion
Integer
--R
--R
--R   (7)  i
--R                                                     Type: Quaternion
Integer
--E 7

--S 8 of 13
j:=quatern(0,0,1,0)
 

   (8)  j
                                                     Type: Quaternion
Integer
--R
--R
--R   (8)  j
--R                                                     Type: Quaternion
Integer
--E 8

--S 9 of 13
k:=quatern(0,0,0,1)
 

   (9)  k
                                                     Type: Quaternion
Integer
--R
--R
--R   (9)  k
--R                                                     Type: Quaternion
Integer
--E 9

--S 10 of 13
[i*i, j*j, k*k, i*j, j*k, k*i, q*i]
 

                                 2         3
   (10)  [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
                                11         4
                                       Type: List Quaternion Fraction
Integer
--R
--R
--R                                 2         3
--R   (10)  [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
--R                                11         4
--R                                       Type: List Quaternion Fraction
Integer
--E 10

--S 11 of 13
norm q
 

         126993
   (11)  ------
          1936
                                                       Type: Fraction
Integer
--R
--R
--R         126993
--R   (11)  ------
--R          1936
--R                                                       Type: Fraction
Integer
--E 11

--S 12 of 13
conjugate q
 

          2        3
   (12)  -- + 8i - - j - k
         11        4
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2        3
--R   (12)  -- + 8i - - j - k
--R         11        4
--R                                            Type: Quaternion Fraction
Integer
--E 12

--S 13 of 13
q * %
 

         126993
   (13)  ------
          1936
                                            Type: Quaternion Fraction
Integer
--R
--R
--R         126993
--R   (13)  ------
--R          1936
--R                                            Type: Quaternion Fraction
Integer
--E 13
)spool
 
(1) ->

                        AXIOM Computer Algebra System
                       Version: Axiom (September 2009)
              Timestamp: Thursday October 29, 2009 at 06:43:59
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
 
   Re-reading compress.daase   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) ->
(1) -> )display operation makeprod

There is one unexposed function called makeprod :
   [1] (D1,D2) -> Product(D1,D2) from Product(D1,D2)
            if D1 has SETCAT and D2 has SETCAT

Examples of makeprod from Product

f:=(x:INT):INT +-> 3*x
g:=(x:INT):INT +-> x^3
h(x:INT):Product(INT,INT) == makeprod(f x, g x)
h(3)

(1) -> )show Quaternion
 Quaternion R: CommutativeRing  is a domain constructor
 Abbreviation for Quaternion is QUAT
 This constructor is exposed in this frame.
 Issue )edit bookvol10.3.spad.pamphlet to see algebra source code for QUAT

------------------------------- Operations --------------------------------
 ?*? : (R,%) -> %                      ?*? : (%,R) -> %
 ?*? : (%,%) -> %                      ?*? : (Integer,%) -> %
 ?*? : (PositiveInteger,%) -> %        ?**? : (%,PositiveInteger) -> %
 ?+? : (%,%) -> %                      ?-? : (%,%) -> %
 -? : % -> %                           ?=? : (%,%) -> Boolean
 D : (%,(R -> R)) -> %                 D : % -> % if R has DIFRING
 1 : () -> %                           0 : () -> %
 ?^? : (%,PositiveInteger) -> %        abs : % -> R if R has RNS
 coerce : R -> %                       coerce : Integer -> %
 coerce : % -> OutputForm              conjugate : % -> %
 hash : % -> SingleInteger             imagI : % -> R
 imagJ : % -> R                        imagK : % -> R
 inv : % -> % if R has FIELD           latex : % -> String
 map : ((R -> R),%) -> %               norm : % -> R
 one? : % -> Boolean                   quatern : (R,R,R,R) -> %
 real : % -> R                         recip : % -> Union(%,"failed")
 retract : % -> R                      sample : () -> %
 zero? : % -> Boolean                  ?~=? : (%,%) -> Boolean
 ?*? : (Fraction Integer,%) -> % if R has FIELD
 ?*? : (%,Fraction Integer) -> % if R has FIELD
 ?*? : (NonNegativeInteger,%) -> %
 ?**? : (%,Integer) -> % if R has FIELD
 ?**? : (%,NonNegativeInteger) -> %
 ?<? : (%,%) -> Boolean if R has ORDSET
 ?<=? : (%,%) -> Boolean if R has ORDSET
 ?>? : (%,%) -> Boolean if R has ORDSET
 ?>=? : (%,%) -> Boolean if R has ORDSET
 D : (%,(R -> R),NonNegativeInteger) -> %
 D : (%,List Symbol,List NonNegativeInteger) -> % if R has PDRING SYMBOL
 D : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL
 D : (%,List Symbol) -> % if R has PDRING SYMBOL
 D : (%,Symbol) -> % if R has PDRING SYMBOL
 D : (%,NonNegativeInteger) -> % if R has DIFRING
 ?^? : (%,Integer) -> % if R has FIELD
 ?^? : (%,NonNegativeInteger) -> %
 characteristic : () -> NonNegativeInteger
 charthRoot : % -> Union(%,"failed") if R has CHARNZ
 coerce : Fraction Integer -> % if R has FIELD or R has RETRACT FRAC INT
 convert : % -> InputForm if R has KONVERT INFORM
 differentiate : (%,(R -> R)) -> %
 differentiate : (%,(R -> R),NonNegativeInteger) -> %
 differentiate : (%,List Symbol,List NonNegativeInteger) -> % if R has
PDRING SYMBOL
 differentiate : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL
 differentiate : (%,List Symbol) -> % if R has PDRING SYMBOL
 differentiate : (%,Symbol) -> % if R has PDRING SYMBOL
 differentiate : (%,NonNegativeInteger) -> % if R has DIFRING
 differentiate : % -> % if R has DIFRING
 ?.? : (%,R) -> % if R has ELTAB(R,R)
 eval : (%,Symbol,R) -> % if R has IEVALAB(SYMBOL,R)
 eval : (%,List Symbol,List R) -> % if R has IEVALAB(SYMBOL,R)
 eval : (%,List Equation R) -> % if R has EVALAB R
 eval : (%,Equation R) -> % if R has EVALAB R
 eval : (%,R,R) -> % if R has EVALAB R
 eval : (%,List R,List R) -> % if R has EVALAB R
 max : (%,%) -> % if R has ORDSET
 min : (%,%) -> % if R has ORDSET
 rational : % -> Fraction Integer if R has INS
 rational? : % -> Boolean if R has INS
 rationalIfCan : % -> Union(Fraction Integer,"failed") if R has INS
 reducedSystem : Matrix % -> Matrix R
 reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix R,vec: Vector R)
 reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix Integer,vec:
Vector Integer) if R has LINEXP INT
 reducedSystem : Matrix % -> Matrix Integer if R has LINEXP INT
 retract : % -> Fraction Integer if R has RETRACT FRAC INT
 retract : % -> Integer if R has RETRACT INT
 retractIfCan : % -> Union(R,"failed")
 retractIfCan : % -> Union(Fraction Integer,"failed") if R has RETRACT
FRAC INT
 retractIfCan : % -> Union(Integer,"failed") if R has RETRACT INT
 subtractIfCan : (%,%) -> Union(%,"failed")

(1) -> )help Quaternion
====================================================================
Quaternion examples
====================================================================

The domain constructor Quaternion implements quaternions over
commutative rings.

The basic operation for creating quaternions is quatern.  This is a
quaternion over the rational numbers.

  q := quatern(2/11,-8,3/4,1)
     2        3
    -- - 8i + - j + k
    11        4
                        Type: Quaternion Fraction Integer

The four arguments are the real part, the i imaginary part, the j
imaginary part, and the k imaginary part, respectively.

  [real q, imagI q, imagJ q, imagK q]
      2     3
    [--,- 8,-,1]
     11     4
                        Type: List Fraction Integer

Because q is over the rationals (and nonzero), you can invert it.

  inv q
      352     15488      484       1936
    ------ + ------ i - ----- j - ------ k
    126993   126993     42331     126993
                        Type: Quaternion Fraction Integer

The usual arithmetic (ring) operations are available

  q^6
      2029490709319345   48251690851     144755072553     48251690851
    - ---------------- - ----------- i + ------------ j + ----------- k
         7256313856        1288408         41229056         10307264
                        Type: Quaternion Fraction Integer

  r := quatern(-2,3,23/9,-89); q + r
      20        119
    - -- - 5i + --- j - 88k
      11         36
                        Type: Quaternion Fraction Integer

In general, multiplication is not commutative.

  q * r - r * q
      2495             817
    - ---- i - 1418j - --- k
       18               18
                         Type: Quaternion Fraction Integer

There are no predefined constants for the imaginary i, j, and k parts,
but you can easily define them.

  i:=quatern(0,1,0,0)
    i
                         Type: Quaternion Integer

  j:=quatern(0,0,1,0)
    j
                         Type: Quaternion Integer
 
  k:=quatern(0,0,0,1)
    k
                         Type: Quaternion Integer

These satisfy the normal identities.

  [i*i, j*j, k*k, i*j, j*k, k*i, q*i]
                             2         3
     [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
                            11         4
                          Type: List Quaternion Fraction Integer

The norm is the quaternion times its conjugate.

  norm q
    126993
    ------
     1936
                          Type: Fraction Integer

  conjugate q
      2        3
     -- + 8i - - j - k
     11        4
                          Type: Quaternion Fraction Integer

  q * %
     126993
     ------
      1936
                          Type: Quaternion Fraction Integer

See Also:
o )help Octonion
o )help Complex
o )help CliffordAlgebra
o )show Quaternion

(1) -> )sys cat int/input/Quaternion.output
Starts dribbling to Quaternion.output (2009/10/29, 7:36:17).
)set message test on
 
)set message auto off
 
)clear all
 
--S 1 of 13
q := quatern(2/11,-8,3/4,1)
 

         2        3
   (1)  -- - 8i + - j + k
        11        4
                                            Type: Quaternion Fraction
Integer
--R
--R
--R         2        3
--R   (1)  -- - 8i + - j + k
--R        11        4
--R                                            Type: Quaternion Fraction
Integer
--E 1

--S 2 of 13
[real q, imagI q, imagJ q, imagK q]
 

          2     3
   (2)  [--,- 8,-,1]
         11     4
                                                  Type: List Fraction
Integer
--R
--R
--R          2     3
--R   (2)  [--,- 8,-,1]
--R         11     4
--R                                                  Type: List Fraction
Integer
--E 2

--S 3 of 13
inv q
 

          352     15488      484       1936
   (3)  ------ + ------ i - ----- j - ------ k
        126993   126993     42331     126993
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          352     15488      484       1936
--R   (3)  ------ + ------ i - ----- j - ------ k
--R        126993   126993     42331     126993
--R                                            Type: Quaternion Fraction
Integer
--E 3

--S 4 of 13
q^6
 

          2029490709319345   48251690851     144755072553     48251690851
   (4)  - ---------------- - ----------- i + ------------ j + ----------- k
             7256313856        1288408         41229056         10307264
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2029490709319345   48251690851     144755072553     48251690851
--R   (4)  - ---------------- - ----------- i + ------------ j +
----------- k
--R             7256313856        1288408         41229056         10307264
--R                                            Type: Quaternion Fraction
Integer
--E 4

--S 5 of 13
r := quatern(-2,3,23/9,-89); q + r
 

          20        119
   (5)  - -- - 5i + --- j - 88k
          11         36
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          20        119
--R   (5)  - -- - 5i + --- j - 88k
--R          11         36
--R                                            Type: Quaternion Fraction
Integer
--E 5

--S 6 of 13
q * r - r * q
 

          2495             817
   (6)  - ---- i - 1418j - --- k
           18               18
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2495             817
--R   (6)  - ---- i - 1418j - --- k
--R           18               18
--R                                            Type: Quaternion Fraction
Integer
--E 6

--S 7 of 13
i:=quatern(0,1,0,0)
 

   (7)  i
                                                     Type: Quaternion
Integer
--R
--R
--R   (7)  i
--R                                                     Type: Quaternion
Integer
--E 7

--S 8 of 13
j:=quatern(0,0,1,0)
 

   (8)  j
                                                     Type: Quaternion
Integer
--R
--R
--R   (8)  j
--R                                                     Type: Quaternion
Integer
--E 8

--S 9 of 13
k:=quatern(0,0,0,1)
 

   (9)  k
                                                     Type: Quaternion
Integer
--R
--R
--R   (9)  k
--R                                                     Type: Quaternion
Integer
--E 9

--S 10 of 13
[i*i, j*j, k*k, i*j, j*k, k*i, q*i]
 

                                 2         3
   (10)  [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
                                11         4
                                       Type: List Quaternion Fraction
Integer
--R
--R
--R                                 2         3
--R   (10)  [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
--R                                11         4
--R                                       Type: List Quaternion Fraction
Integer
--E 10

--S 11 of 13
norm q
 

         126993
   (11)  ------
          1936
                                                       Type: Fraction
Integer
--R
--R
--R         126993
--R   (11)  ------
--R          1936
--R                                                       Type: Fraction
Integer
--E 11

--S 12 of 13
conjugate q
 

          2        3
   (12)  -- + 8i - - j - k
         11        4
                                            Type: Quaternion Fraction
Integer
--R
--R
--R          2        3
--R   (12)  -- + 8i - - j - k
--R         11        4
--R                                            Type: Quaternion Fraction
Integer
--E 12

--S 13 of 13
q * %
 

         126993
   (13)  ------
          1936
                                            Type: Quaternion Fraction
Integer
--R
--R
--R         126993
--R   (13)  ------
--R          1936
--R                                            Type: Quaternion Fraction
Integer
--E 13
)spool
 
(1) ->



_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Parent Message unknown Re: [Axiom-mail] finding source code

by Bertfried Fauser-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Martin,

> So yes, I am interested, but I don't know how much I could do.

OK, I got this disclaimer, anybody states it :-))

> As I say, I don't have a rigorous mathematical background,

No worries, most things with Clifford algebras are easy.

Clifford and Grassmann bases:

Mathematically its sound to start with the Grassmann algebra, you have
the following ingrediences:

V an n-dim vector space
/\ : V x V ... x V --> /\^n V  the unital, associative antisymmetric
   exterior product or Grassmann or wedge product (all sysnonyms)

Due to antisymmetry you have for ever v in V that   v/\v=0, however,
if w<>\alpha v then w/\v is a _new_ element of the algebra. Choosing
a (any) basis {ei}_i in V allows you to construct 2^n many basis elements.
Hence the algebra relations for a grassmann algebra is

Grassmann:   v/\v =0 for all v \in V
  <=>     ei/\ej = -ej/\ei    (by setting v=ei+ej) and using ei/\ei=0 etc)

You have (n over 0) 0-vectors (the scalars of the base field times
identity of the algebra)
You have (n over 1) 1-vectors, that are the images of the base vectors
ei in the alegbra,
     often these immages are not distingusihed from ther orignal basis
verctor life.
You have (n over 2) 2-vectors (bi-vectors) of type ei/\ej  i<j,
...
You have (n over n) = 1 n-vector (volume form) e1/\e2/\ ../\en

A vector fron the space of k-vectors is said to have degree/step/grade k

Any Grassmann alegbra element is written as a linear combination in this
2^n=\sum_k (n over k) many vector space generators (basis elements)
[Note the algebra generators are the ei only]

Geometric information is attached to the so-called decomposable
tensors (externsors,
blades,...)  So v/\w may be a line [_or_ an area], but  w/\v + x/\y is
not a generic
geometric object.

Clifford algebra:
  Ingredients are now: V the same vector space as above with basis {ei}_i and
a quadratic form (which I use in its polarized matrix form) hence Q~=symmetric
matrix G over the base field. The algebra relations are now

Clifford:
   we still have   ei/\ej = -ej/\ei  for i<>j
   but add         ei^2=Q(ei) = ei^t G ei  (last expression is matrix
dot product, ei^t row
                        vector)

  This set of rules _implies_ that the matrix G of the bilinear form Q
is diagonal in the
basis {ei}_i, we want a more general setting allowing any basis of V
to be used. This
is most easily done using a construction from Chevalley:

Let \gamma : V ----> (End /\V ~=) CL(V,G)    (again G~=Q) be a map
which injects the space V into the Clifford algebra CL(V,G)

We define \gamma with values in the endomorphisms of the grassmann algebra
build over V as follows (° = clifford product):

\gamma(1)  = 1°
\gamma(ei) = Ei° = Ei/\ +  Ei _|

where Ei _| Ej := Ei^t G Ej   for Ei in (the image of) V
_| is called contraction, one sees that the Clifford product has two
parts, the exterior part and the contraction part which depends on G.
If G=0 the the Clifford algebra becomes a Grassmann algebra.

Furthermore do we see that the Clifford algebra has a basis out of Grassmann
elements.  GL(V,G) ~= /\V as vector spaces (not als algebras)

lets proceed with gamma:

\gamma(ei/\ej) = (Ei /\ Ej)° = (Ei ° Ej)° -  (Ei _| Ej)°
   = (Ei ° Ej)° -  (E_i^t G Ej) 1°

ect in a recursive way. This allows to construct the clifford product in
in terms of a Grassmann basis and to obtain the general multiplication

u1/\.../\uk °  v1/\../\vl = many terms of degree k+l   to abs(k-l)

For your example we have
          [  0   1  ]
G : =   [  1   0  ]
which gives (I switch back to ei for Clifford and Grassmann)

e1 ° e1 = e1/\e1 + e1^t G e1 = 0
e1 ° e2 = e1/\e2 + e1^t G e2 = e1/\e2 + 1   (note this is no longer homogeneous)
                                                               (e1 °
e2 has degree 0 and degree 2 parts)
e2 ° e1 = e2/\e1 + e2^t G e1 = -e1/\e2 + 1
e2 ° e2 = e2/\e2 + e2^t G e2 = 0

A bit more complicated is:

e1 ° (e1/\e2) = e1/\e1/\e2 + e1_| (e1/\e2)   first term is zero due to e1/\e1=0
the second term need some thought, the bilinear form G acts only on VxV,
now we need to know how it acts on elements of V/\V, this is done by demanding
that _| is a (graded) derivation

e1 ° (e1/\e2) = (e1 _| e1) /\e2  + (-1)^(degree(e1)*degree(e1)) e1/\(e1 _| e2)
                      ^^^^^^^^ zero                (-1)^1*1
               ^^^^^^^one
      = -e1

similarly we get

e2  ° (e1/\e2) = e2

(e1/\e2) ° e1 is obtained by rewriting e1/\e2 = e1°e2 - e1_|e2 and
applying the needed
simplifications, .....

> In other words the two bases are the same when the inner product is in its
> diagonal form but when the bases are rotated the outer product rotated with it
> only in the case of Grassmann basis but not in the case of the Clifford basis?

No, not really. you may address a grassmann algebra as a special
clifford algebra
with Q=0 (mathematically a bit sloppy but helpful)

The point is that you need to watch what kind of product you use to
generate your
algebra. Grassmann uses /\, but Clifford has two choices, ° and /\.
geometry needs
the /\basis but AXIOM uses the ° basis and assumes that the quadratic form is
diagonal in the basis of generators (AFAIK).

1=1,  ei = ei  of course

ei/\ej       =/=  ei°ej = ei/\ej + ei^t G e_j
ei/\ej/\ek  =/=  ei°ej°ek = ei°(ej/\ek + ej^t G e_k)
                      = ei/\ej/\ek  + ei^t G e_j ek - ek  ei^t G ek +
ej ei^t G ek

If you write in AXIOM ei*ej, you get ei°ej and not ei/\ej + ei^t G ej  etc...

> I need to think more about your comments about projective space and conformal
> model (It takes me some time to absorb these things)

I think in the works you mentioned, these things should be described,
otherwise look
on the arXiv for work of John Seelig, and Joan Lasenby....

> the purposes of Axiom, the code would need to be completely general and not
> otpimised for particular geometries?

That's not really true. You _just_ need a Clifford algebra, the
geometry comes as
a sort of interpretation of the objects (elements) in the algebra.
What would be needed
is the following [Hence a clifford algebra is not geometric, its the
interpretation]

1)  a grassmann basis for the clifford algebra
2) the exteriorn /\ product, contraction _| and a proper clifford product °
3) some device to generate matrices out of clifford numbers and vice versa
4) possibly a clifford solver which allows to type in equations in
clifford variables
   so that you get a solution set, eg: X a generic element in CL(V,Q), find all
   X with (X^2=) X°X = X

That's almost all one needs (without spinors)

Ciao
BF.

--
% PD Dr Bertfried Fauser
%       Research Fellow, School of Computer Science, Univ. of Birmingham
%       Honorary Associate, University of Tasmania
%       Privat Docent: University of Konstanz, Physics Dept
<http://www.uni-konstanz.de>
% contact |->    URL : http://clifford.physik.uni-konstanz.de/~fauser/
%              Phone : +49 1520 9874517


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: Re: [Axiom-mail] finding source code

by Bill Page-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bertfried,

I think it's great to have this quick introduction - especially when
it also references what is currently implemented in Axiom and what
might be done in the future.  I hope that we can eventually have a
tutorial including actual Axiom code. If you start to develop
something like that I would be very glad to help add it to the
axiom-wiki.newsynthesis.org web site!

On Fri, Oct 30, 2009 at 8:26 AM, Bertfried Fauser wrote:

> Hi Martin,
>
>> So yes, I am interested, but I don't know how much I could do.
>
> OK, I got this disclaimer, anybody states it :-))
>
>> As I say, I don't have a rigorous mathematical background,
>
> No worries, most things with Clifford algebras are easy.
>
> Clifford and Grassmann bases:
>
> Mathematically its sound to start with the Grassmann algebra, you have
> the following ingrediences:
>
> V an n-dim vector space
> /\ : V x V ... x V --> /\^n V  the unital, associative antisymmetric
>   exterior product or Grassmann or wedge product (all sysnonyms)
>
> ...

Although I think your somewhat more formal approach is very important
in the context of Axiom, you might also be interested in the more
applied approach presented by John Browne here:

http://sites.google.com/site/grassmannalgebra/bookandpackageversions

"This Grassmann algebra project has been a part-time project dating
from my doctoral thesis in the area in 1978. In October 2001 I
published an incomplete book draft "Grassmann Algebra: Exploring
applications of extended vector algebra with Mathematica" on my
university home page. The computations in this draft were done with
early versions of Mathematica and draft versions of the
GrassmannAlgebra package. ..."

John also makes his Mathematica code available online. It would be
great to have this kind of package available in Axiom.

Regards,
Bill Page.


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Clifford Algebra Requirements

by Martin Baker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bertfried,

In addition to the limitations of the current Clifford algebra implementation,
that you explained, there also seem (to my untrained eye) to be performance
issues. Also I wanted to get a feel for the general Axiom design methodology
by picking a specific issue.

The current implementation seems to calculate the product of terms every time
it is required when a multiplication is called. From a performance point of
view it would seem much more efficient to calculate a multiplication table in
the constructor which would make individual multiplications much faster. The
original author also had this thought as the following comment is in the code:

-- The ei*ej products could instead be precomputed in
-- a (2**n)**2 multiplication table.

The entries in such a table (in the general Grassman case) would be quite
complicated. Not just a single type but perhaps a sum of types with algebraic
number multipliers.

I think, if I were designing such a system using a conventional object
oriented program then, I would create a class for the multiplication table and
also a class for individual table entries. I don't know if that's how things
are done in Axiom?

I don't know enough about the mathematics but is seems to me that classes
(domains) such as mutiplicationTable and multipicationTableEntry might have
wider application for implementing other algebras?

Here I am really going to show up the gaps in my mathematical education but,
could these things link back to more fundamental structures, for example could
there be an inheritance hierarchy like:

ring
field
field which is a compound type
compound type which can be defined by a multiplication table.
clifford (Grassman) algebra

Is there someone who defines the overall structure of Axiom at this level?

What do you think would be the best approach to this?

Martin


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: Clifford Algebra Requirements

by Tim Daly-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Baker wrote:

> Bertfried,
>
> In addition to the limitations of the current Clifford algebra implementation,
> that you explained, there also seem (to my untrained eye) to be performance
> issues. Also I wanted to get a feel for the general Axiom design methodology
> by picking a specific issue.
>
> The current implementation seems to calculate the product of terms every time
> it is required when a multiplication is called. From a performance point of
> view it would seem much more efficient to calculate a multiplication table in
> the constructor which would make individual multiplications much faster. The
> original author also had this thought as the following comment is in the code:
>
> -- The ei*ej products could instead be precomputed in
> -- a (2**n)**2 multiplication table.
>
> The entries in such a table (in the general Grassman case) would be quite
> complicated. Not just a single type but perhaps a sum of types with algebraic
> number multipliers.
>
> I think, if I were designing such a system using a conventional object
> oriented program then, I would create a class for the multiplication table and
> also a class for individual table entries. I don't know if that's how things
> are done in Axiom?
>
> I don't know enough about the mathematics but is seems to me that classes
> (domains) such as mutiplicationTable and multipicationTableEntry might have
> wider application for implementing other algebras?
>
> Here I am really going to show up the gaps in my mathematical education but,
> could these things link back to more fundamental structures, for example could
> there be an inheritance hierarchy like:
>
> ring
> field
> field which is a compound type
> compound type which can be defined by a multiplication table.
> clifford (Grassman) algebra
>
> Is there someone who defines the overall structure of Axiom at this level?
>
> What do you think would be the best approach to this?
>
> Martin
>
>
> _______________________________________________
> Axiom-developer mailing list
> Axiom-developer@...
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
>
>  
Martin,

Structurally, Axiom rests on the categories which define the behavior
which is expected from domains which belong to the categories. For
instance, everything that belongs to SetCategory has to implement
equality.

Domains implement the methods required by the categories as well as
methods particular to themselves. Thus, it would seem that you would
define a category "field defined by multiplication table" which could
defines expected methods by all members (e.g. tableLookup(element,element))

The Grassman algebra domain would be a member of the category and thus
would be expected to implement such a method.

Alternatively you could create a category "field with cached results"
that required a "cacheLookup(element,element)".

The design is flexible. However, there should be a strong mathematical
basis for the choice of category structure. That said, there is the
"computational mathematics" issue that some ideas are implied purely
by performance rather than mathematical.

A graph of the category hierarchy is at:
http://axiom-developer.org/axiom-website/bookvol10.2full.html

This is one of the more challenging aspects of Axiom so don't feel
intimidated by the task. Feel free to ask more questions.

I downloaded the Grassman Algebra book and have finished the first
two chapters. I looked at Grassman a couple years ago while I was
busy documenting the Quaternions.

Tim



_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: Clifford Algebra Requirements

by Bertfried Fauser-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Martin,

I am surely not the person to aks for general AXIOM(TM) designs, since I am
a novice on that either

> The current implementation seems to calculate the product of terms every time
> it is required when a multiplication is called. From a performance point of
> view it would seem much more efficient to calculate a multiplication table

This will work for very small diemnions. In my maple Clifford package
(with Rafal Ablamowicz) we tried to do that, and we were not able to
compute the multiplication
tables for dim V > 8, since they become _very_ huge. A partial solution is
to cache the results of such multiplications and to read results from the cache
if present. There si currently a discussion going of on teh FriCAS
(AXIOM(TM) fork)
developers list how to do this properly. It seems that only certain
data structures
can be cached and that one has to translate user data structure
possibyl into a Lisp expression which can be hashed. This is surely
nothing a novce user (as I feel to be)
would like to crank.

> -- The ei*ej products could instead be precomputed in
> -- a (2**n)**2 multiplication table.

In principle yes, but if you have different bases, tha means also to store the
multipication table for each basis, which might soon become a problem.
Anyhow the first step is to _have_ a valid function which produces such a table,
then one can think of hashing.

> The entries in such a table (in the general Grassman case) would be quite
> complicated. Not just a single type but perhaps a sum of types with algebraic
> number multipliers.

That seems actually not to be a big issue, If we hash the product of two basis
elements, (Vector Integer, Vector Integer) the rsult is alway of type

CLQ  := Type: CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]])
           <<CliffordAlgebra(dimension:Integer, Field, QuadraticForm)>>

so a table (Index,Index) -> CLQ would do the trick, I guess.

> oriented program then, I would create a class for the multiplication table and
> also a class for individual table entries. I don't know if that's how things
> are done in Axiom?

The table entries are from the domain CLQ, and there is a type Table(key,value)
in AXIOM.

> I don't know enough about the mathematics but is seems to me that classes
> (domains) such as mutiplicationTable and multipicationTableEntry might have
> wider application for implementing other algebras?

What one would need from the outset is a graedFreeModule(Ring,Basis) V
to model the Grassmann algebra. The Clifford algebra is (a sub alegbra of)
the endormiphism algebra of that, hence lives in the tensor product V (x) V^*

A general clifford elment is hence representet (inefficiently) by a sum of such
tensors.

> could these things link back to more fundamental structures, for example could
> there be an inheritance hierarchy like:
>
> ring
> field
> field which is a compound type
> compound type which can be defined by a multiplication table.
> clifford (Grassman) algebra

Indeed such hierarchies exist in AXIOM. However, one possibly needs
even modules over skew fields and I do not know if such things are implemented.

Complex Clifford algebra: CL(n)  has two cases n even and n odd
Real Clifford algebra. CL(p,q) has 8 cases where the base ring of the
representation
is in IL whre
IL={ reals, complex, quaternions, reals(+)reals, quaternios(+)quaternions}

If you would allow Clifford algebras to be build over, say finite
fields, or the integers,
I am not even sure there is a general classification result available.
Quadratic forms
(dim 2) with integral coefficients are classified by automorphic forms.....

> Is there someone who defines the overall structure of Axiom at this level?

Tim has sent you the link to the graph of AXIOM types, sacry isn't it?
But a grep on the sources sometimes points you to peices of code where
you can just see how other people made use of that.

> What do you think would be the best approach to this?

The first step would be to implement a solid version of the Grassmann
Hopf algebra.
(Hopf is automatic, i.e. in a mathematical sense 'universal'). After
one can define a
GrassmannH Hopf algebra (even better and very much desirable Grassmann
super Hopf algebra, i.e a Grassmann algebra over a Z_2 graded module)
one is ready to implement the Clifford product (either using the Rota
Stein Hopf algebra method, used in Clifford
with great effect) or the Chevalley recursive definition (which is
much slower for symbolic quadratic forms, which I want to be able to
use either).

So one would need to design an AXIOM(TM) category of the type

GrassmanSuperHopfAlegbra == ??
 where ?? has to be a gradedSuperModule(withBasis)(Ring,OrderedSet)

or such.... but I am not a category/domain specialist....

I am currently porting my SchurFkt package to AXIOM(TM) (FriCAS style)
and hope to improve my knowledge thereby to be able to implement such a
GrassmannSuperHopfAlgebraWithBasis after that enterprise...

Sorry for being unspecific, but that's due to my limited knowledge

Ciao
BF.


--
% PD Dr Bertfried Fauser
%       Research Fellow, School of Computer Science, Univ. of Birmingham
%       Honorary Associate, University of Tasmania
%       Privat Docent: University of Konstanz, Physics Dept
<http://www.uni-konstanz.de>
% contact |->    URL : http://clifford.physik.uni-konstanz.de/~fauser/
%              Phone : +49 1520 9874517


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Re: Clifford Algebra Requirements

by Martin Baker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much to the very helpful replies to my earlier messages, they
give me a much clearer idea of the issues and complexities involved. I have
been re-reading your messages to try to understand how to generate the
multiplication rules from the quadratic form (as well as trying to understand
Axiom in general). I'm afraid that the Rota Stein Hopf algebra method and the
Chevalley recursive definition go over my head, at the moment, so I am unsure
how to proceed.

The only approach I could think of is to further impinge on your patience by
writing down what I think I understand and then hoping that you will give me
some hints about how I can take it forward and understand it better.

Flavours of algebra being discussed
-----------------------------------
We are discussing algebras under the banner of Clifford algebra but there are
different flavours of this:

* Grassman Algebra - vectors square to zero (exterior product '^').

* Clifford Algebra with Clifford bases - vector bases square to scalar value,
usually +1 or -1 (equivalent to Grassman bases where quadratic form from
diagonal matrix).

* Clifford Algebra with Grassman bases - vectors square to scalar value, bases
can be rotated, specified by quadratic form (tensor product V (x) V^*).

* Geometric Algebra - Hestenes terminology (widely used) for Clifford Algebra
(over reals) used in geometric context.

In all cases pure vectors and pure bivectors anticommute.
Since the Grassman algebra underpins the other Algebras, as the exterior
product, it makes the terminology very messy. It is hard to see a naming
convention that won't be confusing. Most books on the subject use 'Geometric
Algebra' and 'Clifford Algebra' is the second most popular. The book by John
Browne, mentioned by Bill Page seems to put everything under the category of
Grassman Algebra?

The John Browne book also seems to have a different terminology. It seems to
use 'reciprocal bases' to do things in a tensor like way. It seems to derive
all product types from the exterior and interior (defined as the dual of
exterior) products.
It seems to have a 'metric palette' which is a square matrix for each grade.
For instance the metric palette for 2D vectors is:
grade 0: [1]
grade 1: [[g(1,1),g(1,2)],[g(1,2),g(2,2)]]
grade 2: [ -g(1,2)^2 + g(1,1)g(2,2)]

Current Implementation
----------------------
The current implementation in Axiom implements Clifford Algebra with Clifford
bases, however the constructor uses a quadratic form so implementation could
be upgraded to Grassman bases without changing the external interface
(although I guess it would slow it down a lot). Although a better solution is
to create GrassmanSuperHopfAlegbra from graedFreeModule(Ring,Basis) or
GrassmannSuperHopfAlgebraWithBasis which is what Bertfried is working on.

Getting back to the current implementation, taking an example based on 2D
vectors and creating quadratic form from:

a 0
0 c

The multiplication table could be generated from these rules:

<e1, e2 | e1*e1=a, e2*e2=c, e1*e2= -e2*e1>

(and e1*e2 = e1^e2)

The current implementation generates table terms every time they are used when
* operation is called (the table is not generated when a Clifford type is
defined or instantiated: performance issue).

The way that this is calculated in the code is not really documented but as
far as I can work out these rules are implemented by representing bases as non
negative integers (NNI) representing a binary value where a bit position is an
individual vector base, for example e1^e2 would be 00000011. These represent
words, the words for each operand are effectively concatenated and the rules
are applied to reduce to a valid base. This is done to determine the scalar
(sign) as the basis type could have been found from the exclusive-or of the
binary values. This is all done using specific code in the addMonomProd
procedure rather than using any rule mechanism built into Axiom.

Change required
---------------
Grassman bases are required for many important applications such as modelling
conformal space.

So how can we generate the multiplication table from any quadratic form?

a b
b c

Originally I thought this would have to be done by rotating the bases to make
this diagonal, then apply method above, then rotate back by the same amount.
However Bertfried has pointed out that this is not necessary and the table can
be generated directly. I am trying to work out do this and Bertfried hinted
that this can be worked out from the square of the vector.
So since the vector squares to a scalar:

a*e1**2 + b*e1*e2 + b*e2*e1 + c*e2**2 = scalar

so if we take an example:

0 1
1 0

we get

e1*e2 + e2*e1 = scalar

I can't work out to get any further, I think the rules would be something like
this (but I can't work out how to get there):

<e1, e2 | e1*e1=0, e2*e2=0, e1*e2= -1+e1^e2, e2*e1= -1-e1^e2>

(so e1*e2 is not e1^e2)

I can't even work out an extremely simple case, more powerful mathematics is
required, so I need an introduction to the Rota Stein Hopf algebra method and
the Chevalley recursive definition.

Any help appreciated.

Martin


_______________________________________________
Axiom-developer mailing list
Axiom-developer@...
http://lists.nongnu.org/mailman/listinfo/axiom-developer