For all who are interested.
As far as I can tell:

1) The transition from nc_ini01.input to nc_ini03.input,and my nc_ini03-a.input: breaks polynomfactor.input

2)  Also the transition induces the following error: consider

z1 :=(1+z*p)* (p-1)
factorization(z1 ::NCP)
z1a : NCP := (1+z*p)* (p-1)
factorization(z1a)

With nc_ini01.input the "factorization(z1 ::NCP)" simply throws an error; which, I guess, is okay. With nc_ini03.input or nc_ini03-a.input it works and produces the wrong answer for z1!  Superficially it seems the ALS is also wrong.

3) My previous test harness ncpoly-a.tar.gz had a grossness in test_init.input which I have fixed.
Attached is the corrected test_init.input
If anybody wants I will regenerate the tar.gz but, since it also passes the item ")2", incorrect formating  is rampant.  I am inclined to wait for a fix, even if it's a bailout mode fix, but  I would rather have the late conversion work.  Makes a nice commutation diagram (when closed). Do not run polynomfactor.input in the same ws/time as nc_ini03-a.input because I have taken "p" and used it as noncommuting variable in order to make the entry of differential equations match the normal use of "p" as a derivative operator. nc_ini03.input doesn't seem to have this problem.

RayR

--
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.
z1 :=(1+z*p)* (p-1)
factorization(z1 ::NCP)
z1a : NCP := (1+z*p)* (p-1)
factorization(z1a)
--
p_01 : NCP := a - b*x*y;
p_02 := p_01 + 2*p_01
p_02record := buildrecord(p_02 :: NCP);
p_02 :: XDP
p_02record.polFactors
p_02record.NCpass

--
--p_03 := addSTD(p_01, c*a*p_02);
p_03    := p_01+c*a*p_02;
p_03a := (p_01+p_02)*p_03;
p_03arecord := buildrecord(p_03a :: NCP);
p_03a :: XDP
p_03arecord.polFactors
p_03arecord.NCpass
--
-- Non commuting test!
nc_test := (c+a*x)*(d+b*y)-(d+b*y)*(c+a*x)
-- nc_test : NCP := (c+a*x)*(d+b*y)
nc_test_record :=buildrecord(nc_test :: NCP)
nc_test_record.polFactors
nc_test_record.NCpass

-- Confluent Hypergeometric DE
ConH  := z*p*p+(b-z)*p+a
ConHrecord := buildrecord(ConH ::NCP)
ConH1 :=z*p*p +(1-z)*p -1
ConH1record := buildrecord(ConH1 :: NCP)
ConH2 :=(1+z*p)* (p-1)
ConH2record := buildrecord(ConH2 :: NCP)
ConH1record.polInput
ConH1record.polFactors
ConH2record.polInput
ConH2record.polFactors

)clear all
)read nc_ini03-a.input 
-- )quietly option after read fouls up the read
--)read nc_ini03.input
--)display names
--
--
-- Factor test
--
--
factorCheck(x:XDP , y:LIST(XDP)): BOOLEAN  ==
 m:=1::XDP;
 for i in y repeat m:=m*(i::XDP) 
 test(x = m)
--
--
-- NCPrecord is to be used as a template
-- Probably should be in library format
-- For now please operate on copy()'s 
-- for instance see "buildrecord" below
--
NCPrecord : Record( _
 polInput       : Any ,_
 polNCP         : Any ,_
 polFactors : Any ,_
 NCprod         : Any ,_
 NCrep          : Any ,_
 NCpencil       : Any ,_
 NCpass         : Any _
 )                      :=['nil , 'nil  , 'nil, 'nil, 'nil, 'nil, 'nil]  

 
--
--
-- Put significant pieces of ALS into a list form
-- It returns a list in NPCrecord format
--
buildrecord(pol)  ==
 tmp_record := copy(NCPrecord)
 pollyFact                      := factorization(pol)
 pollyFacts                     := pollyFact :: LIST(XDP)
 passFail                       := 
factorCheck(pol::XDP,pollyFacts::LIST(XDP))::BOOLEAN
 prod                                   :=1::XDP
 for i in pollyFacts repeat _
 prod                                   :=prod*(i::XDP)
 tmp_record.NCrep               := representation(pol)
 tmp_record.NCpencil            := pencil(pol)
 tmp_record.polInput    := pol::XDP
 tmp_record.polNCP      := pollyFact
 tmp_record.polFactors  := pollyFacts
 tmp_record.NCprod      := prod
 tmp_record.NCpass              := if passFail then "pass" else "fail"
 tmp_record
 
 
 
--
--)read tests.input
)read zx_test.input




Reply via email to