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,1301 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-categories
|
|
2
|
+
r"""
|
|
3
|
+
Products of projective spaces
|
|
4
|
+
|
|
5
|
+
This class builds on the projective space class and its point and morphism
|
|
6
|
+
classes.
|
|
7
|
+
|
|
8
|
+
Products of projective spaces of varying dimension are convenient ambient
|
|
9
|
+
spaces for complete intersections.
|
|
10
|
+
|
|
11
|
+
Group actions on them, and the interplay with representation theory, provide
|
|
12
|
+
many interesting examples of algebraic varieties.
|
|
13
|
+
|
|
14
|
+
EXAMPLES:
|
|
15
|
+
|
|
16
|
+
We construct products projective spaces of various dimensions over the same ring::
|
|
17
|
+
|
|
18
|
+
sage: P1 = ProjectiveSpace(ZZ, 1, 'x')
|
|
19
|
+
sage: P2 = ProjectiveSpace(ZZ, 2, 'y')
|
|
20
|
+
sage: ProductProjectiveSpaces([P1, P2])
|
|
21
|
+
Product of projective spaces P^1 x P^2 over Integer Ring
|
|
22
|
+
|
|
23
|
+
We can also construct the product by specifying the dimensions and the base ring::
|
|
24
|
+
|
|
25
|
+
sage: ProductProjectiveSpaces([1, 2, 3], QQ, 'z')
|
|
26
|
+
Product of projective spaces P^1 x P^2 x P^3 over Rational Field
|
|
27
|
+
|
|
28
|
+
sage: P2xP2 = ProductProjectiveSpaces([2, 2], QQ, names=['x', 'y'])
|
|
29
|
+
sage: P2xP2.coordinate_ring().inject_variables()
|
|
30
|
+
Defining x0, x1, x2, y0, y1, y2
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
#*****************************************************************************
|
|
34
|
+
# Copyright (C) 2014 Volker Braun <vbraun.name@gmail.com>
|
|
35
|
+
# Copyright (C) 2014 Ben Hutz <bn4941@gmail.com>
|
|
36
|
+
#
|
|
37
|
+
# This program is free software: you can redistribute it and/or modify
|
|
38
|
+
# it under the terms of the GNU General Public License as published by
|
|
39
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
40
|
+
# (at your option) any later version.
|
|
41
|
+
# http://www.gnu.org/licenses/
|
|
42
|
+
#*****************************************************************************
|
|
43
|
+
|
|
44
|
+
from sage.misc.cachefunc import cached_method
|
|
45
|
+
from sage.misc.misc_c import prod
|
|
46
|
+
from sage.rings.integer import Integer
|
|
47
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
48
|
+
from sage.rings.rational_field import QQ
|
|
49
|
+
from sage.rings.finite_rings.finite_field_base import FiniteField
|
|
50
|
+
from sage.categories.fields import Fields
|
|
51
|
+
from sage.categories.commutative_rings import CommutativeRings
|
|
52
|
+
from sage.rings.polynomial.polydict import ETuple
|
|
53
|
+
from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme
|
|
54
|
+
from sage.schemes.generic.ambient_space import AmbientSpace
|
|
55
|
+
from sage.schemes.projective.projective_space import ProjectiveSpace, ProjectiveSpace_ring
|
|
56
|
+
from sage.schemes.product_projective.homset import (SchemeHomset_points_product_projective_spaces_ring,
|
|
57
|
+
SchemeHomset_points_product_projective_spaces_field)
|
|
58
|
+
from sage.schemes.product_projective.point import (ProductProjectiveSpaces_point_ring,
|
|
59
|
+
ProductProjectiveSpaces_point_field,
|
|
60
|
+
ProductProjectiveSpaces_point_finite_field)
|
|
61
|
+
from sage.schemes.product_projective.morphism import ProductProjectiveSpaces_morphism_ring
|
|
62
|
+
from sage.schemes.product_projective.subscheme import AlgebraicScheme_subscheme_product_projective
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def is_ProductProjectiveSpaces(x):
|
|
66
|
+
r"""
|
|
67
|
+
Return ``True`` if ``x`` is a product of projective spaces.
|
|
68
|
+
|
|
69
|
+
This is an ambient space defined by `\mathbb{P}^n_R \times \cdots \times \mathbb{P}^m_R`,
|
|
70
|
+
where `R` is a ring and `n,\ldots, m\geq 0` are integers.
|
|
71
|
+
|
|
72
|
+
OUTPUT: boolean
|
|
73
|
+
|
|
74
|
+
EXAMPLES::
|
|
75
|
+
|
|
76
|
+
sage: is_ProductProjectiveSpaces(ProjectiveSpace(5, names='x'))
|
|
77
|
+
doctest:warning...
|
|
78
|
+
DeprecationWarning: The function is_ProductProjectiveSpaces is deprecated; use 'isinstance(..., ProductProjectiveSpaces_ring)' instead.
|
|
79
|
+
See https://github.com/sagemath/sage/issues/38022 for details.
|
|
80
|
+
False
|
|
81
|
+
sage: is_ProductProjectiveSpaces(ProductProjectiveSpaces([1, 2, 3], ZZ, 'x'))
|
|
82
|
+
True
|
|
83
|
+
"""
|
|
84
|
+
from sage.misc.superseded import deprecation
|
|
85
|
+
deprecation(38022, "The function is_ProductProjectiveSpaces is deprecated; use 'isinstance(..., ProductProjectiveSpaces_ring)' instead.")
|
|
86
|
+
return isinstance(x, ProductProjectiveSpaces_ring)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def ProductProjectiveSpaces(n, R=None, names='x'):
|
|
90
|
+
r"""
|
|
91
|
+
Return the Cartesian product of projective spaces.
|
|
92
|
+
|
|
93
|
+
The input ``n`` is either a list of projective space over the same base
|
|
94
|
+
ring or the list of dimensions, ``R`` the base ring, and ``names`` the
|
|
95
|
+
variable names.
|
|
96
|
+
|
|
97
|
+
INPUT:
|
|
98
|
+
|
|
99
|
+
- ``n`` -- list of integers or a list of projective spaces
|
|
100
|
+
|
|
101
|
+
- ``R`` -- a ring
|
|
102
|
+
|
|
103
|
+
- ``names`` -- string or list of strings
|
|
104
|
+
|
|
105
|
+
EXAMPLES::
|
|
106
|
+
|
|
107
|
+
sage: P1 = ProjectiveSpace(QQ, 2, 'x')
|
|
108
|
+
sage: P2 = ProjectiveSpace(QQ, 3, 'y')
|
|
109
|
+
sage: ProductProjectiveSpaces([P1, P2])
|
|
110
|
+
Product of projective spaces P^2 x P^3 over Rational Field
|
|
111
|
+
|
|
112
|
+
::
|
|
113
|
+
|
|
114
|
+
sage: ProductProjectiveSpaces([2, 2], GF(7), 'y')
|
|
115
|
+
Product of projective spaces P^2 x P^2 over Finite Field of size 7
|
|
116
|
+
|
|
117
|
+
::
|
|
118
|
+
|
|
119
|
+
sage: P1 = ProjectiveSpace(ZZ, 2, 'x')
|
|
120
|
+
sage: P2 = ProjectiveSpace(QQ, 3, 'y')
|
|
121
|
+
sage: ProductProjectiveSpaces([P1, P2])
|
|
122
|
+
Traceback (most recent call last):
|
|
123
|
+
...
|
|
124
|
+
AttributeError: components must be over the same base ring
|
|
125
|
+
"""
|
|
126
|
+
if isinstance(R, (list, tuple)):
|
|
127
|
+
n, R = R, n
|
|
128
|
+
if not isinstance(n, (tuple, list)):
|
|
129
|
+
raise TypeError("must be a list of dimensions")
|
|
130
|
+
if R is None:
|
|
131
|
+
R = QQ # default is the rationals
|
|
132
|
+
if isinstance(n[0], ProjectiveSpace_ring):
|
|
133
|
+
# this should be a list of projective spaces
|
|
134
|
+
names = []
|
|
135
|
+
N = []
|
|
136
|
+
R = None
|
|
137
|
+
for PS in n:
|
|
138
|
+
if not isinstance(PS,ProjectiveSpace_ring):
|
|
139
|
+
raise TypeError("must be a list of projective spaces or (dimensions, base ring, names)")
|
|
140
|
+
if R is None:
|
|
141
|
+
R = PS.base_ring()
|
|
142
|
+
elif R != PS.base_ring():
|
|
143
|
+
raise AttributeError("components must be over the same base ring")
|
|
144
|
+
N.append(PS.dimension_relative())
|
|
145
|
+
names += PS.variable_names()
|
|
146
|
+
if isinstance(R, FiniteField):
|
|
147
|
+
X = ProductProjectiveSpaces_finite_field(N, R, names)
|
|
148
|
+
elif R in Fields():
|
|
149
|
+
X = ProductProjectiveSpaces_field(N, R, names)
|
|
150
|
+
else:
|
|
151
|
+
X = ProductProjectiveSpaces_ring(N, R, names)
|
|
152
|
+
X._components = n
|
|
153
|
+
else:
|
|
154
|
+
if not isinstance(n,(list, tuple)):
|
|
155
|
+
raise ValueError("need list or tuple of dimensions")
|
|
156
|
+
if R not in CommutativeRings():
|
|
157
|
+
raise ValueError("must be a commutative ring")
|
|
158
|
+
from sage.structure.category_object import normalize_names
|
|
159
|
+
n_vars = sum(d + 1 for d in n)
|
|
160
|
+
if isinstance(names, str):
|
|
161
|
+
names = normalize_names(n_vars, names)
|
|
162
|
+
else:
|
|
163
|
+
name_list = list(names)
|
|
164
|
+
if len(name_list) == len(n):
|
|
165
|
+
names = []
|
|
166
|
+
for name, dim in zip(name_list, n):
|
|
167
|
+
names += normalize_names(dim + 1, name)
|
|
168
|
+
else:
|
|
169
|
+
n_vars = sum(1+d for d in n)
|
|
170
|
+
names = normalize_names(n_vars, name_list)
|
|
171
|
+
if isinstance(R, FiniteField):
|
|
172
|
+
X = ProductProjectiveSpaces_finite_field(n, R, names)
|
|
173
|
+
elif R in Fields():
|
|
174
|
+
X = ProductProjectiveSpaces_field(n, R, names)
|
|
175
|
+
else:
|
|
176
|
+
X = ProductProjectiveSpaces_ring(n, R, names)
|
|
177
|
+
return X
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class ProductProjectiveSpaces_ring(AmbientSpace):
|
|
181
|
+
r"""
|
|
182
|
+
Cartesian product of projective spaces `\mathbb{P}^{n_1} \times \cdots \times \mathbb{P}^{n_r}`.
|
|
183
|
+
|
|
184
|
+
EXAMPLES::
|
|
185
|
+
|
|
186
|
+
sage: P.<x0,x1,x2,x3,x4> = ProductProjectiveSpaces([1, 2], QQ); P
|
|
187
|
+
Product of projective spaces P^1 x P^2 over Rational Field
|
|
188
|
+
sage: P.coordinate_ring()
|
|
189
|
+
Multivariate Polynomial Ring in x0, x1, x2, x3, x4 over Rational Field
|
|
190
|
+
sage: P[0]
|
|
191
|
+
Projective Space of dimension 1 over Rational Field
|
|
192
|
+
sage: P[1]
|
|
193
|
+
Projective Space of dimension 2 over Rational Field
|
|
194
|
+
sage: Q = P(6, 3, 2, 2, 2); Q
|
|
195
|
+
(2 : 1 , 1 : 1 : 1)
|
|
196
|
+
sage: Q[0]
|
|
197
|
+
(2 : 1)
|
|
198
|
+
sage: H = Hom(P,P)
|
|
199
|
+
sage: f = H([x0^2*x3, x2*x1^2, x2^2, 2*x3^2, x4^2])
|
|
200
|
+
sage: f(Q)
|
|
201
|
+
(4 : 1 , 1 : 2 : 1)
|
|
202
|
+
"""
|
|
203
|
+
def __init__(self, N, R=QQ, names=None):
|
|
204
|
+
r"""
|
|
205
|
+
The Python constructor.
|
|
206
|
+
|
|
207
|
+
INPUT:
|
|
208
|
+
|
|
209
|
+
- ``N`` -- list or tuple of positive integers
|
|
210
|
+
|
|
211
|
+
- ``R`` -- a ring
|
|
212
|
+
|
|
213
|
+
- ``names`` -- tuple or list of strings; this must either be a single
|
|
214
|
+
variable name or the complete list of variables
|
|
215
|
+
|
|
216
|
+
EXAMPLES::
|
|
217
|
+
|
|
218
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
|
|
219
|
+
sage: T
|
|
220
|
+
Product of projective spaces P^2 x P^2 over Rational Field
|
|
221
|
+
sage: T.coordinate_ring()
|
|
222
|
+
Multivariate Polynomial Ring in x, y, z, u, v, w over Rational Field
|
|
223
|
+
sage: T[1].coordinate_ring()
|
|
224
|
+
Multivariate Polynomial Ring in u, v, w over Rational Field
|
|
225
|
+
|
|
226
|
+
::
|
|
227
|
+
|
|
228
|
+
sage: ProductProjectiveSpaces([1,1,1],ZZ, ['x', 'y', 'z', 'u', 'v', 'w'])
|
|
229
|
+
Product of projective spaces P^1 x P^1 x P^1 over Integer Ring
|
|
230
|
+
|
|
231
|
+
::
|
|
232
|
+
|
|
233
|
+
sage: T = ProductProjectiveSpaces([1, 1], QQ, 'z')
|
|
234
|
+
sage: T.coordinate_ring()
|
|
235
|
+
Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
|
|
236
|
+
"""
|
|
237
|
+
assert isinstance(N, (tuple, list))
|
|
238
|
+
N = [Integer(n) for n in N]
|
|
239
|
+
assert R in CommutativeRings()
|
|
240
|
+
if len(N) < 2:
|
|
241
|
+
raise ValueError("must be at least two components for a product")
|
|
242
|
+
AmbientSpace.__init__(self, sum(N), R)
|
|
243
|
+
self._dims = N
|
|
244
|
+
start = 0
|
|
245
|
+
self._components = []
|
|
246
|
+
for i in range(len(N)):
|
|
247
|
+
self._components.append(ProjectiveSpace(N[i],R,names[start:start+N[i]+1]))
|
|
248
|
+
start += N[i]+1
|
|
249
|
+
# Note that the coordinate ring should really be the tensor product of
|
|
250
|
+
# the component coordinate rings. But we just deal with them as
|
|
251
|
+
# multihomogeneous polynomial rings.
|
|
252
|
+
self._coordinate_ring = PolynomialRing(R,sum(N) + len(N),names)
|
|
253
|
+
self._assign_names(names)
|
|
254
|
+
|
|
255
|
+
def _repr_(self):
|
|
256
|
+
r"""
|
|
257
|
+
Return a string representation of this space.
|
|
258
|
+
|
|
259
|
+
EXAMPLES::
|
|
260
|
+
|
|
261
|
+
sage: ProductProjectiveSpaces([1, 1, 1], ZZ, ['x', 'y', 'z', 'u', 'v', 'w'])
|
|
262
|
+
Product of projective spaces P^1 x P^1 x P^1 over Integer Ring
|
|
263
|
+
"""
|
|
264
|
+
return ''.join(['Product of projective spaces ',
|
|
265
|
+
' x '.join('P^{}'.format(d) for d in self._dims),
|
|
266
|
+
' over ', str(self.base_ring())])
|
|
267
|
+
|
|
268
|
+
def _repr_generic_point(self, v=None):
|
|
269
|
+
"""
|
|
270
|
+
Return a string representation of the generic point
|
|
271
|
+
on this product space.
|
|
272
|
+
|
|
273
|
+
If ``v`` is ``None``, the representation of the generic point of
|
|
274
|
+
the product space is returned.
|
|
275
|
+
|
|
276
|
+
EXAMPLES::
|
|
277
|
+
|
|
278
|
+
sage: T = ProductProjectiveSpaces([1, 2, 1], QQ, 'x')
|
|
279
|
+
sage: T._repr_generic_point()
|
|
280
|
+
'(x0 : x1 , x2 : x3 : x4 , x5 : x6)'
|
|
281
|
+
"""
|
|
282
|
+
if v is None:
|
|
283
|
+
v = list(self.gens())
|
|
284
|
+
else:
|
|
285
|
+
v = list(v)
|
|
286
|
+
splitv = self._factors(v)
|
|
287
|
+
return '(%s)' % (" , ".join((" : ".join(str(t) for t in P))
|
|
288
|
+
for P in splitv))
|
|
289
|
+
|
|
290
|
+
def _latex_(self):
|
|
291
|
+
r"""
|
|
292
|
+
Return a LaTeX representation of this product space.
|
|
293
|
+
|
|
294
|
+
EXAMPLES::
|
|
295
|
+
|
|
296
|
+
sage: latex(ProductProjectiveSpaces([1, 2, 3], ZZ, 'x'))
|
|
297
|
+
{\mathbf P}_{\Bold{Z}}^{1} \times {\mathbf P}_{\Bold{Z}}^{2} \times
|
|
298
|
+
{\mathbf P}_{\Bold{Z}}^{3}
|
|
299
|
+
"""
|
|
300
|
+
return " \\times ".join(PS._latex_() for PS in self)
|
|
301
|
+
|
|
302
|
+
def _latex_generic_point(self, v=None):
|
|
303
|
+
"""
|
|
304
|
+
Return a LaTeX representation of the generic point
|
|
305
|
+
on this product space.
|
|
306
|
+
|
|
307
|
+
EXAMPLES::
|
|
308
|
+
|
|
309
|
+
sage: T = ProductProjectiveSpaces([1, 2, 3], ZZ, 'x')
|
|
310
|
+
sage: T._latex_generic_point()
|
|
311
|
+
'\\left(x_{0} : x_{1} , x_{2} : x_{3} : x_{4} , x_{5} : x_{6} : x_{7} : x_{8}\\right)'
|
|
312
|
+
"""
|
|
313
|
+
if v is None:
|
|
314
|
+
v = list(self.gens())
|
|
315
|
+
else:
|
|
316
|
+
v = list(v)
|
|
317
|
+
splitv = self._factors(v)
|
|
318
|
+
return '\\left(%s\\right)' % (" , ".join((" : ".join(t._latex_() for t in P)) for P in splitv))
|
|
319
|
+
|
|
320
|
+
def __getitem__(self, i):
|
|
321
|
+
r"""
|
|
322
|
+
Return the `i`-th component of the product.
|
|
323
|
+
|
|
324
|
+
INPUT:
|
|
325
|
+
|
|
326
|
+
- ``i`` -- positive integer
|
|
327
|
+
|
|
328
|
+
OUTPUT: a projective space
|
|
329
|
+
|
|
330
|
+
EXAMPLES::
|
|
331
|
+
|
|
332
|
+
sage: T.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
333
|
+
sage: T[0]
|
|
334
|
+
Projective Space of dimension 3 over Rational Field
|
|
335
|
+
"""
|
|
336
|
+
return self._components[i]
|
|
337
|
+
|
|
338
|
+
def __eq__(self, right):
|
|
339
|
+
r"""
|
|
340
|
+
Check equality of two products of projective spaces.
|
|
341
|
+
|
|
342
|
+
INPUT:
|
|
343
|
+
|
|
344
|
+
- ``right`` -- a product of projective spaces
|
|
345
|
+
|
|
346
|
+
OUTPUT: boolean
|
|
347
|
+
|
|
348
|
+
EXAMPLES::
|
|
349
|
+
|
|
350
|
+
sage: S.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
351
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
|
|
352
|
+
sage: S == T
|
|
353
|
+
False
|
|
354
|
+
"""
|
|
355
|
+
if not isinstance(right, ProductProjectiveSpaces_ring):
|
|
356
|
+
return False
|
|
357
|
+
else:
|
|
358
|
+
return self._components == right._components
|
|
359
|
+
|
|
360
|
+
def __ne__(self, other):
|
|
361
|
+
"""
|
|
362
|
+
Check non-equality of two products of projective spaces.
|
|
363
|
+
|
|
364
|
+
INPUT:
|
|
365
|
+
|
|
366
|
+
- ``other`` -- a product of projective spaces
|
|
367
|
+
|
|
368
|
+
OUTPUT: boolean
|
|
369
|
+
|
|
370
|
+
EXAMPLES::
|
|
371
|
+
|
|
372
|
+
sage: S.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
373
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
|
|
374
|
+
sage: S != T
|
|
375
|
+
True
|
|
376
|
+
"""
|
|
377
|
+
return not (self == other)
|
|
378
|
+
|
|
379
|
+
def __hash__(self):
|
|
380
|
+
"""
|
|
381
|
+
Return the hash of ``self``.
|
|
382
|
+
|
|
383
|
+
EXAMPLES::
|
|
384
|
+
|
|
385
|
+
sage: S.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
386
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
|
|
387
|
+
sage: U.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
388
|
+
sage: hash(S) == hash(T)
|
|
389
|
+
False
|
|
390
|
+
sage: hash(S) == hash(U)
|
|
391
|
+
True
|
|
392
|
+
"""
|
|
393
|
+
return hash(tuple(self._components))
|
|
394
|
+
|
|
395
|
+
def __pow__(self, m):
|
|
396
|
+
"""
|
|
397
|
+
Return the Cartesian power of this space.
|
|
398
|
+
|
|
399
|
+
INPUT:
|
|
400
|
+
|
|
401
|
+
- ``m`` -- integer
|
|
402
|
+
|
|
403
|
+
OUTPUT: product of projective spaces
|
|
404
|
+
|
|
405
|
+
EXAMPLES::
|
|
406
|
+
|
|
407
|
+
sage: P1 = ProductProjectiveSpaces([2, 1], QQ, 'x')
|
|
408
|
+
sage: P1^3
|
|
409
|
+
Product of projective spaces P^2 x P^1 x P^2 x P^1 x P^2 x P^1
|
|
410
|
+
over Rational Field
|
|
411
|
+
|
|
412
|
+
As you see, custom variable names are not preserved by power operator,
|
|
413
|
+
since there is no natural way to make new ones in general.
|
|
414
|
+
"""
|
|
415
|
+
mm = int(m)
|
|
416
|
+
if mm != m:
|
|
417
|
+
raise ValueError("m must be an integer")
|
|
418
|
+
return ProductProjectiveSpaces(self.dimension_relative_components()*mm, self.base_ring())
|
|
419
|
+
|
|
420
|
+
def __mul__(self, right):
|
|
421
|
+
r"""
|
|
422
|
+
Create the product of projective spaces.
|
|
423
|
+
|
|
424
|
+
INPUT:
|
|
425
|
+
|
|
426
|
+
- ``right`` -- a projective space, product of projective spaces, or subscheme
|
|
427
|
+
|
|
428
|
+
OUTPUT: a product of projective spaces or subscheme
|
|
429
|
+
|
|
430
|
+
EXAMPLES::
|
|
431
|
+
|
|
432
|
+
sage: S.<t,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
433
|
+
sage: T.<a,b> = ProjectiveSpace(QQ, 1)
|
|
434
|
+
sage: S*T
|
|
435
|
+
Product of projective spaces P^3 x P^2 x P^1 over Rational Field
|
|
436
|
+
|
|
437
|
+
::
|
|
438
|
+
|
|
439
|
+
sage: S = ProductProjectiveSpaces([3, 2], QQ, 'x')
|
|
440
|
+
sage: T = ProductProjectiveSpaces([2, 2], QQ, 'y')
|
|
441
|
+
sage: S*T
|
|
442
|
+
Product of projective spaces P^3 x P^2 x P^2 x P^2 over Rational Field
|
|
443
|
+
|
|
444
|
+
::
|
|
445
|
+
|
|
446
|
+
sage: S = ProductProjectiveSpaces([1, 2, 1], ZZ, 't')
|
|
447
|
+
sage: T = ProductProjectiveSpaces([2, 2], ZZ, 'x')
|
|
448
|
+
sage: T.inject_variables()
|
|
449
|
+
Defining x0, x1, x2, x3, x4, x5
|
|
450
|
+
sage: X = T.subscheme([x0*x4 - x1*x3])
|
|
451
|
+
sage: S*X
|
|
452
|
+
Closed subscheme of Product of projective spaces P^1 x P^2 x P^1 x P^2 x P^2 over Integer Ring defined by:
|
|
453
|
+
-x1*x3 + x0*x4
|
|
454
|
+
|
|
455
|
+
::
|
|
456
|
+
|
|
457
|
+
sage: S = ProductProjectiveSpaces([3, 2], QQ,'x')
|
|
458
|
+
sage: T = AffineSpace(2, QQ, 'y')
|
|
459
|
+
sage: S*T
|
|
460
|
+
Traceback (most recent call last):
|
|
461
|
+
...
|
|
462
|
+
TypeError: Affine Space of dimension 2 over Rational Field must be a projective space,
|
|
463
|
+
product of projective spaces, or subscheme
|
|
464
|
+
"""
|
|
465
|
+
if self is right:
|
|
466
|
+
return self.__pow__(2)
|
|
467
|
+
if isinstance(right, ProductProjectiveSpaces_ring):
|
|
468
|
+
return ProductProjectiveSpaces(self.components() + right.components())
|
|
469
|
+
elif isinstance(right, ProjectiveSpace_ring):
|
|
470
|
+
return ProductProjectiveSpaces(self.components() + [right])
|
|
471
|
+
elif isinstance(right, AlgebraicScheme_subscheme):
|
|
472
|
+
AS = self*right.ambient_space()
|
|
473
|
+
CR = AS.coordinate_ring()
|
|
474
|
+
n = self.ambient_space().coordinate_ring().ngens()
|
|
475
|
+
|
|
476
|
+
phi = self.ambient_space().coordinate_ring().hom(list(CR.gens()[:n]), CR)
|
|
477
|
+
psi = right.ambient_space().coordinate_ring().hom(list(CR.gens()[n:]), CR)
|
|
478
|
+
return AS.subscheme([phi(t) for t in self.defining_polynomials()] + [psi(t) for t in right.defining_polynomials()])
|
|
479
|
+
else:
|
|
480
|
+
raise TypeError('%s must be a projective space, product of projective spaces, or subscheme' % right)
|
|
481
|
+
|
|
482
|
+
def components(self):
|
|
483
|
+
r"""
|
|
484
|
+
Return the components of this product of projective spaces.
|
|
485
|
+
|
|
486
|
+
OUTPUT: list of projective spaces
|
|
487
|
+
|
|
488
|
+
EXAMPLES::
|
|
489
|
+
|
|
490
|
+
sage: P.<x,y,z,u,v> = ProductProjectiveSpaces(QQ, [2, 1])
|
|
491
|
+
sage: P.components()
|
|
492
|
+
[Projective Space of dimension 2 over Rational Field,
|
|
493
|
+
Projective Space of dimension 1 over Rational Field]
|
|
494
|
+
"""
|
|
495
|
+
return self._components
|
|
496
|
+
|
|
497
|
+
def dimension_relative(self):
|
|
498
|
+
r"""
|
|
499
|
+
Return the relative dimension of the product of projective spaces.
|
|
500
|
+
|
|
501
|
+
OUTPUT: a positive integer
|
|
502
|
+
|
|
503
|
+
EXAMPLES::
|
|
504
|
+
|
|
505
|
+
sage: T.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
506
|
+
sage: T.dimension_relative()
|
|
507
|
+
5
|
|
508
|
+
"""
|
|
509
|
+
return sum(self._dims)
|
|
510
|
+
|
|
511
|
+
def dimension_absolute(self):
|
|
512
|
+
r"""
|
|
513
|
+
Return the absolute dimension of the product of projective spaces.
|
|
514
|
+
|
|
515
|
+
OUTPUT: a positive integer
|
|
516
|
+
|
|
517
|
+
EXAMPLES::
|
|
518
|
+
|
|
519
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
|
|
520
|
+
sage: T.dimension_absolute()
|
|
521
|
+
4
|
|
522
|
+
sage: T.dimension()
|
|
523
|
+
4
|
|
524
|
+
"""
|
|
525
|
+
base = self.base_scheme()
|
|
526
|
+
if base.is_noetherian():
|
|
527
|
+
return sum([self[i].dimension_relative() + base.dimension() for i in range(self.num_components())])
|
|
528
|
+
raise NotImplementedError("cannot compute the dimension of this scheme.")
|
|
529
|
+
|
|
530
|
+
dimension = dimension_absolute
|
|
531
|
+
|
|
532
|
+
def dimension_relative_components(self):
|
|
533
|
+
r"""
|
|
534
|
+
Return the relative dimension of the product of projective spaces.
|
|
535
|
+
|
|
536
|
+
OUTPUT: list of positive integers
|
|
537
|
+
|
|
538
|
+
EXAMPLES::
|
|
539
|
+
|
|
540
|
+
sage: T.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
|
|
541
|
+
sage: T.dimension_relative_components()
|
|
542
|
+
[3, 2]
|
|
543
|
+
"""
|
|
544
|
+
return self._dims
|
|
545
|
+
|
|
546
|
+
def dimension_absolute_components(self):
|
|
547
|
+
r"""
|
|
548
|
+
Return the absolute dimension of the product of projective spaces.
|
|
549
|
+
|
|
550
|
+
OUTPUT: list of positive integers
|
|
551
|
+
|
|
552
|
+
EXAMPLES::
|
|
553
|
+
|
|
554
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
|
|
555
|
+
sage: T.dimension_absolute_components()
|
|
556
|
+
[2, 2]
|
|
557
|
+
sage: T.dimension_components()
|
|
558
|
+
[2, 2]
|
|
559
|
+
"""
|
|
560
|
+
base = self.base_scheme()
|
|
561
|
+
if base.is_noetherian():
|
|
562
|
+
return [self[i].dimension_relative() + base.dimension() for i in range(self.num_components())]
|
|
563
|
+
raise NotImplementedError("cannot compute the dimension of this scheme.")
|
|
564
|
+
|
|
565
|
+
dimension_components = dimension_absolute_components
|
|
566
|
+
|
|
567
|
+
def num_components(self):
|
|
568
|
+
r"""
|
|
569
|
+
Return the number of components of this space.
|
|
570
|
+
|
|
571
|
+
OUTPUT: integer
|
|
572
|
+
|
|
573
|
+
EXAMPLES::
|
|
574
|
+
|
|
575
|
+
sage: T = ProductProjectiveSpaces([1, 1, 1], GF(5), 'x')
|
|
576
|
+
sage: T.num_components()
|
|
577
|
+
3
|
|
578
|
+
"""
|
|
579
|
+
return len(self._components)
|
|
580
|
+
|
|
581
|
+
def ngens(self):
|
|
582
|
+
r"""
|
|
583
|
+
Return the number of generators of this space.
|
|
584
|
+
|
|
585
|
+
This is the number of variables in the coordinate ring of the
|
|
586
|
+
projective space.
|
|
587
|
+
|
|
588
|
+
OUTPUT: integer
|
|
589
|
+
|
|
590
|
+
EXAMPLES::
|
|
591
|
+
|
|
592
|
+
sage: T = ProductProjectiveSpaces([1, 1, 1], GF(5), 'x')
|
|
593
|
+
sage: T.ngens()
|
|
594
|
+
6
|
|
595
|
+
"""
|
|
596
|
+
return sum([P.ngens() for P in self._components])
|
|
597
|
+
|
|
598
|
+
def _factors(self, v):
|
|
599
|
+
r"""
|
|
600
|
+
Return the tuple/list ``v`` split into the components of this space.
|
|
601
|
+
|
|
602
|
+
INPUT:
|
|
603
|
+
|
|
604
|
+
- ``v`` -- list or tuple
|
|
605
|
+
|
|
606
|
+
OUTPUT: list of lists
|
|
607
|
+
|
|
608
|
+
EXAMPLES::
|
|
609
|
+
|
|
610
|
+
sage: T = ProductProjectiveSpaces([1, 1, 1], QQ, 'x')
|
|
611
|
+
sage: T._factors([1, 2, 3, 4, 5, 6])
|
|
612
|
+
[[1, 2], [3, 4], [5, 6]]
|
|
613
|
+
"""
|
|
614
|
+
if not isinstance(v, (list, tuple, ETuple)):
|
|
615
|
+
raise TypeError("%s, must be a list or tuple" % v)
|
|
616
|
+
if len(v) != self.ngens():
|
|
617
|
+
raise ValueError("%s must have %s elements" % (v, self.ngens()))
|
|
618
|
+
index = 0
|
|
619
|
+
splitv = []
|
|
620
|
+
dims = self._dims
|
|
621
|
+
for i in range(len(dims)):
|
|
622
|
+
splitv.append(v[index:index+dims[i]+1])
|
|
623
|
+
index += dims[i]+1
|
|
624
|
+
return splitv
|
|
625
|
+
|
|
626
|
+
def _degree(self, polynomial):
|
|
627
|
+
r"""
|
|
628
|
+
Return the homogeneous degrees.
|
|
629
|
+
|
|
630
|
+
INPUT:
|
|
631
|
+
|
|
632
|
+
- ``polynomial`` -- a polynomial in the coordinate_ring
|
|
633
|
+
|
|
634
|
+
OUTPUT: a tuple of integers, one for each projective space component. A
|
|
635
|
+
:exc:`ValueError` is raised if the polynomial is not multihomogeneous.
|
|
636
|
+
|
|
637
|
+
EXAMPLES::
|
|
638
|
+
|
|
639
|
+
sage: P1xP1.<x,y,s,t> = ProductProjectiveSpaces([1, 1], QQ)
|
|
640
|
+
sage: P1xP1._degree(x^2*t + y^2*s)
|
|
641
|
+
[2, 1]
|
|
642
|
+
sage: P1xP1._degree(x + s)
|
|
643
|
+
Traceback (most recent call last):
|
|
644
|
+
...
|
|
645
|
+
ValueError: polynomial is not multi-homogeneous
|
|
646
|
+
"""
|
|
647
|
+
E = polynomial.exponents()
|
|
648
|
+
if not E:
|
|
649
|
+
return []
|
|
650
|
+
d = [sum(t) for t in self._factors(E[0])]
|
|
651
|
+
for k in range(len(E)):
|
|
652
|
+
if d != [sum(t) for t in self._factors(E[k])]:
|
|
653
|
+
raise ValueError("polynomial is not multi-homogeneous")
|
|
654
|
+
return d
|
|
655
|
+
|
|
656
|
+
def _point(self, *args, **kwds):
|
|
657
|
+
"""
|
|
658
|
+
Construct a point.
|
|
659
|
+
|
|
660
|
+
For internal use only. See :mod:`morphism` for details.
|
|
661
|
+
|
|
662
|
+
EXAMPLES::
|
|
663
|
+
|
|
664
|
+
sage: P = ProductProjectiveSpaces([1, 1], QQ, 'z')
|
|
665
|
+
sage: point_homset = P._point_homset(Spec(QQ), P)
|
|
666
|
+
sage: P._point(point_homset, [2, 2, 1, 1])
|
|
667
|
+
(1 : 1 , 1 : 1)
|
|
668
|
+
"""
|
|
669
|
+
return ProductProjectiveSpaces_point_ring(*args, **kwds)
|
|
670
|
+
|
|
671
|
+
def _morphism(self, *args, **kwds):
|
|
672
|
+
"""
|
|
673
|
+
Construct a morphism.
|
|
674
|
+
|
|
675
|
+
For internal use only. See :mod:`morphism` for details.
|
|
676
|
+
|
|
677
|
+
EXAMPLES::
|
|
678
|
+
|
|
679
|
+
sage: P.<x,y,z,w> = ProductProjectiveSpaces([1, 1], QQ)
|
|
680
|
+
sage: P._morphism(P.Hom(P), [x, y, z, w])
|
|
681
|
+
Scheme endomorphism of Product of projective spaces P^1 x P^1 over Rational Field
|
|
682
|
+
Defn: Defined by sending (x : y , z : w) to
|
|
683
|
+
(x : y , z : w).
|
|
684
|
+
"""
|
|
685
|
+
return ProductProjectiveSpaces_morphism_ring(*args, **kwds)
|
|
686
|
+
|
|
687
|
+
def _point_homset(self, *args, **kwds):
|
|
688
|
+
"""
|
|
689
|
+
Construct a point Hom-set.
|
|
690
|
+
|
|
691
|
+
For internal use only. See :mod:`morphism` for details.
|
|
692
|
+
|
|
693
|
+
EXAMPLES::
|
|
694
|
+
|
|
695
|
+
sage: P.<x,y,z,w> = ProductProjectiveSpaces([1,1], ZZ)
|
|
696
|
+
sage: P._point_homset(Spec(ZZ), P)
|
|
697
|
+
Set of rational points of Product of projective spaces P^1 x P^1 over
|
|
698
|
+
Integer Ring
|
|
699
|
+
"""
|
|
700
|
+
return SchemeHomset_points_product_projective_spaces_ring(*args, **kwds)
|
|
701
|
+
|
|
702
|
+
def _validate(self, polynomials):
|
|
703
|
+
r"""
|
|
704
|
+
If ``polynomials`` is a tuple of valid polynomial functions on this space,
|
|
705
|
+
return ``polynomials``, otherwise raise a :exc:`TypeError`.
|
|
706
|
+
|
|
707
|
+
Since this is a product of projective spaces, the polynomials must be multi-homogeneous.
|
|
708
|
+
|
|
709
|
+
INPUT:
|
|
710
|
+
|
|
711
|
+
- ``polynomials`` -- tuple of polynomials in the coordinate ring of
|
|
712
|
+
this projective space
|
|
713
|
+
|
|
714
|
+
OUTPUT: tuple of polynomials in the coordinate ring of this space
|
|
715
|
+
|
|
716
|
+
EXAMPLES::
|
|
717
|
+
|
|
718
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], QQ)
|
|
719
|
+
sage: T._validate([x^2*u, y^2*w, z^2*u, w^2, u^2])
|
|
720
|
+
[x^2*u, y^2*w, z^2*u, w^2, u^2]
|
|
721
|
+
|
|
722
|
+
::
|
|
723
|
+
|
|
724
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], QQ)
|
|
725
|
+
sage: T._validate([x^2+w^2, y^2*w, z^2*u, w^2, u^2])
|
|
726
|
+
Traceback (most recent call last):
|
|
727
|
+
...
|
|
728
|
+
ValueError: polynomial is not multi-homogeneous
|
|
729
|
+
|
|
730
|
+
::
|
|
731
|
+
|
|
732
|
+
sage: R.<t> = PolynomialRing(GF(5))
|
|
733
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], QQ)
|
|
734
|
+
sage: T._validate([t, t, t, w^2, u^2])
|
|
735
|
+
Traceback (most recent call last):
|
|
736
|
+
...
|
|
737
|
+
TypeError: polynomials (=[t, t, t, w^2, u^2]) must be elements of Multivariate
|
|
738
|
+
Polynomial Ring in x, y, z, w, u over Rational Field
|
|
739
|
+
"""
|
|
740
|
+
if not isinstance(polynomials, (list, tuple)):
|
|
741
|
+
raise TypeError('the argument polynomials=%s must be a list or tuple' % polynomials)
|
|
742
|
+
#check in the coordinate ring
|
|
743
|
+
source_ring = self.coordinate_ring()
|
|
744
|
+
try:
|
|
745
|
+
polynomials = [source_ring(poly) for poly in polynomials]
|
|
746
|
+
except TypeError:
|
|
747
|
+
raise TypeError("polynomials (=%s) must be elements of %s" % (polynomials,source_ring))
|
|
748
|
+
for f in polynomials:
|
|
749
|
+
self._degree(f) # raises a ValueError if not multi-homogeneous
|
|
750
|
+
return polynomials
|
|
751
|
+
|
|
752
|
+
def _check_satisfies_equations(self, v):
|
|
753
|
+
"""
|
|
754
|
+
Return ``True`` if ``v`` defines a point on the scheme this space;
|
|
755
|
+
raise a :exc:`TypeError` otherwise.
|
|
756
|
+
|
|
757
|
+
EXAMPLES::
|
|
758
|
+
|
|
759
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], QQ)
|
|
760
|
+
sage: T._check_satisfies_equations([0, 1, 1, 1, 1])
|
|
761
|
+
True
|
|
762
|
+
|
|
763
|
+
::
|
|
764
|
+
|
|
765
|
+
sage: R.<t> = PolynomialRing(GF(7))
|
|
766
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], R)
|
|
767
|
+
sage: T._check_satisfies_equations([1 + t, 1, 0, 0, 1])
|
|
768
|
+
True
|
|
769
|
+
|
|
770
|
+
::
|
|
771
|
+
|
|
772
|
+
sage: T.<x,y,z,w,u> = ProductProjectiveSpaces([2, 1], ZZ)
|
|
773
|
+
sage: T._check_satisfies_equations([1, 1, 1, 0, 0])
|
|
774
|
+
Traceback (most recent call last):
|
|
775
|
+
...
|
|
776
|
+
TypeError: the zero vector is not a point in projective space
|
|
777
|
+
|
|
778
|
+
::
|
|
779
|
+
|
|
780
|
+
sage: T.<x,y,z,w> = ProductProjectiveSpaces([1, 1], ZZ)
|
|
781
|
+
sage: T._check_satisfies_equations([1, 1, 1, 0, 0])
|
|
782
|
+
Traceback (most recent call last):
|
|
783
|
+
...
|
|
784
|
+
TypeError: the list v=[1, 1, 1, 0, 0] must have 4 components
|
|
785
|
+
|
|
786
|
+
::
|
|
787
|
+
|
|
788
|
+
sage: T.<x,y,z,w> = ProductProjectiveSpaces([1, 1], ZZ)
|
|
789
|
+
sage: T._check_satisfies_equations([1, 1/2, 1, 0])
|
|
790
|
+
Traceback (most recent call last):
|
|
791
|
+
...
|
|
792
|
+
TypeError: the components of v=[1, 1/2, 1, 0] must be elements of Integer Ring
|
|
793
|
+
"""
|
|
794
|
+
if not isinstance(v, (list, tuple)):
|
|
795
|
+
raise TypeError('the argument v=%s must be a list or tuple' % v)
|
|
796
|
+
n = self.ngens()
|
|
797
|
+
if not len(v) == n:
|
|
798
|
+
raise TypeError('the list v=%s must have %s components' % (v, n))
|
|
799
|
+
R = self.base_ring()
|
|
800
|
+
try:
|
|
801
|
+
n = [R(w) for w in v]
|
|
802
|
+
except TypeError:
|
|
803
|
+
raise TypeError('the components of v=%s must be elements of %s' % (v, R))
|
|
804
|
+
#check if any of the component points are 0
|
|
805
|
+
N = self._dims
|
|
806
|
+
start = 0
|
|
807
|
+
for i in range(len(N)):
|
|
808
|
+
if v[start:start + N[i]+1] == [R(0)]*(N[i]+1):
|
|
809
|
+
raise TypeError('the zero vector is not a point in projective space')
|
|
810
|
+
start += N[i]+1
|
|
811
|
+
return True
|
|
812
|
+
|
|
813
|
+
def _an_element_(self):
|
|
814
|
+
r"""
|
|
815
|
+
Return a (preferably typical) element of this space.
|
|
816
|
+
|
|
817
|
+
This is used both for illustration and testing purposes.
|
|
818
|
+
|
|
819
|
+
OUTPUT: a point in the this projective space
|
|
820
|
+
|
|
821
|
+
EXAMPLES::
|
|
822
|
+
|
|
823
|
+
sage: ProductProjectiveSpaces([1, 2, 3], ZZ).an_element()
|
|
824
|
+
(7 : 1 , 7 : 6 : 1 , 7 : 6 : 5 : 1)
|
|
825
|
+
sage: ProductProjectiveSpaces([3, 2, 1], PolynomialRing(ZZ, 'y')).an_element()
|
|
826
|
+
(7*y : 6*y : 5*y : 1 , 7*y : 6*y : 1 , 7*y : 1)
|
|
827
|
+
"""
|
|
828
|
+
v = [R.an_element() for R in self._components]
|
|
829
|
+
return self(v)
|
|
830
|
+
|
|
831
|
+
def subscheme(self, X):
|
|
832
|
+
r"""
|
|
833
|
+
Return the closed subscheme defined by ``X``.
|
|
834
|
+
|
|
835
|
+
INPUT:
|
|
836
|
+
|
|
837
|
+
- ``X`` -- list or tuple of equations
|
|
838
|
+
|
|
839
|
+
OUTPUT: :class:`AlgebraicScheme_subscheme_projective_cartesian_product`
|
|
840
|
+
|
|
841
|
+
EXAMPLES::
|
|
842
|
+
|
|
843
|
+
sage: P.<x,y,z,w> = ProductProjectiveSpaces([1, 1], GF(5))
|
|
844
|
+
sage: X = P.subscheme([x - y, z - w]); X
|
|
845
|
+
Closed subscheme of Product of projective spaces P^1 x P^1
|
|
846
|
+
over Finite Field of size 5 defined by:
|
|
847
|
+
x - y,
|
|
848
|
+
z - w
|
|
849
|
+
sage: X.defining_polynomials()
|
|
850
|
+
[x - y, z - w]
|
|
851
|
+
sage: I = X.defining_ideal(); I
|
|
852
|
+
Ideal (x - y, z - w) of Multivariate Polynomial Ring in x, y, z, w
|
|
853
|
+
over Finite Field of size 5
|
|
854
|
+
sage: X.dimension() # needs sage.libs.singular
|
|
855
|
+
0
|
|
856
|
+
sage: X.base_ring()
|
|
857
|
+
Finite Field of size 5
|
|
858
|
+
sage: X.base_scheme()
|
|
859
|
+
Spectrum of Finite Field of size 5
|
|
860
|
+
sage: X.structure_morphism()
|
|
861
|
+
Scheme morphism:
|
|
862
|
+
From: Closed subscheme of Product of projective spaces P^1 x P^1
|
|
863
|
+
over Finite Field of size 5 defined by: x - y, z - w
|
|
864
|
+
To: Spectrum of Finite Field of size 5
|
|
865
|
+
Defn: Structure map
|
|
866
|
+
"""
|
|
867
|
+
return AlgebraicScheme_subscheme_product_projective(self, X)
|
|
868
|
+
|
|
869
|
+
def change_ring(self, R):
|
|
870
|
+
r"""
|
|
871
|
+
Return a product of projective spaces over a ring ``R`` and otherwise
|
|
872
|
+
the same as this projective space.
|
|
873
|
+
|
|
874
|
+
INPUT:
|
|
875
|
+
|
|
876
|
+
- ``R`` -- commutative ring or morphism
|
|
877
|
+
|
|
878
|
+
OUTPUT: product of projective spaces over ``R``
|
|
879
|
+
|
|
880
|
+
.. NOTE::
|
|
881
|
+
|
|
882
|
+
There is no need to have any relation between ``R`` and the base ring
|
|
883
|
+
of this space, if you want to have such a relation, use
|
|
884
|
+
``self.base_extend(R)`` instead.
|
|
885
|
+
|
|
886
|
+
EXAMPLES::
|
|
887
|
+
|
|
888
|
+
sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
|
|
889
|
+
sage: T.change_ring(GF(17))
|
|
890
|
+
Product of projective spaces P^2 x P^2 over Finite Field of size 17
|
|
891
|
+
"""
|
|
892
|
+
new_components = [P.change_ring(R) for P in self._components]
|
|
893
|
+
return ProductProjectiveSpaces(new_components)
|
|
894
|
+
|
|
895
|
+
def affine_patch(self, I, return_embedding=False):
|
|
896
|
+
r"""
|
|
897
|
+
Return the `I`-th affine patch of this projective space product
|
|
898
|
+
where ``I`` is a multi-index.
|
|
899
|
+
|
|
900
|
+
INPUT:
|
|
901
|
+
|
|
902
|
+
- ``I`` -- list or tuple of positive integers
|
|
903
|
+
|
|
904
|
+
- ``return_embedding`` -- boolean; if ``True`` the projective embedding
|
|
905
|
+
is also returned
|
|
906
|
+
|
|
907
|
+
OUTPUT:
|
|
908
|
+
|
|
909
|
+
- An affine space.
|
|
910
|
+
|
|
911
|
+
- An embedding into a product of projective spaces (optional).
|
|
912
|
+
|
|
913
|
+
EXAMPLES::
|
|
914
|
+
|
|
915
|
+
sage: PP = ProductProjectiveSpaces([2, 2, 2], ZZ, 'x')
|
|
916
|
+
sage: phi = PP.affine_patch([0, 1, 2], True)
|
|
917
|
+
sage: phi.domain()
|
|
918
|
+
Affine Space of dimension 6 over Integer Ring
|
|
919
|
+
sage: phi
|
|
920
|
+
Scheme morphism:
|
|
921
|
+
From: Affine Space of dimension 6 over Integer Ring
|
|
922
|
+
To: Product of projective spaces P^2 x P^2 x P^2 over Integer Ring
|
|
923
|
+
Defn: Defined on coordinates by sending (x0, x1, x2, x3, x4, x5) to
|
|
924
|
+
(1 : x0 : x1 , x2 : 1 : x3 , x4 : x5 : 1)
|
|
925
|
+
"""
|
|
926
|
+
if not isinstance(I, (list, tuple)):
|
|
927
|
+
raise TypeError('the argument I=%s must be a list or tuple of positive integers' % I)
|
|
928
|
+
PP = self.ambient_space()
|
|
929
|
+
N = PP._dims
|
|
930
|
+
if len(I) != len(N):
|
|
931
|
+
raise ValueError('the argument I=%s must have %s entries' % (I,len(N)))
|
|
932
|
+
I = tuple([int(i) for i in I]) # implicit type checking
|
|
933
|
+
for i in range(len(I)):
|
|
934
|
+
if I[i] < 0 or I[i] > N[i]:
|
|
935
|
+
raise ValueError("argument i (= %s) must be between 0 and %s." % (I[i], N[i]))
|
|
936
|
+
try:
|
|
937
|
+
if return_embedding:
|
|
938
|
+
return self.__affine_patches[I][1]
|
|
939
|
+
else:
|
|
940
|
+
return self.__affine_patches[I][0]
|
|
941
|
+
except AttributeError:
|
|
942
|
+
self.__affine_patches = {}
|
|
943
|
+
except KeyError:
|
|
944
|
+
pass
|
|
945
|
+
from sage.schemes.affine.affine_space import AffineSpace
|
|
946
|
+
AA = AffineSpace(PP.base_ring(), sum(N), 'x')
|
|
947
|
+
v = list(AA.gens())
|
|
948
|
+
index = 0
|
|
949
|
+
for i in range(len(I)):
|
|
950
|
+
v.insert(index+I[i], 1)
|
|
951
|
+
index += N[i]+1
|
|
952
|
+
phi = AA.hom(v, self)
|
|
953
|
+
self.__affine_patches.update({I:(AA, phi)})
|
|
954
|
+
if return_embedding:
|
|
955
|
+
return phi
|
|
956
|
+
else:
|
|
957
|
+
return AA
|
|
958
|
+
|
|
959
|
+
@cached_method
|
|
960
|
+
def segre_embedding(self, PP=None, var='u'):
|
|
961
|
+
r"""
|
|
962
|
+
Return the Segre embedding of this space into the appropriate
|
|
963
|
+
projective space.
|
|
964
|
+
|
|
965
|
+
INPUT:
|
|
966
|
+
|
|
967
|
+
- ``PP`` -- (default: ``None``) ambient image projective space;
|
|
968
|
+
this is constructed if it is not given
|
|
969
|
+
|
|
970
|
+
- ``var`` -- string (default: ``'u'``); variable name of the image
|
|
971
|
+
projective space
|
|
972
|
+
|
|
973
|
+
OUTPUT: Hom; from this space to the appropriate subscheme of projective
|
|
974
|
+
space
|
|
975
|
+
|
|
976
|
+
.. TODO::
|
|
977
|
+
|
|
978
|
+
Cartesian products with more than two components.
|
|
979
|
+
|
|
980
|
+
EXAMPLES::
|
|
981
|
+
|
|
982
|
+
sage: X.<y0,y1,y2,y3,y4,y5> = ProductProjectiveSpaces(ZZ, [2, 2])
|
|
983
|
+
sage: phi = X.segre_embedding(); phi # needs sage.libs.singular
|
|
984
|
+
Scheme morphism:
|
|
985
|
+
From: Product of projective spaces P^2 x P^2 over Integer Ring
|
|
986
|
+
To: Closed subscheme of Projective Space of dimension 8 over Integer Ring
|
|
987
|
+
defined by:
|
|
988
|
+
-u5*u7 + u4*u8, -u5*u6 + u3*u8, -u4*u6 + u3*u7,
|
|
989
|
+
-u2*u7 + u1*u8, -u2*u4 + u1*u5, -u2*u6 + u0*u8,
|
|
990
|
+
-u1*u6 + u0*u7, -u2*u3 + u0*u5, -u1*u3 + u0*u4
|
|
991
|
+
Defn: Defined by sending (y0 : y1 : y2 , y3 : y4 : y5) to
|
|
992
|
+
(y0*y3 : y0*y4 : y0*y5 : y1*y3 : y1*y4 : y1*y5 : y2*y3 : y2*y4 : y2*y5).
|
|
993
|
+
|
|
994
|
+
::
|
|
995
|
+
|
|
996
|
+
sage: T = ProductProjectiveSpaces([1, 2], CC, 'z') # needs sage.rings.real_mpfr
|
|
997
|
+
sage: T.segre_embedding() # needs sage.libs.singular sage.rings.real_mpfr
|
|
998
|
+
Scheme morphism:
|
|
999
|
+
From: Product of projective spaces P^1 x P^2
|
|
1000
|
+
over Complex Field with 53 bits of precision
|
|
1001
|
+
To: Closed subscheme of Projective Space of dimension 5
|
|
1002
|
+
over Complex Field with 53 bits of precision defined by:
|
|
1003
|
+
-u2*u4 + u1*u5, -u2*u3 + u0*u5, -u1*u3 + u0*u4
|
|
1004
|
+
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4) to
|
|
1005
|
+
(z0*z2 : z0*z3 : z0*z4 : z1*z2 : z1*z3 : z1*z4).
|
|
1006
|
+
|
|
1007
|
+
::
|
|
1008
|
+
|
|
1009
|
+
sage: T = ProductProjectiveSpaces([1, 2, 1], QQ, 'z')
|
|
1010
|
+
sage: T.segre_embedding() # needs sage.libs.singular
|
|
1011
|
+
Scheme morphism:
|
|
1012
|
+
From: Product of projective spaces P^1 x P^2 x P^1 over Rational Field
|
|
1013
|
+
To: Closed subscheme of Projective Space of dimension 11
|
|
1014
|
+
over Rational Field defined by:
|
|
1015
|
+
-u9*u10 + u8*u11, -u7*u10 + u6*u11, -u7*u8 + u6*u9,
|
|
1016
|
+
-u5*u10 + u4*u11, -u5*u8 + u4*u9, -u5*u6 + u4*u7,
|
|
1017
|
+
-u5*u9 + u3*u11, -u5*u8 + u3*u10, -u5*u8 + u2*u11,
|
|
1018
|
+
-u4*u8 + u2*u10, -u3*u8 + u2*u9, -u3*u6 + u2*u7,
|
|
1019
|
+
-u3*u4 + u2*u5, -u5*u7 + u1*u11, -u5*u6 + u1*u10,
|
|
1020
|
+
-u3*u7 + u1*u9, -u3*u6 + u1*u8, -u5*u6 + u0*u11,
|
|
1021
|
+
-u4*u6 + u0*u10, -u3*u6 + u0*u9, -u2*u6 + u0*u8,
|
|
1022
|
+
-u1*u6 + u0*u7, -u1*u4 + u0*u5, -u1*u2 + u0*u3
|
|
1023
|
+
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4 , z5 : z6) to
|
|
1024
|
+
(z0*z2*z5 : z0*z2*z6 : z0*z3*z5 : z0*z3*z6 : z0*z4*z5 : z0*z4*z6
|
|
1025
|
+
: z1*z2*z5 : z1*z2*z6 : z1*z3*z5 : z1*z3*z6 : z1*z4*z5 : z1*z4*z6).
|
|
1026
|
+
"""
|
|
1027
|
+
N = self._dims
|
|
1028
|
+
M = prod([n+1 for n in N]) - 1
|
|
1029
|
+
CR = self.coordinate_ring()
|
|
1030
|
+
|
|
1031
|
+
vars = list(self.coordinate_ring().variable_names()) + [var + str(i) for i in range(M+1)]
|
|
1032
|
+
R = PolynomialRing(self.base_ring(), self.ngens()+M+1, vars, order='lex')
|
|
1033
|
+
|
|
1034
|
+
#set-up the elimination for the segre embedding
|
|
1035
|
+
mapping = []
|
|
1036
|
+
k = self.ngens()
|
|
1037
|
+
index = self.num_components()*[0]
|
|
1038
|
+
for count in range(M + 1):
|
|
1039
|
+
mapping.append(R.gen(k+count)-prod([CR(self[i].gen(index[i])) for i in range(len(index))]))
|
|
1040
|
+
for i in range(len(index)-1, -1, -1):
|
|
1041
|
+
if index[i] == N[i]:
|
|
1042
|
+
index[i] = 0
|
|
1043
|
+
else:
|
|
1044
|
+
index[i] += 1
|
|
1045
|
+
break #only increment once
|
|
1046
|
+
|
|
1047
|
+
#change the defining ideal of the subscheme into the variables
|
|
1048
|
+
I = R.ideal(list(self.defining_polynomials()) + mapping)
|
|
1049
|
+
J = I.groebner_basis()
|
|
1050
|
+
s = set(R.gens()[:self.ngens()])
|
|
1051
|
+
n = len(J)-1
|
|
1052
|
+
L = []
|
|
1053
|
+
while s.isdisjoint(J[n].variables()):
|
|
1054
|
+
L.append(J[n])
|
|
1055
|
+
n = n-1
|
|
1056
|
+
|
|
1057
|
+
#create new subscheme
|
|
1058
|
+
if PP is None:
|
|
1059
|
+
PS = ProjectiveSpace(self.base_ring(), M, R.variable_names()[self.ngens():])
|
|
1060
|
+
Y = PS.subscheme(L)
|
|
1061
|
+
else:
|
|
1062
|
+
if PP.dimension_relative() != M:
|
|
1063
|
+
raise ValueError("projective Space %s must be dimension %s") % (PP, M)
|
|
1064
|
+
S = PP.coordinate_ring()
|
|
1065
|
+
psi = R.hom([0]*k + list(S.gens()), S)
|
|
1066
|
+
L = [psi(l) for l in L]
|
|
1067
|
+
Y = PP.subscheme(L)
|
|
1068
|
+
|
|
1069
|
+
#create embedding for points
|
|
1070
|
+
mapping = []
|
|
1071
|
+
index = self.num_components()*[0]
|
|
1072
|
+
for count in range(M + 1):
|
|
1073
|
+
mapping.append(prod([CR(self[i].gen(index[i])) for i in range(len(index))]))
|
|
1074
|
+
for i in range(len(index)-1, -1, -1):
|
|
1075
|
+
if index[i] == N[i]:
|
|
1076
|
+
index[i] = 0
|
|
1077
|
+
else:
|
|
1078
|
+
index[i] += 1
|
|
1079
|
+
break #only increment once
|
|
1080
|
+
phi = self.hom(mapping, Y)
|
|
1081
|
+
|
|
1082
|
+
return phi
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
class ProductProjectiveSpaces_field(ProductProjectiveSpaces_ring):
|
|
1086
|
+
def _point(self, *args, **kwds):
|
|
1087
|
+
"""
|
|
1088
|
+
Construct a point.
|
|
1089
|
+
|
|
1090
|
+
For internal use only. See :mod:`morphism` for details.
|
|
1091
|
+
|
|
1092
|
+
EXAMPLES::
|
|
1093
|
+
|
|
1094
|
+
sage: u = QQ['u'].0
|
|
1095
|
+
sage: K = NumberField(u^2 - 2, 'v') # needs sage.rings.number_field
|
|
1096
|
+
sage: P = ProductProjectiveSpaces([1, 2], K, 'x') # needs sage.rings.number_field
|
|
1097
|
+
sage: P([1, 3, u, 1, 1]) # needs sage.rings.number_field
|
|
1098
|
+
(1/3 : 1 , v : 1 : 1)
|
|
1099
|
+
"""
|
|
1100
|
+
return ProductProjectiveSpaces_point_field(*args, **kwds)
|
|
1101
|
+
|
|
1102
|
+
def _point_homset(self, *args, **kwds):
|
|
1103
|
+
"""
|
|
1104
|
+
Construct a point Hom-set.
|
|
1105
|
+
|
|
1106
|
+
For internal use only. See :mod:`morphism` for details.
|
|
1107
|
+
|
|
1108
|
+
EXAMPLES::
|
|
1109
|
+
|
|
1110
|
+
sage: P.<x,y,z,w> = ProductProjectiveSpaces([1, 1], GF(5))
|
|
1111
|
+
sage: P._point_homset(Spec(GF(5)), P)
|
|
1112
|
+
Set of rational points of Product of projective spaces P^1 x P^1
|
|
1113
|
+
over Finite Field of size 5
|
|
1114
|
+
"""
|
|
1115
|
+
return SchemeHomset_points_product_projective_spaces_field(*args, **kwds)
|
|
1116
|
+
|
|
1117
|
+
def points_of_bounded_height(self, **kwds):
|
|
1118
|
+
r"""
|
|
1119
|
+
Return an iterator of the points in this product of projective spaces
|
|
1120
|
+
with the absolute heights of the components of at most the given bound.
|
|
1121
|
+
|
|
1122
|
+
Bound check is strict for the rational field. Requires the base field
|
|
1123
|
+
of this space to be a number field. Uses the Doyle-Krumm algorithm 4
|
|
1124
|
+
(algorithm 5 for imaginary quadratic) for computing algebraic numbers
|
|
1125
|
+
up to a given height [DK2013]_.
|
|
1126
|
+
|
|
1127
|
+
The algorithm requires floating point arithmetic, so the user is
|
|
1128
|
+
allowed to specify the precision for such calculations.
|
|
1129
|
+
Additionally, due to floating point issues, points
|
|
1130
|
+
slightly larger than the bound may be returned. This can be controlled
|
|
1131
|
+
by lowering the tolerance.
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
INPUT:
|
|
1135
|
+
|
|
1136
|
+
- ``bound`` -- a real number
|
|
1137
|
+
|
|
1138
|
+
- ``tolerance`` -- a rational number in (0,1] used in Doyle-Krumm
|
|
1139
|
+
algorithm-4
|
|
1140
|
+
|
|
1141
|
+
- ``precision`` -- the precision to use for computing the elements of
|
|
1142
|
+
bounded height of number fields
|
|
1143
|
+
|
|
1144
|
+
OUTPUT: an iterator of points in this space
|
|
1145
|
+
|
|
1146
|
+
EXAMPLES::
|
|
1147
|
+
|
|
1148
|
+
sage: PP = ProductProjectiveSpaces(QQ, [1, 2])
|
|
1149
|
+
sage: sorted(list(PP.points_of_bounded_height(bound=1)))
|
|
1150
|
+
[(-1 : 1 , -1 : -1 : 1), (-1 : 1 , -1 : 0 : 1), (-1 : 1 , -1 : 1 : 0),
|
|
1151
|
+
(-1 : 1 , -1 : 1 : 1), (-1 : 1 , 0 : -1 : 1), (-1 : 1 , 0 : 0 : 1),
|
|
1152
|
+
(-1 : 1 , 0 : 1 : 0), (-1 : 1 , 0 : 1 : 1), (-1 : 1 , 1 : -1 : 1),
|
|
1153
|
+
(-1 : 1 , 1 : 0 : 0), (-1 : 1 , 1 : 0 : 1), (-1 : 1 , 1 : 1 : 0),
|
|
1154
|
+
(-1 : 1 , 1 : 1 : 1), (0 : 1 , -1 : -1 : 1), (0 : 1 , -1 : 0 : 1),
|
|
1155
|
+
(0 : 1 , -1 : 1 : 0), (0 : 1 , -1 : 1 : 1), (0 : 1 , 0 : -1 : 1),
|
|
1156
|
+
(0 : 1 , 0 : 0 : 1), (0 : 1 , 0 : 1 : 0), (0 : 1 , 0 : 1 : 1),
|
|
1157
|
+
(0 : 1 , 1 : -1 : 1), (0 : 1 , 1 : 0 : 0), (0 : 1 , 1 : 0 : 1),
|
|
1158
|
+
(0 : 1 , 1 : 1 : 0), (0 : 1 , 1 : 1 : 1), (1 : 0 , -1 : -1 : 1),
|
|
1159
|
+
(1 : 0 , -1 : 0 : 1), (1 : 0 , -1 : 1 : 0), (1 : 0 , -1 : 1 : 1),
|
|
1160
|
+
(1 : 0 , 0 : -1 : 1), (1 : 0 , 0 : 0 : 1), (1 : 0 , 0 : 1 : 0),
|
|
1161
|
+
(1 : 0 , 0 : 1 : 1), (1 : 0 , 1 : -1 : 1), (1 : 0 , 1 : 0 : 0),
|
|
1162
|
+
(1 : 0 , 1 : 0 : 1), (1 : 0 , 1 : 1 : 0), (1 : 0 , 1 : 1 : 1),
|
|
1163
|
+
(1 : 1 , -1 : -1 : 1), (1 : 1 , -1 : 0 : 1), (1 : 1 , -1 : 1 : 0),
|
|
1164
|
+
(1 : 1 , -1 : 1 : 1), (1 : 1 , 0 : -1 : 1), (1 : 1 , 0 : 0 : 1),
|
|
1165
|
+
(1 : 1 , 0 : 1 : 0), (1 : 1 , 0 : 1 : 1), (1 : 1 , 1 : -1 : 1),
|
|
1166
|
+
(1 : 1 , 1 : 0 : 0), (1 : 1 , 1 : 0 : 1), (1 : 1 , 1 : 1 : 0),
|
|
1167
|
+
(1 : 1 , 1 : 1 : 1)]
|
|
1168
|
+
|
|
1169
|
+
::
|
|
1170
|
+
|
|
1171
|
+
sage: u = QQ['u'].0
|
|
1172
|
+
sage: P = ProductProjectiveSpaces([1, 1], NumberField(u^2 - 2, 'v')) # needs sage.rings.number_field
|
|
1173
|
+
sage: sorted(list(P.points_of_bounded_height(bound=1.5))) # needs sage.geometry.polyhedron sage.rings.number_field
|
|
1174
|
+
[(-v : 1 , -v : 1), (-v : 1 , -1 : 1), (-v : 1 , -1/2*v : 1), (-v : 1 , 0 : 1),
|
|
1175
|
+
(-v : 1 , 1/2*v : 1), (-v : 1 , 1 : 0), (-v : 1 , 1 : 1), (-v : 1 , v : 1),
|
|
1176
|
+
(-1 : 1 , -v : 1), (-1 : 1 , -1 : 1), (-1 : 1 , -1/2*v : 1), (-1 : 1 , 0 : 1),
|
|
1177
|
+
(-1 : 1 , 1/2*v : 1), (-1 : 1 , 1 : 0), (-1 : 1 , 1 : 1), (-1 : 1 , v : 1),
|
|
1178
|
+
(-1/2*v : 1 , -v : 1), (-1/2*v : 1 , -1 : 1), (-1/2*v : 1 , -1/2*v : 1),
|
|
1179
|
+
(-1/2*v : 1 , 0 : 1), (-1/2*v : 1 , 1/2*v : 1), (-1/2*v : 1 , 1 : 0),
|
|
1180
|
+
(-1/2*v : 1 , 1 : 1), (-1/2*v : 1 , v : 1), (0 : 1 , -v : 1), (0 : 1 , -1 : 1),
|
|
1181
|
+
(0 : 1 , -1/2*v : 1), (0 : 1 , 0 : 1), (0 : 1 , 1/2*v : 1), (0 : 1 , 1 : 0),
|
|
1182
|
+
(0 : 1 , 1 : 1), (0 : 1 , v : 1), (1/2*v : 1 , -v : 1), (1/2*v : 1 , -1 : 1),
|
|
1183
|
+
(1/2*v : 1 , -1/2*v : 1), (1/2*v : 1 , 0 : 1), (1/2*v : 1 , 1/2*v : 1),
|
|
1184
|
+
(1/2*v : 1 , 1 : 0), (1/2*v : 1 , 1 : 1), (1/2*v : 1 , v : 1), (1 : 0 , -v : 1),
|
|
1185
|
+
(1 : 0 , -1 : 1), (1 : 0 , -1/2*v : 1), (1 : 0 , 0 : 1), (1 : 0 , 1/2*v : 1),
|
|
1186
|
+
(1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , v : 1), (1 : 1 , -v : 1),
|
|
1187
|
+
(1 : 1 , -1 : 1), (1 : 1 , -1/2*v : 1), (1 : 1 , 0 : 1), (1 : 1 , 1/2*v : 1),
|
|
1188
|
+
(1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , v : 1), (v : 1 , -v : 1),
|
|
1189
|
+
(v : 1 , -1 : 1), (v : 1 , -1/2*v : 1), (v : 1 , 0 : 1), (v : 1 , 1/2*v : 1),
|
|
1190
|
+
(v : 1 , 1 : 0), (v : 1 , 1 : 1), (v : 1 , v : 1)]
|
|
1191
|
+
"""
|
|
1192
|
+
B = kwds.pop('bound')
|
|
1193
|
+
tol = kwds.pop('tolerance', 1e-2)
|
|
1194
|
+
prec = kwds.pop('precision', 53)
|
|
1195
|
+
m = self.num_components()
|
|
1196
|
+
iters = [ self[i].points_of_bounded_height(bound=B, tolerance=tol, precision=prec) for i in range(m) ]
|
|
1197
|
+
dim = [self[i].dimension_relative() + 1 for i in range(m)]
|
|
1198
|
+
|
|
1199
|
+
dim_prefix = [0, dim[0]] # prefixes dim list
|
|
1200
|
+
for i in range(1, len(dim)):
|
|
1201
|
+
dim_prefix.append(dim_prefix[i] + dim[i])
|
|
1202
|
+
|
|
1203
|
+
P = []
|
|
1204
|
+
for i in range(m):
|
|
1205
|
+
pt = next(iters[i])
|
|
1206
|
+
P.extend(pt[j] for j in range(dim[i]))
|
|
1207
|
+
# initial value of P
|
|
1208
|
+
yield self(P)
|
|
1209
|
+
|
|
1210
|
+
i = 0
|
|
1211
|
+
while i < m:
|
|
1212
|
+
try:
|
|
1213
|
+
pt = next(iters[i])
|
|
1214
|
+
for j in range(dim[i]):
|
|
1215
|
+
P[dim_prefix[i] + j] = pt[j]
|
|
1216
|
+
yield self(P)
|
|
1217
|
+
i = 0
|
|
1218
|
+
except StopIteration:
|
|
1219
|
+
iters[i] = self[i].points_of_bounded_height(bound=B, tolerance=tol, precision=prec)
|
|
1220
|
+
pt = next(iters[i]) # reset
|
|
1221
|
+
for j in range(dim[i]):
|
|
1222
|
+
P[dim_prefix[i] + j] = pt[j]
|
|
1223
|
+
i += 1
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
class ProductProjectiveSpaces_finite_field(ProductProjectiveSpaces_field):
|
|
1227
|
+
def _point(self, *args, **kwds):
|
|
1228
|
+
r"""
|
|
1229
|
+
Construct a point.
|
|
1230
|
+
|
|
1231
|
+
For internal use only. See :mod:`morphism` for details.
|
|
1232
|
+
|
|
1233
|
+
EXAMPLES::
|
|
1234
|
+
|
|
1235
|
+
sage: P = ProductProjectiveSpaces([1, 2], GF(11))
|
|
1236
|
+
sage: P([3, 7, 4, 5, 9])
|
|
1237
|
+
(2 : 1 , 9 : 3 : 1)
|
|
1238
|
+
"""
|
|
1239
|
+
return ProductProjectiveSpaces_point_finite_field(*args, **kwds)
|
|
1240
|
+
|
|
1241
|
+
def __iter__(self):
|
|
1242
|
+
r"""
|
|
1243
|
+
Return an iterator over the elements of this product of projective spaces.
|
|
1244
|
+
|
|
1245
|
+
EXAMPLES::
|
|
1246
|
+
|
|
1247
|
+
sage: P = ProductProjectiveSpaces([2, 1], GF(3))
|
|
1248
|
+
sage: [x for x in P]
|
|
1249
|
+
[(0 : 0 : 1 , 0 : 1),
|
|
1250
|
+
(0 : 1 : 1 , 0 : 1),
|
|
1251
|
+
(0 : 2 : 1 , 0 : 1),
|
|
1252
|
+
...
|
|
1253
|
+
(1 : 1 : 0 , 1 : 0),
|
|
1254
|
+
(2 : 1 : 0 , 1 : 0),
|
|
1255
|
+
(1 : 0 : 0 , 1 : 0)]
|
|
1256
|
+
"""
|
|
1257
|
+
iters = [iter(T) for T in self._components]
|
|
1258
|
+
L = [next(x) for x in iters] # put at zero
|
|
1259
|
+
yield self(L)
|
|
1260
|
+
j = 0
|
|
1261
|
+
while j < self.num_components():
|
|
1262
|
+
try:
|
|
1263
|
+
L[j] = next(iters[j])
|
|
1264
|
+
yield self(L)
|
|
1265
|
+
j = 0
|
|
1266
|
+
except StopIteration:
|
|
1267
|
+
iters[j] = iter(self[j]) # reset
|
|
1268
|
+
L[j] = next(iters[j]) # put at zero
|
|
1269
|
+
j += 1
|
|
1270
|
+
|
|
1271
|
+
def rational_points(self, F=None):
|
|
1272
|
+
r"""
|
|
1273
|
+
Return the list of `F`-rational points on this product of projective spaces,
|
|
1274
|
+
where `F` is a given finite field, or the base ring of this space.
|
|
1275
|
+
|
|
1276
|
+
EXAMPLES::
|
|
1277
|
+
|
|
1278
|
+
sage: P = ProductProjectiveSpaces([1, 1], GF(5))
|
|
1279
|
+
sage: P.rational_points()
|
|
1280
|
+
[(0 : 1 , 0 : 1), (1 : 1 , 0 : 1), (2 : 1 , 0 : 1), (3 : 1 , 0 : 1), (4 : 1 , 0 : 1), (1 : 0 , 0 : 1),
|
|
1281
|
+
(0 : 1 , 1 : 1), (1 : 1 , 1 : 1), (2 : 1 , 1 : 1), (3 : 1 , 1 : 1), (4 : 1 , 1 : 1), (1 : 0 , 1 : 1),
|
|
1282
|
+
(0 : 1 , 2 : 1), (1 : 1 , 2 : 1), (2 : 1 , 2 : 1), (3 : 1 , 2 : 1), (4 : 1 , 2 : 1), (1 : 0 , 2 : 1),
|
|
1283
|
+
(0 : 1 , 3 : 1), (1 : 1 , 3 : 1), (2 : 1 , 3 : 1), (3 : 1 , 3 : 1), (4 : 1 , 3 : 1), (1 : 0 , 3 : 1),
|
|
1284
|
+
(0 : 1 , 4 : 1), (1 : 1 , 4 : 1), (2 : 1 , 4 : 1), (3 : 1 , 4 : 1), (4 : 1 , 4 : 1), (1 : 0 , 4 : 1),
|
|
1285
|
+
(0 : 1 , 1 : 0), (1 : 1 , 1 : 0), (2 : 1 , 1 : 0), (3 : 1 , 1 : 0), (4 : 1 , 1 : 0), (1 : 0 , 1 : 0)]
|
|
1286
|
+
|
|
1287
|
+
::
|
|
1288
|
+
|
|
1289
|
+
sage: P = ProductProjectiveSpaces([1, 1], GF(2))
|
|
1290
|
+
sage: sorted(P.rational_points(GF(2^2, 'a')), key=str) # needs sage.rings.finite_rings
|
|
1291
|
+
[(0 : 1 , 0 : 1), (0 : 1 , 1 : 0), (0 : 1 , 1 : 1), (0 : 1 , a + 1 : 1), (0 : 1 , a : 1),
|
|
1292
|
+
(1 : 0 , 0 : 1), (1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , a + 1 : 1), (1 : 0 , a : 1),
|
|
1293
|
+
(1 : 1 , 0 : 1), (1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , a + 1 : 1), (1 : 1 , a : 1),
|
|
1294
|
+
(a + 1 : 1 , 0 : 1), (a + 1 : 1 , 1 : 0), (a + 1 : 1 , 1 : 1), (a + 1 : 1 , a + 1 : 1), (a + 1 : 1 , a : 1),
|
|
1295
|
+
(a : 1 , 0 : 1), (a : 1 , 1 : 0), (a : 1 , 1 : 1), (a : 1 , a + 1 : 1), (a : 1 , a : 1)]
|
|
1296
|
+
"""
|
|
1297
|
+
if F is None:
|
|
1298
|
+
return list(self)
|
|
1299
|
+
elif not isinstance(F, FiniteField):
|
|
1300
|
+
raise TypeError("second argument (= %s) must be a finite field" % F)
|
|
1301
|
+
return list(self.base_extend(F))
|