Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
OpenInterval, RealLineDeprecate global bindings, replace all uses in …
Browse files Browse the repository at this point in the history
…doctests from manifolds catalog
  • Loading branch information
Matthias Koeppe committed Jul 7, 2021
1 parent 6f3a9cc commit cd83629
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 94 deletions.
4 changes: 2 additions & 2 deletions src/sage/manifolds/all.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sage.misc.lazy_import import lazy_import
lazy_import('sage.manifolds.manifold', 'Manifold')
lazy_import('sage.manifolds.differentiable.examples.real_line', 'OpenInterval')
lazy_import('sage.manifolds.differentiable.examples.real_line', 'RealLine')
lazy_import('sage.manifolds.differentiable.examples.real_line', ('OpenInterval', 'RealLine'),
deprecation=31881)
lazy_import('sage.manifolds.differentiable.examples.euclidean', 'EuclideanSpace')
lazy_import('sage.manifolds', 'catalog', 'manifolds')
2 changes: 1 addition & 1 deletion src/sage/manifolds/continuous_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ def display(self, chart1=None, chart2=None):
A simple reparamentrization::
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: I = R.open_interval(0, 2*pi)
sage: J = R.open_interval(2*pi, 6*pi)
sage: h = J.continuous_map(I, ((t-2*pi)/2,), name='h')
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/differentiable/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def symbolic_velocities(self, left='D', right=None):
identifier.
sage: D = cart.symbolic_velocities(left='', right="_dot"); D
[X_dot, Y_dot, Z_dot]
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: canon_chart = R.default_chart()
sage: D = canon_chart.symbolic_velocities() ; D
[Dt]
Expand Down
22 changes: 11 additions & 11 deletions src/sage/manifolds/differentiable/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class DifferentiableCurve(DiffMap):
of the real number line (see
:class:`~sage.manifolds.differentiable.examples.real_line.RealLine`)::
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve({X: [sin(t), sin(2*t)/2]}, (t, 0, 2*pi), name='c') ; c
Curve c in the 2-dimensional differentiable manifold M
Expand Down Expand Up @@ -250,7 +250,7 @@ class DifferentiableCurve(DiffMap):
parametrized by its arc length `s`::
sage: E.<x,y,z> = EuclideanSpace()
sage: R.<s> = RealLine()
sage: R.<s> = manifolds.RealLine()
sage: C = E.curve((2*cos(s/3), 2*sin(s/3), sqrt(5)*s/3), (s, 0, 6*pi),
....: name='C')
Expand Down Expand Up @@ -356,7 +356,7 @@ def __init__(self, parent, coord_expression=None, name=None,
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: I = R.open_interval(0, 2*pi)
sage: c = Hom(I,M)({X: (cos(t), sin(2*t))}, name='c') ; c
Curve c in the 2-dimensional differentiable manifold M
Expand Down Expand Up @@ -396,7 +396,7 @@ def _repr_(self):
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: M.curve([cos(t), sin(2*t)], (t, 0, 2*pi))
Curve in the 2-dimensional differentiable manifold M
sage: M.curve([cos(t), sin(2*t)], (t, 0, 2*pi), name='c')
Expand All @@ -419,7 +419,7 @@ def __reduce__(self):
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve([cos(t), sin(2*t)], (t, 0, 2*pi))
sage: c.__reduce__()
(<class 'sage.manifolds.differentiable.manifold_homset.DifferentiableCurveSet_with_category.element_class'>,
Expand Down Expand Up @@ -474,7 +474,7 @@ def coord_expr(self, chart=None):
r == r *passed*
ph == arctan2(r*sin(ph), r*cos(ph)) **failed**
NB: a failed report can reflect a mere lack of simplification.
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = U.curve({c_spher: (1,t)}, (t, 0, 2*pi), name='c')
sage: c.coord_expr(c_spher)
(1, t)
Expand Down Expand Up @@ -510,7 +510,7 @@ def __call__(self, t, simplify=True):
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve([cos(t), sin(t)], (t, 0, 2*pi), name='c')
sage: c(0)
Point c(0) on the 2-dimensional differentiable manifold M
Expand Down Expand Up @@ -583,7 +583,7 @@ def tangent_vector_field(self, name=None, latex_name=None):
sage: M = Manifold(2, 'R^2')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve([cos(t), sin(t)], (t, 0, 2*pi), name='c')
sage: v = c.tangent_vector_field() ; v
Vector field c' along the Real interval (0, 2*pi) with values on
Expand Down Expand Up @@ -632,7 +632,7 @@ def tangent_vector_field(self, name=None, latex_name=None):
Then we define a curve (a loxodrome) by its expression in terms of
spherical coordinates and evaluate the tangent vector field::
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve({c_spher: [2*atan(exp(-t/10)), t]}, (t, -oo, +oo),
....: name='c') ; c
Curve c in the 2-dimensional differentiable manifold M
Expand Down Expand Up @@ -763,7 +763,7 @@ def plot(self, chart=None, ambient_coords=None, mapping=None, prange=None,
sage: R2 = Manifold(2, 'R^2')
sage: X.<x,y> = R2.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = R2.curve([sin(t), sin(2*t)/2], (t, 0, 2*pi), name='c')
sage: c.plot() # 2D plot
Graphics object consisting of 1 graphics primitive
Expand Down Expand Up @@ -984,7 +984,7 @@ def _graphics(self, plot_curve, ambient_coords, thickness=1,
sage: M = Manifold(2, 'R^2')
sage: X.<x,y> = M.chart()
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: c = M.curve([cos(t), sin(t)], (t, 0, 2*pi), name='c')
sage: graph = c._graphics([[1,2], [3,4]], [x,y])
sage: graph._objects[0].xdata == [1,3]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/differentiable/diff_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ def pushforward(self, tensor):
Pushforward of a vector field on the real line to the `\RR^3`, via a
helix embedding::
sage: R.<t> = RealLine()
sage: R.<t> = manifolds.RealLine()
sage: Psi = R.diff_map(R3, [cos(t), sin(t), t], name='Psi',
....: latex_name=r'\Psi')
sage: u = R.vector_field(name='u')
Expand Down
Loading

0 comments on commit cd83629

Please sign in to comment.