I'm reading Software Foundations book and in Imp.v file, there is this definition of a theorem eq_id_dec as follows:
Theorem eq_id_dec : forall id1 id2 : id, {id1 = id2} + {id1 <> id2}.
Proof.
intros id1 id2.
destruct id1 as [n1]. destruct id2 as [n2].
destruct (eq_nat_dec n1 n2) as [Heq | Hneq].
Case "n1 = n2".
left. rewrite Heq. reflexivity.
Case "n1 <> n2".
right. intros contra. inversion contra. apply Hneq. apply H0.
Defined.
Does this theorem mean that for any id1 and id2 of type id, both id1=id2 and id1!=id2 cannot happen? I'm not sure.