Axiom/FriCAS Clifford Algebra - Tests

Assuming that grassmann.spad has already been compiled (if not download from here) then the following tests are run by:

) read test2d.input

where test2d.input can be downloaded from here.

These results can be compared with the following test cases from Bertfried:

CliffordTestcases.pdf

Other tests:

Results

(1) -> )read test2d.input                                                             
-- you need to compile first time before running this                                       
-- )compile grassmann.spad                                                                  
)library CLIF                                                                               
                                                                                            
   CliffordAlgebra is now explicitly exposed in frame frame1                               
   CliffordAlgebra will be automatically loaded when needed from                           
      /home/martin/CLIF.NRLIB/CLIF                                                          
-- two D Euclidean space                                                                    
B1 := CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]])                                   
                                                                                            

   (1)  CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]])
                                                                 Type: Domain
-- two D Hyperbolic space                                                    
B2 := CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]])                    
                                                                             

   (2)  CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]])
                                                                 Type: Domain
-- non-orthogonal                                                            
B3 := CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-q,1]])       
                                                                             

   (3)  CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]])                          
                                                                 Type: Domain                       
-- with anti-symmetric bilinear part                                                                
B4 := CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,1/2+q],[1/2-q,0]])                       
                                                                                                    
                                                                                                    
   (4)                                                                                              
  CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]                     
  )                                                                                                 
                                                                 Type: Domain                       
--                                                                                                  
-- the following are results for 2D Euclidean space                                                 
-- wedge for 2D Euclidean space                                                                     
toTable(/\)$B1                                                                                      
                                                                                                    
                                                                                                    
        + 1      e      e    e e +                                                                  
        |         1      2    1 2|                                                                  
        |                        |                                                                  
        | e      0     e e    0  |                                                                  
        |  1            1 2      |                                                                  
   (5)  |                        |                                                                  
        | e    - e e    0     0  |                                                                  
        |  2      1 2            |                                                                  
        |                        |                                                                  
        |e e     0      0     0  |                                                                  
        + 1 2                    +                                                                  
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))                       
--                                                                                                  
-- regression for 2D Euclidean space                                                                
toTable(\/)$B1                                                                                      
                                                                                                    

        +0   0   0    1  +
        |                |
        |0   0   1    e  |
        |              1 |
   (6)  |                |
        |0  - 1  0    e  |
        |              2 |
        |                |
        |1  e    e   e e |
        +    1    2   1 2+
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- clifford multipication for 2D Euclidean space                             
toTable(*)$B1                                                                
                                                                             

        + 1      e      e    e e +
        |         1      2    1 2|
        |                        |
        | e      1     e e    e  |
        |  1            1 2    2 |
   (7)  |                        |
        | e    - e e    1    - e |
        |  2      1 2           1|
        |                        |
        |e e    - e     e    - 1 |
        + 1 2      2     1       +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- left contraction for 2D Euclidean space                                   
toTable(lc)$B1                                                               
                                                                             

        +1  e   e   e e +
        |    1   2   1 2|
        |               |
        |0  1   0    e  |
   (8)  |             2 |
        |               |
        |0  0   1   - e |
        |              1|
        |               |
        +0  0   0   - 1 +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- right contraction for 2D Euclidean space                                  
toTable(rc)$B1                                                               
                                                                             

        + 1     0    0    0 +
        |                   |
        | e     1    0    0 |
        |  1                |
   (9)  |                   |
        | e     0    1    0 |
        |  2                |
        |                   |
        |e e   - e   e   - 1|
        + 1 2     2   1     +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- dual for 2D Euclidean space                                               
toTable(~)$B1                                                                
                                                                             

         + 1    e    e    e e +
         |       1    2    1 2|
   (10)  |                    |
         |e e   e   - e   - 1 |
         + 1 2   2     1      +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- grade Involution for 2D Euclidean space                                   
toTable(gradeInvolution)$B1                                                  
                                                                             

         +1   e     e    e e +
         |     1     2    1 2|
   (11)  |                   |
         |1  - e   - e   e e |
         +      1     2   1 2+
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]))
--                                                                           
-- the following are results for 2D Hyperbolic space                         
-- wedge for 2D Hyperbolic space                                             
toTable(/\)$B2                                                               
                                                                             

         + 1      e      e    e e +
         |         1      2    1 2|
         |                        |
         | e      0     e e    0  |
         |  1            1 2      |
   (12)  |                        |
         | e    - e e    0     0  |
         |  2      1 2            |
         |                        |
         |e e     0      0     0  |
         + 1 2                    +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- regression for 2D Hyperbolic space                                        
toTable(\/)$B2                                                               
                                                                             

         +0   0   0    1  +
         |                |
         |0   0   1    e  |
         |              1 |
   (13)  |                |
         |0  - 1  0    e  |
         |              2 |
         |                |
         |1  e    e   e e |
         +    1    2   1 2+
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- clifford multipication for 2D Hyperbolic space                            
toTable(*)$B2                                                                
                                                                             

         + 1       e         e      e e +
         |          1         2      1 2|
         |                              |
         | e       0      1 + e e   - e |
         |  1                  1 2     1|
   (14)  |                              |
         | e    1 - e e      0       e  |
         |  2        1 2              2 |
         |                              |
         |e e      e        - e      1  |
         + 1 2      1          2        +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- left contraction for 2D Hyperbolic space                                  
