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

Commit 141ccb5

Browse files
author
Matthias Koeppe
committed
Merge #32009
2 parents 741fd2e + bf62543 commit 141ccb5

File tree

91 files changed

+4176
-2919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4176
-2919
lines changed

src/doc/en/reference/misc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Formatted Output
168168
sage/typeset/character_art_factory
169169
sage/typeset/ascii_art
170170
sage/typeset/unicode_art
171+
sage/typeset/unicode_characters
171172
sage/misc/repr
172173
sage/misc/sage_input
173174
sage/misc/table

src/doc/en/reference/sets/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Set Constructions
1515
sage/sets/set_from_iterator
1616
sage/sets/finite_enumerated_set
1717
sage/sets/recursively_enumerated_set
18+
sage/sets/condition_set
1819
sage/sets/finite_set_maps
1920
sage/sets/finite_set_map_cy
2021
sage/sets/totally_ordered_finite_set

src/doc/en/thematic_tutorials/vector_calculus/vector_calc_advanced.rst

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ while there are five vector frames defined on `\mathbb{E}^3`::
5858

5959
sage: E.frames()
6060
[Coordinate frame (E^3, (e_x,e_y,e_z)),
61-
Coordinate frame (E^3, (d/dr,d/dth,d/dph)),
61+
Coordinate frame (E^3, (∂/∂r,∂/∂th,∂/∂ph)),
6262
Vector frame (E^3, (e_r,e_th,e_ph)),
63-
Coordinate frame (E^3, (d/drh,d/dph,d/dz)),
63+
Coordinate frame (E^3, (∂/∂rh,∂/∂ph,∂/∂z)),
6464
Vector frame (E^3, (e_rh,e_ph,e_z))]
6565

