TerminationMixingTupledCurried.agda 330 B

12345678910111213141516
  1. module TerminationMixingTupledCurried where
  2. data Nat : Set where
  3. zero : Nat
  4. succ : Nat -> Nat
  5. data _×_ (A B : Set) : Set where
  6. _,_ : A -> B -> A × B
  7. good : Nat × Nat -> Nat -> Nat
  8. good (succ x , y) z = good (x , succ y) (succ z)
  9. good (x , succ y) z = good (x , y) x
  10. good xy (succ z) = good xy z
  11. good _ _ = zero