Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ Deprecated names
interchange ↦ medial
```

* In `Relation.Nullary.Negation`:
```agda
∃⟶¬∀¬ ↦ ∃⇒¬∀¬
∀⟶¬∃¬ ↦ ∀⇒¬∃¬
¬∃⟶∀¬ ↦ ¬∃⇒∀¬
∀¬⟶¬∃ ↦ ∀¬⇒¬∃
∃¬⟶¬∀ ↦ ∃¬⇒¬∀
```

New modules
-----------

Expand Down
59 changes: 49 additions & 10 deletions src/Relation/Nullary/Negation.agda
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ open import Relation.Nullary.Negation.Core public
------------------------------------------------------------------------
-- Quantifier juggling

¬∀¬ : ∃ P → ¬ (∀ x → ¬ P x)
¬∀¬ = flip uncurry
¬∀¬ : ∃ P → ¬ (∀ x → ¬ P x)
¬∀¬ = flip uncurry

¬∃¬ : (∀ x → P x) → ¬ ∃ λ x → ¬ P x
¬∃¬ ∀xPx (x , ¬Px) = ¬Px (∀xPx x)
¬∃¬ : (∀ x → P x) → ¬ ∃ λ x → ¬ P x
¬∃¬ ∀xPx (x , ¬Px) = ¬Px (∀xPx x)

¬∃∀¬ : ¬ ∃ (λ x → P x) → ∀ x → ¬ P x
¬∃∀¬ = curry
¬∃∀¬ : ¬ ∃ (λ x → P x) → ∀ x → ¬ P x
¬∃∀¬ = curry

∀¬¬∃ : (∀ x → ¬ P x) → ¬ ∃ (λ x → P x)
∀¬¬∃ = uncurry
∀¬¬∃ : (∀ x → ¬ P x) → ¬ ∃ (λ x → P x)
∀¬¬∃ = uncurry

∃¬¬∀ : ∃ (λ x → ¬ P x) → ¬ (∀ x → P x)
∃¬¬∀ = flip ∀¬∃¬
∃¬¬∀ : ∃ (λ x → ¬ P x) → ¬ (∀ x → P x)
∃¬¬∀ = flip ∀¬∃¬

------------------------------------------------------------------------
-- Double Negation
Expand Down Expand Up @@ -106,3 +106,42 @@ private
helper : ∃ (λ b → A → if b then B else C) → (A → B) ⊎ (A → C)
helper (true , f) = inj₁ f
helper (false , f) = inj₂ f


------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.

-- Version 2.4

∃⟶¬∀¬ = ∃⇒¬∀¬
{-# WARNING_ON_USAGE ∃⟶¬∀¬
"Warning: ∃⟶¬∀¬ was deprecated in v2.4.
Please use ∃⇒¬∀¬ instead."
#-}

∀⟶¬∃¬ = ∀⇒¬∃¬
{-# WARNING_ON_USAGE ∀⟶¬∃¬
"Warning: ∀⟶¬∃¬ was deprecated in v2.4.
Please use ∀⇒¬∃¬ instead."
#-}

¬∃⟶∀¬ = ¬∃⇒∀¬
{-# WARNING_ON_USAGE ¬∃⟶∀¬
"Warning: ¬∃⟶∀¬ was deprecated in v2.4.
Please use ¬∃⇒∀¬ instead."
#-}

∀¬⟶¬∃ = ∀¬⇒¬∃
{-# WARNING_ON_USAGE ∀¬⟶¬∃
"Warning: ∀¬⟶¬∃ was deprecated in v2.4.
Please use ∀¬⇒¬∃ instead."
#-}

∃¬⟶¬∀ = ∃¬⇒¬∀
{-# WARNING_ON_USAGE ∃¬⟶¬∀
"Warning: ∃¬⟶¬∀ was deprecated in v2.4.
Please use ∃¬⇒¬∀ instead."
#-}