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

Edit detail for SandBoxComplexManifold revision 1 of 7

1 2 3 4 5 6 7
Editor: Bill Page
Time: 2009/06/20 15:12:26 GMT-7
Note: new

changed:
-
\begin{spad}
)abbrev domain CM ComplexManifold
ComplexManifold(R:Join(Field,RadicalCategory,OrderedSet)): Join(RadicalCategory,DirectProductCategory(2,R)) with
    elt:(%,"pos") -> R
    elt:(%,"neg") -> R
    imaginary: () -> %
    real: % -> R
    imag: % -> R
    conj: % -> %
  == DirectProduct(2,R) add
    Rep == DirectProduct(2,R)
    elt(x,"pos") == rep(x).1
    elt(x,"neg") == rep(x).2

    imaginary():% == per directProduct vector [1,-1]
    real(x:%):R == (rep(x).1 + rep(x).2)/(2::R)
    imag(x:%):R == (rep(x).1 - rep(x).2)/(2::R)
    conj(x:%):% == per directProduct vector [rep(x).2,rep(x).1]
    sqrt(x:%):% == per directProduct vector [  _
      sqrt real(x) + sqrt imag(x),  _
      ((if real(x)>=0 then sqrt real(x) else 0) - _
      (if real(x)<=0 then sqrt real(x) else 0)) + _
      ((if imag(x)<=0 then sqrt imag(x) else 0) - _
      (if imag(x)>=0 then sqrt imag(x) else 0)) ]
\end{spad}

\begin{axiom}
a:CM(EXPR INT) := 3
b:CM(EXPR INT) := -3
real(a)
s1:=sqrt(a)
real s1
imag s1
s2:=sqrt(b)
real s2
imag s2
I:CM(EXPR INT) := imaginary()
imag I
imag conj I
conj(a+b*I)
\end{axiom}

spad
)abbrev domain CM ComplexManifold
ComplexManifold(R:Join(Field,RadicalCategory,OrderedSet)): Join(RadicalCategory,DirectProductCategory(2,R)) with
    elt:(%,"pos") -> R
    elt:(%,"neg") -> R
    imaginary: () -> %
    real: % -> R
    imag: % -> R
    conj: % -> %
  == DirectProduct(2,R) add
    Rep == DirectProduct(2,R)
    elt(x,"pos") == rep(x).1
    elt(x,"neg") == rep(x).2
imaginary():% == per directProduct vector [1,-1] real(x:%):R == (rep(x).1 + rep(x).2)/(2::R) imag(x:%):R == (rep(x).1 - rep(x).2)/(2::R) conj(x:%):% == per directProduct vector [rep(x).2,rep(x).1] sqrt(x:%):% == per directProduct vector [ _ sqrt real(x) + sqrt imag(x), _ ((if real(x)>=0 then sqrt real(x) else 0) - _ (if real(x)<=0 then sqrt real(x) else 0)) + _ ((if imag(x)<=0 then sqrt imag(x) else 0) - _ (if imag(x)>=0 then sqrt imag(x) else 0)) ]
spad
   Compiling OpenAxiom source code from file 
      /var/zope2/var/LatexWiki/5976774624515024081-25px001.spad using 
      Spad compiler.
   CM abbreviates domain ComplexManifold 
------------------------------------------------------------------------
   initializing NRLIB CM for ComplexManifold 
   compiling into NRLIB CM 
   Adding Integer modemaps
   Adding NonNegativeInteger modemaps
   Adding PositiveInteger modemaps
   Adding $ modemaps
   Adding R modemaps
   Adding R modemaps
   Adding R modemaps
   Adding Integer modemaps
   Adding NonNegativeInteger modemaps
   Adding PositiveInteger modemaps
   Adding Rep modemaps
   compiling exported elt : (%,pos) -> R
   Adding DirectProduct(2,R) modemaps
