The polynomial functions at Poly.lean are used for constructing proofs-by-reflection,
but they do not provide mechanisms for aborting expensive computations.
Converts the given ring expression into a multivariate polynomial. If the ring has a nonzero characteristic, it is used during normalization.
Instances For
Equations
Instances For
Equations
- p.mulMonM k m = Lean.Meta.Grind.Arith.CommRing.mulMon✝ k m p
Instances For
Instances For
Returns some (val, x) if m contains a variable x whose the denotation is val⁻¹.
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.unit.findInvNumeralVar? = pure none
Instances For
Returns some (val, x) if p contains a variable x whose the denotation is val⁻¹.
Equations
- (Lean.Grind.CommRing.Poly.num k).findInvNumeralVar? = pure none
- (Lean.Grind.CommRing.Poly.add k m p₁_1).findInvNumeralVar? = do let __x ← m.findInvNumeralVar? match __x with | some r => pure (some r) | x => p₁_1.findInvNumeralVar?
Instances For
Result of simplifying a polynomial p₁ using a polynomial p₂.
The simplification rewrites the first monomial of p₁ that can be divided
by the leading monomial of p₂.
- p : Poly
The resulting simplified polynomial after rewriting.
- k₁ : Int
The integer coefficient multiplied with polynomial
p₁in the rewriting step. - k₂ : Int
The integer coefficient multiplied with polynomial
p₂during rewriting. - m₂ : Mon
The monomial factor applied to polynomial
p₂.
Instances For
Simplifies polynomial p₁ using polynomial p₂ by rewriting.
This function attempts to rewrite p₁ by eliminating the first occurrence of
the leading monomial of p₂.
If checkCoeffDvd is true (and the ring does not implement NoNatZeroDivisors),
a monomial is rewritten only if its coefficient is divisible by the leading
coefficient of p₂, i.e., only if the rewrite does not multiply p₁ by a
constant k₁ ≠ ±1. See RingM.Context.checkCoeffDvd.