Trouble understanding equivalence relations and equivalence classes I've read up a bit on equivalence relations and equivalence classes, but I'm a bit unsure on the whole concept.
From what I've read and equivalence relation, ~, between two mathematical objects $a$ and $b$ is a binary operation satisfying reflexivity, symmetry and transitivity.
Does this mean, that if two objects satisfy a given relation that satisfies the above properties, then these two objects can be considered equivalent (with respect to this relation)? For example, in physics if I have two Lagrangians that differ by a total derivative then they both lead to the same equations of motion, and thus describe the dynamics of the same physical system (correct?!), so would it be correct to say that these to Lagrangians are equivalent under the relation that they lead to the same equations of motion, i.e. $$\mathcal{L}:=\mathcal{L}+\frac{df}{dt} \quad\iff\quad \delta S_{1}= \delta S_{2}$$ where $S_{1}=\int \mathcal{L}\;dt$ and $S_{2}=\int [\mathcal{L}+\frac{df}{dt}]\;dt$.
Using the same example, could one then define a Lagrangian for a particular theory as the equivalence class of Lagrangians that lead to the same equations of motion?
I guess my real issue is that the definition that I've read seems very abstract and I'm unsure how to relate it to specific examples?! I get that two objects that satisfy a particular equivalence relation aren't actually equal, but is the idea that if we define a particular equivalence relation, we can then form a set of objects that satisfy this relation, which we call an equivalence class, and then if we have a particular problem that utilises this relation, then we can use any element of the equivalence class as they all satisfy this particular relation, so relative to a problem involving this particular relation, they are equivalent. (Is it kind of like a restricted equality relation? For example, saying that $y=x^{2}$ for $0<x<1$)?!
Sorry if this isn't worded very well, just trying to explain what my thoughts are on the subject so far.
 A: Here are two examples :
$1 - $ Consider the relation $\equiv$ ( an equivalent relation), then
$$a \sim b \Leftrightarrow a\equiv b \mod 2 $$
That is, $a$ and $b$ will be in the same class $\overline{a}$ if their remainders of the division by $2$ are the same. For example $4$ and $6$ belong to the same class, which we are going to choose a representant $0$, because
$$6 = 3 \cdot 2 + \color{red}{0} \ \ \text{and} \ \ 4 = 2 \cdot 2 + \color{red}{0}$$
then we say $\overline{4} = \overline{6} = \overline{0}$. If we think, there are two distinct classes: $$\overline{0} = \{x \in \mathbb Z ; x \equiv 0 \mod 2, \text{$x$ is even}\}\ \  \text{and}\ \  \overline{1} = \{x \in \mathbb Z ; x \equiv 1 \mod 2, \text{$x$ is odd}\}$$
The set of all classes is
$$\mathbb Z_2 = \{\overline{0}, \overline{1}\}$$
$2-$ Consider the relation
$$(a,b) \sim (c,d) \Leftrightarrow ac = bd $$
This equivalent relation gives us the fractions, that is the filed of fractions of $\mathbb Z$. Similarly we choose a class representant for example,
$$\frac{1}{2} = \frac{2}{4} = \frac{3}{6 } = \cdots$$
we choose $\frac{1}{2}$ to be the class representant. Notice that $\mathbb Q = \{ \frac{a}{b} ; a,b \in \mathbb Z, \ \ \text{where}\ \  b \neq 0\}$ is the set of all classes.
A: Following is an elaborate example that will help solidify the concept of  partitions, equivalence classes and equivalence relations.
A mathematician has quite a bit of stuff in his garage (in an objective assessment, some of it would be called junk). In fact, it has been so long since he has even stepped inside it, that he realizes that the items form an amorphous set that he denotes by $J$, and he can only classify the items with the coarsest partition, $\{J\}$. Not much to say about all that junk in the garage.
One day he decides to tackle this problem. He starts by labeling the items with stickies and indexing the labels with $\{1,2,\dots,n\}$. He also write down on a piece of paper a descriptions for each index,
$\quad 1: \text{Dull screwdriver with blue handle}$
$\quad 2: \text{Empty coffee can}$
$\quad etc.$
He now feels comfortable by defining the 'finest' partition consisting of all the singleton sets $\{1\}$, $\{2\}$, $\dots$, and $\{n\}$. He also starts to use colored markers on the list to group items together that exhibit some affinity, at least in his mind.
Weeks later he has finished his goal. He hires a carpenter to put up five shelves, $A, B, C, D, E$ in his garage. When the work is completed he goes into the garage and puts every item on his list on one of the five shelves.
Of course since he is mathematician he looks at the equivalence relation he has created,
$\quad j \sim k \text{ iff } k \text{ is on the same shelf as } j$
He goes back to thinking about more interesting things, but years later he needs a screwdriver. Unfortunately he can't find that marked up paper and has no idea what shelf the screwdriver is on.
A: The interesting bit is that the set of all objects $X$ will be partitioned into a number of disjunct subsets $S \subseteq X$, each $S$ containing all those members of $X$ which are equivalent regarding the equivalence relation. These sets are the equivalence classes.
Your example was 
$$
\mathcal{L}_1 R \mathcal{L}_2 \iff \mathcal{L}_1 - \mathcal{L}_2 = df/dt
$$
for some function $f$.
You would need to show that this relation $R$ is reflexiv, symmetric and transitive, then it is an equivalence relation and you have proper equivalence classes.
I do not know if equivalence classes of Lagrangians play an important role in physics.
Nice examples of equivalence classes at work are:


