login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for CaleyDickson revision 13 of 18

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Editor: Bill Page
Time: 2013/04/01 21:18:41 GMT+0
Note: Rep == vs :=

changed:
-    Rep == Record(re:C, im:C)
    Rep := Record(re:C, im:C)

Ref:

http://en.wikipedia.org/wiki/Cayley%E2%80%93Dickson_construction

"The Cayley–Dickson construction, named after Arthur Cayley and Leonard Eugene Dickson, produces a sequence of algebras over the field of real numbers, each with twice the dimension of the previous one. The algebras produced by this process are known as Cayley–Dickson algebras; since they extend the complex numbers, ... "

complex numbers, quaternions, octonions, sedenions, ...

http://en.wikipedia.org/wiki/Hypercomplex_number

fricas
(1) -> <spad>
fricas
)abbrev domain CALEY CaleyDickson
CaleyDickson(C:CommutativeRing,gen:Symbol,gamma:C):ComplexCategory(C) with
    hyper:List % -> %
      ++ convert a list of scalars to a hyper-comnplex number
    scalars: % -> List %
      ++ convert a hyper-complex number to a list of scalars
  == add
    Rep := Record(re:C, im:C)
    rep(x:%):Rep == x pretend Rep
    per(x:Rep):% == x pretend %
complex(x:C,y:C):% == per [x,y] real(x:%):C == rep(x).re imag(x:%):C == rep(x).im --mul(x:C,y:%):% == complex(x * real y, x * imag y) mul(x:C,y:%):% == per [x * rep(y).re, x * rep(y).im]
-- Many funtctions are inherited from ComplexCategory -- -- To Do: -- 1) Check which functions are still correct for higher-order algebras!
0:% == complex(0,0) --zero?(x:%):Boolean == zero? real x and zero? imag x zero?(x:%):Boolean == x = 0 1:% == complex(1,0) --one?(x:%):Boolean == one? real x and zero? imag x one?(x:%):Boolean == x = 1
if C has conjugate:C->C then -- In general we need conjugate (x:% * y:%):% == complex(real x * real y - gamma*conjugate imag y * imag x, imag y * real x + imag x * conjugate real y) conjugate(x:%):% == complex(conjugate(real x), -imag x) else -- If not complex then conjugate is identity (x:% * y:%):% == complex(real x * real y - gamma*imag y * imag x, imag y * real x + imag x * real y) conjugate(x:%):% == complex(real x, -imag x)
-- correct order norm(x:%):C == retract(conjugate(x)*x)
if C has Field then inv(x:%):% == mul(inv norm x, conjugate x) (x:% / y:%):% == x * inv(y)
if C has rank:()->PositiveInteger then rank():PositiveInteger == 2*rank()$C else rank():PositiveInteger == 2
if C has basis:()->Vector C then basis():Vector % == concat([complex(i,0) for i in entries basis()$C], [complex(0,i) for i in entries basis()$C]) else basis():Vector % == [1,imaginary()]
if C has scalars: C -> List C then scalars(x:%):List % == map(coerce,concat(scalars real x, scalars imag x))$ListFunctions2(C,%) else scalars(x:%):List % == [ coerce real x, coerce imag x ]
if C has hyper:List C -> C then hyper(x:List %):% == h:Integer := divide(#x,2).quotient complex(hyper([retract(x.i)@C for i in 1..h]),hyper([retract(x.i)@C for i in h+1..#x])) else hyper(x:List %):% == complex(retract x.1,retract x.2)
coerce(x:%):OutputForm == outr:=real(x)::OutputForm imag x = 0 => return outr outi := hconcat(imag(x)::OutputForm, gen::OutputForm) if imag x = 1 then outi := gen::OutputForm if imag x = -1 then outi := -(gen::OutputForm) if C has imaginary:()->C then if imag x = -imaginary()$C then outi := -hconcat(imaginary()$C::OutputForm,gen::OutputForm) real x = 0 => return outi return outr + outi</spad>
fricas
Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/381330559998884003-25px001.spad
      using old system compiler.
   CALEY abbreviates domain CaleyDickson 
------------------------------------------------------------------------
   initializing NRLIB CALEY for CaleyDickson 
   compiling into NRLIB CALEY 
****** Domain: C already in scope
   compiling local rep : $ -> Rep
      CALEY;rep is replaced by x 
Time: 0.07 SEC.
compiling local per : Rep -> $ CALEY;per is replaced by x Time: 0 SEC.
compiling exported complex : (C,C) -> $ Time: 0 SEC.
compiling exported real : $ -> C Time: 0 SEC.
compiling exported imag : $ -> C Time: 0 SEC.
compiling local mul : (C,$) -> $ Time: 0 SEC.
compiling exported Zero : () -> $ Time: 0 SEC.
compiling exported zero? : $ -> Boolean Time: 0 SEC.
compiling exported One : () -> $ Time: 0 SEC.
compiling exported one? : $ -> Boolean Time: 0 SEC.
augmenting C: (SIGNATURE C conjugate (C C)) compiling exported * : ($,$) -> $ Time: 0.01 SEC.
compiling exported conjugate : $ -> $ Time: 0 SEC.
compiling exported * : ($,$) -> $ Time: 0 SEC.
compiling exported conjugate : $ -> $ Time: 0 SEC.
compiling exported norm : $ -> C Time: 0 SEC.
****** Domain: C already in scope augmenting C: (Field) compiling exported inv : $ -> $ Time: 0 SEC.
compiling exported / : ($,$) -> $ Time: 0 SEC.
augmenting C: (SIGNATURE C rank ((PositiveInteger))) compiling exported rank : () -> PositiveInteger Time: 0.01 SEC.
compiling exported rank : () -> PositiveInteger CALEY;rank;Pi;19 is replaced by 2 Time: 0 SEC.
augmenting C: (SIGNATURE C basis ((Vector C))) compiling exported basis : () -> Vector $ Time: 0.01 SEC.
compiling exported basis : () -> Vector $ Time: 0 SEC.
augmenting C: (SIGNATURE C scalars ((List C) C)) compiling exported scalars : $ -> List $ Time: 0 SEC.
compiling exported scalars : $ -> List $ Time: 0 SEC.
augmenting C: (SIGNATURE C hyper (C (List C))) compiling exported hyper : List $ -> $ Time: 0.01 SEC.
compiling exported hyper : List $ -> $ Time: 0.01 SEC.
compiling exported coerce : $ -> OutputForm augmenting C: (SIGNATURE C imaginary (C)) Time: 0 SEC.
****** Domain: C already in scope augmenting C: (RadicalCategory) ****** Domain: C already in scope augmenting C: (TranscendentalFunctionCategory) ****** Domain: C already in scope augmenting C: (RealNumberSystem) ****** Domain: C already in scope augmenting C: (TranscendentalFunctionCategory) ****** Domain: C already in scope augmenting C: (Comparable) ****** Domain: C already in scope augmenting C: (ConvertibleTo (InputForm)) ****** Domain: C already in scope augmenting C: (ConvertibleTo (Pattern (Float))) ****** Domain: C already in scope augmenting C: (ConvertibleTo (Pattern (Integer))) ****** Domain: C already in scope augmenting C: (DifferentialRing) ****** Domain: C already in scope augmenting C: (Eltable C C) ****** Domain: C already in scope augmenting C: (Evalable C) ****** Domain: C already in scope augmenting C: (Field) ****** Domain: C already in scope augmenting C: (Finite) ****** Domain: C already in scope augmenting C: (FiniteFieldCategory) ****** Domain: C already in scope augmenting C: (InnerEvalable (Symbol) C) ****** Domain: C already in scope augmenting C: (IntegerNumberSystem) ****** Domain: C already in scope augmenting C: (IntegralDomain) ****** Domain: C already in scope augmenting C: (LinearlyExplicitOver (Integer)) ****** Domain: C already in scope augmenting C: (PartialDifferentialRing (Symbol)) ****** Domain: C already in scope augmenting C: (PatternMatchable (Float)) ****** Domain: C already in scope augmenting C: (PatternMatchable (Integer)) ****** Domain: C already in scope augmenting C: (RealConstant) ****** Domain: C already in scope augmenting C: (RealNumberSystem) ****** Domain: C already in scope augmenting C: (RetractableTo (Fraction (Integer))) ****** Domain: C already in scope augmenting C: (RetractableTo (Integer)) ****** Domain: C already in scope augmenting C: (TranscendentalFunctionCategory) (time taken in buildFunctor: 270)
;;; *** |CaleyDickson| REDEFINED
;;; *** |CaleyDickson| REDEFINED Time: 0.33 SEC.
Warnings: [1] rep: pretendRep -- should replace by @ [2] per: pretend$ -- should replace by @ [3] real: re has no value [4] imag: im has no value [5] mul: re has no value [6] mul: im has no value [7] scalars: $$ has no value
Cumulative Statistics for Constructor CaleyDickson Time: 0.45 seconds
finalizing NRLIB CALEY Processing CaleyDickson for Browser database: --->-->CaleyDickson(constructor): Not documented!!!! --------(hyper (% (List %)))--------- --->-->CaleyDickson((hyper (% (List %)))): Improper first word in comments: convert "convert a list of scalars to a hyper-comnplex number" --------(scalars ((List %) %))--------- --->-->CaleyDickson((scalars ((List %) %))): Improper first word in comments: convert "convert a hyper-complex number to a list of scalars" --->-->CaleyDickson(): Missing Description
>> System error: failed to find the TRUENAME of /var/aw/var/LatexWiki/CALEY.erlib: No such file or directory

Test

fricas
R := FRAC POLY Integer

\label{eq1}\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{Polynomial}\ } (\hbox{\axiomType{Integer}\ }))(1)
Type: Type

