On Tue, Nov 3, 2009 at 3:05 PM, William Stein <wst...@gmail.com> wrote:
> This reminds me of / being a constructor for elements of QQ, no matter
> what, i.e., a/b for a and b both integers (with b!=0) is a rational,
> no matter what:
>
> sage: type(2/3)
> <type 'sage.rings.rational.Rational'>
> sage: type(2/1)
> <type 'sage.rings.rational.Rational'>
>
> This was an important design decision that David Kohel pushed hard for
> early on.   Having sqrt(2) > 1 *not* simplify by default is consistent
> with this design decision in that "foo > bar" for either foo or bar
> symbolic, is a constructor for a symbolic equation.

I strongly agree with this design decision. However, the "no
simplification" policy doesn't follow from this. Rather, I think, the
design leads to

sage: sqrt(2) > 1
True
sage: parent(sqrt(2) > 1)
Symbolic Ring

i.e. a symbolic "True" or "False"

this would be consistent with, e.g.

sage: (SR(x) + 1) - SR(x)
1

which is 1 in SR, not in ZZ; or even

sage: 2/1
2

which is 2 in QQ, not in ZZ.

Gonzalo

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to