On Wednesday, January 22, 2020 at 5:07:18 AM UTC-8, Marc Mezzarobba wrote:
 

> Perhaps more importantly, I find the fact that series and p-adics (but 
> not intervals and balls) are doing that problematic for writing generic 
> code. Suppose that a is a symbolic expression, or an element of any 
> other parent where inequality is not decidable. Would you expect 
> a.is_zero() to return True whenever Sage is unable to prove that a is 
> nonzero? If not, what can code written for generic coefficient rings do 
> to work with both expressions and series? 
>

It has the big advantage that if you compute a root of a polynomial, then 
evaluating the polynomial at that root will give you a result that is equal 
to zero. That's extremely useful in for instance writing routines that test 
local solvability. It also means that if you assume you've started out with 
enough precision to distinguish any non-equal elements that occur in your 
computation, then equality gives you a reliable result.

Under the assumption you are starting out with sufficient excess precision 
to start, I think it's actually the model that makes generic algorithms 
still work: even gaussian elimination works properly "in the limit"; 
without some numerical stability tricks it likely just needs ridiculous 
amounts of initial precision.

I don't think that for any non-trivial applications generic code is going 
to perform properly for both exact and non-exact base rings, but actually 
the equality choice that has been made, allows the heuristic approach: 
start with very high precision or double the precision a couple of times 
and see if results stabilize. This can be extremely useful in getting some 
experimental verification of conjectures.


 

>
> Regarding power series in particular, the structure where 
> cos(sin(tan(t^2)) - tan(sin(t^2))) == 1 exists and makes perfect sense, 
> but it's the ring of polynomials mod t^20, not the ring of power series 
> with precision 20. 
>
> -- 
> Marc 
>
>
On Wednesday, January 22, 2020 at 5:07:18 AM UTC-8, Marc Mezzarobba wrote:
>
> [re-posting a reply from a week ago that apparently did not go through 
> because gmane was moving] 
>
> Nils Bruin wrote: 
> > This model has the advantage that (sqrt(1+t)^2 -1)/t == 1 returns 
> > true, as one would expect mathematically. 
>
> Do you mean it has the advantage that cos(sin(tan(t^2)) - 
> tan(sin(t^2))) == 1 returns True, as one would expect mathematically? 
> ;-) 
>
> Joking aside, if I hadn't be hit by that issue before, I would also 
> expect to be able to trust equality more than that. And I would 
> interpret the presence of an explicit O() term as a strong indication 
> that inexact series won't be considered equal to anything. 
>
> Perhaps more importantly, I find the fact that series and p-adics (but 
> not intervals and balls) are doing that problematic for writing generic 
> code. Suppose that a is a symbolic expression, or an element of any 
> other parent where inequality is not decidable. Would you expect 
> a.is_zero() to return True whenever Sage is unable to prove that a is 
> nonzero? If not, what can code written for generic coefficient rings do 
> to work with both expressions and series? 
>
> Regarding power series in particular, the structure where 
> cos(sin(tan(t^2)) - tan(sin(t^2))) == 1 exists and makes perfect sense, 
> but it's the ring of polynomials mod t^20, not the ring of power series 
> with precision 20. 
>
> -- 
> Marc 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/71523992-f72d-4d1a-8981-7e05ad2613f7%40googlegroups.com.

Reply via email to