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

# Edit detail for SandBoxLeftFreeModule revision 5 of 5

 1 2 3 4 5 Editor: test1 Time: 2013/04/26 19:24:24 GMT+0 Note:

changed:
-      linearCombination: List Pair(S,R) -> %
-   Rep == List Pair(S,R)
linearCombination: List Product(S,R) -> %
Rep := List Product(S,R)
rep x ==> (x@%) pretend Rep
per x ==> (x@Rep) pretend %

changed:
-       per [pair(first u, r * second u) for u in rep x]
per [construct(first u, r * second u) for u in rep x]

changed:
-       per [pair(first u,c) for u in rep x | (c := r *second u) ~= 0$R] per [construct(first u,c) for u in rep x | (c := r *second u) ~= 0$R]

oV := OrderedVariableList ['x,'y]
Pro := Product(oV, Integer)

changed:
-2 * linearCombination([pair(x,2), pair(y,3)])$LeftFreeModule(Integer,OrderedVariableList ['x,'y]) 2 * linearCombination([construct(x,2)$Pro, construct(y,3)$Pro])$LeftFreeModule(Integer,OrderedVariableList ['x,'y])

changed:
-(2 * linearCombination([pair(x,2), pair(y,3)])$LeftFreeModule(Integer,OrderedVariableList ['x,'y]))$LeftFreeModule(Integer,OrderedVariableList ['x,'y])
(2 * linearCombination([[x,2]$Pro, [y,3]$Pro])$LeftFreeModule(Integer,OrderedVariableList ['x,'y]))$LeftFreeModule(Integer,OrderedVariableList ['x,'y])


)abbrev domain LFREEMOD LeftFreeModule
LeftFreeModule(R: Ring, S: OrderedSet):
Join(LeftModule R, IndexedDirectProductCategory(R,S)) with
linearCombination: List Product(S,R) -> %
Rep := List Product(S,R)
rep x ==> (x@%) pretend Rep
per x ==> (x@Rep) pretend %
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 [construct(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 [construct(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)
   Compiling FriCAS source code from file
using old system compiler.
LFREEMOD abbreviates domain LeftFreeModule
------------------------------------------------------------------------
initializing NRLIB LFREEMOD for LeftFreeModule
compiling into NRLIB LFREEMOD
processing macro definition rep x ==> pretend(@(x,$),Rep) processing macro definition per x ==> pretend(@(x,Rep),$)
compiling exported linearCombination : List Product(S,R) -> $Time: 0.02 SEC. ****** Domain: R already in scope augmenting R: (EntireRing) compiling exported * : (R,$) -> $Time: 0.01 SEC. compiling exported * : (R,$) -> $Time: 0 SEC. compiling exported coerce :$ -> OutputForm
Time: 0.02 SEC.
****** Domain: R already in scope
augmenting R: (OrderedAbelianMonoidSup)
(time taken in buildFunctor:  10)
;;;     ***       |LeftFreeModule| REDEFINED
;;;     ***       |LeftFreeModule| REDEFINED
Time: 0.01 SEC.
Warnings:
[1] linearCombination: pretend$-- should replace by @ [2] *: pretendRep -- should replace by @ [3] *: pretend$ -- should replace by @
[4] coerce: pretendRep -- should replace by @
Cumulative Statistics for Constructor LeftFreeModule
Time: 0.06 seconds
finalizing NRLIB LFREEMOD
Processing LeftFreeModule for Browser database:
--->-->LeftFreeModule(constructor): Not documented!!!!
--->-->LeftFreeModule((linearCombination (% (List (Product S R))))): Not documented!!!!
--->-->LeftFreeModule(): Missing Description
; compiling file "/var/aw/var/LatexWiki/LFREEMOD.NRLIB/LFREEMOD.lsp" (written 31 JUL 2013 04:31:58 PM):
; /var/aw/var/LatexWiki/LFREEMOD.NRLIB/LFREEMOD.fasl written
; compilation finished in 0:00:00.045
------------------------------------------------------------------------
LeftFreeModule is now explicitly exposed in frame initial
LeftFreeModule will be automatically loaded when needed from
/var/aw/var/LatexWiki/LFREEMOD.NRLIB/LFREEMOD

There is no from LeftFreeModule? printed out.

fricas
oV := OrderedVariableList ['x,'y]
 (1)
Type: Type
fricas
Pro := Product(oV, Integer)
 (2)
Type: Type
fricas
x := 'x::OrderedVariableList ['x,'y]
 (3)
Type: OrderedVariableList([x,y])
fricas
x := 'y::OrderedVariableList ['x,'y]
 (4)
Type: OrderedVariableList([x,y])
fricas
2 * linearCombination([construct(x,2)$Pro, construct(y,3)$Pro])$LeftFreeModule(Integer,OrderedVariableList ['x,'y])  (5) Type: LeftFreeModule?(Integer,OrderedVariableList([x,y])) fricas Integer has EntireRing  (6) Type: Boolean fricas (2 * linearCombination([[x,2]$Pro, [y,3]$Pro])$LeftFreeModule(Integer,OrderedVariableList ['x,'y]))\$LeftFreeModule(Integer,OrderedVariableList ['x,'y])
 (7)
Type: LeftFreeModule?(Integer,OrderedVariableList([x,y]))