I agree--rather than just having a signed/unsigned infinity ring, I think there should be an extended ring for Z, Q, R, C--both signed and unsigned when there is an absolute order. When does the concept of infinity make sense for a given ring? 1 (or 2)-point compactification? (not for Q), ordering (not for C), maybe an unbounded valuation (making "p-adic infinity" equal to zero?)
Implementation-wise, this could be accomplished via a generic wrapper around the rings and their elements (which I think could still be quite fast, and coercion would be natural and efficient too, not to mention the difficulties and inefficiencies raised by having multiple types for a single parent, or Integers with non-integer-ring parents). The default sage oo would be +Infinity in Z \union {\pm \infty}. On Jan 24, 2008, at 1:15 PM, David Roe wrote: > So perhaps the solution to your problem is the extended integers > (or extended rationals). This needs some work (both in terms of > speed and with having multiple types for elements of the same > parent), but it does have the benefit of returning 1 as the answer > to 1 + 0/infinity. Perhaps the default sage infinity should be the > infinity of the extended integers, and there's a coercion map from > the extended integers to the extended rationals to the signed > infinity ring to the unsigned infinity ring, as well as coercions > from the integers to the extended integers and the rationals to the > extended rationals. > David > > On Jan 24, 2008 12:48 PM, Burcin Erocal <[EMAIL PROTECTED]> wrote: > > Hello, > > Today I witnessed a mathematica user struggling with Sage because of > the way Sage handles infinity. On trac #1915 you can see an example. > > On Thu, 17 Jan 2008 09:52:32 -0500 > David Harvey <[EMAIL PROTECTED]> wrote: > > > Question: why does the "unsigned infinity ring" not have a zero > > element, whereas the "(signed) infinity ring" has a zero? > > > > This is okay: > > > > sage: 0 / Infinity > > Zero > > I don't think this is okay. In this case we get > > sage: 1 + 0/Infinity > A positive finite number > > If 0/Infinity is 0, the result of this should be 1. > > > But this is way confusing: > > > > sage: oo = UnsignedInfinityRing(Infinity) > > sage: 0 / oo > > A number less than infinity > > > > I totally expected the last output to be Zero. But it can't be, > > because the UnsignedInfinityRing doesn't have a zero element. > > I would also expect the output to be zero. Moreover, there should be a > way of returning a numeric zero from these operations. Otherwise the > coercion model gets confused, and everything ends up being coerced > into > "The Infinity Ring". > > sage: Infinity.parent() > The Infinity Ring > > > Thoughts? > > Burcin > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---