#18529: Topological manifolds: basics
-------------------------------------+-------------------------------------
Reporter: egourgoulhon | Owner: egourgoulhon
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: geometry | Resolution:
Keywords: topological | Merged in:
manifolds | Reviewers: Travis Scrimshaw
Authors: Eric Gourgoulhon | Work issues:
Report Upstream: N/A | Commit:
Branch: | 0b08b114e03c063bd2e500ac900fd843fb12673b
public/manifolds/top_manif_basics | Stopgaps:
Dependencies: #18175 |
-------------------------------------+-------------------------------------
Comment (by tscrim):
Replying to [comment:61 egourgoulhon]:
> Replying to [comment:59 tscrim]:
> > but I was wondering if you were doing any changes to it,
>
> No, not at the moment: I've worked on the subsequent tickets to check if
the introduced changes (in particular the removal of unique
representation) propagate smoothly. So far, so good...
I will then start my refactoring. I will try to make every change as
granular as possible in the commits so we can cherry-pick changes if you
don't necessarily agree with them.
> > because I want to do some moderate refactoring to try and simplify the
structure. In particular, you are not really using the subsets as facade
parents as the points know what subset they belong to.
>
> Well, it is true that points have an attribute called `_subset`, but
this is a misnomer: `_creation_subset` would have been better. Indeed,
from a pure mathematical point of view, a point of a manifold has no
privileged subset attached to it. On the contrary, the point belongs to an
infinite number of intersecting subsets. The attribute `_subset`, which is
set to the facade parent at the point creation, is used only for fast
check in the methods `TopologicalManifoldSubset.__contains__` and
`TopologicalManifold.__contains__`. I think it can be suppressed, at the
price of a small decrease in efficiency. Therefore, I still think that the
facade mechanism is appropriate here: the creation subset (i.e. the facade
parent) should not play any role: only the whole manifold matters. This is
particularly true when dealing with tangent planes (ticket #19092): for a
given point p, we do not want to have two tangent spaces, T_p M and T_p U
with U open subset of M, do we?
At present, anytime an element is passed to the `_element_constructor_`, a
new instance of that point is created. In a way, you are hacking the
coercion/category framework by setting the parent of the point to be the
manifold, so `M(p)` just shortcuts out to return `p`. The code tells me
that points should be elements of a particular subset.
For the tangent spaces, you should coerce the point to the manifold in the
distinguished chart as the input. You're going to have to do this anyways:
{{{
sage: M = Manifold(2, 'M', field='real', type='topological')
sage: X.<x,y> = M.chart()
sage: U.<u,v> = M.chart()
sage: trans = X.transition_map(U, [x-2,y-2])
sage: p = M.point((0,0), X)
sage: p2 = M.point((-2,-2), U)
sage: p == p2
True
sage: p is p2
False
}}}
How about this, let me make my changes and you can see what breaks or how
much things slow down and we will use that to decide what we should do
going forward. Does that sound reasonable to try? (In general, I would
also argue that users should create their points from the manifold using
one of those charts.)
--
Ticket URL: <http://trac.sagemath.org/ticket/18529#comment:62>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.