*

*modular arithmetic (where numbers of the same remainder are thrown in the same pot)

*finite automata (the Nerode relation used in the construction of minimal deterministic finite automata)
A: Well, the ideas of things being interchangeable and of an equivalence class are not entirely the same. In particular, we might, in your example, say that two systems described by different Lagrangians, but yielding the same equations of motion are isomorphic in a sense. In a strict sense, isomorphism is an idea from category theory, but what it intuitively means is that, "Every property we care about of object $X$ corresponds to one of object $Y$ and vice versa" - in the context of physics, the property we care about could be the induced equations of motion. The idea here is that anything we can deduce only from those properties is true in $X$, it is true in $Y$ too - formalizing, in a very meaningful way, that, for instance, two distinct Lagrangians can describe the same system, far as we care - and hence they are interchangeable for our purposes. We can prove that things being "isomorphic" creates an equivalence relation - if $X$ and $Y$ describe the same system and so do $Y$ and $Z$, then so must $X$ and $Z$. 
Other examples of this, if you're familiar with them, might be how we call groups isomorphic if there is a bijective homomorphism between them, or how we call topological spaces homeomorphic (which is a kind of "isomorphic") if there is a continuous function between them with a continuous inverse.
The idea of an equivalence relation is an abstraction from this - where isomorphisms have some meaning behind them - i.e. a property in one system is preserved in another - equivalence relations do not. They merely describe the abstract structure present in what can be considered "the same". Trivially, the relation $x\sim y$ for all $x$ and $y$ is an equivalence relation, but it certainly doesn't have very much meaning.
A: Maybe this description can help:
Given an equivalence relation $\sim$ on a set $X$, there is a notion of quotient set $X/\sim$ and a surjective map $\pi:X\to X/\sim$, which is, by definition, the set of "equivalence classes".
Reciprocally, if $f:X\to Y$ is any function, there is an equivalence relation attached to $f$, defined by $x_{1}\sim x_{2}$ iff $f(x_{1})=f(x_{2})$. This is clearly an equivalence relation, and by the quotient set procedure one can easily see that EVERY equivalence relation is given by this construction.
In your case, you can consider $X=\{\text{the set of all possible Lagrangians}\}$, and the set $Y=\{\text{the set of all possible equation of motion}\}$. Your map $f$ is given by " the Euler-Lagrange equation associated to $L$".
With these $X,Y,f$ you ave "two Lagrangian are equivalent iff they give the same equation of motion". Notice that I'm not saying anything new (!), but (I hope) now you can see clearly that you are facing a true equivalence relation.
