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.
10 lines
200 B
Text
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
|