Contents top Files rocq/spikes/IrisLang.v Spike: nanofil's core machine as an Iris language, and Iris adequacy as a proof of never_panics .
An expression is a configuration less its memory (EConf : the running frame, the suspended callers and the fuel) or a finished run (EEnd : an outcome, which is also the value). The Iris state is the memory with the runtime's state. A primitive step is a step of Machine.v's mstep from a configuration that does not fails , a refused allocation (which ends in a refusal trap), or an ending that is not a failure . A failing configuration is therefore never reducible, so a weakest precondition with NotStuck for the entry call rules out every failure; wp_never_panics proves that Panics.v's never_panics follows from such a weakest precondition, for every fuel.
Rocq layout Adaptive Stacked Side by side
From iris.proofmode Require Import proofmode
From iris.program_logic Require Import language weakestpre adequacy
From Stdlib Require Import ZArith Relations
From Nanofil Require Import Term Syntax Values Memory Runtime Ops Semantics Run Machine Panics
An expression: a configuration without its memory (the frame, the callers and the fuel), or the outcome a run ended with.
The Iris state: the memory and the runtime's state.
32 Definition nstate : Type ≔ A value is an outcome, written as the ended expression.
The outcome of an ended expression; None for a configuration.
The expression of the configuration c.
A primitive step in the genv ge, with no observations and no forks:
ps_machine : a machine step of a configuration that does not fails (a failing configuration may have a safepoint due, and must still not count as reducible);ps_refused : an allocation R refuses ends the run with the refusal trap OutOfMemory ;ps_done : an ending that is not a failure.∀ fr callers fuel m s c′ s′
ps_machine
∀ fr callers fuel m s q k
ps_refused
∀ fr callers fuel m s o
ps_done
The language laws: values round-trip, and a value takes no step.
67 Lemma nanofil_lang_mixin Explore proof 6 tactics ← Initial goal →
Initial goal split – reflexivity
– intros e o H destruct e ; inversion H ; reflexivity
– intros e σ κ e′ σ′ efs H destruct H ; reflexivity
Qed
deferred goal deferred goal destruct e ; inversion H ; reflexivity
deferred goal – intros e σ κ e′ σ′ efs H
✓ Proof checked and closed by Rocq.
Source script split
– intros e o H
destruct e ; inversion H ; reflexivity
– intros e σ κ e′ σ′ efs H
destruct H ; reflexivity
Nanofil's core machine in the genv ge as an Iris language.
A configuration is its parts put back together.
Explore proof 1 tactics ← Initial goal →
Initial goal destruct c ; reflexivity Qed
✓ Proof checked and closed by Rocq.
Source script A configuration that fails is not reducible: a failing ending, a stuck step and a negative extent each rule out all three kinds of primitive step.
86 Lemma fails_not_reducible ∀ ge : genv fr callers m fuel s
Explore proof 10 tactics ← Initial goal →
Initial goal intros Hf κ & e′ & σ′ & efs & Hs cbn in Hs inversion Hs ; subst – contradiction
– unfold fails in Hf match goal with E : Semantics.step _ _ = Fresh _ _ |- _ ⇒ rewrite E in Hf end lia
– unfold fails in Hf match goal with E : Semantics.step _ _ = Done _ |- _ ⇒ rewrite E in Hf end contradiction
Qed intros Hf κ & e′ & σ′ & efs & Hs
inversion Hs ; subst 3 open
focused goal focused goal
deferred goal deferred goal – unfold fails in Hf 2 open
deferred goal match goal with E : Semantics.step _ _ = Fresh _ _ |- _ ⇒ rewrite E in Hf end 2 open
deferred goal match goal with E : Semantics.step _ _ = Done _ |- _ ⇒ rewrite E in Hf end
✓ Proof checked and closed by Rocq.
Source script intros Hf κ & e′ & σ′ & efs & Hs
cbn in Hs
inversion Hs ; subst
match goal with E : Semantics.step _ _ = Fresh _ _ |- _ ⇒ rewrite E in Hf end lia
match goal with E : Semantics.step _ _ = Done _ |- _ ⇒ rewrite E in Hf end contradiction
The Iris configuration of the machine state st: its expression as the only thread, with its memory and runtime state.
A machine step from a configuration that does not fails is an Iris step between the corresponding Iris configurations.
106 Lemma mstep_erased_step Explore proof 9 tactics ← Initial goal →
Initial goal destruct st as c s , st′ as c′ s′ cbn [ fst ] intros Hf Hs exists [ ] apply step_atomic with t1 := [ ] t2 := [ ] efs := [ ] e1 := conf_expr c σ1 := c_mem c , s e2 := conf_expr c′ σ2 := c_mem c′ , s′ ; reflexivity | reflexivity | rewrite <- config_eta c in Hf , Hs unfold conf_expr at 1 cbn exact ps_machine ge _ _ _ _ _ _ _ Hf Hs Qed destruct st as c s , st′ as c′ s′
apply step_atomic with t1 := [ ] t2 := [ ] efs := [ ] e1 := conf_expr c σ1 := c_mem c , s e2 := conf_expr c′ σ2 := c_mem c′ , s′ ; reflexivity | reflexivity |
✓ Proof checked and closed by Rocq.
Source script destruct st as c s , st′ as c′ s′
cbn [ fst ]
intros Hf Hs
exists [ ]
apply step_atomic with t1 := [ ] t2 := [ ] efs := [ ] e1 := conf_expr c σ1 := c_mem c , s e2 := conf_expr c′ σ2 := c_mem c′ , s′ ; reflexivity | reflexivity | cbn
Where Iris adequacy holds for the configuration c's expression, every Iris configuration reached is not stuck, so no machine state reached fails ; therefore every machine state the run reaches is Iris-reachable, and none fails .
121 Lemma adequate_no_fails Explore proof 18 tactics ← Initial goal →
Initial goal intros Had assert Hok : ∀ st , rtc erased_step cfg_of ge c0 , s0 cfg_of ge st → ¬ fails ge fst st { intros c s Hr Hf cbn [ fst ] in Hf destruct adequate_not_stuck _ _ _ _ Had _ _ conf_expr c eq_refl Hr as v Hv | Hred – set_solver
– discriminate Hv
– rewrite <- config_eta c in Hf exact fails_not_reducible ge _ _ _ _ s Hf Hred
assert Hgen : ∀ st1 st2 , RM.mreachable ge st1 st2 → rtc erased_step cfg_of ge c0 , s0 cfg_of ge st1 → rtc erased_step cfg_of ge c0 , s0 cfg_of ge st2 { intros st1 st2 H induction H as st1 st2 Hs | st1 | st1 st2 st3 _ IH1 _ IH2 ; auto intros Hr eapply rtc_r ; exact Hr | apply mstep_erased_step ; apply Hok , Hr | exact Hs
intros st Hreach apply Hok , Hgen _ _ Hreach reflexivity Qed destruct adequate_not_stuck _ _ _ _ Had _ _ conf_expr c eq_refl Hr as v Hv | Hred 4 open
focused goal focused goal deferred goal
deferred goal deferred goal deferred goal
deferred goal deferred goal induction H as st1 st2 Hs | st1 | st1 st2 st3 _ IH1 _ IH2 ; auto 2 open
deferred goal eapply rtc_r ; exact Hr | 2 open
deferred goal apply Hok , Hgen _ _ Hreach
✓ Proof checked and closed by Rocq.
Source script intros Had
{ intros c s Hr Hf
cbn [ fst ] in Hf
destruct adequate_not_stuck _ _ _ _ Had _ _ conf_expr c eq_refl Hr as v Hv | Hred { intros st1 st2 H
induction H as st1 st2 Hs | st1 | st1 st2 st3 _ IH1 _ IH2 ; auto
intros Hr
eapply rtc_r ; exact Hr |
intros st Hreach
apply Hok , Hgen _ _ Hreach
reflexivity
Iris adequacy proves never_panics : where the module's initial memory and entry function exist, every admissible input makes the entry's frame, and (where R is ready at its start in that memory) for every fuel and every invariant instance a state interpretation stateI can be allocated that holds of the initial state and gives a NotStuck weakest precondition of the entry call, the module never panics. The later-credit flag hlc is left to the caller.
147 Theorem wp_never_panics ∀ hlc : has_lc Σ `{ ! invGpreS Σ } md entry input : list word → Prop globals m f
Explore proof 21 tactics ← Initial goal →
Initial goal intros Hm Hf Hwp exists globals , m , f split ; exact Hm | split ; exact Hf | intros xs Hxs destruct Hwp xs Hxs as fr & Hfr & Hw exists fr split ; exact Hfr | intros Hready fuel st Hreach set ge := P.program_genv md globals in * assert Had : @ adequate nanofil_lang ge NotStuck conf_expr mkConfig fr [ ] m fuel c_mem mkConfig fr [ ] m fuel , R.start λ _ _ ⇒ True { apply wp_adequacy_gen hlc Σ nanofil_lang ge NotStuck _ _ λ _ ⇒ True intros Hinv κs iMod Hw Hready fuel Hinv as stateI [ Hσ Hwp ] iModIntro iExists λ σ _ ⇒ stateI σ , λ _ ⇒ True %I cbn iFrame Hσ iApply wp_mono with Hwp auto
exact adequate_no_fails ge _ _ _ Had st Hreach Qed destruct Hwp xs Hxs as fr & Hfr & Hw
intros Hready fuel st Hreach
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } focused goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } { apply wp_adequacy_gen hlc Σ nanofil_lang ge NotStuck _ _ λ _ ⇒ True 2 open
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } iMod Hw Hready fuel Hinv as stateI [ Hσ Hwp ] 2 open
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } Hwp :
WP EConf fr [ ] fuel { _ . True } ∗
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } Hwp :
WP EConf fr [ ] fuel { _ . True } ∗
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } iExists λ σ _ ⇒ stateI σ , λ _ ⇒ True %I 2 open
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } Hwp :
WP EConf fr [ ] fuel { _ . True } ∗
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } Hwp :
WP EConf fr [ ] fuel { _ . True } ∗
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } Hwp :
WP EConf fr [ ] fuel { _ . True } ∗
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } iApply wp_mono with Hwp 2 open
Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True } deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
deferred goal Hw :
R.ready R.start m → ∀ fuel : Z Hinv : invGS_gen hlc Σ , ⊢ |⇛⊤ ∃ stateI : nstate → iProp Σ , let H ≔ iris_invGS ≔ Hinv ; state_interp ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ stateI σ ; fork_post ≔ λ _ : val nanofil_lang ge ⇒ True ; num_laters_per_step ≔ λ _ : nat ⇒ 0 %nat ; state_interp_mono ≔ λ σ : state nanofil_lang ge _ : nat _ : list observation nanofil_lang ge _ : nat ⇒ fupd_intro ∅ stateI σ in stateI m , R.start ∗ WP EConf fr [ ] fuel { _ . True }
✓ Proof checked and closed by Rocq.
Source script intros Hm Hf Hwp
exists globals , m , f
split ; exact Hm |
split ; exact Hf |
intros xs Hxs
destruct Hwp xs Hxs as fr & Hfr & Hw
exists fr
split ; exact Hfr |
intros Hready fuel st Hreach
{ apply wp_adequacy_gen hlc Σ nanofil_lang ge NotStuck _ _ λ _ ⇒ True intros Hinv κs
iMod Hw Hready fuel Hinv as stateI [ Hσ Hwp ]
iModIntro
iExists λ σ _ ⇒ stateI σ , λ _ ⇒ True %I
cbn
iFrame Hσ
iApply wp_mono with Hwp
auto