@@ -225,11 +225,11 @@ def PolynomialSequence(arg1, arg2=None, immutable=False, cr=False, cr_str=None):
225
225
EXAMPLES::
226
226
227
227
sage: P.<a,b,c,d> = PolynomialRing(GF(127), 4)
228
- sage: I = sage.rings.ideal.Katsura(P) # needs sage.rings.finite_rings
228
+ sage: I = sage.rings.ideal.Katsura(P) # needs sage.libs.singular
229
229
230
230
If a list of tuples is provided, those form the parts::
231
231
232
- sage: F = Sequence([I.gens(),I.gens()], I.ring()); F # indirect doctest # needs sage.rings.finite_rings
232
+ sage: F = Sequence([I.gens(),I.gens()], I.ring()); F # indirect doctest # needs sage.libs.singular
233
233
[a + 2*b + 2*c + 2*d - 1,
234
234
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
235
235
2*a*b + 2*b*c + 2*c*d - b,
@@ -238,25 +238,25 @@ def PolynomialSequence(arg1, arg2=None, immutable=False, cr=False, cr_str=None):
238
238
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
239
239
2*a*b + 2*b*c + 2*c*d - b,
240
240
b^2 + 2*a*c + 2*b*d - c]
241
- sage: F.nparts() # needs sage.rings.finite_rings
241
+ sage: F.nparts() # needs sage.libs.singular
242
242
2
243
243
244
244
If an ideal is provided, the generators are used::
245
245
246
- sage: Sequence(I) # needs sage.rings.finite_rings
246
+ sage: Sequence(I) # needs sage.libs.singular
247
247
[a + 2*b + 2*c + 2*d - 1,
248
248
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
249
249
2*a*b + 2*b*c + 2*c*d - b,
250
250
b^2 + 2*a*c + 2*b*d - c]
251
251
252
252
If a list of polynomials is provided, the system has only one part::
253
253
254
- sage: F = Sequence(I.gens(), I.ring()); F # needs sage.rings.finite_rings
254
+ sage: F = Sequence(I.gens(), I.ring()); F # needs sage.libs.singular
255
255
[a + 2*b + 2*c + 2*d - 1,
256
256
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
257
257
2*a*b + 2*b*c + 2*c*d - b,
258
258
b^2 + 2*a*c + 2*b*d - c]
259
- sage: F.nparts() # needs sage.rings.finite_rings
259
+ sage: F.nparts() # needs sage.libs.singular
260
260
1
261
261
262
262
We test that the ring is inferred correctly::
@@ -720,23 +720,22 @@ def coefficient_matrix(self, sparse=True):
720
720
721
721
EXAMPLES::
722
722
723
+ sage: # needs sage.libs.singular
723
724
sage: P.<a,b,c,d> = PolynomialRing(GF(127), 4)
724
- sage: I = sage.rings.ideal.Katsura(P) # needs sage.rings.finite_rings
725
- sage: I.gens() # needs sage.rings.finite_rings
725
+ sage: I = sage.rings.ideal.Katsura(P)
726
+ sage: I.gens()
726
727
[a + 2*b + 2*c + 2*d - 1,
727
728
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
728
729
2*a*b + 2*b*c + 2*c*d - b,
729
730
b^2 + 2*a*c + 2*b*d - c]
730
-
731
- sage: F = Sequence(I) # needs sage.rings.finite_rings
732
- sage: A,v = F.coefficient_matrix() # needs sage.rings.finite_rings
733
- sage: A # needs sage.rings.finite_rings
731
+ sage: F = Sequence(I)
732
+ sage: A,v = F.coefficient_matrix()
733
+ sage: A
734
734
[ 0 0 0 0 0 0 0 0 0 1 2 2 2 126]
735
735
[ 1 0 2 0 0 2 0 0 2 126 0 0 0 0]
736
736
[ 0 2 0 0 2 0 0 2 0 0 126 0 0 0]
737
737
[ 0 0 1 2 0 0 2 0 0 0 0 126 0 0]
738
-
739
- sage: v # needs sage.rings.finite_rings
738
+ sage: v
740
739
[a^2]
741
740
[a*b]
742
741
[b^2]
@@ -751,8 +750,7 @@ def coefficient_matrix(self, sparse=True):
751
750
[ c]
752
751
[ d]
753
752
[ 1]
754
-
755
- sage: A*v # needs sage.rings.finite_rings
753
+ sage: A*v
756
754
[ a + 2*b + 2*c + 2*d - 1]
757
755
[a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a]
758
756
[ 2*a*b + 2*b*c + 2*c*d - b]
@@ -806,14 +804,15 @@ def _singular_(self):
806
804
807
805
EXAMPLES::
808
806
807
+ sage: # needs sage.libs.singular
809
808
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
810
- sage: I = sage.rings.ideal.Katsura(P) # needs sage.rings.finite_rings
811
- sage: F = Sequence(I); F # needs sage.rings.finite_rings
809
+ sage: I = sage.rings.ideal.Katsura(P)
810
+ sage: F = Sequence(I); F
812
811
[a + 2*b + 2*c + 2*d - 1,
813
812
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
814
813
2*a*b + 2*b*c + 2*c*d - b,
815
814
b^2 + 2*a*c + 2*b*d - c]
816
- sage: F._singular_() # needs sage.rings.finite_rings
815
+ sage: F._singular_()
817
816
a+2*b+2*c+2*d-1,
818
817
a^2+2*b^2+2*c^2+2*d^2-a,
819
818
2*a*b+2*b*c+2*c*d-b,
@@ -851,9 +850,10 @@ def _repr_(self):
851
850
852
851
EXAMPLES::
853
852
853
+ sage: # needs sage.libs.singular
854
854
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
855
- sage: I = sage.rings.ideal.Katsura(P) # needs sage.rings.finite_rings
856
- sage: F = Sequence(I); F # indirect doctest # needs sage.rings.finite_rings
855
+ sage: I = sage.rings.ideal.Katsura(P)
856
+ sage: F = Sequence(I); F # indirect doctest
857
857
[a + 2*b + 2*c + 2*d - 1,
858
858
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
859
859
2*a*b + 2*b*c + 2*c*d - b,
@@ -879,24 +879,25 @@ def __add__(self, right):
879
879
880
880
EXAMPLES::
881
881
882
+ sage: # needs sage.libs.singular
882
883
sage: P.<a,b,c,d> = PolynomialRing(GF(127))
883
- sage: I = sage.rings.ideal.Katsura(P) # needs sage.rings.finite_rings
884
- sage: F = Sequence(I) # needs sage.rings.finite_rings
885
- sage: F + [a^127 + a] # needs sage.rings.finite_rings
884
+ sage: I = sage.rings.ideal.Katsura(P)
885
+ sage: F = Sequence(I)
886
+ sage: F + [a^127 + a]
886
887
[a + 2*b + 2*c + 2*d - 1,
887
888
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
888
889
2*a*b + 2*b*c + 2*c*d - b,
889
890
b^2 + 2*a*c + 2*b*d - c,
890
891
a^127 + a]
891
892
892
- sage: F + P.ideal([a^127 + a]) # needs sage.rings.finite_rings
893
+ sage: F + P.ideal([a^127 + a]) # needs sage.libs.singular
893
894
[a + 2*b + 2*c + 2*d - 1,
894
895
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
895
896
2*a*b + 2*b*c + 2*c*d - b,
896
897
b^2 + 2*a*c + 2*b*d - c,
897
898
a^127 + a]
898
899
899
- sage: F + Sequence([a^127 + a], P) # needs sage.rings.finite_rings
900
+ sage: F + Sequence([a^127 + a], P) # needs sage.libs.singular
900
901
[a + 2*b + 2*c + 2*d - 1,
901
902
a^2 + 2*b^2 + 2*c^2 + 2*d^2 - a,
902
903
2*a*b + 2*b*c + 2*c*d - b,
@@ -1029,7 +1030,7 @@ def _groebner_strategy(self):
1029
1030
1030
1031
sage: P.<x,y,z> = PolynomialRing(GF(127))
1031
1032
sage: F = Sequence([x*y + z, y + z + 1])
1032
- sage: F._groebner_strategy() # needs sage.rings.finite_rings
1033
+ sage: F._groebner_strategy() # needs sage.libs.singular
1033
1034
Groebner Strategy for ideal generated by 2 elements over
1034
1035
Multivariate Polynomial Ring in x, y, z over Finite Field of size 127
1035
1036
"""
@@ -1044,11 +1045,11 @@ def maximal_degree(self):
1044
1045
1045
1046
sage: P.<x,y,z> = PolynomialRing(GF(7))
1046
1047
sage: F = Sequence([x*y + x, x])
1047
- sage: F.maximal_degree() # needs sage.rings.finite_rings
1048
+ sage: F.maximal_degree()
1048
1049
2
1049
1050
sage: P.<x,y,z> = PolynomialRing(GF(7))
1050
1051
sage: F = Sequence([], universe=P)
1051
- sage: F.maximal_degree() # needs sage.rings.finite_rings
1052
+ sage: F.maximal_degree()
1052
1053
-1
1053
1054
1054
1055
"""
0 commit comments