6666
Indeed, there are two frames associated with each of the three coordinate
@@ -85,9 +85,9 @@ On the other side, the coordinate frames `\left(\frac{\partial}{\partial r},
8585
coordinate charts::
8686

8787
sage: spherical.frame()
88-
Coordinate frame (E^3, (d/dr,d/dth,d/dph))
88+
Coordinate frame (E^3, (∂/∂r,∂/∂th,∂/∂ph))
8989
sage: cylindrical.frame()
90-
Coordinate frame (E^3, (d/drh,d/dph,d/dz))
90+
Coordinate frame (E^3, (∂/∂rh,∂/∂ph,∂/∂z))
9191

9292

9393
Charts as maps `\mathbb{E}^3 \rightarrow \mathbb{R}^3`
@@ -128,7 +128,7 @@ The default metric tensor of `\mathbb{E}^3` is::
128128
sage: g
129129
Riemannian metric g on the Euclidean space E^3
130130
sage: g.display()
131-
g = dx*dx + dy*dy + dz*dz
131+
g = dxdx + dydy + dzdz
132132
sage: g[:]
133133
[1 0 0]
134134
[0 1 0]
@@ -139,7 +139,7 @@ Cartesian one. Of course, we may ask for display with respect to other
139139
frames::
140140

141141
sage: g.display(spherical_frame)
142-
g = e^r*e^r + e^th*e^th + e^ph*e^ph
142+
g = e^re^r + e^the^th + e^phe^ph
143143
sage: g[spherical_frame, :]
144144
[1 0 0]
145145
[0 1 0]
@@ -159,20 +159,20 @@ contrary, in the coordinate frame
159159
which is not orthonormal, some components differ from 0 or 1::
160160

161161
sage: g.display(spherical.frame())
162-
g = dr*dr + (x^2 + y^2 + z^2) dth*dth + (x^2 + y^2) dph*dph
162+
g = drdr + (x^2 + y^2 + z^2) dthdth + (x^2 + y^2) dphdph
163163

164164
Note that the components are expressed in terms of the default chart, namely
165165
the Cartesian one. To have them displayed in terms of the spherical chart, we
166166
have to provide the latter as the second argument of the method
167167
``display()``::
168168

169169
sage: g.display(spherical.frame(), spherical)
170-
g = dr*dr + r^2 dth*dth + r^2*sin(th)^2 dph*dph
170+
g = drdr + r^2 dthdth + r^2*sin(th)^2 dphdph
171171

172172
Since SageMath 8.8, a shortcut is::
173173

174174
sage: g.display(spherical)
175-
g = dr*dr + r^2 dth*dth + r^2*sin(th)^2 dph*dph
175+
g = drdr + r^2 dthdth + r^2*sin(th)^2 dphdph
176176

177177
The matrix view of the components is obtained via the square bracket operator::
178178

@@ -184,9 +184,9 @@ The matrix view of the components is obtained via the square bracket operator::
184184
Similarly, for cylindrical coordinates, we have::
185185

186186
sage: g.display(cylindrical_frame)
187-
g = e^rh*e^rh + e^ph*e^ph + e^z*e^z
187+
g = e^rhe^rh + e^phe^ph + e^ze^z
188188
sage: g.display(cylindrical)
189-
g = drh*drh + rh^2 dph*dph + dz*dz
189+
g = drhdrh + rh^2 dphdph + dzdz
190190
sage: g[cylindrical.frame(), :, cylindrical]
191191
[ 1 0 0]
192192
[ 0 rh^2 0]
@@ -232,38 +232,38 @@ Levi-Civita tensor (also called *volume form*) associated with `g`
232232
sage: epsilon is E.volume_form()
233233
True
234234
sage: epsilon.display()
235-
epsilon = dx/\dy/\dz
235+
epsilon = dx∧dy∧dz
236236
sage: epsilon.display(spherical)
237-
epsilon = r^2*sin(th) dr/\dth/\dph
237+
epsilon = r^2*sin(th) drdthdph
238238
sage: epsilon.display(cylindrical)
239-
epsilon = rh drh/\dph/\dz
239+
epsilon = rh drhdphdz
240240

241241
Checking that all orthonormal frames introduced above are right-handed::
242242

243243
sage: ex, ey, ez = E.cartesian_frame()[:]
244244
sage: epsilon(ex, ey, ez).display()
245-
epsilon(e_x,e_y,e_z): E^3 --> R
246-
(x, y, z) |--> 1
247-
(r, th, ph) |--> 1
248-
(rh, ph, z) |--> 1
245+
epsilon(e_x,e_y,e_z): E^3 → ℝ
246+
(x, y, z) 1
247+
(r, th, ph) 1
248+
(rh, ph, z) 1
249249

250250
::
251251

252252
sage: epsilon(*spherical_frame)
253253
Scalar field epsilon(e_r,e_th,e_ph) on the Euclidean space E^3
254254
sage: epsilon(*spherical_frame).display()
255-
epsilon(e_r,e_th,e_ph): E^3 --> R
256-
(x, y, z) |--> 1
257-
(r, th, ph) |--> 1
258-
(rh, ph, z) |--> 1
255+
epsilon(e_r,e_th,e_ph): E^3 → ℝ
256+
(x, y, z) 1
257+
(r, th, ph) 1
258+
(rh, ph, z) 1
259259

260260
::
261261

262262
sage: epsilon(*cylindrical_frame).display()
263-
epsilon(e_rh,e_ph,e_z): E^3 --> R
264-
(x, y, z) |--> 1
265-
(r, th, ph) |--> 1
266-
(rh, ph, z) |--> 1
263+
epsilon(e_rh,e_ph,e_z): E^3 → ℝ
264+
(x, y, z) 1
265+
(r, th, ph) 1
266+
(rh, ph, z) 1
267267

268268

269269
Vector fields as derivations
@@ -273,20 +273,20 @@ Let `f` be a scalar field on `\mathbb{E}^3`::
273273

274274
sage: f = E.scalar_field(x^2+y^2 - z^2, name='f')
275275
sage: f.display()
276-
f: E^3 --> R
277-
(x, y, z) |--> x^2 + y^2 - z^2
278-
(r, th, ph) |--> -2*r^2*cos(th)^2 + r^2
279-
(rh, ph, z) |--> rh^2 - z^2
276+
f: E^3 → ℝ
277+
(x, y, z) x^2 + y^2 - z^2
278+
(r, th, ph) -2*r^2*cos(th)^2 + r^2
279+
(rh, ph, z) rh^2 - z^2
280280

281281
Vector fields act as derivations on scalar fields::
282282

283283
sage: v(f)
284284
Scalar field v(f) on the Euclidean space E^3
285285
sage: v(f).display()
286-
v(f): E^3 --> R
287-
(x, y, z) |--> -2*z^3
288-
(r, th, ph) |--> -2*r^3*cos(th)^3
289-
(rh, ph, z) |--> -2*z^3
286+
v(f): E^3 → ℝ
287+
(x, y, z) -2*z^3
288+
(r, th, ph) -2*r^3*cos(th)^3
289+
(rh, ph, z) -2*z^3
290290
sage: v(f) == v.dot(f.gradient())
291291
True
292292

@@ -346,9 +346,9 @@ vector frames defined on `\mathbb{E}^3`::
346346

347347
sage: XE.bases()
348348
[Coordinate frame (E^3, (e_x,e_y,e_z)),
349-
Coordinate frame (E^3, (d/dr,d/dth,d/dph)),
349+
Coordinate frame (E^3, (∂/∂r,∂/∂th,∂/∂ph)),
350350
Vector frame (E^3, (e_r,e_th,e_ph)),
351-
Coordinate frame (E^3, (d/drh,d/dph,d/dz)),
351+
Coordinate frame (E^3, (∂/∂rh,∂/∂ph,∂/∂z)),
352352
Vector frame (E^3, (e_rh,e_ph,e_z))]
353353

354354

@@ -385,9 +385,9 @@ The bases on `T_p\mathbb{E}^3` are inherited from the vector frames of
385385

386386
sage: Tp.bases()
387387
[Basis (e_x,e_y,e_z) on the Tangent space at Point p on the Euclidean space E^3,
388-
Basis (d/dr,d/dth,d/dph) on the Tangent space at Point p on the Euclidean space E^3,
388+
Basis (∂/∂r,∂/∂th,∂/∂ph) on the Tangent space at Point p on the Euclidean space E^3,
389389
Basis (e_r,e_th,e_ph) on the Tangent space at Point p on the Euclidean space E^3,
390-
Basis (d/drh,d/dph,d/dz) on the Tangent space at Point p on the Euclidean space E^3,
390+
Basis (∂/∂rh,∂/∂ph,∂/∂z) on the Tangent space at Point p on the Euclidean space E^3,
391391
Basis (e_rh,e_ph,e_z) on the Tangent space at Point p on the Euclidean space E^3]
392392

393393
For instance, we have::

src/doc/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ which admits ``dot()`` as a shortcut alias::
152152
sage: s
153153
Scalar field u.v on the Euclidean space E^3
154154
sage: s.display()
155-
u.v: E^3 --> R
156-
(x, y, z) |--> -y*u_x(x, y, z) + x*u_y(x, y, z) + sin(x*y*z)*u_z(x, y, z)
155+
u.v: E^3 → ℝ
156+
(x, y, z) -y*u_x(x, y, z) + x*u_y(x, y, z) + sin(x*y*z)*u_z(x, y, z)
157157

158158
It maps points of `\mathbb{E}^3` to real numbers::
159159

@@ -181,8 +181,8 @@ It is a scalar field on `\mathbb{E}^3`::
181181
sage: s
182182
Scalar field |u| on the Euclidean space E^3
183183
sage: s.display()
184-
|u|: E^3 --> R
185-
(x, y, z) |--> sqrt(u_x(x, y, z)^2 + u_y(x, y, z)^2 + u_z(x, y, z)^2)
184+
|u|: E^3 → ℝ
185+
(x, y, z) sqrt(u_x(x, y, z)^2 + u_y(x, y, z)^2 + u_z(x, y, z)^2)
186186
sage: s.expr()
187187
sqrt(u_x(x, y, z)^2 + u_y(x, y, z)^2 + u_z(x, y, z)^2)
188188

@@ -272,8 +272,8 @@ function of `(x,y,z)`::
272272

273273
sage: F = E.scalar_field(function('f')(x,y,z), name='F')
274274
sage: F.display()
275-
F: E^3 --> R
276-
(x, y, z) |--> f(x, y, z)
275+
F: E^3 → ℝ
276+
(x, y, z) f(x, y, z)
277277

278278
The value of `F` at a point::
279279

@@ -287,8 +287,8 @@ The gradient of `F`::
287287
sage: grad(F).display()
288288
grad(F) = d(f)/dx e_x + d(f)/dy e_y + d(f)/dz e_z
289289
sage: norm(grad(F)).display()
290-
|grad(F)|: E^3 --> R
291-
(x, y, z) |--> sqrt((d(f)/dx)^2 + (d(f)/dy)^2 + (d(f)/dz)^2)
290+
|grad(F)|: E^3 → ℝ
291+
(x, y, z) sqrt((d(f)/dx)^2 + (d(f)/dy)^2 + (d(f)/dz)^2)
292292

293293

294294
Divergence
@@ -298,8 +298,8 @@ The divergence of the vector field `u`::
298298

299299
sage: s = div(u)
300300
sage: s.display()
301-
div(u): E^3 --> R
302-
(x, y, z) |--> d(u_x)/dx + d(u_y)/dy + d(u_z)/dz
301+
div(u): E^3 → ℝ
302+
(x, y, z) d(u_x)/dx + d(u_y)/dy + d(u_z)/dz
303303

304304
For `v` and `w`, we have::
305305

@@ -360,8 +360,8 @@ The curl of a gradient is always zero::
360360
The divergence of a curl is always zero::
361361

362362
sage: div(curl(u)).display()
363-
div(curl(u)): E^3 --> R
364-
(x, y, z) |--> 0
363+
div(curl(u)): E^3 → ℝ
364+
(x, y, z) 0
365365

366366
An identity valid for any scalar field `F` and any vector field `u` is
367367

@@ -382,8 +382,8 @@ The Laplacian `\Delta F` of a scalar field `F` is another scalar field::
382382

383383
sage: s = laplacian(F)
384384
sage: s.display()
385-
Delta(F): E^3 --> R
386-
(x, y, z) |--> d^2(f)/dx^2 + d^2(f)/dy^2 + d^2(f)/dz^2
385+
Delta(F): E^3 → ℝ
386+
(x, y, z) d^2(f)/dx^2 + d^2(f)/dy^2 + d^2(f)/dz^2
387387

388388
The following identity holds:
389389

src/doc/en/thematic_tutorials/vector_calculus/vector_calc_change.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ At this stage, `\mathbb{E}^3` is endowed with three vector frames::
204204

205205
sage: E.frames()
206206
[Coordinate frame (E^3, (e_x,e_y,e_z)),
207-
Coordinate frame (E^3, (d/dr,d/dth,d/dph)),
207+
Coordinate frame (E^3, (∂/∂r,∂/∂th,∂/∂ph)),
208208
Vector frame (E^3, (e_r,e_th,e_ph))]
209209

210210
The second one is the *coordinate* frame `\left(\frac{\partial}{\partial r},
@@ -254,9 +254,9 @@ chart ``spherical``)::
254254