Complex Numbers

fricas
C := CaleyDickson(R,'i,1)
CaleyDickson is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?

Quaternions

fricas
Q := CaleyDickson(C,'j,1)
CaleyDickson is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?

Octonions

Ref: http://en.wikipedia.org/wiki/Octonion

fricas
O:=CaleyDickson(Q,'k,1)
CaleyDickson is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?

Split-Octonions

Ref: http://en.wikipedia.org/wiki/Split-octonion

Note: Our table below is not identical the one shown in the reference where a different convention is used to define multiplication.

fricas
sO:=CaleyDickson(Q,'ℓ,-1)
CaleyDickson is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?

Sedenions

Ref: http://en.wikipedia.org/wiki/Sedenion

fricas
S:=CaleyDickson(O,'l,1)
CaleyDickson is an unknown constructor and so is unavailable. Did you mean to use -> but type something different instead?

Power Associative?

Algebra with associative powers

Ref: http://eom.springer.de/a/a011410.htm

fricas
test( s1^2 * s1 = s1 * s1^2 )

\label{eq2} \mbox{\rm true} (2)
Type: Boolean
fricas
test( (s1^2 * s1) * s1 = s1^2 * s1^2 )

\label{eq3} \mbox{\rm true} (3)
Type: Boolean

Conversions

fricas
test(s1=hyper scalars s1)
There are no library operations named scalars Use HyperDoc Browse or issue )what op scalars to learn if there is any operation containing " scalars " in its name.
Cannot find a definition or applicable library operation named scalars with argument type(s) Variable(s1)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.