lean4-htt/tests/lean/run/casesOnAcc.lean
Cameron Zwarich ca4322ff09
fix: support casesOn for inductive predicates with computations on fields (#10023)
This PR adds support for correctly handling computations on fields in
`casesOn` for inductive predicates that support large elimination. In
any such predicate, the only relevant fields allowed are those that are
also used as an index, in which case we can find the supplied index and
use that term instead.
2025-08-21 18:55:34 +00:00

10 lines
200 B
Text

def result : Nat := Acc.casesOn (Nat.lt_wfRel.wf.apply 37) fun x _ => x
theorem result_eq : result = 37 := by
rw [result]
cases result._proof_1
rfl
/-- info: 37 -/
#guard_msgs in
#eval result