Created
March 31, 2011 06:51
-
-
Save ikedaisuke/895931 to your computer and use it in GitHub Desktop.
introduce the law of excluded-middle by RAA in Agda
This file contains 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 EM where | |
{- | |
See also | |
http://www.cs.nott.ac.uk/~txa/g53cfr/l06.html/l06.html | |
-} | |
open import Data.Sum using (_⊎_; inj₁; inj₂) | |
open import Relation.Nullary using (¬_) | |
RAA : Set₁ | |
RAA = {A : Set} -> ¬ ¬ A -> A | |
-- law of excluded-middle | |
EM : Set₁ | |
EM = {A : Set} -> A ⊎ (¬ A) | |
¬¬-EM : {A : Set} -> ¬ (¬ (A ⊎ (¬ A))) | |
¬¬-EM nnpp = nnpp (inj₂ (λ p → nnpp (inj₁ p))) | |
RAAtoEM : RAA -> EM | |
RAAtoEM raa = raa ¬¬-EM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment