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

# Edit detail for SandboxDemoFreeMonoid/-Module revision 1 of 1

 1 Editor: pagani Time: 2020/01/30 19:42:09 GMT+0 Note:

changed:
-
\begin{axiom}
-- FreeMonoid(S: SetCategory)
-- S can be almost anything

X:=FreeMonoid(Symbol)
e:=[e[i]::X for i in 1..5]

-- Some terms
t1:= e.1*e.2
t2:= t1^3

-- Equality
eq1:=t1=e.2*e.1
test(eq1)

eq2:=t2=t1*t1*t1
test(eq2)

s::X
s*t1
a*%
first %

-- Methods
varList t1
varList t2

retractIfCan t1
retract e.1

length t1
length t2
size t2

factors t2

-- etc.

-- Restrict to b_1, b_2, b_3.
B:=OrderedVariableList [b[i] for i in 1..3]

Y:=FreeMonoid(B)
b:=[x::Y for x in enumerate()$B] t3:=b.1*b.2*b.3*b.1 factors t3 t3*b.1 -- note exps test(b.1*b.2=b.2*b.1) -- FreeModule(R: Join(SemiRng,AbelianMonoid),S: SetCategory) -- combine R:=Expression Integer Z:=FreeModule(R,Y) bb:=[x::Z for x in b] t4:=bb.1 + t3::Z t5:=sin(x*y)*t4+z^k*bb.2 -- Conclusion: combine FreeMonoid/FreeModule -> Algebra impl. -- Products e.g 'product' from GradedAlgebra then take quotients. \end{axiom}  fricas -- FreeMonoid(S: SetCategory) S can be almost anything X:=FreeMonoid(Symbol)  (1) Type: Type fricas e:=[e[i]::X for i in 1..5]  (2) Type: List(FreeMonoid(Symbol)) fricas -- Some terms t1:= e.1*e.2  (3) Type: FreeMonoid(Symbol) fricas t2:= t1^3  (4) Type: FreeMonoid(Symbol) fricas -- Equality eq1:=t1=e.2*e.1  (5) Type: Equation(FreeMonoid(Symbol)) fricas test(eq1)  (6) Type: Boolean fricas eq2:=t2=t1*t1*t1  (7) Type: Equation(FreeMonoid(Symbol)) fricas test(eq2)  (8) Type: Boolean fricas -- Any symbol admissible ;) s::X  (9) Type: FreeMonoid(Symbol) fricas s*t1  (10) Type: FreeMonoid(Symbol) fricas a*%  (11) Type: FreeMonoid(Symbol) fricas first %  (12) Type: Symbol fricas -- Methods varList t1  (13) Type: List(Symbol) fricas varList t2  (14) Type: List(Symbol) fricas retractIfCan t1  (15) Type: Union("failed",...) fricas retract e.1  (16) Type: Symbol fricas length t1  (17) Type: PositiveInteger? fricas length t2  (18) Type: PositiveInteger? fricas size t2  (19) Type: PositiveInteger? fricas factors t2  (20) Type: List(Record(gen: Symbol,exp: NonNegativeInteger?)) fricas -- etc. -- Restrict to b_1, b_2, b_3. B:=OrderedVariableList [b[i] for i in 1..3]  (21) Type: Type fricas Y:=FreeMonoid(B)  (22) Type: Type fricas b:=[x::Y for x in enumerate()$B]
 (23)
Type: List(FreeMonoid(OrderedVariableList([b[1],b[2],b[3]])))
fricas
t3:=b.1*b.2*b.3*b.1
 (24)
Type: FreeMonoid(OrderedVariableList([b[1],b[2],b[3]]))
fricas
factors t3
 (25)
Type: List(Record(gen: OrderedVariableList([b[1],b[2],b[3]]),exp: NonNegativeInteger?))
fricas
t3*b.1  -- note exps
 (26)
Type: FreeMonoid(OrderedVariableList([b[1],b[2],b[3]]))
fricas
test(b.1*b.2=b.2*b.1)
 (27)
Type: Boolean
fricas
--  FreeModule(R: Join(SemiRng,AbelianMonoid),S: SetCategory)
--  combine
R:=Expression Integer
 (28)
Type: Type
fricas
Z:=FreeModule(R,Y)
 (29)
Type: Type
fricas
bb:=[x::Z for x in b]
 (30)
Type: List(FreeModule(Expression(Integer),FreeMonoid(OrderedVariableList([b[1],b[2],b[3]]))))
fricas
t4:=bb.1 + t3::Z
 (31)
Type: FreeModule(Expression(Integer),FreeMonoid(OrderedVariableList([b[1],b[2],b[3]])))
fricas
t5:=sin(x*y)*t4+z^k*bb.2
 (32)
Type: FreeModule(Expression(Integer),FreeMonoid(OrderedVariableList([b[1],b[2],b[3]])))