lean4-htt/src/Lean/Elab/PreDefinition/Structural
Joachim Breitner 3d1d8fc1de
feat: unfolding functional induction principles (#8088)
This PR adds the “unfolding” variant of the functional induction and
functional cases principles, under the name `foo.induct_unfolding` resp.
`foo.fun_cases_unfolding`. These theorems combine induction over the
structure of a recursive function with the unfolding of that function,
and should be more reliable, easier to use and more efficient than just
case-splitting and then rewriting with equational theorems.

For example  instead of
```
ackermann.induct
  (motive : Nat → Nat → Prop)
  (case1 : ∀ (m : Nat), motive 0 m)
  (case2 : ∀ (n : Nat), motive n 1 → motive (Nat.succ n) 0)
  (case3 : ∀ (n m : Nat), motive (n + 1) m → motive n (ackermann (n + 1) m) → motive (Nat.succ n) (Nat.succ m))
  (x x : Nat) : motive x x
```
one gets
```
ackermann.fun_cases_unfolding
  (motive : Nat → Nat → Nat → Prop)
  (case1 : ∀ (m : Nat), motive 0 m (m + 1))
  (case2 : ∀ (n : Nat), motive n.succ 0 (ackermann n 1))
  (case3 : ∀ (n m : Nat), motive n.succ m.succ (ackermann n (ackermann (n + 1) m)))
  (x✝ x✝¹ : Nat) : motive x✝ x✝¹ (ackermann x✝ x✝¹)
```
2025-04-29 16:43:06 +00:00
..
Basic.lean feat: deprecate Array.mkArray in favour of Array.replicate 2025-03-24 08:25:00 +01:00
BRecOn.lean feat: deprecate Array.mkArray in favour of Array.replicate 2025-03-24 08:25:00 +01:00
Eqns.lean feat: unfolding functional induction principles (#8088) 2025-04-29 16:43:06 +00:00
FindRecArg.lean feat: identify more fixed parameters (#7166) 2025-03-04 22:26:20 +00:00
IndGroupInfo.lean fix: handle reordered indices in structural recursion (#6116) 2024-11-18 11:28:02 +00:00
IndPred.lean feat: identify more fixed parameters (#7166) 2025-03-04 22:26:20 +00:00
Main.lean feat: identify more fixed parameters (#7166) 2025-03-04 22:26:20 +00:00
Preprocess.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
RecArgInfo.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
SmartUnfolding.lean fix: include references in attributes in call hierarchy (#5650) 2024-10-18 15:38:32 +00:00