Proof DAG. Number of layers is the same as the number of vertices in the longest path in G This is a questions regarding how to follow the given solution. Sorry for my improving English skill and asking this stupid question. Really appreciated any help. as learned in lecture:
First layer: all nodes that are sources
Next layer: all nodes that are now sources(once we remove previous layer and its ongoing edges)
Number of layers is the same as the number of vertices in the longest path in G?
Given solution:
Proof. Observe that any two vertices of DAG G cannot be in the same layer. Now suppose by contradiction that the number of layers in G is NOT THE SAME as the number of vertices in the longest path of G. Let p be the number of vertices of the longest path and l be the number of layers of G. By our assumption p 6= l so we have two cases
Case 1: l < p. That is, number of layers less than number of vertices in longest path. By the pigeonhole principle, there will be at least two vertecies on the longest path that are also in the same layer. This is impossible, hence a contradiction.
Case 2: l > p. That is, number of layers greater than number of vertecies in longest path. It is impossible to have more layers than p, the number of vertecies in the longest path. Hence, we also have a contradiction.
In both of our cases we have contradictions. Hence our assumption that the number of layers in G is not the same as the number of vertecies in the longest path of G must be wrong. This completes the proof.
The sentence in bold is the part, I don't understand it. I can't observe that"Observe that any two vertices of DAG G cannot be in the same layer". because I think there could be more than one vertices in a layer. For example: a directed graph of tree. can't we consider all the immediate sub-tree of root as one layer?  Please help, thank you. 
 A: This is a consequence of Mirsky's theorem, since for any digraph $D=(V,E)$ we have: $$D\text{ is a directed acyclic graph}\iff P=(V,E^{*})\text{ is a strict partial order over }V$$
Where $E^{*}$ is the transitive closure of the relation $E$, to prove this first note that each "layer" as you described forms an anti-chain also the set of all the layers in $D$ by your definition partition the vertices in $V$ therefore by Mirsky's theorem we know the total number of layers is greater then or to equal to the height of $P$. But since the height of the poset $P$ is the same as the length of the longest path in $D$ this means the total number of layers is greater then or equal to the length of the longest path, however we know no path longer then the total number of layers can exist in $D$ as otherwise by the pigeonhole principle said path must have two vertices in the same layer contradicting the fact that each layer forms an antichain. Therefore the total number of layers in $D$ must be equal to the length of the longest path in $D$ as required.
