Interface:Axiom of quantifiability

In Interface:First-order logic, we present a theory which deals with quantifiers (∀ and ∃), free variables, and the substitution of one variable for another. However, there is an issue with substitution of a term for a variable. To make this work as straightforwardly as substitution of a variable for a variable, we put forth an axiom here which we call the axiom of quantifiability. It is a variant of the axiom of existence which says that we can introduce a variable equal to a given variable.

Prerequisities
We build on Interface:Classical propositional calculus and Interface:First-order logic:  param (CLASSICAL Interface:Classical_propositional_calculus ) param (FIRSTORDER Interface:First-order_logic (CLASSICAL) ) 

Equality between terms
The axiom of quantifiability is all about equality between terms, not just equality between variables (the latter is what is covered in Interface:Axioms of first-order logic). So we first define term equality much the way that variable equality was defined in Interface:Axioms of first-order logic. Interface:Equality of classes has a different approach (which also defines term equality, but in a way consistent with metamath-style proper classes, and not consistent with the axiom of quantifiability).

 var (object s t u) stmt (TermEqualityAxiom  ((s = t) → ((s = u) → (t = u)))) 

The axiom of quantifiability
The axiom:

 var (variable x)

stmt (Quantifiability ((x s)) (∃ x ((value x) = s)) ) 

Consequences
In some formulations of set theory, for example metamath's set.mm, a variable (something which can be quantified over) corresponds to a set, and an object corresponds to a class.

As can be seen in more detail in First-order logic with quantifiability and Interface:First-order logic with quantifiability, the axiom of quantifiability allows substitution of a term for a variable. In metamath's set.mm, such substitution is still possible, but it requires an additional hypothesis. For example, set.mm's  has as a hypothesis   which means "A is not a proper class".

First-order logic with quantifiability works fine for Peano arithmetic (see for example Raph Levien's peano_thms ), and set theories without proper classes, such as ZF.

Similar axioms/theorems in other systems
Metamath's set.mm has a theorem  (where   and   are classes and   is a variable), which closely resembles our axiom of quantifiability except for A ∈ B (which means "A is not a proper class").