passagemath-symbolics 10.6.40__cp314-cp314t-macosx_13_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-symbolics might be problematic. Click here for more details.

Files changed (172) hide show
  1. passagemath_symbolics/.dylibs/libgmp.10.dylib +0 -0
  2. passagemath_symbolics/__init__.py +3 -0
  3. passagemath_symbolics-10.6.40.dist-info/METADATA +187 -0
  4. passagemath_symbolics-10.6.40.dist-info/RECORD +172 -0
  5. passagemath_symbolics-10.6.40.dist-info/WHEEL +6 -0
  6. passagemath_symbolics-10.6.40.dist-info/top_level.txt +3 -0
  7. sage/all__sagemath_symbolics.py +17 -0
  8. sage/calculus/all.py +14 -0
  9. sage/calculus/calculus.py +2826 -0
  10. sage/calculus/desolvers.py +1866 -0
  11. sage/calculus/predefined.py +51 -0
  12. sage/calculus/tests.py +225 -0
  13. sage/calculus/var.cpython-314t-darwin.so +0 -0
  14. sage/calculus/var.pyx +401 -0
  15. sage/dynamics/all__sagemath_symbolics.py +6 -0
  16. sage/dynamics/complex_dynamics/all.py +5 -0
  17. sage/dynamics/complex_dynamics/mandel_julia.py +765 -0
  18. sage/dynamics/complex_dynamics/mandel_julia_helper.cpython-314t-darwin.so +0 -0
  19. sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +1035 -0
  20. sage/ext/all__sagemath_symbolics.py +1 -0
  21. sage/ext_data/kenzo/CP2.txt +45 -0
  22. sage/ext_data/kenzo/CP3.txt +349 -0
  23. sage/ext_data/kenzo/CP4.txt +4774 -0
  24. sage/ext_data/kenzo/README.txt +49 -0
  25. sage/ext_data/kenzo/S4.txt +20 -0
  26. sage/ext_data/magma/latex/latex.m +1021 -0
  27. sage/ext_data/magma/latex/latex.spec +1 -0
  28. sage/ext_data/magma/sage/basic.m +356 -0
  29. sage/ext_data/magma/sage/sage.spec +1 -0
  30. sage/ext_data/magma/spec +9 -0
  31. sage/geometry/all__sagemath_symbolics.py +8 -0
  32. sage/geometry/hyperbolic_space/all.py +5 -0
  33. sage/geometry/hyperbolic_space/hyperbolic_coercion.py +743 -0
  34. sage/geometry/hyperbolic_space/hyperbolic_constants.py +5 -0
  35. sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +2409 -0
  36. sage/geometry/hyperbolic_space/hyperbolic_interface.py +206 -0
  37. sage/geometry/hyperbolic_space/hyperbolic_isometry.py +1082 -0
  38. sage/geometry/hyperbolic_space/hyperbolic_model.py +1502 -0
  39. sage/geometry/hyperbolic_space/hyperbolic_point.py +621 -0
  40. sage/geometry/riemannian_manifolds/all.py +7 -0
  41. sage/geometry/riemannian_manifolds/parametrized_surface3d.py +1632 -0
  42. sage/geometry/riemannian_manifolds/surface3d_generators.py +461 -0
  43. sage/interfaces/all__sagemath_symbolics.py +1 -0
  44. sage/interfaces/magma.py +3017 -0
  45. sage/interfaces/magma_free.py +92 -0
  46. sage/interfaces/maple.py +1397 -0
  47. sage/interfaces/mathematica.py +1345 -0
  48. sage/interfaces/mathics.py +1312 -0
  49. sage/interfaces/sympy.py +1398 -0
  50. sage/interfaces/sympy_wrapper.py +197 -0
  51. sage/interfaces/tides.py +938 -0
  52. sage/libs/all__sagemath_symbolics.py +6 -0
  53. sage/manifolds/all.py +7 -0
  54. sage/manifolds/calculus_method.py +555 -0
  55. sage/manifolds/catalog.py +437 -0
  56. sage/manifolds/chart.py +4019 -0
  57. sage/manifolds/chart_func.py +3419 -0
  58. sage/manifolds/continuous_map.py +2183 -0
  59. sage/manifolds/continuous_map_image.py +155 -0
  60. sage/manifolds/differentiable/affine_connection.py +2475 -0
  61. sage/manifolds/differentiable/all.py +1 -0
  62. sage/manifolds/differentiable/automorphismfield.py +1383 -0
  63. sage/manifolds/differentiable/automorphismfield_group.py +604 -0
  64. sage/manifolds/differentiable/bundle_connection.py +1445 -0
  65. sage/manifolds/differentiable/characteristic_cohomology_class.py +1840 -0
  66. sage/manifolds/differentiable/chart.py +1241 -0
  67. sage/manifolds/differentiable/curve.py +1028 -0
  68. sage/manifolds/differentiable/de_rham_cohomology.py +541 -0
  69. sage/manifolds/differentiable/degenerate.py +559 -0
  70. sage/manifolds/differentiable/degenerate_submanifold.py +1671 -0
  71. sage/manifolds/differentiable/diff_form.py +1658 -0
  72. sage/manifolds/differentiable/diff_form_module.py +1062 -0
  73. sage/manifolds/differentiable/diff_map.py +1315 -0
  74. sage/manifolds/differentiable/differentiable_submanifold.py +291 -0
  75. sage/manifolds/differentiable/examples/all.py +1 -0
  76. sage/manifolds/differentiable/examples/euclidean.py +2517 -0
  77. sage/manifolds/differentiable/examples/real_line.py +897 -0
  78. sage/manifolds/differentiable/examples/sphere.py +1186 -0
  79. sage/manifolds/differentiable/examples/symplectic_space.py +187 -0
  80. sage/manifolds/differentiable/examples/symplectic_space_test.py +40 -0
  81. sage/manifolds/differentiable/integrated_curve.py +4035 -0
  82. sage/manifolds/differentiable/levi_civita_connection.py +841 -0
  83. sage/manifolds/differentiable/manifold.py +4254 -0
  84. sage/manifolds/differentiable/manifold_homset.py +1826 -0
  85. sage/manifolds/differentiable/metric.py +3032 -0
  86. sage/manifolds/differentiable/mixed_form.py +1507 -0
  87. sage/manifolds/differentiable/mixed_form_algebra.py +559 -0
  88. sage/manifolds/differentiable/multivector_module.py +800 -0
  89. sage/manifolds/differentiable/multivectorfield.py +1520 -0
  90. sage/manifolds/differentiable/poisson_tensor.py +268 -0
  91. sage/manifolds/differentiable/pseudo_riemannian.py +755 -0
  92. sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +1839 -0
  93. sage/manifolds/differentiable/scalarfield.py +1343 -0
  94. sage/manifolds/differentiable/scalarfield_algebra.py +472 -0
  95. sage/manifolds/differentiable/symplectic_form.py +910 -0
  96. sage/manifolds/differentiable/symplectic_form_test.py +220 -0
  97. sage/manifolds/differentiable/tangent_space.py +412 -0
  98. sage/manifolds/differentiable/tangent_vector.py +616 -0
  99. sage/manifolds/differentiable/tensorfield.py +4665 -0
  100. sage/manifolds/differentiable/tensorfield_module.py +963 -0
  101. sage/manifolds/differentiable/tensorfield_paral.py +2450 -0
  102. sage/manifolds/differentiable/tensorfield_paral_test.py +16 -0
  103. sage/manifolds/differentiable/vector_bundle.py +1728 -0
  104. sage/manifolds/differentiable/vectorfield.py +1717 -0
  105. sage/manifolds/differentiable/vectorfield_module.py +2445 -0
  106. sage/manifolds/differentiable/vectorframe.py +1832 -0
  107. sage/manifolds/family.py +270 -0
  108. sage/manifolds/local_frame.py +1490 -0
  109. sage/manifolds/manifold.py +3090 -0
  110. sage/manifolds/manifold_homset.py +452 -0
  111. sage/manifolds/operators.py +359 -0
  112. sage/manifolds/point.py +994 -0
  113. sage/manifolds/scalarfield.py +3718 -0
  114. sage/manifolds/scalarfield_algebra.py +629 -0
  115. sage/manifolds/section.py +3111 -0
  116. sage/manifolds/section_module.py +831 -0
  117. sage/manifolds/structure.py +229 -0
  118. sage/manifolds/subset.py +2764 -0
  119. sage/manifolds/subsets/all.py +1 -0
  120. sage/manifolds/subsets/closure.py +131 -0
  121. sage/manifolds/subsets/pullback.py +885 -0
  122. sage/manifolds/topological_submanifold.py +891 -0
  123. sage/manifolds/trivialization.py +733 -0
  124. sage/manifolds/utilities.py +1348 -0
  125. sage/manifolds/vector_bundle.py +1342 -0
  126. sage/manifolds/vector_bundle_fiber.py +332 -0
  127. sage/manifolds/vector_bundle_fiber_element.py +111 -0
  128. sage/matrix/all__sagemath_symbolics.py +1 -0
  129. sage/matrix/matrix_symbolic_dense.cpython-314t-darwin.so +0 -0
  130. sage/matrix/matrix_symbolic_dense.pxd +6 -0
  131. sage/matrix/matrix_symbolic_dense.pyx +1022 -0
  132. sage/matrix/matrix_symbolic_sparse.cpython-314t-darwin.so +0 -0
  133. sage/matrix/matrix_symbolic_sparse.pxd +6 -0
  134. sage/matrix/matrix_symbolic_sparse.pyx +1029 -0
  135. sage/modules/all__sagemath_symbolics.py +1 -0
  136. sage/modules/vector_callable_symbolic_dense.py +105 -0
  137. sage/modules/vector_symbolic_dense.py +116 -0
  138. sage/modules/vector_symbolic_sparse.py +118 -0
  139. sage/rings/all__sagemath_symbolics.py +4 -0
  140. sage/rings/asymptotic/all.py +6 -0
  141. sage/rings/asymptotic/asymptotic_expansion_generators.py +1485 -0
  142. sage/rings/asymptotic/asymptotic_ring.py +4858 -0
  143. sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +4153 -0
  144. sage/rings/asymptotic/growth_group.py +5373 -0
  145. sage/rings/asymptotic/growth_group_cartesian.py +1400 -0
  146. sage/rings/asymptotic/term_monoid.py +5237 -0
  147. sage/rings/function_field/all__sagemath_symbolics.py +2 -0
  148. sage/rings/polynomial/all__sagemath_symbolics.py +1 -0
  149. sage/symbolic/all.py +15 -0
  150. sage/symbolic/assumptions.py +985 -0
  151. sage/symbolic/benchmark.py +93 -0
  152. sage/symbolic/callable.py +459 -0
  153. sage/symbolic/complexity_measures.py +35 -0
  154. sage/symbolic/constants.py +1287 -0
  155. sage/symbolic/expression_conversion_algebraic.py +310 -0
  156. sage/symbolic/expression_conversion_sympy.py +317 -0
  157. sage/symbolic/expression_conversions.py +1713 -0
  158. sage/symbolic/function_factory.py +355 -0
  159. sage/symbolic/integration/all.py +1 -0
  160. sage/symbolic/integration/external.py +270 -0
  161. sage/symbolic/integration/integral.py +1115 -0
  162. sage/symbolic/maxima_wrapper.py +162 -0
  163. sage/symbolic/operators.py +267 -0
  164. sage/symbolic/random_tests.py +462 -0
  165. sage/symbolic/relation.py +1907 -0
  166. sage/symbolic/ring.cpython-314t-darwin.so +0 -0
  167. sage/symbolic/ring.pxd +5 -0
  168. sage/symbolic/ring.pyx +1396 -0
  169. sage/symbolic/subring.py +1025 -0
  170. sage/symbolic/symengine.py +19 -0
  171. sage/symbolic/tests.py +40 -0
  172. sage/symbolic/units.py +1470 -0
@@ -0,0 +1,1021 @@
1
+ // Latex printing for MAGMA objects.
2
+
3
+ /***************************************************************
4
+
5
+ Copyright (C) 2006 William Stein <wstein@ucsd.edu>
6
+ 2006 Jennifer Balakrishnan <jenb@mit.edu>
7
+
8
+ Distributed under the terms of the GNU General Public License (GPL)
9
+
10
+ ***************************************************************/
11
+
12
+ /*
13
+ This converts MAGMA output to LaTeX. It's a work-in-progress that
14
+ currently handles a few basic types, matrices, polynomials,
15
+ power series, binary quadratic forms, elements of number fields,
16
+ finite fields, certain p-adic rings/fields, points, and elliptic curves.
17
+ */
18
+
19
+ intrinsic Latex(x::RngIntElt) -> MonStgElt
20
+ {}
21
+ return Sprint(x);
22
+ end intrinsic;
23
+
24
+ intrinsic Latex(x::FldReElt) -> MonStgElt
25
+ {}
26
+ return Sprint(x);
27
+ end intrinsic;
28
+
29
+ intrinsic Latex(x::FldRatElt) -> MonStgElt
30
+ {}
31
+ if Denominator(x) eq 1 then
32
+ return Latex(Numerator(x));
33
+ end if;
34
+ return Sprintf("\\frac{%o}{%o}", Numerator(x), Denominator(x));
35
+ end intrinsic;
36
+
37
+ Letters:={@
38
+ "$.1",
39
+ "alpha",
40
+ "beta",
41
+ "gamma",
42
+ "delta",
43
+ "epsilon",
44
+ "varepsilon",
45
+ "zeta",
46
+ "eta",
47
+ "theta",
48
+ "theta",
49
+ "vartheta",
50
+ "iota",
51
+ "kappa",
52
+ "lambda",
53
+ "mu",
54
+ "nu",
55
+ "xi",
56
+ "pi",
57
+ "varpi",
58
+ "rho",
59
+ "varrho",
60
+ "sigma",
61
+ "varsigma",
62
+ "tau",
63
+ "upsilon",
64
+ "phi",
65
+ "varphi",
66
+ "chi",
67
+ "psi",
68
+ "omega",
69
+ "Gamma",
70
+ "Delta",
71
+ "Theta",
72
+ "Lambda",
73
+ "Xi",
74
+ "Pi",
75
+ "Sigma",
76
+ "Upsilon",
77
+ "Phi",
78
+ "Psi" @};
79
+
80
+
81
+ intrinsic Latex(x::RngPadElt) -> MonStgElt
82
+ {}
83
+ z := Integers()!x;
84
+ p := Prime(Parent(x));
85
+ l := p^(Degree(Parent(x)));
86
+ i := 0;
87
+ j :=AbsolutePrecision(x);
88
+ s := "";
89
+ if IsPrime(l) then
90
+
91
+ while z ne 0 and i eq 0 do
92
+ c := z mod p;
93
+ if c ne 0 then
94
+ s *:= Sprintf("%o+", c);
95
+ end if;
96
+ z := z div p;
97
+ i := i + 1;
98
+ end while;
99
+
100
+ while z ne 0 and i eq 1 do
101
+ c := z mod p;
102
+ if c ne 0 then
103
+ if c ne 1 then
104
+ s *:= Sprintf("%o\\cdot{}", c);
105
+ end if;
106
+ s *:= Sprintf("%o^{%o} + ", p, i);
107
+ end if;
108
+ z := z div p;
109
+ i := i + 1;
110
+ end while;
111
+
112
+ while z ne 0 and i lt Precision(Parent(x)) do
113
+ c := z mod p;
114
+ if c ne 0 then
115
+ if c ne 1 then
116
+ s *:= Sprintf("%o\\cdot{}", c);
117
+ end if;
118
+ s *:= Sprintf("%o^{%o} + ", p, i);
119
+ end if;
120
+ z := z div p;
121
+ i := i + 1;
122
+ end while;
123
+
124
+ else return Sprintf("\\mbox{\\rm %o}", x);
125
+ end if;
126
+ s *:= Sprintf("O(%o^{%o})", p, j);
127
+ return s;
128
+ end intrinsic;
129
+
130
+ intrinsic Latex(x::FldPadElt) -> MonStgElt
131
+ {}
132
+ v := Valuation(x);
133
+ z := RationalField()!x;
134
+ p := Prime(Parent(x));
135
+ l := p^(Degree(Parent(x)));
136
+ i := 0;
137
+ j :=AbsolutePrecision(x);
138
+ s := "";
139
+ if IsPrime(l) then
140
+
141
+ z:=Numerator(z);
142
+ while z ne 0 and i eq 0 do
143
+ c := z mod p;
144
+ if c ne 0 then
145
+ if c ne 1 then
146
+ s *:= Sprintf("%o", c);
147
+ end if;
148
+ if i+v ne 0 then
149
+ s*:= Sprintf("\\cdot{}%o^{%o} + ",p, i+v);
150
+ else if c ne 0 and c ne 1 then
151
+ s*:= Sprintf("+ ");
152
+ else if c eq 1 then
153
+ s*:= Sprintf("1 + ");
154
+ end if;
155
+ end if;
156
+ end if;
157
+ end if;
158
+ z := z div p;
159
+ i := i + 1;
160
+ end while;
161
+
162
+ while z ne 0 and i eq 1 do
163
+ c := z mod p;
164
+ if c ne 0 then
165
+ if c ne 1 then
166
+ s *:= Sprintf("%o", c);
167
+ end if;
168
+ if i+v ne 0 then
169
+ s *:= Sprintf("\\cdot{}%o^{%o} + ", p, i+v);
170
+ else if c ne 0 and c ne 1 then
171
+ s*:=Sprintf("+ ");
172
+ else if c eq 1 then
173
+ s*:=Sprintf("1 + ");
174
+ end if;
175
+ end if;
176
+ end if;
177
+ end if;
178
+ z := z div p;
179
+ i := i + 1;
180
+ end while;
181
+
182
+ while z ne 0 and i lt Precision(Parent(x)) do
183
+ c := z mod p;
184
+ if c ne 0 then
185
+ if c ne 1 then
186
+ s *:= Sprintf("%o", c);
187
+ end if;
188
+ if i+v ne 0 then
189
+ s *:= Sprintf("\\cdot{}%o^{%o} + ", p, i+v);
190
+ else if c ne 0 and c ne 1 then
191
+ s*:= Sprintf("+ ");
192
+ else if c eq 1 then
193
+ s*:= Sprintf("1 + ");
194
+ end if;
195
+ end if;
196
+ end if;
197
+ end if;
198
+ z := z div p;
199
+ i := i + 1;
200
+ end while;
201
+ else return Sprintf("\\text{%o}",x);
202
+
203
+ end if;
204
+ s *:= Sprintf("O(%o^{%o})", p, j);
205
+ return s;
206
+ end intrinsic;
207
+
208
+
209
+ function S(x)
210
+ if x gt 0 then
211
+ return "+";
212
+ end if;
213
+ if x lt 0 then
214
+ return "-";
215
+ end if;
216
+ if x eq 0 then
217
+ return "";
218
+ end if;
219
+ end function;
220
+
221
+ function Abs(x)
222
+ return Latex(AbsoluteValue(x));
223
+ end function;
224
+
225
+ intrinsic Latex(f::RngUPolElt) -> MonStgElt
226
+ {}
227
+ if Sprintf("%o",Parent(f).1) in Letters then
228
+ x:=Sprintf("\\%o",Parent(f).1);
229
+ else x:=Sprintf("%o",Parent(f).1);
230
+ end if;
231
+ v := Eltseq(f);
232
+ if v[1] ne 0 then
233
+ s :=Abs(v[1]);
234
+ else s:= "";
235
+ end if;
236
+
237
+ if s eq "" then
238
+
239
+ if AbsoluteValue(v[2]) eq 1 then
240
+ s:= Sprintf("%o",x) * s;
241
+ else if v[2] eq 0 then
242
+ s := S(v[1])*s;
243
+ else if v[2] ne 0 then
244
+ s := Abs(v[2]) * Sprintf("%o",x) *S(v[1])* s;
245
+ end if;
246
+ end if;
247
+ end if;
248
+
249
+
250
+ else if AbsoluteValue(v[2]) eq 1 then
251
+ s:= Sprintf("%o",x) * S(v[1])* s;
252
+ else if v[2] eq 0 then
253
+ s := S(v[1])*s;
254
+ else if v[2] ne 0 then
255
+ s := Abs(v[2]) * Sprintf("%o",x) *S(v[1])* s;
256
+ end if;
257
+ end if;
258
+ end if;
259
+
260
+ end if;
261
+
262
+ for i in [3..#v-1] do
263
+ if s eq "" then
264
+
265
+ if AbsoluteValue(v[i]) eq 1 then
266
+ s:= Sprintf("%o",x)* Sprintf("^{%o}", i-1) * S(v[i-1]) * s;
267
+ else
268
+
269
+ if v[i] eq 0 then
270
+ s := S(v[i-1])*s;
271
+
272
+ else
273
+
274
+ if v[i] ne 0 then
275
+ s := Abs(v[i]) * Sprintf("%o",x) * Sprintf("^{%o}", i-1) * S(v[i-1]) * s;
276
+ end if;
277
+ end if;
278
+ end if;
279
+
280
+ else
281
+ if AbsoluteValue(v[i]) eq 1 then
282
+ s:= Sprintf("%o",x) * Sprintf("^{%o}", i-1) * S(v[i-1]) * s;
283
+ else
284
+
285
+ if v[i] eq 0 then
286
+ s := S(v[i-1])*s;
287
+
288
+ else
289
+
290
+ if v[i] ne 0 then
291
+ s := Abs(v[i]) * Sprintf("%o",x)*Sprintf("^{%o}", i-1) *S(v[i-1])* s;
292
+ end if;
293
+ end if;
294
+ end if;
295
+ end if;
296
+
297
+ end for;
298
+
299
+ if #v eq 2 then
300
+ if S(v[2]) eq "-" then
301
+ s := S(v[2])*s;
302
+ end if;
303
+ end if;
304
+
305
+ if #v gt 2 then
306
+ if AbsoluteValue(v[#v]) eq 1 then
307
+ if S(v[#v]) eq "-" then
308
+ s:= Sprintf("-%o",x)* Sprintf("^{%o}", #v-1)*S(v[#v-1])*s;
309
+ else s:=Sprintf("%o",x)* Sprintf("^{%o}", #v-1)*S(v[#v-1])*s;
310
+ end if;
311
+ else
312
+
313
+ if v[#v] ne 0 then
314
+ if S(v[#v]) eq "-" then
315
+ s := S(v[#v])*Abs(v[#v])*Sprintf("x")
316
+ *Sprintf("^{%o}", #v-1) *S(v[#v-1])* s;
317
+ else s := Abs(v[#v])*Sprintf("%o",x)*Sprintf("^{%o}", #v-1) *S(v[#v-1])* s;
318
+ end if;
319
+ end if;
320
+ end if;
321
+ end if;
322
+
323
+ return s;
324
+ end intrinsic;
325
+
326
+
327
+ intrinsic Latex(f::RngSerElt) -> MonStgElt
328
+ {}
329
+ s:="";
330
+ n:=AbsolutePrecision(f);
331
+ d:=Degree(LeadingTerm(f));
332
+ v:=ElementToSequence(f);
333
+ m:=#v;
334
+ if Sprintf("%o",Parent(f).1) in Letters then
335
+ zn:=Sprintf("\\%o",Parent(f).1);
336
+ else zn:=Sprintf("%o",Parent(f).1);
337
+ end if;
338
+
339
+ if d eq 0 then
340
+ if v[1] ne 0 then
341
+ s:=s*Latex(v[1]);
342
+ end if;
343
+
344
+ if v[2] ne 0 then
345
+ if s eq "" then
346
+ if AbsoluteValue(v[2]) eq 1 then
347
+ if S(v[2]) eq "-" then
348
+ s:= s*S(v[2])*Sprintf("%o",zn);
349
+ else s:= s*Sprintf("%o",zn);
350
+ end if;
351
+ else if S(v[2]) eq "-" then
352
+ s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
353
+ else s:= s*Abs(v[2])*Sprintf("%o",zn);
354
+ end if;
355
+ end if;
356
+ else if AbsoluteValue(v[2]) eq 1 then
357
+ s:= s*S(v[2])*Sprintf("%o",zn);
358
+ else s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
359
+ end if;
360
+ end if;
361
+ end if;
362
+
363
+ for i in [3..m] do
364
+ if v[i] ne 0 then
365
+ if s eq "" then
366
+ if AbsoluteValue(v[i]) eq 1 then
367
+ if S(v[i]) eq "-" then
368
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
369
+ else s:= s*Sprintf("%o^{%o}",zn,i-1);
370
+ end if;
371
+ else if S(v[i]) eq "-" then
372
+ s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
373
+ else s:= s*Abs(v[i])*Sprintf("%o^{%o-1}",zn,i-1);
374
+ end if;
375
+ end if;
376
+ else if AbsoluteValue(v[i]) eq 1 then
377
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
378
+ else s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
379
+ end if;
380
+ end if;
381
+ end if;
382
+ end for;
383
+
384
+ else if d eq 1 then
385
+
386
+ if v[1] ne 0 then
387
+ if s eq "" then
388
+ if AbsoluteValue(v[1]) eq 1 then
389
+ if S(v[1]) eq "-" then
390
+ s:= s*S(v[1])*Sprintf("%o",zn);
391
+ else s:= s*Sprintf("%o",zn);
392
+ end if;
393
+ else if S(v[1]) eq "-" then
394
+ s:= s*S(v[1])*Abs(v[1])*Sprintf("%o",zn);
395
+ else s:= s*Abs(v[1])*Sprintf("%o",zn);
396
+ end if;
397
+ end if;
398
+ else if AbsoluteValue(v[1]) eq 1 then
399
+ s:= s*S(v[1])*Sprintf("%o",zn);
400
+ else s:= s*S(v[1])*Abs(v[1])*Sprintf("%o",zn);
401
+ end if;
402
+ end if;
403
+ end if;
404
+
405
+ for i in [2..m] do
406
+ if v[i] ne 0 then
407
+ if s eq "" then
408
+ if AbsoluteValue(v[i]) eq 1 then
409
+ if S(v[i]) eq "-" then
410
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i);
411
+ else s:= s*Sprintf("%o^{%o}",zn,i);
412
+ end if;
413
+ else if S(v[i]) eq "-" then
414
+ s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i);
415
+ else s:= s*Abs(v[i])*Sprintf("%o^{%o}",zn,i);
416
+ end if;
417
+ end if;
418
+ else if AbsoluteValue(v[i]) eq 1 then
419
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i);
420
+ else s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i);
421
+ end if;
422
+ end if;
423
+ end if;
424
+ end for;
425
+ else for i in [1..m] do
426
+ if v[i] ne 0 then
427
+ if s eq "" then
428
+ if AbsoluteValue(v[i]) eq 1 then
429
+ if S(v[i]) eq "-" then
430
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,d+i-1);
431
+ else s:= s*Sprintf("%o^{%o}",zn,d+i-1);
432
+ end if;
433
+ else if S(v[i]) eq "-" then
434
+ s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,d+i-1);
435
+ else s:= s*Abs(v[i])*Sprintf("%o^{%o}",zn,d+i-1);
436
+ end if;
437
+ end if;
438
+ else if AbsoluteValue(v[i]) eq 1 then
439
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,d+i-1);
440
+ else s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,d+i-1);
441
+ end if;
442
+ end if;
443
+ end if;
444
+ end for;
445
+ end if;
446
+ end if;
447
+
448
+ s:=s*Sprintf("+O(%o^{%o})",zn,n);
449
+ return s;
450
+ end intrinsic;
451
+
452
+ intrinsic Latex(E::CrvEll) -> MonStgElt
453
+ {}
454
+ v:=aInvariants(E);
455
+
456
+ s:="y^2";
457
+
458
+ if v[1] ne 0 then
459
+ if AbsoluteValue(v[1]) eq 1 then
460
+ s:=s*S(v[1])*Sprintf("xy");
461
+ else
462
+ s:= s*S(v[1])*Abs(v[1])*Sprintf("xy");
463
+ end if;
464
+ end if;
465
+
466
+ if v[3] ne 0 then
467
+ if AbsoluteValue(v[3]) eq 1 then
468
+ s:=s*S(v[3])*Sprintf("y");
469
+ else
470
+ s:=s*S(v[3])*Abs(v[3])*Sprintf("y");
471
+ end if;
472
+ end if;
473
+
474
+ s:=s*Sprintf("=x^3");
475
+
476
+ if v[2] ne 0 then
477
+ if AbsoluteValue(v[2]) eq 1 then
478
+ s:= s*S(v[2])*Sprintf("x^2");
479
+ else
480
+ s:=s*S(v[2])*Abs(v[2])*Sprintf("x^2");
481
+ end if;
482
+ end if;
483
+
484
+ if v[4] ne 0 then
485
+ if AbsoluteValue(v[4]) eq 1 then
486
+ s:=s*S(v[4])*Sprintf("x");
487
+ else
488
+ s:=s*S(v[4])*Abs(v[4])*Sprintf("x");
489
+ end if;
490
+ end if;
491
+
492
+ if v[5] ne 0 then
493
+ s:=s*S(v[5])*Abs(v[5]);
494
+ end if;
495
+
496
+ return s;
497
+ end intrinsic;
498
+
499
+ intrinsic Latex(f::FldFunRatElt) -> MonStgElt
500
+ {}
501
+ if Denominator(f) eq 1 then
502
+ return Latex(Numerator(f));
503
+ end if;
504
+ return Sprintf("\\frac{%o}{%o}", Latex(Numerator(f)), Latex(Denominator(f)));
505
+ end intrinsic;
506
+
507
+ intrinsic Latex(f::QuadBinElt) -> MonStgElt
508
+ {}
509
+ s:="";
510
+ if AbsoluteValue(f[1]) eq 1 then
511
+ if S(f[1]) eq "-" then
512
+ s:= s*Sprintf("-x^2");
513
+ else s:= s*Sprintf("x^2");
514
+ end if;
515
+ else
516
+ if S(f[1]) eq "-" then
517
+ s:= s*S(f[1])*Abs(f[1])*Sprintf("x^2");
518
+ else s:= s*Abs(f[1])*Sprintf("x^2");
519
+ end if;
520
+ end if;
521
+
522
+ if f[2] ne 0 then
523
+ if AbsoluteValue(f[2]) eq 1 then
524
+ s:=s*S(f[2])*Sprintf("xy");
525
+ else
526
+ s:=s*S(f[2])*Abs(f[2])*Sprintf("xy");
527
+ end if;
528
+ end if;
529
+
530
+ if AbsoluteValue(f[3]) eq 1 then
531
+ s:=s*S(f[3])*Sprintf("y^2");
532
+ else
533
+ s:= s*S(f[3])*Abs(f[3])*Sprintf("y^2");
534
+ end if;
535
+ return s;
536
+ end intrinsic;
537
+
538
+
539
+ intrinsic Latex(M::Mtrx) -> MonStgElt
540
+ {}
541
+ m:=NumberOfRows(M);
542
+ n:=NumberOfColumns(M);
543
+ s:=Sprintf("\\left(\\begin{array}{");
544
+ for i in [1..n] do
545
+ s := s * Sprintf("c");
546
+ end for;
547
+ s:= s * Sprintf("}");
548
+ for i in [1..m-1] do
549
+ for j in [1..n-1] do
550
+ s := s * Latex(M[i,j]) * Sprintf("&");
551
+ end for;
552
+ s := s * Latex(M[i,n]) * Sprintf("\\\\");
553
+ end for;
554
+
555
+ for j in [1..n-1] do
556
+ s := s * Latex(M[m,j]) * Sprintf("&");
557
+ end for;
558
+ s := s * Latex(M[m,n]) * "\\end{array}\\right)";
559
+ return s;
560
+ end intrinsic;
561
+
562
+ intrinsic Latex(P::PtEll) -> MonStgElt
563
+ {}
564
+ return Sprintf("(%o,%o)",Latex(P[1]),Latex(P[2]));
565
+
566
+ end intrinsic;
567
+
568
+ intrinsic Latex(P::Pt) -> MonStgElt
569
+ {}
570
+ n:=#Coordinates(P);
571
+ s:="(";
572
+ for i in [1..n-1] do
573
+ s:=s*Latex(P[i])*Sprintf(",");
574
+ end for;
575
+ s:=s*Latex(P[n])*Sprintf(")");
576
+ return s;
577
+ end intrinsic;
578
+
579
+ intrinsic Latex(a::FldQuadElt) -> MonStgElt
580
+ {}
581
+ s:="";
582
+ v:=ElementToSequence(a);
583
+ D:=Discriminant(Parent(a))/4;
584
+
585
+ if v[1] ne 0 then
586
+ s:=s*Latex(v[1]);
587
+ end if;
588
+
589
+ if v[2] ne 0 then
590
+ if s eq "" then
591
+ if AbsoluteValue(v[2]) eq 1 then
592
+ if S(v[2]) eq "-" then
593
+ s:= s*S(v[2])*Sprintf("\\sqrt{%o}",D);
594
+ else s:= s*Sprintf("\\sqrt{%o}",D);
595
+ end if;
596
+ else if S(v[2]) eq "-" then
597
+ s:= s*S(v[2])*Abs(v[2])*Sprintf("\\sqrt{%o}",D);
598
+ else s:= s*Abs(v[2])*Sprintf("\\sqrt{%o}",D);
599
+ end if;
600
+ end if;
601
+ else if AbsoluteValue(v[2]) eq 1 then
602
+ s:= s*S(v[2])*Sprintf("\\sqrt{%o}",D);
603
+ else s:= s*S(v[2])*Abs(v[2])*Sprintf("\\sqrt{%o}",D);
604
+ end if;
605
+ end if;
606
+ end if;
607
+ return s;
608
+ end intrinsic;
609
+
610
+ intrinsic Latex(a::FldCycElt) -> MonStgElt
611
+ {}
612
+ s:="";
613
+ v:=ElementToSequence(a);
614
+ n:=CyclotomicOrder(Parent(a));
615
+ zn:=Sprintf("\\zeta_{%o}",n);
616
+ m:=Degree(Parent(a));
617
+
618
+ if v[1] ne 0 then
619
+ s:=s*Latex(v[1]);
620
+ end if;
621
+
622
+ if v[2] ne 0 then
623
+ if s eq "" then
624
+ if AbsoluteValue(v[2]) eq 1 then
625
+ if S(v[2]) eq "-" then
626
+ s:= s*S(v[2])*Sprintf("%o",zn);
627
+ else s:= s*Sprintf("%o",zn);
628
+ end if;
629
+ else if S(v[2]) eq "-" then
630
+ s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
631
+ else s:= s*Abs(v[2])*Sprintf("%o",zn);
632
+ end if;
633
+ end if;
634
+ else if AbsoluteValue(v[2]) eq 1 then
635
+ s:= s*S(v[2])*Sprintf("%o",zn);
636
+ else s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
637
+ end if;
638
+ end if;
639
+ end if;
640
+
641
+ for i in [3..m-1] do
642
+ if v[i] ne 0 then
643
+ if s eq "" then
644
+ if AbsoluteValue(v[i]) eq 1 then
645
+ if S(v[i]) eq "-" then
646
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
647
+ else s:= s*Sprintf("%o^{%o}",zn,i-1);
648
+ end if;
649
+ else if S(v[i]) eq "-" then
650
+ s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
651
+ else s:= s*Abs(v[i])*Sprintf("%o^{%o-1}",zn,i-1);
652
+ end if;
653
+ end if;
654
+ else if AbsoluteValue(v[i]) eq 1 then
655
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
656
+ else s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
657
+ end if;
658
+ end if;
659
+ end if;
660
+ end for;
661
+ return s;
662
+ end intrinsic;
663
+
664
+
665
+ intrinsic Latex(a::FldNumElt) -> MonStgElt
666
+ {}
667
+ s:="";
668
+ v:=ElementToSequence(a);
669
+ n:=Degree(Parent(a));
670
+
671
+ if Sprintf("%o",Parent(a).1) in Letters then
672
+ zn:=Sprintf("\\%o",Parent(a).1);
673
+ else zn:=Sprintf("%o",Parent(a).1);
674
+ end if;
675
+
676
+ if v[1] ne 0 then
677
+ s:=s*Latex(v[1]);
678
+ end if;
679
+
680
+ if v[2] ne 0 then
681
+ if s eq "" then
682
+ if AbsoluteValue(v[2]) eq 1 then
683
+ if S(v[2]) eq "-" then
684
+ s:= s*S(v[2])*Sprintf("%o",zn);
685
+ else s:= s*Sprintf("%o",zn);
686
+ end if;
687
+ else if S(v[2]) eq "-" then
688
+ s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
689
+ else s:= s*Abs(v[2])*Sprintf("%o",zn);
690
+ end if;
691
+ end if;
692
+ else if AbsoluteValue(v[2]) eq 1 then
693
+ s:= s*S(v[2])*Sprintf("%o",zn);
694
+ else s:= s*S(v[2])*Abs(v[2])*Sprintf("%o",zn);
695
+ end if;
696
+ end if;
697
+ end if;
698
+
699
+ for i in [3..n] do
700
+ if v[i] ne 0 then
701
+ if s eq "" then
702
+ if AbsoluteValue(v[i]) eq 1 then
703
+ if S(v[i]) eq "-" then
704
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
705
+ else s:= s*Sprintf("%o^{%o}",zn,i-1);
706
+ end if;
707
+ else if S(v[i]) eq "-" then
708
+ s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
709
+ else s:= s*Abs(v[i])*Sprintf("%o^{%o-1}",zn,i-1);
710
+ end if;
711
+ end if;
712
+ else if AbsoluteValue(v[i]) eq 1 then
713
+ s:= s*S(v[i])*Sprintf("%o^{%o}",zn,i-1);
714
+ else s:= s*S(v[i])*Abs(v[i])*Sprintf("%o^{%o}",zn,i-1);
715
+ end if;
716
+ end if;
717
+ end if;
718
+ end for;
719
+ return s;
720
+ end intrinsic;
721
+
722
+ intrinsic Latex(K::FldFin) -> MonStgElt
723
+ {}
724
+ p := Characteristic(K);
725
+ n := Degree(K);
726
+ s := Sprintf("\\mathbf{F}_{{%o}",p);
727
+ if n gt 1 then
728
+ s *:= Sprintf("^{%o}}",n);
729
+ else
730
+ s *:= "}";
731
+ end if;
732
+ return s;
733
+ end intrinsic;
734
+
735
+ intrinsic Latex(a::FldFinElt) -> MonStgElt
736
+ {}
737
+ s:="";
738
+ v:=ElementToSequence(a);
739
+ m:=#v;
740
+ n:=#(Parent(a));
741
+ if IsPrime(n) then
742
+ return Sprint(a);
743
+ else
744
+ if Sprintf("%o",Parent(a).1) in Letters then
745
+ zn:=Sprintf("\\%o",Parent(a).1);
746
+ else zn:=Sprintf("%o",Parent(a).1);
747
+ end if;
748
+ end if;
749
+
750
+ if v[1] ne (Parent(a))!0 then
751
+ s:=s*Sprintf("%o", v[1]);
752
+ end if;
753
+
754
+ if v[2] ne (Parent(a))!0 then
755
+ if s eq "" then
756
+ if v[2] eq Parent(a)!1 then
757
+ s:= s*Sprintf("%o",zn);
758
+ else
759
+ s:= s*Sprintf("%o%o",v[2],zn);
760
+ end if;
761
+ else
762
+ if v[2] eq Parent(a)!1 then
763
+ s:= s*Sprintf("+%o",zn);
764
+ else
765
+ s:= s*Sprintf("+%o%o",v[2],zn);
766
+ end if;
767
+ end if;
768
+ end if;
769
+
770
+ for i in [3..m] do
771
+ if v[i] ne Parent(a)!0 then
772
+ if s eq "" then
773
+ if v[i] eq Parent(a)!1 then
774
+ s:= s*Sprintf("%o^{%o}",zn,i-1);
775
+ else
776
+ s:= s*Sprintf("%o%o^{%o-1}",v[i],zn,i-1);
777
+ end if;
778
+ else
779
+ if v[i] eq Parent(a)!1 then
780
+ s:= s*Sprintf("+%o^{%o}",zn,i-1);
781
+ else s:= s*Sprintf("+%o%o^{%o}",v[i],zn,i-1);
782
+ end if;
783
+ end if;
784
+ end if;
785
+ end for;
786
+ return s;
787
+ end intrinsic;
788
+
789
+ intrinsic Latex(x::.) -> MonStgElt
790
+ {}
791
+ return Sprintf("\\mbox{\\rm %o}", x);
792
+ end intrinsic;
793
+
794
+
795
+ /*
796
+
797
+ These are the MAGMA types:
798
+ (*) indicates done
799
+
800
+ AlgAssElt
801
+ AlgAssVElt
802
+ AlgBasElt
803
+ AlgChtrElt
804
+ AlgClffElt
805
+ AlgExtElt
806
+ AlgFPElt
807
+ AlgFPEltOld
808
+ AlgFPGElt
809
+ AlgFPLieElt
810
+ AlgFinDElt
811
+ AlgFrElt
812
+ AlgGenElt
813
+ AlgGrpElt
814
+ AlgHckElt
815
+ AlgIUEElt
816
+ AlgInfDElt
817
+ AlgLieElt
818
+ AlgMatElt
819
+ AlgMatLieElt
820
+ AlgMatVElt
821
+ AlgPBWElt
822
+ AlgQUEElt
823
+ AlgQuatElt
824
+ AlgQuatOrdElt
825
+ AlgSymElt
826
+ AlgUEElt
827
+ AutCrvEll
828
+ CopElt
829
+ (*)CrvEll
830
+ DiffCrvElt
831
+ DiffFunElt
832
+ DivCrvElt
833
+ DivFunElt
834
+ DivNumElt
835
+ ExtReElt
836
+ FldACElt
837
+ FldAlgElt
838
+ FldComElt
839
+ (*)FldCycElt
840
+ FldElt
841
+ (*)FldFin
842
+ (*)FldFinElt
843
+ FldFracElt
844
+ FldFunElt
845
+ FldFunFracSchElt
846
+ FldFunFracSchEltOld
847
+ FldFunGElt
848
+ FldFunOrdElt
849
+ (*)FldFunRatElt
850
+ FldFunRatMElt
851
+ FldFunRatUElt
852
+ (*)FldNumElt
853
+ FldNumGElt
854
+ FldOrdElt
855
+ FldPadElt
856
+ FldPrElt
857
+ (*)FldQuadElt
858
+ (*)FldRatElt
859
+ (*)FldReElt
860
+ FldResLst
861
+ FldResLstElt
862
+ FldTimeElt
863
+ GenMPolBElt
864
+ GenMPolBGElt
865
+ GenMPolElt
866
+ GenMPolGElt
867
+ GenMPolResElt
868
+ GrpAbElt
869
+ GrpAbGenElt
870
+ GrpAtcElt
871
+ GrpAutoElt
872
+ GrpBBElt
873
+ GrpBrdElt
874
+ GrpCaygElt
875
+ GrpDrchElt
876
+ GrpDrchEltNew
877
+ GrpElt
878
+ GrpFPCosElt
879
+ GrpFPCoxElt
880
+ GrpFPDcosElt
881
+ GrpFPElt
882
+ GrpFrmlElt
883
+ GrpGPCElt
884
+ GrpGenElt
885
+ GrpLieAutoElt
886
+ GrpLieElt
887
+ GrpMatElt
888
+ GrpMatProjElt
889
+ GrpPCElt
890
+ GrpPSL2
891
+ GrpPSL2Elt
892
+ GrpPermDcosElt
893
+ GrpPermElt
894
+ GrpPermLcosElt
895
+ GrpPermRcosElt
896
+ GrpRWSElt
897
+ GrpSLPElt
898
+ HilbSpcElt
899
+ Infty
900
+ IsoCrvEll
901
+ LatElt
902
+ List
903
+ MPolElt
904
+ MapCrvEll
905
+ MapIsoCrvEll
906
+ ModAbVarElt
907
+ ModAlgBasElt
908
+ ModAlgElt
909
+ ModAltElt
910
+ ModBrdtElt
911
+ ModCycElt
912
+ ModDedElt
913
+ ModEDElt
914
+ ModExtElt
915
+ ModFldElt
916
+ ModFrmElt
917
+ ModGrpElt
918
+ ModHgnElt
919
+ ModHrmElt
920
+ ModLatElt
921
+ ModMPolElt
922
+ ModMatFldElt
923
+ ModMatGrpElt
924
+ ModMatRngElt
925
+ ModRngElt
926
+ ModRngMPolRedElt
927
+ ModSSElt
928
+ ModSymElt
929
+ ModThetaElt
930
+ ModTupAlgElt
931
+ ModTupFldElt
932
+ ModTupRngElt
933
+ MonAbElt
934
+ MonFPElt
935
+ MonOrdElt
936
+ MonPlcElt
937
+ MonRWSElt
938
+ MonStgElt
939
+ MonStgGenElt
940
+ (*)Mtrx
941
+ MtrxSpcElt
942
+ OFldComElt
943
+ OFldReElt
944
+ PicCrvElt
945
+ PicHypSngElt
946
+ PlcCrvElt
947
+ PlcFunElt
948
+ PlcNumElt
949
+ (*)Pt
950
+ (*)PtEll
951
+ PtGrp
952
+ PtHyp
953
+ (*)QuadBinElt
954
+ Rec
955
+ RecField
956
+ RecFrmt
957
+ Ref
958
+ RegExp
959
+ RegExpAlg
960
+ Rel
961
+ RelElt
962
+ RngCycElt
963
+ RngDiffElt
964
+ RngDiffOpElt
965
+ RngElt
966
+ RngFracElt
967
+ RngFrmElt
968
+ RngFunFracElt
969
+ RngFunFracSchElt
970
+ RngFunFracSchEltOld
971
+ RngFunFracSchOld
972
+ RngFunGElt
973
+ RngFunOrdElt
974
+ RngFunOrdGElt
975
+ RngFunOrdIdl
976
+ RngGalElt
977
+ RngHckElt
978
+ RngHckIdl
979
+ (*)RngIntElt
980
+ RngIntResElt
981
+ RngMPolElt
982
+ RngMPolResElt
983
+ RngMSerElt
984
+ RngOrdElt
985
+ RngOrdFracIdl
986
+ RngOrdIdl
987
+ RngOrdResElt
988
+ RngPadElt
989
+ RngPadResElt
990
+ RngPadResExtElt
991
+ RngPowLazElt
992
+ RngQuadElt
993
+ RngQuadFracIdl
994
+ RngQuadIdl
995
+ RngReSubElt
996
+ RngRelKElt
997
+ RngSLPolElt
998
+ (*)RngSerElt
999
+ RngSerLaurElt
1000
+ RngSerPowElt
1001
+ RngSerPuisElt
1002
+ (*)RngUPolElt
1003
+ RngUPolResElt
1004
+ RngValElt
1005
+ RngWittElt
1006
+ SchGrpEll
1007
+ SeqEnum
1008
+ Set
1009
+ SetCspElt
1010
+ SetPtEll
1011
+ SgpFPElt
1012
+ SpcFldElt
1013
+ SpcHypElt
1014
+ SpcRngElt
1015
+ SubFldLatElt
1016
+ SubGrpLatElt
1017
+ SubModLatElt
1018
+ SymCrvEll
1019
+ UnusedMapCrvEll
1020
+
1021
+ */