Definition of Substitution (Equality vs Equivalence relations) I'm confused as to wether substitution is a consequence of the properties about equivalence relations (transitivity, reflexivity, and symetry) or rather it is an independent property of equality. For example, in general $(x=y) \wedge (x&lt;z) \Longrightarrow (y&lt;z)$. But what if I have an equivalence relation , say $"\equiv$", instead of equality. Can I use substitution directly or do I need to prove it?

EDIT: I have to admit that I asked this question without being very clear and also without thinking much about it. So, my appologies for that. I'll do some aditional details and please if you consider that my question doesn't make sense, vote to close it. 

Like I said, I'm confused because I don't know if "equality" ($=$) is a term more general than "equivalence relation" (~) or else they are the same. I was asking about the property of substitution because aparently when using "$=$" everything can be substituted whereas it is not the case when using "~".  

Let's define, for example, "$\equiv_{n}$" such that $\forall a,b\in \mathbb{Z}(a\equiv_{n} b \iff n|b-a)$. Now, suppose that $a\equiv_{n} b$ and $b=6^{m}$ for some $m\in \mathbb{Z}$. Then $a\equiv_{n}6^{m}$ by substitution. Also if $m=k+7$ we can again make a substitution to get $a\equiv_{n}6^{k+7}$. But, this same process cannot always be done if we consider $b\equiv_{n}6^{m}$ and $m\equiv_{n}k+7$.

Since both "$=$" and "~" are transitive, reflexive and symmetric my guess was then that substitution is a property that belongs to $"="$ but no to "~", but I'm not sure and I'm totally confused.
You would need to prove the substitution property. Suppose we have some equivalence relation $\cong$, an operation $\circ$, and a relation $R$.
A lot of mathematics can be done by painstakingly using $\cong$ every time one normally uses $=$. We could define the following:

$\circ$ is a $\cong$-compatible operation iff for every $x,y,z$:
$$x \cong y \implies z \circ x \cong z \circ y\land x \circ z \cong y \circ z$$
$R$ is a $\cong$-compatible relation iff for every $x,y,z$:
$$x \cong y \implies (z R x \iff z R y \land x R z \iff y R z)$$

Effectively, then, $\circ$ and $R$ do not &quot;distinguish&quot; $\cong$-equivalence classes. The former of these usually is defined the other way around, and $\cong$ is called compatible with $\circ$ (see ProofWiki).
Similar definitions can be made for operations and relations of different arities. It is clear that these definitions amount to the substitution property.
They also provide us an insight into what equality is. For $x = y$ to be meaningful, it is obvious that all operations and relations should be $=$-compatible.
On the other hand, this property intuitively says everything there is to say about equality. For, if we cannot distinguish two things by any operation or relation, are they really different?
There is a philosophical aspect to this, but for the purposes of mathematics, it is perfectly viable to define $=$ by requiring it to universally satisfy the substitution property.
What I believe you call substitution, isn't always possible in ordinary mathematics.  You can easily end up with nonsense if you aren't careful.  For instance, no one around here (well there does exist one exception, but I think he's on holiday at the moment), will deny that 5-3=2.  Nor will anyone deny 4-1=3.  Given that you can substitute arbitrarily, it follows that 5-4-1=2.  Except, 5-4-1=1-1=0 makes sense under our assumptions, and who would ever dare deny one of our assumptions?  No wise person would do that, right?

The fool currently on holiday has told me on more than one occasion that the problem is not hard to resolve at all.  Substitutions for equals can happen in mathematics easily if one starts doing things differently.  The fool on holiday has also told me that no one around here much cares to take up any sort of method which can resolve such a problem.  The fool on holiday has also told me he has personally concluded that either mathematicians don't usually believe in substitutions for equals, or there have to exist a massive number of contradictions derivable from the principles employed by many mathematical texts.  And yes, the fool is a he.

The fool left me with some notes which indicate how to resolve the problem in several different ways, which I can share if you have not happened upon a solution yourself so far.

You can have "substitution for equals" in a fairly mechanical fashion which requires no insight.  There exist at least 4 ways to do this.  You can't use all 4 ways simultaneously.  The 4 ways the fool indicated to me for binary functions are


Write all functions before numerical symbols, variables, and other constants.  Instead writing x+y-x*y write - + x y * x y.
Put brackets or other parenthetical symbols around the expressions.  Instead of writing x+y-x*y, write [[x+y]-[x*y]].
Put brackets or other parentheses around the variables, numerical symbols, and other constants.  Instead of writing x+y-x*y write [[x]+[y]]-[[x]*[y]].
Write all function after the numerical symbols, variables, and other constants.  Instead writing x+y-x*y write x y + x y * - .


The fool kindly left me with notes which encapsulate rules which enable us to determine when an expression can get "substituted for an equal" mechanically, as somehow the fool managed to convince me that things would work out better if more texts did that thoroughly.

Let U stand for any unary function, and B the class of binary functions.  For the first way of writing things, the rules go:


If x is a variable or constant, then Fx equals a variable or constant.
If x and y are variables or constant, then Bxy equals a variable or constant.


For the second way:


If x is a variable or constant, then Fx equals a variable or constant.
If x and y are variables or constants, then [xBy] equals a variable or constant.


For the third way:


If x is a variable or constant, then Fx equals a variable or constant.
If x and y are variables or constants, then [x]B[y] equals a variable or constant.


For the fourth way:


If x is a variable or constant, then Fx equals a variable or constant.
If x and y are variables or constants, then xyB equals a variable or constant.


The fool informed me you can freely space things out in any of the 4 ways as well as adding more parenthetical symbols in the first and fourth way if you like.  And that all four ways allow you to "substitute for equals" just by manipulating symbols, so to speak.