#18529: Topological manifolds: basics
-------------------------------------+-------------------------------------
Reporter: egourgoulhon | Owner: egourgoulhon
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-6.10
Component: geometry | Resolution:
Keywords: topological | Merged in:
manifolds | Reviewers: Travis Scrimshaw
Authors: Eric Gourgoulhon, | Work issues:
Travis Scrimshaw | Commit:
Report Upstream: N/A | 0fb39df7fafe7f0a765bf73b3f34a6cb41e65c40
Branch: | Stopgaps:
u/tscrim/top_manifolds_refactor |
Dependencies: #18175 |
-------------------------------------+-------------------------------------
Comment (by tscrim):
Replying to [comment:81 egourgoulhon]:
> Replying to [comment:80 tscrim]:
> The trick
> >{{{#!python
> > def _coerce_map_from_(self, R):
> > return isinstance(R, Foo)
> > }}}
> is too permissive to be applicable to scalar field algebras. For them,
the coercion is currently based on the concept of restriction to a
subdomain, i.e. there is a coerce map from C^k^(M) to C^k^(N) iff N is a
subset of M (cf. the code of `_coerce_map_from_` in
`scalar_field_algebra.py`). It is very desirable to keep this feature,
which is mathematically neat.
I completely agree. I was just using it for illustrative purposes.
> > Furthermore, from looking at your code, the reason why it now breaks
is you're assuming unique representation by not passing the scalar field
algebra as the first argument of the scalar field. So it's getting
mismatches because the `domain.scalar_field_algebra()` may not be the
scalar field algebra that was suppose to be creating that particular
scalar field. So for the scalar fields, I would instead have the first
argument be the corresponding algebra and get the domain from that (with
appropriate handling of parameters for the methods which create the scalar
fields).
>
> I've done this (actually this should have been done before: it is
cleaner to have the parent as first argument when constructing elements).
But this does not solve the problem. There is a difference though: on the
example of comment:74, we do no longer get the coercion error message but
the ECL error message arising from Maxima; the latter was previously
appearing after the coercion error message:
> {{{
> ;;;
> ;;; Stack overflow.
> ;;; Jumping to the outermost toplevel prompt
> ;;;
> }}}
> and that a lot of text until `Abandon (core dumped)`. I've pushed the
new code (i.e. with the algebra as first argument of scalar fields) to the
branch of #19147, in case you want to have a look.
Hmm...that is very strange. Perhaps something with pickling and the
interface?
However, I starting to lean towards reinstating the `UniqueRepresentation`
behavior with initialization using a large random number via
`manifold_constructor`. This will keep memory down with pickling because
of all of the extra data that would need to be initialized after every
pickling within the session. In an ideal world, I think we would implement
our own variable system for the manifolds and hold some kind of global
reference to that. I will think about this on my way home right now.
Question, should override the `__copy__` for the manifold (at least, I
feel there might be some use cases for building two manifolds with a
common base atlas)?
--
Ticket URL: <http://trac.sagemath.org/ticket/18529#comment:82>
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.