# Tarski–Grothendieck set theory

Tarski–Grothendieck set theory (TG, named after mathematicians Alfred Tarski and Alexander Grothendieck) is an axiomatic set theory. It is a non-conservative extension of Zermelo–Fraenkel set theory (ZFC) and is distinguished from other axiomatic set theories by the inclusion of Tarski's axiom, which states that for each set there is a "Tarski universe" it belongs to (see below). Tarski's axiom implies the existence of inaccessible cardinals, providing a richer ontology than ZFC. For example, adding this axiom supports category theory.
The Mizar system and Metamath use Tarski–Grothendieck set theory for formal verification of proofs.

## Axioms

Tarski–Grothendieck set theory starts with conventional Zermelo–Fraenkel set theory and then adds “Tarski's axiom”. We will use the axioms, definitions, and notation of Mizar to describe it. Mizar's basic objects and processes are fully formal; they are described informally below. First, let us assume that:
* Given any set $A$, the singleton $\{A\}$ exists.
* Given any two sets, their unordered and ordered pairs exist.
* Given any set of sets, its union exists.
TG includes the following axioms, which are conventional because they are also part of ZFC:
* Set axiom: Quantified variables range over sets alone; everything is a set (the same ontology as ZFC).
* Axiom of extensionality: Two sets are identical if they have the same members.
* Axiom of regularity: No set is a member of itself, and circular chains of membership are impossible.
* Axiom schema of replacement: Let the domain of the class function $F$ be the set $A$. Then the range of $F$ (the values of $F(x)$ for all members $x$ of $A$) is also a set.
It is Tarski's axiom that distinguishes TG from other axiomatic set theories. Tarski's axiom also implies the axioms of infinity, choice, and power set. It also implies the existence of inaccessible cardinals, thanks to which the ontology of TG is much richer than that of conventional set theories such as ZFC.
* Tarski's axiom (adapted from Tarski 1939). For every set $s$, there exists a set $u$ (a "universe") such that
* $s\in u$: it contains $s$
* $(\forall x\in u)(\forall y\subseteq x)(y\in u)$: it contains every subset of every member
* $(\forall x\in u)({\mathcal {P}}(x)\in u)$: it contains the powerset of every member
* $(\forall x\subseteq u)(|x|<|u|\to x\in u)$: it contains every subset of itself that has smaller cardinality
More formally:
    $\forall s\exists u[s\in u\land (\forall x\in u)({\mathcal {P}}(x)\subseteq u\land {\mathcal {P}}(x)\in u)\land (\forall x\subseteq u)(|x|<|u|\to x\in u)]$
where $|\cdot |$ denotes the cardinality of a set. In short, Tarski's axiom states that every set belongs to a Tarski universe. If a Tarski universe is transitive, it is also a Grothendieck universe. Conversely, assuming the axiom of choice, every Grothendieck universe is a Tarski universe (i.e. satisfies Tarski's axiom).
That $u$ looks much like a “universal set” for $s$ – it not only has as members the powerset of $s$, and all subsets of $s$, it also has the powerset of that powerset and so on – its members are closed under the operations of taking powerset or taking a subset. It's like a “universal set” except that of course it is not a member of itself and is not a set of all sets. That's the guaranteed universe it belongs to. And then any such $u$ is itself a member of an even larger “almost universal set” and so on. It's an axiom that guarantees vastly more sets than ZFC does.

## Implementation in the Mizar system

The Mizar language, underlying the implementation of TG and providing its logical syntax, is typed and the types are assumed to be non-empty. Hence, the theory is implicitly taken to be non-empty. The existence axioms, e.g. the existence of the unordered pair, is also implemented indirectly by the definition of term constructors.
The system includes equality, the membership predicate and the following standard definitions:
* Singleton: A set with one member;
* Unordered pair: A set with two distinct members. $\{a,b\}=\{b,a\}$;
* Ordered pair: The set $\{\{a,b\},\{a\}\}=(a,b)\neq (b,a)$;
* Subset: A set all of whose members are members of another given set;
* The union of a set of sets $Y$: The set of all members of any member of $Y$.

## Implementation in Metamath

The Metamath system supports arbitrary higher-order logics, but it is typically used with the "set.mm" definitions of axioms. The ax-groth axiom adds Tarski's axiom, which in Metamath is defined as follows:
⊢ ∃y(x ∈ y ∧ ∀z ∈ y (∀w(w ⊆ z → w ∈ y) ∧ ∃w ∈ y ∀v(v ⊆ z → v ∈ w)) ∧ ∀z(z ⊆ y → (z ≈ y ∨ z ∈ y)))