#11506: Fix the infinity ring.
-------------------------------------+-------------------------------------
       Reporter:  vbraun             |        Owner:  AlexGhitza
           Type:  defect             |       Status:  needs_info
       Priority:  blocker            |    Milestone:  sage-6.3
      Component:  algebra            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Volker Braun       |    Reviewers:  Peter Bruin
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vbraun/infinity_ring             |  3531287276d95f0a60b762c4dc5475bee4860cba
   Dependencies:  #13125             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 Replying to [comment:40 pbruin]:
 > As Volker pointed out, it isn't, even if we remove infinity.  And since
 it isn't an additive Abelian group, it certainly isn't a field either.
 Moreover, the set of non-zero, non-infinite elements is not a group under
 multiplication.  For example, the interval [-1, 1] has neither an additive
 nor a multiplicative inverse.
 > ...
 > That depends on what you mean by "work":
 > {{{
 > sage: RIF(oo) - RIF(oo)
 > [.. NaN ..]
 > }}}
 > Maybe this should return `[-infinity .. +infinity]`, then it would
 cooperate nicely with the future support for "intervals in the infinity
 ring" (comments 29 and 30 above).

 From my understanding, elements in RIF aren't intervals as sets, they are
 a single point that's guaranteed to be within in the interval. Thus if we
 fix a real element `x` in an interval, say `[-1, 1]`, then `x - x == 0`
 should be true (which I would say that it does not is currently a bug).
 However doing something like `RIF(-1,1) - RIF(-1, 1)` gets two
 (essentially) random numbers in the interval `[-1, 1]` and subtracts them
 and `RIF` tells us the result is guaranteed to lie in `[-2, 2]`.

 Well...at least if we throw out the exact values of `+/-oo` and the
 `NaN`...(and it's essentially a field to the average user)

 We also have this behavior with the current branch:
 {{{
 sage: InfinityRing(RIF(oo) - RIF(oo))
 A positive finite number
 sage: InfinityRing(float("NaN"))
 A negative finite number
 }}}
 At least it maps this over. So to add to the question list, how do we
 handle this too? Keep it as is?

 > I still don't get your point. The tropical semiring is a semiring, while
 InfinityRing is not a semiring.

 Okay, I'm going to take a deep breath and try to make I'm not missing any
 cases or over simplifying things.

 In `RIF` (with `[.. NaN ..]`), we have an additive abelian semigroup as we
 have an associative binary operation.

 For `InfinityRing`, we have 5 elements: `[-oo, n, 0, p, oo]` where `n` and
 `p` are finite negative and positive numbers respectively. The following
 additions are defined (up to commutation):
 {{{
 -oo + [n, 0, p] -> -oo
 n + [n, 0] -> n
 p + [0, p] -> p
 oo + [n, 0, p] -> oo
 }}}
 but none of the others (and multiplication is worse). So it doesn't have
 any fully defined binary operations on the entire set.

 I didn't miss any cases, right? If so, then this is when I say "less
 structure".

--
Ticket URL: <http://trac.sagemath.org/ticket/11506#comment:41>
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 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to