255255
sage: for vec in spherical_frame:
256256
....: vec.display(spherical.frame(), spherical)
257-
e_r = d/dr
258-
e_th = 1/r d/dth
259-
e_ph = 1/(r*sin(th)) d/dph
257+
e_r = ∂/∂r
258+
e_th = 1/r ∂/∂th
259+
e_ph = 1/(r*sin(th)) ∂/∂ph
260260

261261

262262
Introducing cylindrical coordinates
@@ -299,9 +299,9 @@ There are now five vector frames defined on `\mathbb{E}^3`::
299299

300300
sage: E.frames()
301301
[Coordinate frame (E^3, (e_x,e_y,e_z)),
302-
Coordinate frame (E^3, (d/dr,d/dth,d/dph)),
302+
Coordinate frame (E^3, (∂/∂r,∂/∂th,∂/∂ph)),
303303
Vector frame (E^3, (e_r,e_th,e_ph)),
304-
Coordinate frame (E^3, (d/drh,d/dph,d/dz)),
304+
Coordinate frame (E^3, (∂/∂rh,∂/∂ph,∂/∂z)),
305305
Vector frame (E^3, (e_rh,e_ph,e_z))]
306306

307307
The orthonormal frame associated with cylindrical coordinates is
@@ -359,9 +359,9 @@ chart ``cylindrical``)::
359359

