In the following Coq proof:
Ltac easy_ltac t := match goal with
| [Z: @eq nat t ?Y |- _ ] => pose ?Y as N
end.
Lemma easy: forall (n: nat), (n >= O)%nat.
Proof.
intros n. destruct n eqn: M. easy_ltac n.
I get the error message: "No matching clauses for match.", while I have the hypothesis
M : @eq nat n O
I do not understand why.