lean4-htt/tests/lean/run/grind_intmodule_eq_prop.lean
Leonardo de Moura 62b900e8ef
feat: basic equality propagation for IntModule in grind (#11677)
This PR adds basic support for equality propagation in `grind linarith`
for the `IntModule` case. This covers only the basic case. See note in
the code.
We remark this feature is irrelevant for `CommRing` since `grind ring`
already has much better support for equality propagation.
2025-12-14 22:40:11 +00:00

11 lines
447 B
Text

example {W : Type} [Lean.Grind.IntModule W] (f : W → Nat)
(_ : ∀ (a : Int) (x : W), f (a • x) = a.natAbs * f x)
(_ : a ≠ 1) (_ : a ≠ -1) (x : W) (_ : f x = 1) :
¬ x - a • x = 0 := by
grind
example {W : Type} [Lean.Grind.IntModule W] (f : W → Nat)
(_ : ∀ (a : Int) (x : W), f (a • x) = a.natAbs * f x)
(_ : a ≠ 1) (_ : a ≠ -1) (x y : W) (_ : f x = 1) :
y ≠ x → ¬ x - a • x = 0 := by
grind