Skip to content

Commit d5f810f

Browse files
authored
added DeMorgan to extra (plfa#1063)
1 parent 8fc2bc6 commit d5f810f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

extra/DeMorgan.lagda.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
```
2+
module DeMorgan where
3+
4+
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
5+
open import Data.Nat using (ℕ; zero; suc)
6+
open import Data.Empty using (⊥; ⊥-elim)
7+
open import Data.Sum using (_⊎_; inj₁; inj₂)
8+
open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩)
9+
open import Relation.Nullary.Negation using (¬_; contradiction)
10+
open import plfa.part1.Isomorphism using (_≃_; extensionality)
11+
12+
postulate
13+
dne : ∀ {A : Set} → ¬ ¬ A → A
14+
15+
dm : ∀ {A B : Set} → ¬ (A × B) → (¬ A) ⊎ (¬ B)
16+
dm ¬xy = dne (λ k → k (inj₁ (λ x → k (inj₂ (λ y → ¬xy ⟨ x , y ⟩)))))
17+
```

0 commit comments

Comments
 (0)