Skip to content

Instantly share code, notes, and snippets.

@JoeyEremondi
Created March 12, 2021 05:00
Show Gist options
  • Save JoeyEremondi/fb2a7de6038bba868388f0ee120f599d to your computer and use it in GitHub Desktop.
Save JoeyEremondi/fb2a7de6038bba868388f0ee120f599d to your computer and use it in GitHub Desktop.
open import Data.Nat.Binary
open import Relation.Binary.PropositionalEquality
plus-zero : ∀ n -> (n + zero) ≡ n
plus-zero zero = refl
plus-zero 2[1+ n ] = refl
plus-zero 1+[2 n ] = refl
plus-suc : ∀ n m -> suc (n + m) ≡ n + (suc m)
plus-suc zero m = refl
plus-suc 2[1+ n ] zero rewrite plus-zero n = refl
plus-suc 1+[2 n ] zero rewrite plus-zero n = refl
plus-suc 2[1+ n ] 2[1+ m ] rewrite plus-suc n m = refl
plus-suc 2[1+ n ] 1+[2 m ] = refl
plus-suc 1+[2 n ] 2[1+ m ] rewrite plus-suc n m = refl
plus-suc 1+[2 n ] 1+[2 m ] = refl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment