cideEqual :: Nat x -> Nat y -> Dec (NatIneq EQ x y)
decideEqual = \case
  Z_   -> \case
    Z_   -> Proven  EQZero
    S_ _ -> Refuted "!(Z = S y)" $ \case
  S_ x -> \case
    Z_   -> Refuted "!(S x = Z)" $ \case
    S_ y -> case decideEqual x y of
      Proven  l -> Proven  $ EQSucc l
      Refuted e k -> Refuted e $ \(EQSucc l) -> k l


decideEqual :: Nat x -> Nat y -> Dec (NatIneq EQ x y)
decideEqual = \case
  Z_   -> \case
    Z_   -> Proven  EQZero
    S_ _ -> Refuted "!(Z = S y)" $ \case
  S_ x -> \case
    Z_   -> Refuted "!(S x = Z)" $ \case
    S_ y -> case decideEqual x y of
      Proven  l -> Proven  $ EQSucc l
      Refuted e k -> Refuted e $ \(EQSucc l) -> k l
decideEqual = \case
  Z_   -> \case
    Z_   -> Proven  EQZero
    S_ _ -> Refuted "!(Z = S y)" $ \case
  S_ x -> \case
    Z_   -> Refuted "!(S x = Z)" $ \case
    S_ y -> case decideEqual x y of
      Proven  l -> Proven  $ EQSucc l
      Refuted e k -> Refuted e $ \(EQSucc l) -> k l