diff options
author | Chantal Keller <Chantal.Keller@lri.fr> | 2020-07-01 10:29:37 +0200 |
---|---|---|
committer | Chantal Keller <Chantal.Keller@lri.fr> | 2020-07-01 10:29:37 +0200 |
commit | 6a0a78282219d1402457222d5728286836ab9f0f (patch) | |
tree | d40d0dc859a2fc7c3272dd8b540c5d8115fd7563 | |
parent | 7a465031fb18e4af2c90c04b435ed336bbdb79a3 (diff) | |
download | smtcoq-6a0a78282219d1402457222d5728286836ab9f0f.tar.gz smtcoq-6a0a78282219d1402457222d5728286836ab9f0f.zip |
Use officiel library for proof irrelevance
-rw-r--r-- | src/bva/BVList.v | 6 | ||||
-rw-r--r-- | src/bva/Bva_checker.v | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/bva/BVList.v b/src/bva/BVList.v index a53970b..c542d48 100644 --- a/src/bva/BVList.v +++ b/src/bva/BVList.v @@ -12,6 +12,7 @@ Require Import List Bool NArith Psatz Int63 Nnat ZArith. Require Import Misc. +Require Import ProofIrrelevance. Import ListNotations. Local Open Scope list_scope. Local Open Scope N_scope. @@ -21,9 +22,6 @@ Local Open Scope bool_scope. Set Implicit Arguments. Unset Strict Implicit. -(* We temporarily assume proof irrelevance to handle dependently typed - bit vectors *) -Axiom proof_irrelevance : forall (P : Prop) (p1 p2 : P), p1 = p2. Lemma inj a a' : N.to_nat a = N.to_nat a' -> a = a'. Proof. intros. lia. Qed. @@ -303,7 +301,7 @@ Module RAW2BITVECTOR (M:RAWBITVECTOR) <: BITVECTOR. Proof. unfold bv_eq. rewrite M.bv_eq_reflect. split. - revert a b. intros [a Ha] [b Hb]. simpl. intros ->. - rewrite (proof_irrelevance Ha Hb). reflexivity. + rewrite (proof_irrelevance _ Ha Hb). reflexivity. - intros. case a in *. case b in *. simpl in *. now inversion H. (* now intros ->. *) Qed. diff --git a/src/bva/Bva_checker.v b/src/bva/Bva_checker.v index eebf5f9..20cc2cf 100644 --- a/src/bva/Bva_checker.v +++ b/src/bva/Bva_checker.v @@ -19,6 +19,7 @@ Require Import Int63 Int63Properties PArray SMT_classes ZArith. Require Import Misc State SMT_terms BVList Psatz. Require Import Bool List BoolEq NZParity Nnat. Require Import BinPos BinNat Pnat Init.Peano. +Require Import ProofIrrelevance. Require FArray. @@ -1474,7 +1475,7 @@ Proof. intros. destruct a, b. unfold BITVECTOR_LIST.bv in H. revert wf0. rewrite H. intros. - now rewrite (proof_irrelevance wf0 wf1). + now rewrite (proof_irrelevance _ wf0 wf1). Qed. Lemma nth_eq0: forall i a b xs ys, |