From 436e2edf80b3b0c2ac015ee42422c883372bfa9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 26 Feb 2023 15:40:07 +0100 Subject: [PATCH 1/2] fixing some E502 (unnecessary backslash) in pyx files --- .../automorphism_group_canonical_label.pyx | 7 +++--- .../partn_ref/canonical_augmentation.pyx | 8 ++++--- .../perm_gps/partn_ref/double_coset.pyx | 7 +++--- src/sage/libs/mpmath/ext_impl.pyx | 12 +++++----- src/sage/libs/mpmath/ext_main.pyx | 8 ++++--- src/sage/libs/mpmath/utils.pyx | 2 +- src/sage/libs/ntl/ntl_ZZ.pyx | 4 ++-- src/sage/rings/complex_mpc.pyx | 8 +++---- src/sage/rings/finite_rings/integer_mod.pyx | 4 ++-- src/sage/rings/finite_rings/residue_field.pyx | 4 ++-- src/sage/rings/morphism.pyx | 13 ++++++----- src/sage/rings/padics/padic_printing.pyx | 23 +++++++++---------- src/sage/rings/polynomial/pbori/pbori.pyx | 7 +++--- src/sage/rings/polynomial/plural.pyx | 2 +- .../polynomial/polynomial_zmod_flint.pyx | 2 +- 15 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index ad30101e161..7cc848695d3 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -393,9 +393,10 @@ cdef void deallocate_agcl_work_space(agcl_work_space *work_space): cdef aut_gp_and_can_lab *get_aut_gp_and_can_lab(void *S, PartitionStack *partition, int n, bint (*all_children_are_equivalent)(PartitionStack *PS, void *S), - int (*refine_and_return_invariant)\ - (PartitionStack *PS, void *S, int *cells_to_refine_by, int ctrb_len), - int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree), + int (*refine_and_return_invariant)(PartitionStack *PS, void *S, + int *cells_to_refine_by, int ctrb_len), + int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, + int degree), bint canonical_label, StabilizerChain *input_group, agcl_work_space *work_space_prealloc, aut_gp_and_can_lab *output_prealloc) except NULL: """ diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx index ac4c40b9b34..41d132d8fb7 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx @@ -380,11 +380,13 @@ cdef void deallocate_cgd(canonical_generator_data *cgd): sig_free(cgd.parent_stack) sig_free(cgd) + cdef iterator *setup_canonical_generator(int degree, bint (*all_children_are_equivalent)(PartitionStack *PS, void *S), - int (*refine_and_return_invariant)\ - (PartitionStack *PS, void *S, int *cells_to_refine_by, int ctrb_len), - int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree), + int (*refine_and_return_invariant)(PartitionStack *PS, void *S, + int *cells_to_refine_by, int ctrb_len), + int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, + int degree), int (*generate_children)(void *, aut_gp_and_can_lab *, iterator *), void *(*apply_augmentation)(void *, void *, void *, int *, bint *), void (*free_object)(void *), diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx index 3f726879292..1d8aa42c28d 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx @@ -268,9 +268,10 @@ cdef void deallocate_dc_work_space(dc_work_space *work_space): cdef int double_coset(void *S1, void *S2, PartitionStack *partition1, int *ordering2, int n, bint (*all_children_are_equivalent)(PartitionStack *PS, void *S), - int (*refine_and_return_invariant)\ - (PartitionStack *PS, void *S, int *cells_to_refine_by, int ctrb_len), - int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree), + int (*refine_and_return_invariant)(PartitionStack *PS, void *S, + int *cells_to_refine_by, int ctrb_len), + int (*compare_structures)(int *gamma_1, int *gamma_2, void *S1, void *S2, + int degree), StabilizerChain *input_group, dc_work_space *work_space_prealloc, int *isom) except -1: """ diff --git a/src/sage/libs/mpmath/ext_impl.pyx b/src/sage/libs/mpmath/ext_impl.pyx index 15557561806..05653d5b25b 100644 --- a/src/sage/libs/mpmath/ext_impl.pyx +++ b/src/sage/libs/mpmath/ext_impl.pyx @@ -1847,8 +1847,8 @@ cdef MPF_complex_pow_int(MPF *zre, MPF *zim, MPF *xre, MPF *xim, mpz_t n, MPopts xret = MPF_to_tuple(xre) ximt = MPF_to_tuple(xim) from mpmath.libmp import mpc_pow_int - vr, vi = mpc_pow_int((xret, ximt), mpzi(n), \ - opts.prec, rndmode_to_python(opts.rounding)) + vr, vi = mpc_pow_int((xret, ximt), mpzi(n), + opts.prec, rndmode_to_python(opts.rounding)) MPF_set_tuple(zre, vr) MPF_set_tuple(zim, vi) @@ -1892,8 +1892,8 @@ cdef MPF_complex_pow_re(MPF *zre, MPF *zim, MPF *xre, MPF *xim, MPF *y, MPopts o ximt = MPF_to_tuple(xim) yret = MPF_to_tuple(y) from mpmath.libmp import mpc_pow_mpf, fzero - vr, vi = mpc_pow_mpf((xret, ximt), yret, \ - opts.prec, rndmode_to_python(opts.rounding)) + vr, vi = mpc_pow_mpf((xret, ximt), yret, + opts.prec, rndmode_to_python(opts.rounding)) MPF_set_tuple(zre, vr) MPF_set_tuple(zim, vi) @@ -1910,8 +1910,8 @@ cdef MPF_complex_pow(MPF *zre, MPF *zim, MPF *xre, MPF *xim, MPF *yre, MPF *yim, yret = MPF_to_tuple(yre) yimt = MPF_to_tuple(yim) from mpmath.libmp import mpc_pow - vr, vi = mpc_pow((xret,ximt), (yret,yimt), \ - opts.prec, rndmode_to_python(opts.rounding)) + vr, vi = mpc_pow((xret, ximt), (yret, yimt), + opts.prec, rndmode_to_python(opts.rounding)) MPF_set_tuple(zre, vr) MPF_set_tuple(zim, vi) diff --git a/src/sage/libs/mpmath/ext_main.pyx b/src/sage/libs/mpmath/ext_main.pyx index 81abdf0cd4b..93b58131b39 100644 --- a/src/sage/libs/mpmath/ext_main.pyx +++ b/src/sage/libs/mpmath/ext_main.pyx @@ -2602,13 +2602,15 @@ def hypsum_internal(int p, int q, param_types, str ztype, coeffs, z, sage: print(mp.hyp1f1(1,2,3)) 6.36184564106256 - TODO: convert mpf/mpc parameters to fixed-point numbers here - instead of converting to tuples within MPF_hypsum. + .. TODO:: + + convert mpf/mpc parameters to fixed-point numbers here + instead of converting to tuples within MPF_hypsum. """ cdef mpf f cdef mpc c c = mpc.__new__(mpc) - have_complex, magn = MPF_hypsum(&c.re, &c.im, p, q, param_types, \ + have_complex, magn = MPF_hypsum(&c.re, &c.im, p, q, param_types, ztype, coeffs, z, prec, wp, epsshift, magnitude_check, kwargs) if have_complex: v = c diff --git a/src/sage/libs/mpmath/utils.pyx b/src/sage/libs/mpmath/utils.pyx index 466334e929a..83f8108be08 100644 --- a/src/sage/libs/mpmath/utils.pyx +++ b/src/sage/libs/mpmath/utils.pyx @@ -128,7 +128,7 @@ cpdef normalize(long sign, Integer man, exp, long bc, long prec, str rnd): res = PY_NEW(Integer) if shift > 0: if rnd == 'n': - if mpz_tstbit(man.value, shift-1) and (mpz_tstbit(man.value, shift)\ + if mpz_tstbit(man.value, shift-1) and (mpz_tstbit(man.value, shift) or (mpz_scan1(man.value, 0) < (shift-1))): mpz_cdiv_q_2exp(res.value, man.value, shift) else: diff --git a/src/sage/libs/ntl/ntl_ZZ.pyx b/src/sage/libs/ntl/ntl_ZZ.pyx index 48a329f3055..8786675e6b9 100644 --- a/src/sage/libs/ntl/ntl_ZZ.pyx +++ b/src/sage/libs/ntl/ntl_ZZ.pyx @@ -93,8 +93,8 @@ cdef class ntl_ZZ(): v = str(v) if not v: v = '0' - if not ((v[0].isdigit() or v[0] == '-') and \ - (v[1:-1].isdigit() or (len(v) <= 2)) and \ + if not ((v[0].isdigit() or v[0] == '-') and + (v[1:-1].isdigit() or (len(v) <= 2)) and (v[-1].isdigit() or (v[-1].lower() in ['l','r']))): raise ValueError("invalid integer: %s" % v) ccreadstr(self.x, v) diff --git a/src/sage/rings/complex_mpc.pyx b/src/sage/rings/complex_mpc.pyx index 456883bb17a..62154af1e96 100644 --- a/src/sage/rings/complex_mpc.pyx +++ b/src/sage/rings/complex_mpc.pyx @@ -313,8 +313,8 @@ cdef class MPComplexField_class(sage.rings.ring.Field): try: n = _mpc_rounding_modes.index(rnd) except ValueError: - raise ValueError("rnd (=%s) must be of the form RNDxy"\ - "where x and y are one of N, Z, U, D" % rnd) + raise ValueError("rnd (=%s) must be of the form RNDxy" + "where x and y are one of N, Z, U, D" % rnd) self.__rnd = n self.__rnd_str = rnd @@ -1158,8 +1158,8 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement): TypeError: can...t convert complex to float; use abs(z) """ if mpfr_zero_p(self.value.im): - return mpfr_get_d(self.value.re,\ - rnd_re((self._parent).__rnd)) + return mpfr_get_d(self.value.re, + rnd_re((self._parent).__rnd)) else: raise TypeError("can't convert complex to float; use abs(z)") diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx index 97ae92d867b..8e723be71b7 100644 --- a/src/sage/rings/finite_rings/integer_mod.pyx +++ b/src/sage/rings/finite_rings/integer_mod.pyx @@ -779,14 +779,14 @@ cdef class IntegerMod_abstract(FiniteRingElement): na = a_red.multiplicative_order() nb = b_red.multiplicative_order() if not na.divides(nb): # cannot be a power - raise ValueError(f"no logarithm of {self} found to base {b} modulo {self.modulus()}" \ + raise ValueError(f"no logarithm of {self} found to base {b} modulo {self.modulus()}" + (f" (no solution modulo {q})" if q != self.modulus() else "")) if p == 2 and e >= 3: # (ZZ/2^e)* is not cyclic; must not give unsolvable DLPs to Pari try: v = discrete_log(a_red, b_red, nb) except ValueError: - raise ValueError(f"no logarithm of {self} found to base {b} modulo {self.modulus()}" \ + raise ValueError(f"no logarithm of {self} found to base {b} modulo {self.modulus()}" + (f" (no solution modulo {q})" if q != self.modulus() else "")) else: try: diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx index 83436bd6582..62ab12ad8bd 100644 --- a/src/sage/rings/finite_rings/residue_field.pyx +++ b/src/sage/rings/finite_rings/residue_field.pyx @@ -1579,8 +1579,8 @@ class ResidueFiniteField_prime_modn(ResidueField_generic, FiniteField_prime_modn self._populate_coercion_lists_(coerce_list=coerce_list, convert_list=[ReductionMap(K, self, None, None, None, None)]) # could be special-cased a bit more. else: PBinv = PB**(-1) - self._populate_coercion_lists_(coerce_list=[IntegerMod_to_IntegerMod(GF(intp), self), Integer_to_IntegerMod(self), Int_to_IntegerMod(self), ResidueFieldHomomorphism_global(OK, self, to_vs, to_order, PB, PBinv)], \ - convert_list=[ReductionMap(K, self, to_vs, to_order, PB, PBinv)]) + self._populate_coercion_lists_(coerce_list=[IntegerMod_to_IntegerMod(GF(intp), self), Integer_to_IntegerMod(self), Int_to_IntegerMod(self), ResidueFieldHomomorphism_global(OK, self, to_vs, to_order, PB, PBinv)], + convert_list=[ReductionMap(K, self, to_vs, to_order, PB, PBinv)]) def _element_constructor_(self, x): """ diff --git a/src/sage/rings/morphism.pyx b/src/sage/rings/morphism.pyx index f7f83974425..4b83e1b03b7 100644 --- a/src/sage/rings/morphism.pyx +++ b/src/sage/rings/morphism.pyx @@ -2035,8 +2035,8 @@ cdef class RingHomomorphism_im_gens(RingHomomorphism): """ D = self.domain() ig = self._im_gens - s = '\n'.join(['%s |--> %s'%(D.gen(i), ig[i]) for\ - i in range(D.ngens())]) + s = '\n'.join('{} |--> {}'.format(D.gen(i), ig[i]) + for i in range(D.ngens())) if s and self._base_map is not None: s += '\nwith map of base ring' return s @@ -2866,21 +2866,22 @@ cdef class RingHomomorphism_from_quotient(RingHomomorphism): """ return hash(self.phi) - def _repr_defn(self): + def _repr_defn(self) -> str: """ Used internally for printing this function. EXAMPLES:: - sage: R. = QQ[]; S. = R.quo([x^2,y^2]); f = S.hom([yy,xx]) + sage: R. = QQ[]; S. = R.quo([x^2,y^2]) + sage: f = S.hom([yy,xx]) sage: print(f._repr_defn()) xx |--> yy yy |--> xx """ D = self.domain() ig = self.phi.im_gens() - return '\n'.join(['%s |--> %s'%(D.gen(i), ig[i]) for\ - i in range(D.ngens())]) + return '\n'.join('{} |--> {}'.format(D.gen(i), ig[i]) + for i in range(D.ngens())) cpdef Element _call_(self, x): """ diff --git a/src/sage/rings/padics/padic_printing.pyx b/src/sage/rings/padics/padic_printing.pyx index e989d236c09..bd4715a7859 100644 --- a/src/sage/rings/padics/padic_printing.pyx +++ b/src/sage/rings/padics/padic_printing.pyx @@ -483,18 +483,17 @@ cdef class pAdicPrinter_class(SageObject): sage: P._sep() '&' """ - - return pAdicPrinter, (self.ring, \ - {'mode': self._print_mode(), \ - 'pos': self.pos, \ - 'ram_name': self.ram_name, \ - 'unram_name': self.unram_name, \ - 'var_name': self.var_name, \ - 'max_ram_terms': self.max_ram_terms, \ - 'max_unram_terms': self.max_unram_terms, \ - 'max_terse_terms': self.max_terse_terms, \ - 'sep':self.sep, \ - 'alphabet': self.alphabet, \ + return pAdicPrinter, (self.ring, + {'mode': self._print_mode(), + 'pos': self.pos, + 'ram_name': self.ram_name, + 'unram_name': self.unram_name, + 'var_name': self.var_name, + 'max_ram_terms': self.max_ram_terms, + 'max_unram_terms': self.max_unram_terms, + 'max_terse_terms': self.max_terse_terms, + 'sep':self.sep, + 'alphabet': self.alphabet, 'show_prec': self.show_prec}) def __richcmp__(self, other, op): diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 7765e87995d..44d28312ee1 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -841,8 +841,7 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): raise TypeError("cannot coerce monomial %s to %s" % (other, self)) elif isinstance(other, BooleanPolynomial) and \ - (((other)\ - ._parent)._pbring.nVariables() <= self._pbring.nVariables()): + (((other)._parent)._pbring.nVariables() <= self._pbring.nVariables()): # try PolyBoRi's built-in coercions if self._pbring.hash() == \ ((other)._parent)._pbring.hash(): @@ -2080,7 +2079,7 @@ class BooleanMonomialMonoid(UniqueRepresentation, Monoid_class): ValueError: cannot convert monomial t*x*y to MonomialMonoid of Boolean PolynomialRing in x, y, z: name t not defined """ if isinstance(other, BooleanMonomial) and \ - ((other)._parent.ngens() <= \ + ((other)._parent.ngens() <= (self._ring)._pbring.nVariables()): try: var_mapping = get_var_mapping(self, other.parent()) @@ -2182,7 +2181,7 @@ class BooleanMonomialMonoid(UniqueRepresentation, Monoid_class): return new_BM_from_PBMonom(self, (self._ring), (other)._pbpoly.lead()) - elif ((other)._pbpoly.nUsedVariables() <= \ + elif ((other)._pbpoly.nUsedVariables() <= (self._ring)._pbring.nVariables()): try: var_mapping = get_var_mapping(self, other) diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx index d019a89d99e..8839fb92502 100644 --- a/src/sage/rings/polynomial/plural.pyx +++ b/src/sage/rings/polynomial/plural.pyx @@ -1780,7 +1780,7 @@ cdef class NCPolynomial_plural(RingElement): _I = idInit(len(I),1) for f in I: - if not (isinstance(f, NCPolynomial_plural) \ + if not (isinstance(f, NCPolynomial_plural) and (f)._parent is parent): try: f = parent.coerce(f) diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index 04c523d9788..e0c1f546f28 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -727,7 +727,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): ... ValueError: leading coefficient must be invertible """ - if self.base_ring().characteristic().gcd(\ + if self.base_ring().characteristic().gcd( self.leading_coefficient().lift()) != 1: raise ValueError("leading coefficient must be invertible") cdef Polynomial_zmod_flint res = self._new() From 9e7bf7d379047e38a90dcc1bb52e3294ffd884a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 27 Feb 2023 08:46:29 +0100 Subject: [PATCH 2/2] one backslash and some imports removed in pbori --- src/sage/rings/polynomial/pbori/pbori.pyx | 37 +++-------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 44d28312ee1..177fd02b013 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -178,7 +178,6 @@ native PolyBoRi counterparts. For instance, sets of points can be represented as tuples of tuples (Sage) or as ``BooleSet`` (PolyBoRi) and naturally the second option is faster. """ - from cpython.object cimport Py_EQ, Py_NE from cython.operator cimport dereference as deref from cysignals.memory cimport sig_malloc, sig_free @@ -1098,13 +1097,11 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): INPUT: - - ``gens`` - list or tuple of generators - ``coerce`` - bool (default: True) automatically coerce the given polynomials to this ring to form the ideal - EXAMPLES:: sage: P. = BooleanPolynomialRing(3) @@ -1219,7 +1216,6 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): sage: B = BooleanPolynomialRing(n, 'x') sage: r = B.random_element(terms=(n/2)**2) """ - from sage.rings.integer import Integer from sage.arith.misc import binomial if not vars_set: @@ -1270,7 +1266,6 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): INPUT: - - ``degree`` - maximum degree - ``monom_counts`` - a list containing total number @@ -1284,7 +1279,6 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): - ``l`` - number of monomials to generate - EXAMPLES:: sage: P. = BooleanPolynomialRing(3) @@ -1292,8 +1286,6 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): sage: all(t in [x, y, x*y, P(1)] for t in f.terms()) True """ - from sage.rings.integer import Integer - from sage.rings.integer_ring import ZZ if l == 0: return self._zero_element if l == 1: @@ -1302,10 +1294,10 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): else: return self._random_monomial_uniform(monom_counts, vars_set) - return self._random_uniform_rec(degree, monom_counts, - vars_set, dfirst, l//2) + \ - self._random_uniform_rec(degree, monom_counts, - vars_set, dfirst, l - l//2) + return (self._random_uniform_rec(degree, monom_counts, + vars_set, dfirst, l // 2) + + self._random_uniform_rec(degree, monom_counts, + vars_set, dfirst, l - l // 2)) def _random_monomial_uniform(self, monom_counts, vars_set): r""" @@ -1314,14 +1306,12 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): INPUT: - - ``monom_counts`` - list of number of monomials up to given degree - ``vars_set`` - list of variable indices to use in the generated monomial - EXAMPLES:: sage: P. = BooleanPolynomialRing(3) @@ -1360,12 +1350,10 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): INPUT: - - ``degree`` - maximum degree - ``vars_set`` - list of variable indices of self - EXAMPLES:: sage: P. = BooleanPolynomialRing(3) @@ -1490,14 +1478,12 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base): INPUT: - - ``zeros`` - the set of interpolation points mapped to zero - ``ones`` - the set of interpolation points mapped to one - EXAMPLES: First we create a random-ish boolean polynomial. @@ -1878,7 +1864,6 @@ class BooleanMonomialMonoid(UniqueRepresentation, Monoid_class): - ``polring`` - the polynomial ring our monomials lie in - EXAMPLES:: sage: from sage.rings.polynomial.pbori.pbori import BooleanMonomialMonoid @@ -2809,7 +2794,6 @@ cdef class BooleanMonomial(MonoidElement): - ``rhs`` - a boolean monomial - EXAMPLES:: sage: B. = BooleanPolynomialRing() @@ -2953,7 +2937,6 @@ cdef class BooleanPolynomial(MPolynomial): - ``parent`` - a boolean polynomial ring - TESTS:: sage: from sage.rings.polynomial.pbori.pbori import BooleanPolynomial @@ -3822,10 +3805,8 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``mon`` - a monomial - EXAMPLES:: sage: P. = BooleanPolynomialRing(2) @@ -3984,13 +3965,11 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``in_dict`` - (optional) dict with variable:value pairs - ``**kwds`` - names parameters - EXAMPLES:: sage: P. = BooleanPolynomialRing(3) @@ -4387,10 +4366,8 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``rhs`` - a boolean polynomial - EXAMPLES:: sage: B. = BooleanPolynomialRing(4,order='deglex') @@ -4452,10 +4429,8 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``deg`` - a degree - EXAMPLES:: sage: B. = BooleanPolynomialRing(4) @@ -4508,10 +4483,8 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``s`` - candidate points for evaluation to zero - EXAMPLES:: sage: B. = BooleanPolynomialRing(4) @@ -4619,11 +4592,9 @@ cdef class BooleanPolynomial(MPolynomial): INPUT: - - ``I`` - a list/set of polynomials in self.parent(). If I is an ideal, the generators are used. - EXAMPLES:: sage: B. = BooleanPolynomialRing(4)