Opened 5 years ago
Closed 4 months ago
#21243 closed enhancement (fixed)
RealSet: add methods closure, interior, boundary, is_open, is_closed
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  basic arithmetic  Keywords:  
Cc:  rws, vbraun, pbruin, tscrim, ghmjungmath, yzh  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  9d41f0e (Commits, GitHub, GitLab)  Commit:  9d41f0e3e56ba43797296074ffb9ac4fc36ce8c3 
Dependencies:  #31880  Stopgaps: 
Description (last modified by )
The intervals in a RealSet
already have these methods.
It would also be nice to be able to compute closure and interior relative to a given larger RealSet
.
sage: RealSet((1, 2)).closure(relative_to=RealSet((0, 2)) # wishful thinking [1, 2)
One could also imagine that these should be methods of the real fields (such as RR) considered as a members of the category TopologicalSpaces
.
Change History (13)
comment:1 Changed 5 years ago by
 Cc tscrim added
 Description modified (diff)
 Summary changed from RealSet: add closure and interior methods to RealSet: add methods closure, interior, boundary, is_open, is_closed
comment:2 Changed 5 months ago by
 Milestone changed from sage7.4 to sage9.4
comment:3 Changed 5 months ago by
 Cc ghmjungmath yzh added
 Dependencies set to #31880
comment:4 Changed 5 months ago by
 Branch set to u/mkoeppe/realset__add_methods_closure__interior__boundary__is_open__is_closed
comment:5 Changed 5 months ago by
 Commit set to 181b128686bf125fb0bb9a11210543dacce73ebe
 Status changed from new to needs_review
comment:6 Changed 5 months ago by
 Commit changed from 181b128686bf125fb0bb9a11210543dacce73ebe to 8cd74b56ec0ebb4111842cd70a0c638b400b9dec
comment:7 Changed 5 months ago by
Could you also add a test:
RealSet((1, 2), (2, 3)).boundary()
Other than that, LGTM.
comment:8 Changed 5 months ago by
 Commit changed from 8cd74b56ec0ebb4111842cd70a0c638b400b9dec to 8fdb104f7c0b84b0db5a280a0265f690d1a867b5
Branch pushed to git repo; I updated commit sha1. New commits:
8fdb104  RealSet.boundary: Add another doctest

comment:9 Changed 5 months ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
Thank you.
comment:10 Changed 5 months ago by
Thanks for reviewing!
comment:11 Changed 4 months ago by
 Commit changed from 8fdb104f7c0b84b0db5a280a0265f690d1a867b5 to 9d41f0e3e56ba43797296074ffb9ac4fc36ce8c3
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
9d41f0e  src/sage/sets/real_set.py: Remove unnecessary import

comment:12 Changed 4 months ago by
 Status changed from needs_review to positive_review
(as requested in https://trac.sagemath.org/ticket/31927#comment:8)
comment:13 Changed 4 months ago by
 Branch changed from u/mkoeppe/realset__add_methods_closure__interior__boundary__is_open__is_closed to 9d41f0e3e56ba43797296074ffb9ac4fc36ce8c3
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
InternalRealInterval, RealSet: Add _latex_ methods
RealSet._repr_: Use unicode cup sign instead of +
InternalRealInterval, RealSet: Remove extra whitespace in latex, add documentation
Merge #31880
RealSet.is_open, is_closed, closure, interior, boundary: New