Martin Escardo & Tom de Jong, July 2023.
Some constructions with iterative sets.
* The type of iterative sets is large.
* The type of iterative sets is algebraically injective.
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan
open import UF.Univalence
module Iterative.Sets-Addendum
(ua : Univalence)
(๐ค : Universe)
where
open import Iterative.Multisets ๐ค
open import Iterative.Multisets-Addendum ua ๐ค
open import Iterative.Sets ua ๐ค
open import UF.ClassicalLogic
open import UF.FunExt
open import UF.PropTrunc
open import UF.Size
open import UF.Subsingletons-FunExt
open import UF.UA-FunExt
open import W.Type
private
๐คโบ : Universe
๐คโบ = ๐ค โบ
fe : Fun-Ext
fe = Univalence-gives-Fun-Ext ua
fe' : FunExt
fe' ๐ค ๐ฅ = fe {๐ค} {๐ฅ}
open import Taboos.Decomposability fe'
๐โฑฝ : ๐
๐โฑฝ = ๐แดน , ๐แดน-is-iset
๐โฑฝ : ๐
๐โฑฝ = ๐แดน , ๐แดน-is-iset
๐โฑฝ-is-not-๐โฑฝ : ๐โฑฝ โ ๐โฑฝ
๐โฑฝ-is-not-๐โฑฝ p = ๐แดน-is-not-๐แดน (ap underlying-mset p)
\end{code}
Subsets.
\begin{code}
open import UF.Equiv
open import UF.Embeddings
open import UF.Subsingletons
open import UF.SubtypeClassifier
๐-separation : (A : ๐) (P : ๐ โ ฮฉ ๐ค)
โ ฮฃ A' ๊ ๐ , ((B : ๐) โ (B โ A') โ (B โ A ร P B holds))
๐-separation A@(ssup X ฯ , ฯ-emb , ฯ-iter) P = A' , Q
where
A' : ๐
A' = (ssup (ฮฃ x ๊ X , P (ฯ x , ฯ-iter x) holds) (ฮป (x , p) โ ฯ x)) ,
โ-is-embedding
(prโ-is-embedding (ฮป x โ holds-is-prop (P (ฯ x , ฯ-iter x))))
ฯ-emb ,
(ฮป (x , p) โ ฯ-iter x)
Qโ : (B : ๐) โ B โ A' โ B โ A ร P B holds
Qโ B ((x , p) , refl) =
(x , refl) , transport (_holds โ P) (to-subtype-๏ผ being-iset-is-prop refl) p
Qโ : (B : ๐) โ B โ A ร P B holds โ B โ A'
Qโ B ((x , refl) , p) =
(x , transport (_holds โ P) (to-subtype-๏ผ being-iset-is-prop refl) p) , refl
Q : (B : ๐) โ B โ A' โ (B โ A ร P B holds)
Q B = Qโ B , Qโ B
subset : ๐ โ (P : ๐ โ ฮฉ ๐ค) โ ๐
subset A P = prโ (๐-separation A P)
subset-โ : (A : ๐) (P : ๐ โ ฮฉ ๐ค)
โ (B : ๐) โ (B โ subset A P) โ (B โ A ร P B holds)
subset-โ A P = prโ (๐-separation A P)
\end{code}
The type of multisets is large, in the sense that it doesn' have a
small copy.
\begin{code}
๐-is-large : is-large ๐
๐-is-large (X , ๐) = III
where
have-๐ : X โ ๐
have-๐ = ๐
_ : ๐ค ฬ
_ = X
_ : ๐คโบ ฬ
_ = ๐
A : ๐
A = ๐-ssup X โ ๐ โ (equivs-are-embeddings' ๐)
A-universal : (B : ๐) โ B โ A
A-universal B = โ ๐ โโปยน B , ap underlying-mset (inverses-are-sections' ๐ B)
P : (B : ๐) โ ฮฉ ๐ค
P B = ยฌ (B โโป B) , negations-are-props fe
R : ๐
R = subset A P
g : (B : ๐) โ (B โ R) โ (B โ A ร ยฌ (B โโป B))
g = subset-โ A P
h : (R โ R) โ (R โโป R)
h = โโปโโ R R
I : R โโป R โ ยฌ (R โโป R)
I i = prโ (lr-implication (g R) (โ h โโปยน i))
II : ยฌ (R โโป R) โ R โโป R
II ฮฝ = โ h โ (rl-implication (g R) (A-universal R , ฮฝ))
III : ๐
III = not-equivalent-to-own-negation (I , II)
\end{code}
The type of iterative sets is algebraically injective, which is a new
result.
\begin{code}
open import InjectiveTypes.Blackboard fe'
module _ (pt : propositional-truncations-exist)
(sr : Set-Replacement pt)
where
๐-is-ainjective : ainjective-type ๐ ๐ค ๐ค
๐-is-ainjective = retract-of-ainjective ๐ ๐ ๐-is-ainjective ๐-is-retract-of-๐
where
open unions-of-iterative-sets pt sr
\end{code}
It follows that ๐ has no non-trivial decidable properties unless weak
excluded middle holds.
\begin{code}
decomposition-of-๐-gives-WEM : decomposition ๐ โ typal-WEM ๐ค
decomposition-of-๐-gives-WEM =
decomposition-of-ainjective-type-gives-WEM
(univalence-gives-propext (ua ๐ค))
๐
๐-is-ainjective
\end{code}
The results of this file seem to be new.