Created
July 8, 2019 10:54
-
-
Save Blaisorblade/2cc6275cce499c81ec30ff12b1fc4b23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import ssreflect. | |
(* | |
Playing with | |
https://coq.inria.fr/refman/proof-engine/ssreflect-proof-language.html#type-families | |
*) | |
Lemma foo {a1 a2} : a1 = a2 -> a1 + a1 = a2 + a2. | |
Fail progress case. | |
(* Either one works, and gives a goal that can be dispatches by reflexivity. *) | |
(* case E: _ /. *) | |
(* case E: a2 /. *) | |
(* case: a2 /. *) | |
(* Harder: let's rewrite just one occurrence of a2, but generate an equation E: *) | |
case E: {2} a2 /. | |
(* Let's destruct on this equation to get to the rest. *) | |
(* case: a1 / E. *) | |
(* case: {1 2 3} a1 / E. *) | |
case: {1} a1 / E. | |
reflexivity. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment