Last active
March 18, 2023 01:25
-
-
Save ncfavier/b4e9bd789e07f31c4a3df894b7e82b0c to your computer and use it in GitHub Desktop.
LEM ≡ ∀ A → A ∨ ¬ A
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 LEM where | |
| open import 1Lab.Type | |
| open import 1Lab.Path | |
| open import 1Lab.HLevel | |
| open import 1Lab.HIT.Truncation | |
| open import Data.Sum | |
| ⊥-is-prop : is-prop ⊥ | |
| ⊥-is-prop () | |
| LEM : Typeω | |
| LEM = ∀ {ℓ} (A : Type ℓ) → is-prop A → A ⊎ (¬ A) | |
| LEM' : Typeω | |
| LEM' = ∀ {ℓ} (A : Type ℓ) → ∥ A ⊎ (¬ A) ∥ | |
| LEM→LEM' : LEM → LEM' | |
| LEM→LEM' lem A = lemma (lem ∥ A ∥ squash) | |
| where | |
| lemma : ∀ {ℓ} {A : Type ℓ} → ∥ A ∥ ⊎ ¬ ∥ A ∥ → ∥ A ⊎ (¬ A) ∥ | |
| lemma (inl a) = ∥-∥-rec squash (inc ∘ inl) a | |
| lemma (inr ¬a) = inc (inr (¬a ∘ inc)) | |
| LEM'→LEM : LEM' → LEM | |
| LEM'→LEM lem' A prop = ∥-∥-rec | |
| (disjoint-⊎-is-prop prop (λ x y i a → ⊥-is-prop (x a) (y a) i) (λ (a , ¬a) → ¬a a)) | |
| id (lem' A) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment