#8821: Adding a section on coercion to the tutorial (guided tour)
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.4.4
Component: documentation | Keywords: tutorial coercion
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by jhpalmieri):
Coercions in Sage are supposed to model the underlying mathematics. So a
coercion from QQ to RR is defined, as it should be.
Replying to [comment:16 leif]:
> And at least some irrational numbers ''can'' be represented - in general
as (symbolic) constants or as limits.
That's why I used the qualifier "some" in "the presence of some
transcendental numbers". And of course every real number can be
represented as a limit of rationals...
> IMHO coercions (as opposed to conversions) should be injective.
No. The natural map from ZZ to ZZ/nZZ should be a coercion, as indeed
should be the natural map from ZZ to any ring. The same for the standard
map from an object (ring, group, module, ...) to any of its quotients.
These are typically not injective, but they are also completely canonical.
Any canonical map should be a coercion.
> the natural embedding of Q in R does ''not'' hold for "Sage's" Q and R,
{{{QQ}}} and {{{RR}}}.
I'm willing to believe this, but can you provide evidence?
> > Also, remember that a document like the Sage tutorial is aimed to a
large degree at mathematicians and math students (and other "consumers" of
mathematics), moreso than to people with a computer science focus. So
focusing on types, etc., is not appropriate.
> I'm not sure what that refers to; nevertheless the reader will (or
should) be familiar with Python, including the concept of its types and
classes, and will be confronted with the differences between Python types
(including classes) and Sage's types, namely "parents".
It refers to, for example, your statement "I'd write that Sage implements
its own type system ...". I think this sort of statement puts more of a
programming-type focus than a mathematical one.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8821#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.