diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/files.spad.pamphlet | 7 | ||||
-rw-r--r-- | src/algebra/lie.spad.pamphlet | 27 |
2 files changed, 13 insertions, 21 deletions
diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet index 695db887..1e30c441 100644 --- a/src/algebra/files.spad.pamphlet +++ b/src/algebra/files.spad.pamphlet @@ -437,10 +437,9 @@ Library(): Join(TableAggregate(String, Any),Eltable(Symbol,Any)) with ++ \spad{lib}. It can later be extracted using the key \spad{k}. == KeyedAccessFile(Any) add - Rep := KeyedAccessFile(Any) - library f == open f - elt(f:%,v:Symbol) == elt(f, string v) - setelt(f:%, v:Symbol, val:Any) == setelt(f, string v, val) + library f == per open f + elt(f:%,v:Symbol) == elt(rep f, string v) + setelt(f:%, v:Symbol, val:Any) == setelt(rep f, string v, val) @ \section{License} diff --git a/src/algebra/lie.spad.pamphlet b/src/algebra/lie.spad.pamphlet index 3d78a057..d039c5ef 100644 --- a/src/algebra/lie.spad.pamphlet +++ b/src/algebra/lie.spad.pamphlet @@ -56,10 +56,9 @@ AssociatedLieAlgebra(R:CommutativeRing,A:NonAssociativeAlgebra R): FiniteRankNonAssociativeAlgebra(R) private ==> A add - Rep := A - (a:%) * (b:%) == (a::Rep) * $Rep (b::Rep) -$Rep (b::Rep) * $Rep (a::Rep) - coerce(a:%):A == a :: Rep - coerce(a:A):% == a :: % + (a:%) * (b:%) == per(rep a * rep b - rep b * rep a) + coerce(a:%):A == rep a + coerce(a:A):% == per a (a:%) ** (n:PositiveInteger) == n = 1 => a 0 @@ -112,16 +111,13 @@ AssociatedJordanAlgebra(R:CommutativeRing,A:NonAssociativeAlgebra R): FiniteRankNonAssociativeAlgebra(R) private ==> A add - Rep := A - two : R := (1$R + 1$R) - oneHalf : R := (recip two) :: R + oneHalf : R := recip(1$R + 1$R) :: R (a:%) * (b:%) == - zero? two => error - "constructor must no be called with Ring of characteristic 2" - ((a::Rep) * $Rep (b::Rep) +$Rep (b::Rep) * $Rep (a::Rep)) * oneHalf - -- (a::Rep) * $Rep (b::Rep) +$Rep (b::Rep) * $Rep (a::Rep) - coerce(a:%):A == a :: Rep - coerce(a:A):% == a :: % + characteristic$R = 2 => error + "constructor must not be called with Ring of characteristic 2" + per((rep a * rep b + rep b * rep a) * oneHalf) + coerce(a:%):A == rep a + coerce(a:A):% == per a (a:%) ** (n:PositiveInteger) == a @ @@ -155,8 +151,6 @@ LieSquareMatrix(n,R): Exports == Implementation where FramedNonAssociativeAlgebra R) --with Implementation ==> AssociatedLieAlgebra (R,SquareMatrix(n, R)) add - - Rep := AssociatedLieAlgebra (R,SquareMatrix(n, R)) -- local functions n2 : PositiveInteger := n*n @@ -185,8 +179,7 @@ LieSquareMatrix(n,R): Exports == Implementation where convDM v == - sq := conv v - coerce(sq)$Rep :: % + per(conv(v)::Rep) basis() == n2 : PositiveInteger := n*n |