Hi Waldek,

I've implemented the lazy lifting as mentioned in your post [1]. However, there's still a problem which I'm not able to address properly : it occurs when the stream of coefficients is all zero, for example, consider

op := x1^3*(-1+d) + x1^2*(-1+d+d^2) + x1*(1-2*d+2*d^2) + d^3

Now, it can be exactly factored as op = (x1^2*d + x1*d + d^2) * (x1 + d)

So, here for the left factor, the coefficient of d^0 is 0. Hence, the corresponding stream of coefficients should be empty. But, for some reason, the stream of coefficients/Laurent series st (that is equal to [0, 0, 0, ..] of the part of the operator d^0 does not satisfy eq?(st, rst st) and the my_map function goes into an infinite loop without the extra parallel iterator i that I added but should not be present ideally. Please see lines 289-329 for what I mean. Could you please suggest a solution?

Thanks,
Abhinav.

[1] https://github.com/fandango-/fricas/commit/c1b826a87b1bc1be7b3dad4310f742837ea4724a

On 06/11/2015 07:41 PM, Waldek Hebisch wrote:
Abhinav Baid wrote:
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?
Yes.  More precisely, you will need a wrapper function to
generate stream of l_extra, r_extra.  Other parts of
the pipeline should be doable via calls so stanndard
stream/series functions.

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


--
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