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: sage-9.4
Component: basic arithmetic Keywords:
Cc: rws, vbraun, pbruin, tscrim, gh-mjungmath, 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:

Status badges

Description (last modified by mkoeppe)

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 mkoeppe

  • 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 mkoeppe

  • Milestone changed from sage-7.4 to sage-9.4

comment:3 Changed 5 months ago by mkoeppe

  • Cc gh-mjungmath yzh added
  • Dependencies set to #31880

comment:4 Changed 5 months ago by mkoeppe

  • Branch set to u/mkoeppe/realset__add_methods_closure__interior__boundary__is_open__is_closed

comment:5 Changed 5 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to 181b128686bf125fb0bb9a11210543dacce73ebe
  • Status changed from new to needs_review

New commits:

5b8cecaInternalRealInterval, RealSet: Add _latex_ methods
69ca854RealSet._repr_: Use unicode cup sign instead of +
dbdfc06InternalRealInterval, RealSet: Remove extra whitespace in latex, add documentation
a0e3bf5Merge #31880
181b128RealSet.is_open, is_closed, closure, interior, boundary: New

comment:6 Changed 5 months ago by git

  • Commit changed from 181b128686bf125fb0bb9a11210543dacce73ebe to 8cd74b56ec0ebb4111842cd70a0c638b400b9dec

Branch pushed to git repo; I updated commit sha1. New commits:

7f56338PiecewiseFunction: Adjust doctests for changed RealSet repr
8cd74b5Merge #31880

comment:7 Changed 5 months ago by tscrim

Could you also add a test:

RealSet((1, 2), (2, 3)).boundary()

Other than that, LGTM.

comment:8 Changed 5 months ago by git

  • Commit changed from 8cd74b56ec0ebb4111842cd70a0c638b400b9dec to 8fdb104f7c0b84b0db5a280a0265f690d1a867b5

Branch pushed to git repo; I updated commit sha1. New commits:

8fdb104RealSet.boundary: Add another doctest

comment:9 Changed 5 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Thank you.

comment:10 Changed 5 months ago by mkoeppe

Thanks for reviewing!

comment:11 Changed 4 months ago by git

  • 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:

9d41f0esrc/sage/sets/real_set.py: Remove unnecessary import

comment:12 Changed 4 months ago by mkoeppe

  • Status changed from needs_review to positive_review

comment:13 Changed 4 months ago by vbraun

  • 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
Note: See TracTickets for help on using tickets.