passagemath-categories 10.6.32__cp314-cp314t-musllinux_1_2_aarch64.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_categories-10.6.32.dist-info/METADATA +156 -0
- passagemath_categories-10.6.32.dist-info/RECORD +719 -0
- passagemath_categories-10.6.32.dist-info/WHEEL +5 -0
- passagemath_categories-10.6.32.dist-info/top_level.txt +2 -0
- passagemath_categories.libs/libgcc_s-2d945d6c.so.1 +0 -0
- passagemath_categories.libs/libgmp-28992bcb.so.10.5.0 +0 -0
- passagemath_categories.libs/libstdc++-85f2cd6d.so.6.0.33 +0 -0
- sage/all__sagemath_categories.py +28 -0
- sage/arith/all.py +38 -0
- sage/arith/constants.pxd +27 -0
- sage/arith/functions.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/functions.pxd +4 -0
- sage/arith/functions.pyx +221 -0
- sage/arith/misc.py +6552 -0
- sage/arith/multi_modular.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/multi_modular.pxd +39 -0
- sage/arith/multi_modular.pyx +994 -0
- sage/arith/rational_reconstruction.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/rational_reconstruction.pxd +4 -0
- sage/arith/rational_reconstruction.pyx +115 -0
- sage/arith/srange.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/srange.pyx +571 -0
- sage/calculus/all__sagemath_categories.py +2 -0
- sage/calculus/functional.py +481 -0
- sage/calculus/functions.py +151 -0
- sage/categories/additive_groups.py +73 -0
- sage/categories/additive_magmas.py +1044 -0
- sage/categories/additive_monoids.py +114 -0
- sage/categories/additive_semigroups.py +184 -0
- sage/categories/affine_weyl_groups.py +238 -0
- sage/categories/algebra_ideals.py +95 -0
- sage/categories/algebra_modules.py +96 -0
- sage/categories/algebras.py +349 -0
- sage/categories/algebras_with_basis.py +377 -0
- sage/categories/all.py +160 -0
- sage/categories/aperiodic_semigroups.py +29 -0
- sage/categories/associative_algebras.py +47 -0
- sage/categories/bialgebras.py +101 -0
- sage/categories/bialgebras_with_basis.py +414 -0
- sage/categories/bimodules.py +206 -0
- sage/categories/chain_complexes.py +268 -0
- sage/categories/classical_crystals.py +480 -0
- sage/categories/coalgebras.py +405 -0
- sage/categories/coalgebras_with_basis.py +232 -0
- sage/categories/coercion_methods.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/categories/coercion_methods.pyx +52 -0
- sage/categories/commutative_additive_groups.py +104 -0
- sage/categories/commutative_additive_monoids.py +45 -0
- sage/categories/commutative_additive_semigroups.py +48 -0
- sage/categories/commutative_algebra_ideals.py +87 -0
- sage/categories/commutative_algebras.py +94 -0
- sage/categories/commutative_ring_ideals.py +58 -0
- sage/categories/commutative_rings.py +736 -0
- sage/categories/complete_discrete_valuation.py +293 -0
- sage/categories/complex_reflection_groups.py +145 -0
- sage/categories/complex_reflection_or_generalized_coxeter_groups.py +1249 -0
- sage/categories/coxeter_group_algebras.py +186 -0
- sage/categories/coxeter_groups.py +3402 -0
- sage/categories/crystals.py +2628 -0
- sage/categories/cw_complexes.py +216 -0
- sage/categories/dedekind_domains.py +137 -0
- sage/categories/discrete_valuation.py +325 -0
- sage/categories/distributive_magmas_and_additive_magmas.py +100 -0
- sage/categories/division_rings.py +114 -0
- sage/categories/domains.py +95 -0
- sage/categories/drinfeld_modules.py +789 -0
- sage/categories/dual.py +42 -0
- sage/categories/enumerated_sets.py +1146 -0
- sage/categories/euclidean_domains.py +271 -0
- sage/categories/examples/algebras_with_basis.py +102 -0
- sage/categories/examples/all.py +1 -0
- sage/categories/examples/commutative_additive_monoids.py +130 -0
- sage/categories/examples/commutative_additive_semigroups.py +199 -0
- sage/categories/examples/coxeter_groups.py +8 -0
- sage/categories/examples/crystals.py +236 -0
- sage/categories/examples/cw_complexes.py +163 -0
- sage/categories/examples/facade_sets.py +187 -0
- sage/categories/examples/filtered_algebras_with_basis.py +204 -0
- sage/categories/examples/filtered_modules_with_basis.py +154 -0
- sage/categories/examples/finite_coxeter_groups.py +252 -0
- sage/categories/examples/finite_dimensional_algebras_with_basis.py +148 -0
- sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py +495 -0
- sage/categories/examples/finite_enumerated_sets.py +208 -0
- sage/categories/examples/finite_monoids.py +150 -0
- sage/categories/examples/finite_semigroups.py +190 -0
- sage/categories/examples/finite_weyl_groups.py +191 -0
- sage/categories/examples/graded_connected_hopf_algebras_with_basis.py +152 -0
- sage/categories/examples/graded_modules_with_basis.py +168 -0
- sage/categories/examples/graphs.py +122 -0
- sage/categories/examples/hopf_algebras_with_basis.py +145 -0
- sage/categories/examples/infinite_enumerated_sets.py +190 -0
- sage/categories/examples/lie_algebras.py +352 -0
- sage/categories/examples/lie_algebras_with_basis.py +196 -0
- sage/categories/examples/magmas.py +162 -0
- sage/categories/examples/manifolds.py +94 -0
- sage/categories/examples/monoids.py +144 -0
- sage/categories/examples/posets.py +178 -0
- sage/categories/examples/semigroups.py +580 -0
- sage/categories/examples/semigroups_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/categories/examples/semigroups_cython.pyx +221 -0
- sage/categories/examples/semirings.py +249 -0
- sage/categories/examples/sets_cat.py +706 -0
- sage/categories/examples/sets_with_grading.py +101 -0
- sage/categories/examples/with_realizations.py +542 -0
- sage/categories/fields.py +991 -0
- sage/categories/filtered_algebras.py +63 -0
- sage/categories/filtered_algebras_with_basis.py +548 -0
- sage/categories/filtered_hopf_algebras_with_basis.py +138 -0
- sage/categories/filtered_modules.py +210 -0
- sage/categories/filtered_modules_with_basis.py +1209 -0
- sage/categories/finite_complex_reflection_groups.py +1506 -0
- sage/categories/finite_coxeter_groups.py +1138 -0
- sage/categories/finite_crystals.py +103 -0
- sage/categories/finite_dimensional_algebras_with_basis.py +1860 -0
- sage/categories/finite_dimensional_bialgebras_with_basis.py +33 -0
- sage/categories/finite_dimensional_coalgebras_with_basis.py +33 -0
- sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py +231 -0
- sage/categories/finite_dimensional_hopf_algebras_with_basis.py +38 -0
- sage/categories/finite_dimensional_lie_algebras_with_basis.py +2774 -0
- sage/categories/finite_dimensional_modules_with_basis.py +1407 -0
- sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py +167 -0
- sage/categories/finite_dimensional_semisimple_algebras_with_basis.py +270 -0
- sage/categories/finite_enumerated_sets.py +769 -0
- sage/categories/finite_fields.py +252 -0
- sage/categories/finite_groups.py +256 -0
- sage/categories/finite_lattice_posets.py +242 -0
- sage/categories/finite_monoids.py +316 -0
- sage/categories/finite_permutation_groups.py +339 -0
- sage/categories/finite_posets.py +1994 -0
- sage/categories/finite_semigroups.py +136 -0
- sage/categories/finite_sets.py +93 -0
- sage/categories/finite_weyl_groups.py +39 -0
- sage/categories/finitely_generated_lambda_bracket_algebras.py +112 -0
- sage/categories/finitely_generated_lie_conformal_algebras.py +114 -0
- sage/categories/finitely_generated_magmas.py +57 -0
- sage/categories/finitely_generated_semigroups.py +214 -0
- sage/categories/function_fields.py +76 -0
- sage/categories/g_sets.py +77 -0
- sage/categories/gcd_domains.py +65 -0
- sage/categories/generalized_coxeter_groups.py +94 -0
- sage/categories/graded_algebras.py +85 -0
- sage/categories/graded_algebras_with_basis.py +258 -0
- sage/categories/graded_bialgebras.py +32 -0
- sage/categories/graded_bialgebras_with_basis.py +32 -0
- sage/categories/graded_coalgebras.py +65 -0
- sage/categories/graded_coalgebras_with_basis.py +51 -0
- sage/categories/graded_hopf_algebras.py +41 -0
- sage/categories/graded_hopf_algebras_with_basis.py +169 -0
- sage/categories/graded_lie_algebras.py +91 -0
- sage/categories/graded_lie_algebras_with_basis.py +44 -0
- sage/categories/graded_lie_conformal_algebras.py +74 -0
- sage/categories/graded_modules.py +133 -0
- sage/categories/graded_modules_with_basis.py +329 -0
- sage/categories/graphs.py +138 -0
- sage/categories/group_algebras.py +430 -0
- sage/categories/groupoid.py +94 -0
- sage/categories/groups.py +667 -0
- sage/categories/h_trivial_semigroups.py +64 -0
- sage/categories/hecke_modules.py +185 -0
- sage/categories/highest_weight_crystals.py +980 -0
- sage/categories/hopf_algebras.py +219 -0
- sage/categories/hopf_algebras_with_basis.py +309 -0
- sage/categories/infinite_enumerated_sets.py +115 -0
- sage/categories/integral_domains.py +203 -0
- sage/categories/j_trivial_semigroups.py +29 -0
- sage/categories/kac_moody_algebras.py +82 -0
- sage/categories/kahler_algebras.py +203 -0
- sage/categories/l_trivial_semigroups.py +63 -0
- sage/categories/lambda_bracket_algebras.py +280 -0
- sage/categories/lambda_bracket_algebras_with_basis.py +107 -0
- sage/categories/lattice_posets.py +89 -0
- sage/categories/left_modules.py +49 -0
- sage/categories/lie_algebras.py +1070 -0
- sage/categories/lie_algebras_with_basis.py +261 -0
- sage/categories/lie_conformal_algebras.py +350 -0
- sage/categories/lie_conformal_algebras_with_basis.py +147 -0
- sage/categories/lie_groups.py +73 -0
- sage/categories/loop_crystals.py +1290 -0
- sage/categories/magmas.py +1189 -0
- sage/categories/magmas_and_additive_magmas.py +149 -0
- sage/categories/magmatic_algebras.py +365 -0
- sage/categories/manifolds.py +352 -0
- sage/categories/matrix_algebras.py +40 -0
- sage/categories/metric_spaces.py +387 -0
- sage/categories/modular_abelian_varieties.py +78 -0
- sage/categories/modules.py +989 -0
- sage/categories/modules_with_basis.py +2794 -0
- sage/categories/monoid_algebras.py +38 -0
- sage/categories/monoids.py +739 -0
- sage/categories/noetherian_rings.py +87 -0
- sage/categories/number_fields.py +242 -0
- sage/categories/ore_modules.py +189 -0
- sage/categories/partially_ordered_monoids.py +49 -0
- sage/categories/permutation_groups.py +63 -0
- sage/categories/pointed_sets.py +42 -0
- sage/categories/polyhedra.py +74 -0
- sage/categories/poor_man_map.py +270 -0
- sage/categories/posets.py +722 -0
- sage/categories/principal_ideal_domains.py +270 -0
- sage/categories/quantum_group_representations.py +543 -0
- sage/categories/quotient_fields.py +728 -0
- sage/categories/r_trivial_semigroups.py +45 -0
- sage/categories/regular_crystals.py +898 -0
- sage/categories/regular_supercrystals.py +170 -0
- sage/categories/right_modules.py +49 -0
- sage/categories/ring_ideals.py +74 -0
- sage/categories/rings.py +1904 -0
- sage/categories/rngs.py +175 -0
- sage/categories/schemes.py +393 -0
- sage/categories/semigroups.py +1060 -0
- sage/categories/semirings.py +71 -0
- sage/categories/semisimple_algebras.py +114 -0
- sage/categories/sets_with_grading.py +235 -0
- sage/categories/shephard_groups.py +43 -0
- sage/categories/signed_tensor.py +120 -0
- sage/categories/simplicial_complexes.py +134 -0
- sage/categories/simplicial_sets.py +1206 -0
- sage/categories/super_algebras.py +149 -0
- sage/categories/super_algebras_with_basis.py +144 -0
- sage/categories/super_hopf_algebras_with_basis.py +126 -0
- sage/categories/super_lie_conformal_algebras.py +193 -0
- sage/categories/super_modules.py +229 -0
- sage/categories/super_modules_with_basis.py +193 -0
- sage/categories/supercommutative_algebras.py +99 -0
- sage/categories/supercrystals.py +406 -0
- sage/categories/tensor.py +110 -0
- sage/categories/topological_spaces.py +170 -0
- sage/categories/triangular_kac_moody_algebras.py +439 -0
- sage/categories/tutorial.py +58 -0
- sage/categories/unique_factorization_domains.py +318 -0
- sage/categories/unital_algebras.py +426 -0
- sage/categories/vector_bundles.py +159 -0
- sage/categories/vector_spaces.py +357 -0
- sage/categories/weyl_groups.py +853 -0
- sage/combinat/all__sagemath_categories.py +34 -0
- sage/combinat/backtrack.py +180 -0
- sage/combinat/combinat.py +2269 -0
- sage/combinat/combinat_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/combinat_cython.pxd +6 -0
- sage/combinat/combinat_cython.pyx +390 -0
- sage/combinat/combination.py +796 -0
- sage/combinat/combinatorial_map.py +416 -0
- sage/combinat/composition.py +2192 -0
- sage/combinat/dlx.py +510 -0
- sage/combinat/integer_lists/__init__.py +7 -0
- sage/combinat/integer_lists/base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/integer_lists/base.pxd +16 -0
- sage/combinat/integer_lists/base.pyx +713 -0
- sage/combinat/integer_lists/invlex.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/integer_lists/invlex.pxd +4 -0
- sage/combinat/integer_lists/invlex.pyx +1650 -0
- sage/combinat/integer_lists/lists.py +328 -0
- sage/combinat/integer_lists/nn.py +48 -0
- sage/combinat/integer_vector.py +1818 -0
- sage/combinat/integer_vector_weighted.py +413 -0
- sage/combinat/matrices/all__sagemath_categories.py +5 -0
- sage/combinat/matrices/dancing_links.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/matrices/dancing_links.pyx +1159 -0
- sage/combinat/matrices/dancing_links_c.h +380 -0
- sage/combinat/matrices/dlxcpp.py +136 -0
- sage/combinat/partition.py +10070 -0
- sage/combinat/partitions.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/partitions.pyx +743 -0
- sage/combinat/permutation.py +10168 -0
- sage/combinat/permutation_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/permutation_cython.pxd +11 -0
- sage/combinat/permutation_cython.pyx +407 -0
- sage/combinat/q_analogues.py +1090 -0
- sage/combinat/ranker.py +268 -0
- sage/combinat/subset.py +1561 -0
- sage/combinat/subsets_hereditary.py +202 -0
- sage/combinat/subsets_pairwise.py +184 -0
- sage/combinat/tools.py +63 -0
- sage/combinat/tuple.py +348 -0
- sage/data_structures/all.py +2 -0
- sage/data_structures/all__sagemath_categories.py +2 -0
- sage/data_structures/binary_matrix.pxd +138 -0
- sage/data_structures/binary_search.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/binary_search.pxd +3 -0
- sage/data_structures/binary_search.pyx +66 -0
- sage/data_structures/bitset.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/bitset.pxd +40 -0
- sage/data_structures/bitset.pyx +2385 -0
- sage/data_structures/bitset_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/bitset_base.pxd +926 -0
- sage/data_structures/bitset_base.pyx +117 -0
- sage/data_structures/bitset_intrinsics.h +487 -0
- sage/data_structures/blas_dict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/blas_dict.pxd +12 -0
- sage/data_structures/blas_dict.pyx +469 -0
- sage/data_structures/list_of_pairs.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/list_of_pairs.pxd +16 -0
- sage/data_structures/list_of_pairs.pyx +122 -0
- sage/data_structures/mutable_poset.py +3312 -0
- sage/data_structures/pairing_heap.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/pairing_heap.h +346 -0
- sage/data_structures/pairing_heap.pxd +88 -0
- sage/data_structures/pairing_heap.pyx +1464 -0
- sage/data_structures/sparse_bitset.pxd +62 -0
- sage/data_structures/stream.py +5070 -0
- sage/databases/all__sagemath_categories.py +7 -0
- sage/databases/sql_db.py +2236 -0
- sage/ext/all__sagemath_categories.py +3 -0
- sage/ext/fast_callable.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/fast_callable.pxd +4 -0
- sage/ext/fast_callable.pyx +2746 -0
- sage/ext/fast_eval.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/fast_eval.pxd +1 -0
- sage/ext/fast_eval.pyx +102 -0
- sage/ext/interpreters/__init__.py +1 -0
- sage/ext/interpreters/all__sagemath_categories.py +2 -0
- sage/ext/interpreters/wrapper_el.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_el.pxd +18 -0
- sage/ext/interpreters/wrapper_el.pyx +148 -0
- sage/ext/interpreters/wrapper_py.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_py.pxd +17 -0
- sage/ext/interpreters/wrapper_py.pyx +133 -0
- sage/functions/airy.py +937 -0
- sage/functions/all.py +97 -0
- sage/functions/bessel.py +2102 -0
- sage/functions/error.py +784 -0
- sage/functions/exp_integral.py +1529 -0
- sage/functions/gamma.py +1087 -0
- sage/functions/generalized.py +672 -0
- sage/functions/hyperbolic.py +747 -0
- sage/functions/hypergeometric.py +1156 -0
- sage/functions/jacobi.py +1705 -0
- sage/functions/log.py +1402 -0
- sage/functions/min_max.py +338 -0
- sage/functions/orthogonal_polys.py +3106 -0
- sage/functions/other.py +2303 -0
- sage/functions/piecewise.py +1505 -0
- sage/functions/prime_pi.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/functions/prime_pi.pyx +262 -0
- sage/functions/special.py +1212 -0
- sage/functions/spike_function.py +278 -0
- sage/functions/transcendental.py +690 -0
- sage/functions/trig.py +1062 -0
- sage/functions/wigner.py +726 -0
- sage/geometry/abc.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/geometry/abc.pyx +82 -0
- sage/geometry/all__sagemath_categories.py +1 -0
- sage/groups/all__sagemath_categories.py +11 -0
- sage/groups/generic.py +1733 -0
- sage/groups/groups_catalog.py +113 -0
- sage/groups/perm_gps/all__sagemath_categories.py +1 -0
- sage/groups/perm_gps/partn_ref/all.py +1 -0
- sage/groups/perm_gps/partn_ref/all__sagemath_categories.py +1 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd +52 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +906 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd +85 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +534 -0
- sage/groups/perm_gps/partn_ref/data_structures.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/data_structures.pxd +576 -0
- sage/groups/perm_gps/partn_ref/data_structures.pyx +1792 -0
- sage/groups/perm_gps/partn_ref/double_coset.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/double_coset.pxd +45 -0
- sage/groups/perm_gps/partn_ref/double_coset.pyx +739 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.pxd +18 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.pyx +82 -0
- sage/groups/perm_gps/partn_ref/refinement_python.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_python.pxd +16 -0
- sage/groups/perm_gps/partn_ref/refinement_python.pyx +564 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.pxd +60 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.pyx +858 -0
- sage/interfaces/abc.py +140 -0
- sage/interfaces/all.py +58 -0
- sage/interfaces/all__sagemath_categories.py +1 -0
- sage/interfaces/expect.py +1643 -0
- sage/interfaces/interface.py +1682 -0
- sage/interfaces/process.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/interfaces/process.pxd +5 -0
- sage/interfaces/process.pyx +288 -0
- sage/interfaces/quit.py +167 -0
- sage/interfaces/sage0.py +604 -0
- sage/interfaces/sagespawn.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/interfaces/sagespawn.pyx +308 -0
- sage/interfaces/tab_completion.py +101 -0
- sage/misc/all__sagemath_categories.py +78 -0
- sage/misc/allocator.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/allocator.pxd +6 -0
- sage/misc/allocator.pyx +47 -0
- sage/misc/binary_tree.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/binary_tree.pxd +29 -0
- sage/misc/binary_tree.pyx +537 -0
- sage/misc/callable_dict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/callable_dict.pyx +89 -0
- sage/misc/citation.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/citation.pyx +159 -0
- sage/misc/converting_dict.py +293 -0
- sage/misc/defaults.py +129 -0
- sage/misc/derivative.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/derivative.pyx +223 -0
- sage/misc/functional.py +2005 -0
- sage/misc/html.py +589 -0
- sage/misc/latex.py +2673 -0
- sage/misc/latex_macros.py +236 -0
- sage/misc/latex_standalone.py +1833 -0
- sage/misc/map_threaded.py +38 -0
- sage/misc/mathml.py +76 -0
- sage/misc/method_decorator.py +88 -0
- sage/misc/mrange.py +755 -0
- sage/misc/multireplace.py +41 -0
- sage/misc/object_multiplexer.py +92 -0
- sage/misc/parser.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/parser.pyx +1107 -0
- sage/misc/random_testing.py +264 -0
- sage/misc/rest_index_of_methods.py +377 -0
- sage/misc/search.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/search.pxd +2 -0
- sage/misc/search.pyx +68 -0
- sage/misc/stopgap.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/stopgap.pyx +95 -0
- sage/misc/table.py +853 -0
- sage/monoids/all__sagemath_categories.py +1 -0
- sage/monoids/indexed_free_monoid.py +1071 -0
- sage/monoids/monoid.py +82 -0
- sage/numerical/all__sagemath_categories.py +1 -0
- sage/numerical/backends/all__sagemath_categories.py +1 -0
- sage/numerical/backends/generic_backend.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/numerical/backends/generic_backend.pxd +61 -0
- sage/numerical/backends/generic_backend.pyx +1893 -0
- sage/numerical/backends/generic_sdp_backend.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/numerical/backends/generic_sdp_backend.pxd +38 -0
- sage/numerical/backends/generic_sdp_backend.pyx +755 -0
- sage/parallel/all.py +6 -0
- sage/parallel/decorate.py +575 -0
- sage/parallel/map_reduce.py +1997 -0
- sage/parallel/multiprocessing_sage.py +76 -0
- sage/parallel/ncpus.py +35 -0
- sage/parallel/parallelism.py +364 -0
- sage/parallel/reference.py +47 -0
- sage/parallel/use_fork.py +333 -0
- sage/rings/abc.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/abc.pxd +31 -0
- sage/rings/abc.pyx +526 -0
- sage/rings/algebraic_closure_finite_field.py +1154 -0
- sage/rings/all__sagemath_categories.py +91 -0
- sage/rings/big_oh.py +227 -0
- sage/rings/continued_fraction.py +2754 -0
- sage/rings/continued_fraction_gosper.py +220 -0
- sage/rings/factorint.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/factorint.pyx +295 -0
- sage/rings/fast_arith.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/fast_arith.pxd +21 -0
- sage/rings/fast_arith.pyx +535 -0
- sage/rings/finite_rings/all__sagemath_categories.py +9 -0
- sage/rings/finite_rings/conway_polynomials.py +542 -0
- sage/rings/finite_rings/element_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/element_base.pxd +12 -0
- sage/rings/finite_rings/element_base.pyx +1176 -0
- sage/rings/finite_rings/finite_field_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/finite_field_base.pxd +7 -0
- sage/rings/finite_rings/finite_field_base.pyx +2171 -0
- sage/rings/finite_rings/finite_field_constructor.py +827 -0
- sage/rings/finite_rings/finite_field_prime_modn.py +372 -0
- sage/rings/finite_rings/galois_group.py +154 -0
- sage/rings/finite_rings/hom_finite_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/hom_finite_field.pxd +23 -0
- sage/rings/finite_rings/hom_finite_field.pyx +856 -0
- sage/rings/finite_rings/hom_prime_finite_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/hom_prime_finite_field.pxd +15 -0
- sage/rings/finite_rings/hom_prime_finite_field.pyx +164 -0
- sage/rings/finite_rings/homset.py +357 -0
- sage/rings/finite_rings/integer_mod.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/integer_mod.pxd +56 -0
- sage/rings/finite_rings/integer_mod.pyx +4586 -0
- sage/rings/finite_rings/integer_mod_limits.h +11 -0
- sage/rings/finite_rings/integer_mod_ring.py +2044 -0
- sage/rings/finite_rings/residue_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/residue_field.pxd +30 -0
- sage/rings/finite_rings/residue_field.pyx +1811 -0
- sage/rings/finite_rings/stdint.pxd +19 -0
- sage/rings/fraction_field.py +1452 -0
- sage/rings/fraction_field_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/fraction_field_element.pyx +1357 -0
- sage/rings/function_field/all.py +7 -0
- sage/rings/function_field/all__sagemath_categories.py +2 -0
- sage/rings/function_field/constructor.py +218 -0
- sage/rings/function_field/element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/function_field/element.pxd +11 -0
- sage/rings/function_field/element.pyx +1008 -0
- sage/rings/function_field/element_rational.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/function_field/element_rational.pyx +513 -0
- sage/rings/function_field/extensions.py +230 -0
- sage/rings/function_field/function_field.py +1468 -0
- sage/rings/function_field/function_field_rational.py +1005 -0
- sage/rings/function_field/ideal.py +1155 -0
- sage/rings/function_field/ideal_rational.py +629 -0
- sage/rings/function_field/jacobian_base.py +826 -0
- sage/rings/function_field/jacobian_hess.py +1053 -0
- sage/rings/function_field/jacobian_khuri_makdisi.py +1027 -0
- sage/rings/function_field/maps.py +1039 -0
- sage/rings/function_field/order.py +281 -0
- sage/rings/function_field/order_basis.py +586 -0
- sage/rings/function_field/order_rational.py +576 -0
- sage/rings/function_field/place.py +426 -0
- sage/rings/function_field/place_rational.py +181 -0
- sage/rings/generic.py +320 -0
- sage/rings/homset.py +332 -0
- sage/rings/ideal.py +1885 -0
- sage/rings/ideal_monoid.py +215 -0
- sage/rings/infinity.py +1890 -0
- sage/rings/integer.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/integer.pxd +45 -0
- sage/rings/integer.pyx +7874 -0
- sage/rings/integer_ring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/integer_ring.pxd +8 -0
- sage/rings/integer_ring.pyx +1693 -0
- sage/rings/laurent_series_ring.py +931 -0
- sage/rings/laurent_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/laurent_series_ring_element.pxd +11 -0
- sage/rings/laurent_series_ring_element.pyx +1927 -0
- sage/rings/lazy_series.py +7815 -0
- sage/rings/lazy_series_ring.py +4356 -0
- sage/rings/localization.py +1043 -0
- sage/rings/morphism.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/morphism.pxd +39 -0
- sage/rings/morphism.pyx +3299 -0
- sage/rings/multi_power_series_ring.py +1145 -0
- sage/rings/multi_power_series_ring_element.py +2184 -0
- sage/rings/noncommutative_ideals.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/noncommutative_ideals.pyx +423 -0
- sage/rings/number_field/all__sagemath_categories.py +1 -0
- sage/rings/number_field/number_field_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/number_field/number_field_base.pxd +8 -0
- sage/rings/number_field/number_field_base.pyx +507 -0
- sage/rings/number_field/number_field_element_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/number_field/number_field_element_base.pxd +6 -0
- sage/rings/number_field/number_field_element_base.pyx +36 -0
- sage/rings/number_field/number_field_ideal.py +3550 -0
- sage/rings/padics/all__sagemath_categories.py +4 -0
- sage/rings/padics/local_generic.py +1670 -0
- sage/rings/padics/local_generic_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/padics/local_generic_element.pxd +5 -0
- sage/rings/padics/local_generic_element.pyx +1017 -0
- sage/rings/padics/misc.py +256 -0
- sage/rings/padics/padic_generic.py +1911 -0
- sage/rings/padics/pow_computer.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/padics/pow_computer.pxd +38 -0
- sage/rings/padics/pow_computer.pyx +671 -0
- sage/rings/padics/precision_error.py +24 -0
- sage/rings/polynomial/all__sagemath_categories.py +25 -0
- sage/rings/polynomial/commutative_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/commutative_polynomial.pxd +6 -0
- sage/rings/polynomial/commutative_polynomial.pyx +24 -0
- sage/rings/polynomial/cyclotomic.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/cyclotomic.pyx +404 -0
- sage/rings/polynomial/flatten.py +711 -0
- sage/rings/polynomial/ideal.py +102 -0
- sage/rings/polynomial/infinite_polynomial_element.py +1768 -0
- sage/rings/polynomial/infinite_polynomial_ring.py +1653 -0
- sage/rings/polynomial/laurent_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/laurent_polynomial.pxd +18 -0
- sage/rings/polynomial/laurent_polynomial.pyx +2190 -0
- sage/rings/polynomial/laurent_polynomial_ideal.py +590 -0
- sage/rings/polynomial/laurent_polynomial_ring.py +832 -0
- sage/rings/polynomial/laurent_polynomial_ring_base.py +708 -0
- sage/rings/polynomial/multi_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial.pxd +12 -0
- sage/rings/polynomial/multi_polynomial.pyx +3082 -0
- sage/rings/polynomial/multi_polynomial_element.py +2570 -0
- sage/rings/polynomial/multi_polynomial_ideal.py +5771 -0
- sage/rings/polynomial/multi_polynomial_ring.py +947 -0
- sage/rings/polynomial/multi_polynomial_ring_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_ring_base.pxd +15 -0
- sage/rings/polynomial/multi_polynomial_ring_base.pyx +1855 -0
- sage/rings/polynomial/multi_polynomial_sequence.py +2204 -0
- sage/rings/polynomial/polydict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polydict.pxd +45 -0
- sage/rings/polynomial/polydict.pyx +2701 -0
- sage/rings/polynomial/polynomial_compiled.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_compiled.pxd +59 -0
- sage/rings/polynomial/polynomial_compiled.pyx +509 -0
- sage/rings/polynomial/polynomial_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_element.pxd +64 -0
- sage/rings/polynomial/polynomial_element.pyx +13255 -0
- sage/rings/polynomial/polynomial_element_generic.py +1637 -0
- sage/rings/polynomial/polynomial_fateman.py +97 -0
- sage/rings/polynomial/polynomial_quotient_ring.py +2465 -0
- sage/rings/polynomial/polynomial_quotient_ring_element.py +779 -0
- sage/rings/polynomial/polynomial_ring.py +3784 -0
- sage/rings/polynomial/polynomial_ring_constructor.py +1051 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.pxd +5 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.pyx +121 -0
- sage/rings/polynomial/polynomial_singular_interface.py +549 -0
- sage/rings/polynomial/symmetric_ideal.py +989 -0
- sage/rings/polynomial/symmetric_reduction.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/symmetric_reduction.pxd +8 -0
- sage/rings/polynomial/symmetric_reduction.pyx +669 -0
- sage/rings/polynomial/term_order.py +2279 -0
- sage/rings/polynomial/toy_buchberger.py +449 -0
- sage/rings/polynomial/toy_d_basis.py +387 -0
- sage/rings/polynomial/toy_variety.py +362 -0
- sage/rings/power_series_mpoly.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_mpoly.pxd +9 -0
- sage/rings/power_series_mpoly.pyx +161 -0
- sage/rings/power_series_poly.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_poly.pxd +10 -0
- sage/rings/power_series_poly.pyx +1317 -0
- sage/rings/power_series_ring.py +1441 -0
- sage/rings/power_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_ring_element.pxd +12 -0
- sage/rings/power_series_ring_element.pyx +3028 -0
- sage/rings/puiseux_series_ring.py +487 -0
- sage/rings/puiseux_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/puiseux_series_ring_element.pxd +7 -0
- sage/rings/puiseux_series_ring_element.pyx +1055 -0
- sage/rings/qqbar_decorators.py +167 -0
- sage/rings/quotient_ring.py +1598 -0
- sage/rings/quotient_ring_element.py +979 -0
- sage/rings/rational.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/rational.pxd +20 -0
- sage/rings/rational.pyx +4284 -0
- sage/rings/rational_field.py +1730 -0
- sage/rings/real_double.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/real_double.pxd +16 -0
- sage/rings/real_double.pyx +2218 -0
- sage/rings/real_lazy.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/real_lazy.pxd +30 -0
- sage/rings/real_lazy.pyx +1773 -0
- sage/rings/ring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/ring.pxd +30 -0
- sage/rings/ring.pyx +850 -0
- sage/rings/semirings/all.py +3 -0
- sage/rings/semirings/non_negative_integer_semiring.py +107 -0
- sage/rings/semirings/tropical_mpolynomial.py +972 -0
- sage/rings/semirings/tropical_polynomial.py +997 -0
- sage/rings/semirings/tropical_semiring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/semirings/tropical_semiring.pyx +676 -0
- sage/rings/semirings/tropical_variety.py +1701 -0
- sage/rings/sum_of_squares.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/sum_of_squares.pxd +3 -0
- sage/rings/sum_of_squares.pyx +336 -0
- sage/rings/tests.py +504 -0
- sage/schemes/affine/affine_homset.py +508 -0
- sage/schemes/affine/affine_morphism.py +1574 -0
- sage/schemes/affine/affine_point.py +460 -0
- sage/schemes/affine/affine_rational_point.py +308 -0
- sage/schemes/affine/affine_space.py +1264 -0
- sage/schemes/affine/affine_subscheme.py +592 -0
- sage/schemes/affine/all.py +25 -0
- sage/schemes/all__sagemath_categories.py +5 -0
- sage/schemes/generic/algebraic_scheme.py +2092 -0
- sage/schemes/generic/all.py +5 -0
- sage/schemes/generic/ambient_space.py +400 -0
- sage/schemes/generic/divisor.py +465 -0
- sage/schemes/generic/divisor_group.py +313 -0
- sage/schemes/generic/glue.py +84 -0
- sage/schemes/generic/homset.py +820 -0
- sage/schemes/generic/hypersurface.py +234 -0
- sage/schemes/generic/morphism.py +2107 -0
- sage/schemes/generic/point.py +237 -0
- sage/schemes/generic/scheme.py +1190 -0
- sage/schemes/generic/spec.py +199 -0
- sage/schemes/product_projective/all.py +6 -0
- sage/schemes/product_projective/homset.py +236 -0
- sage/schemes/product_projective/morphism.py +517 -0
- sage/schemes/product_projective/point.py +568 -0
- sage/schemes/product_projective/rational_point.py +550 -0
- sage/schemes/product_projective/space.py +1301 -0
- sage/schemes/product_projective/subscheme.py +466 -0
- sage/schemes/projective/all.py +24 -0
- sage/schemes/projective/proj_bdd_height.py +453 -0
- sage/schemes/projective/projective_homset.py +718 -0
- sage/schemes/projective/projective_morphism.py +2792 -0
- sage/schemes/projective/projective_point.py +1484 -0
- sage/schemes/projective/projective_rational_point.py +569 -0
- sage/schemes/projective/projective_space.py +2571 -0
- sage/schemes/projective/projective_subscheme.py +1574 -0
- sage/sets/all.py +17 -0
- sage/sets/cartesian_product.py +376 -0
- sage/sets/condition_set.py +525 -0
- sage/sets/disjoint_set.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/disjoint_set.pxd +36 -0
- sage/sets/disjoint_set.pyx +998 -0
- sage/sets/disjoint_union_enumerated_sets.py +625 -0
- sage/sets/family.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/family.pxd +12 -0
- sage/sets/family.pyx +1556 -0
- sage/sets/finite_enumerated_set.py +406 -0
- sage/sets/finite_set_map_cy.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/finite_set_map_cy.pxd +34 -0
- sage/sets/finite_set_map_cy.pyx +708 -0
- sage/sets/finite_set_maps.py +591 -0
- sage/sets/image_set.py +448 -0
- sage/sets/integer_range.py +829 -0
- sage/sets/non_negative_integers.py +241 -0
- sage/sets/positive_integers.py +93 -0
- sage/sets/primes.py +188 -0
- sage/sets/real_set.py +2760 -0
- sage/sets/recursively_enumerated_set.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/recursively_enumerated_set.pxd +31 -0
- sage/sets/recursively_enumerated_set.pyx +2082 -0
- sage/sets/set.py +2083 -0
- sage/sets/set_from_iterator.py +1021 -0
- sage/sets/totally_ordered_finite_set.py +329 -0
- sage/symbolic/all__sagemath_categories.py +1 -0
- sage/symbolic/function.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/symbolic/function.pxd +29 -0
- sage/symbolic/function.pyx +1488 -0
- sage/symbolic/symbols.py +56 -0
- sage/tests/all__sagemath_categories.py +1 -0
- sage/tests/cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/tests/cython.pyx +37 -0
- sage/tests/stl_vector.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/tests/stl_vector.pyx +171 -0
- sage/typeset/all.py +6 -0
- sage/typeset/ascii_art.py +295 -0
- sage/typeset/character_art.py +789 -0
- sage/typeset/character_art_factory.py +572 -0
- sage/typeset/symbols.py +334 -0
- sage/typeset/unicode_art.py +183 -0
- sage/typeset/unicode_characters.py +101 -0
|
@@ -0,0 +1,1574 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-categories
|
|
2
|
+
r"""
|
|
3
|
+
Subschemes of projective space
|
|
4
|
+
|
|
5
|
+
AUTHORS:
|
|
6
|
+
|
|
7
|
+
- David Kohel (2005): initial version.
|
|
8
|
+
- William Stein (2005): initial version.
|
|
9
|
+
- Volker Braun (2010-12-24): documentation of schemes and
|
|
10
|
+
refactoring. Added coordinate neighborhoods and is_smooth()
|
|
11
|
+
- Ben Hutz (2013) refactoring
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
# ****************************************************************************
|
|
15
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
16
|
+
# Copyright (C) 2013 Ben Hutz <bn4941@gmail.com>
|
|
17
|
+
#
|
|
18
|
+
# This program is free software: you can redistribute it and/or modify
|
|
19
|
+
# it under the terms of the GNU General Public License as published by
|
|
20
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
21
|
+
# (at your option) any later version.
|
|
22
|
+
# https://www.gnu.org/licenses/
|
|
23
|
+
# ****************************************************************************
|
|
24
|
+
|
|
25
|
+
from sage.arith.misc import binomial
|
|
26
|
+
from sage.categories.fields import Fields
|
|
27
|
+
from sage.categories.homset import Hom
|
|
28
|
+
from sage.misc.lazy_import import lazy_import
|
|
29
|
+
from sage.rings.integer_ring import ZZ
|
|
30
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
31
|
+
from sage.rings.rational_field import RationalField
|
|
32
|
+
from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme
|
|
33
|
+
from sage.schemes.projective.projective_morphism import SchemeMorphism_polynomial_projective_subscheme_field
|
|
34
|
+
|
|
35
|
+
lazy_import('sage.dynamics.arithmetic_dynamics.generic_ds', 'DynamicalSystem')
|
|
36
|
+
lazy_import('sage.matrix.constructor', 'matrix')
|
|
37
|
+
lazy_import('sage.schemes.elliptic_curves.ell_generic', 'EllipticCurve_generic', as_='EllipticCurve')
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class AlgebraicScheme_subscheme_projective(AlgebraicScheme_subscheme):
|
|
41
|
+
r"""
|
|
42
|
+
Construct an algebraic subscheme of projective space.
|
|
43
|
+
|
|
44
|
+
.. WARNING::
|
|
45
|
+
|
|
46
|
+
You should not create objects of this class directly. The
|
|
47
|
+
preferred method to construct such subschemes is to use
|
|
48
|
+
:meth:`~sage.schemes.projective.projective_space.ProjectiveSpace_field.subscheme`
|
|
49
|
+
method of :class:`projective space
|
|
50
|
+
<sage.schemes.projective.projective_space.ProjectiveSpace_field>`.
|
|
51
|
+
|
|
52
|
+
INPUT:
|
|
53
|
+
|
|
54
|
+
- ``A`` -- ambient :class:`projective space
|
|
55
|
+
<sage.schemes.projective.projective_space.ProjectiveSpace_field>`
|
|
56
|
+
|
|
57
|
+
- ``polynomials`` -- single polynomial, ideal or iterable of
|
|
58
|
+
defining homogeneous polynomials
|
|
59
|
+
|
|
60
|
+
EXAMPLES::
|
|
61
|
+
|
|
62
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
63
|
+
sage: P.subscheme([x^2 - y*z])
|
|
64
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
65
|
+
x^2 - y*z
|
|
66
|
+
|
|
67
|
+
TESTS::
|
|
68
|
+
|
|
69
|
+
sage: from sage.schemes.projective.projective_subscheme import AlgebraicScheme_subscheme_projective
|
|
70
|
+
sage: AlgebraicScheme_subscheme_projective(P, [x^2-y*z])
|
|
71
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
72
|
+
x^2 - y*z
|
|
73
|
+
"""
|
|
74
|
+
def point(self, v, check=True):
|
|
75
|
+
"""
|
|
76
|
+
Create a point on this projective subscheme.
|
|
77
|
+
|
|
78
|
+
INPUT:
|
|
79
|
+
|
|
80
|
+
- ``v`` -- anything that defines a point
|
|
81
|
+
|
|
82
|
+
- ``check`` -- boolean (default: ``True``); whether
|
|
83
|
+
to check the defining data for consistency
|
|
84
|
+
|
|
85
|
+
OUTPUT: a point of the subscheme
|
|
86
|
+
|
|
87
|
+
EXAMPLES::
|
|
88
|
+
|
|
89
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
90
|
+
sage: X = P2.subscheme([x - y, y - z])
|
|
91
|
+
sage: X.point([1,1,1])
|
|
92
|
+
(1 : 1 : 1)
|
|
93
|
+
|
|
94
|
+
::
|
|
95
|
+
|
|
96
|
+
sage: P2.<x,y> = ProjectiveSpace(QQ, 1)
|
|
97
|
+
sage: X = P2.subscheme([y])
|
|
98
|
+
sage: X.point(infinity)
|
|
99
|
+
(1 : 0)
|
|
100
|
+
|
|
101
|
+
::
|
|
102
|
+
|
|
103
|
+
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
|
|
104
|
+
sage: X = P.subscheme(x^2 + 2*y^2)
|
|
105
|
+
sage: X.point(infinity)
|
|
106
|
+
Traceback (most recent call last):
|
|
107
|
+
...
|
|
108
|
+
TypeError: Coordinates [1, 0] do not define a point on Closed subscheme
|
|
109
|
+
of Projective Space of dimension 1 over Rational Field defined by:
|
|
110
|
+
x^2 + 2*y^2
|
|
111
|
+
"""
|
|
112
|
+
from sage.rings.infinity import infinity
|
|
113
|
+
if v is infinity or\
|
|
114
|
+
(isinstance(v, (list, tuple)) and len(v) == 1 and v[0] is infinity):
|
|
115
|
+
if self.ambient_space().dimension_relative() > 1:
|
|
116
|
+
raise ValueError("%s not well defined in dimension > 1" % v)
|
|
117
|
+
v = [1, 0]
|
|
118
|
+
# todo: update elliptic curve stuff to take point_homset as argument
|
|
119
|
+
if isinstance(self, EllipticCurve):
|
|
120
|
+
try:
|
|
121
|
+
return self._point(self.point_homset(), v, check=check)
|
|
122
|
+
except AttributeError: # legacy code without point_homset
|
|
123
|
+
return self._point(self, v, check=check)
|
|
124
|
+
|
|
125
|
+
return self.point_homset()(v, check=check)
|
|
126
|
+
|
|
127
|
+
def _morphism(self, *args, **kwds):
|
|
128
|
+
r"""
|
|
129
|
+
Construct a morphism determined by action on points of ``self``.
|
|
130
|
+
|
|
131
|
+
For internal use only.
|
|
132
|
+
|
|
133
|
+
INPUT:
|
|
134
|
+
|
|
135
|
+
- same as for
|
|
136
|
+
:class:`~sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space`.
|
|
137
|
+
|
|
138
|
+
OUTPUT: :class:`~sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space`
|
|
139
|
+
|
|
140
|
+
TESTS::
|
|
141
|
+
|
|
142
|
+
sage: P1.<x,y> = ProjectiveSpace(1, QQ)
|
|
143
|
+
sage: P2 = ProjectiveSpace(2, QQ)
|
|
144
|
+
sage: H12 = P1.Hom(P2)
|
|
145
|
+
sage: H12([x^2, x*y, y^2]) # indirect doctest
|
|
146
|
+
Scheme morphism:
|
|
147
|
+
From: Projective Space of dimension 1 over Rational Field
|
|
148
|
+
To: Projective Space of dimension 2 over Rational Field
|
|
149
|
+
Defn: Defined on coordinates by sending (x : y) to (x^2 : x*y : y^2)
|
|
150
|
+
sage: P1._morphism(H12, [x^2, x*y, y^2])
|
|
151
|
+
Scheme morphism:
|
|
152
|
+
From: Projective Space of dimension 1 over Rational Field
|
|
153
|
+
To: Projective Space of dimension 2 over Rational Field
|
|
154
|
+
Defn: Defined on coordinates by sending (x : y) to (x^2 : x*y : y^2)
|
|
155
|
+
"""
|
|
156
|
+
return self.ambient_space()._morphism(*args, **kwds)
|
|
157
|
+
|
|
158
|
+
def dimension(self):
|
|
159
|
+
"""
|
|
160
|
+
Return the dimension of the projective algebraic subscheme.
|
|
161
|
+
|
|
162
|
+
OUTPUT: integer
|
|
163
|
+
|
|
164
|
+
EXAMPLES::
|
|
165
|
+
|
|
166
|
+
sage: # needs sage.libs.singular
|
|
167
|
+
sage: P2.<x,y,z> = ProjectiveSpace(2, QQ)
|
|
168
|
+
sage: P2.subscheme([]).dimension()
|
|
169
|
+
2
|
|
170
|
+
sage: P2.subscheme([x]).dimension()
|
|
171
|
+
1
|
|
172
|
+
sage: P2.subscheme([x^5]).dimension()
|
|
173
|
+
1
|
|
174
|
+
sage: P2.subscheme([x^2 + y^2 - z^2]).dimension()
|
|
175
|
+
1
|
|
176
|
+
sage: P2.subscheme([x*(x-z), y*(y-z)]).dimension()
|
|
177
|
+
0
|
|
178
|
+
|
|
179
|
+
Something less obvious::
|
|
180
|
+
|
|
181
|
+
sage: P3.<x,y,z,w,t> = ProjectiveSpace(4, QQ)
|
|
182
|
+
sage: X = P3.subscheme([x^2, x^2*y^2 + z^2*t^2,
|
|
183
|
+
....: z^2 - w^2, 10*x^2 + w^2 - z^2]); X
|
|
184
|
+
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
|
|
185
|
+
x^2,
|
|
186
|
+
x^2*y^2 + z^2*t^2,
|
|
187
|
+
z^2 - w^2,
|
|
188
|
+
10*x^2 - z^2 + w^2
|
|
189
|
+
sage: X.dimension() # needs sage.libs.singular
|
|
190
|
+
1
|
|
191
|
+
"""
|
|
192
|
+
try:
|
|
193
|
+
return self.__dimension
|
|
194
|
+
except AttributeError:
|
|
195
|
+
self.__dimension = self.defining_ideal().dimension() - 1
|
|
196
|
+
return self.__dimension
|
|
197
|
+
|
|
198
|
+
def affine_patch(self, i, AA=None):
|
|
199
|
+
r"""
|
|
200
|
+
Return the `i`-th affine patch of this projective scheme.
|
|
201
|
+
|
|
202
|
+
This is the intersection with this `i`-th affine patch of
|
|
203
|
+
its ambient space.
|
|
204
|
+
|
|
205
|
+
INPUT:
|
|
206
|
+
|
|
207
|
+
- ``i`` -- integer between 0 and dimension of ``self``, inclusive
|
|
208
|
+
|
|
209
|
+
- ``AA`` -- (default: ``None``) ambient affine space, this
|
|
210
|
+
is constructed if it is not given
|
|
211
|
+
|
|
212
|
+
OUTPUT:
|
|
213
|
+
|
|
214
|
+
An affine algebraic scheme with fixed
|
|
215
|
+
:meth:`embedding_morphism` equal to the default
|
|
216
|
+
:meth:`projective_embedding` map`.
|
|
217
|
+
|
|
218
|
+
EXAMPLES::
|
|
219
|
+
|
|
220
|
+
sage: # needs sage.libs.singular
|
|
221
|
+
sage: PP = ProjectiveSpace(2, QQ, names='X,Y,Z')
|
|
222
|
+
sage: X,Y,Z = PP.gens()
|
|
223
|
+
sage: C = PP.subscheme(X^3*Y + Y^3*Z + Z^3*X)
|
|
224
|
+
sage: U = C.affine_patch(0); U
|
|
225
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
226
|
+
Y^3*Z + Z^3 + Y
|
|
227
|
+
sage: U.embedding_morphism()
|
|
228
|
+
Scheme morphism:
|
|
229
|
+
From: Closed subscheme of Affine Space of dimension 2 over Rational Field
|
|
230
|
+
defined by: Y^3*Z + Z^3 + Y
|
|
231
|
+
To: Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
232
|
+
defined by: X^3*Y + Y^3*Z + X*Z^3
|
|
233
|
+
Defn: Defined on coordinates by sending (Y, Z) to (1 : Y : Z)
|
|
234
|
+
sage: U.projective_embedding() is U.embedding_morphism()
|
|
235
|
+
True
|
|
236
|
+
|
|
237
|
+
::
|
|
238
|
+
|
|
239
|
+
sage: A.<x,y,z> = AffineSpace(QQ, 3)
|
|
240
|
+
sage: X = A.subscheme([x - y*z])
|
|
241
|
+
sage: Y = X.projective_embedding(1).codomain() # needs sage.libs.singular
|
|
242
|
+
sage: Y.affine_patch(1, A).ambient_space() == A # needs sage.libs.singular
|
|
243
|
+
True
|
|
244
|
+
|
|
245
|
+
::
|
|
246
|
+
|
|
247
|
+
sage: P.<u,v,w> = ProjectiveSpace(2, ZZ)
|
|
248
|
+
sage: S = P.subscheme([u^2 - v*w])
|
|
249
|
+
sage: A.<x, y> = AffineSpace(2, ZZ)
|
|
250
|
+
sage: S.affine_patch(1, A) # needs sage.libs.singular
|
|
251
|
+
Closed subscheme of Affine Space of dimension 2 over Integer Ring defined by:
|
|
252
|
+
x^2 - y
|
|
253
|
+
"""
|
|
254
|
+
i = int(i) # implicit type checking
|
|
255
|
+
PP = self.ambient_space()
|
|
256
|
+
n = PP.dimension_relative()
|
|
257
|
+
if i < 0 or i > n:
|
|
258
|
+
raise ValueError(f"Argument i (= {i}) must be between 0 and {n}.")
|
|
259
|
+
try:
|
|
260
|
+
A = self.__affine_patches[i]
|
|
261
|
+
# assume that if you've passed in a new ambient affine space
|
|
262
|
+
# you want to override the existing patch
|
|
263
|
+
if AA is None or A.ambient_space() == AA:
|
|
264
|
+
return self.__affine_patches[i]
|
|
265
|
+
except AttributeError:
|
|
266
|
+
self.__affine_patches = {}
|
|
267
|
+
except KeyError:
|
|
268
|
+
pass
|
|
269
|
+
if AA is None:
|
|
270
|
+
AA = PP.affine_patch(i)
|
|
271
|
+
elif AA.dimension_relative() != n:
|
|
272
|
+
raise ValueError("Affine Space must be of the dimension %s" % (n))
|
|
273
|
+
phi = AA.projective_embedding(i, PP)
|
|
274
|
+
polys = self.defining_polynomials()
|
|
275
|
+
xi = phi.defining_polynomials()
|
|
276
|
+
U = AA.subscheme([f(xi) for f in polys])
|
|
277
|
+
phi = U.projective_embedding(i, PP)
|
|
278
|
+
U._embedding_morphism = phi
|
|
279
|
+
self.__affine_patches[i] = U
|
|
280
|
+
return U
|
|
281
|
+
|
|
282
|
+
def _best_affine_patch(self, point):
|
|
283
|
+
r"""
|
|
284
|
+
Return the best affine patch of the ambient projective space.
|
|
285
|
+
|
|
286
|
+
The "best" affine patch is where you end up dividing by the
|
|
287
|
+
homogeneous coordinate with the largest absolute
|
|
288
|
+
value. Division by small numbers is numerically unstable.
|
|
289
|
+
|
|
290
|
+
INPUT:
|
|
291
|
+
|
|
292
|
+
- ``point`` -- a point of the algebraic subscheme
|
|
293
|
+
|
|
294
|
+
OUTPUT: integer. The index of the patch. See :meth:`affine_patch`
|
|
295
|
+
|
|
296
|
+
EXAMPLES::
|
|
297
|
+
|
|
298
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
299
|
+
sage: S = P.subscheme(x + 2*y + 3*z)
|
|
300
|
+
sage: S._best_affine_patch(P.point([0,-3,2]))
|
|
301
|
+
1
|
|
302
|
+
sage: S._best_affine_patch([0,-3,2])
|
|
303
|
+
1
|
|
304
|
+
|
|
305
|
+
TESTS::
|
|
306
|
+
|
|
307
|
+
sage: F = GF(3)
|
|
308
|
+
sage: P.<x,y,z> = ProjectiveSpace(F, 2)
|
|
309
|
+
sage: S._best_affine_patch([0,1,2])
|
|
310
|
+
2
|
|
311
|
+
"""
|
|
312
|
+
point = list(point)
|
|
313
|
+
try:
|
|
314
|
+
abs_point = [abs(c) for c in point]
|
|
315
|
+
except ArithmeticError:
|
|
316
|
+
# our base ring does not know abs
|
|
317
|
+
abs_point = point
|
|
318
|
+
# find best patch
|
|
319
|
+
i_max = 0
|
|
320
|
+
p_max = abs_point[i_max]
|
|
321
|
+
for i in range(1, len(point)):
|
|
322
|
+
if abs_point[i] > p_max:
|
|
323
|
+
i_max = i
|
|
324
|
+
p_max = abs_point[i_max]
|
|
325
|
+
return i_max
|
|
326
|
+
|
|
327
|
+
def neighborhood(self, point):
|
|
328
|
+
r"""
|
|
329
|
+
Return an affine algebraic subscheme isomorphic to a
|
|
330
|
+
neighborhood of the ``point``.
|
|
331
|
+
|
|
332
|
+
INPUT:
|
|
333
|
+
|
|
334
|
+
- ``point`` -- a point of the projective subscheme
|
|
335
|
+
|
|
336
|
+
OUTPUT:
|
|
337
|
+
|
|
338
|
+
An affine algebraic scheme (polynomial equations in affine
|
|
339
|
+
space) ``result`` such that
|
|
340
|
+
|
|
341
|
+
* :meth:`embedding_morphism
|
|
342
|
+
<AlgebraicScheme.embedding_morphism>` is an isomorphism to a
|
|
343
|
+
neighborhood of ``point``
|
|
344
|
+
|
|
345
|
+
* :meth:`embedding_center <AlgebraicScheme.embedding_center>`
|
|
346
|
+
is mapped to ``point``.
|
|
347
|
+
|
|
348
|
+
EXAMPLES::
|
|
349
|
+
|
|
350
|
+
sage: P.<x,y,z>= ProjectiveSpace(QQ, 2)
|
|
351
|
+
sage: S = P.subscheme(x + 2*y + 3*z)
|
|
352
|
+
sage: s = S.point([0,-3,2]); s
|
|
353
|
+
(0 : -3/2 : 1)
|
|
354
|
+
sage: patch = S.neighborhood(s); patch
|
|
355
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
356
|
+
x + 3*z
|
|
357
|
+
sage: patch.embedding_morphism()
|
|
358
|
+
Scheme morphism:
|
|
359
|
+
From: Closed subscheme of Affine Space of dimension 2 over Rational Field
|
|
360
|
+
defined by: x + 3*z
|
|
361
|
+
To: Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
362
|
+
defined by: x + 2*y + 3*z
|
|
363
|
+
Defn: Defined on coordinates by sending (x, z) to (x : -3/2 : z + 1)
|
|
364
|
+
sage: patch.embedding_center()
|
|
365
|
+
(0, 0)
|
|
366
|
+
sage: patch.embedding_morphism()([0,0])
|
|
367
|
+
(0 : -3/2 : 1)
|
|
368
|
+
sage: patch.embedding_morphism()(patch.embedding_center())
|
|
369
|
+
(0 : -3/2 : 1)
|
|
370
|
+
"""
|
|
371
|
+
point = list(point)
|
|
372
|
+
self._check_satisfies_equations(point)
|
|
373
|
+
PP = self.ambient_space()
|
|
374
|
+
n = PP.dimension()
|
|
375
|
+
i = self._best_affine_patch(point)
|
|
376
|
+
|
|
377
|
+
patch_cover = PP.affine_patch(i)
|
|
378
|
+
R = patch_cover.coordinate_ring()
|
|
379
|
+
|
|
380
|
+
phi = list(point)
|
|
381
|
+
for j in range(i):
|
|
382
|
+
phi[j] += R.gen(j)
|
|
383
|
+
for j in range(i, n):
|
|
384
|
+
phi[j + 1] += R.gen(j)
|
|
385
|
+
|
|
386
|
+
pullback_polys = [f(phi) for f in self.defining_polynomials()]
|
|
387
|
+
return patch_cover.subscheme(pullback_polys, embedding_center=[0] * n,
|
|
388
|
+
embedding_codomain=self,
|
|
389
|
+
embedding_images=phi)
|
|
390
|
+
|
|
391
|
+
def is_smooth(self, point=None) -> bool:
|
|
392
|
+
r"""
|
|
393
|
+
Test whether the algebraic subscheme is smooth.
|
|
394
|
+
|
|
395
|
+
INPUT:
|
|
396
|
+
|
|
397
|
+
- ``point`` -- a point or ``None`` (default); the point to
|
|
398
|
+
test smoothness at
|
|
399
|
+
|
|
400
|
+
OUTPUT:
|
|
401
|
+
|
|
402
|
+
boolean; if no point was specified, returns whether the
|
|
403
|
+
algebraic subscheme is smooth everywhere. Otherwise,
|
|
404
|
+
smoothness at the specified point is tested.
|
|
405
|
+
|
|
406
|
+
EXAMPLES::
|
|
407
|
+
|
|
408
|
+
sage: # needs sage.libs.singular
|
|
409
|
+
sage: P2.<x,y,z> = ProjectiveSpace(2, QQ)
|
|
410
|
+
sage: cuspidal_curve = P2.subscheme([y^2*z - x^3])
|
|
411
|
+
sage: cuspidal_curve
|
|
412
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
413
|
+
-x^3 + y^2*z
|
|
414
|
+
sage: cuspidal_curve.is_smooth([1,1,1])
|
|
415
|
+
True
|
|
416
|
+
sage: cuspidal_curve.is_smooth([0,0,1])
|
|
417
|
+
False
|
|
418
|
+
sage: cuspidal_curve.is_smooth()
|
|
419
|
+
False
|
|
420
|
+
sage: P2.subscheme([y^2*z - x^3 + z^3 + 1/10*x*y*z]).is_smooth()
|
|
421
|
+
True
|
|
422
|
+
|
|
423
|
+
TESTS::
|
|
424
|
+
|
|
425
|
+
sage: H = P2.subscheme(x) # needs sage.libs.singular
|
|
426
|
+
sage: H.is_smooth() # one of the few cases where the cone over the subvariety is smooth # needs sage.libs.singular
|
|
427
|
+
True
|
|
428
|
+
"""
|
|
429
|
+
if point is not None:
|
|
430
|
+
self._check_satisfies_equations(point)
|
|
431
|
+
R = self.ambient_space().coordinate_ring()
|
|
432
|
+
point_subs = dict(zip(R.gens(), point))
|
|
433
|
+
Jac = self.Jacobian().subs(point_subs)
|
|
434
|
+
return not Jac.is_zero()
|
|
435
|
+
|
|
436
|
+
# testing smoothness everywhere tends to be expensive
|
|
437
|
+
try:
|
|
438
|
+
return self._smooth
|
|
439
|
+
except AttributeError:
|
|
440
|
+
pass
|
|
441
|
+
sing_dim = self.Jacobian().dimension()
|
|
442
|
+
# We really test the affine cone here; the origin is always a
|
|
443
|
+
# singular point:
|
|
444
|
+
self._smooth = (sing_dim <= 0)
|
|
445
|
+
return self._smooth
|
|
446
|
+
|
|
447
|
+
def orbit(self, f, N) -> list:
|
|
448
|
+
r"""
|
|
449
|
+
Return the orbit of this scheme by ``f``.
|
|
450
|
+
|
|
451
|
+
If `N` is an integer it returns `[self,f(self),\ldots,f^N(self)]`.
|
|
452
|
+
If `N` is a list or tuple `N=[m,k]` it returns `[f^m(self),\ldots,f^k(self)`].
|
|
453
|
+
|
|
454
|
+
INPUT:
|
|
455
|
+
|
|
456
|
+
- ``f`` -- a :class:`DynamicalSystem_projective` with ``self`` in ``f.domain()``
|
|
457
|
+
|
|
458
|
+
- ``N`` -- nonnegative integer or list or tuple of two nonnegative integers
|
|
459
|
+
|
|
460
|
+
OUTPUT: list of projective subschemes
|
|
461
|
+
|
|
462
|
+
EXAMPLES::
|
|
463
|
+
|
|
464
|
+
sage: # needs sage.libs.singular sage.schemes
|
|
465
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
466
|
+
sage: f = DynamicalSystem_projective([(x-2*y)^2, (x-2*z)^2,
|
|
467
|
+
....: (x-2*w)^2, x^2])
|
|
468
|
+
sage: f.orbit(P.subscheme([x]), 5)
|
|
469
|
+
[Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
470
|
+
defined by: x,
|
|
471
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
472
|
+
defined by: w,
|
|
473
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
474
|
+
defined by: z - w,
|
|
475
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
476
|
+
defined by: y - z,
|
|
477
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
478
|
+
defined by: x - y,
|
|
479
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
480
|
+
defined by: x - w]
|
|
481
|
+
|
|
482
|
+
::
|
|
483
|
+
|
|
484
|
+
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
485
|
+
sage: P1.<u,v> = ProjectiveSpace(QQ, 1)
|
|
486
|
+
sage: H = Hom(PS, P1)
|
|
487
|
+
sage: f = H([x^2, y^2])
|
|
488
|
+
sage: X = PS.subscheme([x - y])
|
|
489
|
+
sage: X.orbit(f, 2)
|
|
490
|
+
Traceback (most recent call last):
|
|
491
|
+
...
|
|
492
|
+
TypeError: map must be a dynamical system for iteration
|
|
493
|
+
|
|
494
|
+
::
|
|
495
|
+
|
|
496
|
+
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
497
|
+
sage: f = DynamicalSystem_projective([x^2, y^2, z^2]) # needs sage.schemes
|
|
498
|
+
sage: X = PS.subscheme([x - y])
|
|
499
|
+
sage: X.orbit(f, [-1,2]) # needs sage.schemes
|
|
500
|
+
Traceback (most recent call last):
|
|
501
|
+
...
|
|
502
|
+
TypeError: orbit bounds must be nonnegative
|
|
503
|
+
"""
|
|
504
|
+
if not isinstance(f, DynamicalSystem):
|
|
505
|
+
raise TypeError("map must be a dynamical system for iteration")
|
|
506
|
+
if not isinstance(N, (list, tuple)):
|
|
507
|
+
N = [0, N]
|
|
508
|
+
N[0] = ZZ(N[0])
|
|
509
|
+
N[1] = ZZ(N[1])
|
|
510
|
+
if N[0] < 0 or N[1] < 0:
|
|
511
|
+
raise TypeError("orbit bounds must be nonnegative")
|
|
512
|
+
if N[0] > N[1]:
|
|
513
|
+
return []
|
|
514
|
+
|
|
515
|
+
Q = self
|
|
516
|
+
for i in range(1, N[0] + 1):
|
|
517
|
+
Q = f(Q)
|
|
518
|
+
Orb = [Q]
|
|
519
|
+
|
|
520
|
+
for i in range(N[0] + 1, N[1] + 1):
|
|
521
|
+
Q = f(Q)
|
|
522
|
+
Orb.append(Q)
|
|
523
|
+
return Orb
|
|
524
|
+
|
|
525
|
+
def nth_iterate(self, f, n):
|
|
526
|
+
r"""
|
|
527
|
+
The `n`-th forward image of this scheme by the map ``f``.
|
|
528
|
+
|
|
529
|
+
INPUT:
|
|
530
|
+
|
|
531
|
+
- ``f`` -- a :class:`DynamicalSystem_projective` with ``self`` in ``f.domain()``
|
|
532
|
+
|
|
533
|
+
- ``n`` -- positive integer
|
|
534
|
+
|
|
535
|
+
OUTPUT:
|
|
536
|
+
|
|
537
|
+
- A subscheme in ``f.codomain()``
|
|
538
|
+
|
|
539
|
+
EXAMPLES::
|
|
540
|
+
|
|
541
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
542
|
+
sage: f = DynamicalSystem_projective([y^2, z^2, x^2, w^2]) # needs sage.schemes
|
|
543
|
+
sage: f.nth_iterate(P.subscheme([x - w, y - z]), 3) # needs sage.libs.singular sage.schemes
|
|
544
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
545
|
+
defined by:
|
|
546
|
+
y - z,
|
|
547
|
+
x - w
|
|
548
|
+
|
|
549
|
+
::
|
|
550
|
+
|
|
551
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
552
|
+
sage: f = DynamicalSystem_projective([x^2, y^2, z^2]) # needs sage.schemes
|
|
553
|
+
sage: X = PS.subscheme([x - y])
|
|
554
|
+
sage: X.nth_iterate(f, -2) # needs sage.libs.singular sage.schemes
|
|
555
|
+
Traceback (most recent call last):
|
|
556
|
+
...
|
|
557
|
+
TypeError: must be a forward orbit
|
|
558
|
+
|
|
559
|
+
::
|
|
560
|
+
|
|
561
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
562
|
+
sage: P2.<u,v,w> = ProjectiveSpace(QQ, 2)
|
|
563
|
+
sage: H = Hom(PS, P2)
|
|
564
|
+
sage: f = H([x^2, y^2, z^2])
|
|
565
|
+
sage: X = PS.subscheme([x - y])
|
|
566
|
+
sage: X.nth_iterate(f, 2)
|
|
567
|
+
Traceback (most recent call last):
|
|
568
|
+
...
|
|
569
|
+
TypeError: map must be a dynamical system for iteration
|
|
570
|
+
|
|
571
|
+
::
|
|
572
|
+
|
|
573
|
+
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
574
|
+
sage: f = DynamicalSystem_projective([x^2, y^2, z^2]) # needs sage.schemes
|
|
575
|
+
sage: X = PS.subscheme([x - y])
|
|
576
|
+
sage: X.nth_iterate(f, 2.5) # needs sage.schemes
|
|
577
|
+
Traceback (most recent call last):
|
|
578
|
+
...
|
|
579
|
+
TypeError: Attempt to coerce non-integral RealNumber to Integer
|
|
580
|
+
"""
|
|
581
|
+
n = ZZ(n)
|
|
582
|
+
if n < 0:
|
|
583
|
+
raise TypeError("must be a forward orbit")
|
|
584
|
+
return self.orbit(f, [n, n + 1])[0]
|
|
585
|
+
|
|
586
|
+
def _forward_image(self, f, check=True):
|
|
587
|
+
r"""
|
|
588
|
+
Compute the forward image of this subscheme by the morphism ``f``.
|
|
589
|
+
|
|
590
|
+
The forward image is computed through elimination and ``f`` must be
|
|
591
|
+
a morphism for this to be well defined.
|
|
592
|
+
In particular, let `X = V(h_1,\ldots, h_t)` and define the ideal
|
|
593
|
+
`I = (h_1,\ldots,h_t,y_0-f_0(\bar{x}), \ldots, y_n-f_n(\bar{x}))`.
|
|
594
|
+
Then the elimination ideal `I_{n+1} = I \cap K[y_0,\ldots,y_n]` is a homogeneous
|
|
595
|
+
ideal and `self(X) = V(I_{n+1})`.
|
|
596
|
+
|
|
597
|
+
INPUT:
|
|
598
|
+
|
|
599
|
+
- ``f`` -- a map whose domain contains ``self``
|
|
600
|
+
|
|
601
|
+
- ``check`` -- boolean, if ``False`` no input checking is done
|
|
602
|
+
|
|
603
|
+
OUTPUT: a subscheme in the codomain of ``f``
|
|
604
|
+
|
|
605
|
+
EXAMPLES::
|
|
606
|
+
|
|
607
|
+
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
608
|
+
sage: H = End(PS)
|
|
609
|
+
sage: f = H([x^2, y^2 - 2*z^2, z^2])
|
|
610
|
+
sage: X = PS.subscheme(y - 2*z)
|
|
611
|
+
sage: X._forward_image(f) # needs sage.libs.singular
|
|
612
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
613
|
+
defined by:
|
|
614
|
+
y - 2*z
|
|
615
|
+
|
|
616
|
+
::
|
|
617
|
+
|
|
618
|
+
sage: set_verbose(None)
|
|
619
|
+
sage: PS.<x,y,z,w> = ProjectiveSpace(ZZ, 3)
|
|
620
|
+
sage: H = End(PS)
|
|
621
|
+
sage: f = H([y^2, x^2, w^2, z^2])
|
|
622
|
+
sage: X = PS.subscheme([z^2 + y*w, x - w])
|
|
623
|
+
sage: f(X) # needs sage.libs.singular
|
|
624
|
+
Closed subscheme of Projective Space of dimension 3 over Integer Ring
|
|
625
|
+
defined by:
|
|
626
|
+
y - z,
|
|
627
|
+
x*z - w^2
|
|
628
|
+
|
|
629
|
+
::
|
|
630
|
+
|
|
631
|
+
sage: # needs sage.rings.real_mpfr
|
|
632
|
+
sage: PS.<x,y,z,w> = ProjectiveSpace(CC, 3)
|
|
633
|
+
sage: H = End(PS)
|
|
634
|
+
sage: f = H([x^2 + y^2, y^2, z^2-y^2, w^2])
|
|
635
|
+
sage: X = PS.subscheme([z - 2*w])
|
|
636
|
+
sage: f(X) # needs sage.libs.singular
|
|
637
|
+
Closed subscheme of Projective Space of dimension 3 over Complex Field
|
|
638
|
+
with 53 bits of precision defined by:
|
|
639
|
+
y + z + (-4.00000000000000)*w
|
|
640
|
+
|
|
641
|
+
::
|
|
642
|
+
|
|
643
|
+
sage: R.<t> = PolynomialRing(QQ)
|
|
644
|
+
sage: P.<x,y,z> = ProjectiveSpace(FractionField(R), 2)
|
|
645
|
+
sage: H = End(P)
|
|
646
|
+
sage: f = H([x^2 + 2*y*z, t^2*y^2, z^2])
|
|
647
|
+
sage: f([t^2*y - z]) # needs sage.libs.singular
|
|
648
|
+
Closed subscheme of Projective Space of dimension 2 over Fraction Field
|
|
649
|
+
of Univariate Polynomial Ring in t over Rational Field defined by:
|
|
650
|
+
y - 1/(t^2)*z
|
|
651
|
+
|
|
652
|
+
::
|
|
653
|
+
|
|
654
|
+
sage: # needs sage.rings.padics
|
|
655
|
+
sage: set_verbose(-1)
|
|
656
|
+
sage: PS.<x,y,z> = ProjectiveSpace(Qp(3), 2)
|
|
657
|
+
sage: H = End(PS)
|
|
658
|
+
sage: f = H([x^2, 2*y^2, z^2])
|
|
659
|
+
sage: X = PS.subscheme([2*x - y, z])
|
|
660
|
+
sage: f(X) # needs sage.libs.singular
|
|
661
|
+
Closed subscheme of Projective Space of dimension 2 over 3-adic Field
|
|
662
|
+
with capped relative precision 20 defined by:
|
|
663
|
+
z,
|
|
664
|
+
x + (1 + 3^2 + 3^4 + 3^6 + 3^8 + 3^10 + 3^12 + 3^14 + 3^16 + 3^18 + O(3^20))*y
|
|
665
|
+
|
|
666
|
+
::
|
|
667
|
+
|
|
668
|
+
sage: R.<y0,y1,y2,y3> = PolynomialRing(QQ)
|
|
669
|
+
sage: P.<x,y,z> = ProjectiveSpace(FractionField(R), 2)
|
|
670
|
+
sage: H = End(P)
|
|
671
|
+
sage: f = H([y0*x^2 + y1*z^2, y2*y^2 + y3*z^2, z^2])
|
|
672
|
+
sage: X = P.subscheme(x*z)
|
|
673
|
+
sage: X._forward_image(f) # needs sage.libs.singular
|
|
674
|
+
Closed subscheme of Projective Space of dimension 2 over Fraction Field
|
|
675
|
+
of Multivariate Polynomial Ring in y0, y1, y2, y3 over Rational Field
|
|
676
|
+
defined by:
|
|
677
|
+
x*z + (-y1)*z^2
|
|
678
|
+
|
|
679
|
+
::
|
|
680
|
+
|
|
681
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
682
|
+
sage: P5.<z0,z1,z2,z3,z4,z5> = ProjectiveSpace(QQ, 5)
|
|
683
|
+
sage: H = Hom(P2, P5)
|
|
684
|
+
sage: f = H([x^2, x*y, x*z, y^2, y*z, z^2]) # Veronese map
|
|
685
|
+
sage: X = P2.subscheme([])
|
|
686
|
+
sage: f(X) # needs sage.libs.singular
|
|
687
|
+
Closed subscheme of Projective Space of dimension 5 over Rational Field
|
|
688
|
+
defined by:
|
|
689
|
+
-z4^2 + z3*z5,
|
|
690
|
+
-z2*z4 + z1*z5,
|
|
691
|
+
-z2*z3 + z1*z4,
|
|
692
|
+
-z2^2 + z0*z5,
|
|
693
|
+
-z1*z2 + z0*z4,
|
|
694
|
+
-z1^2 + z0*z3
|
|
695
|
+
|
|
696
|
+
::
|
|
697
|
+
|
|
698
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
699
|
+
sage: P3.<u,v,w,t> = ProjectiveSpace(QQ, 3)
|
|
700
|
+
sage: H = Hom(P2, P3)
|
|
701
|
+
sage: X = P2.subscheme([x - y, x - z])
|
|
702
|
+
sage: f = H([x^2, y^2, z^2, x*y])
|
|
703
|
+
sage: f(X) # needs sage.libs.singular
|
|
704
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
705
|
+
defined by:
|
|
706
|
+
w - t,
|
|
707
|
+
v - t,
|
|
708
|
+
u - t
|
|
709
|
+
|
|
710
|
+
::
|
|
711
|
+
|
|
712
|
+
sage: P1.<u,v> = ProjectiveSpace(QQ, 1)
|
|
713
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
714
|
+
sage: H = Hom(P2, P1)
|
|
715
|
+
sage: f = H([x^2, y*z])
|
|
716
|
+
sage: X = P2.subscheme([x - y])
|
|
717
|
+
sage: f(X) # needs sage.libs.singular
|
|
718
|
+
Traceback (most recent call last):
|
|
719
|
+
...
|
|
720
|
+
TypeError: map must be a morphism
|
|
721
|
+
|
|
722
|
+
::
|
|
723
|
+
|
|
724
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
725
|
+
sage: H = End(PS)
|
|
726
|
+
sage: f = H([x^3, x*y^2, x*z^2])
|
|
727
|
+
sage: X = PS.subscheme([x - y])
|
|
728
|
+
sage: X._forward_image(f) # needs sage.libs.singular
|
|
729
|
+
Traceback (most recent call last):
|
|
730
|
+
...
|
|
731
|
+
TypeError: map must be a morphism
|
|
732
|
+
|
|
733
|
+
::
|
|
734
|
+
|
|
735
|
+
sage: PS.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
736
|
+
sage: P1.<u,v> = ProjectiveSpace(QQ, 1)
|
|
737
|
+
sage: Y = P1.subscheme([u - v])
|
|
738
|
+
sage: H = End(PS)
|
|
739
|
+
sage: f = H([x^2, y^2, z^2])
|
|
740
|
+
sage: Y._forward_image(f) # needs sage.libs.singular
|
|
741
|
+
Traceback (most recent call last):
|
|
742
|
+
...
|
|
743
|
+
TypeError: subscheme must be in ambient space of domain of map
|
|
744
|
+
"""
|
|
745
|
+
if check:
|
|
746
|
+
if not f.is_morphism():
|
|
747
|
+
raise TypeError("map must be a morphism")
|
|
748
|
+
dom = f.domain()
|
|
749
|
+
codom = f.codomain()
|
|
750
|
+
if check:
|
|
751
|
+
if self.ambient_space() != dom:
|
|
752
|
+
raise TypeError("subscheme must be in ambient space of domain of map")
|
|
753
|
+
CR_dom = dom.coordinate_ring()
|
|
754
|
+
CR_codom = codom.coordinate_ring()
|
|
755
|
+
n = CR_dom.ngens()
|
|
756
|
+
m = CR_codom.ngens()
|
|
757
|
+
# can't call eliminate if the base ring is polynomial so we do it ourselves
|
|
758
|
+
# with a lex ordering
|
|
759
|
+
R = PolynomialRing(f.base_ring(), n + m, 'tempvar', order='lex')
|
|
760
|
+
Rvars = R.gens()[0:n]
|
|
761
|
+
phi = CR_dom.hom(Rvars, R)
|
|
762
|
+
zero = n * [0]
|
|
763
|
+
psi = R.hom(zero + list(CR_codom.gens()), CR_codom)
|
|
764
|
+
# set up ideal
|
|
765
|
+
L = R.ideal([phi(t) for t in self.defining_polynomials()] + [R.gen(n + i) - phi(f[i]) for i in range(m)])
|
|
766
|
+
G = L.groebner_basis() # eliminate
|
|
767
|
+
newL = []
|
|
768
|
+
# get only the elimination ideal portion
|
|
769
|
+
for i in range(len(G) - 1, 0, -1):
|
|
770
|
+
v = G[i].variables()
|
|
771
|
+
if all(Rvars[j] not in v for j in range(n)):
|
|
772
|
+
newL.append(psi(G[i]))
|
|
773
|
+
return codom.subscheme(newL)
|
|
774
|
+
|
|
775
|
+
def preimage(self, f, k=1, check=True):
|
|
776
|
+
r"""
|
|
777
|
+
The subscheme that maps to this scheme by the map `f^k`.
|
|
778
|
+
|
|
779
|
+
In particular, `f^{-k}(V(h_1,\ldots,h_t)) = V(h_1 \circ f^k, \ldots, h_t \circ f^k)`.
|
|
780
|
+
Map must be a morphism and also must be an endomorphism for `k > 1`.
|
|
781
|
+
|
|
782
|
+
INPUT:
|
|
783
|
+
|
|
784
|
+
- ``f`` -- a map whose codomain contains this scheme
|
|
785
|
+
|
|
786
|
+
- ``k`` -- positive integer
|
|
787
|
+
|
|
788
|
+
- ``check`` -- boolean; if ``False`` no input checking is done
|
|
789
|
+
|
|
790
|
+
OUTPUT: a subscheme in the domain of ``f``
|
|
791
|
+
|
|
792
|
+
EXAMPLES::
|
|
793
|
+
|
|
794
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
795
|
+
sage: H = End(PS)
|
|
796
|
+
sage: f = H([y^2, x^2, z^2])
|
|
797
|
+
sage: X = PS.subscheme([x - y])
|
|
798
|
+
sage: X.preimage(f) # needs sage.libs.singular
|
|
799
|
+
Closed subscheme of Projective Space of dimension 2 over Integer Ring
|
|
800
|
+
defined by:
|
|
801
|
+
-x^2 + y^2
|
|
802
|
+
|
|
803
|
+
::
|
|
804
|
+
|
|
805
|
+
sage: P.<x,y,z,w,t> = ProjectiveSpace(QQ, 4)
|
|
806
|
+
sage: H = End(P)
|
|
807
|
+
sage: f = H([x^2 - y^2, y^2, z^2, w^2, t^2 + w^2])
|
|
808
|
+
sage: f.rational_preimages(P.subscheme([x - z, t^2, w - t])) # needs sage.libs.singular
|
|
809
|
+
Closed subscheme of Projective Space of dimension 4 over Rational Field
|
|
810
|
+
defined by:
|
|
811
|
+
x^2 - y^2 - z^2,
|
|
812
|
+
w^4 + 2*w^2*t^2 + t^4,
|
|
813
|
+
-t^2
|
|
814
|
+
|
|
815
|
+
::
|
|
816
|
+
|
|
817
|
+
sage: P1.<x,y> = ProjectiveSpace(QQ, 1)
|
|
818
|
+
sage: P3.<u,v,w,t> = ProjectiveSpace(QQ, 3)
|
|
819
|
+
sage: H = Hom(P1, P3)
|
|
820
|
+
sage: X = P3.subscheme([u - v, 2*u - w, u + t])
|
|
821
|
+
sage: f = H([x^2, y^2, x^2 + y^2, x*y])
|
|
822
|
+
sage: X.preimage(f) # needs sage.libs.singular
|
|
823
|
+
Closed subscheme of Projective Space of dimension 1 over Rational Field
|
|
824
|
+
defined by:
|
|
825
|
+
x^2 - y^2,
|
|
826
|
+
x^2 - y^2,
|
|
827
|
+
x^2 + x*y
|
|
828
|
+
|
|
829
|
+
::
|
|
830
|
+
|
|
831
|
+
sage: P1.<x,y> = ProjectiveSpace(QQ, 1)
|
|
832
|
+
sage: P3.<u,v,w,t> = ProjectiveSpace(QQ, 3)
|
|
833
|
+
sage: H = Hom(P3, P1)
|
|
834
|
+
sage: X = P1.subscheme([x - y])
|
|
835
|
+
sage: f = H([u^2, v^2])
|
|
836
|
+
sage: X.preimage(f) # needs sage.libs.singular
|
|
837
|
+
Traceback (most recent call last):
|
|
838
|
+
...
|
|
839
|
+
TypeError: map must be a morphism
|
|
840
|
+
|
|
841
|
+
::
|
|
842
|
+
|
|
843
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
844
|
+
sage: H = End(PS)
|
|
845
|
+
sage: f = H([x^2, x^2, x^2])
|
|
846
|
+
sage: X = PS.subscheme([x - y])
|
|
847
|
+
sage: X.preimage(f) # needs sage.libs.singular
|
|
848
|
+
Traceback (most recent call last):
|
|
849
|
+
...
|
|
850
|
+
TypeError: map must be a morphism
|
|
851
|
+
|
|
852
|
+
::
|
|
853
|
+
|
|
854
|
+
sage: PS.<x,y,z> = ProjectiveSpace(ZZ, 2)
|
|
855
|
+
sage: P1.<u,v> = ProjectiveSpace(ZZ, 1)
|
|
856
|
+
sage: Y = P1.subscheme([u^2 - v^2])
|
|
857
|
+
sage: H = End(PS)
|
|
858
|
+
sage: f = H([x^2, y^2, z^2])
|
|
859
|
+
sage: Y.preimage(f) # needs sage.libs.singular
|
|
860
|
+
Traceback (most recent call last):
|
|
861
|
+
...
|
|
862
|
+
TypeError: subscheme must be in ambient space of codomain
|
|
863
|
+
|
|
864
|
+
::
|
|
865
|
+
|
|
866
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
867
|
+
sage: Y = P.subscheme([x - y])
|
|
868
|
+
sage: H = End(P)
|
|
869
|
+
sage: f = H([x^2, y^2, z^2])
|
|
870
|
+
sage: Y.preimage(f, k=2) # needs sage.libs.singular sage.schemes
|
|
871
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
872
|
+
defined by:
|
|
873
|
+
x^4 - y^4
|
|
874
|
+
"""
|
|
875
|
+
dom = f.domain()
|
|
876
|
+
codom = f.codomain()
|
|
877
|
+
if check:
|
|
878
|
+
if not f.is_morphism():
|
|
879
|
+
raise TypeError("map must be a morphism")
|
|
880
|
+
if self.ambient_space() != codom:
|
|
881
|
+
raise TypeError("subscheme must be in ambient space of codomain")
|
|
882
|
+
k = ZZ(k)
|
|
883
|
+
if k <= 0:
|
|
884
|
+
raise ValueError("k (=%s) must be a positive integer" % (k))
|
|
885
|
+
if k > 1 and not f.is_endomorphism():
|
|
886
|
+
raise TypeError("map must be an endomorphism")
|
|
887
|
+
R = codom.coordinate_ring()
|
|
888
|
+
F = f.as_dynamical_system().nth_iterate_map(k) if k > 1 else f
|
|
889
|
+
dic = {R.gen(i): F[i] for i in range(codom.dimension_relative() + 1)}
|
|
890
|
+
return dom.subscheme([t.subs(dic) for t in self.defining_polynomials()])
|
|
891
|
+
|
|
892
|
+
def dual(self):
|
|
893
|
+
r"""
|
|
894
|
+
Return the projective dual of the given subscheme of projective space.
|
|
895
|
+
|
|
896
|
+
INPUT:
|
|
897
|
+
|
|
898
|
+
- ``X`` -- a subscheme of projective space. At present, ``X`` is
|
|
899
|
+
required to be an irreducible and reduced hypersurface defined
|
|
900
|
+
over `\QQ` or a finite field.
|
|
901
|
+
|
|
902
|
+
OUTPUT: the dual of ``X`` as a subscheme of the dual projective space
|
|
903
|
+
|
|
904
|
+
EXAMPLES:
|
|
905
|
+
|
|
906
|
+
The dual of a smooth conic in the plane is also a smooth conic::
|
|
907
|
+
|
|
908
|
+
sage: R.<x, y, z> = QQ[]
|
|
909
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
910
|
+
sage: I = R.ideal(x^2 + y^2 + z^2)
|
|
911
|
+
sage: X = P.subscheme(I)
|
|
912
|
+
sage: X.dual() # needs sage.libs.singular
|
|
913
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
914
|
+
defined by:
|
|
915
|
+
y0^2 + y1^2 + y2^2
|
|
916
|
+
|
|
917
|
+
The dual of the twisted cubic curve in projective 3-space is a singular
|
|
918
|
+
quartic surface. In the following example, we compute the dual of this
|
|
919
|
+
surface, which by double duality is equal to the twisted cubic itself.
|
|
920
|
+
The output is the twisted cubic as an intersection of three quadrics::
|
|
921
|
+
|
|
922
|
+
sage: R.<x, y, z, w> = QQ[]
|
|
923
|
+
sage: P.<x, y, z, w> = ProjectiveSpace(3, QQ)
|
|
924
|
+
sage: I = R.ideal(y^2*z^2 - 4*x*z^3 - 4*y^3*w + 18*x*y*z*w - 27*x^2*w^2)
|
|
925
|
+
sage: X = P.subscheme(I)
|
|
926
|
+
sage: X.dual() # needs sage.libs.singular
|
|
927
|
+
Closed subscheme of Projective Space of dimension 3 over
|
|
928
|
+
Rational Field defined by:
|
|
929
|
+
y2^2 - y1*y3,
|
|
930
|
+
y1*y2 - y0*y3,
|
|
931
|
+
y1^2 - y0*y2
|
|
932
|
+
|
|
933
|
+
The singular locus of the quartic surface in the last example
|
|
934
|
+
is itself supported on a twisted cubic::
|
|
935
|
+
|
|
936
|
+
sage: X.Jacobian().radical() # needs sage.libs.singular
|
|
937
|
+
Ideal (z^2 - 3*y*w, y*z - 9*x*w, y^2 - 3*x*z) of Multivariate
|
|
938
|
+
Polynomial Ring in x, y, z, w over Rational Field
|
|
939
|
+
|
|
940
|
+
An example over a finite field::
|
|
941
|
+
|
|
942
|
+
sage: R = PolynomialRing(GF(61), 'a,b,c')
|
|
943
|
+
sage: P.<a, b, c> = ProjectiveSpace(2, R.base_ring())
|
|
944
|
+
sage: X = P.subscheme(R.ideal(a*a + 2*b*b + 3*c*c))
|
|
945
|
+
sage: X.dual() # needs sage.libs.singular sage.rings.finite_rings
|
|
946
|
+
Closed subscheme of Projective Space of dimension 2 over
|
|
947
|
+
Finite Field of size 61 defined by:
|
|
948
|
+
y0^2 - 30*y1^2 - 20*y2^2
|
|
949
|
+
|
|
950
|
+
TESTS::
|
|
951
|
+
|
|
952
|
+
sage: # needs sage.rings.padics
|
|
953
|
+
sage: R = PolynomialRing(Qp(3), 'a,b,c')
|
|
954
|
+
sage: P.<a, b, c> = ProjectiveSpace(2, R.base_ring())
|
|
955
|
+
sage: X = P.subscheme(R.ideal(a*a + 2*b*b + 3*c*c))
|
|
956
|
+
sage: X.dual() # needs sage.libs.singular
|
|
957
|
+
Traceback (most recent call last):
|
|
958
|
+
...
|
|
959
|
+
NotImplementedError: base ring must be QQ or a finite field
|
|
960
|
+
"""
|
|
961
|
+
from sage.libs.singular.function_factory import ff
|
|
962
|
+
|
|
963
|
+
K = self.base_ring()
|
|
964
|
+
if not (isinstance(K, RationalField) or K in Fields().Finite()):
|
|
965
|
+
raise NotImplementedError("base ring must be QQ or a finite field")
|
|
966
|
+
I = self.defining_ideal()
|
|
967
|
+
m = I.ngens()
|
|
968
|
+
n = I.ring().ngens() - 1
|
|
969
|
+
if (m != 1 or (n < 1) or I.is_zero()
|
|
970
|
+
or I.is_trivial() or not I.is_prime()):
|
|
971
|
+
raise NotImplementedError("At the present, the method is only"
|
|
972
|
+
" implemented for irreducible and"
|
|
973
|
+
" reduced hypersurfaces and the given"
|
|
974
|
+
" list of generators for the ideal must"
|
|
975
|
+
" have exactly one element.")
|
|
976
|
+
R = PolynomialRing(K, 'x', n + 1)
|
|
977
|
+
from sage.schemes.projective.projective_space import ProjectiveSpace
|
|
978
|
+
Pd = ProjectiveSpace(n, K, 'y')
|
|
979
|
+
Rd = Pd.coordinate_ring()
|
|
980
|
+
x = R.variable_names()
|
|
981
|
+
y = Rd.variable_names()
|
|
982
|
+
S = PolynomialRing(K, x + y + ('t',))
|
|
983
|
+
if S.has_coerce_map_from(I.ring()):
|
|
984
|
+
T = PolynomialRing(K, 'w', n + 1)
|
|
985
|
+
I_S = (I.change_ring(T)).change_ring(S)
|
|
986
|
+
else:
|
|
987
|
+
I_S = I.change_ring(S)
|
|
988
|
+
f_S = I_S.gens()[0]
|
|
989
|
+
z = S.gens()
|
|
990
|
+
J = I_S
|
|
991
|
+
for i in range(n + 1):
|
|
992
|
+
J = J + S.ideal(z[-1] * f_S.derivative(z[i]) - z[i + n + 1])
|
|
993
|
+
|
|
994
|
+
try:
|
|
995
|
+
sat = ff.elim__lib.sat_with_exp
|
|
996
|
+
except NameError:
|
|
997
|
+
sat = ff.elim__lib.sat
|
|
998
|
+
|
|
999
|
+
max_ideal = S.ideal(z[n + 1: 2 * n + 2])
|
|
1000
|
+
J_sat_gens = sat(J, max_ideal)[0]
|
|
1001
|
+
J_sat = S.ideal(J_sat_gens)
|
|
1002
|
+
L = J_sat.elimination_ideal(z[0: n + 1] + (z[-1],))
|
|
1003
|
+
return Pd.subscheme(L.change_ring(Rd))
|
|
1004
|
+
|
|
1005
|
+
def degree(self):
|
|
1006
|
+
r"""
|
|
1007
|
+
Return the degree of this projective subscheme.
|
|
1008
|
+
|
|
1009
|
+
If `P(t) = a_{m}t^m + \ldots + a_{0}` is the Hilbert
|
|
1010
|
+
polynomial of this subscheme, then the degree is `a_{m} m!`.
|
|
1011
|
+
|
|
1012
|
+
OUTPUT: integer
|
|
1013
|
+
|
|
1014
|
+
EXAMPLES::
|
|
1015
|
+
|
|
1016
|
+
sage: P.<x,y,z,w,t,u> = ProjectiveSpace(QQ, 5)
|
|
1017
|
+
sage: X = P.subscheme([x^7 + x*y*z*t^4 - u^7])
|
|
1018
|
+
sage: X.degree() # needs sage.libs.singular
|
|
1019
|
+
7
|
|
1020
|
+
|
|
1021
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(GF(13), 3)
|
|
1022
|
+
sage: X = P.subscheme([y^3 - w^3, x + 7*z])
|
|
1023
|
+
sage: X.degree() # needs sage.libs.singular
|
|
1024
|
+
3
|
|
1025
|
+
|
|
1026
|
+
sage: # needs sage.libs.singular sage.schemes
|
|
1027
|
+
sage: P.<x,y,z,w,u> = ProjectiveSpace(QQ, 4)
|
|
1028
|
+
sage: C = P.curve([x^7 - y*z^3*w^2*u, w*x^2 - y*u^2, z^3 + y^3])
|
|
1029
|
+
sage: C.degree()
|
|
1030
|
+
63
|
|
1031
|
+
"""
|
|
1032
|
+
P = self.defining_ideal().hilbert_polynomial()
|
|
1033
|
+
return P.leading_coefficient() * P.degree().factorial()
|
|
1034
|
+
|
|
1035
|
+
def intersection_multiplicity(self, X, P):
|
|
1036
|
+
r"""
|
|
1037
|
+
Return the intersection multiplicity of this subscheme and the subscheme ``X`` at the point ``P``.
|
|
1038
|
+
|
|
1039
|
+
This uses the intersection_multiplicity function for affine subschemes on affine patches of this subscheme
|
|
1040
|
+
and ``X`` that contain ``P``.
|
|
1041
|
+
|
|
1042
|
+
INPUT:
|
|
1043
|
+
|
|
1044
|
+
- ``X`` -- subscheme in the same ambient space as this subscheme
|
|
1045
|
+
|
|
1046
|
+
- ``P`` -- a point in the intersection of this subscheme with ``X``
|
|
1047
|
+
|
|
1048
|
+
OUTPUT: integer
|
|
1049
|
+
|
|
1050
|
+
EXAMPLES::
|
|
1051
|
+
|
|
1052
|
+
sage: # needs sage.schemes
|
|
1053
|
+
sage: P.<x,y,z> = ProjectiveSpace(GF(5), 2)
|
|
1054
|
+
sage: C = Curve([x^4 - z^2*y^2], P)
|
|
1055
|
+
sage: D = Curve([y^4*z - x^5 - x^3*z^2], P)
|
|
1056
|
+
sage: Q1 = P([0,1,0])
|
|
1057
|
+
sage: C.intersection_multiplicity(D, Q1) # needs sage.libs.singular
|
|
1058
|
+
4
|
|
1059
|
+
sage: Q2 = P([0,0,1])
|
|
1060
|
+
sage: C.intersection_multiplicity(D, Q2) # needs sage.libs.singular
|
|
1061
|
+
6
|
|
1062
|
+
|
|
1063
|
+
::
|
|
1064
|
+
|
|
1065
|
+
sage: # needs sage.rings.number_field
|
|
1066
|
+
sage: R.<a> = QQ[]
|
|
1067
|
+
sage: K.<b> = NumberField(a^4 + 1)
|
|
1068
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(K, 3)
|
|
1069
|
+
sage: X = P.subscheme([x^2 + y^2 - z*w])
|
|
1070
|
+
sage: Y = P.subscheme([y*z - x*w, z - w])
|
|
1071
|
+
sage: Q1 = P([b^2,1,0,0])
|
|
1072
|
+
sage: X.intersection_multiplicity(Y, Q1) # needs sage.libs.singular
|
|
1073
|
+
1
|
|
1074
|
+
sage: Q2 = P([1/2*b^3 - 1/2*b, 1/2*b^3 - 1/2*b, 1, 1])
|
|
1075
|
+
sage: X.intersection_multiplicity(Y, Q2) # needs sage.libs.singular
|
|
1076
|
+
1
|
|
1077
|
+
|
|
1078
|
+
::
|
|
1079
|
+
|
|
1080
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(QQ, 3)
|
|
1081
|
+
sage: X = P.subscheme([x^2 - z^2, y^3 - w*x^2])
|
|
1082
|
+
sage: Y = P.subscheme([w^2 - 2*x*y + z^2, y^2 - w^2])
|
|
1083
|
+
sage: Q = P([1,1,-1,1])
|
|
1084
|
+
sage: X.intersection_multiplicity(Y, Q) # needs sage.libs.singular
|
|
1085
|
+
Traceback (most recent call last):
|
|
1086
|
+
...
|
|
1087
|
+
TypeError: the intersection of this subscheme and (=Closed subscheme of Affine Space of dimension 3
|
|
1088
|
+
over Rational Field defined by: z^2 + w^2 - 2*y, y^2 - w^2)
|
|
1089
|
+
must be proper and finite
|
|
1090
|
+
"""
|
|
1091
|
+
try:
|
|
1092
|
+
self.ambient_space()(P)
|
|
1093
|
+
except TypeError:
|
|
1094
|
+
raise TypeError("(={}) must be a point in the ambient space of this subscheme and (={})".format(P, X))
|
|
1095
|
+
# find an affine chart of the ambient space of this curve that contains P
|
|
1096
|
+
n = self.ambient_space().dimension_relative()
|
|
1097
|
+
for i in range(n + 1):
|
|
1098
|
+
if P[i] != 0:
|
|
1099
|
+
break
|
|
1100
|
+
X1 = self.affine_patch(i)
|
|
1101
|
+
X2 = X.affine_patch(i)
|
|
1102
|
+
return X1.intersection_multiplicity(X2, X1(P.dehomogenize(i)))
|
|
1103
|
+
|
|
1104
|
+
def multiplicity(self, P):
|
|
1105
|
+
r"""
|
|
1106
|
+
Return the multiplicity of ``P`` on this subscheme.
|
|
1107
|
+
|
|
1108
|
+
This is computed as the multiplicity of the corresponding point on an affine patch of this subscheme
|
|
1109
|
+
that contains ``P``. This subscheme must be defined over a field. An error is returned if ``P``
|
|
1110
|
+
not a point on this subscheme.
|
|
1111
|
+
|
|
1112
|
+
INPUT:
|
|
1113
|
+
|
|
1114
|
+
- ``P`` -- a point on this subscheme
|
|
1115
|
+
|
|
1116
|
+
OUTPUT: integer
|
|
1117
|
+
|
|
1118
|
+
EXAMPLES::
|
|
1119
|
+
|
|
1120
|
+
sage: P.<x,y,z,w,t> = ProjectiveSpace(QQ, 4)
|
|
1121
|
+
sage: X = P.subscheme([y^2 - x*t, w^7 - t*w*x^5 - z^7])
|
|
1122
|
+
sage: Q1 = P([0,0,1,1,1])
|
|
1123
|
+
sage: X.multiplicity(Q1) # needs sage.libs.singular
|
|
1124
|
+
1
|
|
1125
|
+
sage: Q2 = P([1,0,0,0,0])
|
|
1126
|
+
sage: X.multiplicity(Q2) # needs sage.libs.singular
|
|
1127
|
+
3
|
|
1128
|
+
sage: Q3 = P([0,0,0,0,1])
|
|
1129
|
+
sage: X.multiplicity(Q3) # needs sage.libs.singular
|
|
1130
|
+
7
|
|
1131
|
+
|
|
1132
|
+
::
|
|
1133
|
+
|
|
1134
|
+
sage: # needs sage.rings.real_mpfr
|
|
1135
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(CC, 3)
|
|
1136
|
+
sage: X = P.subscheme([z^5*x^2*w - y^8])
|
|
1137
|
+
sage: Q = P([2,0,0,1])
|
|
1138
|
+
sage: X.multiplicity(Q) # needs sage.libs.singular
|
|
1139
|
+
5
|
|
1140
|
+
|
|
1141
|
+
::
|
|
1142
|
+
|
|
1143
|
+
sage: # needs sage.libs.singular sage.schemes
|
|
1144
|
+
sage: P.<x,y,z,w> = ProjectiveSpace(GF(29), 3)
|
|
1145
|
+
sage: C = Curve([y^17 - x^5*w^4*z^8, x*y - z^2], P)
|
|
1146
|
+
sage: Q = P([3,0,0,1])
|
|
1147
|
+
sage: C.multiplicity(Q)
|
|
1148
|
+
8
|
|
1149
|
+
"""
|
|
1150
|
+
if self.base_ring() not in Fields():
|
|
1151
|
+
raise TypeError("subscheme must be defined over a field")
|
|
1152
|
+
|
|
1153
|
+
# check whether P is a point on this subscheme
|
|
1154
|
+
try:
|
|
1155
|
+
P = self(P)
|
|
1156
|
+
except TypeError:
|
|
1157
|
+
raise TypeError(f"(={P}) is not a point on (={self})")
|
|
1158
|
+
|
|
1159
|
+
# find an affine chart of the ambient space of self that contains P
|
|
1160
|
+
i = 0
|
|
1161
|
+
while P[i] == 0:
|
|
1162
|
+
i += 1
|
|
1163
|
+
X = self.affine_patch(i)
|
|
1164
|
+
return X.multiplicity(X(P.dehomogenize(i)))
|
|
1165
|
+
|
|
1166
|
+
def veronese_embedding(self, d, CS=None, order='lex'):
|
|
1167
|
+
r"""
|
|
1168
|
+
Return the degree ``d`` Veronese embedding of this projective subscheme.
|
|
1169
|
+
|
|
1170
|
+
INPUT:
|
|
1171
|
+
|
|
1172
|
+
- ``d`` -- positive integer
|
|
1173
|
+
|
|
1174
|
+
- ``CS`` -- (default: ``None``) a projective ambient space to embed
|
|
1175
|
+
into. If the projective ambient space of this subscheme is of
|
|
1176
|
+
dimension `N`, the dimension of ``CS`` must be
|
|
1177
|
+
`\binom{N + d}{d} - 1`. This is constructed if not specified.
|
|
1178
|
+
|
|
1179
|
+
- ``order`` -- string (default: ``'lex'``); a monomial order to use to
|
|
1180
|
+
arrange the monomials defining the embedding. The monomials will be
|
|
1181
|
+
arranged from greatest to least with respect to this order.
|
|
1182
|
+
|
|
1183
|
+
OUTPUT: a scheme morphism from this subscheme to its image by the
|
|
1184
|
+
degree ``d`` Veronese embedding
|
|
1185
|
+
|
|
1186
|
+
EXAMPLES::
|
|
1187
|
+
|
|
1188
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
1189
|
+
sage: L = P.subscheme([y - x])
|
|
1190
|
+
sage: v = L.veronese_embedding(2); v # needs sage.combinat sage.libs.singular
|
|
1191
|
+
Scheme morphism:
|
|
1192
|
+
From: Closed subscheme of Projective Space of dimension 2
|
|
1193
|
+
over Rational Field defined by: -x + y
|
|
1194
|
+
To: Closed subscheme of Projective Space of dimension 5
|
|
1195
|
+
over Rational Field defined by:
|
|
1196
|
+
-x4^2 + x3*x5,
|
|
1197
|
+
x2 - x4,
|
|
1198
|
+
x1 - x3,
|
|
1199
|
+
x0 - x3
|
|
1200
|
+
Defn: Defined on coordinates by sending (x : y : z) to
|
|
1201
|
+
(x^2 : x*y : x*z : y^2 : y*z : z^2)
|
|
1202
|
+
sage: v.codomain().degree() # needs sage.combinat sage.libs.singular
|
|
1203
|
+
2
|
|
1204
|
+
sage: C = P.subscheme([y*z - x^2])
|
|
1205
|
+
sage: C.veronese_embedding(2).codomain().degree() # needs sage.combinat sage.libs.singular
|
|
1206
|
+
4
|
|
1207
|
+
|
|
1208
|
+
twisted cubic::
|
|
1209
|
+
|
|
1210
|
+
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
|
|
1211
|
+
sage: Q.<u,v,s,t> = ProjectiveSpace(QQ, 3)
|
|
1212
|
+
sage: P.subscheme([]).veronese_embedding(3, Q) # needs sage.combinat sage.libs.singular
|
|
1213
|
+
Scheme morphism:
|
|
1214
|
+
From: Closed subscheme of Projective Space of dimension 1
|
|
1215
|
+
over Rational Field defined by: (no polynomials)
|
|
1216
|
+
To: Closed subscheme of Projective Space of dimension 3
|
|
1217
|
+
over Rational Field defined by:
|
|
1218
|
+
-s^2 + v*t,
|
|
1219
|
+
-v*s + u*t,
|
|
1220
|
+
-v^2 + u*s
|
|
1221
|
+
Defn: Defined on coordinates by sending (x : y) to
|
|
1222
|
+
(x^3 : x^2*y : x*y^2 : y^3)
|
|
1223
|
+
"""
|
|
1224
|
+
# construct map between projective spaces
|
|
1225
|
+
v = self.ambient_space().veronese_embedding(d, CS, order)
|
|
1226
|
+
# return this map restricted to self and its image
|
|
1227
|
+
return Hom(self, v(self))(v.defining_polynomials())
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
class AlgebraicScheme_subscheme_projective_field(AlgebraicScheme_subscheme_projective):
|
|
1231
|
+
"""
|
|
1232
|
+
Algebraic subschemes of projective spaces defined over fields.
|
|
1233
|
+
"""
|
|
1234
|
+
def _morphism(self, *args, **kwds):
|
|
1235
|
+
r"""
|
|
1236
|
+
Construct a morphism determined by action on points of ``self``.
|
|
1237
|
+
|
|
1238
|
+
For internal use only.
|
|
1239
|
+
|
|
1240
|
+
INPUT:
|
|
1241
|
+
|
|
1242
|
+
- same as for
|
|
1243
|
+
:class:`~sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space`.
|
|
1244
|
+
|
|
1245
|
+
OUTPUT: :class:`~sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space`
|
|
1246
|
+
|
|
1247
|
+
TESTS::
|
|
1248
|
+
|
|
1249
|
+
sage: P1.<x,y> = ProjectiveSpace(1, QQ)
|
|
1250
|
+
sage: P2 = ProjectiveSpace(2, QQ)
|
|
1251
|
+
sage: H12 = P1.Hom(P2)
|
|
1252
|
+
sage: H12([x^2, x*y, y^2]) # indirect doctest
|
|
1253
|
+
Scheme morphism:
|
|
1254
|
+
From: Projective Space of dimension 1 over Rational Field
|
|
1255
|
+
To: Projective Space of dimension 2 over Rational Field
|
|
1256
|
+
Defn: Defined on coordinates by sending (x : y) to (x^2 : x*y : y^2)
|
|
1257
|
+
sage: P1._morphism(H12, [x^2, x*y, y^2])
|
|
1258
|
+
Scheme morphism:
|
|
1259
|
+
From: Projective Space of dimension 1 over Rational Field
|
|
1260
|
+
To: Projective Space of dimension 2 over Rational Field
|
|
1261
|
+
Defn: Defined on coordinates by sending (x : y) to (x^2 : x*y : y^2)
|
|
1262
|
+
"""
|
|
1263
|
+
return SchemeMorphism_polynomial_projective_subscheme_field(*args, **kwds)
|
|
1264
|
+
|
|
1265
|
+
def Chow_form(self):
|
|
1266
|
+
r"""
|
|
1267
|
+
Return the Chow form associated to this subscheme.
|
|
1268
|
+
|
|
1269
|
+
For a `k`-dimensional subvariety of `\mathbb{P}^N` of degree `D`.
|
|
1270
|
+
The `(N-k-1)`-dimensional projective linear subspaces of `\mathbb{P}^N`
|
|
1271
|
+
meeting `X` form a hypersurface in the Grassmannian `G(N-k-1,N)`.
|
|
1272
|
+
The homogeneous form of degree `D` defining this hypersurface in Plucker
|
|
1273
|
+
coordinates is called the Chow form of `X`.
|
|
1274
|
+
|
|
1275
|
+
The base ring needs to be a number field, finite field, or `\QQbar`.
|
|
1276
|
+
|
|
1277
|
+
ALGORITHM:
|
|
1278
|
+
|
|
1279
|
+
For a `k`-dimension subscheme `X` consider the `k+1` linear forms
|
|
1280
|
+
`l_i = u_{i0}x_0 + \cdots + u_{in}x_n`. Let `J` be the ideal in the
|
|
1281
|
+
polynomial ring `K[x_i,u_{ij}]` defined by the equations of `X` and the `l_i`.
|
|
1282
|
+
Let `J'` be the saturation of `J` with respect to the irrelevant ideal of
|
|
1283
|
+
the ambient projective space of `X`. The elimination ideal `I = J' \cap K[u_{ij}]`
|
|
1284
|
+
is a principal ideal, let `R` be its generator. The Chow form is obtained by
|
|
1285
|
+
writing `R` as a polynomial in Plucker coordinates (i.e. bracket polynomials).
|
|
1286
|
+
[DS1994]_.
|
|
1287
|
+
|
|
1288
|
+
OUTPUT: a homogeneous polynomial
|
|
1289
|
+
|
|
1290
|
+
EXAMPLES::
|
|
1291
|
+
|
|
1292
|
+
sage: P.<x0,x1,x2,x3> = ProjectiveSpace(GF(17), 3)
|
|
1293
|
+
sage: X = P.subscheme([x3 + x1, x2 - x0, x2 - x3])
|
|
1294
|
+
sage: X.Chow_form() # needs sage.libs.singular
|
|
1295
|
+
t0 - t1 + t2 + t3
|
|
1296
|
+
|
|
1297
|
+
::
|
|
1298
|
+
|
|
1299
|
+
sage: P.<x0,x1,x2,x3> = ProjectiveSpace(QQ, 3)
|
|
1300
|
+
sage: X = P.subscheme([x3^2 - 101*x1^2 - 3*x2*x0])
|
|
1301
|
+
sage: X.Chow_form() # needs sage.libs.singular
|
|
1302
|
+
t0^2 - 101*t2^2 - 3*t1*t3
|
|
1303
|
+
|
|
1304
|
+
::
|
|
1305
|
+
|
|
1306
|
+
sage: # needs sage.libs.singular
|
|
1307
|
+
sage: P.<x0,x1,x2,x3> = ProjectiveSpace(QQ, 3)
|
|
1308
|
+
sage: X = P.subscheme([x0*x2 - x1^2, x0*x3 - x1*x2, x1*x3 - x2^2])
|
|
1309
|
+
sage: Ch = X.Chow_form(); Ch
|
|
1310
|
+
t2^3 + 2*t2^2*t3 + t2*t3^2 - 3*t1*t2*t4 - t1*t3*t4 + t0*t4^2 + t1^2*t5
|
|
1311
|
+
sage: Y = P.subscheme_from_Chow_form(Ch, 1); Y
|
|
1312
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
1313
|
+
defined by:
|
|
1314
|
+
x2^2*x3 - x1*x3^2, -x2^3 + x0*x3^2,
|
|
1315
|
+
-x2^2*x3 + x1*x3^2, x1*x2*x3 - x0*x3^2,
|
|
1316
|
+
3*x1*x2^2 - 3*x0*x2*x3, -2*x1^2*x3 + 2*x0*x2*x3,
|
|
1317
|
+
-3*x1^2*x2 + 3*x0*x1*x3, x1^3 - x0^2*x3,
|
|
1318
|
+
x2^3 - x1*x2*x3, -3*x1*x2^2 + 2*x1^2*x3 + x0*x2*x3,
|
|
1319
|
+
2*x0*x2^2 - 2*x0*x1*x3, 3*x1^2*x2 - 2*x0*x2^2 - x0*x1*x3,
|
|
1320
|
+
-x0*x1*x2 + x0^2*x3, -x0*x1^2 + x0^2*x2,
|
|
1321
|
+
-x1^3 + x0*x1*x2, x0*x1^2 - x0^2*x2
|
|
1322
|
+
sage: I = Y.defining_ideal()
|
|
1323
|
+
sage: I.saturation(I.ring().ideal(list(I.ring().gens())))[0]
|
|
1324
|
+
Ideal (x2^2 - x1*x3, x1*x2 - x0*x3, x1^2 - x0*x2)
|
|
1325
|
+
of Multivariate Polynomial Ring in x0, x1, x2, x3 over Rational Field
|
|
1326
|
+
"""
|
|
1327
|
+
I = self.defining_ideal()
|
|
1328
|
+
P = self.ambient_space()
|
|
1329
|
+
R = P.coordinate_ring()
|
|
1330
|
+
N = P.dimension() + 1
|
|
1331
|
+
d = self.dimension()
|
|
1332
|
+
# create the ring for the generic linear hyperplanes
|
|
1333
|
+
# u0x0 + u1x1 + ...
|
|
1334
|
+
SS = PolynomialRing(R.base_ring(), 'u', N * (d + 1), order='lex')
|
|
1335
|
+
vars = SS.variable_names() + R.variable_names()
|
|
1336
|
+
S = PolynomialRing(R.base_ring(), vars, order='lex')
|
|
1337
|
+
n = S.ngens()
|
|
1338
|
+
newcoords = [S.gen(n - N + t) for t in range(N)]
|
|
1339
|
+
# map the generators of the subscheme into the ring with the hyperplane variables
|
|
1340
|
+
phi = R.hom(newcoords, S)
|
|
1341
|
+
phi(self.defining_polynomials()[0])
|
|
1342
|
+
# create the dim(X)+1 linear hyperplanes
|
|
1343
|
+
l = []
|
|
1344
|
+
for i in range(d + 1):
|
|
1345
|
+
t = 0
|
|
1346
|
+
for j in range(N):
|
|
1347
|
+
t += S.gen(N * i + j) * newcoords[j]
|
|
1348
|
+
l.append(t)
|
|
1349
|
+
# intersect the hyperplanes with X
|
|
1350
|
+
J = phi(I) + S.ideal(l)
|
|
1351
|
+
# saturate the ideal with respect to the irrelevant ideal
|
|
1352
|
+
J2 = J.saturation(S.ideal([phi(u) for u in R.gens()]))[0]
|
|
1353
|
+
# eliminate the original variables to be left with the hyperplane coefficients 'u'
|
|
1354
|
+
E = J2.elimination_ideal(newcoords)
|
|
1355
|
+
# create the plucker coordinates
|
|
1356
|
+
D = binomial(N, N - d - 1) # number of plucker coordinates
|
|
1357
|
+
tvars = [f't{i}' for i in range(D)] # plucker coordinates
|
|
1358
|
+
T = PolynomialRing(R.base_ring(), tvars + list(S.variable_names()), order='lex')
|
|
1359
|
+
L = []
|
|
1360
|
+
coeffs = [T.gen(i) for i in range(len(tvars), N * (d + 1) + len(tvars))]
|
|
1361
|
+
M = matrix(T, d + 1, N, coeffs)
|
|
1362
|
+
i = 0
|
|
1363
|
+
for c in M.minors(d + 1):
|
|
1364
|
+
L.append(T.gen(i) - c)
|
|
1365
|
+
i += 1
|
|
1366
|
+
# create the ideal that we can use for eliminating to get a polynomial
|
|
1367
|
+
# in the plucker coordinates (brackets)
|
|
1368
|
+
br = T.ideal(L)
|
|
1369
|
+
# create a mapping into a polynomial ring over the plucker coordinates
|
|
1370
|
+
# and the hyperplane coefficients
|
|
1371
|
+
psi = S.hom(coeffs + [0 for _ in range(N)], T)
|
|
1372
|
+
E2 = T.ideal([psi(u) for u in E.gens()] + br)
|
|
1373
|
+
# eliminate the hyperplane coefficients
|
|
1374
|
+
CH = E2.elimination_ideal(coeffs)
|
|
1375
|
+
# CH should be a principal ideal, but because of the relations among
|
|
1376
|
+
# the plucker coordinates, the elimination will probably have several generators
|
|
1377
|
+
|
|
1378
|
+
# get the relations among the plucker coordinates
|
|
1379
|
+
rel = br.elimination_ideal(coeffs)
|
|
1380
|
+
# reduce CH with respect to the relations
|
|
1381
|
+
reduced = [f.reduce(rel) for f in CH.gens()]
|
|
1382
|
+
# find the principal generator
|
|
1383
|
+
|
|
1384
|
+
# polynomial ring in just the plucker coordinates
|
|
1385
|
+
T2 = PolynomialRing(R.base_ring(), tvars)
|
|
1386
|
+
alp = T.hom(tvars + (N * (d + 1) + N) * [0], T2)
|
|
1387
|
+
# get the degrees of the reduced generators of CH
|
|
1388
|
+
degs = [u.degree() for u in reduced]
|
|
1389
|
+
mind = max(degs)
|
|
1390
|
+
# need the smallest degree form that did not reduce to 0
|
|
1391
|
+
for d in degs:
|
|
1392
|
+
if d < mind and d > 0:
|
|
1393
|
+
mind = d
|
|
1394
|
+
ind = degs.index(mind)
|
|
1395
|
+
CF = reduced[ind] # this should be the Chow form of X
|
|
1396
|
+
# check that it is correct (i.e., it is a principal generator for CH + the relations)
|
|
1397
|
+
rel2 = rel + [CF]
|
|
1398
|
+
assert all(f in rel2 for f in CH.gens()), "did not find a principal generator"
|
|
1399
|
+
return alp(CF)
|
|
1400
|
+
|
|
1401
|
+
def global_height(self, prec=None):
|
|
1402
|
+
"""
|
|
1403
|
+
Return the (projective) global height of the subscheme.
|
|
1404
|
+
|
|
1405
|
+
INPUT:
|
|
1406
|
+
|
|
1407
|
+
- ``prec`` -- desired floating point precision (default:
|
|
1408
|
+
default ``RealField`` precision)
|
|
1409
|
+
|
|
1410
|
+
OUTPUT: a real number
|
|
1411
|
+
|
|
1412
|
+
EXAMPLES::
|
|
1413
|
+
|
|
1414
|
+
sage: # needs sage.rings.number_field
|
|
1415
|
+
sage: R.<x> = QQ[]
|
|
1416
|
+
sage: NF.<a> = NumberField(x^2 - 5)
|
|
1417
|
+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
|
|
1418
|
+
sage: X = P.subscheme([x^2 + y*z, 2*y*z, 3*x*y])
|
|
1419
|
+
sage: X.global_height() # needs sage.libs.singular
|
|
1420
|
+
0.000000000000000
|
|
1421
|
+
|
|
1422
|
+
::
|
|
1423
|
+
|
|
1424
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
1425
|
+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
|
|
1426
|
+
sage: X.global_height() # long time # needs sage.libs.singular
|
|
1427
|
+
4.61512051684126
|
|
1428
|
+
"""
|
|
1429
|
+
return self.Chow_form().global_height(prec)
|
|
1430
|
+
|
|
1431
|
+
def local_height(self, v, prec=None):
|
|
1432
|
+
"""
|
|
1433
|
+
Return the (projective) local height of the subscheme.
|
|
1434
|
+
|
|
1435
|
+
INPUT:
|
|
1436
|
+
|
|
1437
|
+
- ``v`` -- a prime or prime ideal of the base ring
|
|
1438
|
+
|
|
1439
|
+
- ``prec`` -- desired floating point precision (default:
|
|
1440
|
+
default ``RealField`` precision)
|
|
1441
|
+
|
|
1442
|
+
OUTPUT: a real number
|
|
1443
|
+
|
|
1444
|
+
EXAMPLES::
|
|
1445
|
+
|
|
1446
|
+
sage: # needs sage.rings.number_field
|
|
1447
|
+
sage: R.<x> = QQ[]
|
|
1448
|
+
sage: NF.<a> = NumberField(x^2 - 5)
|
|
1449
|
+
sage: I = NF.ideal(3)
|
|
1450
|
+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
|
|
1451
|
+
sage: X = P.subscheme([3*x*y - 5*x*z, y^2])
|
|
1452
|
+
sage: X.local_height(I) # needs sage.libs.singular
|
|
1453
|
+
0.000000000000000
|
|
1454
|
+
|
|
1455
|
+
::
|
|
1456
|
+
|
|
1457
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
1458
|
+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
|
|
1459
|
+
sage: X.local_height(2) # needs sage.libs.singular
|
|
1460
|
+
0.000000000000000
|
|
1461
|
+
"""
|
|
1462
|
+
return self.Chow_form().local_height(v, prec)
|
|
1463
|
+
|
|
1464
|
+
def local_height_arch(self, i, prec=None):
|
|
1465
|
+
"""
|
|
1466
|
+
Return the local height at the ``i``-th infinite place of the subscheme.
|
|
1467
|
+
|
|
1468
|
+
INPUT:
|
|
1469
|
+
|
|
1470
|
+
- ``i`` -- integer
|
|
1471
|
+
|
|
1472
|
+
- ``prec`` -- desired floating point precision (default:
|
|
1473
|
+
default ``RealField`` precision)
|
|
1474
|
+
|
|
1475
|
+
OUTPUT: a real number
|
|
1476
|
+
|
|
1477
|
+
EXAMPLES::
|
|
1478
|
+
|
|
1479
|
+
sage: # needs sage.rings.number_field
|
|
1480
|
+
sage: R.<x> = QQ[]
|
|
1481
|
+
sage: NF.<a> = NumberField(x^2 - 5)
|
|
1482
|
+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
|
|
1483
|
+
sage: X = P.subscheme([x^2 + y*z, 3*x*y])
|
|
1484
|
+
sage: X.local_height_arch(1) # needs sage.libs.singular
|
|
1485
|
+
0.0000000000000000000000000000000
|
|
1486
|
+
|
|
1487
|
+
::
|
|
1488
|
+
|
|
1489
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
1490
|
+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
|
|
1491
|
+
sage: X.local_height_arch(1) # needs sage.libs.singular
|
|
1492
|
+
4.61512051684126
|
|
1493
|
+
"""
|
|
1494
|
+
return self.Chow_form().local_height_arch(i, prec)
|
|
1495
|
+
|
|
1496
|
+
def coherent_sheaf(self, module, twist=0):
|
|
1497
|
+
r"""
|
|
1498
|
+
Return the sheaf defined by the graded ``module``.
|
|
1499
|
+
|
|
1500
|
+
If ``twist`` is a non-zero integer `n`, the sheaf twisted by
|
|
1501
|
+
`\OO_{\PP^r}(n)` is returned.
|
|
1502
|
+
|
|
1503
|
+
INPUT:
|
|
1504
|
+
|
|
1505
|
+
- ``module`` -- a free module or a quotient module
|
|
1506
|
+
|
|
1507
|
+
- ``twist`` -- (default: ``0``) an integer
|
|
1508
|
+
|
|
1509
|
+
EXAMPLES::
|
|
1510
|
+
|
|
1511
|
+
sage: # needs sage.modules
|
|
1512
|
+
sage: P3.<x0,x1,x2,x3> = ProjectiveSpace(QQ, 3)
|
|
1513
|
+
sage: X = P3.subscheme(x0^3 + x1^3 + x2^3 + x3^3)
|
|
1514
|
+
sage: S = X.coordinate_ring()
|
|
1515
|
+
sage: SS = FreeModule(S, 2)
|
|
1516
|
+
sage: X.coherent_sheaf(SS, twist=2)
|
|
1517
|
+
Twisted coherent sheaf on Closed subscheme of Projective Space of dimension 3
|
|
1518
|
+
over Rational Field defined by: x0^3 + x1^3 + x2^3 + x3^3
|
|
1519
|
+
"""
|
|
1520
|
+
from sage.schemes.projective.coherent_sheaf import CoherentSheaf_on_projective_subscheme
|
|
1521
|
+
return CoherentSheaf_on_projective_subscheme(self, module, twist=twist)
|
|
1522
|
+
|
|
1523
|
+
def structure_sheaf(self, twist=0):
|
|
1524
|
+
r"""
|
|
1525
|
+
Return the structure sheaf `\OO_{\PP^r}` of this projective space.
|
|
1526
|
+
|
|
1527
|
+
If ``twist`` is a non-zero integer `n`, the sheaf twisted by
|
|
1528
|
+
`\OO_{\PP^r}(n)` is returned.
|
|
1529
|
+
|
|
1530
|
+
INPUT:
|
|
1531
|
+
|
|
1532
|
+
- ``twist`` -- (default: `0`) an integer
|
|
1533
|
+
|
|
1534
|
+
EXAMPLES::
|
|
1535
|
+
|
|
1536
|
+
sage: # needs sage.modules
|
|
1537
|
+
sage: P3.<x0,x1,x2,x3> = ProjectiveSpace(QQ, 3)
|
|
1538
|
+
sage: X = P3.subscheme(x0^3 + x1^3 + x2^3 + x3^3)
|
|
1539
|
+
sage: X.structure_sheaf()
|
|
1540
|
+
Coherent sheaf on Closed subscheme of Projective Space of dimension 3
|
|
1541
|
+
over Rational Field defined by: x0^3 + x1^3 + x2^3 + x3^3
|
|
1542
|
+
"""
|
|
1543
|
+
from sage.modules.free_module import FreeModule
|
|
1544
|
+
M = FreeModule(self.coordinate_ring(), rank=1)
|
|
1545
|
+
return self.coherent_sheaf(M, twist=twist)
|
|
1546
|
+
|
|
1547
|
+
def arithmetic_genus(self):
|
|
1548
|
+
r"""
|
|
1549
|
+
Return the arithmetic genus of this subscheme of a projective space.
|
|
1550
|
+
|
|
1551
|
+
The arithmetic genus is by definition `(-1)^r(\chi(\OO_X) - 1)` where
|
|
1552
|
+
`\chi(\OO_X)` is the Euler characteristic of the structure sheaf of
|
|
1553
|
+
the scheme `X` of dimension `r`.
|
|
1554
|
+
|
|
1555
|
+
EXAMPLES:
|
|
1556
|
+
|
|
1557
|
+
This is an example of a curve whose geometric genus is smaller than
|
|
1558
|
+
arithmetic genus due to a singular point::
|
|
1559
|
+
|
|
1560
|
+
sage: # needs sage.schemes
|
|
1561
|
+
sage: A2.<x,y> = AffineSpace(QQ,2)
|
|
1562
|
+
sage: C = Curve(x^4 - 5*x^2 - y^2 + 4, A2)
|
|
1563
|
+
sage: X = C.projective_closure()
|
|
1564
|
+
sage: X.arithmetic_genus()
|
|
1565
|
+
3
|
|
1566
|
+
sage: X.geometric_genus()
|
|
1567
|
+
1
|
|
1568
|
+
sage: X.is_singular()
|
|
1569
|
+
True
|
|
1570
|
+
"""
|
|
1571
|
+
p = self.structure_sheaf().euler_characteristic() - 1
|
|
1572
|
+
if self.dimension() % 2:
|
|
1573
|
+
p = -p
|
|
1574
|
+
return p
|