rocq/theories/Program.v
Application execution over the coupled libc world. Extra preconditions are proved at reached calls, not assumed from invocation existence.
This outer development leaves every core module and terminal unchanged.
The same explicit environment restriction as the body theorem.
Only puts is linked through this richer registry.
Forget logical stdout and callbacks without changing machine snapshots.
The richer world stays attached to running and stopped states alike.
The old body facts plus the extra independent caller obligations.
No rich-world precondition is hidden behind a successful invoke.
Explore proof 12 tactics
Initial goal
intros c s w site Hbody Hwf Ho Hsite
destruct H.hi_reached_call_admissiblerep requests _ _ _ _ Hbody Hsite as Heq Hadmit
subst site
destruct Hadmit as spec & xs & Hreg & Hargs & Habi & Hpre
change Someputs_contractrep requests = Somespec in Hreg
injection Hreg as ←
exists program_putsrep requests, xs
split ; reflexivity |
split ; exact Hargs |
split ; exact Habi |
split ; exact Hpre |
auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Exact call syntax selects the coupled contract, not an arbitrary registry entry.
Explore proof 5 tactics
Initial goal
intros c s w site spec xs Hbody _ Hsite Hreg Hargs
destruct H.hi_reached_call_admissiblerep requests _ _ _ _ Hbody Hsite as → _
split ; reflexivity |
change Someprogram_putsrep requests = Somespec in Hreg
congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Projection includes rejected-call cases: independently proved rich admissibility rules them out rather than silently deleting them.
Proof 21 steps Qed
Stream evolution also preserves the extra world obligations.
Explore proof 13 tactics
Initial goal
intros st trace st′ Hstep Hinv
pose proof step_projects_ _ _ Hstep Hinv as Hproject
destruct Hinv as Hbody Hwf Ho
split
2 openfocused goal
–eapply H.hi_body_step ; exact stdio_stable | exact Hproject | exact Hbody
deferred goal
–destruct Hstep ; simpl in * ; try split ; assumption
4 openfocused goal
focused goal
focused goal
all: assert Hselected : spec = program_putsrep requests
8 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
all: try destruct H.hi_reached_call_admissiblerep requests _ _ _ _ Hbody H as Heq _ ; rewrite Heq in H0 ; change Someprogram_putsrep requests = Somespec in H0 ; congruence
4 openfocused goal
focused goal
focused goal
all: subst spec
4 openfocused goal
focused goal
focused goal
all: destruct C.program_invoke_continuity_ _ _ _ _ _ _ _ _ _ _ _ _ H2 as _ Hstream Hwf′
4 openfocused goal
focused goal
focused goal
all: split ; exact Hwf′ |
4 openfocused goal
focused goal
focused goal
all: destruct Hstream as p & bytes & actions & tail & _ & _ & Hrun & _
4 openfocused goal
focused goal
focused goal
all: eapply stream_run_nonwide ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every finite richer run retains the old safety facts and the new obligations. This is not inferred from invoke projection alone.
Explore proof 5 tactics
Initial goal
intros st trace st′ H
induction H ; auto |
intros Hinv
apply IHrun
eapply body_step ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The application cannot replace the entry's callback inventory with a different list merely because the replacement has distinct tokens.
Explore proof 7 tactics
Initial goal
intros st trace st′ Hstep Hinv
destruct Hinv as Hbody _
destruct Hstep ; simpl in * ; try reflexivity
4 openfocused goal
focused goal
focused goal
all: assert Hselected : spec = program_putsrep requests
8 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
all: try destruct H.hi_reached_call_admissiblerep requests _ _ _ _ Hbody H as Heq _ ; rewrite Heq in H0 ; change Someprogram_putsrep requests = Somespec in H0 ; congruence
4 openfocused goal
focused goal
focused goal
all: subst spec
4 openfocused goal
focused goal
focused goal
all: exact proj1C.program_invoke_continuity_ _ _ _ _ _ _ _ _ _ _ _ _ H2
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every reached call keeps the actual initial registration list, not an arbitrary well-formed inventory admitted by the raw contract.
Explore proof 5 tactics
Initial goal
intros st trace st′ Hrun
induction Hrun ; reflexivity |
intros Hinv
rewrite IHHrun by eapply body_step ; eauto
eapply body_step_inventory ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every reachable rich-world external call meets all additional premises.
Explore proof 2 tactics
Initial goal
intros st trace c s w site Hinv Hrun Hsite
eapply reached_admissible ; eapply body_run ; eauto | exact Hsite
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Additional contract premises do not introduce specification-violation terminals. Finite safety remains conditional, without native totality.
Explore proof 4 tactics
Initial goal
intros st trace why ms w Hinv Hrun
destruct body_run_ _ _ Hrun Hinv as Hbody _
inversion Hbody
assumption
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Campaign 3's shared failure classification, not a competing definition of panic for the labelled machine. Resource refusal remains nonfailure.
Explore proof 1 tactics
Initial goal
intros why [ ->| [ ->| ( resource & -> & Hr ) ] ] ; simpl ; tauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Labelled application safety uses the same failure_ending predicate as the closed-module never_panics statement in Panics.v.
Explore proof 3 tactics
Initial goal
intros st trace why ms w Hinv Hrun
apply hi_ending_not_failure
eapply finite_safety ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every application observation is exit-free, including resource leaves.
Explore proof 5 tactics
Initial goal
intros st trace st′ status Hstep Hinv
destruct Hstep ; simpl ; try tauto
4 openfocused goal
focused goal
focused goal
all: destruct selected_call_ _ _ _ _ _ Hinv H H0 H1 as → →
4 openfocused goal
focused goal
focused goal
all: destruct C.program_invoke_continuity_ _ _ _ _ _ _ _ _ _ _ _ _ H2 as _ Hstream _
4 openfocused goal
focused goal
focused goal
all: eapply puts_stream_prefix_exit_free ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Pure control actions observe no new stdout acceptance; starting a callback is not an atomic execution of its entire printing body.
Only host completion may report process exit.
Explore proof 3 tactics
Initial goal
intros action status
destruct action ; simpl ; try tauto
destruct action ; simpl ; intuition discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A conservative partial segment stays in its selected output family and byte budget. Control actions, including callback entry, print nothing. This does not claim coverage of mixed native segments.
A terminal summary of one original segment, not a resumable trace. Delivery and discard remain distinct in the retained action history; only acceptance can produce a cumulative stdout observation.
Partial actions cannot smuggle a process-exit event into a leaf.
Explore proof 4 tactics
Initial goal
intros action q trace actions q′ status _ & _ & Hobs
destruct action ; simpl in Hobs ; try subst trace ; simpl ; tauto
destruct action ; simpl in Hobs ; try subst trace ; simpl ; tauto
destruct Hobs as → _ | → ; simpl ; intuition discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The actual stream path, not a successful lifecycle endpoint, gives FIFO accounting, well-formedness and sticky error at partial leaves.
Explore proof 5 tactics
Initial goal
intros action q trace actions q′ _ & Hrun & _
split
2 openfocused goal
–apply stream_accounting
2 opendeferred goal
exact Hrun
deferred goal
–split ; eapply stream_run_wf | eapply stream_error_sticky ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Trusted segment selection is independent of successful execution. ABI/arguments describe the selected segment boundary, not a proof of native callback calling conventions or retained-argument validity.
| shutdown_ready | : R.state → mem → stdio_world → shutdown_state → Prop | |
| action_contract | ||
| action_result | ||
| action_arguments | : shutdown_state → shutdown_action → listarg | |
| action_words | : shutdown_state → shutdown_action → listword | |
| action_post | : shutdown_state → shutdown_action → R.state → mem → stdio_world → listZ → listevent → R.state → mem → stdio_world → shutdown_state → Prop |
Obligations can fail even when no effect or completion witness exists.
An actual successful action segment must carry its memory effects, exact endpoints and compatible output; logical lifecycle edges alone neither grant memory authority nor prove readiness.
The actual effect witness, rather than a readiness postulate about the logical protocol, preserves runtime readiness and every object identity.
Explore proof 3 tactics
Initial goal
intros b s m w sh action trace s′ m′ w′ sh′ H Hr
destruct H
eapply M.E.prefix_preserve ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Each realized segment obeys the same FIFO accounting as its selected lifecycle action, without equating delivery with error-discard.
Explore proof 5 tactics
Initial goal
intros b s m w sh action trace s′ m′ w′ sh′ H
destruct H
destruct H ; simpl ; try apply app_nil_r
2 openfocused goal
all: repeat rewrite app_nil_r
2 openfocused goal
all: eapply stream_step_accounting ; eassumption
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The outer sum consumes completion once; neither resource leaves nor unfinished observations acquire a normal-exit continuation. Shutdown leaves retain original snapshots as provenance, not endpoint phases or inventories; their memory/world and observed stdout are separate.
| | | Application | body : M.stateprogram_world | |
| | | ShuttingDown | ||
| | | Unfinished | ||
| | | ShutdownUnfinished | runtime : R.state memory : mem stdio : stdio_world original : shutdown_state action : shutdown_action observed : liststream_action stdout : stream_state | |
| | | ShutdownResource | why : reason runtime : R.state memory : mem stdio : stdio_world original : shutdown_state action : shutdown_action observed : liststream_action stdout : stream_state | |
| | | Finished |
Host completion is explicitly tied to the entire handoff snapshot.
A separate outer interpreter: existing Stopped states remain terminal. An unfinished prefix is observed once at its original admissible call, never restarted at its endpoint.
Finite observations, with no eventual-termination assertion.
Compose actual finite runs through their shared exact snapshot.
Explore proof 4 tactics
Initial goal
intros rep requests b host st first mid last final H
induction H ; intros Htail ; simpl ; auto
rewrite <- app_assoc
eapply program_next ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A consumed host completion cannot be reused by this outer machine.
Explore proof 2 tactics
Initial goal
intros rep requests b host s m w sh trace st Hstep
inversion Hstep
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
An unfinished observation does not assert that the call can resume.
Explore proof 2 tactics
Initial goal
intros rep requests b host s m w trace st Hstep
inversion Hstep
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A partial shutdown snapshot is provenance, not a resumed lifecycle state. No host rule can complete either kind of terminal leaf.
Explore proof 2 tactics
Initial goal
intros
split ; intros ; intro Hstep ; inversion Hstep
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Even without successful endpoint readiness, an unfinished observation keeps allocator readiness and all old object identities through effects.
Explore proof 3 tactics
Initial goal
intros rep requests b host s m w sh trace s′ m′ w′ action actions q Hstep Hr
inversion Hstep ; subst
eapply M.E.prefix_preserve ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A resource endpoint carries the same preservation evidence as its actual invocation, not merely a resource label or logical edge.
Explore proof 3 tactics
Initial goal
intros rep requests b host s m w sh trace why s′ m′ w′ action actions q Hstep Hr
inversion Hstep ; subst
eapply M.E.invoke_preserve ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A reached resource leaf carries a genuine requested refusal. The shared classification excludes it from capability panics.
Explore proof 9 tactics
Initial goal
intros rep requests b host st trace why s m w sh action actions q Hstep
inversion Hstep ; subst
match goal withHcall : M.E.invoke_ _ _ _ _ _ _ _ _ _ _ _ |- _⇒inversion Hcall ; substend
2 openfocused goal
match goal withHnormal : ∀why, CallResource_ ≠ CallResourcewhy |- _⇒exfalso ; apply Hnormalwhy ; reflexivityend
assert Hr : resource_reasonwhy
2 openfocused goal
{match goal withHrefuse : M.E.resource_failure_ _ _ |- _⇒inversion Hrefuseend;unfold resource_reason;auto
deferred goal
split ; exact Hr |
apply resource_not_failure
exact Hr
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
No continuation is added to the inner machine's stopped observations.
Explore proof 3 tactics
Initial goal
intros rep requests b host why ms w trace st Hstep
inversion Hstep ; subst
eapply M.stopped_no_step ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Inner application runs lift unchanged, including their stopped outcomes.
Explore proof 4 tactics
Initial goal
intros rep requests b host st trace st′ Hrun
induction Hrun
2 openfocused goal
–constructor
deferred goal
–eapply program_next ; apply program_application ; eassumption | exact IHHrun
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Native entry/libc closure covers every returning call reached from this exact entry, not arbitrary token-distinct callback inventories. Readiness at the exact endpoint is not inferred from equal tokens or stipulated only on an enabled bridge edge.
Every returning puts reached from the selected entry has the real return-zero bridge. Its original prefix is retained, not replayed from an independently selected call snapshot.
Explore proof 11 tactics
Initial goal
intros rep requests b host start first s m w fuel trace n s′ m′ w′ Hclosed Hreach Hcall
eapply run_trans ; apply application_run ; exact Hreach |
rewrite <- app_nil_rtrace
eapply program_next with trace := trace tail := [ ] mid := ApplicationM.Runningresume_externalhi_callm fuel hi_site TAtom"v1", WIntn mod 2 ^ 32; TAtom"v0", WPtrhi_literal m′, s′ w′
2 openfocused goal
–apply program_application
2 opendeferred goal
eapply M.step_return ; apply H.hi_external_site | reflexivity | reflexivity | exact Hcall | reflexivity
deferred goal
–eapply program_next with trace := [ ] tail := [ ]
3 openfocused goal
shelved goal
+apply program_main_return with bits := 0
3 openfocused goal
deferred goal
∗apply H.hi_after_puts_return
2 opendeferred goal
deferred goal
∗eapply Hclosed ; eauto
deferred goal
+constructor
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Logical readiness must independently justify the selected action's arguments and ABI even when that action has no successful realization.
Runtime readiness is proved through actual effects for every outer transition, including unfinished calls. Host completion retains its snapshot.
No ready outer step can lose allocator readiness.
Explore proof 8 tactics
Initial goal
intros rep requests b host st trace st′ Hstep Hr
destruct Hstep ; simpl in * ; auto
5 openfocused goal
focused goal
focused goal
focused goal
–eapply M.step_ready ; | exact H | exact Hr
5 opendeferred goal
deferred goal
deferred goal
deferred goal
reflexivity
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–exact proj1M.E.prefix_preserve_ _ _ _ _ _ _ _ _ _ _ H3 Hr
3 opendeferred goal
deferred goal
deferred goal
–exact proj1realizes_preserve_ _ _ _ _ _ _ _ _ _ _ H Hr
2 opendeferred goal
deferred goal
–exact proj1M.E.prefix_preserve_ _ _ _ _ _ _ _ _ _ _ H2 Hr
deferred goal
–exact proj1M.E.invoke_preserve_ _ _ _ _ _ _ _ _ _ _ _ _ H2 Hr
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Runtime readiness holds at every finite endpoint.
Explore proof 5 tactics
Initial goal
intros rep requests b host st trace st′ Hrun
induction Hrun ; auto |
intros Hr
apply IHHrun
eapply step_ready ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Only application states need the body invariant for the exit-count theorem.
Outer phase changes cannot manufacture an unsafe application state.
Explore proof 3 tactics
Initial goal
intros rep requests b host st trace st′ Hstable Hstep Hsafe
destruct Hstep ; simpl in * ; auto
eapply body_step ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Outer transitions cannot leave application execution and later re-enter it with facts that bypass the body invariant.
Explore proof 5 tactics
Initial goal
intros rep requests b host st trace st′ Hstable Hrun
induction Hrun ; auto |
intros Hsafe
apply IHHrun
eapply step_application_safe ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The outer machine's reachable application stops use the shared panic classification too. Shutdown coverage and native realization remain independent obligations, not consequences of this finite theorem.
Explore proof 6 tactics
Initial goal
intros rep requests b host st trace why ms w Hstable Hsafe Hrun
pose proof run_application_safe_ _ _ _ _ _ _ Hstable Hrun Hsafe as Hbody
destruct Hbody as Hbody _
apply hi_ending_not_failure
inversion Hbody
assumption
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Process-exit observations, separated from stdout acceptance summaries.
Counts compose along actual runs, not by reusing cumulative puts summaries.
Explore proof 2 tactics
Initial goal
induction first as | e rest IH ; intros last ; reflexivity |
destruct e ; simpl ; rewrite IH ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Exit-free observations contribute no process-exit count.
Explore proof 11 tactics
Initial goal
induction trace as | e rest IH ; intros Hfree ; reflexivity |
destruct e ; simpl
2 openfocused goal
–apply IH
2 opendeferred goal
intros status Hin
2 opendeferred goal
apply Hfreestatus
2 opendeferred goal
right
2 opendeferred goal
exact Hin
deferred goal
–exfalso
apply Hfreestatus
left
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Any exit-bearing step is exactly a one-shot transition into Finished.
Proof 29 steps Qed
Finite runs from Finished are empty: the host witness cannot be replayed.
Explore proof 4 tactics
Initial goal
intros rep requests b host s m w sh trace st Hrun
inversion Hrun ; subst ; auto
exfalso
eapply finished_terminal ; eauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every represented finite execution has at most one process-exit event. This is not a promise that a handoff or process exit is ever reached.
Explore proof 12 tactics
Initial goal
intros rep requests b host st trace st′ Hstable Hrun
induction Hrun ; simpl ; lia |
intros Hsafe
rewrite exit_count_app
destruct step_exit_shape_ _ _ _ _ _ _ H Hsafe as Hz | s & m & w & sh & → & Hone
2 openfocused goal
–rewrite Hz
2 opendeferred goal
simpl
2 opendeferred goal
apply IHHrun
2 opendeferred goal
eapply step_application_safe ; eauto
deferred goal
–rewrite Hone , finished_run_ _ _ _ _ _ _ _ _ _ Hrun
simpl
lia
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Public conditional-composition checks
These fixtures realize only identity memory segments, not native libc.
Initial logical stdout with no user exit registrations in this fixture.
The actual initialized main body inhabits the stronger application invariant.
Explore proof 2 tactics
Initial goal
split ; apply P.H.hi_body_entry ; exact HiChecks.entry_pre |
split ; split ; exact stdout_initial_wf | constructor | discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Stronger preconditions remain independently admissible for every reached call.
Explore proof 2 tactics
Initial goal
intros trace c s w site Hrun Hsite
eapply P.all_calls_admissible ; apply HiChecks.interpreter_stdio_stable | exact initial_body | exact Hrun | exact Hsite
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Even a single distinct-token callback cannot appear at a reached call when this selected entry supplied no registrations.
Explore proof 5 tactics
Initial goal
intros trace m fuel s w entry Hp Hrun
pose proof P.body_run_inventory_ _ HiChecks.interpreter_stdio_stablefixture_rep _ _ _ Hrun initial_body as Hsame
simpl in Hsame
rewrite Hp in Hsame
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Zero fuel stops at entry, without calling puts or starting shutdown.
Explore proof 6 tactics
Initial goal
intros b host
apply P.program_application
apply P.M.step_core_end ; | reflexivity
intros site Hsite
pose proof external_site_stuck_ _ _ Hsite as Hbad
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
With any fuel, every stopped application endpoint of this actual entry is nonfailure, including return, fuel and resource leaves.
Explore proof 4 tactics
Initial goal
intros fuel b host trace why ms w Hrun
eapply P.application_stopped_never_panics ; apply HiChecks.interpreter_stdio_stable | | exact Hrun
split ; apply P.H.hi_body_entry ; exact HiChecks.entry_pre |
split ; split ; exact stdout_initial_wf | constructor | discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A segment with no memory authority; endpoint relations are deliberately trivial only for this logical fixture. Native realization remains open.
Fixture readiness does not assert the validity of any native callback.
The selected fixture segments are admissible independently of effects.
Explore proof 2 tactics
Initial goal
intros s m w sh action sh′ Hr Hstep
split ; exact I
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A lifecycle edge with no acceptance is realized with an actual empty effect path and the exact same runtime/memory/stdio snapshot.
Explore proof 3 tactics
Initial goal
intros s m w sh action sh′ Hstep Htrace
eapply P.realize_action with born := [ ] ; exact Hstep | exact I | split ; exact I | | exact I | symmetry ; exact Htrace | exact I
split ; constructor | exact I
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
No callbacks: the exact pending bytes survive TLS/handlers/cleanup to soft handoff. This fixture does not promise lossless flushing.
Explore proof 5 tactics
Initial goal
intros s m w q host
eapply P.program_next with trace := [ ] tail := [ ] ; apply P.program_shutdown with action := EmptyTls ; apply silent_realization ; constructor | reflexivity |
eapply P.program_next with trace := [ ] tail := [ ] ; apply P.program_shutdown with action := StartCleanup ; apply silent_realization ; constructor | reflexivity |
eapply P.program_next with trace := [ ] tail := [ ] ; apply P.program_shutdown with action := HandoffSoftExit 0 ; apply silent_realization ; constructor | reflexivity |
constructor
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Returning main transfers the same stdout obligations, not a fresh stream.
Explore proof 4 tactics
Initial goal
intros s m q host
apply P.program_main_return with bits := 0 ; | exact I
exists TAtom"start", Const0
repeat split ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Host completion is consumed into an outer terminal, even when its logical witness remains reusable as a proposition.
Explore proof 2 tactics
Initial goal
intros s m w q
split ; apply P.program_complete ; exact I | apply P.finished_terminal
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Accepting output in a callback cannot be realized by a silent trace.
Explore proof 3 tactics
Initial goal
intros s m w sh s′ m′ w′ sh′ H
inversion H
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
This fixture keeps accepted hello bytes outstanding; delivery is a separate obligation even if the host-completion predicate is granted.
An inhabited returning puts with the exact logical endpoint used below.
Proof 42 steps Qed
A complete represented path through actual main entry/copy/call/return, logical shutdown and one host-completion event. This is not native adequacy.
Explore proof 11 tactics
Initial goal
eapply P.run_trans with first := StreamBytes1 hello_bytes ++ 10 last := ProcessExit0 mid := P.ShuttingDownInterpRuntime.start HiChecks.memory hello_world mkShutdownTls 0 [ ] [ ] buffered
2 openfocused goal
–change P.runfixture_rep fixture_requests boundary λ_ _ _ _ ⇒ True P.ApplicationP.M.Runninghi_entryHiChecks.memory 10, InterpRuntime.start initial_world [ ] ++ StreamBytes1 hello_bytes ++ 10 P.ShuttingDownInterpRuntime.start HiChecks.memory hello_world mkShutdownTls 0 [ ] [ ] buffered
2 opendeferred goal
eapply P.returning_puts_shutdown with first := [ ] w′ := mkProgramWorldhello_world buffered [ ]
9 openfocused goal
focused goal
deferred goal
shelved goal
shelved goal
shelved goal
shelved goal
shelved goal
+intros first s m w fuel trace n s′ m′ w′ Hreach Hcall
9 opendeferred goal
deferred goal
deferred goal
shelved goal
shelved goal
shelved goal
shelved goal
shelved goal
exact I
8 opendeferred goal
deferred goal
deferred goal
shelved goal
shelved goal
shelved goal
shelved goal
shelved goal
+apply P.H.hi_reaches_call
4 opendeferred goal
deferred goal
shelved goal
lia
3 opendeferred goal
deferred goal
shelved goal
+exact buffered_puts
deferred goal
–eapply P.run_trans with first := [ ] last := ProcessExit0
3 openfocused goal
shelved goal
+apply fixture_shutdown
deferred goal
+eapply P.program_next with trace := ProcessExit0 tail := [ ] ; apply P.program_complete ; exact I | constructor
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Partial controls have no successful endpoint premise. This fixture deliberately makes Handlers unready and every action post false.
An empty unfinished TLS segment exists although the complete target is unready and cannot satisfy the selected action's postcondition.
Explore proof 9 tactics
Initial goal
intros s m w q host
split ; | discriminate
eapply P.program_shutdown_unfinished with born := [ ] full := mkShutdownHandlers 0 [ ] [ ] q
5 openfocused goal
focused goal
focused goal
focused goal
–constructor
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–reflexivity
3 opendeferred goal
deferred goal
deferred goal
–split ; exact I
2 opendeferred goal
deferred goal
–split ; constructor | exact I
deferred goal
–split ; reflexivity |
split ; constructor | reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A partial delivery settles only the oldest selected bytes and preserves an existing error, without claiming the action completed.
Explore proof 4 tactics
Initial goal
split
2 openfocused goal
–split ; constructor ; exists 65 ; reflexivity | constructor | exists 66 ; reflexivity
deferred goal
–split ; | reflexivity
eapply stream_next ; exact stream_deliver65 66; 67 true ltac:discriminate | constructor
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Control/hidden output, excess acceptance, non-FIFO delivery and delivery/discard substitution are not admitted partial observations.
Explore proof 17 tactics
Initial goal
repeat split
7 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
–intros Hactions _
7 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
discriminate
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–intros _ tail Hbad _
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
discriminate
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–intros _ Hrun _
5 opendeferred goal
deferred goal
deferred goal
deferred goal
inversion Hrun ; subst
5 opendeferred goal
deferred goal
deferred goal
deferred goal
match goal withHstep : stream_step_ _ _ |- _⇒inversion Hstep ; substend
5 opendeferred goal
deferred goal
deferred goal
deferred goal
discriminate
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–intros Hfamily _ _
4 opendeferred goal
deferred goal
deferred goal
inversion Hfamily as | a rest bytes Hbad Hrest ; subst
4 opendeferred goal
deferred goal
deferred goal
discriminate
3 opendeferred goal
deferred goal
deferred goal
–intros _ tail Hbad _
3 opendeferred goal
deferred goal
discriminate
2 opendeferred goal
deferred goal
–intros _ tail Hbad _
2 opendeferred goal
discriminate
deferred goal
–intros _ _ _ Hhidden | Hhidden ; discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A logical test contract can first allocate and accept a byte, then genuinely refuse an oversized request. It has no normal completion.
This fixture grants source readiness but no successful action post.
The refusal leaf keeps nonempty memory and output progress, rather than rolling back to the selected action's original snapshot.
Proof 28 steps Qed
Without a permitted request there is no resource endpoint, even when the logical action and its empty prefix are available.
Explore proof 5 tactics
Initial goal
intros rep requests host s m w sh trace why s′ m′ w′ action actions q Hstep
inversion Hstep ; subst
match goal withHcall : P.M.E.invoke_ _ _ _ _ _ _ _ _ _ _ _ |- _⇒inversion Hcall ; substend
2 openfocused goal
–match goal withHnormal : ∀why, CallResource_ ≠ CallResourcewhy |- _⇒apply Hnormalwhy ; reflexivityend
deferred goal
–match goal withHrefuse : P.M.E.resource_failure_ _ _ |- _⇒inversion Hrefuse ; substend;contradiction
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.