I am curious what justifies the use of shorthands or abbreviations for certain formulas in first order logic. In particular, I'm interested in building up some basic mathematical principles from the zfc axioms and there's many times when a new symbol is introduced which expresses some logical statement more succinctly. My question is how this is logically or syntactically justified. For example, in the Wikipedia article for Zermelo Fraenkel set theory under the Axiom of Extensionality it is stated that $x=y$ can be taken to be shorthand for
$$ \forall z[ z \in x \Leftrightarrow z \in y] \land \forall w [ x \in w \Leftrightarrow y \in w] \hspace 1in (1) $$
The way I interpret that is anywhere we see the above expression we can delete it and "plug in" $x=y$.
My questions are as follows.
First, is there a way to notationally indicate that the expression $x=y$ and the expression in $(1)$ are related in such a way (logically equivalent?) that one can (without any intervening steps?) simply replace one by the other in any expression?
Second, which rules of logic allows us to create definitions like $x=y$ and which rules allow us to make the replacements indicated above?
As a slightly simpler example or a hint at what I feel might be the answer, suppose we have the two axioms
$$ B \Leftrightarrow C $$ $$ A \land B $$
Now in a few lines we could derive $A \land C$. However, it seems to me that if we have ANY formula involving $C$ we could in some number of lines derive the same expression but with $B$ replaced by $C$. This would especially be useful in very complicated expressions where $B$ might be embedded pretty deeply in the expression and it would be hard to get at $B$ to replace it with $C$ using the usual rules of deduction. Is there something that allows us to replace all instances of $B$ with $C$ if we have an expression like $B \Leftrightarrow C$.
I would appreciate someone pointing me towards the correct concepts I should be looking up and some proper notation for the concepts I am trying to express!
Also note: I don't really know the meaning of things like $\vdash$, $\vDash$, or the difference between $\leftrightarrow$, $\Leftrightarrow$, $=$, $\equiv$, which are sometimes brought up as having different meanings. Maybe these different meanings are key to my question.