Created
June 18, 2015 15:59
-
-
Save scott-fleischman/6841f4bdce5153ae8692 to your computer and use it in GitHub Desktop.
Agda with expression; see https://blog.cppcabrera.com/posts/48-logic-proofs-with-agda-coq-idris.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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