The Ltac chapter of CPDT, shows a "faulty" tactic:
Theorem t1' : forall x : nat, x = x.
match goal with
| [ |- forall x, ?P ] => trivial
end.
The book then explains
The problem is that unification variables may not contain locally bound variables.
In this case, [?P] would need to be bound to [x = x], which contains the local quantified
variable [x]. By using a wildcard in the earlier version, we avoided this restriction.
However, the tactic above actually works in Coq 8.11!
Can unification variables now contain locally-bound variables? If so, is there any difference between the above and
Theorem t1' : forall x : nat, x = x.
match goal with
| [ |- forall x, _ ] => trivial
end.
(where we replaced ?P
by _
)?