From 760c1443836e990287b576b24dcb1902f7d081d5 Mon Sep 17 00:00:00 2001 From: Andres Erbsen Date: Tue, 17 Nov 2015 11:24:23 -0500 Subject: ModularBaseSystem.carry: implement, state lemmas, some progress on proofs --- src/Util/CaseUtil.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/Util/CaseUtil.v (limited to 'src/Util/CaseUtil.v') 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. -- cgit v1.2.3