aboutsummaryrefslogtreecommitdiffstats
path: root/src/PropToBool.v
diff options
context:
space:
mode:
authorChantal Keller <Chantal.Keller@lri.fr>2021-04-26 18:33:59 +0200
committerChantal Keller <Chantal.Keller@lri.fr>2021-04-26 18:33:59 +0200
commit4edc3f9f40d131bb64311a533d483ae32257bbf2 (patch)
tree163edb6c5af8ce0ed0b6eb688cc3bcbd50301d15 /src/PropToBool.v
parent5cb4fb6fbda54976254255ffa5a428f63dee6115 (diff)
parentf46800b1c69e687f5605cce88b037cb89d63b79a (diff)
downloadsmtcoq-4edc3f9f40d131bb64311a533d483ae32257bbf2.tar.gz
smtcoq-4edc3f9f40d131bb64311a533d483ae32257bbf2.zip
Merge branch 'coq-8.10' of github.com:smtcoq/smtcoq into coq-8.11
Diffstat (limited to 'src/PropToBool.v')
-rw-r--r--src/PropToBool.v14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/PropToBool.v b/src/PropToBool.v
index 1ba1492..5d7fd60 100644
--- a/src/PropToBool.v
+++ b/src/PropToBool.v
@@ -42,12 +42,16 @@ Ltac prop2bool :=
| [ |- context[ Z.ge _ _ ] ] => rewrite <- geb_ge
| [ |- context[ Z.eq _ _ ] ] => rewrite <- Z.eqb_eq
- | [ |- context[ @Logic.eq ?t _ _ ] ] =>
+ | [ |- context[ @Logic.eq ?t ?x ?y ] ] =>
lazymatch t with
| bitvector _ => rewrite <- bv_eq_reflect
| farray _ _ => rewrite <- equal_iff_eq
| Z => rewrite <- Z.eqb_eq
- | bool => fail
+ | bool =>
+ lazymatch y with
+ | true => fail
+ | _ => rewrite <- eqb_true_iff
+ end
| _ =>
lazymatch goal with
| [ p: (CompDec t) |- _ ] =>
@@ -107,6 +111,8 @@ Ltac bool2prop_true :=
| [ |- context[ Z.geb _ _ ] ] => rewrite geb_ge
| [ |- context[ Z.eqb _ _ = true ] ] => rewrite Z.eqb_eq
+ | [ |- context[ Bool.eqb _ _ = true ] ] => rewrite eqb_true_iff
+
| [ |- context[ eqb_of_compdec ?p _ _ = true ] ] => rewrite <- (@compdec_eq_eqb _ p)
| [ |- context[ ?G0 || ?G1 = true ] ] =>
@@ -218,6 +224,7 @@ Section Test.
Hypothesis basic : forall (l1 l2:list A), length (l1++l2) = (length l1 + length l2)%nat.
Hypothesis no_eq : forall (z1 z2:Z), (z1 < z2)%Z.
Hypothesis uninterpreted_type : forall (a:A), a = a.
+ Hypothesis bool_eq : forall (b:bool), negb (negb b) = b.
Goal True.
Proof.
@@ -225,12 +232,13 @@ Section Test.
prop2bool_hyp no_eq.
prop2bool_hyp uninterpreted_type.
admit.
+ prop2bool_hyp bool_eq.
prop2bool_hyp plus_n_O.
Abort.
Goal True.
Proof.
- prop2bool_hyps (basic, plus_n_O, no_eq, uninterpreted_type, plus_O_n).
+ prop2bool_hyps (basic, plus_n_O, no_eq, uninterpreted_type, bool_eq, plus_O_n).
admit.
Abort.
End Test.