This section presents the Relations.Extensionality module of the Agda Universal Algebra Library.
{-# OPTIONS --without-K --exact-split --safe #-} module Relations.Extensionality where open import Relations.Truncation public open import MGS-MLTT using (π) public
The principle of proposition extensionality asserts that logically equivalent propositions are equivalent. That is, if P
and Q
are propositions and if P β Q
and Q β P
, then P β‘ Q
. For our purposes, it will suffice to formalize this notion for general predicates, rather than for propositions (i.e., truncated predicates).
pred-ext : (π€ π¦ : Universe) β (π€ β π¦) βΊ Μ pred-ext π€ π¦ = β {A : π€ Μ}{P Q : Pred A π¦ } β P β Q β Q β P β P β‘ Q
Note that pred-ext
merely defines an extensionality principle. It does not postulate that the principle holds. If we wish to postulate pred-ext
, then we do so by assuming that type is inhabited (see block-ext
below, for example).
We need an identity type for congruence classes (blocks) over sets so that two different presentations of the same block (e.g., using different representatives) may be identified. This requires two postulates: (1) predicate extensionality, manifested by the pred-ext
type; (2) equivalence class truncation or βuniqueness of block identity proofsβ, manifested by the blk-uip
type defined in the Relations.Truncation module. We now use pred-ext
and blk-uip
to define a type called block-ext|uip
which we require for the proof of the First Homomorphism Theorem presented in Homomorphisms.Noether.
module _ {π€ π¦ : Universe}{A : π€ Μ}{R : Rel A π¦} where block-ext : pred-ext π€ π¦ β IsEquivalence R β {u v : A} β R u v β [ u ]{R} β‘ [ v ]{R} block-ext pe Req {u}{v} Ruv = pe (/-subset Req Ruv) (/-supset Req Ruv) to-subtype|uip : blk-uip A R β {C D : Pred A π¦}{c : IsBlock C {R}}{d : IsBlock D {R}} β C β‘ D β (C , c) β‘ (D , d) to-subtype|uip buip {C}{D}{c}{d}CD = to-Ξ£-β‘(CD , buip D(transport(Ξ» B β IsBlock B)CD c)d) block-ext|uip : pred-ext π€ π¦ β blk-uip A R β IsEquivalence R β β {u v : A} β R u v β βͺ u β« β‘ βͺ v β« block-ext|uip pe buip Req Ruv = to-subtype|uip buip (block-ext pe Req Ruv)
Is predicate extensionality stronger than proposition extensionality? That is, does pred-ext π€ π¦
imply the following?
β(A : π€ Μ)(P : Pred A π¦)(x : A)(p q : P x) β p β‘ q
We could also define relation extensionality principles which generalize the predicate extensionality principle (pred-ext
) defined above
cont-rel-ext : (π€ π₯ π¦ : Universe) β (π€ β π₯ β π¦) βΊ Μ cont-rel-ext π€ π₯ π¦ = β {I : π₯ Μ}{A : π€ Μ}{P Q : ContRel I A π¦ } β P β Q β Q β P β P β‘ Q dep-rel-ext : (π€ π₯ π¦ : Universe) β (π€ β π₯ β π¦) βΊ Μ dep-rel-ext π€ π₯ π¦ = β {I : π₯ Μ}{π : I β π€ Μ}{P Q : DepRel I π π¦ } β P β Q β Q β P β P β‘ Q
These types are not used in other modules of the UALib and we pose the same question about them as the one above. That is, we ask whether these general relation extensionality principles are stonger than proposition extensionality.