Lean4
/-- A strong recursor for `Int` that specifies explicit values for integers below a threshold,
and is analogous to `Nat.strongRec` for integers on or above the threshold. -/
@[elab_as_elim]
protected def strongRec (n : ℤ) : motive n :=
by
refine if hnm : n < m then lt n hnm else ge n (by cutsat) (n.inductionOn' m lt ?_ ?_)
· intro _n _ ih l _
exact if hlm : l < m then lt l hlm else ge l (by omega) fun k _ ↦ ih k (by omega)
· exact fun n _ hn l _ ↦ hn l (by omega)