toTable(lc)$B2                                                               
                                                                             

         +1  e   e   e e +
         |    1   2   1 2|
         |               |
         |0  0   1   - e |
   (15)  |              1|
         |               |
         |0  1   0    e  |
         |             2 |
         |               |
         +0  0   0    1  +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- right contraction for 2D Hyperbolic space                                 
toTable(rc)$B2                                                               
                                                                             

         + 1    0    0    0+
         |                 |
         | e    0    1    0|
         |  1              |
   (16)  |                 |
         | e    1    0    0|
         |  2              |
         |                 |
         |e e   e   - e   1|
         + 1 2   1     2   +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- dual for 2D Hyperbolic space                                              
toTable(~)$B2                                                                
                                                                             

         + 1     e    e   e e +
         |        1    2   1 2|
   (17)  |                    |
         |e e   - e   e    1  |
         + 1 2     1   2      +
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- grade Involution for 2D Euclidean space                                   
toTable(gradeInvolution)$B2                                                  
                                                                             

         +1   e     e    e e +
         |     1     2    1 2|
   (18)  |                   |
         |1  - e   - e   e e |
         +      1     2   1 2+
            Type: Matrix(CliffordAlgebra(2,Fraction(Integer),[[0,1],[1,0]]))
--                                                                           
-- the following are results for 2D non-orthogonal                           
-- wedge for 2D non-orthogonal space                                         
toTable(/\)$B3                                                               
                                                                             

         + 1      e      e    e e +
         |         1      2    1 2|
         |                        |
         | e      0     e e    0  |
         |  1            1 2      |
   (19)  |                        |
         | e    - e e    0     0  |
         |  2      1 2            |
         |                        |
         |e e     0      0     0  |
         + 1 2                    +
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- regression for 2D non-orthogonal space                                       
toTable(\/)$B3                                                                  
                                                                                

   (20)
            4     2          3
   [[0,0,0,q  + 2q  + 1 + (2q  + 2q)e e ],
                                     1 2  
          4     2          3               4             3
    [0,0,q  + 2q  + 1 + (2q  + 2q)e e ,(- q  + 1)e  + (2q  + 2q)e ],
                                   1 2            1              2  
          4     2            3                  3               4   
    [0,- q  - 2q  - 1 + (- 2q  - 2q)e e ,0,(- 2q  - 2q)e  + (- q  + 1)e ],
                                     1 2                1              2  

       4     2          3                4             3
     [q  + 2q  + 1 + (2q  + 2q)e e , (- q  + 1)e  + (2q  + 2q)e ,
                                1 2             1              2 
           3               4             5     3             4     2
      (- 2q  - 2q)e  + (- q  + 1)e , - 4q  - 8q  - 4q + (- 7q  - 6q  + 1)e e ]
                   1              2                                       1 2 
     ]                                                                        
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- clifford multipication for 2D non-orthogonal space                           
toTable(*)$B3                                                                   
                                                                                

         + 1        e           e              e e        +
         |           1           2              1 2       |
         |                                                |
         | e         1       q + e e       - q e  + e     |
         |  1                     1 2           1    2    |
   (21)  |                                                |
         | e    - q - e e        1         - e  - q e     |
         |  2          1 2                    1      2    |
         |                                                |
         |                                 2              |
         |e e   - q e  - e   e  - q e   - q  - 1 - 2q e e |
         + 1 2       1    2   1      2                 1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- left contraction for 2D non-orthogonal space                                 
toTable(lc)$B3                                                                  
                                                                                

         +1  e    e      e e     +
         |    1    2      1 2    |
         |                       |
         |0   1   q   - q e  + e |
         |                 1    2|
   (22)  |                       |
         |0  - q  1   - e  - q e |
         |               1      2|
         |                       |
         |                2      |
         +0   0   0    - q  - 1  +
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- right contraction for 2D non-orthogonal space                                
toTable(rc)$B3                                                                  
                                                                                

         + 1         0           0         0    +
         |                                      |
         | e         1           q         0    |
         |  1                                   |
         |                                      |
   (23)  | e        - q          1         0    |
         |  2                                   |
         |                                      |
         |                                 2    |
         |e e   - q e  - e   e  - q e   - q  - 1|
         + 1 2       1    2   1      2          +
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- dual for 2D non-orthogonal space                                             
toTable(~)$B3                                                                   
                                                                                

         + 1        e            e               e e        +
         |           1            2               1 2       |
   (24)  |                                                  |
         |                                   2              |
         |e e   - q e  + e   - e  - q e   - q  - 1 - 2q e e |
         + 1 2       1    2     1      2                 1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- grade Involution for 2D non-orthogonal space                                 
