Skip to content

Instantly share code, notes, and snippets.

@AndyShiue
Last active December 12, 2023 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndyShiue/a06386e0b190fd93455799c20c8330df to your computer and use it in GitHub Desktop.
Save AndyShiue/a06386e0b190fd93455799c20c8330df to your computer and use it in GitHub Desktop.
1 + 1 == 2
data Nat : Set where
zero : Nat
succ : Nat -> Nat
{-# BUILTIN NATURAL Nat #-}
infix 30 _+_
_+_ : Nat -> Nat -> Nat
0 + n = n
succ m + n = succ (m + n)
data _==_ {a} {A : Set a} (x : A) : A -> Set a where
refl : x == x
oneplusoneequalstwo : 1 + 1 == 2
oneplusoneequalstwo = refl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment