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:
- x ∈ interior(A) ⟹ x ∈ A
- closure(A) contains all limit points of A
- boundary(A) = closure(A) \ interior(A)
- A is closed ⟺ A = closure(A)
- 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:
- Creating a new type for finite point sets
- Returning an iterator of singleton intervals
- Modifying the interval type to handle discrete point sets
Proposal
For mathematical completeness, consider adding:
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:
Challenges
The main implementation challenge is that
boundary()naturally wants to return a set of discrete points rather than an interval. This suggests either: