Sage: Ticket #28159: Vector Bundles
https://trac.sagemath.org/ticket/28159
<p>
Implementation of topological and differentiable vector bundles over manifolds.
</p>
<p>
<strong>Features:</strong>
</p>
<ul><li>abstract vector bundles on topological manifolds
</li><li>trivializations
</li><li>local frames
</li><li>simple sections
</li><li>vector bundle fibers
</li><li>differentiable vector bundles and tensor bundles
</li></ul><p>
<strong>Improvements in the preexisting code</strong>
</p>
<ul><li>restriction of vectorframes depended on some strange order: fixed!
</li><li><del><code>SR</code> enforcement for automorphism field inversion removed (due to ticket <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a>)</del>
</li><li><code>is_unit()</code> method superficially implemented for scalar fields to ensure division free matrix inversion for changes of frames (may be removed when <a class="new ticket" href="https://trac.sagemath.org/ticket/28629" title="enhancement: Automorphism fields: remove SR enforcement when computing the inverse (new)">#28629</a> is solved)
</li></ul><p>
<strong>Planned in the farther future</strong>
</p>
<ul><li>sections of general tensor products and automorphism fields on vector bundles
</li><li>tensor products and Whitney sums of vector bundles
</li><li>better zero treatment as in <a class="closed ticket" href="https://trac.sagemath.org/ticket/28562" title="enhancement: Tensor Fields: Better Zero Treatment (closed: fixed)">#28562</a>
</li><li><code>TensorField</code> inherits from <code>Section</code>, <code>VectorFrame</code> inherits from <code>LocalFrame</code>
</li><li>total space comes with induced charts
</li></ul>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/28159
Trac 1.1.6gh-DeRhamSourceWed, 10 Jul 2019 15:53:03 GMTtype, summary changed; keywords, cc, author set
https://trac.sagemath.org/ticket/28159#comment:1
https://trac.sagemath.org/ticket/28159#comment:1
<ul>
<li><strong>keywords</strong>
<em>vector</em> <em>bundles</em> <em>manifolds</em> added
</li>
<li><strong>cc</strong>
<em>tscrim</em> <em>egourgoulhon</em> added
</li>
<li><strong>author</strong>
set to <em>Michael Jung</em>
</li>
<li><strong>type</strong>
changed from <em>PLEASE CHANGE</em> to <em>enhancement</em>
</li>
<li><strong>summary</strong>
changed from <em>vector_bundles</em> to <em>Vector Bundles</em>
</li>
</ul>
Ticketgh-DeRhamSourceWed, 10 Jul 2019 16:13:11 GMTcomponent changed
https://trac.sagemath.org/ticket/28159#comment:2
https://trac.sagemath.org/ticket/28159#comment:2
<ul>
<li><strong>component</strong>
changed from <em>PLEASE CHANGE</em> to <em>geometry</em>
</li>
</ul>
Ticketgh-DeRhamSourceWed, 10 Jul 2019 16:57:45 GMTbranch set
https://trac.sagemath.org/ticket/28159#comment:3
https://trac.sagemath.org/ticket/28159#comment:3
<ul>
<li><strong>branch</strong>
set to <em>u/gh-DeRhamSource/vector_bundles</em>
</li>
</ul>
Ticketgh-DeRhamSourceWed, 10 Jul 2019 16:59:40 GMTcommit set
https://trac.sagemath.org/ticket/28159#comment:4
https://trac.sagemath.org/ticket/28159#comment:4
<ul>
<li><strong>commit</strong>
set to <em>5d5520d19abace16d1eced2d67a28e2f1fbaa9fb</em>
</li>
</ul>
<p>
Please take a short look and give me a short feedback. I want to know whether I'm on the right way or not.
</p>
<p>
Furthermore, I appreciate tricks and advices. Thanks in advance! :)
</p>
<hr />
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=5d5520d19abace16d1eced2d67a28e2f1fbaa9fb"><span class="icon"></span>5d5520d</a></td><td><code>Basic structure</code>
</td></tr></table>
Ticketgh-DeRhamSourceWed, 10 Jul 2019 17:03:00 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:5
https://trac.sagemath.org/ticket/28159#comment:5
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=5">diff</a>)
</li>
</ul>
TicketegourgoulhonThu, 11 Jul 2019 08:44:03 GMT
https://trac.sagemath.org/ticket/28159#comment:6
https://trac.sagemath.org/ticket/28159#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:4" title="Comment 4">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Please take a short look and give me a short feedback. I want to know whether I'm on the right way or not.
</p>
<p>
Furthermore, I appreciate tricks and advices. Thanks in advance! :)
</p>
</blockquote>
<p>
Thanks for this endeavor. I gave a look: it looks very nice! Please go on.
</p>
<p>
A minor comment: for class names, full names are preferable, so <code>TopolVectorBundle</code> could be replaced by <code>TopologicalVectorBundle</code>. Also maybe, in the context of vector bundles, <code>TransitionMap</code> is more appropriate than <code>CoordChange</code>.
</p>
Ticketgh-DeRhamSourceThu, 11 Jul 2019 13:51:06 GMT
https://trac.sagemath.org/ticket/28159#comment:7
https://trac.sagemath.org/ticket/28159#comment:7
<p>
Thanks!
</p>
TicketgitSat, 13 Jul 2019 20:50:14 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:8
https://trac.sagemath.org/ticket/28159#comment:8
<ul>
<li><strong>commit</strong>
changed from <em>5d5520d19abace16d1eced2d67a28e2f1fbaa9fb</em> to <em>ed60a5d8c5c03acf2627265bae19c8139376b126</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=ed60a5d8c5c03acf2627265bae19c8139376b126"><span class="icon"></span>ed60a5d</a></td><td><code>Trivializations almost finished</code>
</td></tr></table>
TicketgitSat, 13 Jul 2019 21:28:33 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:9
https://trac.sagemath.org/ticket/28159#comment:9
<ul>
<li><strong>commit</strong>
changed from <em>ed60a5d8c5c03acf2627265bae19c8139376b126</em> to <em>b23b6768f4ea50f7f9aedaa117ec13ca6a84d576</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=2a2bbb4c5dbbf3ca18ed73c0b33358b7e82f8e5d"><span class="icon"></span>2a2bbb4</a></td><td><code>28189: matrices</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=0919d504d4bcfa1d08b8b4f66bb6735ed4deaa7e"><span class="icon"></span>0919d50</a></td><td><code>Merge branch 't/28189/28189' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=b23b6768f4ea50f7f9aedaa117ec13ca6a84d576"><span class="icon"></span>b23b676</a></td><td><code>Matrix inversion adapted to ticket #28189</code>
</td></tr></table>
Ticketgh-DeRhamSourceSat, 13 Jul 2019 21:30:14 GMTdependencies set
https://trac.sagemath.org/ticket/28159#comment:10
https://trac.sagemath.org/ticket/28159#comment:10
<ul>
<li><strong>dependencies</strong>
set to <em>#28189</em>
</li>
</ul>
TicketgitSun, 14 Jul 2019 17:40:23 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:11
https://trac.sagemath.org/ticket/28159#comment:11
<ul>
<li><strong>commit</strong>
changed from <em>b23b6768f4ea50f7f9aedaa117ec13ca6a84d576</em> to <em>bc1fac17d30a5f60f61e33a4e54aec2d216d64de</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=bc1fac17d30a5f60f61e33a4e54aec2d216d64de"><span class="icon"></span>bc1fac1</a></td><td><code>Fibers and vectors of fibers implemented</code>
</td></tr></table>
Ticketgh-DeRhamSourceMon, 15 Jul 2019 12:48:18 GMT
https://trac.sagemath.org/ticket/28159#comment:12
https://trac.sagemath.org/ticket/28159#comment:12
<p>
What about synergy and compatibility with the old code? I mean, tangent bundles and vector fields are just special cases of vector bundles and sections. So, it'd be nice when we don't have two different implementations for the very same thing. How would you like to handle that? Any suggestions?
</p>
Ticketgh-DeRhamSourceMon, 15 Jul 2019 14:17:49 GMT
https://trac.sagemath.org/ticket/28159#comment:13
https://trac.sagemath.org/ticket/28159#comment:13
<p>
Also, it could be a good idea to generalize tensor fields and vector fields
to tensor product sections and treat tensor fields as a special case then.
But that's a huge step with pretty much effort (because I'm not that much
into your complete manifold code and the synergies between your files),
where I'd appreciate some help -- if you agree of course.
</p>
<p>
My first approach in mind is to implement just simple sections and program tensor products of bundles aswell.
</p>
TicketegourgoulhonSun, 21 Jul 2019 14:42:00 GMT
https://trac.sagemath.org/ticket/28159#comment:14
https://trac.sagemath.org/ticket/28159#comment:14
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:12" title="Comment 12">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
What about synergy and compatibility with the old code? I mean, tangent bundles and vector fields are just special cases of vector bundles and sections. So, it'd be nice when we don't have two different implementations for the very same thing. How would you like to handle that? Any suggestions?
</p>
</blockquote>
<p>
Sorry for the delay in replying.
IMHO, you should introduce a subclass of <code>TopologicalVectorBundle</code> for the tangent bundle (or more generally for tensor bundles) and simply have the method <code>section</code> of this subclass return a vector field on the manifold, as defined by the "old" code. Maybe it is sufficient to have a single subclass for all tensor bundles, including the tangent and cotangent bundles, i.e. something like
</p>
<pre class="wiki">class TensorBundle(TopologicalVectorBundle):
def __init__(self, manifold, k, l):
rank = manifold.dim()**(k+l)
if (k, l) == (1, 0):
name = "T{}".format(manifold._name)
elif (k, l) == (0, 1):
name = "T*{}".format(manifold._name)
else:
name = "T^({}{}){}".format(k, l, manifold._name)
# similar code for latex_name
TopologicalVectorBundle.__init__(self, rank, name, manifold,
field=manifold.base_field(),
latex_name=latex_name)
self._tensor_type = (k, l)
def section(self, *args, **kwargs):
if self.tensor_type == (1, 0):
return self._base_space.vector_field(*args, **kwargs)
return self._base_space.tensor_field(*(self._tensor_type + args), **kwargs)
</pre><p>
In the code for differentiable manifolds, you could then add
</p>
<pre class="wiki">class DifferentiableManifold(TopologicalManifold):
...
def tangent_bundle(self):
return TensorBundle(self, 1, 0)
def cotangent_bundle(self):
return TensorBundle(self, 0, 1)
def tensor_bundle(self, k, l)
return TensorBundle(self, k, l)
</pre>
TicketegourgoulhonSun, 21 Jul 2019 16:23:02 GMT
https://trac.sagemath.org/ticket/28159#comment:15
https://trac.sagemath.org/ticket/28159#comment:15
<p>
Also, I don't know if this is useful at this stage, but you could introduce an intermediate class, <code>DifferentiableVectorBundle</code> say, and let <code>TensorBundle</code> inherits from it. Besides, since (the total spaces of) differentiable vector bundles are differentiable manifolds, this intermediate class could inherit from <code>DifferentiableManifold</code> as well:
</p>
<pre class="wiki">class DifferentiableVectorBundle(TopologicalVectorBundle, DifferentiableManifold):
def __init__(self, rank, name, base_space, diff_degree=infinity,
latex_name=None, category=None)
field = base_space.base_field()
TopologicalVectorBundle.__init__(self, rank, name, base_space, field=field,
latex_name=latex_name, category=category)
dim = base_space.dim() * rank
if isinstance(field, RealField_class):
structure = RealDifferentialStructure()
else:
structure = DifferentialStructure()
DifferentiableManifold.__init__(self, dim, name, field, structure,
diff_degree=diff_degree,
latex_name=latex_name,
start_index=base_space.start_index())
class TensorBundle(DifferentiableVectorBundle):
...
</pre>
TicketegourgoulhonSun, 21 Jul 2019 19:50:08 GMT
https://trac.sagemath.org/ticket/28159#comment:16
https://trac.sagemath.org/ticket/28159#comment:16
<p>
In addition, to make the link with preexisting code, one could redefine the method <code>fiber()</code> of <code>TensorBundle</code> to return the tangent space at the given point if <code>(k,l)==(1,0)</code> or the corresponding tensor product for other values of <code>(k,l)</code>:
</p>
<pre class="wiki">class TensorBundle(DifferentiableVectorBundle):
def __init__(self, manifold, k, l):
rank = manifold.dim()**(k+l)
if (k, l) == (1, 0):
name = "T{}".format(manifold._name)
elif (k, l) == (0, 1):
name = "T*{}".format(manifold._name)
else:
name = "T^({}{}){}".format(k, l, manifold._name)
# similar code for latex_name
DifferentiableVectorBundle.__init__(self, rank, name, manifold,
diff_degree=manifold.diff_degree(),
latex_name=latex_name)
self._tensor_type = (k, l)
def section(self, *args, **kwargs):
if self.tensor_type == (1, 0):
return self._base_space.vector_field(*args, **kwargs)
return self._base_space.tensor_field(*(self._tensor_type + args), **kwargs)
def fiber(self, point):
return self._base_space.tangent_space(point).tensor_module(*self._tensor_type)
</pre>
Ticketgh-DeRhamSourceSun, 21 Jul 2019 22:30:21 GMT
https://trac.sagemath.org/ticket/28159#comment:17
https://trac.sagemath.org/ticket/28159#comment:17
<p>
Sounds like a very good compromise to me. I'll see what I can do. Thanks for your input!
</p>
<p>
But I feel not comfortable with inheriting from <code>DifferentiableManifold</code>. There are too many conflicts (<code>frame()</code>, <code>atlas()</code>, etc.). Maybe, having a <code>total_space()</code> method returning the corresponding manifold would be a better idea. What do you think?
</p>
TicketegourgoulhonMon, 22 Jul 2019 08:06:21 GMT
https://trac.sagemath.org/ticket/28159#comment:18
https://trac.sagemath.org/ticket/28159#comment:18
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:17" title="Comment 17">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Sounds like a very good compromise to me. I'll see what I can do. Thanks for your input!
</p>
<p>
But I feel not comfortable with inheriting from <code>DifferentiableManifold</code>. There are too many conflicts (<code>frame()</code>, <code>atlas()</code>, etc.). Maybe, having a <code>total_space()</code> method returning the corresponding manifold would be a better idea. What do you think?
</p>
</blockquote>
<p>
This seems indeed a good idea. Also sounds closer to the mathematical definition of a vector bundle as a tuple <code>(E, M, pi)</code>, which distinguishes the bundle from its base space <code>E</code>.
</p>
Ticketgh-DeRhamSourceTue, 23 Jul 2019 15:52:46 GMT
https://trac.sagemath.org/ticket/28159#comment:19
https://trac.sagemath.org/ticket/28159#comment:19
<p>
I need some help, again. I'm now trying to program local frames and sections and looked up how you managed it for vector fields. Maybe you can shortly explain how you did it? The code is pretty huge and spreaded. Especially, I'm interested in changes from one (coordinate) frame into another for different domains and the restriction process and display for tensor fields. Thanks! :)
</p>
TicketegourgoulhonTue, 23 Jul 2019 21:09:07 GMT
https://trac.sagemath.org/ticket/28159#comment:20
https://trac.sagemath.org/ticket/28159#comment:20
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:19" title="Comment 19">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
I need some help, again. I'm now trying to program local frames and sections and looked up how you managed it for vector fields. Maybe you can shortly explain how you did it? The code is pretty huge and spreaded. Especially, I'm interested in changes from one (coordinate) frame into another for different domains and the restriction process and display for tensor fields. Thanks! :)
</p>
</blockquote>
<p>
You can find some details of the implementation in <a class="ext-link" href="http://ccirm.cedram.org/cedram-bin/article/CCIRM_2018__6_1_A1_0.pdf"><span class="icon"></span>this article</a>. Please tell me if this does not cover what you are looking for.
</p>
Ticketgh-DeRhamSourceFri, 26 Jul 2019 15:55:22 GMT
https://trac.sagemath.org/ticket/28159#comment:21
https://trac.sagemath.org/ticket/28159#comment:21
<p>
Thanks, that was very helpful.
</p>
<p>
I think, one should do the following: Implement arbitrary tensor product sections on one particular vector bundle and apply and adapt the construction as it is done for tensor fields, and then derive tensor fields from this more general construction. Or even better: Implement tensor product sections of mixed vector bundles over the same base space (e.g. <code>\Gamma(E \otimes E^* \otimes \Lambda^k F)</code>).
</p>
<p>
Unfortunately, I'm running out of time. Moreover, for this endeavour, you need to understand the whole code around tensor fields quite perfectly. I would implement just simple sections for now and apply the compromise we agreed on above. Maybe I can try this generalization after my thesis or one of you is willing to take the effort.
</p>
<p>
However, simple sections seem enough for the beginning because it is possible to construct aforementioned sections by constructing the corresponding bundles and then defining simple sections on them. Still, imao, the way above is the most flexible and overall convenient.
</p>
<p>
What do you think?
</p>
TicketegourgoulhonWed, 31 Jul 2019 08:24:22 GMT
https://trac.sagemath.org/ticket/28159#comment:22
https://trac.sagemath.org/ticket/28159#comment:22
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:21" title="Comment 21">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
I would implement just simple sections for now and apply the compromise we agreed on above. Maybe I can try this generalization after my thesis or one of you is willing to take the effort.
</p>
<p>
However, simple sections seem enough for the beginning because it is possible to construct aforementioned sections by constructing the corresponding bundles and then defining simple sections on them. Still, imao, the way above is the most flexible and overall convenient.
</p>
<p>
What do you think?
</p>
</blockquote>
<p>
Sorry for the delay in replying.
Yes, implementing simple sections as a first stage seems the thing to do at the moment.
</p>
TicketgitFri, 02 Aug 2019 15:02:52 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:23
https://trac.sagemath.org/ticket/28159#comment:23
<ul>
<li><strong>commit</strong>
changed from <em>bc1fac17d30a5f60f61e33a4e54aec2d216d64de</em> to <em>94cdc74abfac7f4f3d03a43121eebbabe95cc8a9</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=c539562cec3d4f1a04ffae11e64eac452a036c9f"><span class="icon"></span>c539562</a></td><td><code>intermediate step</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=a2cd7497d6c5a7e54ecdc905e451d4c1ee0d167f"><span class="icon"></span>a2cd749</a></td><td><code>Intermediate step 2</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=157c3a0b35ee87d6c2d0e6134cb6d1c389495ca5"><span class="icon"></span>157c3a0</a></td><td><code>Intermediate step 3</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=d7d4115d4c7855fc8d2f4fe412f29476d23a73ae"><span class="icon"></span>d7d4115</a></td><td><code>Merge remote-tracking branch 'trac/develop' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=94cdc74abfac7f4f3d03a43121eebbabe95cc8a9"><span class="icon"></span>94cdc74</a></td><td><code>Introducing local frames</code>
</td></tr></table>
TicketgitFri, 02 Aug 2019 17:04:20 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:24
https://trac.sagemath.org/ticket/28159#comment:24
<ul>
<li><strong>commit</strong>
changed from <em>94cdc74abfac7f4f3d03a43121eebbabe95cc8a9</em> to <em>c59f443dd7259aca2214639ab0e2f6e1dc4f4151</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=c59f443dd7259aca2214639ab0e2f6e1dc4f4151"><span class="icon"></span>c59f443</a></td><td><code>Minor issues</code>
</td></tr></table>
TicketgitFri, 23 Aug 2019 13:56:52 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:25
https://trac.sagemath.org/ticket/28159#comment:25
<ul>
<li><strong>commit</strong>
changed from <em>c59f443dd7259aca2214639ab0e2f6e1dc4f4151</em> to <em>12bfb7937bc3e978d8bec410929633889b1e487a</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=46e081c4d120f36c5ca9d036cab4e52054df5a84"><span class="icon"></span>46e081c</a></td><td><code>Main parts finished</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=12bfb7937bc3e978d8bec410929633889b1e487a"><span class="icon"></span>12bfb79</a></td><td><code>Framework and doctests mostly finished. Please check!</code>
</td></tr></table>
Ticketgh-DeRhamSourceFri, 23 Aug 2019 14:01:02 GMT
https://trac.sagemath.org/ticket/28159#comment:26
https://trac.sagemath.org/ticket/28159#comment:26
<p>
The doctests take pretty much effort (especially for the section file). Maybe, I will not finish them on time. But for now, the code is mostly finished. Some things are still to do, but sections seem to work. Please take a look and write me if something is missing or should be done better.
</p>
<p>
Best regards,
Michael
</p>
Ticketgh-DeRhamSourceSun, 25 Aug 2019 12:55:18 GMTdependencies deleted
https://trac.sagemath.org/ticket/28159#comment:27
https://trac.sagemath.org/ticket/28159#comment:27
<ul>
<li><strong>dependencies</strong>
<em>#28189</em> deleted
</li>
</ul>
TicketegourgoulhonSun, 01 Sep 2019 09:14:22 GMT
https://trac.sagemath.org/ticket/28159#comment:28
https://trac.sagemath.org/ticket/28159#comment:28
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:26" title="Comment 26">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
The doctests take pretty much effort (especially for the section file). Maybe, I will not finish them on time. But for now, the code is mostly finished. Some things are still to do, but sections seem to work. Please take a look and write me if something is missing or should be done better.
</p>
</blockquote>
<p>
Sorry for the delay in replying. I gave a look and it looks very good! Please go on.
</p>
<p>
A few comments/questions:
</p>
<ul><li>you've deleted the dependency to <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a> while some source files modified in this ticket (those in <code>src/sage/matrix</code> and <code>src/sage/sets</code>) pertain to <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a>
</li><li>vector bundles have not been added to the reference manual yet; I guess you have to edit/add some files in <code>src/doc/en/reference/manifolds</code> and check that the documentation builds correcty with
<pre class="wiki">sage -docbuild reference/manifolds html
</pre></li><li>notice that the doctests that output a dictionary, like
<pre class="wiki">sage: E.changes_of_frame()
</pre>in line 105 of <code>trivialization.py</code>, must be marked <code># random</code>
</li><li>there is a typo in line 38 of <code>trivialization.py</code>:
<pre class="wiki"> `(p, v) \mapsto \pi^{-1}(p)` is a linear isomorphism.
</pre>must be replaced by something like
<pre class="wiki"> `(p, v) \mapsto v` is a linear isomorphism from `\pi^{-1}(p)` to `K^n`.
</pre></li><li>another typo, in line 8 of <code>vector_bundle.py</code>:
<pre class="wiki">- the set `E_p=\pi^{-1}(x)` has the vector space structure of `K^n`,
</pre><code>x</code> has to be replaced by <code>p</code>.
</li><li>the function <code>TopologicalVectorBundle.atlas()</code> returns a shallow copy of <code>self._atlas</code>; why does it not return directly <code>self._atlas</code> ?
</li><li>shouldn't the method <code>TopologicalVectorBundle.total_space()</code> be cached? (possibly using the decorator <code>@cached_method</code>)
</li></ul>
Ticketgh-DeRhamSourceSat, 07 Sep 2019 12:43:59 GMTdependencies set
https://trac.sagemath.org/ticket/28159#comment:29
https://trac.sagemath.org/ticket/28159#comment:29
<ul>
<li><strong>dependencies</strong>
set to <em>#28189</em>
</li>
</ul>
Ticketgh-DeRhamSourceSat, 07 Sep 2019 13:17:50 GMT
https://trac.sagemath.org/ticket/28159#comment:30
https://trac.sagemath.org/ticket/28159#comment:30
<blockquote class="citation">
<p>
Sorry for the delay in replying. I gave a look and it looks very good! Please go on.
</p>
</blockquote>
<p>
<br />
Don't worry. :)
<br /><br />
</p>
<blockquote class="citation">
<p>
A few comments/questions:
</p>
<ul><li>you've deleted the dependency to <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a> while some source files modified in this ticket (those in <code>src/sage/matrix</code> and <code>src/sage/sets</code>) pertain to <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a>
</li></ul></blockquote>
<p>
<br />
Added again.
<br /><br />
</p>
<blockquote class="citation">
<ul><li>vector bundles have not been added to the reference manual yet; I guess you have to edit/add some files in <code>src/doc/en/reference/manifolds</code> and check that the documentation builds correcty with
<pre class="wiki">sage -docbuild reference/manifolds html
</pre></li></ul></blockquote>
<p>
<br />
Comes later, when all the doc is finished. :)
<br /><br />
</p>
<blockquote class="citation">
<ul><li>notice that the doctests that output a dictionary, like
<pre class="wiki">sage: E.changes_of_frame()
</pre>in line 105 of <code>trivialization.py</code>, must be marked <code># random</code>
</li></ul></blockquote>
<p>
<br />
What do you mean?
<br /><br />
</p>
<blockquote class="citation">
<ul><li>there is a typo in line 38 of <code>trivialization.py</code>:
<pre class="wiki"> `(p, v) \mapsto \pi^{-1}(p)` is a linear isomorphism.
</pre>must be replaced by something like
<pre class="wiki"> `(p, v) \mapsto v` is a linear isomorphism from `\pi^{-1}(p)` to `K^n`.
</pre></li><li>another typo, in line 8 of <code>vector_bundle.py</code>:
<pre class="wiki">- the set `E_p=\pi^{-1}(x)` has the vector space structure of `K^n`,
</pre><code>x</code> has to be replaced by <code>p</code>.
</li></ul></blockquote>
<p>
<br />
Corrected. The projection compatibility was missing, too.
<br /><br />
</p>
<blockquote class="citation">
<ul><li>the function <code>TopologicalVectorBundle.atlas()</code> returns a shallow copy of <code>self._atlas</code>; why does it not return directly <code>self._atlas</code> ?
</li></ul></blockquote>
<p>
<br />
I just borrowed the same code lines from manifold.py. I guess, this is for convenience: One should not allow to alter the list when getting the atlas through this method.
<br /><br />
</p>
<blockquote class="citation">
<ul><li>shouldn't the method <code>TopologicalVectorBundle.total_space()</code> be cached? (possibly using the decorator <code>@cached_method</code>)
</li></ul></blockquote>
<p>
<br />
For now, yes. But later on, when the computation of the atlas is implemented, one should update the manifold's atlas, maybe using this method.
<br /><br />
Best, Michael
</p>
TicketgitSun, 08 Sep 2019 09:06:18 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:31
https://trac.sagemath.org/ticket/28159#comment:31
<ul>
<li><strong>commit</strong>
changed from <em>12bfb7937bc3e978d8bec410929633889b1e487a</em> to <em>901df657fef7850b041b7a98714fccb2e9b7b669</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=959e152b7b87c72e1d2a43899c009c3a31e74e20"><span class="icon"></span>959e152</a></td><td><code>Merge branch 'develop' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=901df657fef7850b041b7a98714fccb2e9b7b669"><span class="icon"></span>901df65</a></td><td><code>Doctest and minor changes</code>
</td></tr></table>
TicketegourgoulhonSun, 08 Sep 2019 20:23:13 GMT
https://trac.sagemath.org/ticket/28159#comment:32
https://trac.sagemath.org/ticket/28159#comment:32
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:30" title="Comment 30">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Comes later, when all the doc is finished. :)
</p>
</blockquote>
<p>
I will ;-)
</p>
<blockquote class="citation">
<blockquote class="citation">
<ul><li>notice that the doctests that output a dictionary, like
<pre class="wiki">sage: E.changes_of_frame()
</pre>in line 105 of <code>trivialization.py</code>, must be marked <code># random</code>
</li></ul></blockquote>
<p>
<br />
What do you mean?
</p>
</blockquote>
<p>
When printing a dictionary, the order of elements is random. For instance it depends on the computer. So a doctest that involves a directory output may fail on a different computer. The marker <code># random</code> ensures that the doctest is skipped (see <a class="ext-link" href="http://doc.sagemath.org/html/en/developer/coding_basics.html#special-markup-to-influence-doctests"><span class="icon"></span>http://doc.sagemath.org/html/en/developer/coding_basics.html#special-markup-to-influence-doctests</a>).
</p>
<blockquote class="citation">
<blockquote class="citation">
<ul><li>the function <code>TopologicalVectorBundle.atlas()</code> returns a shallow copy of <code>self._atlas</code>; why does it not return directly <code>self._atlas</code> ?
</li></ul></blockquote>
<p>
<br />
I just borrowed the same code lines from manifold.py.
</p>
</blockquote>
<p>
Ah yes, you are right: that's already there for manifolds.
</p>
<blockquote class="citation">
<p>
I guess, this is for convenience: One should not allow to alter the list when getting the atlas through this method.
</p>
</blockquote>
<p>
Yes this could be the reason. Travis, do remember why such a choice was made?
On the other side, things are not very consistent here, since <code>frames()</code> returns directly <code>self._frames</code> and we have the same for many other manifold methods.
</p>
<blockquote class="citation">
<blockquote class="citation">
<ul><li>shouldn't the method <code>TopologicalVectorBundle.total_space()</code> be cached? (possibly using the decorator <code>@cached_method</code>)
</li></ul></blockquote>
<p>
<br />
For now, yes. But later on, when the computation of the atlas is implemented, one should update the manifold's atlas, maybe using this method.
</p>
</blockquote>
<p>
OK, I see.
</p>
TickettscrimSun, 08 Sep 2019 22:13:46 GMT
https://trac.sagemath.org/ticket/28159#comment:33
https://trac.sagemath.org/ticket/28159#comment:33
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:32" title="Comment 32">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:30" title="Comment 30">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<blockquote class="citation">
<ul><li>the function <code>TopologicalVectorBundle.atlas()</code> returns a shallow copy of <code>self._atlas</code>; why does it not return directly <code>self._atlas</code> ?
</li></ul></blockquote>
<p>
<br />
I just borrowed the same code lines from manifold.py.
</p>
</blockquote>
<p>
Ah yes, you are right: that's already there for manifolds.
</p>
<blockquote class="citation">
<p>
I guess, this is for convenience: One should not allow to alter the list when getting the atlas through this method.
</p>
</blockquote>
<p>
Yes this could be the reason. Travis, do remember why such a choice was made?
On the other side, things are not very consistent here, since <code>frames()</code> returns directly <code>self._frames</code> and we have the same for many other manifold methods.
</p>
</blockquote>
<p>
Probably all of them should return copies of the lists because it better protects the data. It is really easy to access stuff and then unintentionally change it, which could then throw your entire system out of balance. Most likely I/we just didn't notice or think about it when doing the initial code.
</p>
TicketegourgoulhonMon, 09 Sep 2019 20:11:23 GMT
https://trac.sagemath.org/ticket/28159#comment:34
https://trac.sagemath.org/ticket/28159#comment:34
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:33" title="Comment 33">tscrim</a>:
</p>
<blockquote class="citation">
<p>
Probably all of them should return copies of the lists because it better protects the data. It is really easy to access stuff and then unintentionally change it, which could then throw your entire system out of balance. Most likely I/we just didn't notice or think about it when doing the initial code.
</p>
</blockquote>
<p>
My concern here would be about efficiency. We might have quite often loops like
</p>
<pre class="wiki">for chart in M.atlas():
...
</pre><p>
This implies that a list is created each time such a loop occurs. But maybe the CPU cost is negligible...
</p>
TickettscrimMon, 09 Sep 2019 21:27:41 GMT
https://trac.sagemath.org/ticket/28159#comment:35
https://trac.sagemath.org/ticket/28159#comment:35
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:34" title="Comment 34">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:33" title="Comment 33">tscrim</a>:
</p>
<blockquote class="citation">
<p>
Probably all of them should return copies of the lists because it better protects the data. It is really easy to access stuff and then unintentionally change it, which could then throw your entire system out of balance. Most likely I/we just didn't notice or think about it when doing the initial code.
</p>
</blockquote>
<p>
My concern here would be about efficiency. We might have quite often loops like
</p>
<pre class="wiki">for chart in M.atlas():
...
</pre><p>
This implies that a list is created each time such a loop occurs. But maybe the CPU cost is negligible...
</p>
</blockquote>
<p>
That would be my guess since so much time is spent in doing the computations of the manifold itself. (Python heavily optimizes list manipulations I think too.) Plus, since it is internal, it is much more okay to break encapsulation and just directly call the attribute when you know it is safe (or add a <code>copy</code> flag to the accessor methods).
</p>
TicketgitMon, 16 Sep 2019 12:53:59 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:36
https://trac.sagemath.org/ticket/28159#comment:36
<ul>
<li><strong>commit</strong>
changed from <em>901df657fef7850b041b7a98714fccb2e9b7b669</em> to <em>9011e3d645f9ccbe8df35cfa8883f128312d2d9d</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=9011e3d645f9ccbe8df35cfa8883f128312d2d9d"><span class="icon"></span>9011e3d</a></td><td><code>Copy lists and frame restriction</code>
</td></tr></table>
Ticketgh-DeRhamSourceMon, 16 Sep 2019 13:14:20 GMT
https://trac.sagemath.org/ticket/28159#comment:37
https://trac.sagemath.org/ticket/28159#comment:37
<p>
There was an issue with the restrictions of (vector) frames. Namely, the list of sub- and superframes was not complete and depended on some strange random order. Here is an example:
</p>
<pre class="wiki">sage: M = Manifold(2, 'M')
sage: U = M.open_subset('U'); V = M.open_subset('V'); W = U.intersection(V, name='W')
sage: e = M.vector_frame('e')
sage: eV = e.restrict(V); eU = e.restrict(U); eW = e.restrict(W)
sage: eW._superframes
{Vector frame (W, (e_0,e_1)),
Vector frame (M, (e_0,e_1)),
Vector frame (V, (e_0,e_1))}
sage: eU._subframes
{Vector frame (U, (e_0,e_1))}
sage: eV._subframes
{Vector frame (W, (e_0,e_1)), Vector frame (V, (e_0,e_1))}
</pre><p>
I fixed it by avoiding any recursion and expanding the tree of subframes (and superframes) starting from the reference frame. Please check.
</p>
TicketegourgoulhonWed, 18 Sep 2019 20:21:19 GMT
https://trac.sagemath.org/ticket/28159#comment:38
https://trac.sagemath.org/ticket/28159#comment:38
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:37" title="Comment 37">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
There was an issue with the restrictions of (vector) frames. Namely, the list of sub- and superframes was not complete and depended on some strange random order.
</p>
<p>
I fixed it by avoiding any recursion and expanding the tree of subframes (and superframes) starting from the reference frame. Please check.
</p>
</blockquote>
<p>
Looks good to me. Thanks for the fix!
</p>
TicketgitTue, 24 Sep 2019 13:24:37 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:39
https://trac.sagemath.org/ticket/28159#comment:39
<ul>
<li><strong>commit</strong>
changed from <em>9011e3d645f9ccbe8df35cfa8883f128312d2d9d</em> to <em>9600762f72d9a49e408b18aeda17a14ecfad1327</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=17657eccfc25e229a69649e4b0c38cf1c603bf09"><span class="icon"></span>17657ec</a></td><td><code>Doctest added</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=ef03c38335577ba176ea07cb03f9400d78e6b2d6"><span class="icon"></span>ef03c38</a></td><td><code>Merge branch 'develop' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=3b0c7a7f8894a881b51158472ef3d3600dae63d0"><span class="icon"></span>3b0c7a7</a></td><td><code>minor doctest changes</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=9600762f72d9a49e408b18aeda17a14ecfad1327"><span class="icon"></span>9600762</a></td><td><code>inverses of automorphisms without SR inforcement</code>
</td></tr></table>
Ticketgh-DeRhamSourceTue, 24 Sep 2019 13:36:50 GMT
https://trac.sagemath.org/ticket/28159#comment:40
https://trac.sagemath.org/ticket/28159#comment:40
<p>
I declared <code>ScalarFieldAlgebra</code> as a field so that matrix computations like inverses and determinants make no problems. When ticket <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a> is merged (hopefully in 9b0), this can be undone. But for now, this ticket does not depend on <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a> anymore.
</p>
<p>
Since this solves some problems in the preexisting code, I removed the SR enforcement in <code>differentiable/automorphismfield.py</code> for more compatibility.
</p>
<p>
Do you agree?
</p>
Ticketgh-DeRhamSourceTue, 24 Sep 2019 13:38:20 GMTdependencies deleted
https://trac.sagemath.org/ticket/28159#comment:41
https://trac.sagemath.org/ticket/28159#comment:41
<ul>
<li><strong>dependencies</strong>
<em>#28189</em> deleted
</li>
</ul>
TicketgitTue, 24 Sep 2019 19:30:19 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:42
https://trac.sagemath.org/ticket/28159#comment:42
<ul>
<li><strong>commit</strong>
changed from <em>9600762f72d9a49e408b18aeda17a14ecfad1327</em> to <em>033960f3e3bc2f46cea69ce5ae4e5044718bdc9c</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=2e38d4721c7addcb8ba3acc03fbcc17cb7d8b3cc"><span class="icon"></span>2e38d47</a></td><td><code>inverses of automorphisms without SR enforcement</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=7363b9f2be8d829e97069e996868335a7cf923ad"><span class="icon"></span>7363b9f</a></td><td><code>28189: prefer R in Fields() rather than R.is_field()</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=033960f3e3bc2f46cea69ce5ae4e5044718bdc9c"><span class="icon"></span>033960f</a></td><td><code>28189: fix doctest in judson-abstract-algebra book</code>
</td></tr></table>
Ticketgh-DeRhamSourceTue, 24 Sep 2019 19:38:08 GMT
https://trac.sagemath.org/ticket/28159#comment:43
https://trac.sagemath.org/ticket/28159#comment:43
<p>
A merge of <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a> for 9b0 seems imminent. Since this ticket will be merged earliest in 9b0, I added the dependencies again. Imao, it makes things easier and less complicated, especially for characteristic classes.
</p>
<p>
I am sorry for potential inconveniences.
</p>
Ticketgh-DeRhamSourceTue, 24 Sep 2019 19:39:28 GMTdependencies set
https://trac.sagemath.org/ticket/28159#comment:44
https://trac.sagemath.org/ticket/28159#comment:44
<ul>
<li><strong>dependencies</strong>
set to <em>#28189</em>
</li>
</ul>
Ticketgh-DeRhamSourceWed, 25 Sep 2019 08:54:34 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:45
https://trac.sagemath.org/ticket/28159#comment:45
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=45">diff</a>)
</li>
</ul>
Ticketgh-DeRhamSourceWed, 25 Sep 2019 08:57:45 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:46
https://trac.sagemath.org/ticket/28159#comment:46
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=46">diff</a>)
</li>
</ul>
Ticketgh-DeRhamSourceWed, 25 Sep 2019 08:58:05 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:47
https://trac.sagemath.org/ticket/28159#comment:47
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=47">diff</a>)
</li>
</ul>
Ticketgh-DeRhamSourceWed, 25 Sep 2019 09:04:21 GMTdescription, milestone changed
https://trac.sagemath.org/ticket/28159#comment:48
https://trac.sagemath.org/ticket/28159#comment:48
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=48">diff</a>)
</li>
<li><strong>milestone</strong>
changed from <em>sage-8.9</em> to <em>sage-9.0</em>
</li>
</ul>
Ticketgh-DeRhamSourceWed, 25 Sep 2019 09:17:55 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:49
https://trac.sagemath.org/ticket/28159#comment:49
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=49">diff</a>)
</li>
</ul>
TicketgitWed, 25 Sep 2019 14:29:53 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:50
https://trac.sagemath.org/ticket/28159#comment:50
<ul>
<li><strong>commit</strong>
changed from <em>033960f3e3bc2f46cea69ce5ae4e5044718bdc9c</em> to <em>69d05dad4177d25333b85de782ebecea1615baa4</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=5d92db33c5cc890b5bb1d81a7da83f99fa48445c"><span class="icon"></span>5d92db3</a></td><td><code>28189: prefer R in Fields() rather than R.is_field()</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=7767b304009dea856ebf67460ca3f7d0440da51f"><span class="icon"></span>7767b30</a></td><td><code>28189: fix doctest in judson-abstract-algebra book</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=4981d44dbb084eb91be19d9acd2662cffaed1d4f"><span class="icon"></span>4981d44</a></td><td><code>fix accidental merge with #28402</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=fc181832f325b1dce39837b83c70914db1895900"><span class="icon"></span>fc18183</a></td><td><code>Merge new commit of branch 't/28189/28189' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=69d05dad4177d25333b85de782ebecea1615baa4"><span class="icon"></span>69d05da</a></td><td><code>Doctests for section methods finished</code>
</td></tr></table>
TicketgitFri, 04 Oct 2019 14:34:30 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:51
https://trac.sagemath.org/ticket/28159#comment:51
<ul>
<li><strong>commit</strong>
changed from <em>69d05dad4177d25333b85de782ebecea1615baa4</em> to <em>a737240ae5f5b6c07bf969e220062135e8955675</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=a737240ae5f5b6c07bf969e220062135e8955675"><span class="icon"></span>a737240</a></td><td><code>Doctests finished + default frame + typos</code>
</td></tr></table>
Ticketgh-DeRhamSourceFri, 04 Oct 2019 14:42:00 GMT
https://trac.sagemath.org/ticket/28159#comment:52
https://trac.sagemath.org/ticket/28159#comment:52
<p>
So, I guess, all pieces of the puzzles are fit together now. Please take a look, give me a feedback and tell me what is missing.
</p>
<p>
I have some difficulties to interpret the docbuild errors. Can someone help? Is there a documentation?
</p>
<p>
It seems, we are almost done. :)
</p>
Ticketgh-DeRhamSourceFri, 04 Oct 2019 14:46:14 GMT
https://trac.sagemath.org/ticket/28159#comment:53
https://trac.sagemath.org/ticket/28159#comment:53
<p>
By the way: How should the authorship be handled? I copied most of the files and just adapted them. So, the other authors should be mentioned.
</p>
Ticketgh-DeRhamSourceFri, 04 Oct 2019 15:16:09 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:54
https://trac.sagemath.org/ticket/28159#comment:54
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=54">diff</a>)
</li>
</ul>
TicketgitFri, 04 Oct 2019 15:37:23 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:55
https://trac.sagemath.org/ticket/28159#comment:55
<ul>
<li><strong>commit</strong>
changed from <em>a737240ae5f5b6c07bf969e220062135e8955675</em> to <em>f4ef538c162039ea301de1626791405a33bbb65c</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=356147c312df05ddfe3c7444c9a336293ed43184"><span class="icon"></span>356147c</a></td><td><code>Merge branch 'develop' into t/28159/vector_bundles</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=f4ef538c162039ea301de1626791405a33bbb65c"><span class="icon"></span>f4ef538</a></td><td><code>Differentiability of total space</code>
</td></tr></table>
Ticketgh-DeRhamSourceFri, 04 Oct 2019 18:53:35 GMTstatus changed; reviewer set
https://trac.sagemath.org/ticket/28159#comment:56
https://trac.sagemath.org/ticket/28159#comment:56
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
<li><strong>reviewer</strong>
set to <em>Eric Gourgoulhon, Travis Scrimshaw</em>
</li>
</ul>
TickettscrimFri, 04 Oct 2019 22:39:45 GMT
https://trac.sagemath.org/ticket/28159#comment:57
https://trac.sagemath.org/ticket/28159#comment:57
<p>
Docbuild errors are notoriously quite difficult. Unfortunately it usually just means going over the file carefully with some general hint from the error message about what you should be looking for. I can also go through it if you haven't been able to find what is going wrong.
</p>
<p>
As for authorship, I would say just listing yourself as the author because you did write the code, even if it is adapted from others. I don't think they should (or need to) have a copyright. Although it doesn't hurt to say it was based off another file, but I don't have a stake in this. Eric is best to comment on this.
</p>
<p>
Are there things you can put as methods in the category of vector bundles? At least I think there should be an abstract method for the base space, and maybe also the projection map (i.e., things in this category should have a common way to give the defining properties).
</p>
<p>
This code doesn't do anything:
</p>
<pre class="wiki"> if update_atlas:
# TODO: if self._atlas not empty, introduce charts
pass
</pre><p>
I would change <code>Moebius</code> to <code>Möbius</code> in the documentation (also make sure to add the utf8 encoding <code># -*- coding: utf-8 -*-</code> to the first line of such files).
</p>
<div class="wiki-code"><div class="code"><pre><span class="gd">- desc = "Module "
- desc += self._name + " "
- desc += "of sections "
- desc += "on the {} ".format(self._domain)
- desc += "with values in the " + self._vbundle.base_field_type() + " "
- desc += "vector bundle " + self._vbundle._name + " "
- desc += "of rank {}".format(self._vbundle.rank())
</span><span class="gi">+ desc = "Module {} of sections on the {} with values in the {} vector bundle of rank {}"
+ desc = desc.format(self._name, self._domain, self._vbundle.base_field_type(), self._vbundle.rank())
</span></pre></div></div><div class="wiki-code"><div class="code"><pre><span class="gd">-Sets the default local frame on ``self``.
</span><span class="gi">+Set the default local frame on ``self``.
</span></pre></div></div><p>
I will probably have more changes, but I don't have time right now to look in full detail.
</p>
TicketgitSat, 05 Oct 2019 09:18:55 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:58
https://trac.sagemath.org/ticket/28159#comment:58
<ul>
<li><strong>commit</strong>
changed from <em>f4ef538c162039ea301de1626791405a33bbb65c</em> to <em>f484b7702cac56ad495c22735e15876b8232f8bf</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=f484b7702cac56ad495c22735e15876b8232f8bf"><span class="icon"></span>f484b77</a></td><td><code>Docbuild errors fixed + Minor fixes</code>
</td></tr></table>
TicketgitSat, 05 Oct 2019 09:25:00 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:59
https://trac.sagemath.org/ticket/28159#comment:59
<ul>
<li><strong>commit</strong>
changed from <em>f484b7702cac56ad495c22735e15876b8232f8bf</em> to <em>1735541337db3f446641782dc6ce719bd417e3b5</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=1735541337db3f446641782dc6ce719bd417e3b5"><span class="icon"></span>1735541</a></td><td><code>Very small fix</code>
</td></tr></table>
Ticketgh-DeRhamSourceSat, 05 Oct 2019 09:33:45 GMT
https://trac.sagemath.org/ticket/28159#comment:60
https://trac.sagemath.org/ticket/28159#comment:60
<p>
Thanks for your feedback!
</p>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:57" title="Comment 57">tscrim</a>:
</p>
<blockquote class="citation">
<p>
Docbuild errors are notoriously quite difficult. Unfortunately it usually just means going over the file carefully with some general hint from the error message about what you should be looking for. I can also go through it if you haven't been able to find what is going wrong.
</p>
</blockquote>
<p>
I guess, I have eliminated all doctest errors caused by these files. Please overlook this.
</p>
<blockquote class="citation">
<p>
As for authorship, I would say just listing yourself as the author because you did write the code, even if it is adapted from others. I don't think they should (or need to) have a copyright. Although it doesn't hurt to say it was based off another file, but I don't have a stake in this. Eric is best to comment on this.
</p>
</blockquote>
<p>
Done. I kept Eric in the copyrights. Is that appropriate?
</p>
<blockquote class="citation">
<p>
This code doesn't do anything:
</p>
<pre class="wiki"> if update_atlas:
# TODO: if self._atlas not empty, introduce charts
pass
</pre><p>
I would change <code>Moebius</code> to <code>Möbius</code> in the documentation (also make sure to add the utf8 encoding <code># -*- coding: utf-8 -*-</code> to the first line of such files).
</p>
<div class="wiki-code"><div class="code"><pre><span class="gd">- desc = "Module "
- desc += self._name + " "
- desc += "of sections "
- desc += "on the {} ".format(self._domain)
- desc += "with values in the " + self._vbundle.base_field_type() + " "
- desc += "vector bundle " + self._vbundle._name + " "
- desc += "of rank {}".format(self._vbundle.rank())
</span><span class="gi">+ desc = "Module {} of sections on the {} with values in the {} vector bundle of rank {}"
+ desc = desc.format(self._name, self._domain, self._vbundle.base_field_type(), self._vbundle.rank())
</span></pre></div></div><div class="wiki-code"><div class="code"><pre><span class="gd">-Sets the default local frame on ``self``.
</span><span class="gi">+Set the default local frame on ``self``.
</span></pre></div></div></blockquote>
<p>
Done!
</p>
<blockquote class="citation">
<p>
Are there things you can put as methods in the category of vector bundles? At least I think there should be an abstract method for the base space, and maybe also the projection map (i.e., things in this category should have a common way to give the defining properties).
</p>
</blockquote>
<p>
What do you mean? :/
</p>
TicketgitSat, 05 Oct 2019 10:41:22 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:61
https://trac.sagemath.org/ticket/28159#comment:61
<ul>
<li><strong>commit</strong>
changed from <em>1735541337db3f446641782dc6ce719bd417e3b5</em> to <em>54237ef4815198c80a0f95e949a8debaa7aafd2f</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=54237ef4815198c80a0f95e949a8debaa7aafd2f"><span class="icon"></span>54237ef</a></td><td><code>Pyflakes and Coverage</code>
</td></tr></table>
TicketgitSat, 05 Oct 2019 10:44:45 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:62
https://trac.sagemath.org/ticket/28159#comment:62
<ul>
<li><strong>commit</strong>
changed from <em>54237ef4815198c80a0f95e949a8debaa7aafd2f</em> to <em>67cf8df97fe082f277fb54b1d3a0626f9617ac7f</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=67cf8df97fe082f277fb54b1d3a0626f9617ac7f"><span class="icon"></span>67cf8df</a></td><td><code>Merge branch 'develop' into t/28159/vector_bundles</code>
</td></tr></table>
TicketegourgoulhonSat, 05 Oct 2019 10:45:12 GMT
https://trac.sagemath.org/ticket/28159#comment:63
https://trac.sagemath.org/ticket/28159#comment:63
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:60" title="Comment 60">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:57" title="Comment 57">tscrim</a>:
</p>
<blockquote class="citation">
<p>
Docbuild errors are notoriously quite difficult. Unfortunately it usually just means going over the file carefully with some general hint from the error message about what you should be looking for. I can also go through it if you haven't been able to find what is going wrong.
</p>
</blockquote>
<p>
I guess, I have eliminated all doctest errors caused by these files. Please overlook this.
</p>
</blockquote>
<p>
Thanks for this painful work. It is true that sphinx messages are not very informative. In particular the line numbers do not refer to the start of the file but to the start of the docstring. For this reason, one should not hesitate to build the doc often, possibly after each modification of a doctring. For this, do not run <code>make doc</code>, which takes ages (*), use instead <code>sage -docbuild reference/manifolds html</code>.
</p>
<p>
(*) hopefully there is a ticket about this (I don't remember which one at the moment).
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
As for authorship, I would say just listing yourself as the author because you did write the code, even if it is adapted from others. I don't think they should (or need to) have a copyright. Although it doesn't hurt to say it was based off another file, but I don't have a stake in this. Eric is best to comment on this.
</p>
</blockquote>
<p>
Done. I kept Eric in the copyrights. Is that appropriate?
</p>
</blockquote>
<p>
I think you can remove my name from the copyright, leaving just yours.
</p>
<p>
I'll have a look at the code soon.
</p>
<hr />
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=54237ef4815198c80a0f95e949a8debaa7aafd2f"><span class="icon"></span>54237ef</a></td><td><code>Pyflakes and Coverage</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=67cf8df97fe082f277fb54b1d3a0626f9617ac7f"><span class="icon"></span>67cf8df</a></td><td><code>Merge branch 'develop' into t/28159/vector_bundles</code>
</td></tr></table>
Ticketgh-DeRhamSourceSat, 05 Oct 2019 10:58:03 GMT
https://trac.sagemath.org/ticket/28159#comment:64
https://trac.sagemath.org/ticket/28159#comment:64
<p>
Thank you! I fixed pyflakes and coverage errors. I'm looking forward to your review! :)
</p>
TicketgitSun, 06 Oct 2019 08:05:32 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:65
https://trac.sagemath.org/ticket/28159#comment:65
<ul>
<li><strong>commit</strong>
changed from <em>67cf8df97fe082f277fb54b1d3a0626f9617ac7f</em> to <em>9832d02285f25bdb95a11efcb6e705938a36c3f5</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=9832d02285f25bdb95a11efcb6e705938a36c3f5"><span class="icon"></span>9832d02</a></td><td><code>Pyflakes and Coverage</code>
</td></tr></table>
TicketegourgoulhonMon, 07 Oct 2019 13:32:52 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:66
https://trac.sagemath.org/ticket/28159#comment:66
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
Thanks for completing the documentation.
</p>
<p>
With python3 Sage 9.0.beta0, I've got the following errors:
</p>
<pre class="wiki">----------------------------------------------------------------------
sage -t --long --warn-long 53.2 src/sage/categories/vector_bundles.py # 2 doctests failed
sage -t --long --warn-long 53.2 src/sage/manifolds/section.py # 2 doctests failed
sage -t --long --warn-long 53.2 src/sage/manifolds/chart_func.py # 1 doctest failed
sage -t --long --warn-long 53.2 src/sage/manifolds/section_module.py # 10 doctests failed
sage -t --long --warn-long 53.2 src/sage/manifolds/vector_bundle.py # 1 doctest failed
----------------------------------------------------------------------
</pre><p>
They appear on the patchbot report too.
</p>
<p>
Besides, there is a warning when building the documentation:
</p>
<pre class="wiki">[manifolds] <unknown>:1956: DeprecationWarning: invalid escape sequence \c
</pre>
TicketegourgoulhonMon, 07 Oct 2019 14:26:38 GMT
https://trac.sagemath.org/ticket/28159#comment:67
https://trac.sagemath.org/ticket/28159#comment:67
<p>
There is also some wrong indentation in the docstring of class <code>TopologicalVectorBundle</code>, starting from line 85 of <code>src/sage/manifolds/vector_bundle.py</code>. This alters the output of the html documentation.
</p>
TicketgitMon, 07 Oct 2019 14:36:11 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:68
https://trac.sagemath.org/ticket/28159#comment:68
<ul>
<li><strong>commit</strong>
changed from <em>9832d02285f25bdb95a11efcb6e705938a36c3f5</em> to <em>73e103efc0857f4b37b95ccc13c2edf9ce93f551</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=73e103efc0857f4b37b95ccc13c2edf9ce93f551"><span class="icon"></span>73e103e</a></td><td><code>Doctest errors fixed</code>
</td></tr></table>
Ticketgh-DeRhamSourceMon, 07 Oct 2019 14:36:31 GMT
https://trac.sagemath.org/ticket/28159#comment:69
https://trac.sagemath.org/ticket/28159#comment:69
<p>
This should be fixed now.
</p>
Ticketgh-DeRhamSourceMon, 07 Oct 2019 14:36:58 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:70
https://trac.sagemath.org/ticket/28159#comment:70
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
Ticketgh-DeRhamSourceMon, 07 Oct 2019 14:37:57 GMT
https://trac.sagemath.org/ticket/28159#comment:71
https://trac.sagemath.org/ticket/28159#comment:71
<p>
The error in <code>src/sage/manifolds/chart_func.py</code> should not belong to this ticket. I fixed it anyway.
</p>
TicketegourgoulhonMon, 07 Oct 2019 14:58:58 GMT
https://trac.sagemath.org/ticket/28159#comment:72
https://trac.sagemath.org/ticket/28159#comment:72
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:71" title="Comment 71">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
The error in <code>src/sage/manifolds/chart_func.py</code> should not belong to this ticket.
</p>
</blockquote>
<p>
Yes it does: there is no such error in Sage 9.0.beta0.
Anyway, thanks for the fixes.
</p>
TicketegourgoulhonWed, 09 Oct 2019 08:50:45 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:73
https://trac.sagemath.org/ticket/28159#comment:73
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
I still get some errors:
</p>
<pre class="wiki">----------------------------------------------------------------------
sage -t --long --warn-long 54.2 src/sage/manifolds/section.py # 1 doctest failed
sage -t --long --warn-long 54.2 src/sage/manifolds/chart_func.py # 2 doctests failed
sage -t --long --warn-long 54.2 src/sage/manifolds/vector_bundle.py # 1 doctest failed
sage -t --long --warn-long 54.2 src/sage/manifolds/section_module.py # 1 doctest failed
----------------------------------------------------------------------
</pre>
Ticketgh-DeRhamSourceWed, 09 Oct 2019 09:29:41 GMT
https://trac.sagemath.org/ticket/28159#comment:74
https://trac.sagemath.org/ticket/28159#comment:74
<p>
That's pretty strange:
</p>
<ul><li>For <code>section.py</code> I get no errors. What is your error message?
</li><li>The two <code>chart_func.py</code> errors are not related to this ticket. However, it seems a <code>#random</code> mark is needed here.
</li></ul><p>
The other issues get fixed soon. I'll change the status.
</p>
TicketgitWed, 09 Oct 2019 09:54:01 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:75
https://trac.sagemath.org/ticket/28159#comment:75
<ul>
<li><strong>commit</strong>
changed from <em>73e103efc0857f4b37b95ccc13c2edf9ce93f551</em> to <em>15ca7ea8d2bf9f20461fedf21a9ce1c27afc1eef</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=15ca7ea8d2bf9f20461fedf21a9ce1c27afc1eef"><span class="icon"></span>15ca7ea</a></td><td><code>SectionModule representation + doctest fixes</code>
</td></tr></table>
Ticketgh-DeRhamSourceWed, 09 Oct 2019 09:55:34 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:76
https://trac.sagemath.org/ticket/28159#comment:76
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
TicketegourgoulhonWed, 09 Oct 2019 12:23:55 GMT
https://trac.sagemath.org/ticket/28159#comment:77
https://trac.sagemath.org/ticket/28159#comment:77
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:74" title="Comment 74">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
That's pretty strange:
</p>
<ul><li>For <code>section.py</code> I get no errors. What is your error message?
</li></ul></blockquote>
<p>
Here it is:
</p>
<pre class="wiki">sage -t --long src/sage/manifolds/section.py
**********************************************************************
File "src/sage/manifolds/section.py", line 305, in sage.manifolds.section.Section._latex_
Failed example:
omega = E.section(name='\omega')
Expected nothing
Got:
doctest:warning
...
DeprecationWarning: invalid escape sequence \o
**********************************************************************
1 item had failures:
1 of 6 in sage.manifolds.section.Section._latex_
[735 tests, 1 failure, 29.78 s]
</pre><p>
This is because the raw string marker <code>r</code> is missing in front of <code>'\omega'</code>: the line 305 should read
</p>
<pre class="wiki"> sage: omega = E.section(name=r'\omega')
</pre><p>
Probably the reason why you don't get this error is that you are using Python 2 version of Sage, which is less strict in this respect (however, this is still an error, since the LaTeX output will not be correct). On general ground, I would advise you to use Python 3 version of Sage for development, since Sage 9.0 will be Python 3 based. Installing Python 3 Sage is pretty easy:
</p>
<pre class="wiki">git clone https://github.com/sagemath/sage.git
cd sage
git checkout develop
git pull
make configure
./configure --with-python=3
MAKE="make -j8" make
</pre>
Ticketgh-DeRhamSourceWed, 09 Oct 2019 12:37:19 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:78
https://trac.sagemath.org/ticket/28159#comment:78
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
Oh yeah, thank you! :) I am going to try a new test run after the python3 compilation. Till then, I keep this ticket on <em>needs_work</em>.
</p>
TicketegourgoulhonWed, 09 Oct 2019 12:57:15 GMT
https://trac.sagemath.org/ticket/28159#comment:79
https://trac.sagemath.org/ticket/28159#comment:79
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:78" title="Comment 78">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Oh yeah, thank you! :) I am going to try a new test run after the python3 compilation. Till then, I keep this ticket on <em>needs_work</em>.
</p>
</blockquote>
<p>
OK. On my (Python 3) side, the doctest error in <code>section.py</code> is the last remaining one. However, there are various errors in the html output of the documentation. For instance, in the section "Trivializations", some links are wrong (class names not clickable or expressions as <code>:class:`sage.manifolds.chart_func.ChartFunction</code> appearing in the output) and some <code>::</code> are missing before doctest blocs. Could you please fix those?
</p>
TicketgitWed, 09 Oct 2019 19:10:49 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:80
https://trac.sagemath.org/ticket/28159#comment:80
<ul>
<li><strong>commit</strong>
changed from <em>15ca7ea8d2bf9f20461fedf21a9ce1c27afc1eef</em> to <em>3a7d29be713fa75cd3be0f5a14789db12635b879</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=3a7d29be713fa75cd3be0f5a14789db12635b879"><span class="icon"></span>3a7d29b</a></td><td><code>Minor doctest fixes</code>
</td></tr></table>
Ticketgh-DeRhamSourceThu, 10 Oct 2019 11:54:52 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:81
https://trac.sagemath.org/ticket/28159#comment:81
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
<p>
Changed. Can you please check the docbuild for me?
</p>
TicketgitThu, 10 Oct 2019 15:54:14 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:82
https://trac.sagemath.org/ticket/28159#comment:82
<ul>
<li><strong>commit</strong>
changed from <em>3a7d29be713fa75cd3be0f5a14789db12635b879</em> to <em>116cbfa97a3acf0f53d252e1cea5dfa4f085f4b3</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=116cbfa97a3acf0f53d252e1cea5dfa4f085f4b3"><span class="icon"></span>116cbfa</a></td><td><code>SectionMOdule added to documentation</code>
</td></tr></table>
TicketgitThu, 10 Oct 2019 15:58:52 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:83
https://trac.sagemath.org/ticket/28159#comment:83
<ul>
<li><strong>commit</strong>
changed from <em>116cbfa97a3acf0f53d252e1cea5dfa4f085f4b3</em> to <em>078b13fd1729eed24521b4561947d8de4a92f2b9</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=078b13fd1729eed24521b4561947d8de4a92f2b9"><span class="icon"></span>078b13f</a></td><td><code>Section modules added to documentation</code>
</td></tr></table>
TicketegourgoulhonSat, 12 Oct 2019 21:45:48 GMTcommit, branch changed
https://trac.sagemath.org/ticket/28159#comment:84
https://trac.sagemath.org/ticket/28159#comment:84
<ul>
<li><strong>commit</strong>
changed from <em>078b13fd1729eed24521b4561947d8de4a92f2b9</em> to <em>12a86a4feef85048f97383363fd004f8d1961c44</em>
</li>
<li><strong>branch</strong>
changed from <em>u/gh-DeRhamSource/vector_bundles</em> to <em>public/manifolds/vector_bundles</em>
</li>
</ul>
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=12a86a4feef85048f97383363fd004f8d1961c44"><span class="icon"></span>12a86a4</a></td><td><code>Some fixes in the documentation of vector bundles</code>
</td></tr></table>
TicketegourgoulhonSat, 12 Oct 2019 21:54:37 GMT
https://trac.sagemath.org/ticket/28159#comment:85
https://trac.sagemath.org/ticket/28159#comment:85
<p>
I've gone through the documentation and have introduced some fixes in the above commit (<a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:84" title="Comment 84">comment:84</a>).
In particular, I've added an entry point for the category of vector bundles, as well as for fibers and fiber elements. I've also fixed hyperlinks, quote issues, missing <code>::</code> and the invalid escape sequence mentioned in <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:66" title="Comment 66">comment:66</a>. You can see the full list of changes <a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=12a86a4feef85048f97383363fd004f8d1961c44"><span class="icon"></span>here</a>. Do you agree with them?
</p>
Ticketgh-DeRhamSourceSat, 12 Oct 2019 22:16:49 GMT
https://trac.sagemath.org/ticket/28159#comment:86
https://trac.sagemath.org/ticket/28159#comment:86
<p>
Thank you so much for overlooking my code and your effort! There was still quite a lot to do.
</p>
<p>
There's just one thing in <code>differentiable/vector_bundle.py</code> around line 389 in the class <code>TensorBundle</code>:
</p>
<p>
"OUPUT" -> "OUTPUT"
</p>
<p>
Apart from that, I agree. :)
</p>
TicketgitSun, 13 Oct 2019 15:23:36 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:87
https://trac.sagemath.org/ticket/28159#comment:87
<ul>
<li><strong>commit</strong>
changed from <em>12a86a4feef85048f97383363fd004f8d1961c44</em> to <em>b8eba570bccc8db1553bde445342ac716539fa33</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=b8eba570bccc8db1553bde445342ac716539fa33"><span class="icon"></span>b8eba57</a></td><td><code>Slight changes in the documentation and code of vector bundles</code>
</td></tr></table>
TicketegourgoulhonSun, 13 Oct 2019 15:39:57 GMT
https://trac.sagemath.org/ticket/28159#comment:88
https://trac.sagemath.org/ticket/28159#comment:88
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:86" title="Comment 86">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
There's just one thing in <code>differentiable/vector_bundle.py</code> around line 389 in the class <code>TensorBundle</code>:
</p>
<p>
"OUPUT" -> "OUTPUT"
</p>
</blockquote>
<p>
Corrected in the above commit.
I've also introduced minor changes to improve the documentation (I hope).
</p>
<p>
I have also performed some changes in the code, replacing <code>self._dest_map</code> by <code>self._dest_map.restrict(domain)</code> in <code>DifferentiableVectorBundle.section()</code> and <code>DifferentiableVectorBundle.local_frame()</code>. Besides, I have made the latter return <code>NotImplementedError</code> when the tensor bundle is not the tangent bundle, because in such a case, a <code>VectorFrame</code> should not be returned. Do you agree? Shall we maintain the alias <code>vector_frame</code> for <code>local_frame</code>?
</p>
<p>
I have some question regarding the methods <code>atlas()</code>, <code>change_of_frame()</code>, <code>changes_of_frame</code>, <code>coframes()</code>, <code>frames()</code>, <code>set_change_of_frame()</code>, <code>transition()</code>, <code>transitions()</code> of class <code>DifferentiableVectorBundle</code>: are these methods really necessary? As currently implemented, they return only features of the base manifold. In particular, none of them is using the tensor type <code>(k, l)</code> of <code>self</code>.
</p>
Ticketgh-DeRhamSourceSun, 13 Oct 2019 16:43:55 GMT
https://trac.sagemath.org/ticket/28159#comment:89
https://trac.sagemath.org/ticket/28159#comment:89
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:88" title="Comment 88">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
I have also performed some changes in the code, replacing <code>self._dest_map</code> by <code>self._dest_map.restrict(domain)</code> in <code>DifferentiableVectorBundle.section()</code> and <code>DifferentiableVectorBundle.local_frame()</code>.
</p>
</blockquote>
<p>
Thank you! :)
</p>
<blockquote class="citation">
<p>
Besides, I have made the latter return <code>NotImplementedError</code> when the tensor bundle is not the tangent bundle, because in such a case, a <code>VectorFrame</code> should not be returned. Do you agree? Shall we maintain the alias <code>vector_frame</code> for <code>local_frame</code>?
</p>
</blockquote>
<p>
In this case, I do not agree. Altough actual frames of general tensor bundles are not implemented, vector frames <em>induce</em> them canonically. In the whole preexisting code, a vector frame is used for declaration and output of tensor fields. So, in my opinion, we should keep it this way (at least until general tensor product bundles are implemented). However, a corresponding remark in the documentation might be a good idea.
</p>
<blockquote class="citation">
<p>
I have some question regarding the methods <code>atlas()</code>, <code>change_of_frame()</code>, <code>changes_of_frame</code>, <code>coframes()</code>, <code>frames()</code>, <code>set_change_of_frame()</code>, <code>transition()</code>, <code>transitions()</code> of class <code>DifferentiableVectorBundle</code>: are these methods really necessary? As currently implemented, they return only features of the base manifold. In particular, none of them is using the tensor type <code>(k, l)</code> of <code>self</code>.
</p>
</blockquote>
<p>
The class <code>TopologicalVectorBundle</code> consists of these methods and <code>TensorBundle</code> inherits from it, so it must carry out these methods as well. But since all its features are already regulated through the manifold's framework (tensor bundles are induced by differentiable charts and their transitions), the vector bundle implementation is obsolete in this case and the methods must be overwritten. Likewise, a remark in the documentation might be useful, here. Do you have a better solution in mind?
</p>
<p>
<strong>Another thing:</strong> In a next step, I want to inherit <code>TensorField</code> from <code>Section</code> (and perhaps <code>VectorFrame</code> from <code>LocalFrame</code>) in order to minimize code redundancies. Keeping in mind, when my modifications in <a class="closed ticket" href="https://trac.sagemath.org/ticket/28519" title="task: Metaticket - Tensor Fields, Scalar Fields and Mixed Forms (closed: worksforme)">#28519</a> are finished, <code>Section</code> and <code>TrivialSection</code> should be adapted anyways.
</p>
TicketegourgoulhonSun, 13 Oct 2019 18:00:18 GMT
https://trac.sagemath.org/ticket/28159#comment:90
https://trac.sagemath.org/ticket/28159#comment:90
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:89" title="Comment 89">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
Besides, I have made the latter return <code>NotImplementedError</code> when the tensor bundle is not the tangent bundle, because in such a case, a <code>VectorFrame</code> should not be returned. Do you agree? Shall we maintain the alias <code>vector_frame</code> for <code>local_frame</code>?
</p>
</blockquote>
<p>
In this case, I do not agree. Altough actual frames of general tensor bundles are not implemented, vector frames <em>induce</em> them canonically. In the whole preexisting code, a vector frame is used for declaration and output of tensor fields. So, in my opinion, we should keep it this way (at least until general tensor product bundles are implemented).
</p>
</blockquote>
<p>
OK, I see.
</p>
<blockquote class="citation">
<p>
However, a corresponding remark in the documentation might be a good idea.
</p>
</blockquote>
<p>
Yes, there should be a warning that the returned object is actually not a bundle local frame, although it canonically determines it, as you say. The same thing holds for the method <code>trivialization()</code>, which returns a chart on the base manifold and actually not a trivialization in the sense of a vector bundle.
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
I have some question regarding the methods <code>atlas()</code>, <code>change_of_frame()</code>, <code>changes_of_frame</code>, <code>coframes()</code>, <code>frames()</code>, <code>set_change_of_frame()</code>, <code>transition()</code>, <code>transitions()</code> of class <code>DifferentiableVectorBundle</code>: are these methods really necessary? As currently implemented, they return only features of the base manifold. In particular, none of them is using the tensor type <code>(k, l)</code> of <code>self</code>.
</p>
</blockquote>
<p>
The class <code>TopologicalVectorBundle</code> consists of these methods and <code>TensorBundle</code> inherits from it, so it must carry out these methods as well. But since all its features are already regulated through the manifold's framework (tensor bundles are induced by differentiable charts and their transitions), the vector bundle implementation is obsolete in this case and the methods must be overwritten.
</p>
</blockquote>
<p>
OK.
</p>
<blockquote class="citation">
<p>
Likewise, a remark in the documentation might be useful, here.
</p>
</blockquote>
<p>
Indeed.
</p>
<blockquote class="citation">
<p>
Do you have a better solution in mind?
</p>
</blockquote>
<p>
Not at the moment.
</p>
<p>
I let you revert the <code>NotImplementedError</code> and add the relevent warnings.
</p>
<blockquote class="citation">
<p>
<strong>Another thing:</strong> In a next step, I want to inherit <code>TensorField</code> from <code>Section</code> (and perhaps <code>VectorFrame</code> from <code>LocalFrame</code>) in order to minimize code redundancies.
</p>
</blockquote>
<p>
Yes, I guess by "next step", you mean "in another ticket".
</p>
TicketgitSun, 13 Oct 2019 22:08:37 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:91
https://trac.sagemath.org/ticket/28159#comment:91
<ul>
<li><strong>commit</strong>
changed from <em>b8eba570bccc8db1553bde445342ac716539fa33</em> to <em>770e6999c8e3a0cb8c2f7264dd736628634ad606</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=770e6999c8e3a0cb8c2f7264dd736628634ad606"><span class="icon"></span>770e699</a></td><td><code>More detailed documentation</code>
</td></tr></table>
Ticketgh-DeRhamSourceSun, 13 Oct 2019 22:12:55 GMT
https://trac.sagemath.org/ticket/28159#comment:92
https://trac.sagemath.org/ticket/28159#comment:92
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:90" title="Comment 90">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
I let you revert the <code>NotImplementedError</code> and add the relevent warnings.
</p>
</blockquote>
<p>
Done.
</p>
<p>
Would you take a short look for typos etc?
</p>
<p>
Also, I've changed the name of the base space in the documentation of <code>TensorBundle</code> to <code>N</code> instead of <code>U</code>.
</p>
<p>
Do you agree so far? Any more suggestions?
</p>
<blockquote class="citation">
<p>
Yes, I guess by "next step", you mean "in another ticket".
</p>
</blockquote>
<p>
Of course. :)
</p>
Ticketgh-DeRhamSourceSun, 13 Oct 2019 22:16:53 GMT
https://trac.sagemath.org/ticket/28159#comment:93
https://trac.sagemath.org/ticket/28159#comment:93
<p>
Ah, I've also fixed the filter algorithms for the frames. (Unfortunately, I missed it in the commit message.)
</p>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 07:59:02 GMT
https://trac.sagemath.org/ticket/28159#comment:94
https://trac.sagemath.org/ticket/28159#comment:94
<p>
There are some more things I noticed. I'm going to take of it later this day.
</p>
TicketgitMon, 14 Oct 2019 09:30:02 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:95
https://trac.sagemath.org/ticket/28159#comment:95
<ul>
<li><strong>commit</strong>
changed from <em>770e6999c8e3a0cb8c2f7264dd736628634ad606</em> to <em>22e6666e641777f26eb165ba4623f6c28fa8e70b</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=22e6666e641777f26eb165ba4623f6c28fa8e70b"><span class="icon"></span>22e6666</a></td><td><code>Documentation improvements, i.e. frames along maps</code>
</td></tr></table>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 09:32:13 GMT
https://trac.sagemath.org/ticket/28159#comment:96
https://trac.sagemath.org/ticket/28159#comment:96
<p>
Please take a look. I made many modifications and fixes in the documentation.
</p>
TicketgitMon, 14 Oct 2019 11:53:56 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:97
https://trac.sagemath.org/ticket/28159#comment:97
<ul>
<li><strong>commit</strong>
changed from <em>22e6666e641777f26eb165ba4623f6c28fa8e70b</em> to <em>9ecd22a1f537f5392dbad999612c2d433dc2fabc</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=e2c535d7e3c0c044088e171eaa82e738c90a2342"><span class="icon"></span>e2c535d</a></td><td><code>Merge branch 'public/manifolds/vector_bundles' of git://trac.sagemath.org/sage into Sage 9.0.beta1</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=9ecd22a1f537f5392dbad999612c2d433dc2fabc"><span class="icon"></span>9ecd22a</a></td><td><code>Minor fix in the documentation of vector bundles</code>
</td></tr></table>
TicketegourgoulhonMon, 14 Oct 2019 11:57:59 GMT
https://trac.sagemath.org/ticket/28159#comment:98
https://trac.sagemath.org/ticket/28159#comment:98
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:96" title="Comment 96">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Please take a look. I made many modifications and fixes in the documentation.
</p>
</blockquote>
<p>
Thanks for the improvements in the documentation!
I've just pushed a minor fix in some <code>:meth:</code> hyperlink.
I think the ticket is ready to go.
</p>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 12:29:46 GMT
https://trac.sagemath.org/ticket/28159#comment:99
https://trac.sagemath.org/ticket/28159#comment:99
<p>
Just wait a moment. I have still some fixes, coming soon.
</p>
TicketgitMon, 14 Oct 2019 13:17:28 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:100
https://trac.sagemath.org/ticket/28159#comment:100
<ul>
<li><strong>commit</strong>
changed from <em>9ecd22a1f537f5392dbad999612c2d433dc2fabc</em> to <em>be0b7d0ff8b2ea739b97bc339e68a2403b74f4df</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=be0b7d0ff8b2ea739b97bc339e68a2403b74f4df"><span class="icon"></span>be0b7d0</a></td><td><code>further methods added + 'local_frame' invokes vector field module's method + doc improvements</code>
</td></tr></table>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 13:18:31 GMT
https://trac.sagemath.org/ticket/28159#comment:101
https://trac.sagemath.org/ticket/28159#comment:101
<p>
There we go. I had a short discussion with a collegue of mine in which I noticed some more things. But that should be it. Please take a short look.
</p>
TicketgitMon, 14 Oct 2019 13:26:12 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:102
https://trac.sagemath.org/ticket/28159#comment:102
<ul>
<li><strong>commit</strong>
changed from <em>be0b7d0ff8b2ea739b97bc339e68a2403b74f4df</em> to <em>f9810b77472ee3c16f4843aca27239e149e48ffa</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=f9810b77472ee3c16f4843aca27239e149e48ffa"><span class="icon"></span>f9810b7</a></td><td><code>unique_tag documentation added</code>
</td></tr></table>
TicketegourgoulhonMon, 14 Oct 2019 19:59:32 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:103
https://trac.sagemath.org/ticket/28159#comment:103
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
I've just discovered that, with this ticket branch, the <a class="ext-link" href="https://nbviewer.jupyter.org/github/sagemanifolds/SageManifolds/blob/master/Notebooks/SM_anti_de_Sitter.ipynb"><span class="icon"></span>AdS notebook</a> stalls at cell 92, which introduces the transition map from conformal coordinates to Poincaré coordinates. Running the notebook with Sage 9.0.beta1 shows no problem. So the issue is caused by some piece of code in this ticket.
</p>
<p>
Cell 92 seems to run forever, or at least to take a very long time. After 15 min or so, I halted it by Kernel -> Interrupt in the Jupyter menu. It appeared then that the code was stalled in line 1147 of <code>src/sage/manifolds/differentiable/chart.py</code>:
</p>
<pre class="wiki"> ch_basis_inv = ch_basis.inverse()
</pre><p>
So I strongly suspect the issue to be due to the change in the computation of inverse automorphism fields introduced in this ticket.
</p>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 20:16:44 GMT
https://trac.sagemath.org/ticket/28159#comment:104
https://trac.sagemath.org/ticket/28159#comment:104
<p>
This could be related to <a class="closed ticket" href="https://trac.sagemath.org/ticket/28189" title="enhancement: prefer "X in Fields()" rather than "X.is_field()" (closed: fixed)">#28189</a>, especially to the bug reported afterwards which has been partially fixed in <a class="closed ticket" href="https://trac.sagemath.org/ticket/28570" title="defect: fix matrix inversion over ZZ (closed: fixed)">#28570</a> (was this particular ticket merged in your testing?).
</p>
<p>
If there are no other options left, we can readd the SR enforcement for now. However, I suggest to construct a minimal example where this particular issue fails and report the error, since it seems to be a bigger problem deep in framework of matrices.
</p>
Ticketgh-DeRhamSourceMon, 14 Oct 2019 20:27:19 GMT
https://trac.sagemath.org/ticket/28159#comment:105
https://trac.sagemath.org/ticket/28159#comment:105
<p>
Wait. Why does the program compute the inverse anyway? This should not happen automatically, right? At least, in the next cell the inverse is set manually.
</p>
TicketegourgoulhonMon, 14 Oct 2019 20:47:49 GMT
https://trac.sagemath.org/ticket/28159#comment:106
https://trac.sagemath.org/ticket/28159#comment:106
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:105" title="Comment 105">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Wait. Why does the program compute the inverse anyway? This should not happen automatically, right? At least, in the next cell the inverse is set manually.
</p>
</blockquote>
<p>
It computes the inverse of the Jacobian matrix, not the inverse of the transition map.
</p>
Ticketgh-DeRhamSourceTue, 15 Oct 2019 09:34:46 GMT
https://trac.sagemath.org/ticket/28159#comment:107
https://trac.sagemath.org/ticket/28159#comment:107
<p>
Okay, I started some debugging process. And apparently, this has nothing to do with the aforementioned issue.
</p>
<p>
Since the algebra of scalar fields is not a field, the inversion algorithm is division free using adjugate matrices. I guess, this takes much more time than sophisticated algorithms on fields. My suggestion is to claim (at least for sage) that this algebra is a field (like it is done for the symbolic ring). I already started some testing and the computation time shrunk enormously. I've committed the changes.
</p>
TicketgitTue, 15 Oct 2019 09:34:49 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:108
https://trac.sagemath.org/ticket/28159#comment:108
<ul>
<li><strong>commit</strong>
changed from <em>f9810b77472ee3c16f4843aca27239e149e48ffa</em> to <em>aa7dbaf6055abab69c1cb43fb3ef709b9715b7ae</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=aa7dbaf6055abab69c1cb43fb3ef709b9715b7ae"><span class="icon"></span>aa7dbaf</a></td><td><code>'is_field' method added returning 'True'</code>
</td></tr></table>
Ticketgh-DeRhamSourceTue, 15 Oct 2019 10:55:19 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:109
https://trac.sagemath.org/ticket/28159#comment:109
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
TicketegourgoulhonWed, 16 Oct 2019 10:28:56 GMT
https://trac.sagemath.org/ticket/28159#comment:110
https://trac.sagemath.org/ticket/28159#comment:110
<p>
Just to tell that I am mostly AFK these days. I'll have a look at the ticket on Friday.
</p>
TicketegourgoulhonFri, 18 Oct 2019 14:20:39 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:111
https://trac.sagemath.org/ticket/28159#comment:111
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
I don't agree with the proposed fix for it goes against mathematical correctness: the method <code>is_field()</code> of <code>ScalarFieldAlgebra</code> shall not return <code>True</code>, the algebra of scalar fields being not a field (in particular, it is not an integral domain).
</p>
<p>
I would propose that you revert to the original version of <code>AutomorphismFieldParal.__invert__()</code> and open a new ticket to discus the removal of <code>SR</code> enforcement in the inversion of automorphism fields. After all, this is not directly connected to vector bundles and therefore does not belong to the current ticket.
</p>
Ticketgh-DeRhamSourceFri, 18 Oct 2019 15:02:27 GMT
https://trac.sagemath.org/ticket/28159#comment:112
https://trac.sagemath.org/ticket/28159#comment:112
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:111" title="Comment 111">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
I don't agree with the proposed fix for it goes against mathematical correctness: the method <code>is_field()</code> of <code>ScalarFieldAlgebra</code> shall not return <code>True</code>, the algebra of scalar fields being not a field (in particular, it is not an integral domain).
</p>
</blockquote>
<p>
Yeah, I feel not comfortable with this solution as well.
</p>
<blockquote class="citation">
<p>
I would propose that you revert to the original version of <code>AutomorphismFieldParal.__invert__()</code> and open a new ticket to discus the removal of <code>SR</code> enforcement in the inversion of automorphism fields. After all, this is not directly connected to vector bundles and therefore does not belong to the current ticket.
</p>
</blockquote>
<p>
This is not entirely true. If the vector bundle is similarly complicated as the example in the notebook, it runs into the same problem.
</p>
<p>
However, forcing sage to use the inversion algorithm for fields would be very nice!
</p>
<p>
I will open a ticket on that and suggest this in the sage-devel group. Meanwhile, I undo the SR enforcement at least for tensor fields.
</p>
TicketegourgoulhonFri, 18 Oct 2019 15:07:14 GMT
https://trac.sagemath.org/ticket/28159#comment:113
https://trac.sagemath.org/ticket/28159#comment:113
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:112" title="Comment 112">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:111" title="Comment 111">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
I don't agree with the proposed fix for it goes against mathematical correctness: the method <code>is_field()</code> of <code>ScalarFieldAlgebra</code> shall not return <code>True</code>, the algebra of scalar fields being not a field (in particular, it is not an integral domain).
</p>
</blockquote>
<p>
Yeah, I feel not comfortable with this solution as well.
</p>
</blockquote>
<p>
Besides, it generated a lot of doctest errors as you can check in the patchbot report.
</p>
<blockquote class="citation">
<p>
I will open a ticket on that and suggest this in the sage-devel group. Meanwhile, I undo the SR enforcement at least for tensor fields.
</p>
</blockquote>
<p>
OK, very good.
</p>
TicketgitFri, 18 Oct 2019 15:55:22 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:114
https://trac.sagemath.org/ticket/28159#comment:114
<ul>
<li><strong>commit</strong>
changed from <em>aa7dbaf6055abab69c1cb43fb3ef709b9715b7ae</em> to <em>39104657254e432c49bef596337fbae291ca5f77</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=4949f55e897ecc6e07830c5cbcf8f46f8f6c357f"><span class="icon"></span>4949f55</a></td><td><code>Revert "'is_field' method added returning 'True'"</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=39104657254e432c49bef596337fbae291ca5f77"><span class="icon"></span>3910465</a></td><td><code>SR enforcement removal undone</code>
</td></tr></table>
Ticketgh-DeRhamSourceFri, 18 Oct 2019 15:57:38 GMT
https://trac.sagemath.org/ticket/28159#comment:115
https://trac.sagemath.org/ticket/28159#comment:115
<p>
Committed. Please check, again.
</p>
Ticketgh-DeRhamSourceFri, 18 Oct 2019 16:24:59 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:116
https://trac.sagemath.org/ticket/28159#comment:116
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
TicketegourgoulhonFri, 18 Oct 2019 20:33:08 GMT
https://trac.sagemath.org/ticket/28159#comment:117
https://trac.sagemath.org/ticket/28159#comment:117
<p>
Again, I don't like so much the methods <code>is_unit()</code> added to the classes <code>ChartFunction</code> and <code>ScalarField</code>. They don't reflect fully the mathematical meaning of being a unit element of a ring. Do you really need these in this ticket? (I don't see clearly the connection with vector bundles).
</p>
<p>
Side note: <code>self.is_zero()</code>, as invoked in <code>ChartFunction.is_unit()</code>, can be very time consuming for large symbolic expressions, since it is trying to simplify the expression to zero. In this respect, the use of <code>is_trivial_zero()</code> in <code>ScalarField.is_unit()</code> is better.
</p>
TicketegourgoulhonFri, 18 Oct 2019 20:35:25 GMT
https://trac.sagemath.org/ticket/28159#comment:118
https://trac.sagemath.org/ticket/28159#comment:118
<p>
Btw, thanks for having moved the treatment of autormorphism field inverses to <a class="new ticket" href="https://trac.sagemath.org/ticket/28629" title="enhancement: Automorphism fields: remove SR enforcement when computing the inverse (new)">#28629</a>.
</p>
Ticketgh-DeRhamSourceFri, 18 Oct 2019 22:12:03 GMT
https://trac.sagemath.org/ticket/28159#comment:119
https://trac.sagemath.org/ticket/28159#comment:119
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:117" title="Comment 117">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
Again, I don't like so much the methods <code>is_unit()</code> added to the classes <code>ChartFunction</code> and <code>ScalarField</code>. They don't reflect fully the mathematical meaning of being a unit element of a ring. Do you really need these in this ticket? (I don't see clearly the connection with vector bundles).
</p>
</blockquote>
<p>
I'm not quite sure, but I think this method is mandatory when using the division free algorithm. And the division free algorithm is invoked when changes of frames are established. In general, for vector bundles, frames may be distributed over serveral chart domains, for which the SR enforcement method fails. So yes, this is related to this ticket. I'm not completely satisfied with this either. As soon as the issue in ticket <a class="new ticket" href="https://trac.sagemath.org/ticket/28629" title="enhancement: Automorphism fields: remove SR enforcement when computing the inverse (new)">#28629</a> is solved, this snippet can be deleted again. Should I add a comment in the code about this?
</p>
<blockquote class="citation">
<p>
Side note: <code>self.is_zero()</code>, as invoked in <code>ChartFunction.is_unit()</code>, can be very time consuming for large symbolic expressions, since it is trying to simplify the expression to zero. In this respect, the use of <code>is_trivial_zero()</code> in <code>ScalarField.is_unit()</code> is better.
</p>
</blockquote>
<p>
I agree, this is certainly better.
</p>
Ticketgh-DeRhamSourceFri, 18 Oct 2019 22:23:51 GMT
https://trac.sagemath.org/ticket/28159#comment:120
https://trac.sagemath.org/ticket/28159#comment:120
<p>
Furthermore, I would add a comment in the corresponding ticket, so that this code snippet gets not lost or forgotten.
</p>
<p>
What do you say?
</p>
Ticketgh-DeRhamSourceSat, 19 Oct 2019 12:31:43 GMTdescription changed
https://trac.sagemath.org/ticket/28159#comment:121
https://trac.sagemath.org/ticket/28159#comment:121
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/28159?action=diff&version=121">diff</a>)
</li>
</ul>
TicketgitSat, 19 Oct 2019 20:12:47 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:122
https://trac.sagemath.org/ticket/28159#comment:122
<ul>
<li><strong>commit</strong>
changed from <em>39104657254e432c49bef596337fbae291ca5f77</em> to <em>279f4283bd79bf0a964d971c8aed4d006e174813</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=8d7086a01ab7d70817b39ef5ea8f1ea5949d3d9d"><span class="icon"></span>8d7086a</a></td><td><code>'is_unit' modified</code>
</td></tr><tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=279f4283bd79bf0a964d971c8aed4d006e174813"><span class="icon"></span>279f428</a></td><td><code>Typo in doc</code>
</td></tr></table>
TicketgitSun, 20 Oct 2019 12:09:00 GMTcommit changed
https://trac.sagemath.org/ticket/28159#comment:123
https://trac.sagemath.org/ticket/28159#comment:123
<ul>
<li><strong>commit</strong>
changed from <em>279f4283bd79bf0a964d971c8aed4d006e174813</em> to <em>4ae4ca37508374ef9074cdbf9c650bb0d6ae8211</em>
</li>
</ul>
<p>
Branch pushed to git repo; I updated commit sha1. New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit/?id=4ae4ca37508374ef9074cdbf9c650bb0d6ae8211"><span class="icon"></span>4ae4ca3</a></td><td><code>default frame added to vector bundles + doctree modified</code>
</td></tr></table>
Ticketgh-DeRhamSourceSun, 20 Oct 2019 12:11:06 GMT
https://trac.sagemath.org/ticket/28159#comment:124
https://trac.sagemath.org/ticket/28159#comment:124
<p>
Since default frames are somehow obligatoric for further use, I added them. Please check. Sorry for that. But I think, this modification is very essential.
</p>
TicketegourgoulhonMon, 21 Oct 2019 09:45:11 GMT
https://trac.sagemath.org/ticket/28159#comment:125
https://trac.sagemath.org/ticket/28159#comment:125
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:119" title="Comment 119">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:117" title="Comment 117">egourgoulhon</a>:
</p>
<blockquote class="citation">
<p>
Again, I don't like so much the methods <code>is_unit()</code> added to the classes <code>ChartFunction</code> and <code>ScalarField</code>. They don't reflect fully the mathematical meaning of being a unit element of a ring. Do you really need these in this ticket? (I don't see clearly the connection with vector bundles).
</p>
</blockquote>
<p>
I'm not quite sure, but I think this method is mandatory when using the division free algorithm. And the division free algorithm is invoked when changes of frames are established. In general, for vector bundles, frames may be distributed over serveral chart domains, for which the SR enforcement method fails. So yes, this is related to this ticket. I'm not completely satisfied with this either. As soon as the issue in ticket <a class="new ticket" href="https://trac.sagemath.org/ticket/28629" title="enhancement: Automorphism fields: remove SR enforcement when computing the inverse (new)">#28629</a> is solved, this snippet can be deleted again.
</p>
</blockquote>
<p>
Thanks for your answer.
</p>
<blockquote class="citation">
<p>
Should I add a comment in the code about this?
</p>
</blockquote>
<p>
I've seen that you have done it; thanks.
</p>
TicketegourgoulhonMon, 21 Oct 2019 09:45:40 GMT
https://trac.sagemath.org/ticket/28159#comment:126
https://trac.sagemath.org/ticket/28159#comment:126
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/28159#comment:124" title="Comment 124">gh-DeRhamSource</a>:
</p>
<blockquote class="citation">
<p>
Since default frames are somehow obligatoric for further use, I added them. Please check. Sorry for that. But I think, this modification is very essential.
</p>
</blockquote>
<p>
LGTM.
</p>
TicketegourgoulhonMon, 21 Oct 2019 09:46:24 GMTstatus changed
https://trac.sagemath.org/ticket/28159#comment:127
https://trac.sagemath.org/ticket/28159#comment:127
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
Thank you very much for this very valuable addition to Sage!
</p>
TicketvbraunWed, 23 Oct 2019 22:58:08 GMTstatus, branch changed; resolution set
https://trac.sagemath.org/ticket/28159#comment:128
https://trac.sagemath.org/ticket/28159#comment:128
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>branch</strong>
changed from <em>public/manifolds/vector_bundles</em> to <em>4ae4ca37508374ef9074cdbf9c650bb0d6ae8211</em>
</li>
</ul>
Ticket