Skip to content

Instantly share code, notes, and snippets.

@scott-fleischman
Created June 18, 2015 15:59
Show Gist options
  • Select an option

  • Save scott-fleischman/6841f4bdce5153ae8692 to your computer and use it in GitHub Desktop.

Select an option

Save scott-fleischman/6841f4bdce5153ae8692 to your computer and use it in GitHub Desktop.
module Proof where
data Or {a b} (A : Set a) (B : Set b) : Set₁ where
Inl : A → Or A B
Inr : B → Or A B
data And {a b} (A : Set a) (B : Set b) : Set₁ where
AndIntro : A → B → And A B
and-dist-over-or : {a b c : Set} → And a (Or b c) → Or (And a b) (And a c)
and-dist-over-or (AndIntro a x) with x
… | Inl b = Inl (AndIntro a b)
… | Inr c = Inr (AndIntro a c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment