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,2092 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-categories
|
|
2
|
+
r"""
|
|
3
|
+
Algebraic schemes
|
|
4
|
+
|
|
5
|
+
An algebraic scheme is defined by a set of polynomials in some
|
|
6
|
+
suitable affine or projective coordinates. Possible ambient spaces are
|
|
7
|
+
|
|
8
|
+
* Affine spaces (:class:`AffineSpace
|
|
9
|
+
<sage.schemes.affine.affine_space.AffineSpace_generic>`),
|
|
10
|
+
|
|
11
|
+
* Projective spaces (:class:`ProjectiveSpace
|
|
12
|
+
<sage.schemes.projective.projective_space.ProjectiveSpace_ring>`), or
|
|
13
|
+
|
|
14
|
+
* Toric varieties (:class:`ToricVariety
|
|
15
|
+
<sage.schemes.toric.variety.ToricVariety_field>`).
|
|
16
|
+
|
|
17
|
+
Note that while projective spaces are of course toric varieties themselves,
|
|
18
|
+
they are implemented differently in Sage due to efficiency considerations.
|
|
19
|
+
You still can create a projective space as a toric variety if you wish.
|
|
20
|
+
|
|
21
|
+
In the following, we call the corresponding subschemes affine
|
|
22
|
+
algebraic schemes, projective algebraic schemes, or toric algebraic
|
|
23
|
+
schemes. In the future other ambient spaces, perhaps by means of
|
|
24
|
+
gluing relations, may be introduced.
|
|
25
|
+
|
|
26
|
+
Generally, polynomials `p_0, p_1, \dots, p_n` define an ideal
|
|
27
|
+
`I=\left<p_0, p_1, \dots, p_n\right>`. In the projective and toric case, the
|
|
28
|
+
polynomials (and, therefore, the ideal) must be homogeneous. The
|
|
29
|
+
associated subscheme `V(I)` of the ambient space is, roughly speaking,
|
|
30
|
+
the subset of the ambient space on which all polynomials vanish simultaneously.
|
|
31
|
+
|
|
32
|
+
.. WARNING::
|
|
33
|
+
|
|
34
|
+
You should not construct algebraic scheme objects directly. Instead, use
|
|
35
|
+
``.subscheme()`` methods of ambient spaces. See below for examples.
|
|
36
|
+
|
|
37
|
+
EXAMPLES:
|
|
38
|
+
|
|
39
|
+
We first construct the ambient space, here the affine space `\QQ^2`::
|
|
40
|
+
|
|
41
|
+
sage: A2 = AffineSpace(2, QQ, 'x, y')
|
|
42
|
+
sage: A2.coordinate_ring().inject_variables()
|
|
43
|
+
Defining x, y
|
|
44
|
+
|
|
45
|
+
Now we can write polynomial equations in the variables `x` and `y`. For
|
|
46
|
+
example, one equation cuts out a curve (a one-dimensional subscheme)::
|
|
47
|
+
|
|
48
|
+
sage: V = A2.subscheme([x^2 + y^2 - 1]); V
|
|
49
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
50
|
+
x^2 + y^2 - 1
|
|
51
|
+
sage: V.dimension() # needs sage.libs.singular
|
|
52
|
+
1
|
|
53
|
+
|
|
54
|
+
Here is a more complicated example in a projective space::
|
|
55
|
+
|
|
56
|
+
sage: P3 = ProjectiveSpace(3, QQ, 'x')
|
|
57
|
+
sage: P3.inject_variables()
|
|
58
|
+
Defining x0, x1, x2, x3
|
|
59
|
+
sage: Q = matrix([[x0, x1, x2], [x1, x2, x3]]).minors(2); Q # needs sage.modules
|
|
60
|
+
[-x1^2 + x0*x2, -x1*x2 + x0*x3, -x2^2 + x1*x3]
|
|
61
|
+
sage: twisted_cubic = P3.subscheme(Q); twisted_cubic # needs sage.libs.singular sage.modules
|
|
62
|
+
Closed subscheme of Projective Space of dimension 3 over Rational Field defined by:
|
|
63
|
+
-x1^2 + x0*x2,
|
|
64
|
+
-x1*x2 + x0*x3,
|
|
65
|
+
-x2^2 + x1*x3
|
|
66
|
+
sage: twisted_cubic.dimension() # needs sage.libs.singular sage.modules
|
|
67
|
+
1
|
|
68
|
+
|
|
69
|
+
Note that there are 3 equations in the 3-dimensional ambient space,
|
|
70
|
+
yet the subscheme is 1-dimensional. One can show that it is not
|
|
71
|
+
possible to eliminate any of the equations, that is, the twisted cubic
|
|
72
|
+
is **not** a complete intersection of two polynomial equations.
|
|
73
|
+
|
|
74
|
+
Let us look at one affine patch, for example the one where `x_0=1` ::
|
|
75
|
+
|
|
76
|
+
sage: patch = twisted_cubic.affine_patch(0); patch # needs sage.libs.singular sage.modules
|
|
77
|
+
Closed subscheme of Affine Space of dimension 3 over Rational Field defined by:
|
|
78
|
+
-x1^2 + x2,
|
|
79
|
+
-x1*x2 + x3,
|
|
80
|
+
-x2^2 + x1*x3
|
|
81
|
+
sage: patch.embedding_morphism() # needs sage.libs.singular sage.modules
|
|
82
|
+
Scheme morphism:
|
|
83
|
+
From: Closed subscheme of Affine Space of dimension 3 over Rational Field
|
|
84
|
+
defined by: -x1^2 + x2, -x1*x2 + x3, -x2^2 + x1*x3
|
|
85
|
+
To: Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
86
|
+
defined by: x1^2 - x0*x2, x1*x2 - x0*x3, x2^2 - x1*x3
|
|
87
|
+
Defn: Defined on coordinates by sending (x1, x2, x3) to (1 : x1 : x2 : x3)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
AUTHORS:
|
|
91
|
+
|
|
92
|
+
- David Kohel, William Stein (2005): initial version
|
|
93
|
+
|
|
94
|
+
- Andrey Novoseltsev (2010-05-17): subschemes of toric varieties
|
|
95
|
+
|
|
96
|
+
- Volker Braun (2010-12-24): documentation of schemes and refactoring; added
|
|
97
|
+
coordinate neighborhoods and is_smooth()
|
|
98
|
+
|
|
99
|
+
- Ben Hutz (2014): subschemes of Cartesian products of projective space
|
|
100
|
+
|
|
101
|
+
- Ben Hutz (2017): split subschemes types into respective folders
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
# ****************************************************************************
|
|
105
|
+
# Copyright (C) 2010 Volker Braun <vbraun.name@gmail.com>
|
|
106
|
+
# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu.au>
|
|
107
|
+
# Copyright (C) 2010 Andrey Novoseltsev <novoselt@gmail.com>
|
|
108
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
109
|
+
#
|
|
110
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
111
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
112
|
+
# the License, or (at your option) any later version.
|
|
113
|
+
# https://www.gnu.org/licenses/
|
|
114
|
+
# ****************************************************************************
|
|
115
|
+
|
|
116
|
+
import collections.abc
|
|
117
|
+
|
|
118
|
+
import sage.rings.abc
|
|
119
|
+
|
|
120
|
+
from sage.categories.number_fields import NumberFields
|
|
121
|
+
|
|
122
|
+
from sage.rings.ideal import Ideal_generic
|
|
123
|
+
from sage.rings.integer_ring import ZZ
|
|
124
|
+
from sage.rings.rational_field import RationalField
|
|
125
|
+
from sage.rings.finite_rings.finite_field_base import FiniteField
|
|
126
|
+
|
|
127
|
+
from sage.misc.latex import latex
|
|
128
|
+
|
|
129
|
+
from sage.structure.all import Sequence
|
|
130
|
+
from sage.structure.richcmp import richcmp, richcmp_method
|
|
131
|
+
|
|
132
|
+
from sage.arith.functions import lcm
|
|
133
|
+
from sage.arith.misc import gcd
|
|
134
|
+
|
|
135
|
+
import sage.schemes.affine
|
|
136
|
+
from . import ambient_space
|
|
137
|
+
from . import scheme
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def is_AlgebraicScheme(x):
|
|
141
|
+
"""
|
|
142
|
+
Test whether ``x`` is an algebraic scheme.
|
|
143
|
+
|
|
144
|
+
INPUT:
|
|
145
|
+
|
|
146
|
+
- ``x`` -- anything
|
|
147
|
+
|
|
148
|
+
OUTPUT:
|
|
149
|
+
|
|
150
|
+
boolean; whether ``x`` is an algebraic scheme, that is, a
|
|
151
|
+
subscheme of an ambient space over a ring defined by polynomial
|
|
152
|
+
equations.
|
|
153
|
+
|
|
154
|
+
EXAMPLES::
|
|
155
|
+
|
|
156
|
+
sage: A2 = AffineSpace(2, QQ, 'x, y')
|
|
157
|
+
sage: A2.coordinate_ring().inject_variables()
|
|
158
|
+
Defining x, y
|
|
159
|
+
sage: V = A2.subscheme([x^2 + y^2]); V
|
|
160
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
161
|
+
x^2 + y^2
|
|
162
|
+
sage: from sage.schemes.generic.algebraic_scheme import is_AlgebraicScheme
|
|
163
|
+
sage: is_AlgebraicScheme(V)
|
|
164
|
+
doctest:warning...
|
|
165
|
+
DeprecationWarning: The function is_AlgebraicScheme is deprecated; use 'isinstance(..., AlgebraicScheme)' instead.
|
|
166
|
+
See https://github.com/sagemath/sage/issues/38022 for details.
|
|
167
|
+
True
|
|
168
|
+
|
|
169
|
+
Affine space is itself not an algebraic scheme, though the closed
|
|
170
|
+
subscheme defined by no equations is::
|
|
171
|
+
|
|
172
|
+
sage: from sage.schemes.generic.algebraic_scheme import is_AlgebraicScheme
|
|
173
|
+
sage: is_AlgebraicScheme(AffineSpace(10, QQ))
|
|
174
|
+
False
|
|
175
|
+
sage: V = AffineSpace(10, QQ).subscheme([]); V
|
|
176
|
+
Closed subscheme of Affine Space of dimension 10 over Rational Field defined by:
|
|
177
|
+
(no polynomials)
|
|
178
|
+
sage: is_AlgebraicScheme(V)
|
|
179
|
+
True
|
|
180
|
+
|
|
181
|
+
We create a more complicated closed subscheme::
|
|
182
|
+
|
|
183
|
+
sage: A,x = AffineSpace(10, QQ).objgens()
|
|
184
|
+
sage: X = A.subscheme([sum(x)]); X
|
|
185
|
+
Closed subscheme of Affine Space of dimension 10 over Rational Field defined by:
|
|
186
|
+
x0 + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9
|
|
187
|
+
sage: is_AlgebraicScheme(X)
|
|
188
|
+
True
|
|
189
|
+
|
|
190
|
+
::
|
|
191
|
+
|
|
192
|
+
sage: is_AlgebraicScheme(QQ)
|
|
193
|
+
False
|
|
194
|
+
sage: S = Spec(QQ)
|
|
195
|
+
sage: is_AlgebraicScheme(S)
|
|
196
|
+
False
|
|
197
|
+
"""
|
|
198
|
+
from sage.misc.superseded import deprecation
|
|
199
|
+
deprecation(38022, "The function is_AlgebraicScheme is deprecated; use 'isinstance(..., AlgebraicScheme)' instead.")
|
|
200
|
+
return isinstance(x, AlgebraicScheme)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
# ****************************************************************************
|
|
204
|
+
# A quick overview over the class hierarchy:
|
|
205
|
+
#
|
|
206
|
+
# class AlgebraicScheme(scheme.Scheme)
|
|
207
|
+
# class AlgebraicScheme_subscheme
|
|
208
|
+
# class AlgebraicScheme_subscheme_affine
|
|
209
|
+
# class AlgebraicScheme_subscheme_projective
|
|
210
|
+
# class AlgebraicScheme_subscheme_toric
|
|
211
|
+
# class AlgebraicScheme_subscheme_affine_toric
|
|
212
|
+
# class AlgebraicScheme_quasi
|
|
213
|
+
# ****************************************************************************
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class AlgebraicScheme(scheme.Scheme):
|
|
217
|
+
"""
|
|
218
|
+
An algebraic scheme presented as a subscheme in an ambient space.
|
|
219
|
+
|
|
220
|
+
This is the base class for all algebraic schemes, that is, schemes
|
|
221
|
+
defined by equations in affine, projective, or toric ambient
|
|
222
|
+
spaces.
|
|
223
|
+
"""
|
|
224
|
+
def __init__(self, A, category=None):
|
|
225
|
+
"""
|
|
226
|
+
TESTS::
|
|
227
|
+
|
|
228
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme
|
|
229
|
+
sage: P = ProjectiveSpace(3, ZZ)
|
|
230
|
+
sage: P.category()
|
|
231
|
+
Category of schemes over Integer Ring
|
|
232
|
+
sage: S = AlgebraicScheme(P); S
|
|
233
|
+
Subscheme of Projective Space of dimension 3 over Integer Ring
|
|
234
|
+
sage: S.category()
|
|
235
|
+
Category of schemes over Integer Ring
|
|
236
|
+
"""
|
|
237
|
+
if not isinstance(A, ambient_space.AmbientSpace):
|
|
238
|
+
raise TypeError("A (=%s) must be an ambient space")
|
|
239
|
+
self.__A = A
|
|
240
|
+
self.__divisor_group = {}
|
|
241
|
+
scheme.Scheme.__init__(self, A.base_scheme(), category=category)
|
|
242
|
+
|
|
243
|
+
def _latex_(self):
|
|
244
|
+
r"""
|
|
245
|
+
Return a LaTeX representation of this algebraic scheme.
|
|
246
|
+
|
|
247
|
+
TESTS::
|
|
248
|
+
|
|
249
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme
|
|
250
|
+
sage: P = ProjectiveSpace(3, ZZ)
|
|
251
|
+
sage: S = AlgebraicScheme(P); S
|
|
252
|
+
Subscheme of Projective Space of dimension 3 over Integer Ring
|
|
253
|
+
sage: S._latex_()
|
|
254
|
+
'\\text{Subscheme of ${\\mathbf P}_{\\Bold{Z}}^{3}$}'
|
|
255
|
+
"""
|
|
256
|
+
return r"\text{{Subscheme of ${}$}}".format(latex(self.__A))
|
|
257
|
+
|
|
258
|
+
def is_projective(self):
|
|
259
|
+
"""
|
|
260
|
+
Return ``True`` if ``self`` is presented as a subscheme of an ambient
|
|
261
|
+
projective space.
|
|
262
|
+
|
|
263
|
+
OUTPUT: boolean
|
|
264
|
+
|
|
265
|
+
EXAMPLES::
|
|
266
|
+
|
|
267
|
+
sage: PP.<x,y,z,w> = ProjectiveSpace(3, QQ)
|
|
268
|
+
sage: f = x^3 + y^3 + z^3 + w^3
|
|
269
|
+
sage: R = f.parent()
|
|
270
|
+
sage: I = [f] + [f.derivative(zz) for zz in PP.gens()]
|
|
271
|
+
sage: V = PP.subscheme(I)
|
|
272
|
+
sage: V.is_projective()
|
|
273
|
+
True
|
|
274
|
+
sage: AA.<x,y,z,w> = AffineSpace(4, QQ)
|
|
275
|
+
sage: V = AA.subscheme(I)
|
|
276
|
+
sage: V.is_projective()
|
|
277
|
+
False
|
|
278
|
+
|
|
279
|
+
Note that toric varieties are implemented differently than
|
|
280
|
+
projective spaces. This is why this method returns ``False``
|
|
281
|
+
for toric varieties::
|
|
282
|
+
|
|
283
|
+
sage: # needs palp sage.geometry.polyhedron sage.graphs
|
|
284
|
+
sage: PP.<x,y,z,w> = toric_varieties.P(3)
|
|
285
|
+
sage: V = PP.subscheme(x^3 + y^3 + z^3 + w^3)
|
|
286
|
+
sage: V.is_projective()
|
|
287
|
+
False
|
|
288
|
+
"""
|
|
289
|
+
return self.ambient_space().is_projective()
|
|
290
|
+
|
|
291
|
+
def coordinate_ring(self):
|
|
292
|
+
"""
|
|
293
|
+
Return the coordinate ring of this algebraic scheme. The
|
|
294
|
+
result is cached.
|
|
295
|
+
|
|
296
|
+
OUTPUT:
|
|
297
|
+
|
|
298
|
+
The coordinate ring. Usually a polynomial ring, or a quotient
|
|
299
|
+
thereof.
|
|
300
|
+
|
|
301
|
+
EXAMPLES::
|
|
302
|
+
|
|
303
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
304
|
+
sage: S = P.subscheme([x - y, x - z])
|
|
305
|
+
sage: S.coordinate_ring()
|
|
306
|
+
Quotient of Multivariate Polynomial Ring in x, y, z over Integer Ring
|
|
307
|
+
by the ideal (x - y, x - z)
|
|
308
|
+
"""
|
|
309
|
+
try:
|
|
310
|
+
return self._coordinate_ring
|
|
311
|
+
except AttributeError:
|
|
312
|
+
R = self.__A.coordinate_ring()
|
|
313
|
+
I = self.defining_ideal()
|
|
314
|
+
Q = R.quotient(I)
|
|
315
|
+
self._coordinate_ring = Q
|
|
316
|
+
return Q
|
|
317
|
+
|
|
318
|
+
def ambient_space(self):
|
|
319
|
+
"""
|
|
320
|
+
Return the ambient space of this algebraic scheme.
|
|
321
|
+
|
|
322
|
+
EXAMPLES::
|
|
323
|
+
|
|
324
|
+
sage: A.<x, y> = AffineSpace(2, GF(5))
|
|
325
|
+
sage: S = A.subscheme([])
|
|
326
|
+
sage: S.ambient_space()
|
|
327
|
+
Affine Space of dimension 2 over Finite Field of size 5
|
|
328
|
+
|
|
329
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
330
|
+
sage: S = P.subscheme([x - y, x - z])
|
|
331
|
+
sage: S.ambient_space() is P
|
|
332
|
+
True
|
|
333
|
+
"""
|
|
334
|
+
return self.__A
|
|
335
|
+
|
|
336
|
+
def identity_morphism(self):
|
|
337
|
+
"""
|
|
338
|
+
Return the identity morphism.
|
|
339
|
+
|
|
340
|
+
OUTPUT: the identity morphism of the scheme ``self``
|
|
341
|
+
|
|
342
|
+
EXAMPLES::
|
|
343
|
+
|
|
344
|
+
sage: X = Spec(QQ)
|
|
345
|
+
sage: X.identity_morphism()
|
|
346
|
+
Scheme endomorphism of Spectrum of Rational Field
|
|
347
|
+
Defn: Identity map
|
|
348
|
+
"""
|
|
349
|
+
from sage.schemes.generic.morphism import SchemeMorphism_polynomial_id
|
|
350
|
+
return SchemeMorphism_polynomial_id(self)
|
|
351
|
+
|
|
352
|
+
def embedding_morphism(self):
|
|
353
|
+
r"""
|
|
354
|
+
Return the default embedding morphism of ``self``.
|
|
355
|
+
|
|
356
|
+
If the scheme `Y` was constructed as a neighbourhood of a
|
|
357
|
+
point `p \in X`, then :meth:`embedding_morphism` returns a
|
|
358
|
+
local isomorphism `f:Y\to X` around the preimage point
|
|
359
|
+
`f^{-1}(p)`. The latter is returned by
|
|
360
|
+
:meth:`embedding_center`.
|
|
361
|
+
|
|
362
|
+
If the algebraic scheme `Y` was not constructed as a
|
|
363
|
+
neighbourhood of a point, then the embedding in its
|
|
364
|
+
:meth:`ambient_space` is returned.
|
|
365
|
+
|
|
366
|
+
OUTPUT:
|
|
367
|
+
|
|
368
|
+
A scheme morphism whose
|
|
369
|
+
:meth:`~morphism.SchemeMorphism.domain` is ``self``.
|
|
370
|
+
|
|
371
|
+
* By default, it is the tautological embedding into its own
|
|
372
|
+
ambient space :meth:`ambient_space`.
|
|
373
|
+
|
|
374
|
+
* If the algebraic scheme (which itself is a subscheme of an
|
|
375
|
+
auxiliary :meth:`ambient_space`) was constructed as a patch
|
|
376
|
+
or neighborhood of a point then the embedding is the
|
|
377
|
+
embedding into the original scheme.
|
|
378
|
+
|
|
379
|
+
* A :exc:`NotImplementedError` is raised if the construction of
|
|
380
|
+
the embedding morphism is not implemented yet.
|
|
381
|
+
|
|
382
|
+
EXAMPLES::
|
|
383
|
+
|
|
384
|
+
sage: A2.<x,y> = AffineSpace(QQ, 2)
|
|
385
|
+
sage: C = A2.subscheme(x^2 + y^2 - 1)
|
|
386
|
+
sage: C.embedding_morphism() # needs sage.libs.singular
|
|
387
|
+
Scheme morphism:
|
|
388
|
+
From: Closed subscheme of Affine Space of dimension 2 over Rational Field
|
|
389
|
+
defined by: x^2 + y^2 - 1
|
|
390
|
+
To: Affine Space of dimension 2 over Rational Field
|
|
391
|
+
Defn: Defined on coordinates by sending (x, y) to (x, y)
|
|
392
|
+
|
|
393
|
+
sage: # needs palp sage.geometry.polyhedron sage.graphs sage.libs.singular
|
|
394
|
+
sage: P1xP1.<x,y,u,v> = toric_varieties.P1xP1()
|
|
395
|
+
sage: P1 = P1xP1.subscheme(x - y)
|
|
396
|
+
sage: P1.embedding_morphism()
|
|
397
|
+
Scheme morphism:
|
|
398
|
+
From: Closed subscheme of 2-d CPR-Fano toric variety covered
|
|
399
|
+
by 4 affine patches defined by: x - y
|
|
400
|
+
To: 2-d CPR-Fano toric variety covered by 4 affine patches
|
|
401
|
+
Defn: Defined on coordinates by sending [x : y : u : v] to [y : y : u : v]
|
|
402
|
+
|
|
403
|
+
So far, the embedding was just in the own ambient space. Now a
|
|
404
|
+
bit more interesting examples::
|
|
405
|
+
|
|
406
|
+
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
407
|
+
sage: X = P2.subscheme((x^2-y^2)*z)
|
|
408
|
+
sage: p = (1,1,0)
|
|
409
|
+
sage: nbhd = X.neighborhood(p); nbhd
|
|
410
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
411
|
+
-y^2*z - 2*y*z
|
|
412
|
+
|
|
413
|
+
Note that `p=(1,1,0)` is a singular point of `X`. So the
|
|
414
|
+
neighborhood of `p` is not just affine space. The
|
|
415
|
+
:meth:`neighborhood` method returns a presentation of
|
|
416
|
+
the neighborhood as a subscheme of an auxiliary 2-dimensional
|
|
417
|
+
affine space::
|
|
418
|
+
|
|
419
|
+
sage: nbhd.ambient_space()
|
|
420
|
+
Affine Space of dimension 2 over Rational Field
|
|
421
|
+
|
|
422
|
+
But its :meth:`embedding_morphism` is not into this auxiliary
|
|
423
|
+
affine space, but the original subscheme `X`::
|
|
424
|
+
|
|
425
|
+
sage: nbhd.embedding_morphism()
|
|
426
|
+
Scheme morphism:
|
|
427
|
+
From: Closed subscheme of Affine Space of dimension 2 over Rational Field
|
|
428
|
+
defined by: -y^2*z - 2*y*z
|
|
429
|
+
To: Closed subscheme of Projective Space of dimension 2 over Rational Field
|
|
430
|
+
defined by: x^2*z - y^2*z
|
|
431
|
+
Defn: Defined on coordinates by sending (y, z) to (1 : y + 1 : z)
|
|
432
|
+
|
|
433
|
+
A couple more examples::
|
|
434
|
+
|
|
435
|
+
sage: # needs palp sage.geometry.polyhedron sage.graphs sage.libs.singular
|
|
436
|
+
sage: patch1 = P1xP1.affine_patch(1); patch1
|
|
437
|
+
2-d affine toric variety
|
|
438
|
+
sage: patch1.embedding_morphism()
|
|
439
|
+
Scheme morphism:
|
|
440
|
+
From: 2-d affine toric variety
|
|
441
|
+
To: 2-d CPR-Fano toric variety covered by 4 affine patches
|
|
442
|
+
Defn: Defined on coordinates by sending [y : u] to [1 : y : u : 1]
|
|
443
|
+
sage: subpatch = P1.affine_patch(1); subpatch
|
|
444
|
+
Closed subscheme of 2-d affine toric variety defined by:
|
|
445
|
+
-y + 1
|
|
446
|
+
sage: subpatch.embedding_morphism()
|
|
447
|
+
Scheme morphism:
|
|
448
|
+
From: Closed subscheme of 2-d affine toric variety defined by: -y + 1
|
|
449
|
+
To: Closed subscheme of 2-d CPR-Fano toric variety covered
|
|
450
|
+
by 4 affine patches defined by: x - y
|
|
451
|
+
Defn: Defined on coordinates by sending [y : u] to [1 : y : u : 1]
|
|
452
|
+
"""
|
|
453
|
+
if '_embedding_morphism' in self.__dict__:
|
|
454
|
+
hom = self._embedding_morphism
|
|
455
|
+
if isinstance(hom, tuple):
|
|
456
|
+
raise hom[0]
|
|
457
|
+
return hom
|
|
458
|
+
ambient = self.ambient_space()
|
|
459
|
+
return self.hom(self.coordinate_ring().gens(), ambient)
|
|
460
|
+
|
|
461
|
+
def embedding_center(self):
|
|
462
|
+
r"""
|
|
463
|
+
Return the distinguished point, if there is any.
|
|
464
|
+
|
|
465
|
+
If the scheme `Y` was constructed as a neighbourhood of a
|
|
466
|
+
point `p \in X`, then :meth:`embedding_morphism` returns a
|
|
467
|
+
local isomorphism `f:Y\to X` around the preimage point
|
|
468
|
+
`f^{-1}(p)`. The latter is returned by
|
|
469
|
+
:meth:`embedding_center`.
|
|
470
|
+
|
|
471
|
+
OUTPUT:
|
|
472
|
+
|
|
473
|
+
A point of ``self``. This raises :exc:`AttributeError` if there
|
|
474
|
+
is no distinguished point, depending on how ``self`` was constructed.
|
|
475
|
+
|
|
476
|
+
EXAMPLES::
|
|
477
|
+
|
|
478
|
+
sage: P3.<w,x,y,z> = ProjectiveSpace(QQ, 3)
|
|
479
|
+
sage: X = P3.subscheme( (w^2-x^2)*(y^2-z^2) )
|
|
480
|
+
sage: p = [1,-1,3,4]
|
|
481
|
+
sage: nbhd = X.neighborhood(p); nbhd
|
|
482
|
+
Closed subscheme of Affine Space of dimension 3 over Rational Field defined by:
|
|
483
|
+
w^2*y^2 - x^2*y^2 + 6*w^2*y - 6*x^2*y + 2*w*y^2 +
|
|
484
|
+
2*x*y^2 - 7*w^2 + 7*x^2 + 12*w*y + 12*x*y - 14*w - 14*x
|
|
485
|
+
sage: nbhd.embedding_center()
|
|
486
|
+
(0, 0, 0)
|
|
487
|
+
sage: nbhd.embedding_morphism()(nbhd.embedding_center())
|
|
488
|
+
(1/4 : -1/4 : 3/4 : 1)
|
|
489
|
+
sage: nbhd.embedding_morphism()
|
|
490
|
+
Scheme morphism:
|
|
491
|
+
From: Closed subscheme of Affine Space of dimension 3 over Rational Field
|
|
492
|
+
defined by: w^2*y^2 - x^2*y^2 + 6*w^2*y - 6*x^2*y + 2*w*y^2 + 2*x*y^2
|
|
493
|
+
- 7*w^2 + 7*x^2 + 12*w*y + 12*x*y - 14*w - 14*x
|
|
494
|
+
To: Closed subscheme of Projective Space of dimension 3 over Rational Field
|
|
495
|
+
defined by: w^2*y^2 - x^2*y^2 - w^2*z^2 + x^2*z^2
|
|
496
|
+
Defn: Defined on coordinates by sending (w, x, y) to
|
|
497
|
+
(w + 1 : x - 1 : y + 3 : 4)
|
|
498
|
+
"""
|
|
499
|
+
if '_embedding_center' in self.__dict__:
|
|
500
|
+
return self._embedding_center
|
|
501
|
+
raise AttributeError('This algebraic scheme does not have a designated point.')
|
|
502
|
+
|
|
503
|
+
def ngens(self):
|
|
504
|
+
"""
|
|
505
|
+
Return the number of generators of the ambient space of this
|
|
506
|
+
algebraic scheme.
|
|
507
|
+
|
|
508
|
+
EXAMPLES::
|
|
509
|
+
|
|
510
|
+
sage: A.<x, y> = AffineSpace(2, GF(5))
|
|
511
|
+
sage: S = A.subscheme([])
|
|
512
|
+
sage: S.ngens()
|
|
513
|
+
2
|
|
514
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
515
|
+
sage: S = P.subscheme([x - y, x - z])
|
|
516
|
+
sage: P.ngens()
|
|
517
|
+
3
|
|
518
|
+
"""
|
|
519
|
+
return self.__A.ngens()
|
|
520
|
+
|
|
521
|
+
def _repr_(self):
|
|
522
|
+
"""
|
|
523
|
+
Return a string representation of this algebraic scheme.
|
|
524
|
+
|
|
525
|
+
TESTS::
|
|
526
|
+
|
|
527
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme
|
|
528
|
+
sage: P = ProjectiveSpace(3, ZZ)
|
|
529
|
+
sage: S = AlgebraicScheme(P); S
|
|
530
|
+
Subscheme of Projective Space of dimension 3 over Integer Ring
|
|
531
|
+
sage: S._repr_()
|
|
532
|
+
'Subscheme of Projective Space of dimension 3 over Integer Ring'
|
|
533
|
+
"""
|
|
534
|
+
return "Subscheme of %s" % self.__A
|
|
535
|
+
|
|
536
|
+
def _homset(self, *args, **kwds):
|
|
537
|
+
"""
|
|
538
|
+
Construct the Hom-set.
|
|
539
|
+
|
|
540
|
+
INPUT:
|
|
541
|
+
|
|
542
|
+
Same as :class:`sage.schemes.generic.homset.SchemeHomset_generic`.
|
|
543
|
+
|
|
544
|
+
OUTPUT: the Hom-set of the ambient space
|
|
545
|
+
|
|
546
|
+
EXAMPLES::
|
|
547
|
+
|
|
548
|
+
sage: # needs sage.geometry.polyhedron sage.graphs
|
|
549
|
+
sage: P1.<x,y> = toric_varieties.P1()
|
|
550
|
+
sage: type(P1.Hom(P1))
|
|
551
|
+
<class 'sage.schemes.toric.homset.SchemeHomset_toric_variety_with_category'>
|
|
552
|
+
sage: X = P1.subscheme(x - y)
|
|
553
|
+
sage: type(X.Hom(X))
|
|
554
|
+
<class 'sage.schemes.toric.homset.SchemeHomset_toric_variety_with_category'>
|
|
555
|
+
|
|
556
|
+
::
|
|
557
|
+
|
|
558
|
+
sage: # needs palp sage.geometry.polyhedron sage.graphs
|
|
559
|
+
sage: P1xP1 = toric_varieties.P1xP1()
|
|
560
|
+
sage: P1 = toric_varieties.P1()
|
|
561
|
+
sage: P1xP1._homset(P1xP1, P1)
|
|
562
|
+
Set of morphisms
|
|
563
|
+
From: 2-d CPR-Fano toric variety covered by 4 affine patches
|
|
564
|
+
To: 1-d CPR-Fano toric variety covered by 2 affine patches
|
|
565
|
+
"""
|
|
566
|
+
return self.__A._homset(*args, **kwds)
|
|
567
|
+
|
|
568
|
+
def _point_homset(self, *args, **kwds):
|
|
569
|
+
"""
|
|
570
|
+
Construct a point Hom-set. For internal use only.
|
|
571
|
+
|
|
572
|
+
TESTS::
|
|
573
|
+
|
|
574
|
+
sage: P2.<x,y,z> = ProjectiveSpace(2, ZZ)
|
|
575
|
+
sage: P2._point_homset(Spec(ZZ), P2)
|
|
576
|
+
Set of rational points of Projective Space of dimension 2 over Integer Ring
|
|
577
|
+
"""
|
|
578
|
+
return self.__A._point_homset(*args, **kwds)
|
|
579
|
+
|
|
580
|
+
def _point(self, *args, **kwds):
|
|
581
|
+
r"""
|
|
582
|
+
Construct a point of ``self``. For internal use only.
|
|
583
|
+
|
|
584
|
+
TESTS::
|
|
585
|
+
|
|
586
|
+
sage: P2.<x,y,z> = ProjectiveSpace(2, QQ)
|
|
587
|
+
sage: point_homset = P2._point_homset(Spec(QQ), P2)
|
|
588
|
+
sage: P2._point(point_homset, [1,2,1])
|
|
589
|
+
(1 : 2 : 1)
|
|
590
|
+
"""
|
|
591
|
+
return self.__A._point(*args, **kwds)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
class AlgebraicScheme_quasi(AlgebraicScheme):
|
|
595
|
+
"""
|
|
596
|
+
The quasi-affine or quasi-projective scheme `X - Y`, where `X` and `Y`
|
|
597
|
+
are both closed subschemes of a common ambient affine or projective
|
|
598
|
+
space.
|
|
599
|
+
|
|
600
|
+
.. WARNING::
|
|
601
|
+
|
|
602
|
+
You should not create objects of this class directly. The
|
|
603
|
+
preferred method to construct such subschemes is to use
|
|
604
|
+
:meth:`complement` method of algebraic schemes.
|
|
605
|
+
|
|
606
|
+
OUTPUT: an instance of :class:`AlgebraicScheme_quasi`
|
|
607
|
+
|
|
608
|
+
EXAMPLES::
|
|
609
|
+
|
|
610
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
611
|
+
sage: S = P.subscheme([])
|
|
612
|
+
sage: T = P.subscheme([x - y])
|
|
613
|
+
sage: T.complement(S)
|
|
614
|
+
Quasi-projective subscheme X - Y
|
|
615
|
+
of Projective Space of dimension 2 over Integer Ring,
|
|
616
|
+
where X is defined by:
|
|
617
|
+
(no polynomials)
|
|
618
|
+
and Y is defined by:
|
|
619
|
+
x - y
|
|
620
|
+
"""
|
|
621
|
+
|
|
622
|
+
def __init__(self, X, Y):
|
|
623
|
+
"""
|
|
624
|
+
The constructor.
|
|
625
|
+
|
|
626
|
+
INPUT:
|
|
627
|
+
|
|
628
|
+
- ``X``, ``Y`` -- two subschemes of the same ambient space
|
|
629
|
+
|
|
630
|
+
TESTS::
|
|
631
|
+
|
|
632
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
633
|
+
sage: S = P.subscheme([])
|
|
634
|
+
sage: T = P.subscheme([x - y])
|
|
635
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_quasi
|
|
636
|
+
sage: AlgebraicScheme_quasi(S, T)
|
|
637
|
+
Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring,
|
|
638
|
+
where X is defined by:
|
|
639
|
+
(no polynomials)
|
|
640
|
+
and Y is defined by:
|
|
641
|
+
x - y
|
|
642
|
+
"""
|
|
643
|
+
self.__X = X
|
|
644
|
+
self.__Y = Y
|
|
645
|
+
if not isinstance(X, AlgebraicScheme_subscheme):
|
|
646
|
+
raise TypeError("X must be a closed subscheme of an ambient space.")
|
|
647
|
+
if not isinstance(Y, AlgebraicScheme_subscheme):
|
|
648
|
+
raise TypeError("Y must be a closed subscheme of an ambient space.")
|
|
649
|
+
if X.ambient_space() != Y.ambient_space():
|
|
650
|
+
raise ValueError("X and Y must be embedded in the same ambient space.")
|
|
651
|
+
# _latex_ and _repr_ assume all of the above conditions and should be
|
|
652
|
+
# probably changed if they are relaxed!
|
|
653
|
+
A = X.ambient_space()
|
|
654
|
+
self._base_ring = A.base_ring()
|
|
655
|
+
AlgebraicScheme.__init__(self, A)
|
|
656
|
+
|
|
657
|
+
def _latex_(self):
|
|
658
|
+
"""
|
|
659
|
+
Return a LaTeX representation of this algebraic scheme.
|
|
660
|
+
|
|
661
|
+
EXAMPLES::
|
|
662
|
+
|
|
663
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_quasi
|
|
664
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
665
|
+
sage: S = P.subscheme([])
|
|
666
|
+
sage: T = P.subscheme([x - y])
|
|
667
|
+
sage: U = AlgebraicScheme_quasi(S, T); U
|
|
668
|
+
Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring,
|
|
669
|
+
where X is defined by:
|
|
670
|
+
(no polynomials)
|
|
671
|
+
and Y is defined by:
|
|
672
|
+
x - y
|
|
673
|
+
sage: U._latex_()
|
|
674
|
+
'\\text{Quasi-projective subscheme }
|
|
675
|
+
(X\\setminus Y)\\subset {\\mathbf P}_{\\Bold{Z}}^{2},\\text{ where }
|
|
676
|
+
X \\text{ is defined by }\\text{no polynomials},\\text{ and }
|
|
677
|
+
Y \\text{ is defined by } x - y.'
|
|
678
|
+
"""
|
|
679
|
+
if isinstance(self.ambient_space(), sage.schemes.affine.affine_space.AffineSpace_generic):
|
|
680
|
+
t = "affine"
|
|
681
|
+
else:
|
|
682
|
+
t = "projective"
|
|
683
|
+
X = ', '.join(latex(f) for f in self.__X.defining_polynomials())
|
|
684
|
+
if not X:
|
|
685
|
+
X = r"\text{no polynomials}"
|
|
686
|
+
Y = ', '.join(latex(f) for f in self.__Y.defining_polynomials())
|
|
687
|
+
if not Y:
|
|
688
|
+
Y = r"\text{no polynomials}"
|
|
689
|
+
return (r"\text{Quasi-%s subscheme } (X\setminus Y)\subset %s,"
|
|
690
|
+
r"\text{ where } X \text{ is defined by }%s,"
|
|
691
|
+
r"\text{ and } Y \text{ is defined by } %s."
|
|
692
|
+
% (t, latex(self.ambient_space()), X, Y))
|
|
693
|
+
|
|
694
|
+
def _repr_(self):
|
|
695
|
+
r"""
|
|
696
|
+
Return a string representation of this algebraic scheme.
|
|
697
|
+
|
|
698
|
+
EXAMPLES::
|
|
699
|
+
|
|
700
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_quasi
|
|
701
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
702
|
+
sage: S = P.subscheme([])
|
|
703
|
+
sage: T = P.subscheme([x - y])
|
|
704
|
+
sage: U = AlgebraicScheme_quasi(S, T); U
|
|
705
|
+
Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring,
|
|
706
|
+
where X is defined by:
|
|
707
|
+
(no polynomials)
|
|
708
|
+
and Y is defined by:
|
|
709
|
+
x - y
|
|
710
|
+
sage: U._repr_()
|
|
711
|
+
'Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring, where X is defined by:\n (no polynomials)\nand Y is defined by:\n x - y'
|
|
712
|
+
"""
|
|
713
|
+
if isinstance(self.ambient_space(), sage.schemes.affine.affine_space.AffineSpace_generic):
|
|
714
|
+
t = "affine"
|
|
715
|
+
else:
|
|
716
|
+
t = "projective"
|
|
717
|
+
return ("Quasi-%s subscheme X - Y of %s, where X is defined by:\n%s\n"
|
|
718
|
+
"and Y is defined by:\n%s"
|
|
719
|
+
% (t, self.ambient_space(), str(self.__X).split("\n", 1)[1],
|
|
720
|
+
str(self.__Y).split("\n", 1)[1]))
|
|
721
|
+
|
|
722
|
+
def X(self):
|
|
723
|
+
"""
|
|
724
|
+
Return the scheme `X` such that ``self`` is represented as `X - Y`.
|
|
725
|
+
|
|
726
|
+
EXAMPLES::
|
|
727
|
+
|
|
728
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
729
|
+
sage: S = P.subscheme([])
|
|
730
|
+
sage: T = P.subscheme([x - y])
|
|
731
|
+
sage: U = T.complement(S)
|
|
732
|
+
sage: U.X() is S
|
|
733
|
+
True
|
|
734
|
+
"""
|
|
735
|
+
return self.__X
|
|
736
|
+
|
|
737
|
+
def Y(self):
|
|
738
|
+
"""
|
|
739
|
+
Return the scheme `Y` such that ``self`` is represented as `X - Y`.
|
|
740
|
+
|
|
741
|
+
EXAMPLES::
|
|
742
|
+
|
|
743
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
744
|
+
sage: S = P.subscheme([])
|
|
745
|
+
sage: T = P.subscheme([x - y])
|
|
746
|
+
sage: U = T.complement(S)
|
|
747
|
+
sage: U.Y() is T
|
|
748
|
+
True
|
|
749
|
+
"""
|
|
750
|
+
return self.__Y
|
|
751
|
+
|
|
752
|
+
def _check_satisfies_equations(self, v):
|
|
753
|
+
"""
|
|
754
|
+
Verify that the coordinates of v define a point on this scheme, or
|
|
755
|
+
raise a :exc:`TypeError`.
|
|
756
|
+
|
|
757
|
+
EXAMPLES::
|
|
758
|
+
|
|
759
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
760
|
+
sage: S = P.subscheme([])
|
|
761
|
+
sage: T = P.subscheme([x - y])
|
|
762
|
+
sage: U = T.complement(S)
|
|
763
|
+
sage: U._check_satisfies_equations([1, 2, 0])
|
|
764
|
+
True
|
|
765
|
+
sage: U._check_satisfies_equations([1, 1, 0])
|
|
766
|
+
Traceback (most recent call last):
|
|
767
|
+
...
|
|
768
|
+
TypeError: Coordinates [1, 1, 0] do not define a point on
|
|
769
|
+
Quasi-projective subscheme X - Y of Projective Space of dimension 2 over Integer Ring,
|
|
770
|
+
where X is defined by:
|
|
771
|
+
(no polynomials)
|
|
772
|
+
and Y is defined by:
|
|
773
|
+
x - y
|
|
774
|
+
|
|
775
|
+
sage: U._check_satisfies_equations([1, 4])
|
|
776
|
+
Traceback (most recent call last):
|
|
777
|
+
...
|
|
778
|
+
TypeError: number of arguments does not match number of variables in parent
|
|
779
|
+
|
|
780
|
+
sage: A.<x, y> = AffineSpace(2, GF(7))
|
|
781
|
+
sage: S = A.subscheme([x^2 - y])
|
|
782
|
+
sage: T = A.subscheme([x - y])
|
|
783
|
+
sage: U = T.complement(S)
|
|
784
|
+
sage: U._check_satisfies_equations([2, 4])
|
|
785
|
+
True
|
|
786
|
+
sage: U.point([2,4])
|
|
787
|
+
(2, 4)
|
|
788
|
+
sage: U._check_satisfies_equations(_)
|
|
789
|
+
True
|
|
790
|
+
sage: U._check_satisfies_equations([1, 1])
|
|
791
|
+
Traceback (most recent call last):
|
|
792
|
+
...
|
|
793
|
+
TypeError: Coordinates [1, 1] do not define a point on Quasi-affine
|
|
794
|
+
subscheme X - Y of Affine Space of dimension 2 over Finite
|
|
795
|
+
Field of size 7, where X is defined by:
|
|
796
|
+
x^2 - y
|
|
797
|
+
and Y is defined by:
|
|
798
|
+
x - y
|
|
799
|
+
sage: U._check_satisfies_equations([1, 0])
|
|
800
|
+
Traceback (most recent call last):
|
|
801
|
+
...
|
|
802
|
+
TypeError: Coordinates [1, 0] do not define a point on Quasi-affine
|
|
803
|
+
subscheme X - Y of Affine Space of dimension 2 over Finite
|
|
804
|
+
Field of size 7, where X is defined by:
|
|
805
|
+
x^2 - y
|
|
806
|
+
and Y is defined by:
|
|
807
|
+
x - y
|
|
808
|
+
|
|
809
|
+
TESTS:
|
|
810
|
+
|
|
811
|
+
The bug reported at :issue:`12211` has been fixed::
|
|
812
|
+
|
|
813
|
+
sage: P.<x, y, z, w> = ProjectiveSpace(3, QQ)
|
|
814
|
+
sage: S = P.subscheme([x])
|
|
815
|
+
sage: T = P.subscheme([y, z])
|
|
816
|
+
sage: U = T.complement(S)
|
|
817
|
+
sage: U._check_satisfies_equations([0, 0, 1, 1])
|
|
818
|
+
True
|
|
819
|
+
"""
|
|
820
|
+
coords = list(v)
|
|
821
|
+
for f in self.__X.defining_polynomials():
|
|
822
|
+
if f(coords) != 0:
|
|
823
|
+
raise TypeError("Coordinates %s do not define a point on %s" % (v,self))
|
|
824
|
+
for f in self.__Y.defining_polynomials():
|
|
825
|
+
if f(coords) != 0:
|
|
826
|
+
return True
|
|
827
|
+
raise TypeError("Coordinates %s do not define a point on %s" % (v,self))
|
|
828
|
+
|
|
829
|
+
def rational_points(self, **kwds):
|
|
830
|
+
"""
|
|
831
|
+
Return the set of rational points on this algebraic scheme
|
|
832
|
+
over the field `F`.
|
|
833
|
+
|
|
834
|
+
INPUT: keyword arguments:
|
|
835
|
+
|
|
836
|
+
- ``bound`` -- integer (default: 0); the bound for the coordinates for
|
|
837
|
+
subschemes with dimension at least 1
|
|
838
|
+
|
|
839
|
+
- ``F`` -- field (default: base ring); the field to compute
|
|
840
|
+
the rational points over
|
|
841
|
+
|
|
842
|
+
EXAMPLES::
|
|
843
|
+
|
|
844
|
+
sage: A.<x, y> = AffineSpace(2, GF(7))
|
|
845
|
+
sage: S = A.subscheme([x^2 - y])
|
|
846
|
+
sage: T = A.subscheme([x - y])
|
|
847
|
+
sage: U = T.complement(S)
|
|
848
|
+
sage: U.rational_points()
|
|
849
|
+
[(2, 4), (3, 2), (4, 2), (5, 4), (6, 1)]
|
|
850
|
+
sage: U.rational_points(F=GF(7^2, 'b')) # needs sage.rings.finite_rings
|
|
851
|
+
[(2, 4), (3, 2), (4, 2), (5, 4), (6, 1), (b, b + 4), (b + 1, 3*b + 5),
|
|
852
|
+
(b + 2, 5*b + 1), (b + 3, 6), (b + 4, 2*b + 6), (b + 5, 4*b + 1),
|
|
853
|
+
(b + 6, 6*b + 5), (2*b, 4*b + 2), (2*b + 1, b + 3), (2*b + 2, 5*b + 6),
|
|
854
|
+
(2*b + 3, 2*b + 4), (2*b + 4, 6*b + 4), (2*b + 5, 3*b + 6), (2*b + 6, 3),
|
|
855
|
+
(3*b, 2*b + 1), (3*b + 1, b + 2), (3*b + 2, 5), (3*b + 3, 6*b + 3),
|
|
856
|
+
(3*b + 4, 5*b + 3), (3*b + 5, 4*b + 5), (3*b + 6, 3*b + 2),
|
|
857
|
+
(4*b, 2*b + 1), (4*b + 1, 3*b + 2), (4*b + 2, 4*b + 5),
|
|
858
|
+
(4*b + 3, 5*b + 3), (4*b + 4, 6*b + 3), (4*b + 5, 5), (4*b + 6, b + 2),
|
|
859
|
+
(5*b, 4*b + 2), (5*b + 1, 3), (5*b + 2, 3*b + 6), (5*b + 3, 6*b + 4),
|
|
860
|
+
(5*b + 4, 2*b + 4), (5*b + 5, 5*b + 6), (5*b + 6, b + 3), (6*b, b + 4),
|
|
861
|
+
(6*b + 1, 6*b + 5), (6*b + 2, 4*b + 1), (6*b + 3, 2*b + 6), (6*b + 4, 6),
|
|
862
|
+
(6*b + 5, 5*b + 1), (6*b + 6, 3*b + 5)]
|
|
863
|
+
"""
|
|
864
|
+
F = kwds.get('F', None)
|
|
865
|
+
bound = kwds.get('bound', 0)
|
|
866
|
+
if F is None:
|
|
867
|
+
F = self.base_ring()
|
|
868
|
+
|
|
869
|
+
if bound == 0:
|
|
870
|
+
if isinstance(F, RationalField):
|
|
871
|
+
raise TypeError("A positive bound (= %s) must be specified." % bound)
|
|
872
|
+
if not isinstance(F, FiniteField):
|
|
873
|
+
raise TypeError("Argument F (= %s) must be a finite field." % F)
|
|
874
|
+
pts = []
|
|
875
|
+
for P in self.ambient_space().rational_points(F):
|
|
876
|
+
try:
|
|
877
|
+
if self._check_satisfies_equations(list(P)):
|
|
878
|
+
pts.append(P)
|
|
879
|
+
except TypeError:
|
|
880
|
+
pass
|
|
881
|
+
pts.sort()
|
|
882
|
+
return pts
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
@richcmp_method
|
|
886
|
+
class AlgebraicScheme_subscheme(AlgebraicScheme):
|
|
887
|
+
"""
|
|
888
|
+
An algebraic scheme presented as a closed subscheme is defined by
|
|
889
|
+
explicit polynomial equations. This is as opposed to a general
|
|
890
|
+
scheme, which could, e.g., be the Neron model of some object, and
|
|
891
|
+
for which we do not want to give explicit equations.
|
|
892
|
+
|
|
893
|
+
INPUT:
|
|
894
|
+
|
|
895
|
+
- ``A`` -- ambient space (e.g. affine or projective `n`-space)
|
|
896
|
+
|
|
897
|
+
- ``polynomials`` -- single polynomial, ideal or iterable of defining
|
|
898
|
+
polynomials; in any case polynomials must belong to the coordinate
|
|
899
|
+
ring of the ambient space and define valid polynomial functions (e.g.
|
|
900
|
+
they should be homogeneous in the case of a projective space)
|
|
901
|
+
|
|
902
|
+
OUTPUT: algebraic scheme
|
|
903
|
+
|
|
904
|
+
EXAMPLES::
|
|
905
|
+
|
|
906
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme
|
|
907
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
908
|
+
sage: P.subscheme([x^2 - y*z])
|
|
909
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
910
|
+
x^2 - y*z
|
|
911
|
+
sage: AlgebraicScheme_subscheme(P, [x^2 - y*z])
|
|
912
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
913
|
+
x^2 - y*z
|
|
914
|
+
"""
|
|
915
|
+
|
|
916
|
+
def __init__(self, A, polynomials, category=None):
|
|
917
|
+
"""
|
|
918
|
+
See ``AlgebraicScheme_subscheme`` for documentation.
|
|
919
|
+
|
|
920
|
+
TESTS::
|
|
921
|
+
|
|
922
|
+
sage: from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme
|
|
923
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
924
|
+
sage: P.subscheme([x^2 - y*z])
|
|
925
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
926
|
+
x^2 - y*z
|
|
927
|
+
sage: AlgebraicScheme_subscheme(P, [x^2 - y*z])
|
|
928
|
+
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
|
|
929
|
+
x^2 - y*z
|
|
930
|
+
"""
|
|
931
|
+
from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence_generic
|
|
932
|
+
|
|
933
|
+
AlgebraicScheme.__init__(self, A, category=category)
|
|
934
|
+
self._base_ring = A.base_ring()
|
|
935
|
+
R = A.coordinate_ring()
|
|
936
|
+
if isinstance(polynomials, Ideal_generic):
|
|
937
|
+
I = polynomials
|
|
938
|
+
polynomials = I.gens()
|
|
939
|
+
if I.ring() is R: # Otherwise we will recompute I later after
|
|
940
|
+
self.__I = I # converting generators to the correct ring
|
|
941
|
+
if isinstance(polynomials, (collections.abc.Sequence, PolynomialSequence_generic)):
|
|
942
|
+
polynomials = list(polynomials)
|
|
943
|
+
else:
|
|
944
|
+
try:
|
|
945
|
+
it = iter(polynomials)
|
|
946
|
+
except Exception:
|
|
947
|
+
# Looks like we got a single polynomial
|
|
948
|
+
polynomials = [polynomials]
|
|
949
|
+
else:
|
|
950
|
+
if it is polynomials:
|
|
951
|
+
# case of an iterator
|
|
952
|
+
polynomials = list(polynomials)
|
|
953
|
+
else:
|
|
954
|
+
# Looks like we got a single polynomial
|
|
955
|
+
polynomials = [polynomials]
|
|
956
|
+
for n, f in enumerate(polynomials):
|
|
957
|
+
try:
|
|
958
|
+
polynomials[n] = R(f)
|
|
959
|
+
except TypeError:
|
|
960
|
+
raise TypeError("%s cannot be converted to a polynomial in "
|
|
961
|
+
"the coordinate ring of this %s!" % (f, A))
|
|
962
|
+
polynomials = tuple(polynomials)
|
|
963
|
+
self.__polys = A._validate(polynomials)
|
|
964
|
+
|
|
965
|
+
def _check_satisfies_equations(self, v):
|
|
966
|
+
"""
|
|
967
|
+
Verify that the coordinates of v define a point on this scheme, or
|
|
968
|
+
raise a :exc:`TypeError`.
|
|
969
|
+
|
|
970
|
+
EXAMPLES::
|
|
971
|
+
|
|
972
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
973
|
+
sage: S = P.subscheme([x^2 - y*z])
|
|
974
|
+
sage: S._check_satisfies_equations([1, 1, 1])
|
|
975
|
+
True
|
|
976
|
+
sage: S._check_satisfies_equations([1, 0, 1])
|
|
977
|
+
Traceback (most recent call last):
|
|
978
|
+
...
|
|
979
|
+
TypeError: Coordinates [1, 0, 1] do not define a point on Closed subscheme
|
|
980
|
+
of Projective Space of dimension 2 over Rational Field defined by:
|
|
981
|
+
x^2 - y*z
|
|
982
|
+
sage: S._check_satisfies_equations([0, 0, 0])
|
|
983
|
+
Traceback (most recent call last):
|
|
984
|
+
...
|
|
985
|
+
TypeError: Coordinates [0, 0, 0] do not define a point on Closed subscheme
|
|
986
|
+
of Projective Space of dimension 2 over Rational Field defined by:
|
|
987
|
+
x^2 - y*z
|
|
988
|
+
"""
|
|
989
|
+
coords = list(v)
|
|
990
|
+
for f in self.defining_polynomials():
|
|
991
|
+
if f(coords) != 0:
|
|
992
|
+
# it must be "!=0" instead of "if f(v)", e.g.,
|
|
993
|
+
# because of p-adic base rings.
|
|
994
|
+
raise TypeError("Coordinates %s do not define a point on %s" % (coords, self))
|
|
995
|
+
try:
|
|
996
|
+
return self.ambient_space()._check_satisfies_equations(coords)
|
|
997
|
+
except TypeError:
|
|
998
|
+
raise TypeError("Coordinates %s do not define a point on %s" % (coords, self))
|
|
999
|
+
|
|
1000
|
+
def base_extend(self, R):
|
|
1001
|
+
"""
|
|
1002
|
+
Return the base change to the ring `R` of this scheme.
|
|
1003
|
+
|
|
1004
|
+
EXAMPLES::
|
|
1005
|
+
|
|
1006
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, GF(11))
|
|
1007
|
+
sage: S = P.subscheme([x^2 - y*z])
|
|
1008
|
+
sage: S.base_extend(GF(11^2, 'b')) # needs sage.rings.finite_rings
|
|
1009
|
+
Closed subscheme of Projective Space of dimension 2
|
|
1010
|
+
over Finite Field in b of size 11^2
|
|
1011
|
+
defined by: x^2 - y*z
|
|
1012
|
+
sage: S.base_extend(ZZ)
|
|
1013
|
+
Traceback (most recent call last):
|
|
1014
|
+
...
|
|
1015
|
+
ValueError: no natural map from the base ring (=Finite Field of size 11)
|
|
1016
|
+
to R (=Integer Ring)!
|
|
1017
|
+
"""
|
|
1018
|
+
A = self.ambient_space().base_extend(R)
|
|
1019
|
+
return A.subscheme(self.__polys)
|
|
1020
|
+
|
|
1021
|
+
def __richcmp__(self, other, op):
|
|
1022
|
+
"""
|
|
1023
|
+
EXAMPLES::
|
|
1024
|
+
|
|
1025
|
+
sage: A.<x, y, z> = AffineSpace(3, QQ)
|
|
1026
|
+
sage: X = A.subscheme([x*y, z])
|
|
1027
|
+
sage: X == A.subscheme([z, x*y])
|
|
1028
|
+
True
|
|
1029
|
+
sage: X == A.subscheme([x*y, z^2]) # needs sage.libs.singular
|
|
1030
|
+
False
|
|
1031
|
+
sage: B.<u, v, t> = AffineSpace(3, QQ)
|
|
1032
|
+
sage: X == B.subscheme([u*v, t])
|
|
1033
|
+
False
|
|
1034
|
+
"""
|
|
1035
|
+
if not isinstance(other, AlgebraicScheme_subscheme):
|
|
1036
|
+
return NotImplemented
|
|
1037
|
+
A = self.ambient_space()
|
|
1038
|
+
if other.ambient_space() != A:
|
|
1039
|
+
return NotImplemented
|
|
1040
|
+
return richcmp(self.defining_ideal(), other.defining_ideal(), op)
|
|
1041
|
+
|
|
1042
|
+
def _latex_(self):
|
|
1043
|
+
"""
|
|
1044
|
+
Return a LaTeX representation of this scheme.
|
|
1045
|
+
|
|
1046
|
+
EXAMPLES::
|
|
1047
|
+
|
|
1048
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, GF(11))
|
|
1049
|
+
sage: S = P.subscheme([x^2 - y*z]); S
|
|
1050
|
+
Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:
|
|
1051
|
+
x^2 - y*z
|
|
1052
|
+
sage: S._latex_()
|
|
1053
|
+
'\\text{Closed subscheme of } {\\mathbf P}_{\\Bold{F}_{11}}^{2} \\text{ defined by } x^{2} - y z'
|
|
1054
|
+
sage: S = P.subscheme([x^2 - y*z, x^5]); S
|
|
1055
|
+
Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:
|
|
1056
|
+
x^2 - y*z,
|
|
1057
|
+
x^5
|
|
1058
|
+
sage: S._latex_()
|
|
1059
|
+
'\\text{Closed subscheme of } {\\mathbf P}_{\\Bold{F}_{11}}^{2} \\text{ defined by } x^{2} - y z, x^{5}'
|
|
1060
|
+
"""
|
|
1061
|
+
polynomials = ', '.join(latex(f) for f in self.defining_polynomials())
|
|
1062
|
+
if not polynomials:
|
|
1063
|
+
polynomials = r"\text{no polynomials}"
|
|
1064
|
+
return (r"\text{Closed subscheme of } %s \text{ defined by } %s"
|
|
1065
|
+
% (latex(self.ambient_space()), polynomials))
|
|
1066
|
+
|
|
1067
|
+
def _repr_(self):
|
|
1068
|
+
r"""
|
|
1069
|
+
Return a string representation of this scheme.
|
|
1070
|
+
|
|
1071
|
+
EXAMPLES::
|
|
1072
|
+
|
|
1073
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, GF(11))
|
|
1074
|
+
sage: S = P.subscheme([x^2 - y*z]); S
|
|
1075
|
+
Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:
|
|
1076
|
+
x^2 - y*z
|
|
1077
|
+
sage: S._repr_()
|
|
1078
|
+
'Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:\n x^2 - y*z'
|
|
1079
|
+
sage: S = P.subscheme([x^2 - y*z, x^5]); S
|
|
1080
|
+
Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:
|
|
1081
|
+
x^2 - y*z,
|
|
1082
|
+
x^5
|
|
1083
|
+
sage: S._repr_()
|
|
1084
|
+
'Closed subscheme of Projective Space of dimension 2 over Finite Field of size 11 defined by:\n x^2 - y*z,\n x^5'
|
|
1085
|
+
"""
|
|
1086
|
+
polynomials = ',\n '.join(str(f) for f in self.defining_polynomials())
|
|
1087
|
+
if not polynomials:
|
|
1088
|
+
polynomials = '(no polynomials)'
|
|
1089
|
+
return ("Closed subscheme of %s defined by:\n %s"
|
|
1090
|
+
% (self.ambient_space(), polynomials))
|
|
1091
|
+
|
|
1092
|
+
def defining_polynomials(self):
|
|
1093
|
+
"""
|
|
1094
|
+
Return the polynomials that define this scheme as a subscheme
|
|
1095
|
+
of its ambient space.
|
|
1096
|
+
|
|
1097
|
+
OUTPUT:
|
|
1098
|
+
|
|
1099
|
+
A tuple of polynomials in the coordinate ring of the ambient
|
|
1100
|
+
space.
|
|
1101
|
+
|
|
1102
|
+
EXAMPLES::
|
|
1103
|
+
|
|
1104
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
1105
|
+
sage: S = P.subscheme([x^2 - y*z, x^3 + z^3])
|
|
1106
|
+
sage: S.defining_polynomials()
|
|
1107
|
+
(x^2 - y*z, x^3 + z^3)
|
|
1108
|
+
"""
|
|
1109
|
+
return self.__polys
|
|
1110
|
+
|
|
1111
|
+
def normalize_defining_polynomials(self):
|
|
1112
|
+
r"""
|
|
1113
|
+
Function to normalize the coefficients of defining polynomials
|
|
1114
|
+
of given subscheme.
|
|
1115
|
+
|
|
1116
|
+
Normalization as in removing denominator from all the coefficients,
|
|
1117
|
+
and then removing any common factor between the coefficients.
|
|
1118
|
+
It takes LCM of denominators and then removes common factor among
|
|
1119
|
+
coefficients, if any.
|
|
1120
|
+
|
|
1121
|
+
EXAMPLES::
|
|
1122
|
+
|
|
1123
|
+
sage: A.<x,y> = AffineSpace(2, QQ)
|
|
1124
|
+
sage: S = A.subscheme([2*x^2 + 4*x*y, 1/8*x + 1/3*y])
|
|
1125
|
+
sage: S.normalize_defining_polynomials()
|
|
1126
|
+
sage: S.defining_polynomials()
|
|
1127
|
+
(x^2 + 2*x*y, 3*x + 8*y)
|
|
1128
|
+
"""
|
|
1129
|
+
BR = self.base_ring()
|
|
1130
|
+
if (BR == ZZ
|
|
1131
|
+
or isinstance(BR, (sage.rings.abc.AlgebraicField, sage.rings.abc.Order))
|
|
1132
|
+
or BR in NumberFields()):
|
|
1133
|
+
normalized_polys = []
|
|
1134
|
+
initial_polys = list(self.__polys)
|
|
1135
|
+
|
|
1136
|
+
for P in initial_polys:
|
|
1137
|
+
# stores value which need to be multiplied to make all coefficient integers
|
|
1138
|
+
mult = lcm([c.denominator() for c in P.coefficients()])
|
|
1139
|
+
P = mult*P
|
|
1140
|
+
# stores the common factor from all coefficients
|
|
1141
|
+
div = gcd(list(P.coefficients()))
|
|
1142
|
+
poly_ring = P.parent() # need to coerce, since division might change base ring
|
|
1143
|
+
P = poly_ring((BR.one()/div)*P)
|
|
1144
|
+
normalized_polys.append(P)
|
|
1145
|
+
|
|
1146
|
+
self.__polys = tuple(normalized_polys)
|
|
1147
|
+
|
|
1148
|
+
else:
|
|
1149
|
+
raise NotImplementedError("currently normalization is implemented "
|
|
1150
|
+
"only for QQbar, number fields and number field orders")
|
|
1151
|
+
|
|
1152
|
+
def defining_ideal(self):
|
|
1153
|
+
"""
|
|
1154
|
+
Return the ideal that defines this scheme as a subscheme
|
|
1155
|
+
of its ambient space.
|
|
1156
|
+
|
|
1157
|
+
OUTPUT: an ideal in the coordinate ring of the ambient space
|
|
1158
|
+
|
|
1159
|
+
EXAMPLES::
|
|
1160
|
+
|
|
1161
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
|
|
1162
|
+
sage: S = P.subscheme([x^2 - y*z, x^3 + z^3])
|
|
1163
|
+
sage: S.defining_ideal()
|
|
1164
|
+
Ideal (x^2 - y*z, x^3 + z^3) of Multivariate Polynomial Ring in x, y, z
|
|
1165
|
+
over Integer Ring
|
|
1166
|
+
"""
|
|
1167
|
+
try:
|
|
1168
|
+
return self.__I
|
|
1169
|
+
except AttributeError:
|
|
1170
|
+
R = self.ambient_space().coordinate_ring()
|
|
1171
|
+
self.__I = R.ideal(self.defining_polynomials())
|
|
1172
|
+
return self.__I
|
|
1173
|
+
|
|
1174
|
+
# Note: dimension must be implemented by the derived classes
|
|
1175
|
+
def codimension(self):
|
|
1176
|
+
r"""
|
|
1177
|
+
Return the codimension of the algebraic subscheme.
|
|
1178
|
+
|
|
1179
|
+
OUTPUT: integer
|
|
1180
|
+
|
|
1181
|
+
EXAMPLES::
|
|
1182
|
+
|
|
1183
|
+
sage: PP.<x,y,z,w,v> = ProjectiveSpace(4, QQ)
|
|
1184
|
+
sage: V = PP.subscheme(x*y)
|
|
1185
|
+
sage: V.codimension() # needs sage.libs.singular
|
|
1186
|
+
1
|
|
1187
|
+
sage: V.dimension() # needs sage.libs.singular
|
|
1188
|
+
3
|
|
1189
|
+
"""
|
|
1190
|
+
return self.ambient_space().dimension() - self.dimension()
|
|
1191
|
+
|
|
1192
|
+
def irreducible_components(self):
|
|
1193
|
+
r"""
|
|
1194
|
+
Return the irreducible components of this algebraic scheme, as
|
|
1195
|
+
subschemes of the same ambient space.
|
|
1196
|
+
|
|
1197
|
+
OUTPUT:
|
|
1198
|
+
|
|
1199
|
+
an immutable sequence of irreducible subschemes of the ambient
|
|
1200
|
+
space of this scheme
|
|
1201
|
+
|
|
1202
|
+
The components are cached.
|
|
1203
|
+
|
|
1204
|
+
EXAMPLES:
|
|
1205
|
+
|
|
1206
|
+
We define what is clearly a union of four hypersurfaces in
|
|
1207
|
+
`\P^4_{\QQ}` then find the irreducible components::
|
|
1208
|
+
|
|
1209
|
+
sage: PP.<x,y,z,w,v> = ProjectiveSpace(4, QQ)
|
|
1210
|
+
sage: V = PP.subscheme((x^2 - y^2 - z^2) * (w^5 - 2*v^2*z^3) * w * (v^3 - x^2*z))
|
|
1211
|
+
sage: V.irreducible_components() # needs sage.libs.singular
|
|
1212
|
+
[Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
|
|
1213
|
+
w,
|
|
1214
|
+
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
|
|
1215
|
+
x^2 - y^2 - z^2,
|
|
1216
|
+
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
|
|
1217
|
+
x^2*z - v^3,
|
|
1218
|
+
Closed subscheme of Projective Space of dimension 4 over Rational Field defined by:
|
|
1219
|
+
w^5 - 2*z^3*v^2]
|
|
1220
|
+
|
|
1221
|
+
We verify that the irrelevant ideal is not accidentally returned
|
|
1222
|
+
(see :issue:`6920`)::
|
|
1223
|
+
|
|
1224
|
+
sage: PP.<x,y,z,w> = ProjectiveSpace(3, QQ)
|
|
1225
|
+
sage: f = x^3 + y^3 + z^3 + w^3
|
|
1226
|
+
sage: R = f.parent()
|
|
1227
|
+
sage: I = [f] + [f.derivative(zz) for zz in PP.gens()]
|
|
1228
|
+
sage: V = PP.subscheme(I)
|
|
1229
|
+
sage: V.irreducible_components() # needs sage.libs.singular
|
|
1230
|
+
[]
|
|
1231
|
+
|
|
1232
|
+
The same polynomial as above defines a scheme with a
|
|
1233
|
+
nontrivial irreducible component in affine space (instead of
|
|
1234
|
+
the empty scheme as above)::
|
|
1235
|
+
|
|
1236
|
+
sage: AA.<x,y,z,w> = AffineSpace(4, QQ)
|
|
1237
|
+
sage: V = AA.subscheme(I)
|
|
1238
|
+
sage: V.irreducible_components() # needs sage.libs.singular
|
|
1239
|
+
[Closed subscheme of Affine Space of dimension 4 over Rational Field defined by:
|
|
1240
|
+
w,
|
|
1241
|
+
z,
|
|
1242
|
+
y,
|
|
1243
|
+
x]
|
|
1244
|
+
"""
|
|
1245
|
+
try:
|
|
1246
|
+
return self.__irreducible_components
|
|
1247
|
+
except AttributeError:
|
|
1248
|
+
pass
|
|
1249
|
+
I = self.defining_ideal()
|
|
1250
|
+
P = I.associated_primes()
|
|
1251
|
+
if self.is_projective():
|
|
1252
|
+
# In the projective case, we must exclude the prime ideals
|
|
1253
|
+
# that contain the irrelevant ideal, which is the ideal
|
|
1254
|
+
# generated by the variables, which are the gens of the
|
|
1255
|
+
# base ring.
|
|
1256
|
+
G = I.ring().gens()
|
|
1257
|
+
# We make a list of ideals with the property that "any"
|
|
1258
|
+
# of the elements of G are not in the ideal.
|
|
1259
|
+
P = [J for J in P if any(g not in J for g in G)]
|
|
1260
|
+
|
|
1261
|
+
A = self.ambient_space()
|
|
1262
|
+
C = Sequence([A.subscheme(X) for X in P], check=False, cr=True)
|
|
1263
|
+
C.sort(key=lambda scheme: scheme.defining_ideal().gens())
|
|
1264
|
+
C.set_immutable()
|
|
1265
|
+
self.__irreducible_components = C
|
|
1266
|
+
return C
|
|
1267
|
+
|
|
1268
|
+
def is_irreducible(self):
|
|
1269
|
+
r"""
|
|
1270
|
+
Return whether this subscheme is or is not irreducible.
|
|
1271
|
+
|
|
1272
|
+
OUTPUT: boolean
|
|
1273
|
+
|
|
1274
|
+
EXAMPLES::
|
|
1275
|
+
|
|
1276
|
+
sage: # needs sage.rings.number_field
|
|
1277
|
+
sage: K = QuadraticField(-3)
|
|
1278
|
+
sage: P.<x,y,z,w,t,u> = ProjectiveSpace(K, 5)
|
|
1279
|
+
sage: X = P.subscheme([x*y - z^2 - K.0*t^2, t*w*x + y*z^2 - u^3])
|
|
1280
|
+
sage: X.is_irreducible() # needs sage.libs.singular
|
|
1281
|
+
True
|
|
1282
|
+
|
|
1283
|
+
::
|
|
1284
|
+
|
|
1285
|
+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
|
|
1286
|
+
sage: X = P.subscheme([(y + x - z)^2])
|
|
1287
|
+
sage: X.is_irreducible() # needs sage.libs.singular
|
|
1288
|
+
False
|
|
1289
|
+
|
|
1290
|
+
::
|
|
1291
|
+
|
|
1292
|
+
sage: A.<x,y,z,w> = AffineSpace(GF(17), 4)
|
|
1293
|
+
sage: X = A.subscheme([
|
|
1294
|
+
....: x*y*z^2 - x*y*z*w - z*w^2 + w^3,
|
|
1295
|
+
....: x^3*y*z*w - x*y^3*z - x^2*y*z*w - x^2*w^3 + y^2*w^2 + x*w^3
|
|
1296
|
+
....: ])
|
|
1297
|
+
sage: X.is_irreducible() # needs sage.libs.singular
|
|
1298
|
+
False
|
|
1299
|
+
"""
|
|
1300
|
+
return self.defining_ideal().is_prime()
|
|
1301
|
+
|
|
1302
|
+
def Jacobian_matrix(self):
|
|
1303
|
+
r"""
|
|
1304
|
+
Return the matrix `\frac{\partial f_i}{\partial x_j}` of
|
|
1305
|
+
(formal) partial derivatives.
|
|
1306
|
+
|
|
1307
|
+
OUTPUT: a matrix of polynomials
|
|
1308
|
+
|
|
1309
|
+
EXAMPLES::
|
|
1310
|
+
|
|
1311
|
+
sage: P3.<w,x,y,z> = ProjectiveSpace(3, QQ)
|
|
1312
|
+
sage: twisted_cubic = P3.subscheme(matrix([[w, x, y], # needs sage.libs.singular
|
|
1313
|
+
....: [x, y, z]]).minors(2))
|
|
1314
|
+
sage: twisted_cubic.Jacobian_matrix() # needs sage.libs.singular
|
|
1315
|
+
[ y -2*x w 0]
|
|
1316
|
+
[ z -y -x w]
|
|
1317
|
+
[ 0 z -2*y x]
|
|
1318
|
+
|
|
1319
|
+
This example addresses issue :issue:`20512`::
|
|
1320
|
+
|
|
1321
|
+
sage: X = P3.subscheme([])
|
|
1322
|
+
sage: X.Jacobian_matrix().base_ring() == P3.coordinate_ring() # needs sage.libs.singular
|
|
1323
|
+
True
|
|
1324
|
+
"""
|
|
1325
|
+
R = self.ambient_space().coordinate_ring()
|
|
1326
|
+
l = self.defining_polynomials()
|
|
1327
|
+
if len(l) == 0:
|
|
1328
|
+
return sage.matrix.constructor.Matrix(R, 0)
|
|
1329
|
+
|
|
1330
|
+
from sage.calculus.functions import jacobian
|
|
1331
|
+
|
|
1332
|
+
return jacobian(l, R.gens())
|
|
1333
|
+
|
|
1334
|
+
def Jacobian(self):
|
|
1335
|
+
r"""
|
|
1336
|
+
Return the Jacobian ideal.
|
|
1337
|
+
|
|
1338
|
+
This is the ideal generated by
|
|
1339
|
+
|
|
1340
|
+
* the `d\times d` minors of the Jacobian matrix, where `d` is
|
|
1341
|
+
the :meth:`codimension` of the algebraic scheme, and
|
|
1342
|
+
|
|
1343
|
+
* the defining polynomials of the algebraic scheme. Note that
|
|
1344
|
+
some authors do not include these in the definition of the
|
|
1345
|
+
Jacobian ideal. An example of a reference that does include
|
|
1346
|
+
the defining equations is [Laz2004]_, p. 181.
|
|
1347
|
+
|
|
1348
|
+
OUTPUT: an ideal in the coordinate ring of the ambient space
|
|
1349
|
+
|
|
1350
|
+
EXAMPLES::
|
|
1351
|
+
|
|
1352
|
+
sage: P3.<w,x,y,z> = ProjectiveSpace(3, QQ)
|
|
1353
|
+
sage: twisted_cubic = P3.subscheme(matrix([[w, x, y], # needs sage.libs.singular
|
|
1354
|
+
....: [x, y, z]]).minors(2))
|
|
1355
|
+
sage: twisted_cubic.Jacobian() # needs sage.libs.singular
|
|
1356
|
+
Ideal (-x^2 + w*y, -x*y + w*z, -y^2 + x*z, x*z, -2*w*z, w*y, 3*w*y,
|
|
1357
|
+
-2*w*x, w^2, y*z, -2*x*z, w*z, 3*w*z, -2*w*y, w*x, z^2, -2*y*z,
|
|
1358
|
+
x*z, 3*x*z, -2*w*z, w*y)
|
|
1359
|
+
of Multivariate Polynomial Ring in w, x, y, z over Rational Field
|
|
1360
|
+
sage: twisted_cubic.defining_ideal() # needs sage.libs.singular
|
|
1361
|
+
Ideal (-x^2 + w*y, -x*y + w*z, -y^2 + x*z)
|
|
1362
|
+
of Multivariate Polynomial Ring in w, x, y, z over Rational Field
|
|
1363
|
+
|
|
1364
|
+
This example addresses issue :issue:`20512`::
|
|
1365
|
+
|
|
1366
|
+
sage: X = P3.subscheme([])
|
|
1367
|
+
sage: X.Jacobian() == P3.coordinate_ring().unit_ideal() # needs sage.libs.singular
|
|
1368
|
+
True
|
|
1369
|
+
"""
|
|
1370
|
+
d = self.codimension()
|
|
1371
|
+
minors = self.Jacobian_matrix().minors(d)
|
|
1372
|
+
I = self.defining_ideal()
|
|
1373
|
+
minors = tuple([I.reduce(m) for m in minors])
|
|
1374
|
+
return I.ring().ideal(I.gens() + minors)
|
|
1375
|
+
|
|
1376
|
+
def reduce(self):
|
|
1377
|
+
r"""
|
|
1378
|
+
Return the corresponding reduced algebraic space associated to this
|
|
1379
|
+
scheme.
|
|
1380
|
+
|
|
1381
|
+
EXAMPLES: First we construct the union of a doubled and tripled
|
|
1382
|
+
line in the affine plane over `\QQ` ::
|
|
1383
|
+
|
|
1384
|
+
sage: A.<x,y> = AffineSpace(2, QQ)
|
|
1385
|
+
sage: X = A.subscheme([(x-1)^2*(x-y)^3]); X
|
|
1386
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1387
|
+
x^5 - 3*x^4*y + 3*x^3*y^2 - x^2*y^3 - 2*x^4 + 6*x^3*y
|
|
1388
|
+
- 6*x^2*y^2 + 2*x*y^3 + x^3 - 3*x^2*y + 3*x*y^2 - y^3
|
|
1389
|
+
sage: X.dimension() # needs sage.libs.singular
|
|
1390
|
+
1
|
|
1391
|
+
|
|
1392
|
+
Then we compute the corresponding reduced scheme::
|
|
1393
|
+
|
|
1394
|
+
sage: Y = X.reduce(); Y # needs sage.libs.singular
|
|
1395
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1396
|
+
x^2 - x*y - x + y
|
|
1397
|
+
|
|
1398
|
+
Finally, we verify that the reduced scheme `Y` is the union
|
|
1399
|
+
of those two lines::
|
|
1400
|
+
|
|
1401
|
+
sage: # needs sage.libs.singular
|
|
1402
|
+
sage: L1 = A.subscheme([x - 1]); L1
|
|
1403
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1404
|
+
x - 1
|
|
1405
|
+
sage: L2 = A.subscheme([x - y]); L2
|
|
1406
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1407
|
+
x - y
|
|
1408
|
+
sage: W = L1.union(L2); W # taken in ambient space
|
|
1409
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1410
|
+
x^2 - x*y - x + y
|
|
1411
|
+
sage: Y == W
|
|
1412
|
+
True
|
|
1413
|
+
"""
|
|
1414
|
+
try:
|
|
1415
|
+
return self._reduce
|
|
1416
|
+
except AttributeError:
|
|
1417
|
+
r = self.defining_ideal().radical()
|
|
1418
|
+
A = self.ambient_space()
|
|
1419
|
+
V = A.subscheme(r)
|
|
1420
|
+
V._reduce = V # so knows it is already reduced!
|
|
1421
|
+
self._reduce = V
|
|
1422
|
+
return V
|
|
1423
|
+
|
|
1424
|
+
def union(self, other):
|
|
1425
|
+
"""
|
|
1426
|
+
Return the scheme-theoretic union of ``self`` and ``other`` in their common
|
|
1427
|
+
ambient space.
|
|
1428
|
+
|
|
1429
|
+
EXAMPLES: We construct the union of a line and a tripled-point on
|
|
1430
|
+
the line.
|
|
1431
|
+
|
|
1432
|
+
::
|
|
1433
|
+
|
|
1434
|
+
sage: A.<x,y> = AffineSpace(2, QQ)
|
|
1435
|
+
sage: I = ideal([x, y])^3
|
|
1436
|
+
sage: P = A.subscheme(I)
|
|
1437
|
+
sage: L = A.subscheme([y - 1])
|
|
1438
|
+
sage: S = L.union(P); S # needs sage.libs.singular
|
|
1439
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1440
|
+
y^4 - y^3,
|
|
1441
|
+
x*y^3 - x*y^2,
|
|
1442
|
+
x^2*y^2 - x^2*y,
|
|
1443
|
+
x^3*y - x^3
|
|
1444
|
+
sage: S.dimension() # needs sage.libs.singular
|
|
1445
|
+
1
|
|
1446
|
+
sage: S.reduce() # needs sage.libs.singular
|
|
1447
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1448
|
+
y^2 - y,
|
|
1449
|
+
x*y - x
|
|
1450
|
+
|
|
1451
|
+
We can also use the notation "+" for the union::
|
|
1452
|
+
|
|
1453
|
+
sage: A.subscheme([x]) + A.subscheme([y^2 - (x^3+1)]) # needs sage.libs.singular
|
|
1454
|
+
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
|
|
1455
|
+
x^4 - x*y^2 + x
|
|
1456
|
+
|
|
1457
|
+
Saving and loading::
|
|
1458
|
+
|
|
1459
|
+
sage: loads(S.dumps()) == S # needs sage.libs.singular
|
|
1460
|
+
True
|
|
1461
|
+
"""
|
|
1462
|
+
if not isinstance(other, AlgebraicScheme_subscheme):
|
|
1463
|
+
raise TypeError("other (=%s) must be a closed algebraic subscheme of an ambient space" % other)
|
|
1464
|
+
A = self.ambient_space()
|
|
1465
|
+
if other.ambient_space() != A:
|
|
1466
|
+
raise ValueError("other (=%s) must be in the same ambient space as self" % other)
|
|
1467
|
+
return A.subscheme(self.defining_ideal().intersection(other.defining_ideal()))
|
|
1468
|
+
|
|
1469
|
+
def __pow__(self, m):
|
|
1470
|
+
"""
|
|
1471
|
+
Return the Cartesian power of this space.
|
|
1472
|
+
|
|
1473
|
+
INPUT:
|
|
1474
|
+
|
|
1475
|
+
- ``m`` -- integer
|
|
1476
|
+
|
|
1477
|
+
OUTPUT: subscheme of product of ambient spaces
|
|
1478
|
+
|
|
1479
|
+
EXAMPLES::
|
|
1480
|
+
|
|
1481
|
+
sage: P2.<y0,y1,y2> = ProjectiveSpace(ZZ, 2)
|
|
1482
|
+
sage: Z = P2.subscheme([y0^2 - y1*y2, y2])
|
|
1483
|
+
sage: Z**3
|
|
1484
|
+
Closed subscheme of Product of projective spaces P^2 x P^2 x P^2 over
|
|
1485
|
+
Integer Ring defined by:
|
|
1486
|
+
x0^2 - x1*x2,
|
|
1487
|
+
x2,
|
|
1488
|
+
x3^2 - x4*x5,
|
|
1489
|
+
x5,
|
|
1490
|
+
x6^2 - x7*x8,
|
|
1491
|
+
x8
|
|
1492
|
+
|
|
1493
|
+
sage: A2.<x,y> = AffineSpace(QQ, 2)
|
|
1494
|
+
sage: V = A2.subscheme([x^2 - y, x - 1])
|
|
1495
|
+
sage: V**4
|
|
1496
|
+
Closed subscheme of Affine Space of dimension 8 over Rational Field
|
|
1497
|
+
defined by:
|
|
1498
|
+
x0^2 - x1,
|
|
1499
|
+
x0 - 1,
|
|
1500
|
+
x2^2 - x3,
|
|
1501
|
+
x2 - 1,
|
|
1502
|
+
x4^2 - x5,
|
|
1503
|
+
x4 - 1,
|
|
1504
|
+
x6^2 - x7,
|
|
1505
|
+
x6 - 1
|
|
1506
|
+
|
|
1507
|
+
sage: T.<x0,x1,x2,x3,x4,x5> = ProductProjectiveSpaces([2,2], ZZ)
|
|
1508
|
+
sage: X = T.subscheme([x0*x4 - x1*x3])
|
|
1509
|
+
sage: X^2
|
|
1510
|
+
Closed subscheme of Product of projective spaces P^2 x P^2 x P^2 x P^2
|
|
1511
|
+
over Integer Ring defined by:
|
|
1512
|
+
-x1*x3 + x0*x4,
|
|
1513
|
+
-x7*x9 + x6*x10
|
|
1514
|
+
|
|
1515
|
+
sage: E = EllipticCurve([0,0,0,0,1]) # needs sage.schemes
|
|
1516
|
+
sage: E^2 # needs sage.schemes
|
|
1517
|
+
Closed subscheme of Product of projective spaces P^2 x P^2
|
|
1518
|
+
over Rational Field defined by:
|
|
1519
|
+
-x0^3 + x1^2*x2 - x2^3,
|
|
1520
|
+
-x3^3 + x4^2*x5 - x5^3
|
|
1521
|
+
"""
|
|
1522
|
+
AS = self.ambient_space().__pow__(m)
|
|
1523
|
+
CR = AS.coordinate_ring()
|
|
1524
|
+
n = self.ambient_space().coordinate_ring().ngens()
|
|
1525
|
+
|
|
1526
|
+
polys = []
|
|
1527
|
+
for i in range(m):
|
|
1528
|
+
phi = self.ambient_space().coordinate_ring().hom(list(CR.gens()[n*i : n*(i+1)]), CR)
|
|
1529
|
+
polys.extend([phi(t) for t in self.defining_polynomials()])
|
|
1530
|
+
return AS.subscheme(polys)
|
|
1531
|
+
|
|
1532
|
+
def __mul__(self, right):
|
|
1533
|
+
r"""
|
|
1534
|
+
Create the product of subschemes.
|
|
1535
|
+
|
|
1536
|
+
INPUT:
|
|
1537
|
+
|
|
1538
|
+
- ``right`` -- a subscheme of similar type
|
|
1539
|
+
|
|
1540
|
+
OUTPUT: a subscheme of a the product of the ambient spaces
|
|
1541
|
+
|
|
1542
|
+
EXAMPLES::
|
|
1543
|
+
|
|
1544
|
+
sage: S = ProductProjectiveSpaces([1,2,1], ZZ, 't')
|
|
1545
|
+
sage: T = ProductProjectiveSpaces([2,2], ZZ, 'x')
|
|
1546
|
+
sage: T.inject_variables()
|
|
1547
|
+
Defining x0, x1, x2, x3, x4, x5
|
|
1548
|
+
sage: X = T.subscheme([x0*x4 - x1*x3])
|
|
1549
|
+
sage: X*S
|
|
1550
|
+
Closed subscheme of
|
|
1551
|
+
Product of projective spaces P^2 x P^2 x P^1 x P^2 x P^1 over Integer Ring
|
|
1552
|
+
defined by:
|
|
1553
|
+
-x1*x3 + x0*x4
|
|
1554
|
+
|
|
1555
|
+
::
|
|
1556
|
+
|
|
1557
|
+
sage: S = ProjectiveSpace(ZZ, 2, 't')
|
|
1558
|
+
sage: T.<x0,x1,x2,x3> = ProjectiveSpace(ZZ, 3)
|
|
1559
|
+
sage: X = T.subscheme([x0*x2 - x1*x3])
|
|
1560
|
+
sage: X*S
|
|
1561
|
+
Closed subscheme of Product of projective spaces P^3 x P^2 over Integer Ring
|
|
1562
|
+
defined by:
|
|
1563
|
+
x0*x2 - x1*x3
|
|
1564
|
+
|
|
1565
|
+
::
|
|
1566
|
+
|
|
1567
|
+
sage: A2 = AffineSpace(ZZ, 2, 't')
|
|
1568
|
+
sage: A3.<x0,x1,x2> = AffineSpace(ZZ, 3)
|
|
1569
|
+
sage: X = A3.subscheme([x0*x2 - x1])
|
|
1570
|
+
sage: X*A2
|
|
1571
|
+
Closed subscheme of Affine Space of dimension 5 over Integer Ring
|
|
1572
|
+
defined by:
|
|
1573
|
+
x0*x2 - x1
|
|
1574
|
+
|
|
1575
|
+
::
|
|
1576
|
+
|
|
1577
|
+
sage: T.<x0,x1,x2,x3,x4,x5> = ProductProjectiveSpaces([2,2], ZZ)
|
|
1578
|
+
sage: X = T.subscheme([x0*x4 - x1*x3])
|
|
1579
|
+
sage: X*X
|
|
1580
|
+
Closed subscheme of Product of projective spaces P^2 x P^2 x P^2 x P^2
|
|
1581
|
+
over Integer Ring defined by:
|
|
1582
|
+
-x1*x3 + x0*x4,
|
|
1583
|
+
-x7*x9 + x6*x10
|
|
1584
|
+
|
|
1585
|
+
::
|
|
1586
|
+
|
|
1587
|
+
sage: P1.<z0,z1> = ProjectiveSpace(ZZ, 1)
|
|
1588
|
+
sage: Y = P1.subscheme([z0 - z1])
|
|
1589
|
+
sage: T.<x0,x1,x2,x3,x4,x5> = ProductProjectiveSpaces([2,2], ZZ)
|
|
1590
|
+
sage: X = T.subscheme([x0*x4 - x1*x3])
|
|
1591
|
+
sage: X*Y
|
|
1592
|
+
Closed subscheme of Product of projective spaces P^2 x P^2 x P^1
|
|
1593
|
+
over Integer Ring defined by:
|
|
1594
|
+
-x1*x3 + x0*x4,
|
|
1595
|
+
z0 - z1
|
|
1596
|
+
|
|
1597
|
+
::
|
|
1598
|
+
|
|
1599
|
+
sage: A3.<x0,x1,x2> = AffineSpace(ZZ, 3)
|
|
1600
|
+
sage: X = A3.subscheme([x0*x2 - x1])
|
|
1601
|
+
sage: P1.<u,v> = ProjectiveSpace(ZZ, 1)
|
|
1602
|
+
sage: Y = P1.subscheme([u - v])
|
|
1603
|
+
sage: X*Y
|
|
1604
|
+
Traceback (most recent call last):
|
|
1605
|
+
...
|
|
1606
|
+
TypeError: Projective Space of dimension 1 over Integer Ring must be an affine space or affine subscheme
|
|
1607
|
+
sage: Y*X
|
|
1608
|
+
Traceback (most recent call last):
|
|
1609
|
+
...
|
|
1610
|
+
TypeError: Affine Space of dimension 3 over Integer Ring must be a projective space,
|
|
1611
|
+
product of projective spaces, or subscheme
|
|
1612
|
+
sage: PP.<a,b,c,d> = ProductProjectiveSpaces(ZZ, [1,1])
|
|
1613
|
+
sage: Z = PP.subscheme([a*d - b*c])
|
|
1614
|
+
sage: X*Z
|
|
1615
|
+
Traceback (most recent call last):
|
|
1616
|
+
...
|
|
1617
|
+
TypeError: Product of projective spaces P^1 x P^1 over Integer Ring must be an affine space or affine subscheme
|
|
1618
|
+
sage: Z*X
|
|
1619
|
+
Traceback (most recent call last):
|
|
1620
|
+
...
|
|
1621
|
+
TypeError: Affine Space of dimension 3 over Integer Ring must be a projective space,
|
|
1622
|
+
product of projective spaces, or subscheme
|
|
1623
|
+
"""
|
|
1624
|
+
#This will catch any ambient space mismatches
|
|
1625
|
+
AS = self.ambient_space()*right.ambient_space()
|
|
1626
|
+
CR = AS.coordinate_ring()
|
|
1627
|
+
n = self.ambient_space().coordinate_ring().ngens()
|
|
1628
|
+
|
|
1629
|
+
phi = self.ambient_space().coordinate_ring().hom(list(CR.gens()[:n]), CR)
|
|
1630
|
+
psi = right.ambient_space().coordinate_ring().hom(list(CR.gens()[n:]), CR)
|
|
1631
|
+
return AS.subscheme([phi(t) for t in self.defining_polynomials()] + [psi(t) for t in right.defining_polynomials()])
|
|
1632
|
+
|
|
1633
|
+
__add__ = union
|
|
1634
|
+
|
|
1635
|
+
def intersection(self, other):
|
|
1636
|
+
"""
|
|
1637
|
+
Return the scheme-theoretic intersection of ``self`` and ``other`` in their
|
|
1638
|
+
common ambient space.
|
|
1639
|
+
|
|
1640
|
+
EXAMPLES::
|
|
1641
|
+
|
|
1642
|
+
sage: A.<x, y> = AffineSpace(2, ZZ)
|
|
1643
|
+
sage: X = A.subscheme([x^2 - y])
|
|
1644
|
+
sage: Y = A.subscheme([y])
|
|
1645
|
+
sage: X.intersection(Y)
|
|
1646
|
+
Closed subscheme of Affine Space of dimension 2 over Integer Ring defined by:
|
|
1647
|
+
x^2 - y,
|
|
1648
|
+
y
|
|
1649
|
+
"""
|
|
1650
|
+
if not isinstance(other, AlgebraicScheme_subscheme):
|
|
1651
|
+
raise TypeError("other (=%s) must be a closed algebraic subscheme of an ambient space" % other)
|
|
1652
|
+
A = self.ambient_space()
|
|
1653
|
+
if other.ambient_space() != A:
|
|
1654
|
+
raise ValueError("other (=%s) must be in the same ambient space as self" % other)
|
|
1655
|
+
return A.subscheme(self.defining_ideal() + other.defining_ideal())
|
|
1656
|
+
|
|
1657
|
+
def complement(self, other=None):
|
|
1658
|
+
"""
|
|
1659
|
+
Return the scheme-theoretic complement ``other - self``, where
|
|
1660
|
+
``self`` and ``other`` are both closed algebraic subschemes of the
|
|
1661
|
+
same ambient space.
|
|
1662
|
+
|
|
1663
|
+
If ``other`` is unspecified, it is taken to be the ambient space
|
|
1664
|
+
of ``self``.
|
|
1665
|
+
|
|
1666
|
+
EXAMPLES::
|
|
1667
|
+
|
|
1668
|
+
sage: A.<x, y, z> = AffineSpace(3, ZZ)
|
|
1669
|
+
sage: X = A.subscheme([x + y - z])
|
|
1670
|
+
sage: Y = A.subscheme([x - y + z])
|
|
1671
|
+
sage: Y.complement(X)
|
|
1672
|
+
Quasi-affine subscheme X - Y of
|
|
1673
|
+
Affine Space of dimension 3 over Integer Ring,
|
|
1674
|
+
where X is defined by:
|
|
1675
|
+
x + y - z
|
|
1676
|
+
and Y is defined by:
|
|
1677
|
+
x - y + z
|
|
1678
|
+
sage: Y.complement()
|
|
1679
|
+
Quasi-affine subscheme X - Y of
|
|
1680
|
+
Affine Space of dimension 3 over Integer Ring,
|
|
1681
|
+
where X is defined by:
|
|
1682
|
+
(no polynomials)
|
|
1683
|
+
and Y is defined by:
|
|
1684
|
+
x - y + z
|
|
1685
|
+
sage: P.<x, y, z> = ProjectiveSpace(2, QQ)
|
|
1686
|
+
sage: X = P.subscheme([x^2 + y^2 + z^2])
|
|
1687
|
+
sage: Y = P.subscheme([x*y + y*z + z*x])
|
|
1688
|
+
sage: Y.complement(X)
|
|
1689
|
+
Quasi-projective subscheme X - Y of
|
|
1690
|
+
Projective Space of dimension 2 over Rational Field,
|
|
1691
|
+
where X is defined by:
|
|
1692
|
+
x^2 + y^2 + z^2
|
|
1693
|
+
and Y is defined by:
|
|
1694
|
+
x*y + x*z + y*z
|
|
1695
|
+
sage: Y.complement(P)
|
|
1696
|
+
Quasi-projective subscheme X - Y of
|
|
1697
|
+
Projective Space of dimension 2 over Rational Field,
|
|
1698
|
+
where X is defined by:
|
|
1699
|
+
(no polynomials)
|
|
1700
|
+
and Y is defined by:
|
|
1701
|
+
x*y + x*z + y*z
|
|
1702
|
+
"""
|
|
1703
|
+
A = self.ambient_space()
|
|
1704
|
+
if other is None:
|
|
1705
|
+
other = A.subscheme([])
|
|
1706
|
+
elif not isinstance(other, AlgebraicScheme_subscheme):
|
|
1707
|
+
if other == A:
|
|
1708
|
+
other = A.subscheme([])
|
|
1709
|
+
else:
|
|
1710
|
+
raise TypeError("Argument other (=%s) must be a closed algebraic subscheme of an ambient space" % other)
|
|
1711
|
+
if other.ambient_space() != A:
|
|
1712
|
+
raise ValueError("other (=%s) must be in the same ambient space as self" % other)
|
|
1713
|
+
return AlgebraicScheme_quasi(other, self)
|
|
1714
|
+
|
|
1715
|
+
def rational_points(self, **kwds):
|
|
1716
|
+
"""
|
|
1717
|
+
Return the rational points on the algebraic subscheme.
|
|
1718
|
+
|
|
1719
|
+
For a dimension 0 subscheme, if the base ring is a numerical field
|
|
1720
|
+
such as the ComplexField the results returned could be very far from correct.
|
|
1721
|
+
If the polynomials defining the subscheme are defined over a number field, you
|
|
1722
|
+
will get better results calling rational points with `F` defined as the number
|
|
1723
|
+
field and the base ring as the field of definition. If the base ring
|
|
1724
|
+
is a number field, the embedding into ``F`` must be known.
|
|
1725
|
+
|
|
1726
|
+
In the case of numerically approximated points, the points are returned over as
|
|
1727
|
+
points of the ambient space.
|
|
1728
|
+
|
|
1729
|
+
For a dimension greater than 0 scheme, depending on bound size, either the
|
|
1730
|
+
points in the ambient space are enumerated or a sieving algorithm lifting points
|
|
1731
|
+
modulo primes is used. See the documentation in homset for the details of the
|
|
1732
|
+
sieving algorithm.
|
|
1733
|
+
|
|
1734
|
+
INPUT: keyword arguments:
|
|
1735
|
+
|
|
1736
|
+
- ``bound`` -- integer (default: 0); the bound for the coordinates for
|
|
1737
|
+
subschemes with dimension at least 1
|
|
1738
|
+
|
|
1739
|
+
- ``prec`` -- integer (default: 53); the precision to use to
|
|
1740
|
+
compute the elements of bounded height for number fields
|
|
1741
|
+
|
|
1742
|
+
- ``F`` -- field (default: base ring). The field to compute
|
|
1743
|
+
the rational points over
|
|
1744
|
+
|
|
1745
|
+
- ``point_tolerance`` -- positive real number (default: 10^(-10)).
|
|
1746
|
+
For numerically inexact fields, two points are considered the same
|
|
1747
|
+
if their coordinates are within tolerance.
|
|
1748
|
+
|
|
1749
|
+
- ``zero_tolerance`` -- positive real number (default: 10^(-10)).
|
|
1750
|
+
For numerically inexact fields, points are on the subscheme if they
|
|
1751
|
+
satisfy the equations to within tolerance.
|
|
1752
|
+
|
|
1753
|
+
- ``tolerance`` -- a rational number in (0,1] used in Doyle-Krumm
|
|
1754
|
+
algorithm-4
|
|
1755
|
+
|
|
1756
|
+
OUTPUT: list of points in subscheme or ambient space
|
|
1757
|
+
|
|
1758
|
+
.. WARNING::
|
|
1759
|
+
|
|
1760
|
+
For numerically inexact fields such as ComplexField or RealField the
|
|
1761
|
+
list of points returned is very likely to be incomplete at best.
|
|
1762
|
+
|
|
1763
|
+
EXAMPLES:
|
|
1764
|
+
|
|
1765
|
+
Enumerate over a projective scheme over a number field::
|
|
1766
|
+
|
|
1767
|
+
sage: # needs sage.rings.number_field
|
|
1768
|
+
sage: u = QQ['u'].0
|
|
1769
|
+
sage: K.<v> = NumberField(u^2 + 3)
|
|
1770
|
+
sage: A.<x,y> = ProjectiveSpace(K, 1)
|
|
1771
|
+
sage: X = A.subscheme(x^2 - y^2)
|
|
1772
|
+
sage: X.rational_points(bound=3) # needs sage.libs.singular
|
|
1773
|
+
[(-1 : 1), (1 : 1)]
|
|
1774
|
+
|
|
1775
|
+
One can enumerate points up to a given bound on a projective scheme
|
|
1776
|
+
over the rationals::
|
|
1777
|
+
|
|
1778
|
+
sage: E = EllipticCurve('37a') # needs database_cremona_mini_ellcurve sage.schemes
|
|
1779
|
+
sage: E.rational_points(bound=8) # needs database_cremona_mini_ellcurve sage.libs.singular sage.schemes
|
|
1780
|
+
[(-1 : -1 : 1), (-1 : 0 : 1), (0 : -1 : 1), (0 : 0 : 1), (0 : 1 : 0),
|
|
1781
|
+
(1/4 : -5/8 : 1), (1/4 : -3/8 : 1), (1 : -1 : 1), (1 : 0 : 1),
|
|
1782
|
+
(2 : -3 : 1), (2 : 2 : 1)]
|
|
1783
|
+
|
|
1784
|
+
For a small finite field, the complete set of points can be
|
|
1785
|
+
enumerated. ::
|
|
1786
|
+
|
|
1787
|
+
sage: Etilde = E.base_extend(GF(3)) # needs database_cremona_mini_ellcurve sage.schemes
|
|
1788
|
+
sage: Etilde.rational_points() # needs database_cremona_mini_ellcurve sage.libs.singular sage.schemes
|
|
1789
|
+
[(0 : 1 : 0), (0 : 0 : 1), (0 : 2 : 1), (1 : 0 : 1),
|
|
1790
|
+
(1 : 2 : 1), (2 : 0 : 1), (2 : 2 : 1)]
|
|
1791
|
+
|
|
1792
|
+
The class of hyperelliptic curves does not (yet) support
|
|
1793
|
+
desingularization of the places at infinity into two points::
|
|
1794
|
+
|
|
1795
|
+
sage: FF = FiniteField(7)
|
|
1796
|
+
sage: P.<x> = PolynomialRing(FiniteField(7))
|
|
1797
|
+
sage: C = HyperellipticCurve(x^8 + x + 1) # needs sage.schemes
|
|
1798
|
+
sage: C.rational_points() # needs sage.libs.singular sage.schemes
|
|
1799
|
+
[(0 : 1 : 0), (0 : 1 : 1), (0 : 6 : 1), (2 : 0 : 1),
|
|
1800
|
+
(4 : 0 : 1), (6 : 1 : 1), (6 : 6 : 1)]
|
|
1801
|
+
|
|
1802
|
+
::
|
|
1803
|
+
|
|
1804
|
+
sage: # needs sage.rings.number_field sage.rings.real_mpfr
|
|
1805
|
+
sage: K.<v> = QuadraticField(-3)
|
|
1806
|
+
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
|
|
1807
|
+
sage: X = P.subscheme([x^2 - v^2*x*z, y*x - v*z^2])
|
|
1808
|
+
sage: X.rational_points(F=CC) # needs sage.libs.singular
|
|
1809
|
+
[(-3.00000000000000 : -0.577350269189626*I : 1.00000000000000),
|
|
1810
|
+
(0.000000000000000 : 1.00000000000000 : 0.000000000000000)]
|
|
1811
|
+
|
|
1812
|
+
::
|
|
1813
|
+
|
|
1814
|
+
sage: # needs sage.rings.number_field sage.rings.real_mpfr
|
|
1815
|
+
sage: K.<v> = QuadraticField(3)
|
|
1816
|
+
sage: A.<x,y> = AffineSpace(K, 2)
|
|
1817
|
+
sage: X = A.subscheme([x^2 - v^2*y, y*x - v])
|
|
1818
|
+
sage: X.rational_points(F=RR) # needs sage.libs.singular
|
|
1819
|
+
[(1.73205080756888, 1.00000000000000)]
|
|
1820
|
+
|
|
1821
|
+
.. TODO::
|
|
1822
|
+
|
|
1823
|
+
Implement Stoll's model in weighted projective space to
|
|
1824
|
+
resolve singularities and find two points (1 : 1 : 0) and
|
|
1825
|
+
(-1 : 1 : 0) at infinity.
|
|
1826
|
+
"""
|
|
1827
|
+
F = kwds.pop('F', None)
|
|
1828
|
+
if F is None: #sometimes None is passed in
|
|
1829
|
+
F = self.base_ring()
|
|
1830
|
+
if F in NumberFields() or F == ZZ:
|
|
1831
|
+
X = self.base_extend(F)(F)
|
|
1832
|
+
try:
|
|
1833
|
+
return X.points(**kwds) # checks for proper bound done in points functions
|
|
1834
|
+
except TypeError:
|
|
1835
|
+
raise TypeError("Unable to enumerate points over %s." % F)
|
|
1836
|
+
elif (self.base_ring() in NumberFields() or self.base_ring() == ZZ)\
|
|
1837
|
+
and hasattr(F, 'precision'):
|
|
1838
|
+
#we are numerically approximating number field points
|
|
1839
|
+
return self(self.base_ring()).numerical_points(F=F, **kwds)
|
|
1840
|
+
try:
|
|
1841
|
+
X = self.base_extend(F)(F)
|
|
1842
|
+
return X.points()
|
|
1843
|
+
except TypeError:
|
|
1844
|
+
raise TypeError("Unable to enumerate points over %s." % F)
|
|
1845
|
+
|
|
1846
|
+
def change_ring(self, R):
|
|
1847
|
+
r"""
|
|
1848
|
+
Return a new algebraic subscheme which is this subscheme coerced to ``R``.
|
|
1849
|
+
|
|
1850
|
+
INPUT:
|
|
1851
|
+
|
|
1852
|
+
- ``R`` -- ring or morphism
|
|
1853
|
+
|
|
1854
|
+
OUTPUT: a new algebraic subscheme which is this subscheme coerced to ``R``
|
|
1855
|
+
|
|
1856
|
+
EXAMPLES::
|
|
1857
|
+
|
|
1858
|
+
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
|
|
1859
|
+
sage: X = P.subscheme([3*x^2 - y^2])
|
|
1860
|
+
sage: H = Hom(X, X)
|
|
1861
|
+
sage: X.change_ring(GF(3))
|
|
1862
|
+
Closed subscheme of Projective Space of dimension 1
|
|
1863
|
+
over Finite Field of size 3 defined by: -y^2
|
|
1864
|
+
|
|
1865
|
+
::
|
|
1866
|
+
|
|
1867
|
+
sage: # needs sage.rings.number_field
|
|
1868
|
+
sage: K.<w> = QuadraticField(2)
|
|
1869
|
+
sage: R.<z> = K[]
|
|
1870
|
+
sage: L.<v> = K.extension(z^3 - 5)
|
|
1871
|
+
sage: P.<x,y> = ProjectiveSpace(K, 1)
|
|
1872
|
+
sage: X = P.subscheme(x - w*y) # needs sage.libs.singular
|
|
1873
|
+
sage: X.change_ring(L) # needs sage.libs.singular
|
|
1874
|
+
Closed subscheme of Projective Space of dimension 1 over
|
|
1875
|
+
Number Field in v with defining polynomial z^3 - 5 over its base field
|
|
1876
|
+
defined by: x + (-w)*y
|
|
1877
|
+
|
|
1878
|
+
::
|
|
1879
|
+
|
|
1880
|
+
sage: # needs sage.rings.number_field
|
|
1881
|
+
sage: K.<w> = QuadraticField(2)
|
|
1882
|
+
sage: R.<z> = K[]
|
|
1883
|
+
sage: L.<v> = K.extension(z^3 - 5)
|
|
1884
|
+
sage: P.<x,y,z> = AffineSpace(L, 3)
|
|
1885
|
+
sage: X = P.subscheme([x - w*y, z^2 - v*x]) # needs sage.libs.singular
|
|
1886
|
+
sage: emb = L.embeddings(QQbar) # needs sage.libs.singular
|
|
1887
|
+
sage: X.change_ring(emb[0]) # needs sage.libs.singular
|
|
1888
|
+
Closed subscheme of Affine Space of dimension 3 over Algebraic Field
|
|
1889
|
+
defined by:
|
|
1890
|
+
x + (-1.414213562373095? + 0.?e-16*I)*y,
|
|
1891
|
+
z^2 + (0.8549879733383485? + 1.480882609682365?*I)*x
|
|
1892
|
+
|
|
1893
|
+
::
|
|
1894
|
+
|
|
1895
|
+
sage: # needs sage.rings.number_field
|
|
1896
|
+
sage: K.<w> = QuadraticField(2)
|
|
1897
|
+
sage: R.<z> = K[]
|
|
1898
|
+
sage: L.<v> = K.extension(z^3 - 5)
|
|
1899
|
+
sage: P.<x,y,z> = AffineSpace(L, 3)
|
|
1900
|
+
sage: X = P.subscheme([x - w*y, z^2 - v*x]) # needs sage.libs.singular
|
|
1901
|
+
sage: emb = L.embeddings(QQbar) # needs sage.libs.singular
|
|
1902
|
+
sage: X.change_ring(emb[1]) # needs sage.libs.singular
|
|
1903
|
+
Closed subscheme of Affine Space of dimension 3 over Algebraic Field
|
|
1904
|
+
defined by:
|
|
1905
|
+
x + (-1.414213562373095? + 0.?e-16*I)*y,
|
|
1906
|
+
z^2 + (0.8549879733383485? - 1.480882609682365?*I)*x
|
|
1907
|
+
|
|
1908
|
+
::
|
|
1909
|
+
|
|
1910
|
+
sage: # needs sage.rings.number_field
|
|
1911
|
+
sage: K.<w> = QuadraticField(-3)
|
|
1912
|
+
sage: P.<x,y> = ProjectiveSpace(K, 1)
|
|
1913
|
+
sage: X = P.subscheme(x - w*y) # needs sage.libs.singular
|
|
1914
|
+
sage: X.change_ring(CC) # needs sage.libs.singular
|
|
1915
|
+
Closed subscheme of Projective Space of dimension 1
|
|
1916
|
+
over Complex Field with 53 bits of precision defined by:
|
|
1917
|
+
x + (-1.73205080756888*I)*y
|
|
1918
|
+
|
|
1919
|
+
::
|
|
1920
|
+
|
|
1921
|
+
sage: # needs sage.rings.number_field
|
|
1922
|
+
sage: K.<w> = QuadraticField(3)
|
|
1923
|
+
sage: P.<x,y> = ProjectiveSpace(K, 1)
|
|
1924
|
+
sage: X = P.subscheme(x - w*y) # needs sage.libs.singular
|
|
1925
|
+
sage: X.change_ring(RR) # needs sage.libs.singular
|
|
1926
|
+
Closed subscheme of Projective Space of dimension 1
|
|
1927
|
+
over Real Field with 53 bits of precision defined by:
|
|
1928
|
+
x - 1.73205080756888*y
|
|
1929
|
+
|
|
1930
|
+
::
|
|
1931
|
+
|
|
1932
|
+
sage: # needs sage.rings.number_field
|
|
1933
|
+
sage: K.<v> = CyclotomicField(7)
|
|
1934
|
+
sage: O = K.maximal_order()
|
|
1935
|
+
sage: P.<x,y> = ProjectiveSpace(O, 1)
|
|
1936
|
+
sage: X = P.subscheme([x^2 + O(v)*y^2]) # needs sage.libs.singular
|
|
1937
|
+
sage: X.change_ring(CC) # needs sage.libs.singular
|
|
1938
|
+
Closed subscheme of Projective Space of dimension 1
|
|
1939
|
+
over Complex Field with 53 bits of precision defined by:
|
|
1940
|
+
x^2 + (0.623489801858734 + 0.781831482468030*I)*y^2
|
|
1941
|
+
sage: X.change_ring(K).change_ring(K.embeddings(QQbar)[3]) # needs sage.libs.singular
|
|
1942
|
+
Closed subscheme of Projective Space of dimension 1
|
|
1943
|
+
over Algebraic Field defined by:
|
|
1944
|
+
x^2 + (-0.9009688679024191? - 0.4338837391175581?*I)*y^2
|
|
1945
|
+
|
|
1946
|
+
::
|
|
1947
|
+
|
|
1948
|
+
sage: # needs sage.rings.number_field
|
|
1949
|
+
sage: R.<x> = QQ[]
|
|
1950
|
+
sage: f = x^6 - 2
|
|
1951
|
+
sage: L.<b> = NumberField(f, embedding=f.roots(CC)[2][0])
|
|
1952
|
+
sage: A.<x,y> = AffineSpace(L, 2)
|
|
1953
|
+
sage: H = Hom(A, A)
|
|
1954
|
+
sage: X = A.subscheme([b*x^2, y^2]) # needs sage.libs.singular
|
|
1955
|
+
sage: X.change_ring(CC) # needs sage.libs.singular
|
|
1956
|
+
Closed subscheme of Affine Space of dimension 2
|
|
1957
|
+
over Complex Field with 53 bits of precision defined by:
|
|
1958
|
+
(-0.561231024154687 - 0.972080648619833*I)*x^2,
|
|
1959
|
+
y^2
|
|
1960
|
+
"""
|
|
1961
|
+
AS = self.ambient_space()
|
|
1962
|
+
new_AS = AS.change_ring(R)
|
|
1963
|
+
I = [f.change_ring(R) for f in self.defining_polynomials()]
|
|
1964
|
+
return new_AS.subscheme(I)
|
|
1965
|
+
|
|
1966
|
+
def weil_restriction(self):
|
|
1967
|
+
r"""
|
|
1968
|
+
Compute the Weil restriction of this variety over some extension
|
|
1969
|
+
field. If the field is a finite field, then this computes
|
|
1970
|
+
the Weil restriction to the prime subfield.
|
|
1971
|
+
|
|
1972
|
+
A Weil restriction of scalars - denoted `Res_{L/k}` - is a
|
|
1973
|
+
functor which, for any finite extension of fields `L/k` and
|
|
1974
|
+
any algebraic variety `X` over `L`, produces another
|
|
1975
|
+
corresponding variety `Res_{L/k}(X)`, defined over `k`. It is
|
|
1976
|
+
useful for reducing questions about varieties over large
|
|
1977
|
+
fields to questions about more complicated varieties over
|
|
1978
|
+
smaller fields.
|
|
1979
|
+
|
|
1980
|
+
This function does not compute this Weil restriction directly
|
|
1981
|
+
but computes on generating sets of polynomial ideals:
|
|
1982
|
+
|
|
1983
|
+
Let `d` be the degree of the field extension `L/k`, let `a` a
|
|
1984
|
+
generator of `L/k` and `p` the minimal polynomial of
|
|
1985
|
+
`L/k`. Denote this ideal by `I`.
|
|
1986
|
+
|
|
1987
|
+
Specifically, this function first maps each variable `x` to
|
|
1988
|
+
its representation over `k`: `\sum_{i=0}^{d-1} a^i x_i`. Then
|
|
1989
|
+
each generator of `I` is evaluated over these representations
|
|
1990
|
+
and reduced modulo the minimal polynomial `p`. The result is
|
|
1991
|
+
interpreted as a univariate polynomial in `a` and its
|
|
1992
|
+
coefficients are the new generators of the returned ideal.
|
|
1993
|
+
|
|
1994
|
+
If the input and the output ideals are radical, this is
|
|
1995
|
+
equivalent to the statement about algebraic varieties above.
|
|
1996
|
+
|
|
1997
|
+
OUTPUT: affine subscheme; the Weil restriction of ``self``
|
|
1998
|
+
|
|
1999
|
+
EXAMPLES::
|
|
2000
|
+
|
|
2001
|
+
sage: # needs sage.rings.number_field
|
|
2002
|
+
sage: R.<x> = QQ[]
|
|
2003
|
+
sage: K.<w> = NumberField(x^5 - 2)
|
|
2004
|
+
sage: R.<x> = K[]
|
|
2005
|
+
sage: L.<v> = K.extension(x^2 + 1)
|
|
2006
|
+
sage: A.<x,y> = AffineSpace(L, 2)
|
|
2007
|
+
sage: X = A.subscheme([y^2 - L(w)*x^3 - v]) # needs sage.libs.singular
|
|
2008
|
+
sage: X.weil_restriction() # needs sage.libs.singular
|
|
2009
|
+
Closed subscheme of Affine Space of dimension 4
|
|
2010
|
+
over Number Field in w with defining polynomial x^5 - 2 defined by:
|
|
2011
|
+
(-w)*z0^3 + (3*w)*z0*z1^2 + z2^2 - z3^2,
|
|
2012
|
+
(-3*w)*z0^2*z1 + w*z1^3 + 2*z2*z3 - 1
|
|
2013
|
+
sage: X.weil_restriction().ambient_space() is A.weil_restriction() # needs sage.libs.singular
|
|
2014
|
+
True
|
|
2015
|
+
|
|
2016
|
+
::
|
|
2017
|
+
|
|
2018
|
+
sage: A.<x,y,z> = AffineSpace(GF(5^2, 't'), 3) # needs sage.rings.finite_rings
|
|
2019
|
+
sage: X = A.subscheme([y^2 - x*z, z^2 + 2*y]) # needs sage.libs.singular sage.rings.finite_rings
|
|
2020
|
+
sage: X.weil_restriction() # needs sage.libs.singular sage.rings.finite_rings
|
|
2021
|
+
Closed subscheme of Affine Space of dimension 6
|
|
2022
|
+
over Finite Field of size 5 defined by:
|
|
2023
|
+
z2^2 - 2*z3^2 - z0*z4 + 2*z1*z5,
|
|
2024
|
+
2*z2*z3 + z3^2 - z1*z4 - z0*z5 - z1*z5,
|
|
2025
|
+
z4^2 - 2*z5^2 + 2*z2,
|
|
2026
|
+
2*z4*z5 + z5^2 + 2*z3
|
|
2027
|
+
"""
|
|
2028
|
+
try:
|
|
2029
|
+
X = self.__weil_restriction
|
|
2030
|
+
except AttributeError:
|
|
2031
|
+
L = self.base_ring()
|
|
2032
|
+
if L.is_finite():
|
|
2033
|
+
d = L.degree()
|
|
2034
|
+
else:
|
|
2035
|
+
d = L.relative_degree()
|
|
2036
|
+
|
|
2037
|
+
if d == 1:
|
|
2038
|
+
X = self
|
|
2039
|
+
else:
|
|
2040
|
+
A = self.ambient_space().weil_restriction()
|
|
2041
|
+
I = self.defining_ideal().weil_restriction()
|
|
2042
|
+
X = A.subscheme(I)
|
|
2043
|
+
self.__weil_restriction = X
|
|
2044
|
+
return X
|
|
2045
|
+
|
|
2046
|
+
def specialization(self, D=None, phi=None):
|
|
2047
|
+
r"""
|
|
2048
|
+
Specialization of this subscheme.
|
|
2049
|
+
|
|
2050
|
+
Given a family of maps defined over a polynomial ring. A specialization
|
|
2051
|
+
is a particular member of that family. The specialization can be specified either
|
|
2052
|
+
by a dictionary or a :class:`SpecializationMorphism`.
|
|
2053
|
+
|
|
2054
|
+
INPUT:
|
|
2055
|
+
|
|
2056
|
+
- ``D`` -- dictionary (optional)
|
|
2057
|
+
|
|
2058
|
+
- ``phi`` -- :class:`SpecializationMorphism` (optional)
|
|
2059
|
+
|
|
2060
|
+
OUTPUT: :class:`SchemeMorphism_polynomial`
|
|
2061
|
+
|
|
2062
|
+
EXAMPLES::
|
|
2063
|
+
|
|
2064
|
+
sage: R.<c> = PolynomialRing(QQ)
|
|
2065
|
+
sage: P.<x,y> = ProjectiveSpace(R, 1)
|
|
2066
|
+
sage: X = P.subscheme([x^2 + c*y^2])
|
|
2067
|
+
sage: X.specialization(dict({c:2}))
|
|
2068
|
+
Closed subscheme of Projective Space of dimension 1 over Rational Field defined by:
|
|
2069
|
+
x^2 + 2*y^2
|
|
2070
|
+
|
|
2071
|
+
::
|
|
2072
|
+
|
|
2073
|
+
sage: R.<c> = PolynomialRing(QQ)
|
|
2074
|
+
sage: S.<a,b> = R[]
|
|
2075
|
+
sage: P.<x,y,z> = AffineSpace(S, 3)
|
|
2076
|
+
sage: X = P.subscheme([x^2 + a*c*y^2 - b*z^2])
|
|
2077
|
+
sage: from sage.rings.polynomial.flatten import SpecializationMorphism
|
|
2078
|
+
sage: phi = SpecializationMorphism(P.coordinate_ring(),
|
|
2079
|
+
....: dict({c: 2, a: 1}))
|
|
2080
|
+
sage: X.specialization(phi=phi) # needs sage.libs.singular
|
|
2081
|
+
Closed subscheme of Affine Space of dimension 3
|
|
2082
|
+
over Univariate Polynomial Ring in b over Rational Field defined by:
|
|
2083
|
+
x^2 + 2*y^2 + (-b)*z^2
|
|
2084
|
+
"""
|
|
2085
|
+
if D is None:
|
|
2086
|
+
if phi is None:
|
|
2087
|
+
raise ValueError("either the dictionary or the specialization must be provided")
|
|
2088
|
+
else:
|
|
2089
|
+
from sage.rings.polynomial.flatten import SpecializationMorphism
|
|
2090
|
+
phi = SpecializationMorphism(self.ambient_space().coordinate_ring(),D)
|
|
2091
|
+
amb = self.ambient_space().change_ring(phi.codomain().base_ring())
|
|
2092
|
+
return amb.subscheme([phi(g) for g in self.defining_polynomials()])
|