aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChantal Keller <Chantal.Keller@lri.fr>2021-05-06 18:46:39 +0200
committerChantal Keller <Chantal.Keller@lri.fr>2021-05-06 18:46:39 +0200
commitcd195624db96b90b582257f29a26f20ea3879760 (patch)
tree7a1bafa37305f38225d712ffc05c11870e28865c
parentd5d96bced453c37cdabf603a73c53c574b8c6cb2 (diff)
parent0991c82f51cdbeb4887b32d5baddfb9217b5c19f (diff)
downloadsmtcoq-pxtp21.tar.gz
smtcoq-pxtp21.zip
Merge branch 'coq-8.10' of github.com:smtcoq/smtcoq into coq-8.11pxtp21
-rw-r--r--src/QInst.v11
-rw-r--r--unit-tests/Tests_verit_tactics.v22
2 files changed, 33 insertions, 0 deletions
diff --git a/src/QInst.v b/src/QInst.v
index 14ff0f7..8971380 100644
--- a/src/QInst.v
+++ b/src/QInst.v
@@ -74,6 +74,13 @@ Proof.
destruct a; destruct c; intuition.
Qed.
+Lemma eqb_or_split a b c:
+ Bool.eqb c (a || b) = true -> negb c || a || b = true.
+Proof.
+ intro H.
+ destruct a; destruct b; destruct c; intuition.
+Qed.
+
(** verit considers equality modulo its symmetry, so we have to recover the
right direction in the instances of the theorems *)
(* TODO: currently incomplete *)
@@ -201,6 +208,10 @@ Ltac vauto :=
first [ strategy1 H
| strategy2 H ]
]
+ | [ |- (negb ?A || ?B || ?C) = true ] =>
+ eapply eqb_or_split;
+ first [ strategy1 H
+ | strategy2 H ]
end
]
);
diff --git a/unit-tests/Tests_verit_tactics.v b/unit-tests/Tests_verit_tactics.v
index 0e2509a..9c5e7f4 100644
--- a/unit-tests/Tests_verit_tactics.v
+++ b/unit-tests/Tests_verit_tactics.v
@@ -1341,3 +1341,25 @@ Section Issue92.
Goal 0 = 2.
Proof. verit_no_check. Abort.
End Issue92.
+
+
+Section Vauto.
+ Variable A : Type.
+ Variable HA : CompDec A.
+ Variable H0 : forall (x y : A) (x0 y0 : list A), x :: x0 = y :: y0 -> y = x /\ y0 = x0.
+ Variable H1 : forall (H : A) (H0 : list A), nil = H :: H0 -> False.
+ Variable search : forall {A : Type} {H: CompDec A}, A -> list A -> bool.
+ Arguments search {_ _} _ _.
+ Variable H4_A : forall (H : CompDec A) (H0 H1 : A) (H2 : list A),
+ search H0 (H1 :: H2) = eqb_of_compdec H H0 H1 || search H0 H2.
+ Variable H2 : forall (H : CompDec (list A)) (H0 H1 : list A) (H2 : list (list A)),
+ search H0 (H1 :: H2) = eqb_of_compdec H H0 H1 || search H0 H2.
+ Variable H3_A : forall (H : CompDec A) (H0 : A), search H0 nil = false.
+ Variable H4 : forall (H : CompDec (list A)) (H0 : list A), search H0 nil = false.
+ Variables a b : A.
+ Variable l : list A.
+ Variable H : search b (a :: l).
+
+ Goal eqb_of_compdec HA a b \/ search b l.
+ Proof. verit_no_check. Qed.
+End Vauto.