Skip to content

Instantly share code, notes, and snippets.

@tbelaire
Created April 21, 2016 20:50
Show Gist options
  • Save tbelaire/2ab40b3b2a76a0a7ce6a8f9117096638 to your computer and use it in GitHub Desktop.
Save tbelaire/2ab40b3b2a76a0a7ce6a8f9117096638 to your computer and use it in GitHub Desktop.
Parameter f: nat -> nat.
Ltac foo := match goal with
| |- context ctx [S ?n] => idtac n
end.
Lemma bar : 2 = 1 + 1.
Proof.
foo.
reflexivity.
Qed.
Lemma baz : exists n:nat, S n = S n.
Proof.
foo. (* fails to match *)
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment