diff options
author | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2020-05-11 06:41:38 +0200 |
---|---|---|
committer | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2020-05-11 06:41:38 +0200 |
commit | 490a6caea1a95cfdbddf7aca244fa6a1c83aa9a2 (patch) | |
tree | 510d351a018357c5a0d53c36431e97de4a3d616b | |
parent | d804ec4db20717c68c2c8e8f53e804b425d62b90 (diff) | |
download | compcert-kvx-490a6caea1a95cfdbddf7aca244fa6a1c83aa9a2.tar.gz compcert-kvx-490a6caea1a95cfdbddf7aca244fa6a1c83aa9a2.zip |
backport to coq 8.10.2
-rw-r--r-- | backend/Injectproof.v | 8 | ||||
-rw-r--r-- | backend/Profilingproof.v | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/backend/Injectproof.v b/backend/Injectproof.v index dd5e72f8..9e5ad6df 100644 --- a/backend/Injectproof.v +++ b/backend/Injectproof.v @@ -89,7 +89,7 @@ Qed. Obligation 2. Proof. simpl in BOUND. - lia. + omega. Qed. Program Definition bounded_nth_S_statement : Prop := @@ -104,14 +104,14 @@ Lemma bounded_nth_proof_irr : (BOUND1 BOUND2 : (k < List.length l)%nat), (bounded_nth k l BOUND1) = (bounded_nth k l BOUND2). Proof. - induction k; destruct l; simpl; intros; trivial; lia. + induction k; destruct l; simpl; intros; trivial; omega. Qed. Lemma bounded_nth_S : bounded_nth_S_statement. Proof. unfold bounded_nth_S_statement. induction k; destruct l; simpl; intros; trivial. - 1, 2: lia. + 1, 2: omega. apply bounded_nth_proof_irr. Qed. @@ -121,7 +121,7 @@ Lemma inject_list_injected: Some (inject_instr (bounded_nth k l BOUND) (Pos.succ (pos_add_nat pc k))). Proof. induction l; simpl; intros. - - lia. + - omega. - simpl. destruct k as [ | k]; simpl pos_add_nat. + simpl bounded_nth. diff --git a/backend/Profilingproof.v b/backend/Profilingproof.v index abb86bdb..0cebc601 100644 --- a/backend/Profilingproof.v +++ b/backend/Profilingproof.v @@ -112,6 +112,11 @@ Lemma inject_profiling_call_increases: Proof. intros. simpl. + rewrite <- (Pos2Nat.id (Pos.succ (Pos.succ extra_pc))). + rewrite <- (Pos2Nat.id (extra_pc + 2)). + rewrite !Pos2Nat.inj_succ. + rewrite !Pos2Nat.inj_add. + apply f_equal. lia. Qed. |