Substitutivity of Class Equality

Theorem
Let $A$ and $B$ be classes.

Let $P(A)$ be a well-formed formula of the language of set theory.

Let $P(B)$ be the same proposition $P(A)$ with all instances of $A$ replaced with instances of $B$.

Let $=$ denote class equality


 * $A = B \implies ( P(A) \iff P(B) )$

Proof
By induction on the well-formed parts of $P(A)$.