Time: 0.13 SEC.
compiling exported elt : (%,neg) -> R Adding DirectProduct(2,R) modemaps Time: 0 SEC.
compiling exported imaginary : () -> % Adding DirectProduct(2,R) modemaps Adding Vector R modemaps Adding List R modemaps Time: 0.04 SEC.
compiling exported real : % -> R Adding DirectProduct(2,R) modemaps Time: 0.01 SEC.
compiling exported imag : % -> R Adding DirectProduct(2,R) modemaps Time: 0.01 SEC.
compiling exported conj : % -> % Adding DirectProduct(2,R) modemaps Adding Vector R modemaps Adding List R modemaps Time: 0.01 SEC.
compiling exported sqrt : % -> % Adding DirectProduct(2,R) modemaps Adding Vector R modemaps Adding List R modemaps Adding Boolean modemaps Time: 0.05 SEC.
Adding R modemaps augmenting R: DifferentialRing Adding R modemaps augmenting R: Evalable R Adding R modemaps augmenting R: LinearlyExplicitRingOver Integer Adding R modemaps augmenting R: PartialDifferentialRing Symbol Adding R modemaps augmenting R: RetractableTo Fraction Integer Adding R modemaps augmenting R: RetractableTo Integer Adding R modemaps augmenting R: DifferentialRing Adding R modemaps augmenting R: DifferentialRing Adding R modemaps augmenting R: RetractableTo Integer Adding R modemaps augmenting R: OrderedAbelianMonoidSup augmenting $: shallowlyMutable Adding R modemaps augmenting R: Finite Adding R modemaps augmenting R: OrderedAbelianMonoidSup Adding R modemaps augmenting R: OrderedRing Predicate: (|has| $ (ATTRIBUTE |finiteAggregate|)) replaced by: T Predicate: (|has| $ (ATTRIBUTE |shallowlyMutable|)) replaced by: NIL Predicate: (|has| $ (ATTRIBUTE |finiteAggregate|)) replaced by: T (time taken in buildFunctor: 77) Time: 0.87 SEC.
Cumulative Statistics for Constructor ComplexManifold Time: 1.12 seconds
--------------non extending category---------------------- ComplexManifold #1 of category Join(RadicalCategory, DirectProductCategory(2,#1)) with ?.pos : (%,pos) -> #1 ?.neg : (%,neg) -> #1 imaginary : () -> % real : % -> #1 imag : % -> #1 conj : % -> % has no DirectProductCategory(NIL,#1) finalizing NRLIB CM Processing ComplexManifold for Browser database: --->-->ComplexManifold((elt (R % pos))): Not documented!!!! --->-->ComplexManifold((elt (R % neg))): Not documented!!!! --->-->ComplexManifold((imaginary (%))): Not documented!!!! --->-->ComplexManifold((real (R %))): Not documented!!!! --->-->ComplexManifold((imag (R %))): Not documented!!!! --->-->ComplexManifold((conj (% %))): Not documented!!!! --->-->ComplexManifold(constructor): Not documented!!!! --->-->ComplexManifold: Missing Description ------------------------------------------------------------------------ ComplexManifold is now explicitly exposed in frame initial ComplexManifold will be automatically loaded when needed from /var/zope2/var/LatexWiki/CM.NRLIB/code.o

axiom
a:CM(EXPR INT) := 3
LatexWiki Image(1)
Type: ComplexManifold? Expression Integer
axiom
b:CM(EXPR INT) := -3
LatexWiki Image(2)
Type: ComplexManifold? Expression Integer
axiom
real(a)
LatexWiki Image(3)
Type: Expression Integer
axiom
s1:=sqrt(a)
LatexWiki Image(4)
Type: ComplexManifold? Expression Integer
axiom
real s1
LatexWiki Image(5)
Type: Expression Integer
axiom
imag s1
LatexWiki Image(6)
Type: Expression Integer
axiom
s2:=sqrt(b)
LatexWiki Image(7)
Type: ComplexManifold? Expression Integer
axiom
real s2
LatexWiki Image(8)
Type: Expression Integer
axiom
imag s2
LatexWiki Image(9)
Type: Expression Integer
axiom
I:CM(EXPR INT) := imaginary()
LatexWiki Image(10)
Type: ComplexManifold? Expression Integer
axiom
imag I
LatexWiki Image(11)
Type: Expression Integer
axiom
imag conj I
LatexWiki Image(12)
Type: Expression Integer
axiom
conj(a+b*I)
LatexWiki Image(13)
Type: ComplexManifold? Expression Integer