1- Require Import List.
2- Require Import ZArith.
3- Require Import Psatz.
1+ From Stdlib Require Import List.
2+ From Stdlib Require Import ZArith.
3+ From Stdlib Require Import Psatz.
44Require Import ITree.ITree.
55Require Import ITree.Interp.Traces.
66Require Import compcert.lib.Maps.
@@ -15,6 +15,9 @@ Require Import VST.progs.io_os_specs.
1515Require Import VST.zlist.sublist.
1616Require Import VST.progs.os_combine.
1717Import ExtLib.Structures.Monad.
18+ From Stdlib Require Import FinFun.
19+
20+ Opaque eq_dec.eq_dec.
1821
1922Local Ltac inj :=
2023 repeat match goal with
@@ -567,15 +570,15 @@ Section Invariants.
567570 NoDup (mkRecvEvents logIdx cs).
568571 Proof .
569572 unfold mkRecvEvents, enumerate; intros.
570- apply FinFun. Injective_map_NoDup; auto using combine_NoDup, seq_NoDup.
573+ apply Injective_map_NoDup; auto using combine_NoDup, seq_NoDup.
571574 red; intros (? & ?) (? & ?); intros; inj; auto.
572575 Qed .
573576
574577 Lemma Zlength_enumerate {A} : forall (xs : list A),
575578 Zlength (enumerate xs) = Zlength xs.
576579 Proof .
577580 unfold enumerate; intros.
578- rewrite Zlength_combine, !Zlength_correct, seq_length ; lia.
581+ rewrite Zlength_combine, !Zlength_correct, length_seq ; lia.
579582 Qed .
580583
581584 Lemma seq_nth_app : forall len start n pre post,
@@ -585,7 +588,7 @@ Section Invariants.
585588 intros * Heq.
586589 enough (n = nth (length pre) (seq start len) O); subst.
587590 { rewrite Heq, app_nth2, Nat.sub_diag, seq_nth; auto; cbn.
588- rewrite <- (seq_length len start), Heq, length_app; cbn; lia.
591+ rewrite <- (length_seq len start), Heq, length_app; cbn; lia.
589592 }
590593 rewrite Heq, app_nth2, Nat.sub_diag; auto.
591594 Qed .
@@ -599,7 +602,7 @@ Section Invariants.
599602 rewrite combine_fst, map_app in Heq; cbn in Heq.
600603 apply seq_nth_app in Heq; subst; cbn; auto using length_map.
601604 rewrite <- Nat2Z.id, <- Zlength_length; rewrite <- Zlength_correct.
602- - rewrite !Zlength_correct, seq_length ; auto.
605+ - rewrite !Zlength_correct, length_seq ; auto.
603606 - apply Zlength_nonneg.
604607 Qed .
605608
@@ -1913,7 +1916,7 @@ Import functional_base.
19131916 split; auto; cbn in *.
19141917 rewrite Int.signed_repr by (cbn; lia).
19151918 destruct (Coqlib.zeq z1 (-1)); subst; auto.
1916- if_tac ; try easy.
1919+ destruct (eq_dec.eq_dec _ _) ; try easy.
19171920 rewrite Zle_imp_le_bool by lia.
19181921 destruct Hput as (? & [(? & ?) | (? & ?)]); subst; auto; try lia.
19191922 rewrite Zmod_small; auto; functional_base.rep_lia.
0 commit comments