lean4-htt/tests/lean/run/grind_ring_3.lean
Leonardo de Moura 6683d1eb91
chore: add module keyword to grind tests (#10036)
This PR also fixes missing `@[expose]` in grind support definitions.
2025-08-21 22:02:08 +00:00

30 lines
927 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module
open Lean.Grind
example {α} [CommRing α] [IsCharP α 0]
(d t : α)
(Δ40 : d + t + d * t = 0)
(Δ41 : d + d * t - 2 * d * t^2 + d * t^4 + d^2 * t^4 = 0) :
t + 2 * t^2 - t^3 - 2 * t^4 + t^5 = 0 := by grind
example {α} [CommRing α] [IsCharP α 0]
(d t d_inv : α)
(Δ40 : d * (d + t + d * t) = 0)
(Δ41 : d * (d + d * t - 2 * d * t^2 + d * t^4 + d^2 * t^4) = 0)
(_ : d * d_inv = 1) :
t + 2 * t^2 - t^3 - 2 * t^4 + t^5 = 0 := by grind
-- The theorems above hold in any `CommRing`
example {α} [CommRing α]
(d t : α)
(Δ40 : d + t + d * t = 0)
(Δ41 : d + d * t - 2 * d * t^2 + d * t^4 + d^2 * t^4 = 0) :
t + 2 * t^2 - t^3 - 2 * t^4 + t^5 = 0 := by grind
example {α} [CommRing α]
(d t d_inv : α)
(Δ40 : d * (d + t + d * t) = 0)
(Δ41 : d * (d + d * t - 2 * d * t^2 + d * t^4 + d^2 * t^4) = 0)
(_ : d * d_inv = 1) :
t + 2 * t^2 - t^3 - 2 * t^4 + t^5 = 0 := by grind