diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 38da04c1664..02ebb75c8a3 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -1114,12 +1114,10 @@ written. The :ref:`doctest fixer ` uses tab stops at columns 48, 56, 64, ... for these tags. -- **Split long lines:** You may want to split long lines of code with a - backslash. Note: this syntax is non-standard and may be removed in the - future:: +- **Split long lines:** Standard Python rules apply. For example:: - sage: n = 123456789123456789123456789\ - ....: 123456789123456789123456789 + sage: n = (123456789123456789123456789 + + ....: 123456789123456789123456789) sage: n.is_prime() False diff --git a/src/doc/en/thematic_tutorials/lie/branching_rules.rst b/src/doc/en/thematic_tutorials/lie/branching_rules.rst index f2c24f0e8be..422c08edba2 100644 --- a/src/doc/en/thematic_tutorials/lie/branching_rules.rst +++ b/src/doc/en/thematic_tutorials/lie/branching_rules.rst @@ -344,7 +344,7 @@ we could accomplish the branching in two steps, thus:: sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: reps = [A3(fw) for fw in A3.fundamental_weights()] sage: [pi.branch(C2, rule="symmetric").branch(B2, rule="isomorphic"). \ - branch(D2, rule="extended").branch(A1xA1, rule="isomorphic") for pi in reps] + ....: branch(D2, rule="extended").branch(A1xA1, rule="isomorphic") for pi in reps] [A1xA1(1,0) + A1xA1(0,1), 2*A1xA1(0,0) + A1xA1(1,1), A1xA1(1,0) + A1xA1(0,1)] As you can see, we've redone the branching rather circuitously this diff --git a/src/doc/en/thematic_tutorials/lie/crystals.rst b/src/doc/en/thematic_tutorials/lie/crystals.rst index fc3d867e532..ae64b3b5278 100644 --- a/src/doc/en/thematic_tutorials/lie/crystals.rst +++ b/src/doc/en/thematic_tutorials/lie/crystals.rst @@ -741,7 +741,7 @@ irreducible crystal. We can make four such crystals:: sage: C = crystals.Letters("A2") sage: T = crystals.TensorProduct(C,C,C) sage: [T1,T2,T3,T4] = \ - [crystals.TensorProduct(C,C,C,generators=[v]) for v in T.highest_weight_vectors()] + ....: [crystals.TensorProduct(C,C,C,generators=[v]) for v in T.highest_weight_vectors()] sage: [B.cardinality() for B in [T1,T2,T3,T4]] [10, 8, 8, 1] sage: [B.character(A2) for B in [T1,T2,T3,T4]] @@ -754,7 +754,7 @@ We see that two of these crystals are isomorphic, with character sage: C = crystals.Letters("A2") sage: T = crystals.TensorProduct(C,C,C) sage: [T1,T2,T3,T4] = \ - [crystals.TensorProduct(C,C,C,generators=[v]) for v in T.highest_weight_vectors()] + ....: [crystals.TensorProduct(C,C,C,generators=[v]) for v in T.highest_weight_vectors()] sage: T1.plot() Graphics object consisting of 35 graphics primitives sage: T2.plot() diff --git a/src/doc/en/thematic_tutorials/sandpile.rst b/src/doc/en/thematic_tutorials/sandpile.rst index 417f10e4dbd..0c7b2b05a18 100644 --- a/src/doc/en/thematic_tutorials/sandpile.rst +++ b/src/doc/en/thematic_tutorials/sandpile.rst @@ -1174,7 +1174,7 @@ dict (configuration) EXAMPLES:: sage: g = {0:{},1:{0:1,3:1,4:1},2:{0:1,3:1,5:1}, \ - 3:{2:1,5:1},4:{1:1,3:1},5:{2:1,3:1}} + ....: 3:{2:1,5:1},4:{1:1,3:1},5:{2:1,3:1}} sage: S = Sandpile(g,0) sage: S.burning_config() {1: 2, 2: 0, 3: 1, 4: 1, 5: 0} @@ -1226,7 +1226,7 @@ OUTPUT: dict EXAMPLES:: sage: g = {0:{},1:{0:1,3:1,4:1},2:{0:1,3:1,5:1},\ - 3:{2:1,5:1},4:{1:1,3:1},5:{2:1,3:1}} + ....: 3:{2:1,5:1},4:{1:1,3:1},5:{2:1,3:1}} sage: S = Sandpile(g,0) sage: S.burning_config() {1: 2, 2: 0, 3: 1, 4: 1, 5: 0} diff --git a/src/sage/coding/delsarte_bounds.py b/src/sage/coding/delsarte_bounds.py index f3dedb7a720..a34099fd548 100644 --- a/src/sage/coding/delsarte_bounds.py +++ b/src/sage/coding/delsarte_bounds.py @@ -490,7 +490,7 @@ def delsarte_bound_additive_hamming_space(n, d, q, d_star=1, q_base=0, return_da sage: codes.bounds.delsarte_bound_additive_hamming_space(11, 6, 2) 3 sage: a,p,val = codes.bounds.delsarte_bound_additive_hamming_space(\ - 11, 6, 2, return_data=True) + ....: 11, 6, 2, return_data=True) sage: [j for i,j in p.get_values(a).items()] [1, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 0] @@ -514,13 +514,13 @@ def delsarte_bound_additive_hamming_space(n, d, q, d_star=1, q_base=0, return_da TESTS:: sage: a,p,x = codes.bounds.delsarte_bound_additive_hamming_space(\ - 19,15,7,return_data=True,isinteger=True) + ....: 19,15,7,return_data=True,isinteger=True) sage: [j for i,j in p.get_values(a).items()] [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 307, 0, 0, 1, 34] sage: codes.bounds.delsarte_bound_additive_hamming_space(19,15,7,solver='glpk') 3 sage: codes.bounds.delsarte_bound_additive_hamming_space(\ - 19,15,7, isinteger=True, solver='glpk') + ....: 19,15,7, isinteger=True, solver='glpk') 3 """ from sage.numerical.mip import MIPSolverException diff --git a/src/sage/coding/extended_code.py b/src/sage/coding/extended_code.py index 46335b19bdc..87288902820 100644 --- a/src/sage/coding/extended_code.py +++ b/src/sage/coding/extended_code.py @@ -134,8 +134,8 @@ def parity_check_matrix(self): EXAMPLES:: sage: C = LinearCode(matrix(GF(2),[[1,0,0,1,1],\ - [0,1,0,1,0],\ - [0,0,1,1,1]])) + ....: [0,1,0,1,0],\ + ....: [0,0,1,1,1]])) sage: C.parity_check_matrix() [1 0 1 0 1] [0 1 0 1 1] @@ -259,8 +259,8 @@ def generator_matrix(self): EXAMPLES:: sage: C = LinearCode(matrix(GF(2),[[1,0,0,1,1],\ - [0,1,0,1,0],\ - [0,0,1,1,1]])) + ....: [0,1,0,1,0],\ + ....: [0,0,1,1,1]])) sage: Ce = codes.ExtendedCode(C) sage: E = codes.encoders.ExtendedCodeExtendedMatrixEncoder(Ce) sage: E.generator_matrix() diff --git a/src/sage/coding/information_set_decoder.py b/src/sage/coding/information_set_decoder.py index c059b185816..99f54cdfbfc 100644 --- a/src/sage/coding/information_set_decoder.py +++ b/src/sage/coding/information_set_decoder.py @@ -157,10 +157,10 @@ def decode(self, r): EXAMPLES:: sage: M = matrix(GF(2), [[1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0],\ - [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1],\ - [0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0],\ - [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1],\ - [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1]]) + ....: [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1],\ + ....: [0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0],\ + ....: [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1],\ + ....: [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1]]) sage: C = codes.LinearCode(M) sage: from sage.coding.information_set_decoder import LeeBrickellISDAlgorithm sage: A = LeeBrickellISDAlgorithm(C, (2,2)) @@ -448,10 +448,10 @@ def decode(self, r): EXAMPLES:: sage: M = matrix(GF(2), [[1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0],\ - [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1],\ - [0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0],\ - [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1],\ - [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1]]) + ....: [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1],\ + ....: [0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0],\ + ....: [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1],\ + ....: [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1]]) sage: C = codes.LinearCode(M) sage: from sage.coding.information_set_decoder import LeeBrickellISDAlgorithm sage: A = LeeBrickellISDAlgorithm(C, (2,2)) @@ -929,10 +929,10 @@ def decode_to_code(self, r): EXAMPLES:: sage: M = matrix(GF(2), [[1,0,0,0,0,0,1,0,1,0,1,1,0,0,1],\ - [0,1,0,0,0,1,1,1,1,0,0,0,0,1,1],\ - [0,0,1,0,0,0,0,1,0,1,1,1,1,1,0],\ - [0,0,0,1,0,0,1,0,1,0,0,0,1,1,0],\ - [0,0,0,0,1,0,0,0,1,0,1,1,0,1,0]]) + ....: [0,1,0,0,0,1,1,1,1,0,0,0,0,1,1],\ + ....: [0,0,1,0,0,0,0,1,0,1,1,1,1,1,0],\ + ....: [0,0,0,1,0,0,1,0,1,0,0,0,1,1,0],\ + ....: [0,0,0,0,1,0,0,0,1,0,1,1,0,1,0]]) sage: C = LinearCode(M) sage: c = C.random_element() sage: Chan = channels.StaticErrorRateChannel(C.ambient_space(), 2) diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py index 0fec133b5b9..f8f6326a730 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py @@ -66,8 +66,8 @@ class should inherit from this class. Also ``AbstractLinearCode`` should never A ``LinearCode`` is instantiated by providing a generator matrix:: sage: M = matrix(GF(2), [[1, 0, 0, 1, 0],\ - [0, 1, 0, 1, 1],\ - [0, 0, 1, 1, 1]]) + ....: [0, 1, 0, 1, 1],\ + ....: [0, 0, 1, 1, 1]]) sage: C = codes.LinearCode(M) sage: C [5, 3] linear code over GF(2) diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 9bf754db170..47dc3ee0001 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -525,7 +525,7 @@ def systematic_generator_matrix(self, systematic_positions=None): EXAMPLES:: sage: G = matrix(GF(3), [[ 1, 2, 1, 0],\ - [ 2, 1, 1, 1]]) + ....: [ 2, 1, 1, 1]]) sage: C = LinearCode(G) sage: C.generator_matrix() [1 2 1 0] @@ -577,8 +577,8 @@ def standard_form(self, return_permutation=True): sage: Cs is C True sage: C = LinearCode(matrix(GF(2), [[1,0,0,0,1,1,0],\ - [0,1,0,1,0,1,0],\ - [0,0,0,0,0,0,1]])) + ....: [0,1,0,1,0,1,0],\ + ....: [0,0,0,0,0,0,1]])) sage: Cs, p = C.standard_form() sage: p [1, 2, 7, 3, 4, 5, 6] @@ -627,7 +627,7 @@ def redundancy_matrix(self): [1 1 0] [1 1 1] sage: C = LinearCode(matrix(GF(3),2,[1,2,0,\ - 2,1,1])) + ....: 2,1,1])) sage: C.systematic_generator_matrix() [1 2 0] [0 0 1] @@ -1053,9 +1053,9 @@ class LinearCodeSystematicEncoder(Encoder): sage: LCSE = codes.encoders.LinearCodeSystematicEncoder sage: G = Matrix(GF(2), [[1,1,1,0,0,0,0,0],\ - [1,0,0,1,1,0,0,0],\ - [0,1,0,1,0,1,0,0],\ - [1,1,0,1,0,0,1,1]]) + ....: [1,0,0,1,1,0,0,0],\ + ....: [0,1,0,1,0,1,0,0],\ + ....: [1,1,0,1,0,0,1,1]]) sage: C = LinearCode(G) sage: E = LCSE(C) sage: E.generator_matrix() @@ -1207,9 +1207,9 @@ def generator_matrix(self): sage: LCSE = codes.encoders.LinearCodeSystematicEncoder sage: G = Matrix(GF(2), [[1,1,1,0,0,0,0],\ - [1,0,0,1,1,0,0],\ - [0,1,0,1,0,1,0],\ - [1,1,0,1,0,0,1]]) + ....: [1,0,0,1,1,0,0],\ + ....: [0,1,0,1,0,1,0],\ + ....: [1,1,0,1,0,0,1]]) sage: C = LinearCode(G) sage: E = LCSE(C) sage: E.generator_matrix() @@ -1230,9 +1230,9 @@ def generator_matrix(self): Another example where there is no generator matrix of the form `[I \vert H]`:: sage: G = Matrix(GF(2), [[1,1,0,0,1,0,1],\ - [1,1,0,0,1,0,0],\ - [0,0,1,0,0,1,0],\ - [0,0,1,0,1,0,1]]) + ....: [1,1,0,0,1,0,0],\ + ....: [0,0,1,0,0,1,0],\ + ....: [0,0,1,0,1,0,1]]) sage: C = LinearCode(G) sage: E = LCSE(C) sage: E.generator_matrix() @@ -1277,8 +1277,8 @@ def systematic_permutation(self): EXAMPLES:: sage: C = LinearCode(matrix(GF(2), [[1,0,0,0,1,1,0],\ - [0,1,0,1,0,1,0],\ - [0,0,0,0,0,0,1]])) + ....: [0,1,0,1,0,1,0],\ + ....: [0,0,0,0,0,0,1]])) sage: E = codes.encoders.LinearCodeSystematicEncoder(C) sage: E.systematic_positions() (0, 1, 6) @@ -1309,9 +1309,9 @@ def systematic_positions(self): sage: LCSE = codes.encoders.LinearCodeSystematicEncoder sage: G = Matrix(GF(2), [[1,1,1,0,0,0,0],\ - [1,0,0,1,1,0,0],\ - [0,1,0,1,0,1,0],\ - [1,1,0,1,0,0,1]]) + ....: [1,0,0,1,1,0,0],\ + ....: [0,1,0,1,0,1,0],\ + ....: [1,1,0,1,0,0,1]]) sage: C = LinearCode(G) sage: E = LCSE(C) sage: E.systematic_positions() @@ -1320,9 +1320,9 @@ def systematic_positions(self): We take another matrix with a less nice shape:: sage: G = Matrix(GF(2), [[1,1,0,0,1,0,1],\ - [1,1,0,0,1,0,0],\ - [0,0,1,0,0,1,0],\ - [0,0,1,0,1,0,1]]) + ....: [1,1,0,0,1,0,0],\ + ....: [0,0,1,0,0,1,0],\ + ....: [0,0,1,0,1,0,1]]) sage: C = LinearCode(G) sage: E = LCSE(C) sage: E.systematic_positions() @@ -1343,8 +1343,8 @@ def systematic_positions(self): positions (even if another choice might also be systematic):: sage: G = Matrix(GF(2), [[1,0,0,0],\ - [0,1,0,0],\ - [0,0,1,1]]) + ....: [0,1,0,0],\ + ....: [0,0,1,1]]) sage: C = LinearCode(G) sage: E = LCSE(C, systematic_positions=[0,1,3]) sage: E.systematic_positions() diff --git a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx index f5912e83690..43eeecf4c0c 100644 --- a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx +++ b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx @@ -267,7 +267,7 @@ def generalised_quadrangle_hermitian_with_ovoid(const int q): TESTS:: sage: from sage.combinat.designs.gen_quadrangles_with_spread import \ - is_GQ_with_spread, dual_GQ_ovoid + ....: is_GQ_with_spread, dual_GQ_ovoid sage: t = designs.generalised_quadrangle_hermitian_with_ovoid(3) sage: t = dual_GQ_ovoid(*t) sage: is_GQ_with_spread(*t, s=3, t=9) diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index 962c21e12cd..f3950cde06b 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -1821,8 +1821,8 @@ def parallel_dispatch(self): canceled:: sage: from tempfile import NamedTemporaryFile as NTF - sage: with NTF(suffix='.py', mode='w+t') as f1, \ - ....: NTF(suffix='.py', mode='w+t') as f2: + sage: with (NTF(suffix='.py', mode='w+t') as f1, + ....: NTF(suffix='.py', mode='w+t') as f2): ....: _ = f1.write("'''\nsage: import time; time.sleep(60)\n'''") ....: f1.flush() ....: _ = f2.write("'''\nsage: True\nFalse\n'''") diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 79a92835b26..05662691d16 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -880,26 +880,6 @@ def parse(self, string, *args): sage: ex.source 'for i in range(Integer(4)):\n print(i)\n' - Sage currently accepts backslashes as indicating that the end - of the current line should be joined to the next line. This - feature allows for breaking large integers over multiple lines - but is not standard for Python doctesting. It's not - guaranteed to persist:: - - sage: n = 1234\ - ....: 5678 - sage: print(n) - 12345678 - sage: type(n) - - - It also works without the line continuation:: - - sage: m = 8765\ - 4321 - sage: print(m) - 87654321 - Optional tags at the start of an example block persist to the end of the block (delimited by a blank line):: @@ -993,15 +973,15 @@ def parse(self, string, *args): sage: parse("::\n\n sage: # needs sage.combinat\n sage: from sage.geometry.polyhedron.combinatorial_polyhedron.conversions \\\n ....: import incidence_matrix_to_bit_rep_of_Vrep\n sage: P = polytopes.associahedron(['A',3])\n\n") ['::\n\n', - '', - (None, - 'from sage.geometry.polyhedron.combinatorial_polyhedron.conversions import incidence_matrix_to_bit_rep_of_Vrep\n', - 'from sage.geometry.polyhedron.combinatorial_polyhedron.conversions import incidence_matrix_to_bit_rep_of_Vrep\n'), - '', - (None, - "P = polytopes.associahedron(['A',3])\n", - "P = polytopes.associahedron(['A',Integer(3)])\n"), - '\n'] + '', + (None, + 'from sage.geometry.polyhedron.combinatorial_polyhedron.conversions \\\n import incidence_matrix_to_bit_rep_of_Vrep\n', + 'from sage.geometry.polyhedron.combinatorial_polyhedron.conversions import incidence_matrix_to_bit_rep_of_Vrep\n'), + '', + (None, + "P = polytopes.associahedron(['A',3])\n", + "P = polytopes.associahedron(['A',Integer(3)])\n"), + '\n'] sage: example4 = '::\n\n sage: C.minimum_distance(algorithm="guava") # optional - guava\n ...\n 24\n\n' sage: parsed4 = DTP.parse(example4) @@ -1016,20 +996,10 @@ def parse(self, string, *args): find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M) find_python_continuation = re.compile(r"^(\s*)\.\.\.([^\.])", re.M) python_prompt = re.compile(r"^(\s*)>>>", re.M) - backslash_replacer = re.compile(r"""(\s*)sage:(.*)\\\ * -\ *((\.){4}:)?\ *""") # The following are used to allow ... at the beginning of output ellipsis_tag = "" - # Hack for non-standard backslash line escapes accepted by the current - # doctest system. - m = backslash_replacer.search(string) - while m is not None: - g = m.groups() - string = string[:m.start()] + g[0] + "sage:" + g[1] + string[m.end():] - m = backslash_replacer.search(string, m.start()) - replace_ellipsis = not python_prompt.search(string) if replace_ellipsis: # There are no >>> prompts, so we can allow ... to begin the output diff --git a/src/sage/dynamics/arithmetic_dynamics/affine_ds.py b/src/sage/dynamics/arithmetic_dynamics/affine_ds.py index c9d9a0e5403..619d4b54447 100644 --- a/src/sage/dynamics/arithmetic_dynamics/affine_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/affine_ds.py @@ -519,7 +519,7 @@ def dynatomic_polynomial(self, period): sage: R. = QQ[] sage: Pc. = ProjectiveSpace(R, 1) sage: G = DynamicalSystem_projective([(1/2*c + 1/2)*x^2 + (-2*c)*x*y + 2*c*y^2 , \ - (1/4*c + 1/2)*x^2 + (-c - 1)*x*y + (c + 1)*y^2]) + ....: (1/4*c + 1/2)*x^2 + (-c - 1)*x*y + (c + 1)*y^2]) sage: G.dehomogenize(1).dynatomic_polynomial(2) (1/4*c + 1/4)*x^2 + (-c - 1/2)*x + c + 1 """ diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py index fa9d808fd33..05f712a4110 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py @@ -2259,10 +2259,10 @@ def canonical_height(self, P, **kwds): :: - sage: RSA768 = 123018668453011775513049495838496272077285356959533479219732245215\ - ....: 1726400507263657518745202199786469389956474942774063845925192557326303453731548\ - ....: 2685079170261221429134616704292143116022212404792747377940806653514195974598569\ - ....: 02143413 + sage: RSA768 = Integer('123018668453011775513049495838496272077285356959533479219732245215' + ....: '1726400507263657518745202199786469389956474942774063845925192557326303453731548' + ....: '2685079170261221429134616704292143116022212404792747377940806653514195974598569' + ....: '02143413') sage: P. = ProjectiveSpace(QQ,1) sage: f = DynamicalSystem_projective([RSA768*x^2 + y^2, x*y]) sage: Q = P(RSA768,1) diff --git a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py index 0a1a5ba1526..fab391ececf 100644 --- a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py +++ b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py @@ -205,11 +205,11 @@ def _check_satisfies_equations(self, P): sage: P. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 \ - + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ + ....: 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0 * y0 + x1 * y1 + x2 * y2 sage: X = WehlerK3Surface([Z, Y]) sage: X._check_satisfies_equations([0, 0, 1, 1, 0, 0]) @@ -219,11 +219,11 @@ def _check_satisfies_equations(self, P): sage: P. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 \ - + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ + ....: 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: X._check_satisfies_equations([0, 1, 1, 1, 0, 0]) @@ -262,7 +262,7 @@ def _Lcoeff(self, component, i): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X._Lcoeff(0, 0) y0 @@ -272,7 +272,7 @@ def _Lcoeff(self, component, i): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z =x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X._Lcoeff(1, 0) x0 @@ -312,7 +312,7 @@ def _Qcoeff(self, component, i, j): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X._Qcoeff(0, 0, 0) y0*y1 + y2^2 @@ -322,7 +322,7 @@ def _Qcoeff(self, component, i, j): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X._Qcoeff(1, 1, 0) x0^2 @@ -360,7 +360,7 @@ def Gpoly(self, component, k): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X.Gpoly(1, 0) x0^2*x1^2 + x1^4 - x0*x1^2*x2 + x1^3*x2 + x1^2*x2^2 + x2^4 @@ -406,7 +406,7 @@ def Hpoly(self, component, i, j): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 \ - + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X.Hpoly(0, 1, 0) 2*y0*y1^3 + 2*y0*y1*y2^2 - y1*y2^3 @@ -449,10 +449,10 @@ def Lxa(self, a): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 \ - + 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - \ - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ - + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ - + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - \ + ....: x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ + ....: + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ + ....: + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(1, 1, 0, 1, 0, 0) @@ -489,9 +489,9 @@ def Qxa(self, a): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 \ - - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ - + 5*x0*x2*y0*y2 \ - - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ + ....: + 5*x0*x2*y0*y2 \ + ....: - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(1, 1, 0, 1, 0, 0) @@ -528,10 +528,10 @@ def Sxa(self, a): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 \ - + 3*x0*x1*y0*y1 \ - - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ - + 5*x0*x2*y0*y2 \ - - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 3*x0*x1*y0*y1 \ + ....: - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ + ....: + 5*x0*x2*y0*y2 \ + ....: - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) @@ -566,10 +566,10 @@ def Lyb(self, b): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z =x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 \ - + 3*x0*x1*y0*y1 \ - - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ - + 5*x0*x2*y0*y2 \ - - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 3*x0*x1*y0*y1 \ + ....: - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 \ + ....: + 5*x0*x2*y0*y2 \ + ....: - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) @@ -607,9 +607,9 @@ def Qyb(self, b): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 \ - + 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ - + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: + 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ + ....: + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(1, 1, 0, 1, 0, 0) @@ -645,9 +645,9 @@ def Syb(self, b): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ - + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 \ + ....: + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0 * y0 + x1 * y1 + x2 * y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(1, 1, 0, 1, 0, 0) @@ -721,7 +721,7 @@ def is_degenerate(self): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 + x2^2*y2^2 + \ - x2^2*y1^2 + x1^2*y2^2 + ....: x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X.is_degenerate() True @@ -730,8 +730,8 @@ def is_degenerate(self): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ + ....: 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: X.is_degenerate() @@ -741,8 +741,8 @@ def is_degenerate(self): sage: PP. = ProductProjectiveSpaces([2, 2], GF(3)) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ + ....: 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: X.is_degenerate() @@ -801,7 +801,7 @@ def degenerate_fibers(self): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 + x2^2*y2^2\ - + x2^2*y1^2 + x1^2*y2^2 + ....: + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X.degenerate_fibers() [[], [(1 : 0 : 0)]] @@ -824,7 +824,7 @@ def degenerate_fibers(self): sage: R = PP.coordinate_ring() sage: l = y0*x0 + y1*x1 + (y0 - y1)*x2 sage: q = (y1*y0 + y2^2)*x0^2 + ((y0^2 - y2*y1)*x1 + (y0^2 + (y1^2 - y2^2))*x2)*x0 \ - + (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 + ....: + (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 sage: X = WehlerK3Surface([l,q]) sage: X.degenerate_fibers() [[(-1 : 1 : 1), (0 : 0 : 1)], [(-1 : -1 : 1), (0 : 0 : 1)]] @@ -928,9 +928,9 @@ def degenerate_primes(self, check=True): sage: R. = PolynomialRing(QQ, 6) sage: L = y0*x0 + (y1*x1 + y2*x2) sage: Q = (2*y0^2 + y2*y0 + (2*y1^2 + y2^2))*x0^2 + ((y0^2 + y1*y0 + \ - (y1^2 + 2*y2*y1 + y2^2))*x1 + (2*y1^2 + y2*y1 + y2^2)*x2)*x0 + ((2*y0^2\ - + (y1 + 2*y2)*y0 + (2*y1^2 + y2*y1))*x1^2 + ((2*y1 + 2*y2)*y0 + (y1^2 + \ - y2*y1 + 2*y2^2))*x2*x1 + (2*y0^2 + y1*y0 + (2*y1^2 + y2^2))*x2^2) + ....: (y1^2 + 2*y2*y1 + y2^2))*x1 + (2*y1^2 + y2*y1 + y2^2)*x2)*x0 + ((2*y0^2\ + ....: + (y1 + 2*y2)*y0 + (2*y1^2 + y2*y1))*x1^2 + ((2*y1 + 2*y2)*y0 + (y1^2 + \ + ....: y2*y1 + 2*y2^2))*x2*x1 + (2*y0^2 + y1*y0 + (2*y1^2 + y2^2))*x2^2) sage: X = WehlerK3Surface([L, Q]) sage: X.degenerate_primes() [2, 3, 5, 11, 23, 47, 48747691, 111301831] @@ -1019,7 +1019,7 @@ def is_smooth(self): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = x0^2*y0*y1 + x0^2*y2^2 - x0*x1*y1*y2 + x1^2*y2*y1 +\ - x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 + ....: x2^2*y2^2 + x2^2*y1^2 + x1^2*y2^2 sage: X = WehlerK3Surface([Z, Y]) sage: X.is_smooth() False @@ -1028,9 +1028,9 @@ def is_smooth(self): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: X.is_smooth() @@ -1083,9 +1083,9 @@ def sigmaX(self, P, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 +\ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -\ - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 +\ - 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -\ + ....: 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 +\ + ....: 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(0, 0, 1, 1, 0, 0) @@ -1097,7 +1097,7 @@ def sigmaX(self, P, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: l = y0*x0 + y1*x1 + (y0 - y1)*x2 sage: q = (y1*y0)*x0^2 + ((y0^2)*x1 + (y0^2 + (y1^2 - y2^2))*x2)*x0\ - + (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 + ....: + (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 sage: X = WehlerK3Surface([l, q]) sage: X.sigmaX(X([1, 0, 0, 0, 1, -2])) (1 : 0 : 0 , 0 : 1/2 : 1) @@ -1330,9 +1330,9 @@ def sigmaY(self, P, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(0, 0, 1, 1, 0, 0) @@ -1344,7 +1344,7 @@ def sigmaY(self, P, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: l = y0*x0 + y1*x1 + (y0 - y1)*x2 sage: q = (y1*y0)*x0^2 + ((y0^2)*x1 + (y0^2 + (y1^2 - y2^2))*x2)*x0 +\ - (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 + ....: (y2*y0 + y1^2)*x1^2 + (y0^2 + (-y1^2 + y2^2))*x2*x1 sage: X = WehlerK3Surface([l, q]) sage: X.sigmaY(X([1, -1, 0 ,-1, -1, 1])) (1/10 : -1/10 : 1 , -1 : -1 : 1) @@ -1567,9 +1567,9 @@ def phi(self, a, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP([0, 0, 1, 1 ,0, 0]) @@ -1607,9 +1607,9 @@ def psi(self, a, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP([0, 0, 1, 1, 0, 0]) @@ -1652,8 +1652,8 @@ def lambda_plus(self, P, v, N, m, n, prec=100): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1\ - - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2\ - - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2\ + ....: - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: P = X([0, 0, 1, 1, 0, 0]) @@ -1752,8 +1752,8 @@ def lambda_minus(self, P, v, N, m, n, prec=100): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 \ - - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2\ - - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2\ + ....: - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: P = X([0, 0, 1, 1, 0, 0]) @@ -1845,8 +1845,8 @@ def canonical_height_plus(self, P, N, badprimes=None, prec=100): sage: R. = PolynomialRing(QQ, 6) sage: L = (-y0 - y1)*x0 + (-y0*x1 - y2*x2) sage: Q = (-y2*y0 - y1^2)*x0^2 + ((-y0^2 - y2*y0 + (-y2*y1 - y2^2))*x1 + \ - (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 \ - + (-y0^2 + (-y1 - y2)*y0)*x2^2) + ....: (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 \ + ....: + (-y0^2 + (-y1 - y2)*y0)*x2^2) sage: X = WehlerK3Surface([L, Q]) sage: P = X([1, 0, -1, 1, -1, 0]) #order 16 sage: X.canonical_height_plus(P, 5) # long time @@ -1857,9 +1857,9 @@ def canonical_height_plus(self, P, N, badprimes=None, prec=100): sage: set_verbose(None) sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: P = X([0, 1, 0, 0, 0, 1]) @@ -1909,8 +1909,8 @@ def canonical_height_minus(self, P, N, badprimes=None, prec=100): sage: R. = PolynomialRing(QQ, 6) sage: L = (-y0 - y1)*x0 + (-y0*x1 - y2*x2) sage: Q = (-y2*y0 - y1^2)*x0^2 + ((-y0^2 - y2*y0 + (-y2*y1 - y2^2))*x1\ - + (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1\ - + (-y0^2 + (-y1 - y2)*y0)*x2^2) + ....: + (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1\ + ....: + (-y0^2 + (-y1 - y2)*y0)*x2^2) sage: X = WehlerK3Surface([L, Q]) sage: P = X([1, 0, -1, 1, -1, 0]) #order 16 sage: X.canonical_height_minus(P, 5) # long time @@ -1921,9 +1921,9 @@ def canonical_height_minus(self, P, N, badprimes=None, prec=100): sage: set_verbose(None) sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 +\ - 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ - x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ + ....: 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ + ....: x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: P = X([0, 1, 0, 0, 0, 1]) @@ -1971,8 +1971,8 @@ def canonical_height(self, P, N, badprimes=None, prec=100): sage: R. = PolynomialRing(QQ, 6) sage: L = (-y0 - y1)*x0 + (-y0*x1 - y2*x2) sage: Q = (-y2*y0 - y1^2)*x0^2 + ((-y0^2 - y2*y0 + (-y2*y1 - y2^2))*x1 + \ - (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 \ - + (-y0^2 + (-y1 - y2)*y0)*x2^2) + ....: (-y0^2 - y2*y1)*x2)*x0 + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 \ + ....: + (-y0^2 + (-y1 - y2)*y0)*x2^2) sage: X = WehlerK3Surface([L, Q]) sage: P = X([1, 0, -1, 1,- 1, 0]) #order 16 sage: X.canonical_height(P, 5) # long time @@ -1983,8 +1983,8 @@ def canonical_height(self, P, N, badprimes=None, prec=100): sage: set_verbose(None) sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 \ - -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 \ + ....: -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: P = X(0, 1, 0, 0, 0, 1) @@ -2016,7 +2016,7 @@ def fiber(self, p, component): sage: R. = PolynomialRing(ZZ, 6) sage: Y = x0*y0 + x1*y1 - x2*y2 sage: Z = y0^2*x0*x1 + y0^2*x2^2 - y0*y1*x1*x2 + y1^2*x2*x1 + y2^2*x2^2 +\ - y2^2*x1^2 + y1^2*x2^2 + ....: y2^2*x1^2 + y1^2*x2^2 sage: X = WehlerK3Surface([Z, Y]) sage: Proj = ProjectiveSpace(QQ, 2) sage: P = Proj([1, 0, 0]) @@ -2029,8 +2029,8 @@ def fiber(self, p, component): sage: P. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 - \ - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - \ + ....: 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: Proj = P[0] @@ -2220,7 +2220,7 @@ def nth_iterate_phi(self, P, n, **kwds): sage: R.=PolynomialRing(QQ, 6) sage: L = (-y0 - y1)*x0 + (-y0*x1 - y2*x2) sage: Q = (-y2*y0 - y1^2)*x0^2 + ((-y0^2 - y2*y0 + (-y2*y1 - y2^2))*x1 + (-y0^2 - y2*y1)*x2)*x0 \ - + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 + (-y0^2 + (-y1 - y2)*y0)*x2^2) + ....: + ((-y0^2 - y2*y0 - y2^2)*x1^2 + (-y2*y0 - y1^2)*x2*x1 + (-y0^2 + (-y1 - y2)*y0)*x2^2) sage: X = WehlerK3Surface([L, Q]) sage: P = X([1, 0, -1, 1, -1, 0]) sage: X.nth_iterate_phi(P, 8) == X.nth_iterate_psi(P, 8) @@ -2320,9 +2320,9 @@ def orbit_phi(self, P, N, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ - x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ + ....: 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ + ....: x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP(0, 0, 1, 1, 0, 0) @@ -2379,9 +2379,9 @@ def orbit_psi(self, P, N, **kwds): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ - x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 - \ + ....: 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + \ + ....: x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = X(0, 0, 1, 1, 0, 0) @@ -2425,9 +2425,9 @@ def is_isomorphic(self, right): sage: PP. = ProductProjectiveSpaces([2, 2], QQ) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 - 4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: W = WehlerK3Surface([Z + Y^2, Y]) @@ -2464,8 +2464,8 @@ def is_symmetric_orbit(self, orbit): sage: PP. = ProductProjectiveSpaces([2, 2], GF(7)) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + 3*x0*x1*y0*y1 \ - -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 \ - -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: -2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 -4*x1*x2*y1^2 + 5*x0*x2*y0*y2 \ + ....: -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: T = PP([0, 0, 1, 1, 0, 0]) @@ -2518,9 +2518,9 @@ def cardinality( self): sage: PP. = ProductProjectiveSpaces([2, 2], GF(7)) sage: Z = x0^2*y0^2 + 3*x0*x1*y0^2 + x1^2*y0^2 + 4*x0^2*y0*y1 + \ - 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ - - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ - + x0*x1*y2^2 + 3*x2^2*y2^2 + ....: 3*x0*x1*y0*y1 - 2*x2^2*y0*y1 - x0^2*y1^2 + 2*x1^2*y1^2 - x0*x2*y1^2 \ + ....: - 4*x1*x2*y1^2 + 5*x0*x2*y0*y2 -4*x1*x2*y0*y2 + 7*x0^2*y1*y2 + 4*x1^2*y1*y2 \ + ....: + x0*x1*y2^2 + 3*x2^2*y2^2 sage: Y = x0*y0 + x1*y1 + x2*y2 sage: X = WehlerK3Surface([Z, Y]) sage: X.cardinality() diff --git a/src/sage/features/__init__.py b/src/sage/features/__init__.py index ac4a0bcd97f..8d3f67efae7 100644 --- a/src/sage/features/__init__.py +++ b/src/sage/features/__init__.py @@ -820,9 +820,9 @@ def absolute_filename(self) -> str: A :exc:`FeatureNotPresentError` is raised if the file cannot be found:: sage: from sage.features import StaticFile - sage: StaticFile(name='no_such_file', filename='KaT1aihu',\ - search_path=(), spkg='some_spkg',\ - url='http://rand.om').absolute_filename() # optional - sage_spkg + sage: StaticFile(name='no_such_file', filename='KaT1aihu', # optional - sage_spkg + ....: search_path=(), spkg='some_spkg', + ....: url='http://rand.om').absolute_filename() Traceback (most recent call last): ... FeatureNotPresentError: no_such_file is not available. diff --git a/src/sage/geometry/polyhedron/base4.py b/src/sage/geometry/polyhedron/base4.py index ea0423c60fe..55a20537607 100644 --- a/src/sage/geometry/polyhedron/base4.py +++ b/src/sage/geometry/polyhedron/base4.py @@ -1126,10 +1126,10 @@ def is_combinatorially_isomorphic(self, other, algorithm='bipartite_graph'): Two polytopes with the same `f`-vector, but different combinatorial types:: sage: P = Polyhedron([[-605520/1525633, -605520/1525633, -1261500/1525633, -52200/1525633, 11833/1525633],\ - [-720/1769, -600/1769, 1500/1769, 0, -31/1769], [-216/749, 240/749, -240/749, -432/749, 461/749], \ - [-50/181, 50/181, 60/181, -100/181, -119/181], [-32/51, -16/51, -4/51, 12/17, 1/17],\ - [1, 0, 0, 0, 0], [16/129, 128/129, 0, 0, 1/129], [64/267, -128/267, 24/89, -128/267, 57/89],\ - [1200/3953, -1200/3953, -1440/3953, -360/3953, -3247/3953], [1512/5597, 1512/5597, 588/5597, 4704/5597, 2069/5597]]) + ....: [-720/1769, -600/1769, 1500/1769, 0, -31/1769], [-216/749, 240/749, -240/749, -432/749, 461/749], \ + ....: [-50/181, 50/181, 60/181, -100/181, -119/181], [-32/51, -16/51, -4/51, 12/17, 1/17],\ + ....: [1, 0, 0, 0, 0], [16/129, 128/129, 0, 0, 1/129], [64/267, -128/267, 24/89, -128/267, 57/89],\ + ....: [1200/3953, -1200/3953, -1440/3953, -360/3953, -3247/3953], [1512/5597, 1512/5597, 588/5597, 4704/5597, 2069/5597]]) sage: C = polytopes.cyclic_polytope(5,10) sage: C.f_vector() == P.f_vector(); C.f_vector() True diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index e60f444a089..3e8354d925d 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -104,7 +104,7 @@ :: sage: d = {0: [1,4,5], 1: [2,6], 2: [3,7], 3: [4,8], 4: [9], \ - 5: [7, 8], 6: [8,9], 7: [9]} + ....: 5: [7, 8], 6: [8,9], 7: [9]} sage: G = Graph(d); G Graph on 10 vertices sage: G.plot().show() # or G.show() # needs sage.plot @@ -308,7 +308,7 @@ objects for entries, one can make that association:: sage: d = {0 : graphs.DodecahedralGraph(), 1 : graphs.FlowerSnark(), \ - 2 : graphs.MoebiusKantorGraph(), 3 : graphs.PetersenGraph() } + ....: 2 : graphs.MoebiusKantorGraph(), 3 : graphs.PetersenGraph() } sage: d[2] Moebius-Kantor Graph: Graph on 16 vertices sage: T = graphs.TetrahedralGraph() diff --git a/src/sage/groups/conjugacy_classes.py b/src/sage/groups/conjugacy_classes.py index 2208389e17d..2bb655c926d 100644 --- a/src/sage/groups/conjugacy_classes.py +++ b/src/sage/groups/conjugacy_classes.py @@ -249,12 +249,12 @@ def set(self): sage: h = H(matrix(F,2,[1,2, -1, 1])) sage: C = ConjugacyClass(H,h) sage: S = [[[3, 2], [2, 4]], [[0, 1], [2, 2]], [[3, 4], [1, 4]],\ - [[0, 3], [4, 2]], [[1, 2], [4, 1]], [[2, 1], [2, 0]],\ - [[4, 1], [4, 3]], [[4, 4], [1, 3]], [[2, 4], [3, 0]],\ - [[1, 4], [2, 1]], [[3, 3], [3, 4]], [[2, 3], [4, 0]],\ - [[0, 2], [1, 2]], [[1, 3], [1, 1]], [[4, 3], [3, 3]],\ - [[4, 2], [2, 3]], [[0, 4], [3, 2]], [[1, 1], [3, 1]],\ - [[2, 2], [1, 0]], [[3, 1], [4, 4]]] + ....: [[0, 3], [4, 2]], [[1, 2], [4, 1]], [[2, 1], [2, 0]],\ + ....: [[4, 1], [4, 3]], [[4, 4], [1, 3]], [[2, 4], [3, 0]],\ + ....: [[1, 4], [2, 1]], [[3, 3], [3, 4]], [[2, 3], [4, 0]],\ + ....: [[0, 2], [1, 2]], [[1, 3], [1, 1]], [[4, 3], [3, 3]],\ + ....: [[4, 2], [2, 3]], [[0, 4], [3, 2]], [[1, 1], [3, 1]],\ + ....: [[2, 2], [1, 0]], [[3, 1], [4, 4]]] sage: C.set() == Set(H(x) for x in S) True diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index d004cdf98e2..64e9d27ea27 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -55,17 +55,17 @@ cdef class Group(Parent): sage: from sage.groups.group import Group sage: G = Group() sage: TestSuite(G).run(skip = ["_test_an_element",\ - "_test_associativity",\ - "_test_elements",\ - "_test_elements_eq_reflexive",\ - "_test_elements_eq_symmetric",\ - "_test_elements_eq_transitive",\ - "_test_elements_neq",\ - "_test_inverse",\ - "_test_one",\ - "_test_pickling",\ - "_test_prod",\ - "_test_some_elements"]) + ....: "_test_associativity",\ + ....: "_test_elements",\ + ....: "_test_elements_eq_reflexive",\ + ....: "_test_elements_eq_symmetric",\ + ....: "_test_elements_eq_transitive",\ + ....: "_test_elements_neq",\ + ....: "_test_inverse",\ + ....: "_test_one",\ + ....: "_test_pickling",\ + ....: "_test_prod",\ + ....: "_test_some_elements"]) Generic groups have very little functionality:: diff --git a/src/sage/interfaces/qepcad.py b/src/sage/interfaces/qepcad.py index df9f1583c86..2afac1b01c5 100644 --- a/src/sage/interfaces/qepcad.py +++ b/src/sage/interfaces/qepcad.py @@ -830,9 +830,9 @@ def __init__(self, formula, sage: (x, y, z) = var('x, y, z') sage: conds = [-z < 0, -y + z < 0, x^2 + x*y + 2*x*z + 2*y*z - x < 0, \ - x^2 + x*y + 3*x*z + 2*y*z + 2*z^2 - x - z < 0, \ - -2*x + 1 < 0, -x*y - x*z - 2*y*z - 2*z^2 + z < 0, \ - x + 3*y + 3*z - 1 < 0] + ....: x^2 + x*y + 3*x*z + 2*y*z + 2*z^2 - x - z < 0, \ + ....: -2*x + 1 < 0, -x*y - x*z - 2*y*z - 2*z^2 + z < 0, \ + ....: x + 3*y + 3*z - 1 < 0] sage: qepcad(conds, memcells=3000000) # optional - qepcad 2 x - 1 > 0 /\ z > 0 /\ z - y < 0 /\ 3 z + 3 y + x - 1 < 0 """ diff --git a/src/sage/knots/knotinfo.py b/src/sage/knots/knotinfo.py index c57777bb2c2..d2ccaa0468a 100644 --- a/src/sage/knots/knotinfo.py +++ b/src/sage/knots/knotinfo.py @@ -1427,7 +1427,7 @@ def homfly_polynomial(self, var1='v', var2='z', original=False): sage: H = KnotInfo.L11n459_1_1_1.homfly_polynomial() # optional - database_knotinfo sage: all(L.homfly_polynomial() == L.link().homfly_polynomial(normalization='vz')\ - for L in KnotInfo if L.crossing_number() < 7) + ....: for L in KnotInfo if L.crossing_number() < 7) True REFERENCES: diff --git a/src/sage/libs/ntl/ntl_mat_GF2.pyx b/src/sage/libs/ntl/ntl_mat_GF2.pyx index dd910a567c0..57f5300845c 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2.pyx +++ b/src/sage/libs/ntl/ntl_mat_GF2.pyx @@ -506,9 +506,9 @@ cdef class ntl_mat_GF2(): EXAMPLES:: sage: l = [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, \ - 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, \ - 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, \ - 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0] + ....: 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, \ + ....: 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, \ + ....: 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0] sage: A = ntl.mat_GF2(8,8,l) sage: E = ~A*A sage: E.IsIdent() diff --git a/src/sage/manifolds/differentiable/affine_connection.py b/src/sage/manifolds/differentiable/affine_connection.py index a52c82ee1cc..f2944602f40 100644 --- a/src/sage/manifolds/differentiable/affine_connection.py +++ b/src/sage/manifolds/differentiable/affine_connection.py @@ -372,7 +372,7 @@ def __init__(self, domain, name, latex_name=None): sage: M = Manifold(3, 'M') sage: from sage.manifolds.differentiable.affine_connection import \ - AffineConnection + ....: AffineConnection sage: nab = AffineConnection(M, 'nabla', latex_name=r'\nabla') sage: nab Affine connection nabla on the 3-dimensional differentiable diff --git a/src/sage/matrix/matrix_polynomial_dense.pyx b/src/sage/matrix/matrix_polynomial_dense.pyx index 99979a37ed8..81cfe8163ce 100644 --- a/src/sage/matrix/matrix_polynomial_dense.pyx +++ b/src/sage/matrix/matrix_polynomial_dense.pyx @@ -4116,8 +4116,8 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): completed row-wise into a `3 \times 3` unimodular matrix:: sage: mat = matrix(ring, 2, 3, \ - [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ - [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) + ....: [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ + ....: [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) sage: rcomp = mat._basis_completion_via_reversed_approx(); rcomp [ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x] sage: mat.stack(rcomp).determinant() @@ -4128,9 +4128,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): completion has two columns; in both cases, the Smith form is preserved:: sage: mat = matrix(ring, 3, 2, \ - [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ - [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ - [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) + ....: [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ + ....: [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ + ....: [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) sage: mat.smith_form(transformation=False) [x + 3 0] [ 0 0] @@ -4327,8 +4327,8 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): there is nothing to complete):: sage: mat = matrix(ring, 2, 3, \ - [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ - [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) + ....: [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ + ....: [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) sage: rcomp = mat.basis_completion(); rcomp [ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x] sage: mat.stack(rcomp).determinant() @@ -4341,9 +4341,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): completion has two columns; in both cases, the Smith form is preserved:: sage: mat = matrix(ring, 3, 2, \ - [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ - [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ - [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) + ....: [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ + ....: [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ + ....: [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) sage: mat.smith_form(transformation=False) [x + 3 0] [ 0 0] @@ -4378,8 +4378,8 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): 1 sage: mat = matrix([[x*(x-1), x*(x-2)], \ - [x*(x-2), x*(x-3)], \ - [(x-1)*(x-2), (x-1)*(x-3)]]) + ....: [x*(x-2), x*(x-3)], \ + ....: [(x-1)*(x-2), (x-1)*(x-3)]]) sage: mat.smith_form(transformation=False) [1 0] [0 x] @@ -4496,14 +4496,14 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): sage: ring. = GF(7)[] sage: mat1 = matrix([[x*(x-1)*(x-2), (x-2)*(x-3)*(x-4), (x-4)*(x-5)*(x-6)]]) sage: rcomp1 = matrix(ring, 2, 3, \ - [[5*x^2 + 4*x + 1, 5*x^2 + 2*x, 5*x^2], \ - [2*x^3 + 4*x^2, 2*x^3 + 6*x^2 + 2*x + 1, 2*x^3 + x^2 + 3*x]]) + ....: [[5*x^2 + 4*x + 1, 5*x^2 + 2*x, 5*x^2], \ + ....: [2*x^3 + 4*x^2, 2*x^3 + 6*x^2 + 2*x + 1, 2*x^3 + x^2 + 3*x]]) sage: rcomp1._is_basis_completion(mat1) True sage: mat2 = matrix(ring, 2, 3, \ - [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ - [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) + ....: [[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4], \ + ....: [5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3]]) sage: rcomp2 = matrix(ring, 1, 3, [[2*x^2 + 1, 4*x^2 + 3*x, 2*x^2 + 3*x]]) sage: rcomp2._is_basis_completion(mat2) True @@ -4512,16 +4512,16 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): True sage: mat3 = matrix(ring, 3, 2, \ - [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ - [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ - [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) + ....: [[ x^3 + x^2 + 5*x + 5, 2*x^3 + 2*x + 4], \ + ....: [ 3*x^3 + 2*x^2 + x + 3, 6*x^3 + 5*x^2 + x + 1], \ + ....: [2*x^3 + 5*x^2 + 3*x + 4, 4*x^3 + 6*x^2 + 5*x + 6]]) sage: rcomp3 = matrix(ring, 1, 2, [[x + 1, 2*x]]) sage: rcomp3._is_basis_completion(mat3) True sage: ccomp3 = matrix(ring, 3, 2, \ - [[3*x + 1, 4*x + 4], \ - [ 2*x, 5*x + 1], \ - [ 6*x, x]]) + ....: [[3*x + 1, 4*x + 4], \ + ....: [ 2*x, 5*x + 1], \ + ....: [ 6*x, x]]) sage: ccomp3._is_basis_completion(mat3, row_wise=False) True diff --git a/src/sage/numerical/backends/glpk_backend.pyx b/src/sage/numerical/backends/glpk_backend.pyx index c70ac0bb0e0..db1212c5430 100644 --- a/src/sage/numerical/backends/glpk_backend.pyx +++ b/src/sage/numerical/backends/glpk_backend.pyx @@ -2322,7 +2322,7 @@ cdef class GLPKBackend(GenericBackend): EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='GLPK') + ....: solver='GLPK') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -2352,7 +2352,7 @@ cdef class GLPKBackend(GenericBackend): EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='GLPK') + ....: solver='GLPK') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -2383,7 +2383,7 @@ cdef class GLPKBackend(GenericBackend): EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='GLPK') + ....: solver='GLPK') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -2414,7 +2414,7 @@ cdef class GLPKBackend(GenericBackend): EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='GLPK') + ....: solver='GLPK') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) diff --git a/src/sage/numerical/backends/interactivelp_backend.pyx b/src/sage/numerical/backends/interactivelp_backend.pyx index 3519303a817..231e04a3e2c 100644 --- a/src/sage/numerical/backends/interactivelp_backend.pyx +++ b/src/sage/numerical/backends/interactivelp_backend.pyx @@ -1070,7 +1070,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -1100,7 +1100,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -1130,7 +1130,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -1160,7 +1160,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -1185,7 +1185,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) @@ -1218,7 +1218,7 @@ cdef class InteractiveLPBackend: EXAMPLES:: sage: p = MixedIntegerLinearProgram(maximization=True,\ - solver='InteractiveLP') + ....: solver='InteractiveLP') sage: x = p.new_variable(nonnegative=True) sage: p.add_constraint(-x[0] + x[1] <= 2) sage: p.add_constraint(8 * x[0] + 2 * x[1] <= 17) diff --git a/src/sage/rings/multi_power_series_ring.py b/src/sage/rings/multi_power_series_ring.py index 43f446a7e09..bd5cbf70a7e 100644 --- a/src/sage/rings/multi_power_series_ring.py +++ b/src/sage/rings/multi_power_series_ring.py @@ -59,11 +59,11 @@ sage: z = H.base_ring().gens() sage: f = H.gens() sage: h = 4*z[1]^2 + 2*z[0]*z[2] + z[1]*z[2] + z[2]^2 \ - + (-z[2]^2 - 2*z[0] + z[2])*f[0]*f[2] \ - + (-22*z[0]^2 + 2*z[1]^2 - z[0]*z[2] + z[2]^2 - 1955*z[2])*f[1]*f[2] \ - + (-z[0]*z[1] - 2*z[1]^2)*f[2]*f[3] \ - + (2*z[0]*z[1] + z[1]*z[2] - z[2]^2 - z[1] + 3*z[2])*f[3]^2 \ - + H.O(3) + ....: + (-z[2]^2 - 2*z[0] + z[2])*f[0]*f[2] \ + ....: + (-22*z[0]^2 + 2*z[1]^2 - z[0]*z[2] + z[2]^2 - 1955*z[2])*f[1]*f[2] \ + ....: + (-z[0]*z[1] - 2*z[1]^2)*f[2]*f[3] \ + ....: + (2*z[0]*z[1] + z[1]*z[2] - z[2]^2 - z[1] + 3*z[2])*f[3]^2 \ + ....: + H.O(3) sage: h in H True sage: h diff --git a/src/sage/rings/multi_power_series_ring_element.py b/src/sage/rings/multi_power_series_ring_element.py index 5f8bba84c49..00924fa3eae 100644 --- a/src/sage/rings/multi_power_series_ring_element.py +++ b/src/sage/rings/multi_power_series_ring_element.py @@ -1150,7 +1150,7 @@ def polynomial(self): Field sage: t = M.gens() sage: f = 1/2*t[0]^3*t[1]^3*t[2]^2 + 2/3*t[0]*t[2]^6*t[3] \ - - t[0]^3*t[1]^3*t[3]^3 - 1/4*t[0]*t[1]*t[2]^7 + M.O(10) + ....: - t[0]^3*t[1]^3*t[3]^3 - 1/4*t[0]*t[1]*t[2]^7 + M.O(10) sage: f 1/2*t0^3*t1^3*t2^2 + 2/3*t0*t2^6*t3 - t0^3*t1^3*t3^3 - 1/4*t0*t1*t2^7 + O(t0, t1, t2, t3)^10 @@ -1299,7 +1299,7 @@ def V(self, n): sage: H = QQ[['x,y,z']] sage: (x,y,z) = H.gens() sage: h = -x*y^4*z^7 - 1/4*y*z^12 + 1/2*x^7*y^5*z^2 \ - + 2/3*y^6*z^8 + H.O(15) + ....: + 2/3*y^6*z^8 + H.O(15) sage: h.V(3) -x^3*y^12*z^21 - 1/4*y^3*z^36 + 1/2*x^21*y^15*z^6 + 2/3*y^18*z^24 + O(x, y, z)^45 """ @@ -1382,7 +1382,7 @@ def truncate(self, prec=infinity): Multivariate Power Series Ring in t0, t1, t2, t3 over Rational Field sage: t = M.gens() sage: f = 1/2*t[0]^3*t[1]^3*t[2]^2 + 2/3*t[0]*t[2]^6*t[3] \ - - t[0]^3*t[1]^3*t[3]^3 - 1/4*t[0]*t[1]*t[2]^7 + M.O(10) + ....: - t[0]^3*t[1]^3*t[3]^3 - 1/4*t[0]*t[1]*t[2]^7 + M.O(10) sage: f 1/2*t0^3*t1^3*t2^2 + 2/3*t0*t2^6*t3 - t0^3*t1^3*t3^3 - 1/4*t0*t1*t2^7 + O(t0, t1, t2, t3)^10 diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index 87b4e2d081c..33ec08133bf 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -2422,7 +2422,7 @@ cdef class MPolynomial(CommutativePolynomial): sage: R. = PolynomialRing(QQ) sage: f = 19*x^8 - 262*x^7*h + 1507*x^6*h^2 - 4784*x^5*h^3 + 9202*x^4*h^4\ - -10962*x^3*h^5 + 7844*x^2*h^6 - 3040*x*h^7 + 475*h^8 + ....: -10962*x^3*h^5 + 7844*x^2*h^6 - 3040*x*h^7 + 475*h^8 sage: f.reduced_form(prec=200, smallest_coeffs=False) # needs sage.modules sage.rings.complex_interval_field ( -x^8 - 2*x^7*h + 7*x^6*h^2 + 16*x^5*h^3 + 2*x^4*h^4 - 2*x^3*h^5 + 4*x^2*h^6 - 5*h^8, diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal.py b/src/sage/rings/polynomial/multi_polynomial_ideal.py index 08bea926130..d5415a8bea4 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal.py +++ b/src/sage/rings/polynomial/multi_polynomial_ideal.py @@ -2733,15 +2733,15 @@ def _variety_triangular_decomposition(self, ring): sage: R.inject_variables() Defining... sage: I = Ideal([x1 + 1, x2, x3 + 1, x5*x10 + x10 + x18, x5*x11 + x11, \ - x5*x18, x6, x7 + 1, x9, x10*x11 + x10 + x18, x10*x18 + x18, \ - x11*x18, x12, x13, x14, x15, x16 + 1, x17 + x18 + 1, x19, x20, \ - x21 + 1, x22, x23, x24, x25 + 1, x28 + 1, x29 + 1, x30, x8, \ - x26, x1^2 + x1, x2^2 + x2, x3^2 + x3, x4^2 + x4, x5^2 + x5, \ - x6^2 + x6, x7^2 + x7, x8^2 + x8, x9^2 + x9, x10^2 + x10, \ - x11^2 + x11, x12^2 + x12, x13^2 + x13, x14^2 + x14, x15^2 + x15, \ - x16^2 + x16, x17^2 + x17, x18^2 + x18, x19^2 + x19, x20^2 + x20, \ - x21^2 + x21, x22^2 + x22, x23^2 + x23, x24^2 + x24, x25^2 + x25, \ - x26^2 + x26, x27^2 + x27, x28^2 + x28, x29^2 + x29, x30^2 + x30]) + ....: x5*x18, x6, x7 + 1, x9, x10*x11 + x10 + x18, x10*x18 + x18, \ + ....: x11*x18, x12, x13, x14, x15, x16 + 1, x17 + x18 + 1, x19, x20, \ + ....: x21 + 1, x22, x23, x24, x25 + 1, x28 + 1, x29 + 1, x30, x8, \ + ....: x26, x1^2 + x1, x2^2 + x2, x3^2 + x3, x4^2 + x4, x5^2 + x5, \ + ....: x6^2 + x6, x7^2 + x7, x8^2 + x8, x9^2 + x9, x10^2 + x10, \ + ....: x11^2 + x11, x12^2 + x12, x13^2 + x13, x14^2 + x14, x15^2 + x15, \ + ....: x16^2 + x16, x17^2 + x17, x18^2 + x18, x19^2 + x19, x20^2 + x20, \ + ....: x21^2 + x21, x22^2 + x22, x23^2 + x23, x24^2 + x24, x25^2 + x25, \ + ....: x26^2 + x26, x27^2 + x27, x28^2 + x28, x29^2 + x29, x30^2 + x30]) sage: I.basis_is_groebner() True sage: sorted("".join(str(V[g]) for g in R.gens()) for V in I.variety()) # long time (6s on sage.math, 2011) diff --git a/src/sage/rings/polynomial/pbori/gbcore.py b/src/sage/rings/polynomial/pbori/gbcore.py index 8371577157d..cdf5a0bd324 100644 --- a/src/sage/rings/polynomial/pbori/gbcore.py +++ b/src/sage/rings/polynomial/pbori/gbcore.py @@ -319,7 +319,7 @@ def variety_size_from_gb(I): sage: variety_size_from_gb([x(1)*x(2), x(2)*x(3)]) 5.0 sage: mons = [Monomial([r.variable(i) for i in range(100) if i!=j])\ - for j in range(100)] + ....: for j in range(100)] sage: variety_size_from_gb(mons) 1.2676506002282294e+30 """ diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index 6ec2880a627..f1e060f77b1 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -101,14 +101,14 @@ def __init__(self, C, category=None): Note: this is an abstract parent, so we skip element tests:: sage: TestSuite(J).run(skip =["_test_an_element", \ - "_test_zero", \ - "_test_elements", \ - "_test_elements_eq_reflexive", \ - "_test_elements_eq_symmetric", \ - "_test_elements_eq_transitive", \ - "_test_additive_associativity", \ - "_test_elements_neq", \ - "_test_some_elements"]) + ....: "_test_zero", \ + ....: "_test_elements", \ + ....: "_test_elements_eq_reflexive", \ + ....: "_test_elements_eq_symmetric", \ + ....: "_test_elements_eq_transitive", \ + ....: "_test_additive_associativity", \ + ....: "_test_elements_neq", \ + ....: "_test_some_elements"]) :: diff --git a/src/sage/schemes/product_projective/rational_point.py b/src/sage/schemes/product_projective/rational_point.py index 1f29206dfd1..0173fdee72c 100644 --- a/src/sage/schemes/product_projective/rational_point.py +++ b/src/sage/schemes/product_projective/rational_point.py @@ -16,7 +16,7 @@ sage: PP. = ProductProjectiveSpaces([1,0], QQ) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_rational_field + ....: enum_product_projective_rational_field sage: enum_product_projective_rational_field(PP, 3) [(-3 : 1 , 1), (-2 : 1 , 1), (-3/2 : 1 , 1), (-1 : 1 , 1), (-2/3 : 1 , 1), (-1/2 : 1 , 1), @@ -30,7 +30,7 @@ sage: P1. = ProductProjectiveSpaces([1, 1], GF(7)) sage: X = P1.subscheme([2*x + 3*y]) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_finite_field + ....: enum_product_projective_finite_field sage: enum_product_projective_finite_field(X) [(2 : 1 , 0 : 1), (2 : 1 , 1 : 0), (2 : 1 , 1 : 1), (2 : 1 , 2 : 1), (2 : 1 , 3 : 1), (2 : 1 , 4 : 1), @@ -89,7 +89,7 @@ def enum_product_projective_rational_field(X, B): sage: PP. = ProductProjectiveSpaces([1, 2], QQ) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_rational_field + ....: enum_product_projective_rational_field sage: enum_product_projective_rational_field(PP, 1) [(-1 : 1 , -1 : -1 : 1), (-1 : 1 , -1 : 0 : 1), (-1 : 1 , -1 : 1 : 0), (-1 : 1 , -1 : 1 : 1), (-1 : 1 , 0 : -1 : 1), (-1 : 1 , 0 : 0 : 1), @@ -115,7 +115,7 @@ def enum_product_projective_rational_field(X, B): sage: PP. = ProductProjectiveSpaces([2, 1], QQ) sage: X = PP.subscheme([x^2 + x*y + y*z, u*u - v*u]) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_rational_field + ....: enum_product_projective_rational_field sage: enum_product_projective_rational_field(X, 4) [(-2 : 4 : 1 , 0 : 1), (-2 : 4 : 1 , 1 : 1), (-1 : 1 : 0 , 0 : 1), (-1 : 1 : 0 , 1 : 1), (-2/3 : -4/3 : 1 , 0 : 1), (-2/3 : -4/3 : 1 , 1 : 1), @@ -215,7 +215,7 @@ def enum_product_projective_number_field(X, **kwds): sage: PP. = ProductProjectiveSpaces([1, 1], K) sage: X = PP.subscheme([x^2 + 2*y^2]) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_number_field + ....: enum_product_projective_number_field sage: enum_product_projective_number_field(X, bound=1.5) [(-v : 1 , -1 : 1), (-v : 1 , -v : 1), (-v : 1 , -1/2*v : 1), (-v : 1 , 0 : 1), (-v : 1 , 1/2*v : 1), (-v : 1 , v : 1), @@ -267,7 +267,7 @@ def enum_product_projective_finite_field(X): sage: PP. = ProductProjectiveSpaces([1, 1], GF(3)) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_finite_field + ....: enum_product_projective_finite_field sage: enum_product_projective_finite_field(PP) [(0 : 1 , 0 : 1), (0 : 1 , 1 : 0), (0 : 1 , 1 : 1), (0 : 1 , 2 : 1), (1 : 0 , 0 : 1), (1 : 0 , 1 : 0), @@ -281,7 +281,7 @@ def enum_product_projective_finite_field(X): sage: PP. = ProductProjectiveSpaces([1, 1], GF(17)) sage: X = PP.subscheme([x0^2 + 2*x1^2]) sage: from sage.schemes.product_projective.rational_point import \ - enum_product_projective_finite_field + ....: enum_product_projective_finite_field sage: len(enum_product_projective_finite_field(X)) 36 """ diff --git a/src/sage/schemes/product_projective/subscheme.py b/src/sage/schemes/product_projective/subscheme.py index 511f10a973e..3ee7f770551 100644 --- a/src/sage/schemes/product_projective/subscheme.py +++ b/src/sage/schemes/product_projective/subscheme.py @@ -55,7 +55,7 @@ class AlgebraicScheme_subscheme_product_projective(AlgebraicScheme_subscheme_pro TESTS:: sage: from sage.schemes.product_projective.subscheme \ - import AlgebraicScheme_subscheme_product_projective + ....: import AlgebraicScheme_subscheme_product_projective sage: AlgebraicScheme_subscheme_product_projective(P, [u*x^2 - v*y*x]) Closed subscheme of Product of projective spaces P^1 x P^1 over Rational Field defined by: diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/projective/projective_space.py index 9073faa9706..1ff1773f07b 100644 --- a/src/sage/schemes/projective/projective_space.py +++ b/src/sage/schemes/projective/projective_space.py @@ -982,9 +982,9 @@ def subscheme(self, X): TESTS:: sage: TestSuite(X).run(skip=["_test_an_element", "_test_elements",\ - "_test_elements_eq", "_test_some_elements", "_test_elements_eq_reflexive",\ - "_test_elements_eq_symmetric", "_test_elements_eq_transitive",\ - "_test_elements_neq"]) + ....: "_test_elements_eq", "_test_some_elements", "_test_elements_eq_reflexive",\ + ....: "_test_elements_eq_symmetric", "_test_elements_eq_transitive",\ + ....: "_test_elements_neq"]) """ R = self.base_ring() if R.is_field() and R.is_exact(): diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 3c2f93e3355..ae97f236e94 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -191,10 +191,10 @@ Check that :issue:`9880` is fixed:: sage: b = [var('b_%s'%i) for i in range(4)] sage: precomp = (2^b_2 + 2)*(2^b_1 + 2^(-b_1) + 2^b_1*2^b_0 - \ - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - 2^(-b_1)*2^(-b_0) + \ - 2^b_0 + 2^(-b_0) - 9) + (2^b_1 + 2^(-b_1) + \ - 2^b_1*2^b_0 - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - \ - 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9)/2^b_2 + ....: 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - 2^(-b_1)*2^(-b_0) + \ + ....: 2^b_0 + 2^(-b_0) - 9) + (2^b_1 + 2^(-b_1) + \ + ....: 2^b_1*2^b_0 - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - \ + ....: 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9)/2^b_2 sage: repl_dict = {b_0: b_0, b_3: b_1, b_2: b_3, b_1: b_2} sage: P = precomp.substitute(repl_dict) sage: P.expand() @@ -209,35 +209,35 @@ Check that :issue:`9880` is fixed:: sage: _0,b_1,b_2=var('b_0,b_1,b_2') sage: f = 1/27*b_2^2/(2^b_2)^2 + 1/27*b_1^2/(2^b_1)^2 + \ - 1/27*b_0^2/(2^b_0)^2 + 1/27*b_2/(2^b_2)^2 - 2/81/(2^b_2)^2 + \ - 1/27*b_1/(2^b_1)^2 + 8/243/(2^b_2)^2 - 1/81*b_0/(2^b_0)^2 - \ - 1/27*b_1^2/((2^b_2)^2*(2^b_1)^2) - \ - 1/27*b_0^2/((2^b_2)^2*(2^b_0)^2) - 20/243/(2^b_1)^2 + 1/9/2^b_0 \ - + 4/81*b_0/(2^b_0)^2 - 8/243/(2^b_2)^2 - 2/9/(2^b_2*2^b_1) - \ - 2/9/(2^b_2*2^b_0) + 8/243/(2^b_1)^2 - 1/9/2^b_0 + \ - 2/9/(2^b_2*2^b_1) + 2/9/(2^b_2*2^b_0) - \ - 2/27*b_1*b_2/((2^b_2)^2*(2^b_1)^2) - \ - 1/27*b_2^2/((2^b_2)^2*(2^b_1)^2) - \ - 2/27*b_0*b_2/((2^b_2)^2*(2^b_0)^2) - \ - 1/27*b_2^2/((2^b_2)^2*(2^b_0)^2) + 2/81/(2^b_1)^2 - \ - 1/27*b_0^2/((2^b_1)^2*(2^b_0)^2) - \ - 2/27*b_0*b_1/((2^b_1)^2*(2^b_0)^2) - \ - 1/27*b_1^2/((2^b_1)^2*(2^b_0)^2) - 2/81/(2^b_0)^2 + \ - 5/27*b_1/((2^b_2)^2*(2^b_1)^2) + 5/27*b_2/((2^b_2)^2*(2^b_1)^2) \ - + 5/27*b_0/((2^b_2)^2*(2^b_0)^2) + \ - 5/27*b_2/((2^b_2)^2*(2^b_0)^2) + 5/27*b_0/((2^b_1)^2*(2^b_0)^2) \ - + 5/27*b_1/((2^b_1)^2*(2^b_0)^2) - 4/81/((2^b_2)^2*(2^b_1)^2) + \ - 1/27*b_0^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 2/27*b_0*b_1/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 2/27*b_0*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 1/27*b_1^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 2/27*b_1*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 1/27*b_2^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ - 4/81/((2^b_2)^2*(2^b_0)^2) - 4/81/((2^b_1)^2*(2^b_0)^2) - \ - 11/27*b_0/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ - 11/27*b_1/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ - 11/27*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ - 64/81/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + 35/81 + ....: 1/27*b_0^2/(2^b_0)^2 + 1/27*b_2/(2^b_2)^2 - 2/81/(2^b_2)^2 + \ + ....: 1/27*b_1/(2^b_1)^2 + 8/243/(2^b_2)^2 - 1/81*b_0/(2^b_0)^2 - \ + ....: 1/27*b_1^2/((2^b_2)^2*(2^b_1)^2) - \ + ....: 1/27*b_0^2/((2^b_2)^2*(2^b_0)^2) - 20/243/(2^b_1)^2 + 1/9/2^b_0 \ + ....: + 4/81*b_0/(2^b_0)^2 - 8/243/(2^b_2)^2 - 2/9/(2^b_2*2^b_1) - \ + ....: 2/9/(2^b_2*2^b_0) + 8/243/(2^b_1)^2 - 1/9/2^b_0 + \ + ....: 2/9/(2^b_2*2^b_1) + 2/9/(2^b_2*2^b_0) - \ + ....: 2/27*b_1*b_2/((2^b_2)^2*(2^b_1)^2) - \ + ....: 1/27*b_2^2/((2^b_2)^2*(2^b_1)^2) - \ + ....: 2/27*b_0*b_2/((2^b_2)^2*(2^b_0)^2) - \ + ....: 1/27*b_2^2/((2^b_2)^2*(2^b_0)^2) + 2/81/(2^b_1)^2 - \ + ....: 1/27*b_0^2/((2^b_1)^2*(2^b_0)^2) - \ + ....: 2/27*b_0*b_1/((2^b_1)^2*(2^b_0)^2) - \ + ....: 1/27*b_1^2/((2^b_1)^2*(2^b_0)^2) - 2/81/(2^b_0)^2 + \ + ....: 5/27*b_1/((2^b_2)^2*(2^b_1)^2) + 5/27*b_2/((2^b_2)^2*(2^b_1)^2) \ + ....: + 5/27*b_0/((2^b_2)^2*(2^b_0)^2) + \ + ....: 5/27*b_2/((2^b_2)^2*(2^b_0)^2) + 5/27*b_0/((2^b_1)^2*(2^b_0)^2) \ + ....: + 5/27*b_1/((2^b_1)^2*(2^b_0)^2) - 4/81/((2^b_2)^2*(2^b_1)^2) + \ + ....: 1/27*b_0^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 2/27*b_0*b_1/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 2/27*b_0*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 1/27*b_1^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 2/27*b_1*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 1/27*b_2^2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ + ....: 4/81/((2^b_2)^2*(2^b_0)^2) - 4/81/((2^b_1)^2*(2^b_0)^2) - \ + ....: 11/27*b_0/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ + ....: 11/27*b_1/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) - \ + ....: 11/27*b_2/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + \ + ....: 64/81/((2^b_2)^2*(2^b_1)^2*(2^b_0)^2) + 35/81 sage: f.nops() 38 @@ -3596,10 +3596,9 @@ cdef class Expression(Expression_abc): sage: k = 26 sage: bool(2/(2*pi)^(2*k) <= abs(bernoulli(2*k)/factorial(2*k))) True - sage: t = log(17179815199/17179869184) + 727717503781781876485802\ - ....: 752874818120860129694543334299450155913077668355/2315841784\ - ....: 74632390847141970017375815706539969331281128078915168015826\ - ....: 259279872 + sage: t = (log(17179815199/17179869184) + + ....: 727717503781781876485802752874818120860129694543334299450155913077668355 / + ....: 231584178474632390847141970017375815706539969331281128078915168015826259279872) sage: v = -53985/17179869184 sage: bool(abs(t) < 1.213*2^-56*v^4) True @@ -7828,18 +7827,18 @@ cdef class Expression(Expression_abc): sage: y = var('y') sage: z = var('z') sage: e = 792*z^8*w^4*x^3*y^4*u^7 + 24*z^4*w^4*x^2*y^3*u^4 + \ - 264*z^8*w^3*x^2*y^7*u^5 + 198*z^4*w^5*x^5*y*u^6 + 110*z^2*w^3*x^5*y^4*u^6 \ - - 120*z^8*w*x^4*u^6 - 480*z^5*w*x^4*y^6*u^8 - 720*z^7*x^3*y^3*u^7 + \ - 165*z^4*w^2*x^4*y*u^5 + 450*z^8*w^6*x^2*y*u^8 + 40*z^2*w^3*x^3*y^3*u^6 - \ - 288*z^7*w^2*x^3*y^6*u^6 + 250*z^6*w^4*x^2*y^4*u^8 + \ - 576*z^7*w^7*x^2*y^4*u^8 - 80*z^6*w^2*x^5*y^3*u^7 - 144*z^8*w^4*x^5*u^7 + \ - 120*z^4*w*x^2*y^6*u^6 + 320*z^5*w^5*x^2*y^7*u^8 + 192*z^7*w^6*x*y^7*u^6 - \ - 12*z^4*w^3*x^3*y^5*u^6 - 36*z^4*w^4*x^4*y^2*u^8 + 72*z^4*w^5*x^3*u^6 - \ - 20*z^2*w^2*x^4*y^5*u^8 + 660*z^8*w*x^2*y^4*u^6 + 66*z^4*w^4*x^4*y^4*u^4 + \ - 440*z^6*w^2*x^3*y^7*u^7 - 30*z^4*w*x^3*y^2*u^7 - 48*z^8*w^3*x^4*y^3*u^5 + \ - 72*z^6*w^2*x*y^6*u^4 - 864*z^7*w^3*x^4*y^3*u^8 + 480*z^7*w^4*x*y^4*u^7 + \ - 60*z^4*w^2*x^2*u^5 + 375*z^8*w^3*x*y*u^7 + 150*z^8*w^5*x*y^4*u^6 + \ - 180*z^6*x*y^3*u^5 + 216*z^6*w^3*x^2*y^3*u^6; + ....: 264*z^8*w^3*x^2*y^7*u^5 + 198*z^4*w^5*x^5*y*u^6 + 110*z^2*w^3*x^5*y^4*u^6 \ + ....: - 120*z^8*w*x^4*u^6 - 480*z^5*w*x^4*y^6*u^8 - 720*z^7*x^3*y^3*u^7 + \ + ....: 165*z^4*w^2*x^4*y*u^5 + 450*z^8*w^6*x^2*y*u^8 + 40*z^2*w^3*x^3*y^3*u^6 - \ + ....: 288*z^7*w^2*x^3*y^6*u^6 + 250*z^6*w^4*x^2*y^4*u^8 + \ + ....: 576*z^7*w^7*x^2*y^4*u^8 - 80*z^6*w^2*x^5*y^3*u^7 - 144*z^8*w^4*x^5*u^7 + \ + ....: 120*z^4*w*x^2*y^6*u^6 + 320*z^5*w^5*x^2*y^7*u^8 + 192*z^7*w^6*x*y^7*u^6 - \ + ....: 12*z^4*w^3*x^3*y^5*u^6 - 36*z^4*w^4*x^4*y^2*u^8 + 72*z^4*w^5*x^3*u^6 - \ + ....: 20*z^2*w^2*x^4*y^5*u^8 + 660*z^8*w*x^2*y^4*u^6 + 66*z^4*w^4*x^4*y^4*u^4 + \ + ....: 440*z^6*w^2*x^3*y^7*u^7 - 30*z^4*w*x^3*y^2*u^7 - 48*z^8*w^3*x^4*y^3*u^5 + \ + ....: 72*z^6*w^2*x*y^6*u^4 - 864*z^7*w^3*x^4*y^3*u^8 + 480*z^7*w^4*x*y^4*u^7 + \ + ....: 60*z^4*w^2*x^2*u^5 + 375*z^8*w^3*x*y*u^7 + 150*z^8*w^5*x*y^4*u^6 + \ + ....: 180*z^6*x*y^3*u^5 + 216*z^6*w^3*x^2*y^3*u^6; sage: d = e.diff(x) sage: gcd(d,e) / (u^4*z^2) in QQ True diff --git a/src/sage/tensor/modules/tensor_with_indices.py b/src/sage/tensor/modules/tensor_with_indices.py index be7c88a859c..bd3edbb81d0 100644 --- a/src/sage/tensor/modules/tensor_with_indices.py +++ b/src/sage/tensor/modules/tensor_with_indices.py @@ -692,7 +692,7 @@ def __add__(self, other): sage: b[:] = [[-1,2,-3], [-4,5,6], [7,-8,9]] sage: T = a*a*b*b sage: 1/4*(T["ijkl_abcd"] + T["jikl_abcd"] + T["ijkl_abdc"]\ - + T["jikl_abdc"]) == T["(..).._..(..)"]["ijkl_abcd"] + ....: + T["jikl_abdc"]) == T["(..).._..(..)"]["ijkl_abcd"] True """ # Check tensor types are compatible @@ -770,7 +770,7 @@ def __sub__(self, other): sage: b[:] = [[-1,2,-3], [-4,5,6], [7,-8,9]] sage: T = a*a*b*b sage: 1/4*(T["ijkl_abcd"]-T["jikl_abcd"] - T["ijkl_abdc"]\ - + T["jikl_abdc"] ) == T["[..].._..[..]"]["ijkl_abcd"] + ....: + T["jikl_abdc"] ) == T["[..].._..[..]"]["ijkl_abcd"] True """ return self + (-other) diff --git a/src/sage/tests/book_stein_ent.py b/src/sage/tests/book_stein_ent.py index 970b377e962..2e942934b9f 100644 --- a/src/sage/tests/book_stein_ent.py +++ b/src/sage/tests/book_stein_ent.py @@ -20,11 +20,11 @@ 3^2 * 223 sage: factor(31415926535898) 2 * 3 * 53 * 73 * 2531 * 534697 -sage: n = 7403756347956171282804679609742957314259318888\ -....: 9231289084936232638972765034028266276891996419625117\ -....: 8439958943305021275853701189680982867331732731089309\ -....: 0055250511687706329907239638078671008609696253793465\ -....: 0563796359 +sage: n = Integer('7403756347956171282804679609742957314259318888' +....: '9231289084936232638972765034028266276891996419625117' +....: '8439958943305021275853701189680982867331732731089309' +....: '0055250511687706329907239638078671008609696253793465' +....: '0563796359') sage: len(n.str(2)) 704 sage: len(n.str(10)) diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py index e283c56c74b..524783b5bf3 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py @@ -222,7 +222,7 @@ sage: c = sumcomp(y0,delta0,RDF(0.0),n,a) sage: print("exact - compensated summation: %.5f" \ - % RDF(s-RR(c).exact_rational())) + ....: % RDF(s-RR(c).exact_rational())) exact - compensated summation: -0.00042 Sage example in ./float.tex, line 1242:: diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py index 5bcd8aa9de6..f8b5ca511b2 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py @@ -181,7 +181,7 @@ Sage example in ./integration.tex, line 990:: sage: f = lambda y: numerical_integral(lambda x: exp(y*sin(x)), \ - 0, sqrt(y))[0] + ....: 0, sqrt(y))[0] sage: f(0.0), f(0.5), f(1.0) # abs tol 2e-15 (0.0, 0.8414895067661431, 1.6318696084180513) @@ -193,14 +193,14 @@ Sage example in ./integration.tex, line 1008:: sage: f = lambda y: sage.calculus.calculus.nintegral(exp(y*sin(x)), \ - x, 0, sqrt(y))[0] + ....: x, 0, sqrt(y))[0] sage: numerical_integral(f, 0, 1) # abs tol 2e-16 (0.8606791942204567, 6.301207560882096e-07) Sage example in ./integration.tex, line 1016:: sage: f = lambda y: RDF(mpmath.quad(lambda x: mpmath.exp(y*mpmath.sin(x)), \ - [0, sqrt(y)])) + ....: [0, sqrt(y)])) sage: numerical_integral(f, 0, 1) # abs tol 2e-16 (0.8606791942204567, 6.301207561187562e-07) diff --git a/src/sage/topology/simplicial_complex.py b/src/sage/topology/simplicial_complex.py index ac0af5dcd7b..1ad2985ce68 100644 --- a/src/sage/topology/simplicial_complex.py +++ b/src/sage/topology/simplicial_complex.py @@ -3465,7 +3465,7 @@ def minimal_nonfaces(self): TESTS:: sage: SC = SimplicialComplex([(0,1,2),(0,2,3),(2,3,4),(1,2,4), \ - (1,4,5),(0,3,6),(3,6,7),(4,5,7)]) + ....: (1,4,5),(0,3,6),(3,6,7),(4,5,7)]) This was taking a long time before :issue:`20078`::