Skip to content
Snippets Groups Projects
Commit 88c7fc6d authored by Ralf Jung's avatar Ralf Jung
Browse files

fix metatheory

parent d903a458
No related branches found
No related tags found
No related merge requests found
...@@ -99,23 +99,23 @@ Lemma heap_closed_alloc σ l n w : ...@@ -99,23 +99,23 @@ Lemma heap_closed_alloc σ l n w :
map_Forall (λ _ v, is_closed_val v) (heap σ) map_Forall (λ _ v, is_closed_val v) (heap σ)
( i : Z, 0 i i < n heap σ !! (l + i) = None) ( i : Z, 0 i i < n heap σ !! (l + i) = None)
map_Forall (λ _ v, is_closed_val v) map_Forall (λ _ v, is_closed_val v)
(heap σ heap_array l (replicate (Z.to_nat n) w)). (heap_array l (replicate (Z.to_nat n) w) heap σ).
Proof. Proof.
intros Hn Hw Hl. intros Hn Hw Hl.
eapply (map_Forall_ind eapply (map_Forall_ind
(λ k v, ((heap σ heap_array l (replicate (Z.to_nat n) w)) (λ k v, ((heap_array l (replicate (Z.to_nat n) w) heap σ)
!! k = Some v))). !! k = Some v))).
- apply map_Forall_empty. - apply map_Forall_empty.
- intros m i x Hi Hix Hkwm Hm. - intros m i x Hi Hix Hkwm Hm.
apply map_Forall_insert_2; auto. apply map_Forall_insert_2; auto.
apply lookup_union_Some in Hix; last first. apply lookup_union_Some in Hix; last first.
{ symmetry; eapply heap_array_map_disjoint; { eapply heap_array_map_disjoint;
rewrite replicate_length Z2Nat.id; auto with lia. } rewrite replicate_length Z2Nat.id; auto with lia. }
destruct Hix as [[j Hj]%elem_of_map_to_list%elem_of_list_lookup_1| destruct Hix as [(?&?&?&[-> Hlt%inj_lt]%lookup_replicate_1)%heap_array_lookup|
(?&?&?&[-> Hlt%inj_lt]%lookup_replicate_1)%heap_array_lookup]. [j Hj]%elem_of_map_to_list%elem_of_list_lookup_1].
{ apply map_Forall_to_list in . + rewrite !Z2Nat.id in Hlt; eauto with lia.
by eapply Forall_lookup in ; eauto; simpl in *. } + apply map_Forall_to_list in .
rewrite !Z2Nat.id in Hlt; eauto with lia. by eapply Forall_lookup in Hσ; eauto; simpl in *.
- apply map_Forall_to_list, Forall_forall. - apply map_Forall_to_list, Forall_forall.
intros [? ?]; apply elem_of_map_to_list. intros [? ?]; apply elem_of_map_to_list.
Qed. Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment