Skip to content

Instantly share code, notes, and snippets.

@pedrominicz
Created October 18, 2019 01:31
Show Gist options
  • Save pedrominicz/af947d148d1826b8ce31004fd09fd52e to your computer and use it in GitHub Desktop.
Save pedrominicz/af947d148d1826b8ce31004fd09fd52e to your computer and use it in GitHub Desktop.
Proof that Peirce's Law is irrefutable in intuitionistic logic.
module Peirce where
data ⊥ : Set where
⊥-elim : ∀ {A : Set} → ⊥ → A
⊥-elim ()
¬_ : Set → Set
¬_ A = A → ⊥
infixr 20 ¬_
peirce-law-irrefutable : forall {A B : Set} → ¬ ¬ (((A → B) → A) → A)
peirce-law-irrefutable {A} {B} ¬peirce-law = ¬peirce-law peirce-law
where
const : A → ((A → B) → A) → A
const a ⟨a→b⟩→a = a
a→b : A → B
a→b a = ⊥-elim (¬peirce-law (const a))
peirce-law : ((A → B) → A) → A
peirce-law ⟨a→b⟩→a = ⟨a→b⟩→a a→b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment