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

refactor wp adequacy: add and use a dedicated lemma for "preserving wptp"

parent 9b6f2c6e
No related branches found
No related tags found
No related merge requests found
Require Import world_prop core_lang lang masks.
Require Import world_prop core_lang masks.
Require Import ModuRes.PCM ModuRes.UPred ModuRes.BI ModuRes.PreoMet ModuRes.Finmap.
Module IrisRes (RL : PCM_T) (C : CORE_LANG) <: PCM_T.
......@@ -10,7 +10,7 @@ Module IrisRes (RL : PCM_T) (C : CORE_LANG) <: PCM_T.
End IrisRes.
Module IrisCore (RL : PCM_T) (C : CORE_LANG).
Module Export L := Lang C.
Export C.
Module Export R := IrisRes RL C.
Module Export WP := WorldProp R.
......@@ -310,6 +310,13 @@ Module IrisCore (RL : PCM_T) (C : CORE_LANG).
| (x :: xs)%list => Some x · comp_list xs
end.
Lemma comp_list_app rs1 rs2 :
comp_list (rs1 ++ rs2) == comp_list rs1 · comp_list rs2.
Proof.
induction rs1; simpl comp_list; [now rewrite pcm_op_unit by apply _ |].
now rewrite IHrs1, assoc.
Qed.
Definition cod (m : nat -f> res) : list res := List.map snd (findom_t m).
Definition comp_map (m : nat -f> res) : option res := comp_list (cod m).
......
This diff is collapsed.
......@@ -159,4 +159,31 @@ Module Lang (C : CORE_LANG).
- symmetry in EQK; now apply fill_noinv in EQK.
Qed.
(* Reflexive, transitive closure of the step relation *)
Inductive steps : cfg -> cfg -> Prop :=
| steps_refl ρ : steps ρ ρ
| stepn_trans ρ1 ρ2 ρ3 : step ρ1 ρ2 -> steps ρ2 ρ3 -> steps ρ1 ρ3.
Inductive stepn : nat -> cfg -> cfg -> Prop :=
| stepn_O ρ : stepn O ρ ρ
| stepn_S ρ1 ρ2 ρ3 n
(HS : step ρ1 ρ2)
(HSN : stepn n ρ2 ρ3) :
stepn (S n) ρ1 ρ3.
Lemma steps_stepn ρ1 ρ2:
steps ρ1 ρ2 -> exists n, stepn n ρ1 ρ2.
Proof.
induction 1.
- eexists. eauto using stepn.
- destruct IHsteps as [n IH]. eexists. eauto using stepn.
Qed.
Lemma stepn_steps n ρ1 ρ2:
stepn n ρ1 ρ2 -> steps ρ1 ρ2.
Proof.
induction 1; now eauto using steps.
Qed.
End Lang.
......@@ -150,6 +150,11 @@ Section Order.
erewrite pcm_op_zero in EQ by apply _; contradiction.
Qed.
Lemma unit_min r : pcm_unit _ r.
Proof.
exists r; now erewrite comm, pcm_op_unit by apply _.
Qed.
End Order.
Section Exclusive.
......
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