Skip to content

Instantly share code, notes, and snippets.

@MikeMKH
Last active April 27, 2017 10:56
Show Gist options
  • Save MikeMKH/07f7bafcfdfa654ce71abca0d5de7a87 to your computer and use it in GitHub Desktop.
Save MikeMKH/07f7bafcfdfa654ce71abca0d5de7a87 to your computer and use it in GitHub Desktop.
Simple example of the cut rule in Coq with and without the using the cut rule from Coq Art
(* exercise 3.5 from Coq Art *)
Section section_for_cut_example.
Variables P Q R T : Prop.
Hypotheses (H : P -> Q)
(H0 : Q -> R)
(H1 : (P -> R) -> T -> Q)
(H2 : (P -> R) -> T).
Theorem cut_example : Q.
Proof.
cut (P -> R).
intro H3.
apply H1; [assumption | apply H2; assumption].
intro H3; apply H0; apply H; assumption.
Qed.
Theorem cut_example_without_cut : Q.
Proof.
apply H1.
intro H3; apply H0; apply H; assumption.
apply H2.
intro H3; apply H0; apply H; assumption.
Qed.
End section_for_cut_example.
@MikeMKH
Copy link
Author

MikeMKH commented Apr 21, 2017

There maybe a better way to do this, but I think I captured the cut rule in the cut_example_without_cut.

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