Skip to content

Instantly share code, notes, and snippets.

@mietek
Last active October 13, 2016 23:02
Show Gist options
  • Save mietek/7824f24e45efe97bf48b1b21dc829e6f to your computer and use it in GitHub Desktop.
Save mietek/7824f24e45efe97bf48b1b21dc829e6f to your computer and use it in GitHub Desktop.
module Intuition where
open import Data.Empty using (⊥)
open import Data.Product using (_,_ ; proj₁ ; proj₂) renaming (_×_ to _∧_)
open import Data.Sum using (inj₁ ; inj₂) renaming (_⊎_ to _∨_)
open import Relation.Nullary using (¬_)
foo : ∀ {a} {A : Set a} → ¬ ¬ (A ∨ ¬ A)
foo x = x (inj₂ (λ y → x (inj₁ y)))
foo′ : ∀ {a} {A : Set a} → ((A ∨ (A → ⊥)) → ⊥) → ⊥
foo′ = foo
bar′ : ∀ {a} {A : Set a} → A ∧ (A → ⊥) → ⊥
bar′ x = proj₂ x (proj₁ x)
bar : ∀ {a} {A : Set a} → ¬ (A ∧ ¬ A)
bar = bar′
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment