passagemath-polyhedra 10.6.37__cp314-cp314-musllinux_1_2_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.
- passagemath_polyhedra/__init__.py +3 -0
- passagemath_polyhedra-10.6.37.dist-info/METADATA +367 -0
- passagemath_polyhedra-10.6.37.dist-info/METADATA.bak +369 -0
- passagemath_polyhedra-10.6.37.dist-info/RECORD +209 -0
- passagemath_polyhedra-10.6.37.dist-info/WHEEL +5 -0
- passagemath_polyhedra-10.6.37.dist-info/top_level.txt +3 -0
- passagemath_polyhedra.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_polyhedra.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_polyhedra.libs/libgomp-8949ffbe.so.1.0.0 +0 -0
- passagemath_polyhedra.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
- sage/all__sagemath_polyhedra.py +50 -0
- sage/game_theory/all.py +8 -0
- sage/game_theory/catalog.py +6 -0
- sage/game_theory/catalog_normal_form_games.py +923 -0
- sage/game_theory/cooperative_game.py +844 -0
- sage/game_theory/matching_game.py +1181 -0
- sage/game_theory/normal_form_game.py +2697 -0
- sage/game_theory/parser.py +275 -0
- sage/geometry/all__sagemath_polyhedra.py +22 -0
- sage/geometry/cone.py +6940 -0
- sage/geometry/cone_catalog.py +847 -0
- sage/geometry/cone_critical_angles.py +1027 -0
- sage/geometry/convex_set.py +1119 -0
- sage/geometry/fan.py +3743 -0
- sage/geometry/fan_isomorphism.py +389 -0
- sage/geometry/fan_morphism.py +1884 -0
- sage/geometry/hasse_diagram.py +202 -0
- sage/geometry/hyperplane_arrangement/affine_subspace.py +390 -0
- sage/geometry/hyperplane_arrangement/all.py +1 -0
- sage/geometry/hyperplane_arrangement/arrangement.py +3905 -0
- sage/geometry/hyperplane_arrangement/check_freeness.py +145 -0
- sage/geometry/hyperplane_arrangement/hyperplane.py +773 -0
- sage/geometry/hyperplane_arrangement/library.py +825 -0
- sage/geometry/hyperplane_arrangement/ordered_arrangement.py +642 -0
- sage/geometry/hyperplane_arrangement/plot.py +520 -0
- sage/geometry/integral_points.py +35 -0
- sage/geometry/integral_points_generic_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/integral_points_generic_dense.pyx +7 -0
- sage/geometry/lattice_polytope.py +5894 -0
- sage/geometry/linear_expression.py +773 -0
- sage/geometry/newton_polygon.py +767 -0
- sage/geometry/point_collection.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/point_collection.pyx +1008 -0
- sage/geometry/polyhedral_complex.py +2616 -0
- sage/geometry/polyhedron/all.py +8 -0
- sage/geometry/polyhedron/backend_cdd.py +460 -0
- sage/geometry/polyhedron/backend_cdd_rdf.py +231 -0
- sage/geometry/polyhedron/backend_field.py +347 -0
- sage/geometry/polyhedron/backend_normaliz.py +2503 -0
- sage/geometry/polyhedron/backend_number_field.py +168 -0
- sage/geometry/polyhedron/backend_polymake.py +765 -0
- sage/geometry/polyhedron/backend_ppl.py +582 -0
- sage/geometry/polyhedron/base.py +1206 -0
- sage/geometry/polyhedron/base0.py +1444 -0
- sage/geometry/polyhedron/base1.py +886 -0
- sage/geometry/polyhedron/base2.py +812 -0
- sage/geometry/polyhedron/base3.py +1845 -0
- sage/geometry/polyhedron/base4.py +1262 -0
- sage/geometry/polyhedron/base5.py +2700 -0
- sage/geometry/polyhedron/base6.py +1741 -0
- sage/geometry/polyhedron/base7.py +997 -0
- sage/geometry/polyhedron/base_QQ.py +1258 -0
- sage/geometry/polyhedron/base_RDF.py +98 -0
- sage/geometry/polyhedron/base_ZZ.py +934 -0
- sage/geometry/polyhedron/base_mutable.py +215 -0
- sage/geometry/polyhedron/base_number_field.py +122 -0
- sage/geometry/polyhedron/cdd_file_format.py +155 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/all.py +1 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/base.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd +76 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +3859 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd +39 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +1038 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/conversions.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd +9 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx +501 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd +207 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd +102 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +2274 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd +370 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx +84 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd +31 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx +587 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd +52 -0
- sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx +560 -0
- sage/geometry/polyhedron/constructor.py +773 -0
- sage/geometry/polyhedron/double_description.py +753 -0
- sage/geometry/polyhedron/double_description_inhomogeneous.py +564 -0
- sage/geometry/polyhedron/face.py +1060 -0
- sage/geometry/polyhedron/generating_function.py +1810 -0
- sage/geometry/polyhedron/lattice_euclidean_group_element.py +178 -0
- sage/geometry/polyhedron/library.py +3502 -0
- sage/geometry/polyhedron/misc.py +121 -0
- sage/geometry/polyhedron/modules/all.py +1 -0
- sage/geometry/polyhedron/modules/formal_polyhedra_module.py +155 -0
- sage/geometry/polyhedron/palp_database.py +447 -0
- sage/geometry/polyhedron/parent.py +1279 -0
- sage/geometry/polyhedron/plot.py +1986 -0
- sage/geometry/polyhedron/ppl_lattice_polygon.py +556 -0
- sage/geometry/polyhedron/ppl_lattice_polytope.py +1257 -0
- sage/geometry/polyhedron/representation.py +1723 -0
- sage/geometry/pseudolines.py +515 -0
- sage/geometry/relative_interior.py +445 -0
- sage/geometry/toric_plotter.py +1103 -0
- sage/geometry/triangulation/all.py +2 -0
- sage/geometry/triangulation/base.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/triangulation/base.pyx +963 -0
- sage/geometry/triangulation/data.h +147 -0
- sage/geometry/triangulation/data.pxd +4 -0
- sage/geometry/triangulation/element.py +914 -0
- sage/geometry/triangulation/functions.h +10 -0
- sage/geometry/triangulation/functions.pxd +4 -0
- sage/geometry/triangulation/point_configuration.py +2256 -0
- sage/geometry/triangulation/triangulations.h +49 -0
- sage/geometry/triangulation/triangulations.pxd +7 -0
- sage/geometry/voronoi_diagram.py +319 -0
- sage/interfaces/all__sagemath_polyhedra.py +1 -0
- sage/interfaces/polymake.py +2028 -0
- sage/numerical/all.py +13 -0
- sage/numerical/all__sagemath_polyhedra.py +11 -0
- sage/numerical/backends/all.py +1 -0
- sage/numerical/backends/all__sagemath_polyhedra.py +1 -0
- sage/numerical/backends/cvxopt_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/cvxopt_backend.pyx +1006 -0
- sage/numerical/backends/cvxopt_backend_test.py +19 -0
- sage/numerical/backends/cvxopt_sdp_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/cvxopt_sdp_backend.pyx +382 -0
- sage/numerical/backends/cvxpy_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/cvxpy_backend.pxd +41 -0
- sage/numerical/backends/cvxpy_backend.pyx +934 -0
- sage/numerical/backends/cvxpy_backend_test.py +13 -0
- sage/numerical/backends/generic_backend_test.py +24 -0
- sage/numerical/backends/interactivelp_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/interactivelp_backend.pxd +36 -0
- sage/numerical/backends/interactivelp_backend.pyx +1231 -0
- sage/numerical/backends/interactivelp_backend_test.py +12 -0
- sage/numerical/backends/logging_backend.py +391 -0
- sage/numerical/backends/matrix_sdp_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/matrix_sdp_backend.pxd +15 -0
- sage/numerical/backends/matrix_sdp_backend.pyx +478 -0
- sage/numerical/backends/ppl_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/ppl_backend.pyx +1126 -0
- sage/numerical/backends/ppl_backend_test.py +13 -0
- sage/numerical/backends/scip_backend.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/backends/scip_backend.pxd +22 -0
- sage/numerical/backends/scip_backend.pyx +1289 -0
- sage/numerical/backends/scip_backend_test.py +13 -0
- sage/numerical/interactive_simplex_method.py +5338 -0
- sage/numerical/knapsack.py +665 -0
- sage/numerical/linear_functions.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/linear_functions.pxd +31 -0
- sage/numerical/linear_functions.pyx +1648 -0
- sage/numerical/linear_tensor.py +470 -0
- sage/numerical/linear_tensor_constraints.py +448 -0
- sage/numerical/linear_tensor_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/linear_tensor_element.pxd +6 -0
- sage/numerical/linear_tensor_element.pyx +459 -0
- sage/numerical/mip.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/mip.pxd +40 -0
- sage/numerical/mip.pyx +3667 -0
- sage/numerical/sdp.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/sdp.pxd +39 -0
- sage/numerical/sdp.pyx +1433 -0
- sage/rings/all__sagemath_polyhedra.py +3 -0
- sage/rings/polynomial/all__sagemath_polyhedra.py +10 -0
- sage/rings/polynomial/omega.py +982 -0
- sage/schemes/all__sagemath_polyhedra.py +2 -0
- sage/schemes/toric/all.py +10 -0
- sage/schemes/toric/chow_group.py +1248 -0
- sage/schemes/toric/divisor.py +2082 -0
- sage/schemes/toric/divisor_class.cpython-314-x86_64-linux-musl.so +0 -0
- sage/schemes/toric/divisor_class.pyx +322 -0
- sage/schemes/toric/fano_variety.py +1606 -0
- sage/schemes/toric/homset.py +650 -0
- sage/schemes/toric/ideal.py +451 -0
- sage/schemes/toric/library.py +1322 -0
- sage/schemes/toric/morphism.py +1958 -0
- sage/schemes/toric/points.py +1032 -0
- sage/schemes/toric/sheaf/all.py +1 -0
- sage/schemes/toric/sheaf/constructor.py +302 -0
- sage/schemes/toric/sheaf/klyachko.py +921 -0
- sage/schemes/toric/toric_subscheme.py +905 -0
- sage/schemes/toric/variety.py +3460 -0
- sage/schemes/toric/weierstrass.py +1078 -0
- sage/schemes/toric/weierstrass_covering.py +457 -0
- sage/schemes/toric/weierstrass_higher.py +288 -0
- sage_wheels/share/reflexive_polytopes/Full2d/zzdb.info +10 -0
- sage_wheels/share/reflexive_polytopes/Full2d/zzdb.v03 +0 -0
- sage_wheels/share/reflexive_polytopes/Full2d/zzdb.v04 +0 -0
- sage_wheels/share/reflexive_polytopes/Full2d/zzdb.v05 +1 -0
- sage_wheels/share/reflexive_polytopes/Full2d/zzdb.v06 +1 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.info +22 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v04 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v05 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v06 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v07 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v08 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v09 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v10 +0 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v11 +1 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v12 +1 -0
- sage_wheels/share/reflexive_polytopes/Full3d/zzdb.v13 +1 -0
- sage_wheels/share/reflexive_polytopes/reflexive_polytopes_2d +80 -0
- sage_wheels/share/reflexive_polytopes/reflexive_polytopes_3d +37977 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-polyhedra
|
|
2
|
+
# sage.doctest: needs sage.geometry.polyhedron sage.graphs
|
|
3
|
+
r"""
|
|
4
|
+
Weierstrass for elliptic curves in higher codimension
|
|
5
|
+
|
|
6
|
+
The :mod:`~sage.schemes.toric.weierstrass` module lets you transform a
|
|
7
|
+
genus-one curve, given as a hypersurface in a toric surface, into
|
|
8
|
+
Weierstrass form. The purpose of this module is to extend this to
|
|
9
|
+
higher codimension subschemes of toric varieties. In general, this is
|
|
10
|
+
an unsolved problem. However, for certain special cases this is known.
|
|
11
|
+
|
|
12
|
+
The simplest codimension-two case is the complete intersection of two
|
|
13
|
+
quadratic equations in `\mathbb{P}^3` ::
|
|
14
|
+
|
|
15
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
16
|
+
sage: quadratic1 = w^2 + x^2 + y^2
|
|
17
|
+
sage: quadratic2 = z^2 + w*x
|
|
18
|
+
sage: WeierstrassForm([quadratic1, quadratic2])
|
|
19
|
+
(-1/4, 0)
|
|
20
|
+
|
|
21
|
+
Hence, the Weierstrass form of this complete intersection is `Y^2 =
|
|
22
|
+
X^3 - \frac{1}{4} X Z^4`.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
# ****************************************************************************
|
|
26
|
+
# Copyright (C) 2012 Volker Braun <vbraun.name@gmail.com>
|
|
27
|
+
#
|
|
28
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
29
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
30
|
+
# the License, or (at your option) any later version.
|
|
31
|
+
# https://www.gnu.org/licenses/
|
|
32
|
+
# ****************************************************************************
|
|
33
|
+
|
|
34
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
35
|
+
from sage.rings.invariants.invariant_theory import invariant_theory
|
|
36
|
+
from sage.schemes.toric.weierstrass import _check_homogeneity
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
######################################################################
|
|
40
|
+
def WeierstrassForm2(polynomial, variables=None, transformation=False):
|
|
41
|
+
r"""
|
|
42
|
+
Helper function for :func:`~sage.schemes.toric.weierstrass.WeierstrassForm`.
|
|
43
|
+
|
|
44
|
+
Currently, only the case of the complete intersection of two
|
|
45
|
+
quadratic equations in `\mathbb{P}^3` is supported.
|
|
46
|
+
|
|
47
|
+
INPUT / OUTPUT: see :func:`~sage.schemes.toric.weierstrass.WeierstrassForm`
|
|
48
|
+
|
|
49
|
+
TESTS::
|
|
50
|
+
|
|
51
|
+
sage: from sage.schemes.toric.weierstrass_higher import WeierstrassForm2
|
|
52
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
53
|
+
sage: quadratic1 = w^2 + x^2 + y^2
|
|
54
|
+
sage: quadratic2 = z^2 + w*x
|
|
55
|
+
sage: WeierstrassForm2([quadratic1, quadratic2])
|
|
56
|
+
(-1/4, 0)
|
|
57
|
+
"""
|
|
58
|
+
if transformation:
|
|
59
|
+
return WeierstrassMap_P3(*polynomial, variables=variables)
|
|
60
|
+
else:
|
|
61
|
+
return WeierstrassForm_P3(*polynomial, variables=variables)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
######################################################################
|
|
65
|
+
#
|
|
66
|
+
# Weierstrass form of complete intersection of two quadratics in P^3
|
|
67
|
+
#
|
|
68
|
+
######################################################################
|
|
69
|
+
def _check_polynomials_P3(quadratic1, quadratic2, variables):
|
|
70
|
+
"""
|
|
71
|
+
Check that the polynomial is weighted homogeneous in standard variables.
|
|
72
|
+
|
|
73
|
+
INPUT:
|
|
74
|
+
|
|
75
|
+
- ``quadratic1``, ``quadratic2`` -- two quadratic polynomials in 4
|
|
76
|
+
homogeneous or 3 inhomogeneous variables
|
|
77
|
+
|
|
78
|
+
- ``variables`` -- the variables or ``None`` (default)
|
|
79
|
+
|
|
80
|
+
OUTPUT:
|
|
81
|
+
|
|
82
|
+
This function returns ``variables``, potentially guessed from the
|
|
83
|
+
polynomial ring. A :exc:`ValueError` is raised if the polynomial is
|
|
84
|
+
not homogeneous.
|
|
85
|
+
|
|
86
|
+
EXAMPLES::
|
|
87
|
+
|
|
88
|
+
sage: from sage.schemes.toric.weierstrass_higher import _check_polynomials_P3
|
|
89
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
90
|
+
sage: quadratic = w^2 + x^2 + y^2 + z^2
|
|
91
|
+
sage: _check_polynomials_P3(w^2, quadratic, [w,x,y,z])
|
|
92
|
+
(w, x, y, z)
|
|
93
|
+
sage: _check_polynomials_P3(w^2, quadratic, None)
|
|
94
|
+
(w, x, y, z)
|
|
95
|
+
sage: _check_polynomials_P3(z^2, quadratic.subs(w=0), None)
|
|
96
|
+
(x, y, z, None)
|
|
97
|
+
sage: R.<w,x,y,z,t> = QQ[]
|
|
98
|
+
sage: quadratic = w^2 + x^2 + y^2 + z^2 + t*(x*y+y*z+z*w+w*x)
|
|
99
|
+
sage: _check_polynomials_P3(w^2, quadratic, [w,x,y,z])
|
|
100
|
+
(w, x, y, z)
|
|
101
|
+
sage: _check_polynomials_P3(w^2, quadratic, [w,x,y,t])
|
|
102
|
+
Traceback (most recent call last):
|
|
103
|
+
...
|
|
104
|
+
ValueError: the polynomial is not homogeneous with weights (1, 1, 1, 1)
|
|
105
|
+
"""
|
|
106
|
+
if quadratic1.parent() is not quadratic2.parent():
|
|
107
|
+
raise ValueError('the two quadratics must be in the same polynomial ring')
|
|
108
|
+
if variables is None:
|
|
109
|
+
variables = quadratic1.variables() + quadratic2.variables()
|
|
110
|
+
variables = sorted(set(variables), reverse=True)
|
|
111
|
+
if len(variables) == 4:
|
|
112
|
+
w, x, y, z = variables
|
|
113
|
+
_check_homogeneity(quadratic1, [w, x, y, z], (1, 1, 1, 1), 2)
|
|
114
|
+
_check_homogeneity(quadratic2, [w, x, y, z], (1, 1, 1, 1), 2)
|
|
115
|
+
elif len(variables) == 3:
|
|
116
|
+
w, x, y = variables
|
|
117
|
+
z = None
|
|
118
|
+
else:
|
|
119
|
+
raise ValueError(f'need three or four variables, got {variables}')
|
|
120
|
+
return (w, x, y, z)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
######################################################################
|
|
124
|
+
def _biquadratic_syzygy_quartic(quadratic1, quadratic2, variables=None):
|
|
125
|
+
r"""
|
|
126
|
+
Helper function for the Weierstrass form of a biquadratic in `\mathbb{P}^3`.
|
|
127
|
+
|
|
128
|
+
The invariants and covariants of a quaternary biquadratic satisfy
|
|
129
|
+
the relation
|
|
130
|
+
:meth:`sage.rings.invariant_theory.TwoQuaternaryQuadratics.syzygy`,
|
|
131
|
+
which is (modulo the two quadratic equations) of the form `J^2 =
|
|
132
|
+
p_4(T, T')` where
|
|
133
|
+
|
|
134
|
+
* `J`, `T`, `T'` are the covariants of the biquadratic.
|
|
135
|
+
|
|
136
|
+
* `p_4` is some quartic polynomial whose coefficients are
|
|
137
|
+
invariants of the biquadratic.
|
|
138
|
+
|
|
139
|
+
INPUT:
|
|
140
|
+
|
|
141
|
+
See :func:`WeierstrassForm_P3`.
|
|
142
|
+
|
|
143
|
+
OUTPUT: a triple consisting of
|
|
144
|
+
|
|
145
|
+
- The quaternary biquadratic as an algebraic form
|
|
146
|
+
:class:`~sage.rings.invariant_theory.TwoQuaternaryQuadratics`
|
|
147
|
+
|
|
148
|
+
- The binary quartic `p_4` as a
|
|
149
|
+
:class:`~sage.rings.invariant_theory.BinaryQuartic`
|
|
150
|
+
|
|
151
|
+
- The dictionary of variable substitutions from the variables of
|
|
152
|
+
the quartic to the variables of the biquadratic.
|
|
153
|
+
|
|
154
|
+
EXAMPLES::
|
|
155
|
+
|
|
156
|
+
sage: from sage.schemes.toric.weierstrass_higher import _biquadratic_syzygy_quartic
|
|
157
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
158
|
+
sage: _biquadratic_syzygy_quartic(w^2 + x^2 + y^2, z^2)
|
|
159
|
+
(Joint quaternary quadratic with coefficients (1, 1, 1, 0, 0, 0, 0, 0, 0, 0)
|
|
160
|
+
and quaternary quadratic with coefficients (0, 0, 0, 1, 0, 0, 0, 0, 0, 0),
|
|
161
|
+
Binary quartic with coefficients (0, 0, 0, -1, 0), {aux...})
|
|
162
|
+
"""
|
|
163
|
+
w, x, y, z = _check_polynomials_P3(quadratic1, quadratic2, variables)
|
|
164
|
+
biquadratic = invariant_theory.quaternary_biquadratic(quadratic1, quadratic2, [w, x, y, z])
|
|
165
|
+
|
|
166
|
+
# construct auxiliary polynomial ring to work with the rhs of the syzygy
|
|
167
|
+
R = biquadratic.ring()
|
|
168
|
+
n = R.ngens()
|
|
169
|
+
R_aux = PolynomialRing(R.base_ring(), n + 2, 'aux')
|
|
170
|
+
to_aux = {}
|
|
171
|
+
from_aux = {}
|
|
172
|
+
for var, var_aux in zip(R.gens(), R_aux.gens()[0:n]):
|
|
173
|
+
to_aux[var] = var_aux
|
|
174
|
+
from_aux[var_aux] = var
|
|
175
|
+
T, T_prime = R_aux.gens()[n:]
|
|
176
|
+
from_aux[T] = biquadratic.T_covariant()
|
|
177
|
+
from_aux[T_prime] = biquadratic.T_prime_covariant()
|
|
178
|
+
|
|
179
|
+
# Syzygy is J^2 = syz_rhs + (terms that vanish on the biquadratic) with
|
|
180
|
+
# J = biquadratic.J_covariant()
|
|
181
|
+
syz_rhs = T**4 * biquadratic.Delta_invariant().subs(to_aux) \
|
|
182
|
+
- T**3 * T_prime * biquadratic.Theta_invariant().subs(to_aux) \
|
|
183
|
+
+ T**2 * T_prime**2 * biquadratic.Phi_invariant().subs(to_aux) \
|
|
184
|
+
- T * T_prime**3 * biquadratic.Theta_prime_invariant().subs(to_aux) \
|
|
185
|
+
+ T_prime**4 * biquadratic.Delta_prime_invariant().subs(to_aux)
|
|
186
|
+
quartic = invariant_theory.binary_quartic(syz_rhs, [T, T_prime])
|
|
187
|
+
return (biquadratic, quartic, from_aux)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
######################################################################
|
|
191
|
+
def WeierstrassForm_P3(quadratic1, quadratic2, variables=None):
|
|
192
|
+
r"""
|
|
193
|
+
Bring a complete intersection of two quadratics into Weierstrass form.
|
|
194
|
+
|
|
195
|
+
Input/output is the same as
|
|
196
|
+
:func:`sage.schemes.toric.weierstrass.WeierstrassForm`, except
|
|
197
|
+
that the two input polynomials must be quadratic polynomials in
|
|
198
|
+
`\mathbb{P}^3`.
|
|
199
|
+
|
|
200
|
+
EXAMPLES::
|
|
201
|
+
|
|
202
|
+
sage: from sage.schemes.toric.weierstrass_higher import WeierstrassForm_P3
|
|
203
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
204
|
+
sage: quadratic1 = w^2 + x^2 + y^2
|
|
205
|
+
sage: quadratic2 = z^2 + w*x
|
|
206
|
+
sage: WeierstrassForm_P3(quadratic1, quadratic2)
|
|
207
|
+
(-1/4, 0)
|
|
208
|
+
|
|
209
|
+
TESTS::
|
|
210
|
+
|
|
211
|
+
sage: R.<w,x,y,z,a0,a1,a2,a3,b0,b1,b2,b3,b4,b5> = QQ[]
|
|
212
|
+
sage: p1 = w^2 + x^2 + y^2 + z^2
|
|
213
|
+
sage: p2 = a0*w^2 + a1*x^2 + a2*y^2 + a3*z^2
|
|
214
|
+
sage: p2 += b0*x*y + b1*x*z + b2*x*w + b3*y*z + b4*y*w + b5*z*w
|
|
215
|
+
sage: a, b = WeierstrassForm_P3(p1, p2, [w,x,y,z])
|
|
216
|
+
sage: a.total_degree(), len(a.coefficients())
|
|
217
|
+
(4, 107)
|
|
218
|
+
sage: b.total_degree(), len(b.coefficients())
|
|
219
|
+
(6, 648)
|
|
220
|
+
"""
|
|
221
|
+
biquadratic, quartic, from_aux = \
|
|
222
|
+
_biquadratic_syzygy_quartic(quadratic1, quadratic2, variables=variables)
|
|
223
|
+
a = quartic.EisensteinD().subs(from_aux)
|
|
224
|
+
b = quartic.EisensteinE().subs(from_aux)
|
|
225
|
+
return (-4 * a, 16 * b)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
######################################################################
|
|
229
|
+
def WeierstrassMap_P3(quadratic1, quadratic2, variables=None):
|
|
230
|
+
r"""
|
|
231
|
+
Bring a complete intersection of two quadratics into Weierstrass form.
|
|
232
|
+
|
|
233
|
+
Input/output is the same as
|
|
234
|
+
:func:`sage.schemes.toric.weierstrass.WeierstrassForm`, except
|
|
235
|
+
that the two input polynomials must be quadratic polynomials in
|
|
236
|
+
`\mathbb{P}^3`.
|
|
237
|
+
|
|
238
|
+
EXAMPLES::
|
|
239
|
+
|
|
240
|
+
sage: from sage.schemes.toric.weierstrass_higher import \
|
|
241
|
+
....: WeierstrassMap_P3, WeierstrassForm_P3
|
|
242
|
+
sage: R.<w,x,y,z> = QQ[]
|
|
243
|
+
sage: quadratic1 = w^2 + x^2 + y^2
|
|
244
|
+
sage: quadratic2 = z^2 + w*x
|
|
245
|
+
sage: X, Y, Z = WeierstrassMap_P3(quadratic1, quadratic2)
|
|
246
|
+
sage: X
|
|
247
|
+
1/1024*w^8 + 3/256*w^6*x^2 + 19/512*w^4*x^4 + 3/256*w^2*x^6 + 1/1024*x^8
|
|
248
|
+
sage: Y
|
|
249
|
+
1/32768*w^12 - 7/16384*w^10*x^2 - 145/32768*w^8*x^4 - 49/8192*w^6*x^6
|
|
250
|
+
- 145/32768*w^4*x^8 - 7/16384*w^2*x^10 + 1/32768*x^12
|
|
251
|
+
sage: Z
|
|
252
|
+
-1/8*w^2*y*z + 1/8*x^2*y*z
|
|
253
|
+
|
|
254
|
+
sage: a, b = WeierstrassForm_P3(quadratic1, quadratic2); a, b
|
|
255
|
+
(-1/4, 0)
|
|
256
|
+
|
|
257
|
+
sage: ideal = R.ideal(quadratic1, quadratic2)
|
|
258
|
+
sage: (-Y^2 + X^3 + a*X*Z^4 + b*Z^6).reduce(ideal) # needs sage.libs.singular
|
|
259
|
+
0
|
|
260
|
+
|
|
261
|
+
TESTS::
|
|
262
|
+
|
|
263
|
+
sage: R.<w,x,y,z,a0,a1,a2,a3> = GF(101)[]
|
|
264
|
+
sage: p1 = w^2 + x^2 + y^2 + z^2
|
|
265
|
+
sage: p2 = a0*w^2 + a1*x^2 + a2*y^2 + a3*z^2
|
|
266
|
+
sage: X, Y, Z = WeierstrassMap_P3(p1, p2, [w,x,y,z])
|
|
267
|
+
sage: X.total_degree(), len(X.coefficients())
|
|
268
|
+
(22, 4164)
|
|
269
|
+
sage: Y.total_degree(), len(Y.coefficients())
|
|
270
|
+
(33, 26912)
|
|
271
|
+
sage: Z.total_degree(), len(Z.coefficients())
|
|
272
|
+
(10, 24)
|
|
273
|
+
sage: Z
|
|
274
|
+
w*x*y*z*a0^3*a1^2*a2 - w*x*y*z*a0^2*a1^3*a2 - w*x*y*z*a0^3*a1*a2^2
|
|
275
|
+
+ w*x*y*z*a0*a1^3*a2^2 + w*x*y*z*a0^2*a1*a2^3 - w*x*y*z*a0*a1^2*a2^3
|
|
276
|
+
- w*x*y*z*a0^3*a1^2*a3 + w*x*y*z*a0^2*a1^3*a3 + w*x*y*z*a0^3*a2^2*a3
|
|
277
|
+
- w*x*y*z*a1^3*a2^2*a3 - w*x*y*z*a0^2*a2^3*a3 + w*x*y*z*a1^2*a2^3*a3
|
|
278
|
+
+ w*x*y*z*a0^3*a1*a3^2 - w*x*y*z*a0*a1^3*a3^2 - w*x*y*z*a0^3*a2*a3^2
|
|
279
|
+
+ w*x*y*z*a1^3*a2*a3^2 + w*x*y*z*a0*a2^3*a3^2 - w*x*y*z*a1*a2^3*a3^2
|
|
280
|
+
- w*x*y*z*a0^2*a1*a3^3 + w*x*y*z*a0*a1^2*a3^3 + w*x*y*z*a0^2*a2*a3^3
|
|
281
|
+
- w*x*y*z*a1^2*a2*a3^3 - w*x*y*z*a0*a2^2*a3^3 + w*x*y*z*a1*a2^2*a3^3
|
|
282
|
+
"""
|
|
283
|
+
biquadratic, quartic, from_aux = \
|
|
284
|
+
_biquadratic_syzygy_quartic(quadratic1, quadratic2, variables=variables)
|
|
285
|
+
J = biquadratic.J_covariant()
|
|
286
|
+
g = quartic.g_covariant().subs(from_aux)
|
|
287
|
+
h = quartic.h_covariant().subs(from_aux)
|
|
288
|
+
return (4 * g, 4 * h, J)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
\Na
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
3 10 13 10 43 2199 79 0 11549 0 0 0 0
|
|
2
|
+
|
|
3
|
+
4 4
|
|
4
|
+
2 8 3 5 4 11 5 3
|
|
5
|
+
5 5
|
|
6
|
+
2 1 3 82 4 43 5 34 6 2
|
|
7
|
+
6 6
|
|
8
|
+
3 45 4 149 5 142 6 45 7 3 8 1
|
|
9
|
+
7 6
|
|
10
|
+
3 14 4 129 5 310 6 85 7 22 8 5
|
|
11
|
+
8 5
|
|
12
|
+
4 34 5 163 6 269 7 48 8 18
|
|
13
|
+
9 5
|
|
14
|
+
5 48 6 215 7 63 8 26 9 1
|
|
15
|
+
10 6
|
|
16
|
+
5 50 6 58 7 4 8 13 9 7 10 1
|
|
17
|
+
11 3
|
|
18
|
+
6 22 7 12 8 1
|
|
19
|
+
12 2
|
|
20
|
+
6 4 7 1
|
|
21
|
+
13 1
|
|
22
|
+
7 2
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�aq����Ǝ�!���b������"\o�Q��ǐ�Ŀ��B�4�1���[����*��-�����ψ��e5��y��o�n6[�n,�.o��K����^}�|�에3=s�M�|e(��*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
O/�6�1���|%P��j{ywx`����Swx(}�
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�D���8lP�e�
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
3 2
|
|
2
|
+
1 0
|
|
3
|
+
0 1
|
|
4
|
+
-1 -1
|
|
5
|
+
3 2
|
|
6
|
+
1 0
|
|
7
|
+
0 1
|
|
8
|
+
-2 -1
|
|
9
|
+
4 2
|
|
10
|
+
1 0
|
|
11
|
+
-1 0
|
|
12
|
+
0 1
|
|
13
|
+
1 -1
|
|
14
|
+
4 2
|
|
15
|
+
1 0
|
|
16
|
+
0 1
|
|
17
|
+
0 -1
|
|
18
|
+
-1 0
|
|
19
|
+
4 2
|
|
20
|
+
1 0
|
|
21
|
+
0 1
|
|
22
|
+
-1 -1
|
|
23
|
+
-1 1
|
|
24
|
+
5 2
|
|
25
|
+
1 0
|
|
26
|
+
0 1
|
|
27
|
+
0 -1
|
|
28
|
+
-1 0
|
|
29
|
+
1 1
|
|
30
|
+
3 2
|
|
31
|
+
1 0
|
|
32
|
+
0 1
|
|
33
|
+
-3 -2
|
|
34
|
+
4 2
|
|
35
|
+
1 0
|
|
36
|
+
0 1
|
|
37
|
+
0 -1
|
|
38
|
+
-2 1
|
|
39
|
+
5 2
|
|
40
|
+
1 0
|
|
41
|
+
0 1
|
|
42
|
+
0 -1
|
|
43
|
+
-1 1
|
|
44
|
+
-1 -1
|
|
45
|
+
6 2
|
|
46
|
+
1 0
|
|
47
|
+
0 1
|
|
48
|
+
1 -1
|
|
49
|
+
-1 1
|
|
50
|
+
0 -1
|
|
51
|
+
-1 0
|
|
52
|
+
4 2
|
|
53
|
+
1 0
|
|
54
|
+
0 1
|
|
55
|
+
-1 1
|
|
56
|
+
-1 -2
|
|
57
|
+
5 2
|
|
58
|
+
1 0
|
|
59
|
+
0 1
|
|
60
|
+
-1 1
|
|
61
|
+
1 -1
|
|
62
|
+
-1 -1
|
|
63
|
+
3 2
|
|
64
|
+
1 0
|
|
65
|
+
1 2
|
|
66
|
+
-3 -2
|
|
67
|
+
4 2
|
|
68
|
+
1 0
|
|
69
|
+
0 1
|
|
70
|
+
-2 1
|
|
71
|
+
1 -2
|
|
72
|
+
4 2
|
|
73
|
+
1 0
|
|
74
|
+
1 2
|
|
75
|
+
-1 -2
|
|
76
|
+
-1 0
|
|
77
|
+
3 2
|
|
78
|
+
1 0
|
|
79
|
+
1 3
|
|
80
|
+
-2 -3
|