Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interior, closure, boundary functions for Intervals #12

Open
electronjoe opened this issue Nov 3, 2024 · 0 comments
Open

Add interior, closure, boundary functions for Intervals #12

electronjoe opened this issue Nov 3, 2024 · 0 comments

Comments

@electronjoe
Copy link
Owner

Proposal

For mathematical completeness, consider adding:

fn interior(&self) -> Interval<T>  // Topological interior
fn closure(&self) -> Interval<T>   // Topological closure
fn boundary(&self) -> Interval<T>  // Topological boundary

1. Interior (Topological Interior)
The interior of a set consists of all points that have a neighborhood entirely contained within the set.

2. Closure (Topological Closure)
The closure includes all points that can be approximated by points in the set.

3. Boundary (Topological Boundary)
The boundary consists of points where every neighborhood contains both points in and out of the set.

Properties

Some important mathematical properties these functions would satisfy:

  1. x ∈ interior(A) ⟹ x ∈ A
  2. closure(A) contains all limit points of A
  3. boundary(A) = closure(A) \ interior(A)
  4. A is closed ⟺ A = closure(A)
  5. A is open ⟺ A = interior(A)

Challenges

The main implementation challenge is that boundary() naturally wants to return a set of discrete points rather than an interval. This suggests either:

  1. Creating a new type for finite point sets
  2. Returning an iterator of singleton intervals
  3. Modifying the interval type to handle discrete point sets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant