lean4-htt/tests
Kyle Miller 130b465aaf
feat: generalize elab_as_elim to allow arbitrary motive applications (#5510)
Now the elab-as-elim procedure allows eliminators whose result is an
arbitrary application of the motive. For example, the following is now
accepted. It will generalize `Int.natAbs _` from the expected type.
```lean
@[elab_as_elim]
theorem natAbs_elim {motive : Nat → Prop} (i : Int)
  (hpos : ∀ (n : Nat), i = n → motive n)
  (hneg : ∀ (n : Nat), i = -↑n → motive n) :
  motive (Int.natAbs i) := by sorry
```

This change simplifies the elaborator, since it no longer needs to keep
track of discriminants (which can easily be read off from the return
type of the eliminator) or the difference between "targets" and "extra
arguments" (which are now both "major arguments" that should be eagerly
elaborated).

Closes #4086
2024-09-28 22:30:14 +00:00
..
bench chore: notation ^^ for Bool.xor (#5332) 2024-09-18 08:59:11 +00:00
compiler chore: fix spelling mistakes in tests (#5439) 2024-09-24 03:22:53 +00:00
elabissues
ir
lean feat: generalize elab_as_elim to allow arbitrary motive applications (#5510) 2024-09-28 22:30:14 +00:00
pkg test: check that recusive functions do not apply attriubutes twices (#5480) 2024-09-26 10:30:37 +00:00
playground chore: fix spelling mistakes in tests (#5439) 2024-09-24 03:22:53 +00:00
plugin
simpperf
.gitignore
common.sh
lean-toolchain