From 6a0a78282219d1402457222d5728286836ab9f0f Mon Sep 17 00:00:00 2001 From: Chantal Keller Date: Wed, 1 Jul 2020 10:29:37 +0200 Subject: Use officiel library for proof irrelevance --- src/bva/BVList.v | 6 ++---- src/bva/Bva_checker.v | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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, -- cgit