Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns some c, where c is an equation from the basis whose leading monomial divides m.
Remark: if checkCoeffDvd is enabled and the current ring does not satisfy the property
∀ (k : Nat) (a : α), k ≠ 0 → OfNat.ofNat (α := α) k * a = 0 → a = 0
then the absolute value of the leading coefficient of the equation must not exceed |k|.
This ensures the rewrite is monic (i.e., k₁ = 1 at PolyDerivation.step): it eliminates
the monomial if the leading coefficient divides k, and it is a Euclidean remainder step
otherwise. See Poly.simpM?.
Among the candidates, it prefers equations whose leading coefficient divides k, and then
equations with fewer terms. Such an equation eliminates the monomial with k₁ = 1. Otherwise,
the rewrite is a remainder step, or, if checkCoeffDvd is disabled, it has k₁ ≠ 1 and proves
only k₁ * lhs = rhs, which is weaker in rings without NoNatZeroDivisors. Fewer terms keep
intermediate polynomials small.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns some c, where c is an equation from the basis whose leading monomial divides some
monomial in p.
Equations
- (Lean.Grind.CommRing.Poly.num k).findSimp? = pure none
- (Lean.Grind.CommRing.Poly.add k m p_2).findSimp? = do let __do_lift ← Lean.Grind.CommRing.Mon.findSimp? k m match __do_lift with | some c => pure (some c) | none => p_2.findSimp?
Instances For
Simplifies d.p using c, and returns an extended polynomial derivation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplified d.p using the current basis, and returns the extended polynomial derivation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplifies c₁ using c₂.
Equations
- c₁.simplifyWith c₂ = do let __x ← c₁.simplifyWithCore c₂ match __x with | some c => pure c | x => pure c₁
Instances For
Simplifies c₁ using c₂ exhaustively.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplify the given equation constraint using the current basis.
Note: This function (and simplifyBasis) runs with checkCoeffDvd := true. Unless the
ring implements NoNatZeroDivisors, rewriting a monomial k'*m' using an equation with
leading term k*m must not multiply the equation by k/gcd k k' ≠ ±1: replacing an
equation with the result loses information, since p = 0 cannot be recovered from
(k/gcd k k') * p = 0 in an arbitrary commutative ring. Thus, the rewrite eliminates k'*m'
if k ∣ k', performs a Euclidean remainder step (k' = q*k + r, the equation is never
multiplied by a constant) if |k| < |k'|, and is skipped otherwise. For example, 3*x = 0 is
rewritten into x = 0 using 2*x = 0. The consequences of the skipped rewrites are not lost:
a skipped rewrite at the leading monomial coincides with the S-polynomial computed by
superposeWith, so it is derived non-destructively. Reduction is still an incomplete
ideal-membership test in rings without NoNatZeroDivisors. The complete alternative is a
strong Gröbner basis over Int (Kandri-Rody & Kapur), which additionally superposes
gcd-polynomials (Bézout combinations producing gcd k k' times the lcm of the leading
monomials).
Note: If using withCheckCoeffDvd becomes too expensive when one does not have
NoNatZeroDivisors, we will add a flag to perform the simplification anyway even if
information is lost.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true if c.p is the constant polynomial.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplifies and checks whether the resulting constraint is trivial (i.e., 0 = 0),
or inconsistent (i.e., k = 0 where k % c != 0 for a comm-ring with characteristic c),
and returns none. Otherwise, returns the simplified constraint.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Tries to convert the leading monomial into a monic one.
It exploits the fact that given a polynomial with leading coefficient k,
if the ring has a nonzero characteristic p and gcd k p = 1, then
k has an inverse.
It also handles the easy case where k is -1.
Remark: if the ring implements the class NoNatZeroDivisors, then
the coefficients are divided by the gcd of all coefficients.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplifies the basis using c. Every equation that c rewrites is removed from the basis
and requeued in its rewritten form.
See Note at EqCnstr.simplify for why checkCoeffDvd must be enabled here.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true if c.d.p is the constant polynomial.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.check' = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.check pure (__do_lift != Lean.Meta.Grind.CheckResult.none)