diff options
author | Andres Erbsen <andreser@mit.edu> | 2015-11-17 11:24:23 -0500 |
---|---|---|
committer | Andres Erbsen <andreser@mit.edu> | 2015-11-17 11:24:37 -0500 |
commit | 760c1443836e990287b576b24dcb1902f7d081d5 (patch) | |
tree | 5716314df3a1d4371ed1681db3a766834901f759 /src/Util/CaseUtil.v | |
parent | b3dcf834d5ab8d620546e028b53d04e05b1b60bd (diff) |
ModularBaseSystem.carry: implement, state lemmas, some progress on proofs
Diffstat (limited to 'src/Util/CaseUtil.v')
-rw-r--r-- | src/Util/CaseUtil.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Util/CaseUtil.v b/src/Util/CaseUtil.v new file mode 100644 index 000000000..35f207ffc --- /dev/null +++ b/src/Util/CaseUtil.v @@ -0,0 +1,12 @@ +Require Import Arith. + +Ltac case_max := + match goal with [ |- context[max ?x ?y] ] => + destruct (le_dec x y); + match goal with + | [ H : (?x <= ?y)%nat |- context[max ?x ?y] ] => rewrite Max.max_r by + (exact H) + | [ H : ~ (?x <= ?y)%nat |- context[max ?x ?y] ] => rewrite Max.max_l by + (exact (le_Sn_le _ _ (not_le _ _ H))) + end + end. |