| def f._mutual : (_ : Nat) ×' Bool ⊕' Nat → Nat := | |
| f._mutual._proof_1.fix fun x a => | |
| PSum.casesOn (motive := fun x => ((y : (_ : Nat) ×' Bool ⊕' Nat) → WellFoundedRelation.rel y x → Nat) → Nat) x | |
| (fun _x a => | |
| PSigma.casesOn (motive := fun _x => | |
| ((y : (_ : Nat) ×' Bool ⊕' Nat) → WellFoundedRelation.rel y (PSum.inl _x) → Nat) → Nat) _x | |
| (fun a a_1 a_2 => | |
| (match (motive := | |
| (x : Nat) → | |
| (x_1 : Bool) → | |
| ((y : (_ : Nat) ×' Bool ⊕' Nat) → WellFoundedRelation.rel y (PSum.inl ⟨x, x_1⟩) → Nat) → Nat) | |
| a, a_1 with | |
| | n, true => fun x => 2 * x (PSum.inl ⟨n, false⟩) ⋯ | |
| | 0, false => fun x => 1 | |
| | n, false => fun x => n + x (PSum.inr n) ⋯) | |
| a_2) | |
| a) | |
| (fun n a => if h : n ≠ 0 then a (PSum.inl ⟨n - 1, true⟩) ⋯ else n) a |