This PR adds a `HPow \a Int \a` field to `Lean.Grind.Field`, and sufficient axioms to connect it to the operations, so that in future we can reason about exponents in `grind`. To avoid collisions, we also move the `HPow \a Nat \a` field in `Semiring` from the extends clause to a field. Finally, we add some failing tests about normalizing exponents.
16 lines
468 B
Text
16 lines
468 B
Text
-- Tests for `grind` as a module normalization tactic, when only `NatModule` is available.
|
|
|
|
open Lean.Grind
|
|
|
|
section NatModule
|
|
|
|
variable (R : Type u) [NatModule R]
|
|
|
|
example (a b : R) : a + b = b + a := by grind
|
|
example (a : R) : a + 0 = a := by grind
|
|
example (a : R) : 0 + a = a := by grind
|
|
example (a b c : R) : a + b + c = a + (b + c) := by grind
|
|
example (a : R) : 2 * a = a + a := by grind
|
|
example (a b : R) : 2 * (b + c) = c + 2 * b + c := by grind
|
|
|
|
end NatModule
|