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.
11 lines
447 B
Text
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
|