Index: /home/wspage/fricas-src/src/algebra/efstruc.spad.pamphlet
===================================================================
--- /home/wspage/fricas-src/src/algebra/efstruc.spad.pamphlet	(revision 627)
+++ /home/wspage/fricas-src/src/algebra/efstruc.spad.pamphlet	(working copy)
@@ -767,6 +767,7 @@
   Implementation ==> add
     ker2explogs: (KG, List KG, List SY) -> FG
     smp2explogs: (PG, List KG, List SY) -> FG
+    nthroot:     (GF,GF) -> GF
     supexp     : (UP, GF, GF, Z) -> GF
     GR2GF      : GR -> GF
     GR2F       : GR -> F
@@ -847,13 +848,24 @@
       map(x +-> explogs2trigs(x::FG), GR2GF, p)$PolynomialCategoryLifting(
                                     IndexedExponents KG, KG, GR, PG, GF)
 
-    explogs2trigs f ==
-      (m := mainKernel f) case "failed" =>
+    -- De Moivre's theorem
+    nthroot(a:GF,n:GF):GF ==
+      r := nthRoot(sqrt(norm(a)),retract(n)@Z)
+      e := exp(complex(0, 1)*argument(a)/n)
+      r*e
+
+    explogs2trigs(f:FG):GF ==
+      m := mainKernel f
+      m case "failed" =>
         GR2GF(retract(numer f)@GR) / GR2GF(retract(denom f)@GR)
-      op  := operator(operator(k := m::KG))$F
+      k := m::KG
+      op  := operator(operator(k))$F
       arg := [explogs2trigs x for x in argument k]
       num := univariate(numer f, k)
       den := univariate(denom f, k)
+      is?(op,'nthRoot) =>
+        h := nthroot(first arg, second arg)
+        supexp(num,h,0,0)/supexp(den,h,0,0)
       is?(op, 'exp) =>
         e  := exp real first arg
         y  := imag first arg
@@ -926,6 +938,10 @@
     imag   : F -> F
       ++ imag(f) returns the imaginary part of \spad{f} where \spad{f}
       ++ is a complex function.
+    conjugate:F-> F
+      ++ conjugate(x+%i*y) returns x-%i*y
+    norm   : F -> F
+      ++ norm(f) returns f*conjugate(f)
     real?  : F -> Boolean
       ++ real?(f) returns \spad{true} if \spad{f = real f}.
     complexForm: F -> Complex F
@@ -952,6 +968,8 @@
     real? f          == empty?(complexKernels(f).ker)
     real f           == real complexForm f
     imag f           == imag complexForm f
+    conjugate f      == real(f) - sqrt(-1) * imag(f)
+    norm f           == f * conjugate(f)
 
 -- returns [[k1,...,kn], [v1,...,vn]] such that ki should be replaced by vi
     complexKernels f ==
@@ -1067,6 +1085,10 @@
     imag   : F -> FR
       ++ imag(f) returns the imaginary part of \spad{f} where \spad{f}
       ++ is a complex function.
+    conjugate:F-> F
+      ++ conjugate(x+%i*y) returns x-%i*y
+    norm   : F -> FR
+      ++ norm(f) returns f*conjugate(f)
     real?  : F -> Boolean
       ++ real?(f) returns \spad{true} if \spad{f = real f}.
     trigs  : F -> F
@@ -1087,6 +1109,8 @@
 
     real f        == real complexForm f
     imag f        == imag complexForm f
+    conjugate f      == F2FG real(f) - complex(0,1) * F2FG imag(f)
+    norm f           == FG2F(f * conjugate f)
     rreal? r      == zero? imag r
     kreal? k      == every?(real?, argument k)$List(F)
     complexForm f == explogs2trigs f
