Skip to content

Instantly share code, notes, and snippets.

@wilcoxjay
Created July 14, 2015 18:08
Show Gist options
  • Select an option

  • Save wilcoxjay/7d38b42f60218b7e5685 to your computer and use it in GitHub Desktop.

Select an option

Save wilcoxjay/7d38b42f60218b7e5685 to your computer and use it in GitHub Desktop.
eq_apply
Section alkabetz.
Ltac eq_apply H :=
match type of H with
| ?F ?X =>
match goal with
| [ |- ?F ?Y ] =>
replace Y with X; [exact H|]
end
end.
Variable A : Type.
Variable f : A -> Prop.
Variable x y : A.
Goal f x -> f y.
intros.
eq_apply H.
(* now prove equality ... *)
Admitted.
End alkabetz.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment