lean4-htt/tests
Leonardo de Moura 8d9d81453b
feat: grind simple strategy (#6503)
This PR adds a simple strategy to the (WIP) `grind` tactic. It just
keeps internalizing new theorem instances found by E-matching. The
simple strategy can solve examples such as:

```lean
grind_pattern Array.size_set => Array.set a i v h
grind_pattern Array.get_set_eq  => a.set i v h
grind_pattern Array.get_set_ne => (a.set i v hi)[j]

example (as bs : Array α) (v : α)
        (i : Nat)
        (h₁ : i < as.size)
        (h₂ : bs = as.set i v)
        : as.size = bs.size := by
  grind

example (as bs cs : Array α) (v : α)
        (i : Nat)
        (h₁ : i < as.size)
        (h₂ : bs = as.set i v)
        (h₃ : cs = bs)
        (h₄ : i ≠ j)
        (h₅ : j < cs.size)
        (h₆ : j < as.size)
        : cs[j] = as[j] := by
  grind


opaque R : Nat → Nat → Prop
theorem Rtrans (a b c : Nat) : R a b → R b c → R a c := sorry

grind_pattern Rtrans => R a b, R b c

example : R a b → R b c → R c d → R d e → R a d := by
  grind
```
2025-01-02 05:36:01 +00:00
..
bench chore: remove deprecated aliases for Int.tdiv and Int.tmod (#6322) 2024-12-08 05:19:42 +00:00
compiler feat: Simp.Config.implicitDefEqProofs (#4595) 2024-11-29 22:29:27 +00:00
elabissues
ir
lean feat: grind simple strategy (#6503) 2025-01-02 05:36:01 +00:00
pkg feat: Lean.loadPlugin (#6130) 2024-11-27 09:56:31 +00:00
playground feat: rename Array.shrink to take, and relate to List.take (#5796) 2024-10-21 23:35:32 +00:00
plugin
simpperf
.gitignore
common.sh test: do not filter output for non-diff tests (#6308) 2024-12-04 17:49:35 +00:00
lean-toolchain