360360
sage: for vec in cylindrical_frame:
361361
....: vec.display(cylindrical.frame(), cylindrical)
362-
e_rh = d/drh
363-
e_ph = 1/rh d/dph
364-
e_z = d/dz
362+
e_rh = ∂/∂rh
363+
e_ph = 1/rh ∂/∂ph
364+
e_z = ∂/∂z
365365

366366

367367
How to evaluate the coordinates of a point in various systems
@@ -423,19 +423,19 @@ transformations, the expression of `f` in terms of other coordinates is
423423
automatically computed::
424424

425425
sage: f.display()
426-
f: E^3 --> R
427-
(x, y, z) |--> x^2 + y^2 - z^2
428-
(r, th, ph) |--> -2*r^2*cos(th)^2 + r^2
429-
(rh, ph, z) |--> rh^2 - z^2
426+
f: E^3 → ℝ
427+
(x, y, z) x^2 + y^2 - z^2
428+
(r, th, ph) -2*r^2*cos(th)^2 + r^2
429+
(rh, ph, z) rh^2 - z^2
430430

431431
We can limit the output to a single coordinate system::
432432

433433
sage: f.display(cartesian)
434-
f: E^3 --> R
435-
(x, y, z) |--> x^2 + y^2 - z^2
434+
f: E^3 → ℝ
435+
(x, y, z) x^2 + y^2 - z^2
436436
sage: f.display(cylindrical)
437-
f: E^3 --> R
438-
(rh, ph, z) |--> rh^2 - z^2
437+
f: E^3 → ℝ
438+
(rh, ph, z) rh^2 - z^2
439439

440440
The coordinate expression in a given coordinate system is obtained via the
441441
method :meth:`~sage.manifolds.scalarfield.ScalarField.expr`::
@@ -468,10 +468,10 @@ The computation of the expressions of `g` in the other coordinate systems is
468468
triggered by the method ``display()``::
469469

470470
sage: g.display()
471-
g: E^3 --> R
472-
(x, y, z) |--> x^2 + y^2 + z^2
473-
(r, th, ph) |--> r^2
474-
(rh, ph, z) |--> rh^2 + z^2
471+
g: E^3 → ℝ
472+
(x, y, z) x^2 + y^2 + z^2
473+
(r, th, ph) r^2
474+
(rh, ph, z) rh^2 + z^2
475475

476476

477477
How to express a vector field in various frames

0 commit comments

Comments
 (0)