Opened 8 months ago
Last modified 5 weeks ago
#31878 new enhancement
Replace OpenInterval, RealLine instances by instances of a subclass of DifferentiableManifold+RealSet
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.6 |
Component: | manifolds | Keywords: | |
Cc: | egourgoulhon, tscrim, gh-mjungmath | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #31881 | Stopgaps: |
Description (last modified by )
(from discussion in https://trac.sagemath.org/ticket/30832#comment:14)
We represent open intervals and the real line, when they are to be considered as manifold objects, as an instance of a subclass of DifferentiableManifold
and RealSet
.
Likewise, arbitrary finite unions of intervals become instances of a subclass of ManifoldSubset
and RealSet
.
Compared to ManifoldSubset
, the methods union
and intersection
are replaced by a more specific implementation.
OpenInterval
and RealLine
will no longer be classes, only constructors.
More general implementation using #31688 (pullbacks of subsets under continuous maps). In this case we would not need to subclass RealSet
, but rather we would use a pullback.
This will also solve https://trac.sagemath.org/ticket/30830#comment:18:
OpenInterval
should silently return a RealLine
instance if lower == minus_infinity
and upper == infinity
.
Some API changes to consider:
- constructor
RealSets.point
clashes withManifold.point
, could replace byRealSets.singleton
. - deprecate
OpenInterval.upper_bound
,OpenInterval.lower_bound
- #31927:
RealSet
: Replaceis_included_in
,is_disjoint_from
byis_subset
,is_disjoint
RealSet.are_pairwise_disjoint
,contains
ManifoldSubset.complement
has optional argsuperset
RealSet.open
vsOpenInterval.open_interval
RealSet.cardinality
,n_components
ManifoldSubset.has_defined_points
Change History (12)
comment:1 Changed 8 months ago by
- Description modified (diff)
- Summary changed from OpenInterval(-oo, oo) vs RealLine() to Replace OpenInterval, RealLine instances by an instance of a subclass of DifferentiableManifold+RealSet
comment:2 Changed 8 months ago by
- Summary changed from Replace OpenInterval, RealLine instances by an instance of a subclass of DifferentiableManifold+RealSet to Replace OpenInterval, RealLine instances by instances of a subclass of DifferentiableManifold+RealSet
comment:3 Changed 8 months ago by
- Description modified (diff)
comment:4 Changed 8 months ago by
- Dependencies set to #30832, #31880, #31877
comment:5 Changed 8 months ago by
- Description modified (diff)
comment:6 Changed 8 months ago by
- Description modified (diff)
comment:7 Changed 8 months ago by
- Description modified (diff)
comment:8 Changed 7 months ago by
- Dependencies changed from #30832, #31880, #31877 to #30832, #31880, #31877, #31688
comment:9 Changed 7 months ago by
- Description modified (diff)
comment:10 Changed 7 months ago by
- Dependencies changed from #30832, #31880, #31877, #31688 to #31881
comment:11 Changed 6 months ago by
- Milestone changed from sage-9.4 to sage-9.5
comment:12 Changed 5 weeks ago by
- Milestone changed from sage-9.5 to sage-9.6