toTable(gradeInvolution)$B3                                                     
                                                                                

         +1   e     e    e e +
         |     1     2    1 2|
   (25)  |                   |
         |1  - e   - e   e e |
         +      1     2   1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,q],[-(q),1]]))
--                                                                              
-- the following are results for 2D with anti-symmetric bilinear part           
-- wedge for 2D part anti-symmetric bilinear space                              
toTable(/\)$B4                                                                  
                                                                                

         + 1      e      e    e e +
         |         1      2    1 2|
         |                        |
         | e      0     e e    0  |
         |  1            1 2      |
   (26)  |                        |
         | e    - e e    0     0  |
         |  2      1 2            |
         |                        |
         |e e     0      0     0  |
         + 1 2                    +
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--                                                                                          
-- regression for 2D part anti-symmetric bilinear space                                     
toTable(\/)$B4                                                                              
                                                                                            

   (27)
            4   1  2    1      3   1
   [[0,0,0,q  - - q  + -- + (2q  - - q)e e ],
                2      16          2    1 2  
          4   1  2    1      3   1            4    3   1      1
    [0,0,q  - - q  + -- + (2q  - - q)e e ,(- q  - q  + - q + --)e ],
              2      16          2    1 2              4     16  1  
          4   1  2    1        3   1              4    3   1      1 
    [0,- q  + - q  - -- + (- 2q  + - q)e e ,0,(- q  + q  - - q + --)e ],
              2      16            2    1 2                4     16  2  

       4   1  2    1      3   1             4    3   1      1
     [q  - - q  + -- + (2q  - - q)e e , (- q  - q  + - q + --)e ,
           2      16          2    1 2               4     16  1 
          4    3   1      1         5     3   1          4   3  2    1
      (- q  + q  - - q + --)e , - 4q  + 2q  - - q + (- 7q  + - q  + --)e e ]
                   4     16  2                4              2      16  1 2 
     ]                                                                      
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--                                                                                          
-- clifford multipication for 2D part anti-symmetric bilinear space                         
toTable(*)$B4                                                                               
                                                                                            

         + 1          e              e               e e        +
         |             1              2               1 2       |
         |                                                      |
         |                          1                   1       |
         | e          0         q + - + e e      (- q - -)e     |
         |  1                       2    1 2            2  1    |
   (28)  |                                                      |
         |            1                                 1       |
         | e    - q + - - e e        0           (- q + -)e     |
         |  2         2    1 2                          2  2    |
         |                                                      |
         |              1              1         2   1          |
         |e e    (- q + -)e     (- q - -)e    - q  + - - 2q e e |
         + 1 2          2  1           2  2          4       1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--                                                                                          
-- left contraction for 2D part anti-symmetric bilinear space
toTable(lc)$B4


         +1    e       e        e e     +
         |      1       2        1 2    |
         |                              |
         |                1         1   |
         |0     0     q + -  (- q - -)e |
         |                2         2  1|

   (29)  |                              |
         |         1                1   |
         |0  - q + -    0    (- q + -)e |
         |         2                2  2|
         |                              |
         |                       2   1  |
         |0     0       0     - q  + -  |
         +                           4  +
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--
-- right contraction for 2D part anti-symmetric bilinear space
toTable(rc)$B4


         + 1         0            0          0    +
         |                                        |
         |                          1             |
         | e         0          q + -        0    |
         |  1                       2             |
         |                                        |
   (30)  |              1                         |
         | e      - q + -         0          0    |
         |  2           2                         |
         |                                        |
         |             1            1        2   1|
         |e e   (- q + -)e   (- q - -)e   - q  + -|
         + 1 2         2  1         2  2         4+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--
-- dual for 2D part anti-symmetric bilinear space
toTable(~)$B4


         + 1        e            e               e e        +
         |           1            2               1 2       |
   (31)  |                                                  |
         |             1            1        2   1          |
         |e e   (- q - -)e   (- q + -)e   - q  + - - 2q e e |
         + 1 2         2  1         2  2         4       1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
--
-- grade Involution for 2D part anti-symmetric bilinear space
toTable(gradeInvolution)$B4


         +1   e     e    e e +
         |     1     2    1 2|
   (32)  |                   |
         |1  - e   - e   e e |
         +      1     2   1 2+
Type: Matrix(CliffordAlgebra(2,Expression(Fraction(Integer)),[[0,q+(1/2)],[(-q)+(1/2),0]]))
(33) ->

metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

flag flag flag flag flag flag Geometric Algebra for Physicists - This is intended for physicists so it soon gets onto relativity, spacetime, electrodynamcs, quantum theory, etc. However the introduction to Geometric Algebra and classical mechanics is useful.
flag flag flag flag flag flag Geometric Algebra for Computer Science: An Object-oriented Approach to Geometry. This book stresses the Geometry in Geometric Algebra, although it is still very mathematically orientated. Programmers using this book will need to have a lot of mathematical knowledge. Its good to have a Geometric Algebra book aimed at computer scientists rather than physicists. There is more information about this book here.

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.