If anybody is running the ncpoly/non-commuting code:
While familiarizing myself with the coding and theory, I have run into a
simple syntax problem.
I have attached the changed files and the problem code is in (?)
test.input
The function factor_test() stalls on the "map()" line; whereas when I do
the same things manually
#map(rank,f_12)
for i in 1..n repeat m:=m*(fct_12(i)::XDP)
works fine.
In particular
-- Factor test
--
--
factor_test : (XDP,LIST(NCP))-> BOOLEAN
factor_test(x::XDP , y::LIST(NCP)) ==
m:=1::XDP;
n:=#map(rank,y)
for i in 1..n repeat m:=m*(y(i)::XDP)
test(x = m)
--
Which was supposed to automate the checking in the prior last line of
test.input
test(p_12 :: XDP = fct_12(1)::XDP * fct_12(2)::XDP)
to allow variable problem sizes
like so
factor_test(p_12::XDP,fct_12::LIST(NCP))
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
-- Working with nc polynomials (in free associative algebras)
-- Created: Sam 2018-03-31 19:21
)compile linpen.spad
)compile ncpoly.spad
)compile ncpolyf.spad
--ALPHABET := ['x, 'y, 'z];
--OVL ==> OrderedVariableList(ALPHABET)
--OFM ==> FreeMonoid(OVL)
--F ==> Fraction(Integer)
G ==> Fraction(Polynomial(Integer))
--XDP ==> XDPOLY(OVL, F)
--YDP ==> XDPOLY(OVL, G)
--NCP ==> NCPOLY(OVL, F)
--x := 'x::OFM;
--y := 'y::OFM;
--z := 'z::OFM;
OF ==> OutputForm
--
-- Bill Page redefinitions of nc_ini-3.input
-- to accomidate symbolic coefficients
--
ALPHABET := ['x, 'y, 'z, 'w];
PARAMETERS := ['a,'b,'c, 'd];
OVL ==> OrderedVariableList(ALPHABET)
OFM ==> FreeMonoid(OVL)
MP ==> MPOLY(PARAMETERS,Integer)
F ==> Fraction(MP)
XDP ==> XDPOLY(OVL, F)
YDP ==> XDPOLY(OVL, G)
NCP ==> NCPOLY(OVL, F)
x := 'x::OFM::XDP;
y := 'y::OFM::XDP;
z := 'z::OFM::XDP;
w := 'w::OFM::XDP;
a := 'a::F;
b := 'b::F;
c := 'c::F;
d := 'd::F;
)clear all;
)read nc_ini03-a.input
--)read nc_ini03.input
--)display names
--
--
-- Factor test
--
--
factor_test : (XDP,LIST(NCP))-> BOOLEAN
factor_test(x::XDP , y::LIST(NCP)) ==
m:=1::XDP;
n:=#map(rank,y)
for i in 1..n repeat m:=m*(y(i)::XDP)
test(x = m)
--
--
--
p_01 : NCP := a - b*x*y;
p_02 := p_01 + 2*p_01;
rank(p_02);
p_03 := addSTD(p_01, p_01);
size(p_03);
p_11 : NCP := x*y*x*y+a;
p_14: NCP := a*x*y+b*z;
representation(p_14);
pencil(p_14);
multiplyRow!(p_14, 3, 7);
p_14
p_02 :: XDP;
p_12 := p_02*p_02+p_02;
p_12 :: XDP;
fct_12 := factorization(p_12);
test(p_12 :: XDP = fct_12(1)::XDP * fct_12(2)::XDP)
factor_test(p_12::XDP,fct_12::LIST(NCP))