Skip to content

Instantly share code, notes, and snippets.

@wilcoxjay
Created May 25, 2015 19:19
Show Gist options
  • Save wilcoxjay/3a8d07de64eb6f5f276a to your computer and use it in GitHub Desktop.
Save wilcoxjay/3a8d07de64eb6f5f276a to your computer and use it in GitHub Desktop.
Section astrolabe.
Variable A : Type.
Variable open close : A.
Variable l1 l2 : list A.
Variable wp : list A -> Prop.
Goal wp (open :: ((l1 ++ close :: nil) ++ l2)%list) ->
wp (open :: (l1 ++ close :: l2)%list) .
match goal with
| [ |- ?p ?a -> ?p ?b ] =>
let H := fresh "H" in
cut (a = b); [solve[intro H; rewrite H; auto]|]
end.
(* goal is now:
(open :: (l1 ++ close :: nil) ++ l2)%list =
(open :: l1 ++ close :: l2)%list
*)
Admitted.
End astrolabe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment