Skip to content

Instantly share code, notes, and snippets.

@MikeMKH
Created April 27, 2017 10:57
Show Gist options
  • Save MikeMKH/98f04ab550bbcdf7688c06c6e1d05335 to your computer and use it in GitHub Desktop.
Save MikeMKH/98f04ab550bbcdf7688c06c6e1d05335 to your computer and use it in GitHub Desktop.
Look at inference rules in Coq from Coq Art
(* exercise 4.3 from Coq Art *)
Lemma all_perm :
forall (A : Type) (P : A -> A -> Prop),
(forall x y : A, P x y) ->
forall x y : A, P y x.
Proof.
intros A P H x y.
apply H.
Qed.
Lemma resolution :
forall (A : Type) (P Q R S : A -> Prop),
(forall a : A, Q a -> R a -> S a) ->
(forall b : A, P b -> Q b) ->
forall c : A, P c -> R c -> S c.
Proof.
intros A P Q R S H H0 c H1 H2.
apply H; try assumption.
apply H0; assumption.
Qed.
@MikeMKH
Copy link
Author

MikeMKH commented Apr 27, 2017

Note try assumption will not be able to applied to Q c but can be applied to R c, so try will fail on Q c and give that as the next goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment