Skip to content

Instantly share code, notes, and snippets.

@ikedaisuke
Created March 31, 2011 06:51
Show Gist options
  • Save ikedaisuke/895931 to your computer and use it in GitHub Desktop.
Save ikedaisuke/895931 to your computer and use it in GitHub Desktop.
introduce the law of excluded-middle by RAA in Agda
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