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₂.
Equations
- p₁.simpM? (Lean.Grind.CommRing.Poly.add k₂' m₂ p₂_2) = Lean.Grind.CommRing.Poly.simpM?.go?✝ k₂' m₂ p₂_2 p₁
- p₁.simpM? p₂ = pure none