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

# Edit detail for SandBoxLeftFreeModule revision 1 of 5

 1 2 3 4 5 Editor: Bill Page Time: 2008/05/25 11:33:58 GMT-7 Note: Gaby's example

changed:
-
)abbrev domain LFREEMOD LeftFreeModule
LeftFreeModule(R: Ring, S: OrderedSet):
Join(LeftModule R, IndexedDirectProductCategory(R,S)) with
linearCombination: List Pair(S,R) -> %
Rep == List Pair(S,R)
linearCombination x ==
per [u for u in x | second u ~= 0$R ] if R has EntireRing then (r: R) * (x: %) == r = 0$R => 0$% r = 1$R => x
messagePrint("from LeftFreeModule")$OutputForm per [pair(first u, r * second u) for u in rep x] else (r: R) * (x: %) == r = 0$R => 0$% r = 1$R => x
messagePrint("from LeftFreeModule")$OutputForm per [pair(first u,c) for u in rep x | (c := r *second u) ~= 0$R]
coerce(x: %): OutputForm ==
x' := rep x
null x' => 0$R :: OutputForm res : List OutputForm := nil for u in reverse x' repeat second u = 1$R => res := cons(first(u)::OutputForm, res)
res := cons(second(u)::OutputForm * first(u)::OutputForm, res)
reduce("+",res)

There is no 'from LeftFreeModule' printed out.
\begin{axiom}
x := 'x::OrderedVariableList ['x,'y]
x := 'y::OrderedVariableList ['x,'y]
2 * linearCombination([pair(x,2), pair(y,3)])$LeftFreeModule(Integer,OrderedVariableList ['x,'y]) Integer has EntireRing \end{axiom}  spad)abbrev domain LFREEMOD LeftFreeModule LeftFreeModule(R: Ring, S: OrderedSet): Join(LeftModule R, IndexedDirectProductCategory(R,S)) with linearCombination: List Pair(S,R) -> % == IndexedDirectProductAbelianGroup(R,S) add Rep == List Pair(S,R) linearCombination x == per [u for u in x | second u ~= 0$R ]
if R has EntireRing then
(r: R) * (x: %) ==
r = 0$R => 0$%
r = 1$R => x messagePrint("from LeftFreeModule")$OutputForm
per [pair(first u, r * second u) for u in rep x]
else
(r: R) * (x: %) ==
r = 0$R => 0$%
r = 1$R => x messagePrint("from LeftFreeModule")$OutputForm
per [pair(first u,c) for u in rep x | (c := r *second u) ~= 0$R] coerce(x: %): OutputForm == x' := rep x null x' => 0$R :: OutputForm
res : List OutputForm := nil
for u in reverse x' repeat
second u = 1$R => res := cons(first(u)::OutputForm, res) res := cons(second(u)::OutputForm * first(u)::OutputForm, res) reduce("+",res) spad  Compiling OpenAxiom source code from file /var/zope2/var/LatexWiki/833505762114505642-25px001.spad using Spad compiler. LFREEMOD abbreviates domain LeftFreeModule ------------------------------------------------------------------------ initializing NRLIB LFREEMOD for LeftFreeModule compiling into NRLIB LFREEMOD compiling local rep : % -> List Pair(S,R) LFREEMOD;rep is replaced by G1393 Time: 0.06 SEC. compiling local per : List Pair(S,R) -> % LFREEMOD;per is replaced by G1393 Time: 0 SEC. compiling exported linearCombination : List Pair(S,R) -> % Time: 0 SEC. ****** Domain: R already in scope augmenting R: (EntireRing) compiling exported * : (R,%) -> % Time: 0.02 SEC. compiling exported * : (R,%) -> % Time: 0.06 SEC. compiling exported coerce : % -> OutputForm Time: 0.11 SEC. (time taken in buildFunctor: 0) ;;; *** |LeftFreeModule| REDEFINED ;;; *** |LeftFreeModule| REDEFINED Time: 0 SEC. Cumulative Statistics for Constructor LeftFreeModule Time: 0.25 seconds finalizing NRLIB LFREEMOD Processing LeftFreeModule for Browser database: --->-->LeftFreeModule((linearCombination (% (List (Pair S R))))): Not documented!!!! --->-->LeftFreeModule(constructor): Not documented!!!! --->-->LeftFreeModule(): Missing Description ------------------------------------------------------------------------ LeftFreeModule is now explicitly exposed in frame initial LeftFreeModule will be automatically loaded when needed from /var/zope2/var/LatexWiki/LFREEMOD.NRLIB/code.o There is no from LeftFreeModule printed out. axiomx := 'x::OrderedVariableList ['x,'y]  (1) Type: OrderedVariableList? [x,y]? axiomx := 'y::OrderedVariableList ['x,'y]  (2) Type: OrderedVariableList? [x,y]? axiom2 * linearCombination([pair(x,2), pair(y,3)])$LeftFreeModule(Integer,OrderedVariableList ['x,'y])
 (3)
Type: LeftFreeModule?(Integer,OrderedVariableList? [x,y]?)
axiomInteger has EntireRing
 (4)
Type: Boolean