Opened 4 months ago

Last modified 3 months ago

#30290 new defect

Implement better composition of curves

Reported by: tscrim Owned by:
Priority: major Milestone: sage-9.3
Component: manifolds Keywords:
Cc: egourgoulhon, gh-mjungmath Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by tscrim)

I would like to reparameterize a curve, but the natural way I wanted to try, I cannot.

sage: E.<x,y,z> = EuclideanSpace(3)
sage: R.<t> = RealLine()
sage: alpha = E.curve((cos(t), sin(t), t/(2*pi)), (t, 0, 2*pi))
sage: I = alpha.domain()
sage: J = R.open_interval(2*pi, 6*pi)
sage: h = J.continuous_map(I, ((t-2*pi)/2,), name='h')
sage: h.display()  # This is trac #30289
h: (2*pi, 6*pi) --> (0, 2*pi)
   t |-->
sage: alpha * h
ValueError                                Traceback (most recent call last)
<ipython-input-86-2c9a47c13590> in <module>()
----> 1 alpha * h

/home/uqtscrim/sage/local/lib/python3.7/site-packages/sage/categories/map.pyx in (build/cythonized/sage/categories/map.c:7558)()
    895         if right.codomain() != self.domain():
    896             raise TypeError("self (=%s) domain must equal right (=%s) codomain" % (self, right))
--> 897         return self._composition(right)
    899     def _composition(self, right):

/home/uqtscrim/sage/local/lib/python3.7/site-packages/sage/categories/map.pyx in (build/cythonized/sage/categories/map.c:7729)()
    935         """
    936         category = self.category_for()._meet_(right.category_for())
--> 937         H = homset.Hom(right.domain(), self._codomain, category)
    938         return self._composition_(right, H)

/home/uqtscrim/sage/local/lib/python3.7/site-packages/sage/categories/ in Hom(X, Y, category, check)
    417                     # available for the following error message. It simply
    418                     # belongs to the wrong category.
--> 419                     raise ValueError("{} is not in {}".format(O, category))
    421         # Construct H

ValueError: Euclidean space E^3 is not in Join of Category of subobjects of sets and Category of smooth manifolds over Real Field with 53 bits of precision

I can hack around this by doing

sage: beta = alpha._composition_(h, Hom(J, E))
sage: beta.display()
(2*pi, 6*pi) --> E^3
   t |--> (x, y, z) = (-cos(1/2*t), sin(1/2*t), 1/4*(2*pi - t)/pi)

but this is less than ideal.

Change History (2)

comment:1 Changed 4 months ago by tscrim

  • Description modified (diff)

comment:2 Changed 3 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3
Note: See TracTickets for help on using tickets.