module univTypes.Model.TarskiGrothendieck where open import Data.Product using (Σ; _×_) open import Data.Sum using (_⊎_) open import Relation.Binary.PropositionalEquality using (_≡_) open import univTypes.Model.Grothendieck using (ZFBase) -- Tarski–Grothendieck set theory: ZF plus Tarski's Axiom A (A. Tarski, -- Über unerreichbare Kardinalzahlen, Fund. Math. 30, 1938), the foundation -- of Mizar (A. Trybulec, Tarski Grothendieck Set Theory, Formalized -- Mathematics 1, 1990). Every set is a member of a Tarski universe U: -- * U is transitive (as in con-leche's IsTGUniverse; Mizar omits it), -- * U is closed under subsets of its members, -- * for every member, U has a member containing all its subsets, -- * every subset of U is a member of U or equinumerous with U. -- Equinumerosity is witnessed by an Agda-level function, as in con-leche -- (it keeps ordered pairs out of the axioms). Model/FromTarski derives -- Grothendieck's universe axiom (Model/Grothendieck) from this. module _ (B : ZFBase) where open ZFBase B -- A bijection from the members of X onto the members of Y. Equinumerous : V → V → Set Equinumerous X Y = Σ (V → V) λ f → (∀ a → a ∈ X → f a ∈ Y) × (∀ a b → a ∈ X → b ∈ X → f a ≡ f b → a ≡ b) × (∀ y → y ∈ Y → Σ V λ a → a ∈ X × f a ≡ y) record IsTarski (U : V) : Set where field trans : ∀ {x y} → x ∈ U → y ∈ x → y ∈ U subset : ∀ {x y} → x ∈ U → (∀ w → w ∈ y → w ∈ x) → y ∈ U powers : ∀ {x} → x ∈ U → Σ V λ p → p ∈ U × (∀ z → (∀ w → w ∈ z → w ∈ x) → z ∈ p) card : ∀ {y} → (∀ w → w ∈ y → w ∈ U) → Equinumerous y U ⊎ y ∈ U -- Axiom A: every set is a member of a Tarski universe. record TarskiAxiom : Set where field tarski : ∀ x → Σ V λ U → x ∈ U × IsTarski U -- Tarski–Grothendieck set theory. record TG : Set₁ where field base : ZFBase ta : TarskiAxiom base