Negation

Content created by Egbert Rijke, Fredrik Bakke, Jonathan Prieto-Cubides, Elisabeth Stenholm and Eléonore Mangel.

Created on 2022-01-27.
Last modified on 2024-09-23.

module foundation.negation where

open import foundation-core.negation public
Imports
open import foundation.dependent-pair-types
open import foundation.logical-equivalences
open import foundation.universe-levels

open import foundation-core.empty-types
open import foundation-core.equivalences
open import foundation-core.propositions

Idea

The Curry–Howard interpretation of negation in type theory is the interpretation of the proposition P ⇒ ⊥ using propositions as types. Thus, the negation of a type A is the type A → empty.

Properties

The negation of a type is a proposition

is-prop-neg : {l : Level} {A : UU l}  is-prop (¬ A)
is-prop-neg {A = A} = is-prop-function-type is-prop-empty

neg-type-Prop : {l1 : Level}  UU l1  Prop l1
neg-type-Prop A = ¬ A , is-prop-neg

neg-Prop : {l1 : Level}  Prop l1  Prop l1
neg-Prop P = neg-type-Prop (type-Prop P)

type-neg-Prop : {l1 : Level}  Prop l1  UU l1
type-neg-Prop P = type-Prop (neg-Prop P)

infix 25 ¬'_

¬'_ : {l1 : Level}  Prop l1  Prop l1
¬'_ = neg-Prop

Reductio ad absurdum

reductio-ad-absurdum : {l1 l2 : Level} {P : UU l1} {Q : UU l2}  P  ¬ P  Q
reductio-ad-absurdum p np = ex-falso (np p)

Equivalent types have equivalent negations

equiv-neg :
  {l1 l2 : Level} {X : UU l1} {Y : UU l2} 
  (X  Y)  (¬ X  ¬ Y)
equiv-neg {l1} {l2} {X} {Y} e =
  equiv-iff'
    ( neg-type-Prop X)
    ( neg-type-Prop Y)
    ( pair (map-neg (map-inv-equiv e)) (map-neg (map-equiv e)))

Negation has no fixed points

no-fixed-points-neg :
  {l : Level} (A : UU l)  ¬ (A  ¬ A)
no-fixed-points-neg A (f , g) =
  ( λ (h : ¬ A)  h (g h))  (a : A)  f a a)

abstract
  no-fixed-points-neg-Prop :
    {l : Level} (P : Prop l)  ¬ (type-Prop P  ¬ (type-Prop P))
  no-fixed-points-neg-Prop P = no-fixed-points-neg (type-Prop P)

Table of files about propositional logic

The following table gives an overview of basic constructions in propositional logic and related considerations.

ConceptFile
Propositions (foundation-core)foundation-core.propositions
Propositions (foundation)foundation.propositions
Subterminal typesfoundation.subterminal-types
Subsingleton inductionfoundation.subsingleton-induction
Empty types (foundation-core)foundation-core.empty-types
Empty types (foundation)foundation.empty-types
Unit typefoundation.unit-type
Logical equivalencesfoundation.logical-equivalences
Propositional extensionalityfoundation.propositional-extensionality
Mere logical equivalencesfoundation.mere-logical-equivalences
Conjunctionfoundation.conjunction
Disjunctionfoundation.disjunction
Exclusive disjunctionfoundation.exclusive-disjunction
Existential quantificationfoundation.existential-quantification
Uniqueness quantificationfoundation.uniqueness-quantification
Universal quantificationfoundation.universal-quantification
Negationfoundation.negation
Double negationfoundation.double-negation
Propositional truncationsfoundation.propositional-truncations
Universal property of propositional truncationsfoundation.universal-property-propositional-truncation
The induction principle of propositional truncationsfoundation.induction-principle-propositional-truncation
Functoriality of propositional truncationsfoundation.functoriality-propositional-truncations
Propositional resizingfoundation.propositional-resizing
Impredicative encodings of the logical operationsfoundation.impredicative-encodings

Recent changes