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

Commit f2ae50e

Browse files
committed
#30473: fix doctests outside sage/manifolds and sage/tensor/modules
1 parent d87d09b commit f2ae50e

File tree

5 files changed

+102
-100
lines changed

5 files changed

+102
-100
lines changed

src/sage/calculus/functional.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def derivative(f, *args, **kwds):
143143
sage: derivative(a)
144144
2-form da on the 2-dimensional differentiable manifold M
145145
sage: derivative(a).display()
146-
da = 2 dx/\dy
146+
da = 2 dxdy
147147
148148
"""
149149
try:

src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def lie_group(self, name='G', **kwds):
120120
sage: X = G.left_invariant_extension(2*p + 3*q, name='X'); X
121121
Vector field X on the Lie group G of Heisenberg algebra of rank 1 over Rational Field
122122
sage: X.at(G.one()).display()
123-
X = 2 d/dx_0 + 3 d/dx_1
123+
X = 2 ∂/∂x_0 + 3 ∂/∂x_1
124124
sage: X.display()
125-
X = 2 d/dx_0 + 3 d/dx_1 + (3/2*x_0 - x_1) d/dx_2
125+
X = 2 ∂/∂x_0 + 3 ∂/∂x_1 + (3/2*x_0 - x_1) ∂/∂x_2
126126
127127
.. SEEALSO::
128128

src/sage/geometry/polyhedron/base.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -11136,11 +11136,11 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien
1113611136
sage: A = triangle.affine_hull_manifold(name='A'); A
1113711137
2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3
1113811138
sage: A.embedding().display()
11139-
A --> E^3
11140-
(x0, x1) |--> (x, y, z) = (t0 + x0, t0 + x1, t0 - x0 - x1 + 1)
11139+
A E^3
11140+
(x0, x1) (x, y, z) = (t0 + x0, t0 + x1, t0 - x0 - x1 + 1)
1114111141
sage: A.embedding().inverse().display()
11142-
E^3 --> A
11143-
(x, y, z) |--> (x0, x1) = (x, y)
11142+
E^3 A
11143+
(x, y, z) (x0, x1) = (x, y)
1114411144
sage: A.adapted_chart()
1114511145
[Chart (E^3, (x0_E3, x1_E3, t0_E3))]
1114611146
sage: A.normal().display()
@@ -11155,11 +11155,11 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien
1115511155
sage: A = triangle.affine_hull_manifold(name='A', orthogonal=True); A
1115611156
2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3
1115711157
sage: A.embedding().display()
11158-
A --> E^3
11159-
(x0, x1) |--> (x, y, z) = (t0 - 1/2*x0 - 1/3*x1 + 1, t0 + 1/2*x0 - 1/3*x1, t0 + 2/3*x1)
11158+
A E^3
11159+
(x0, x1) (x, y, z) = (t0 - 1/2*x0 - 1/3*x1 + 1, t0 + 1/2*x0 - 1/3*x1, t0 + 2/3*x1)
1116011160
sage: A.embedding().inverse().display()
11161-
E^3 --> A
11162-
(x, y, z) |--> (x0, x1) = (-x + y + 1, -1/2*x - 1/2*y + z + 1/2)
11161+
E^3 A
11162+
(x, y, z) (x0, x1) = (-x + y + 1, -1/2*x - 1/2*y + z + 1/2)
1116311163
1116411164
Arrangement of affine hull of facets::
1116511165

src/sage/groups/lie_gps/nilpotent_lie_group.py

+31-29
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ class NilpotentLieGroup(Group, DifferentiableManifold):
152152
sage: exp1_frame = G.chart_exp1().frame()
153153
sage: exp2_frame = G.chart_exp2().frame()
154154
sage: X[0].display(exp1_frame)
155-
X_0 = d/dx_0 - 1/2*x_1 d/dx_2
155+
X_0 = ∂/∂x_0 - 1/2*x_1 ∂/∂x_2
156156
sage: X[0].display(exp2_frame)
157-
X_0 = d/dy_0
157+
X_0 = ∂/∂y_0
158158
sage: X[1].display(exp1_frame)
159-
X_1 = d/dx_1 + 1/2*x_0 d/dx_2
159+
X_1 = ∂/∂x_1 + 1/2*x_0 ∂/∂x_2
160160
sage: X[1].display(exp2_frame)
161-
X_1 = d/dy_1 + x_0 d/dy_2
161+
X_1 = ∂/∂y_1 + x_0 ∂/∂y_2
162162
163163
Defining a left translation by a generic point::
164164
@@ -167,11 +167,13 @@ class NilpotentLieGroup(Group, DifferentiableManifold):
167167
sage: L_g = G.left_translation(g); L_g
168168
Diffeomorphism of the Lie group G of Heisenberg algebra of rank 1 over Rational Field
169169
sage: L_g.display()
170-
G --> G
171-
(x_0, x_1, x_2) |--> (a + x_0, b + x_1, -1/2*b*x_0 + 1/2*a*x_1 + c + x_2)
172-
(x_0, x_1, x_2) |--> (y_0, y_1, y_2) = (a + x_0, b + x_1, 1/2*a*b + 1/2*(2*a + x_0)*x_1 + c + x_2)
173-
(y_0, y_1, y_2) |--> (x_0, x_1, x_2) = (a + y_0, b + y_1, -1/2*b*y_0 + 1/2*(a - y_0)*y_1 + c + y_2)
174-
(y_0, y_1, y_2) |--> (a + y_0, b + y_1, 1/2*a*b + a*y_1 + c + y_2)
170+
G → G
171+
(x_0, x_1, x_2) ↦ (a + x_0, b + x_1, -1/2*b*x_0 + 1/2*a*x_1 + c + x_2)
172+
(x_0, x_1, x_2) ↦ (y_0, y_1, y_2) = (a + x_0, b + x_1,
173+
1/2*a*b + 1/2*(2*a + x_0)*x_1 + c + x_2)
174+
(y_0, y_1, y_2) ↦ (x_0, x_1, x_2) = (a + y_0, b + y_1,
175+
-1/2*b*y_0 + 1/2*(a - y_0)*y_1 + c + y_2)
176+
(y_0, y_1, y_2) ↦ (a + y_0, b + y_1, 1/2*a*b + a*y_1 + c + y_2)
175177
176178
Verifying the left-invariance of the left-invariant frame::
177179
@@ -189,10 +191,10 @@ class NilpotentLieGroup(Group, DifferentiableManifold):
189191
sage: X_L = G.left_invariant_extension(p + 3*q); X_L
190192
Vector field p1 + 3*q1 on the Lie group G of Heisenberg algebra of rank 1 over Rational Field
191193
sage: X_L.display(exp1_frame)
192-
p1 + 3*q1 = d/dx_0 + 3 d/dx_1 + (3/2*x_0 - 1/2*x_1) d/dx_2
194+
p1 + 3*q1 = ∂/∂x_0 + 3 ∂/∂x_1 + (3/2*x_0 - 1/2*x_1) ∂/∂x_2
193195
sage: X_R = G.right_invariant_extension(p + 3*q)
194196
sage: X_R.display(exp1_frame)
195-
p1 + 3*q1 = d/dx_0 + 3 d/dx_1 + (-3/2*x_0 + 1/2*x_1) d/dx_2
197+
p1 + 3*q1 = ∂/∂x_0 + 3 ∂/∂x_1 + (-3/2*x_0 + 1/2*x_1) ∂/∂x_2
196198
197199
The nilpotency step of the Lie group is the nilpotency step of its algebra.
198200
Nilpotency for Lie groups means that group commutators that are longer than
@@ -503,16 +505,16 @@ def left_translation(self, g):
503505
sage: L_g = G.left_translation(g); L_g
504506
Diffeomorphism of the Lie group G of Heisenberg algebra of rank 1 over Rational Field
505507
sage: L_g.display(chart1=G.chart_exp1(), chart2=G.chart_exp1())
506-
G --> G
507-
(x_0, x_1, x_2) |--> (x_0 + 1, x_1, 1/2*x_1 + x_2)
508+
G G
509+
(x_0, x_1, x_2) (x_0 + 1, x_1, 1/2*x_1 + x_2)
508510
509511
Left translation by a generic element::
510512
511513
sage: h = G.point([var('a'), var('b'), var('c')])
512514
sage: L_h = G.left_translation(h)
513515
sage: L_h.display(chart1=G.chart_exp1(), chart2=G.chart_exp1())
514-
G --> G
515-
(x_0, x_1, x_2) |--> (a + x_0, b + x_1, -1/2*b*x_0 + 1/2*a*x_1 + c + x_2)
516+
G G
517+
(x_0, x_1, x_2) (a + x_0, b + x_1, -1/2*b*x_0 + 1/2*a*x_1 + c + x_2)
516518
"""
517519
chart = self.default_chart()
518520
x = self.point(chart[:])
@@ -537,11 +539,11 @@ def left_invariant_frame(self, **kwds):
537539
Vector frame (G, (X_1,X_2,X_12))
538540
sage: coord_frame = G.chart_exp1().frame()
539541
sage: livf[0].display(coord_frame)
540-
X_1 = d/dx_1 - 1/2*x_2 d/dx_12
542+
X_1 = ∂/∂x_1 - 1/2*x_2 ∂/∂x_12
541543
sage: livf[1].display(coord_frame)
542-
X_2 = d/dx_2 + 1/2*x_1 d/dx_12
544+
X_2 = ∂/∂x_2 + 1/2*x_1 ∂/∂x_12
543545
sage: livf[2].display(coord_frame)
544-
X_12 = d/dx_12
546+
X_12 = ∂/∂x_12
545547
546548
Examples of custom labeling for the frame::
547549
@@ -583,7 +585,7 @@ def left_invariant_extension(self, X, name=None):
583585
sage: X = H.left_invariant_extension(p); X
584586
Vector field p1 on the Lie group H of Heisenberg algebra of rank 1 over Rational Field
585587
sage: X.display(H.chart_exp1().frame())
586-
p1 = d/dx_0 - 1/2*x_1 d/dx_2
588+
p1 = ∂/∂x_0 - 1/2*x_1 ∂/∂x_2
587589
588590
Default vs. custom naming for the invariant vector field::
589591
@@ -625,16 +627,16 @@ def right_translation(self, g):
625627
sage: R_g = G.right_translation(g); R_g
626628
Diffeomorphism of the Lie group G of Heisenberg algebra of rank 1 over Rational Field
627629
sage: R_g.display(chart1=G.chart_exp1(), chart2=G.chart_exp1())
628-
G --> G
629-
(x_0, x_1, x_2) |--> (x_0 + 1, x_1, -1/2*x_1 + x_2)
630+
G G
631+
(x_0, x_1, x_2) (x_0 + 1, x_1, -1/2*x_1 + x_2)
630632
631633
Right translation by a generic element::
632634
633635
sage: h = G.point([var('a'), var('b'), var('c')])
634636
sage: R_h = G.right_translation(h)
635637
sage: R_h.display(chart1=G.chart_exp1(), chart2=G.chart_exp1())
636-
G --> G
637-
(x_0, x_1, x_2) |--> (a + x_0, b + x_1, 1/2*b*x_0 - 1/2*a*x_1 + c + x_2)
638+
G G
639+
(x_0, x_1, x_2) (a + x_0, b + x_1, 1/2*b*x_0 - 1/2*a*x_1 + c + x_2)
638640
"""
639641
chart = self.default_chart()
640642
x = self.point(chart[:])
@@ -659,11 +661,11 @@ def right_invariant_frame(self, **kwds):
659661
Vector frame (G, (XR_1,XR_2,XR_12))
660662
sage: coord_frame = G.chart_exp1().frame()
661663
sage: rivf[0].display(coord_frame)
662-
XR_1 = d/dx_1 + 1/2*x_2 d/dx_12
664+
XR_1 = ∂/∂x_1 + 1/2*x_2 ∂/∂x_12
663665
sage: rivf[1].display(coord_frame)
664-
XR_2 = d/dx_2 - 1/2*x_1 d/dx_12
666+
XR_2 = ∂/∂x_2 - 1/2*x_1 ∂/∂x_12
665667
sage: rivf[2].display(coord_frame)
666-
XR_12 = d/dx_12
668+
XR_12 = ∂/∂x_12
667669
668670
Examples of custom labeling for the frame::
669671
@@ -705,7 +707,7 @@ def right_invariant_extension(self, X, name=None):
705707
sage: X = H.right_invariant_extension(p); X
706708
Vector field p1 on the Lie group H of Heisenberg algebra of rank 1 over Rational Field
707709
sage: X.display(H.chart_exp1().frame())
708-
p1 = d/dx_0 + 1/2*x_1 d/dx_2
710+
p1 = ∂/∂x_0 + 1/2*x_1 ∂/∂x_2
709711
710712
Default vs. custom naming for the invariant vector field::
711713
@@ -747,8 +749,8 @@ def conjugation(self, g):
747749
sage: C_g = G.conjugation(g); C_g
748750
Diffeomorphism of the Lie group G of Heisenberg algebra of rank 1 over Rational Field
749751
sage: C_g.display(chart1=G.chart_exp1(), chart2=G.chart_exp1())
750-
G --> G
751-
(x_0, x_1, x_2) |--> (x_0, x_1, -b*x_0 + a*x_1 + x_2)
752+
G G
753+
(x_0, x_1, x_2) (x_0, x_1, -b*x_0 + a*x_1 + x_2)
752754
"""
753755
chart = self.default_chart()
754756
x = self.point(chart[:])

0 commit comments

Comments
 (0)