|
|
last edited 2 years ago by Bill Page |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ||
Editor: Bill Page
Time: 2011/04/15 15:59:52 GMT-7 |
||
Note: new |
changed: - 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, ... \begin{spad} )abbrev domain CALEY CaleyDickson CaleyDickson(R:CommutativeRing,C:ComplexCategory(R)):Exports == Implementation where Exports ==> ComplexCategory(C) with if C has Field then Field Implementation ==> add Rep == DirectProduct(2,C) rep(x:%):Rep == x pretend Rep per(x:Rep):% == x pretend % pair(x:C,y:C):Rep == directProduct vector [x,y] 0:% == per pair(0,0) zero?(x):Boolean == rep(x)=0 1:% == per pair(1,0) imaginary():% == per pair(0,1) basis():Vector % == vector [1,imaginary()] complex(x:C,y:C):% == per pair(x,y) real(x:%):C == rep(x).1 imag(x:%):C == rep(x).2 (x:% = y:%):Boolean == rep x = rep y (x:% * y:%):% == per pair(real x * real y - conjugate imag y * imag x, imag y * real x + imag x * conjugate real y) (x:% + y:%):% == per(rep x + rep y) (x:% - y:%):% == per(rep x - rep y) conjugate(x:%):% == per pair(conjugate(real x), -imag x) if C has Field then inv(x:%):% == per(inv(real(conjugate x * x))$C * rep conjugate x) (x:% / y:%):% == x * inv(y) retract(x:%):C == imag x ~=0 => error "not retractable" real x coerce(x:C):% == per pair(x,0) coerce(x:Integer):% == per pair(x::R::C,0) coerce(x:%):OutputForm == real(x)::OutputForm + message("%I")*imag(x)::OutputForm \end{spad} \begin{axiom} Q:=CaleyDickson(FRAC INT,Complex FRAC INT) q:Q:=complex(complex(1,1),complex(1,1)) \end{axiom}
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, ...
)abbrev domain CALEY CaleyDickson CaleyDickson(R:CommutativeRing,C:ComplexCategory(R)):Exports == Implementation where Exports ==> ComplexCategory(C) with if C has Field then Field Implementation ==> add Rep == DirectProduct(2, C) rep(x:%):Rep == x pretend Rep per(x:Rep):% == x pretend %
pair(x:C,y:C):Rep == directProduct vector [x, y]
0:% == per pair(0,0) zero?(x):Boolean == rep(x)=0 1:% == per pair(1, 0) imaginary():% == per pair(0, 1) basis():Vector % == vector [1, imaginary()] complex(x:C, y:C):% == per pair(x, y) real(x:%):C == rep(x).1 imag(x:%):C == rep(x).2
(x:% = y:%):Boolean == rep x = rep y (x:% * y:%):% == per pair(real x * real y - conjugate imag y * imag x,imag y * real x + imag x * conjugate real y) (x:% + y:%):% == per(rep x + rep y) (x:% - y:%):% == per(rep x - rep y) conjugate(x:%):% == per pair(conjugate(real x), -imag x) if C has Field then inv(x:%):% == per(inv(real(conjugate x * x))$C * rep conjugate x) (x:% / y:%):% == x * inv(y) retract(x:%):C == imag x ~=0 => error "not retractable" real x coerce(x:C):% == per pair(x, 0) coerce(x:Integer):% == per pair(x::R::C, 0) coerce(x:%):OutputForm == real(x)::OutputForm + message("%I")*imag(x)::OutputForm
Compiling FriCAS source code from file /var/zope2/var/LatexWiki/6639839417993251745-25px001.spad using old system compiler. CALEY abbreviates domain CaleyDickson ------------------------------------------------------------------------ initializing NRLIB CALEY for CaleyDickson compiling into NRLIB CALEY compiling local rep : $ -> DirectProduct(2,C) CALEY;rep is replaced by x Time: 0.41 SEC.
compiling local per : DirectProduct(2,C) -> $ CALEY;per is replaced by x Time: 0.01 SEC.
compiling local pair : (C,C) -> DirectProduct(2, C) Time: 0.02 SEC.
compiling exported Zero : () -> $ Time: 0 SEC.
compiling exported zero? : $ -> Boolean Time: 0 SEC.
compiling exported One : () -> $ Time: 0.01 SEC.
compiling exported imaginary : () -> $ Time: 0 SEC.
compiling exported basis : () -> Vector $ Time: 0.09 SEC.
compiling exported complex : (C,C) -> $ Time: 0 SEC.
compiling exported real : $ -> C Time: 0 SEC.
compiling exported imag : $ -> C Time: 0 SEC.
compiling exported = : ($,$) -> Boolean Time: 0 SEC.
compiling exported * : ($,$) -> $ Time: 0.01 SEC.
compiling exported + : ($,$) -> $ Time: 0 SEC.
compiling exported - : ($,$) -> $ Time: 0 SEC.
compiling exported conjugate : $ -> $ Time: 0 SEC.
****** Domain: C already in scope augmenting C: (Field) compiling exported inv : $ -> $ Time: 0.08 SEC.
compiling exported / : ($,$) -> $ Time: 0.01 SEC.
compiling exported retract : $ -> C Time: 0 SEC.
compiling exported coerce : C -> $ Time: 0 SEC.
compiling exported coerce : Integer -> $ Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0.01 SEC.
****** Domain: C already in scope augmenting C: (EuclideanDomain) ****** Domain: C already in scope augmenting C: (PolynomialFactorizationExplicit) ****** 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: (EuclideanDomain) ****** 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: (LinearlyExplicitRingOver (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: 3040)
;;; *** |CaleyDickson| REDEFINED
;;; *** |CaleyDickson| REDEFINED Time: 3.82 SEC.
Cumulative Statistics for Constructor CaleyDickson Time: 4.47 seconds
finalizing NRLIB CALEY Processing CaleyDickson for Browser database: --->-->CaleyDickson(): Missing Description ; compiling file "/var/zope2/var/LatexWiki/CALEY.NRLIB/CALEY.lsp" (written 15 APR 2011 03:59:58 PM):
; /var/zope2/var/LatexWiki/CALEY.NRLIB/CALEY.fasl written ; compilation finished in 0:00:00.522 ------------------------------------------------------------------------ CaleyDickson is now explicitly exposed in frame initial CaleyDickson will be automatically loaded when needed from /var/zope2/var/LatexWiki/CALEY.NRLIB/CALEY
>> System error: The bounding indices 163 and 162 are bad for a sequence of length 162. See also: The ANSI Standard,Glossary entry for "bounding index designator" The ANSI Standard, writeup for Issue SUBSEQ-OUT-OF-BOUNDS:IS-AN-ERROR
Q:=CaleyDickson(FRAC INT,Complex FRAC INT)
(1) |
q:Q:=complex(complex(1,1), complex(1, 1))
(2) |