On 06/10/2015 03:10 AM, Waldek Hebisch wrote:
Abhinav Baid wrote:
On 06/08/2015 03:26 AM, Waldek Hebisch wrote:
Abhinav Baid wrote:
I've changed the file according to the remarks above [1]. I thought I'd
clarify a few points:

1. I was using nm_mult and nm_block to actually try to optimize the
computation of the error term, but it seems that I messed up somewhere.
So, for the time being, I've removed those 2 functions.
2. The current arguments to lift_newton are clear enough except
probably, the last one : n_l. This is used to specify the number of
lifts to be performed.
Yes.
3. The current lift_newton function returns a pair of operators that
have been computed by lifting n_l times. So, a stream can also be
generated if required by doing [lift_newton(..., n_l) for n_l in 1..]
For generating stream this is inconvenient.

4. Concerning coefs_operator and coefs_operator1: initially,
coefs_operator performed what nm_block was supposed to according to your
description and coefs_operator1 corresponded to coefs_operator. But now,
I've changed the functionality of coefs_operator according to your
description and coefs_poly to correspond to nm_block. I've also added
the 2 tests you suggested.
5. Also, I've renamed some of the variables and pass k to factor_newton2
now.
OK.

My query now is : How do I select the number of lifts so that I can
return the pair of operators from factor_newton2?
Number of lifts may be essentially arbitrary, so lifting
should be done in lazy way (on demand).  For this you will
need incremental version of lift_newton.  That is on demand
perform one iteration producing l_extra, r_extra (main result)
plus new li, ri, ei (needed for next iteration).

You will need a pipeline:

stream of [l_extra, r_extra] --> list of streams of coefficients
   --> list of Laurent series --> operator

The last two stages of that pipeline are not difficult.  To
get from stream of [l_extra, r_extra] stream of coefficients
you first need to extrat from l_extra and r_extra the
nonzero coefficients (this is the same operation as used
in lift_newton).  You will get coefficients in funny order
(in order of increasing valuation) so it will take some
care to extract correct ones.
Okay. So, the lift_newton function should return l_extra, r_extra, li, ri and ei using which a stream is generated in factor_newton2 which also calls other routines according to the pipeline. Is that right?
However, it seems that you still have a problem in
lifting code.  Namely doing:

qF := Fraction(Integer)
uP := UP('x, qF)
rF := Fraction(uP)
l3 := LinearOrdinaryDifferentialOperator3(qF, uP, rF)
lF := LinearOrdinaryDifferentialOperatorFactorizerNew(qF, uP, 'x, 0)
d := D()$l3
xx := x::uP::rF
x1 := xx^(-1)

op := (d + x1 + xx^3)*(d^2 + x1*d + x1^2)
testfn(op, factor$uP, "")$lF

I get reasonable result (right factor is exactly recovered).
But

op := (d^2 + x1 - xx^2)*(d^2 + 4*x1 + xx^3*d)
testfn(op, factor$uP, "")$lF

does not recover the right factor.

Also, it looks that coefs_poly has problem, it fails when I do

op := (d^2 + x1 - xx^2)*(d^2 + 4*x1^3)
testfn(op, factor$uP, "")$lF

Actually, coeffx fails, but AFAICS coefs_poly calls it in
wrong way.

There was a mistake in how I initialized start_D in both coefs_poly and coefs_operator. I've resolved that issue now.

--
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to