Source code on Github
{-# OPTIONS --without-K #-}
module Test.Newtype where

open import Class.Prelude
open import Class.Newtype
open import Class.Functor

ℕ˘ = newtype 

_+˘_ : ℕ˘  ℕ˘  ℕ˘
n  m = case unmk m of λ where
  0         n
  (suc m′)  suc <$> (n  mk m′)

+˘-identityˡ :  x  mk 0  x  x
+˘-identityˡ (mk 0)       = refl
+˘-identityˡ (mk (suc n)) rewrite +˘-identityˡ (mk n) = refl

 :  {n : ℕ˘}  n  mk 0  n
 = refl

H˘′ :  {n : }  mk n  mk 0  mk n
H˘′ = 

open Nat using (_+_)

+↔+˘ :  (x y : )  x + y  (mk x  mk y) .unmk
+↔+˘ zero y rewrite +˘-identityˡ (mk y) = refl
+↔+˘ (suc x) zero    = cong suc $ Nat.+-identityʳ x
+↔+˘ (suc x) (suc y) = cong suc $ trans (Nat.+-suc x y) (+↔+˘ (suc x) y)

_ :  {n : }  n + 0  n
_ = trans (+↔+˘ _ 0) (cong unmk H˘′)

-- T0D0: tactic to automate "newtype" transports