Biquaternion Calculus Domain
D. Cyganski and Bill Page - July 2007
This version is implemented as a new domain in SPAD.
\begin{spad}
)abbrev domain BIQ BiQuaternion
BiQuaternion(R:Join(OrderedSet,CommutativeRing)): Exports == Implementation where
C==>Complex Expression R
Exports ==> QuaternionCategory(C) with
qlist: List C -> %
-- takes a complex list (parameter l) into a quaternion
listq: % -> List C
-- takes a quaternion into a list
matrixq: % -> SquareMatrix(2,C)
-- takes a quaternion into a matrix
sig0: ()->%
sig1: ()->%
sig2: ()->%
sig3: ()->%
siglist: % -> List C
-- Pauli basis representation of the biquaternion
if C has PartialDifferentialRing(Symbol) then
D: (%,Symbol,Symbol,Symbol) -> %
-- quaternion derivative
if C has RadicalCategory and C has Field and C has TranscendentalFunctionCategory then
abs: % -> C
rot: (C,%) -> %
exp: % -> %
-- biquaternion rotation
_/: (%,%) -> %
_/: (C,%) -> %
_/: (%,C) -> %
coerce: Complex R -> %
Implementation ==> Quaternion C add
import C
coerce(z:Complex R):% ==
import Expression(R),ComplexFunctions2(R,Expression R)
map(coerce,z)::%
-- Define a function that takes a complex list (parameter l) into a quaternion
qlist(l:List C):%==
import Integer
quatern(l 1,l 2,l 3,l 4)
-- Define a function that takes a quaternion into a list
listq(x:%):List C == [real x, imagI x, imagJ x, imagK x]
-- Define a function that takes a biquat into a matrix
matrixq(x:%):SquareMatrix(2,C) ==
import List List C
matrix [[real x + imaginary()imagI(x), imagJ x + imaginary()imagK(x)],
[-imagJ(x) + imaginary()imagK(x), real x - imaginary()imagI(x)]]
-- Define a function that produces the Pauli basis representation of the biquaternion
siglist(x:%):List C == [real x, -imaginary()imagK(x),-imaginary()imagJ(x),imaginary()imagI(x)]
sig0():% == quatern(1,0,0,0)
sig1():% == imaginary() quatern(0,0,0,1)
sig2():% == imaginary() quatern(0,0,1,0)
sig3():% == -imaginary() quatern(0,1,0,0)
-- Define the quaternion derivative (Morgan, 2001, Eq. 2)
if C has PartialDifferentialRing(Symbol) then
D(q:%,x:Symbol,y:Symbol,z:Symbol):% == sig1()D(q,x)+sig2()D(q,y)+sig3()D(q,z)
-- Define a biquaternion rotation operator that takes a biquat through a rotation
-- of theta radians about the axis defined by the unit q biquat (Morgan 2001, Eq 3).
if C has RadicalCategory and C has Field and C has TranscendentalFunctionCategory then
rot(theta:C,q:%):% ==
import Integer, SparseMultivariatePolynomial(Integer, Kernel(C))
cos(theta/2::C)::% - imaginary()qsin(theta/2::C)
((x:%) / (y:%)):% == xinv(y)$%
((x:C) / (y:%)):% == (x::%)inv(y)
((x:%) / (y:C)):% == xinv(y::%)
abs(q:%):C ==
sqrt(retract(qconjugate(q)))
exp(q:%):% ==
import Integer, SparseMultivariatePolynomial(Integer, Kernel(C))
q-conjugate(q)=0 => exp(retract(q+conjugate(q))/2::C)sig0()
exp(retract(q+conjugate(q))/2::C) (sig0()cos(abs(q)) + (q-conjugate(q))/abs(q-conjugate(q)) * sin(abs(q)))
\end{spad}
\begin{axiom}
)show BiQuaternion
\end{axiom}
\begin{axiom}
Q := BiQuaternion Integer
q:Q := quatern(q0,q1,q2,q3)
\end{axiom}
For testing the derivative we define this set of operators
\begin{axiom}
Ft:=operator 'Ft; Fx:=operator 'Fx; Fy:=operator 'Fy; Fz:=operator 'Fz;
\end{axiom}
Now form a general quaternion which is a function of x,y,z
\begin{axiom}
F:Q:=Ft(x,y,z)sig0()+Fx(x,y,z)sig1()+Fy(x,y,z)sig2()+Fz(x,y,z)sig3()
\end{axiom}
In the Pauli basis the derivative of this biquat should produce (Morgan 2001, eq 1):
D(Ft+F.sigma)=div(F)+(grad(Ft)+%i*curl(F)).sigma
which it does
\begin{axiom}
siglist(D(F,x,y,z))
\end{axiom}
Test
(comment out this test later)
\begin{axiom}
%i::Q
abs(%i::Q)
abs(q)
cos(abs(%i::Q))
\end{axiom}
If I've defined these correctly, then the rotation about the x axis defined by qx below by 2 radians
should give the same answer as exponentiation to -%i*qx
(not a very complete test)
\begin{axiom}
qx:Q:=sig1()
siglist(rot(2,qx))
siglist(exp(-%i::Q*qx))
\end{axiom}
which it does
\begin{axiom}
(%%(-1)=%%(-2))@Boolean
\end{axiom}
I would love to express a proof of equality such as:
rot(theta,q) = exp((-theta/2)*%i*q)
for arbitrary real $\theta$ and biquaternion q as I would in Maple.
\begin{axiom}
theta:Complex Expression Integer := _\theta
map(simplify, siglist( rot(theta,q) - exp((-%itheta/2) q)))::List Expression Complex Integer
\end{axiom}
\begin{axiom}
map(simplify,siglist(rot(2,qx)))
\end{axiom}
Some or all expressions may not have rendered properly,
because Axiom returned the following error:
Error: export HOME=/var/zope2/var/LatexWiki; ulimit -t 600; export LD_LIBRARY_PATH=/usr/local/lib/fricas/target/x86_64-linux-gnu/lib; LANG=en_US.UTF-8 /usr/local/lib/fricas/target/x86_64-linux-gnu/bin/fricas -nosman < /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/405825799807838506-25px.axm
Killed
Checking for foreign routines
FRICAS="/usr/local/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
FriCAS Computer Algebra System
Version: FriCAS 1.3.10 built with sbcl 2.2.9.debian
Timestamp: Wed 10 Jan 02:19:45 CET 2024
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
(1) -> (1) -> (1) -> (1) -> (1) -> (1) -> <spad>
)abbrev domain BIQ BiQuaternion
BiQuaternion(R:Join(OrderedSet,CommutativeRing)): Exports == Implementation where
C==>Complex Expression R
Exports ==> QuaternionCategory(C) with
qlist: List C -> %
-- takes a complex list (parameter l) into a quaternion
listq: % -> List C
-- takes a quaternion into a list
matrixq: % -> SquareMatrix(2,C)
-- takes a quaternion into a matrix
sig0: ()->%
sig1: ()->%
sig2: ()->%
sig3: ()->%
siglist: % -> List C
-- Pauli basis representation of the biquaternion
if C has PartialDifferentialRing(Symbol) then
D: (%,Symbol,Symbol,Symbol) -> %
-- quaternion derivative
if C has RadicalCategory and C has Field and C has TranscendentalFunctionCategory then
abs: % -> C
rot: (C,%) -> %
exp: % -> %
-- biquaternion rotation
/: (%,%) -> %
/: (C,%) -> %
_/: (%,C) -> %
coerce: Complex R -> %
Implementation ==> Quaternion C add
import C
coerce(z:Complex R):% ==
import Expression(R),ComplexFunctions2(R,Expression R)
map(coerce,z)::%
-- Define a function that takes a complex list (parameter l) into a quaternion
qlist(l:List C):%==
import Integer
quatern(l 1,l 2,l 3,l 4)
-- Define a function that takes a quaternion into a list
listq(x:%):List C == [real x, imagI x, imagJ x, imagK x]
-- Define a function that takes a biquat into a matrix
matrixq(x:%):SquareMatrix(2,C) ==
import List List C
matrix [[real x + imaginary()imagI(x), imagJ x + imaginary()imagK(x)],
[-imagJ(x) + imaginary()imagK(x), real x - imaginary()imagI(x)]]
-- Define a function that produces the Pauli basis representation of the biquaternion
siglist(x:%):List C == [real x, -imaginary()imagK(x),-imaginary()imagJ(x),imaginary()imagI(x)]
sig0():% == quatern(1,0,0,0)
sig1():% == imaginary() quatern(0,0,0,1)
sig2():% == imaginary() quatern(0,0,1,0)
sig3():% == -imaginary() quatern(0,1,0,0)
-- Define the quaternion derivative (Morgan, 2001, Eq. 2)
if C has PartialDifferentialRing(Symbol) then
D(q:%,x:Symbol,y:Symbol,z:Symbol):% == sig1()D(q,x)+sig2()D(q,y)+sig3()D(q,z)
-- Define a biquaternion rotation operator that takes a biquat through a rotation
-- of theta radians about the axis defined by the unit q biquat (Morgan 2001, Eq 3).
if C has RadicalCategory and C has Field and C has TranscendentalFunctionCategory then
rot(theta:C,q:%):% ==
import Integer, SparseMultivariatePolynomial(Integer, Kernel(C))
cos(theta/2::C)::% - imaginary()qsin(theta/2::C)
((x:%) / (y:%)):% == xinv(y)$%
((x:C) / (y:%)):% == (x::%)inv(y)
((x:%) / (y:C)):% == xinv(y::%)
abs(q:%):C ==
sqrt(retract(qconjugate(q)))
exp(q:%):% ==
import Integer, SparseMultivariatePolynomial(Integer, Kernel(C))
q-conjugate(q)=0 => exp(retract(q+conjugate(q))/2::C)sig0()
exp(retract(q+conjugate(q))/2::C) (sig0()cos(abs(q)) + (q-conjugate(q))/abs(q-conjugate(q)) sin(abs(q)))</spad>
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8384816125117043612-25px001.spad
using old system compiler.
BIQ abbreviates domain BiQuaternion
------------------------------------------------------------------------
initializing NRLIB BIQ for BiQuaternion
compiling into NRLIB BIQ
***** Domain: R already in scope
importing Complex Expression R
compiling exported coerce : Complex R -> %
Time: 0.05 SEC.
compiling exported qlist : List Complex Expression R -> %
Time: 0 SEC.
compiling exported listq : % -> List Complex Expression R
Time: 0 SEC.
compiling exported matrixq : % -> SquareMatrix(2,Complex Expression R)
Time: 0 SEC.
compiling exported siglist : % -> List Complex Expression R
Time: 0 SEC.
compiling exported sig0 : () -> %
Time: 0 SEC.
compiling exported sig1 : () -> %
Time: 0 SEC.
compiling exported sig2 : () -> %
Time: 0 SEC.
compiling exported sig3 : () -> %
Time: 0 SEC.
compiling exported D : (%,Symbol,Symbol,Symbol) -> %
Time: 0.02 SEC.
**** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (RadicalCategory)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (Field)
**** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (TranscendentalFunctionCategory)
compiling exported rot : (Complex Expression R,%) -> %
Time: 0.04 SEC.
compiling exported / : (%,%) -> %
Time: 0 SEC.
compiling exported / : (Complex Expression R,%) -> %
Time: 0 SEC.
compiling exported / : (%,Complex Expression R) -> %
Time: 0 SEC.
compiling exported abs : % -> Complex Expression R
Time: 0 SEC.
compiling exported exp : % -> %
Time: 0.07 SEC.
**** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (Field)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (RadicalCategory)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (TranscendentalFunctionCategory)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (CharacteristicNonZero)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (ConvertibleTo (InputForm))
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (DifferentialRing)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (Eltable (Complex (Expression R)) (Complex (Expression R)))
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (EntireRing)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (Evalable (Complex (Expression R)))
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (Field)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (InnerEvalable (Symbol) (Complex (Expression R)))
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (IntegerNumberSystem)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (LinearlyExplicitOver (Integer))
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (OrderedSet)
** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (RetractableTo (Fraction (Integer)))
**** Domain: (Complex (Expression R)) already in scope
augmenting (Complex (Expression R)): (RetractableTo (Integer))
(time taken in buildFunctor: 33451)
;;; *** |BiQuaternion| REDEFINED
;;; *** |BiQuaternion| REDEFINED
Time: 0.19 SEC.
Cumulative Statistics for Constructor BiQuaternion
Time: 0.40 seconds
finalizing NRLIB BIQ
Processing BiQuaternion for Browser database:
--->-->BiQuaternion(constructor): Not documented!!!!
--->-->BiQuaternion((qlist (% (List (Complex (Expression R)))))): Not documented!!!!
--->-->BiQuaternion((listq ((List (Complex (Expression R))) %))): Not documented!!!!
--->-->BiQuaternion((matrixq ((SquareMatrix 2 (Complex (Expression R))) %))): Not documented!!!!
--->-->BiQuaternion((sig0 (%))): Not documented!!!!
--->-->BiQuaternion((sig1 (%))): Not documented!!!!
--->-->BiQuaternion((sig2 (%))): Not documented!!!!
--->-->BiQuaternion((sig3 (%))): Not documented!!!!
--->-->BiQuaternion((siglist ((List (Complex (Expression R))) %))): Not documented!!!!
--->-->BiQuaternion((D (% % (Symbol) (Symbol) (Symbol)))): Not documented!!!!
--->-->BiQuaternion((abs ((Complex (Expression R)) %))): Not documented!!!!
--->-->BiQuaternion((rot (% (Complex (Expression R)) %))): Not documented!!!!
--->-->BiQuaternion((exp (% %))): Not documented!!!!
--->-->BiQuaternion((/ (% % %))): Not documented!!!!
--->-->BiQuaternion((/ (% (Complex (Expression R)) %))): Not documented!!!!
--->-->BiQuaternion((/ (% % (Complex (Expression R))))): Not documented!!!!
--->-->BiQuaternion((coerce (% (Complex R)))): Not documented!!!!
--->-->BiQuaternion(): Missing Description
; compiling file "/var/aw/var/LatexWiki/BIQ.NRLIB/BIQ.lsp" (written 01 NOV 2024 03:46:11 AM):
; wrote /var/aw/var/LatexWiki/BIQ.NRLIB/BIQ.fasl
; compilation finished in 0:00:00.056
------------------------------------------------------------------------
BiQuaternion is now explicitly exposed in frame initial
BiQuaternion will be automatically loaded when needed from
/var/aw/var/LatexWiki/BIQ.NRLIB/BIQ
(1) -> )show BiQuaternion
BiQuaternion(R: Join(OrderedSet,CommutativeRing)) is a domain constructor
Abbreviation for BiQuaternion is BIQ
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
?? : (Integer, %) -> % ?? : (%, %) -> %
?? : (PositiveInteger, %) -> % ?+? : (%, %) -> %
-? : % -> % ?-? : (%, %) -> %
?=? : (%, %) -> Boolean 1 : () -> %
0 : () -> % ?^? : (%, PositiveInteger) -> %
annihilate? : (%, %) -> Boolean antiCommutator : (%, %) -> %
associator : (%, %, %) -> % coerce : Complex(R) -> %
coerce : Integer -> % coerce : % -> OutputForm
commutator : (%, %) -> % conjugate : % -> %
latex : % -> String one? : % -> Boolean
opposite? : (%, %) -> Boolean recip : % -> Union(%,"failed")
sample : () -> % sig0 : () -> %
sig1 : () -> % sig2 : () -> %
sig3 : () -> % zero? : % -> Boolean
?~=? : (%, %) -> Boolean
?? : (%, Fraction(Integer)) -> % if Complex(Expression(R)) has FIELD
?? : (Fraction(Integer), %) -> % if Complex(Expression(R)) has FIELD
?? : (%, Integer) -> % if Complex(Expression(R)) has LINEXP(INT)
?? : (%, Complex(Expression(R))) -> %
?? : (Complex(Expression(R)), %) -> %
?*? : (NonNegativeInteger, %) -> %
?/? : (%, Complex(Expression(R))) -> % if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN
?/? : (Complex(Expression(R)), %) -> % if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN
?/? : (%, %) -> % if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN
?<? : (%, %) -> Boolean if Complex(Expression(R)) has ORDSET
?<=? : (%, %) -> Boolean if Complex(Expression(R)) has ORDSET
?>? : (%, %) -> Boolean if Complex(Expression(R)) has ORDSET
?>=? : (%, %) -> Boolean if Complex(Expression(R)) has ORDSET
D : (%, Symbol, Symbol, Symbol) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
D : (%, (Complex(Expression(R)) -> Complex(Expression(R)))) -> %
D : (%, (Complex(Expression(R)) -> Complex(Expression(R))), NonNegativeInteger) -> %
D : (%, List(Symbol), List(NonNegativeInteger)) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
D : (%, Symbol, NonNegativeInteger) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
D : (%, List(Symbol)) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
D : (%, Symbol) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
D : (%, NonNegativeInteger) -> % if Complex(Expression(R)) has DIFRING
D : % -> % if Complex(Expression(R)) has DIFRING
?^? : (%, Integer) -> % if Complex(Expression(R)) has FIELD
?^? : (%, NonNegativeInteger) -> %
abs : % -> Complex(Expression(R)) if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN or Complex(Expression(R)) has RNS
associates? : (%, %) -> Boolean if Complex(Expression(R)) has ENTIRER
characteristic : () -> NonNegativeInteger
charthRoot : % -> Union(%,"failed") if Complex(Expression(R)) has CHARNZ
coerce : Fraction(Integer) -> % if Complex(Expression(R)) has FIELD or Complex(Expression(R)) has RETRACT(FRAC(INT))
coerce : Complex(Expression(R)) -> %
convert : % -> InputForm if Complex(Expression(R)) has KONVERT(INFORM)
differentiate : (%, (Complex(Expression(R)) -> Complex(Expression(R)))) -> %
differentiate : (%, (Complex(Expression(R)) -> Complex(Expression(R))), NonNegativeInteger) -> %
differentiate : (%, List(Symbol), List(NonNegativeInteger)) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
differentiate : (%, Symbol, NonNegativeInteger) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
differentiate : (%, List(Symbol)) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
differentiate : (%, Symbol) -> % if Complex(Expression(R)) has PDRING(SYMBOL)
differentiate : (%, NonNegativeInteger) -> % if Complex(Expression(R)) has DIFRING
differentiate : % -> % if Complex(Expression(R)) has DIFRING
elt : (%, Complex(Expression(R))) -> % if Complex(Expression(R)) has ELTAB(COMPLEX(EXPR(R)),COMPLEX(EXPR(R)))
eval : (%, Symbol, Complex(Expression(R))) -> % if Complex(Expression(R)) has IEVALAB(SYMBOL,COMPLEX(EXPR(R)))
eval : (%, List(Symbol), List(Complex(Expression(R)))) -> % if Complex(Expression(R)) has IEVALAB(SYMBOL,COMPLEX(EXPR(R)))
eval : (%, List(Equation(Complex(Expression(R))))) -> % if Complex(Expression(R)) has EVALAB(COMPLEX(EXPR(R)))
eval : (%, Equation(Complex(Expression(R)))) -> % if Complex(Expression(R)) has EVALAB(COMPLEX(EXPR(R)))
eval : (%, Complex(Expression(R)), Complex(Expression(R))) -> % if Complex(Expression(R)) has EVALAB(COMPLEX(EXPR(R)))
eval : (%, List(Complex(Expression(R))), List(Complex(Expression(R)))) -> % if Complex(Expression(R)) has EVALAB(COMPLEX(EXPR(R)))
exp : % -> % if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN
exquo : (%, %) -> Union(%,"failed") if Complex(Expression(R)) has ENTIRER
imagI : % -> Complex(Expression(R))
imagJ : % -> Complex(Expression(R))
imagK : % -> Complex(Expression(R))
inv : % -> % if Complex(Expression(R)) has FIELD
leftPower : (%, NonNegativeInteger) -> %
leftPower : (%, PositiveInteger) -> %
leftRecip : % -> Union(%,"failed")
listq : % -> List(Complex(Expression(R)))
map : ((Complex(Expression(R)) -> Complex(Expression(R))), %) -> %
matrixq : % -> SquareMatrix(2,Complex(Expression(R)))
max : (%, %) -> % if Complex(Expression(R)) has ORDSET
min : (%, %) -> % if Complex(Expression(R)) has ORDSET
norm : % -> Complex(Expression(R))
plenaryPower : (%, PositiveInteger) -> %
qlist : List(Complex(Expression(R))) -> %
quatern : (Complex(Expression(R)), Complex(Expression(R)), Complex(Expression(R)), Complex(Expression(R))) -> %
rational : % -> Fraction(Integer) if Complex(Expression(R)) has INS
rational? : % -> Boolean if Complex(Expression(R)) has INS
rationalIfCan : % -> Union(Fraction(Integer),"failed") if Complex(Expression(R)) has INS
real : % -> Complex(Expression(R))
reducedSystem : Matrix(%) -> Matrix(Complex(Expression(R)))
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat: Matrix(Complex(Expression(R))),vec: Vector(Complex(Expression(R))))
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat: Matrix(Integer),vec: Vector(Integer)) if Complex(Expression(R)) has LINEXP(INT)
reducedSystem : Matrix(%) -> Matrix(Integer) if Complex(Expression(R)) has LINEXP(INT)
retract : % -> Complex(Expression(R))
retract : % -> Fraction(Integer) if Complex(Expression(R)) has RETRACT(FRAC(INT))
retract : % -> Integer if Complex(Expression(R)) has RETRACT(INT)
retractIfCan : % -> Union(Complex(Expression(R)),"failed")
retractIfCan : % -> Union(Fraction(Integer),"failed") if Complex(Expression(R)) has RETRACT(FRAC(INT))
retractIfCan : % -> Union(Integer,"failed") if Complex(Expression(R)) has RETRACT(INT)
rightPower : (%, NonNegativeInteger) -> %
rightPower : (%, PositiveInteger) -> %
rightRecip : % -> Union(%,"failed")
rot : (Complex(Expression(R)), %) -> % if Complex(Expression(R)) has FIELD and Complex(Expression(R)) has RADCAT and Complex(Expression(R)) has TRANFUN
siglist : % -> List(Complex(Expression(R)))
smaller? : (%, %) -> Boolean if Complex(Expression(R)) has ORDSET
subtractIfCan : (%, %) -> Union(%,"failed")
unit? : % -> Boolean if Complex(Expression(R)) has ENTIRER
unitCanonical : % -> % if Complex(Expression(R)) has ENTIRER
unitNormal : % -> Record(unit: %,canonical: %,associate: %) if Complex(Expression(R)) has ENTIRER
(1) -> Q := BiQuaternion Integer
$$
BiQuaternion
\left(
{Integer}
\right)
\leqno(1)
$$
Type: Type
q:Q := quatern(q0,q1,q2,q3)
$$
q0+{q1 \ i}+{q2 \ j}+{q3 \ k}
\leqno(2)
$$
Type: BiQuaternion(Integer)
(3) -> Ft:=operator 'Ft; Fx:=operator 'Fx; Fy:=operator 'Fy; Fz:=operator 'Fz;
Type: BasicOperator
(4) -> F:Q:=Ft(x,y,z)sig0()+Fx(x,y,z)sig1()+Fy(x,y,z)sig2()+Fz(x,y,z)sig3()
$$
{Ft
\left(
{x, \: y, \: z}
\right)}
-{{Fz
\left(
{x, \: y, \: z}
\right)}
\ i \ i}+{{Fy
\left(
{x, \: y, \: z}
\right)}
\ i \ j}+{{Fx
\left(
{x, \: y, \: z}
\right)}
\ i \ k}
\leqno(4)
$$
Type: BiQuaternion(Integer)
(5) -> siglist(D(F,x,y,z))
$$
\left[
{{{Fz \sb {{,3}}}
\left(
{x, \: y, \: z}
\right)}+{{Fy
\sb {{,2}}}
\left(
{x, \: y, \: z}
\right)}+{{Fx
\sb {{,1}}}
\left(
{x, \: y, \: z}
\right)}},
\: {{{Ft \sb {{,1}}}
\left(
{x, \: y, \: z}
\right)}+{{\left(
{{Fz \sb {{,2}}}
\left(
{x, \: y, \: z}
\right)}
-{{Fy \sb {{,3}}}
\left(
{x, \: y, \: z}
\right)}
\right)}
\ i}}, \: {{{Ft \sb {{,2}}}
\left(
{x, \: y, \: z}
\right)}+{{\left(
-{{Fz \sb {{,1}}}
\left(
{x, \: y, \: z}
\right)}+{{Fx
\sb {{,3}}}
\left(
{x, \: y, \: z}
\right)}
\right)}
\ i}}, \: {{{Ft \sb {{,3}}}
\left(
{x, \: y, \: z}
\right)}+{{\left(
{{Fy \sb {{,1}}}
\left(
{x, \: y, \: z}
\right)}
-{{Fx \sb {{,2}}}
\left(
{x, \: y, \: z}
\right)}
\right)}
\ i}}
\right]
\leqno(5)
$$
Type: List(Complex(Expression(Integer)))
(6) -> %i::Q