From 94e9e486b3bf1dfe6dc095973709b1716d07515d Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 30 Mar 2020 16:50:55 +0200 Subject: inject_l injected --- backend/Injectproof.v | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'backend/Injectproof.v') diff --git a/backend/Injectproof.v b/backend/Injectproof.v index 41bbd028..a805aa3e 100644 --- a/backend/Injectproof.v +++ b/backend/Injectproof.v @@ -36,6 +36,21 @@ Proof. reflexivity. Qed. +Lemma pos_add_nat_monotone : forall x n1 n2, + (n1 < n2) % nat -> + (pos_add_nat x n1) < (pos_add_nat x n2). +Proof. + induction n1; destruct n2; intros. + - lia. + - simpl. + pose proof (pos_add_nat_increases x n2). + lia. + - lia. + - simpl. + specialize IHn1 with n2. + lia. +Qed. + Lemma inject_list_increases: forall l prog pc dst, (fst (inject_list prog pc dst l)) = pos_add_nat pc (S (List.length l)). @@ -266,6 +281,7 @@ Qed. Lemma inject_l_injected: forall injections prog injnum pc l extra_pc k + (BELOW : forallb (fun injection => (fst injection)