{"acceptance":[{"program":"Test.Dogfood.P1HttpCache","stage":{"admitted":true,"answer":"differs","printed":true,"readBack":true,"refused":[{"part":"a Quote record in the key-value cache","verdict":"typing: requestNotSubtype"}]},"waitsOn":["R3","R6","R7","R10"]},{"program":"Test.Dogfood.P2HandlerLayers","stage":{"admitted":true,"answer":"rc112","printed":true,"readBack":true,"refused":[{"part":"AppConfig as a string service","verdict":"serviceCarrier: signature none"},{"part":"CurrentUser as a record service","verdict":"serviceCarrier: signature none"},{"part":"a number in a template string","verdict":"typing: term"}]},"waitsOn":["R3","R5","R7","R10","R13"]},{"program":"Test.Dogfood.P3WorkerQueue","stage":{"admitted":true,"answer":"differs","printed":true,"readBack":true,"refused":[{"part":"the log's append at Ref<never[]>","verdict":"typing: resultNotSubtype"}]},"waitsOn":["R3","R4","R10","R11"]},{"program":"Test.Dogfood.P4RateLimiter","stage":{"admitted":true,"answer":"rc112","printed":true,"readBack":true,"refused":[]},"waitsOn":["R10"]},{"program":"Test.Dogfood.P5LedgerService","stage":{"admitted":false,"answer":"notRun","printed":false,"readBack":false,"refused":[]},"waitsOn":["R3","R4","R6","R7","R10"]}],"claims":[{"concept":"exact-codecs","contestedBy":[],"id":"type-metadata-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The two directions of the proposed `type-metadata-exact` claim, with no source restriction. ","levels":[],"module":"Effect4.Laws.Codegen.Metadata","name":"Effect4.Codegen.Metadata.type_metadata_exact","restsOn":[],"statement":"And\n  (∀ (t : Effect4.Program.Ty),\n    Eq (Effect4.Codegen.Metadata.readTy (Effect4.Codegen.Metadata.writeTy t)) (Option.some t))\n  (∀ (e : TypeScript.Expr) (t : Effect4.Program.Ty),\n    Eq (Effect4.Codegen.Metadata.readTy e) (Option.some t) →\n      Eq (Effect4.Codegen.Metadata.writeTy t) e)","withinSemanticAxiomCeiling":true}},"title":"Structural TypeScript metadata retains the exact stored Ty declaration"},{"concept":"subtyping-algebra","contestedBy":[],"id":"raw-formation","literature":[],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The `raw-formation` claim, used by every checked boundary's certificate. ","levels":[],"module":"Effect4.Program.Formation","name":"Effect4.Program.Formation.checkInput_eq_none_iff","restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (program : Effect4.Program.Eff Op)\n  (table : List Effect4.Program.Row)\n  (services : optParam (List (Prod Effect4.ServiceKey Effect4.Program.Ty)) List.nil),\n  Iff (Eq (Effect4.Program.Formation.checkInput program table services) Option.none)\n    (Effect4.Program.Formation.InputFormed program table services)","withinSemanticAxiomCeiling":true}},"title":"Raw formation checking agrees with distinct record names, admitted map keys, a deferred's admitted error column, and no type variable outside a template; a declared service carrier is a strict formation site (decisions rows 288, 297)"},{"concept":"residual-program-typing","contestedBy":[],"id":"instantiated-formation","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"`instantiated-formation`: a successful row use retains the actual bindings, the request's\nand then the binder term's (`bindTerm`), and strict formation of every substituted column.\nTyping consumes this through `rowTy`. This is a static property; it makes no host reply or\nexecution claim. ","levels":[],"module":"Effect4.Laws.Program.Template","name":"Effect4.Program.rowTy_instantiated_formed","restsOn":[],"statement":"∀ {row : Effect4.Program.Row} {request : Effect4.Program.Ty} {use : Option Effect4.Program.TermUse}\n  {ty : Effect4.Program.EffTy},\n  Eq (Effect4.Program.rowTy row request use) (Option.some ty) →\n    Exists fun σ =>\n      Exists fun bindings =>\n        And\n          (Eq (Effect4.Program.Bounds.matchB List.nil row.request.normalize request.normalize)\n            (Option.some σ))\n          (And (Eq (Effect4.Program.bindTerm σ use) (Except.ok bindings))\n            (Effect4.Program.Formation.Formed\n              (Effect4.Program.Formation.instantiatedSites row bindings)))","withinSemanticAxiomCeiling":true}},"title":"Successful row template use checks instantiated map keys and deferred error columns"},{"concept":"store-typing","contestedBy":[],"id":"fits-mono","literature":[{"locator":"§13.5, pp. 165–169","relation":"proofTechnique","work":"TAPL"},{"locator":"audit P1","relation":"adaptedResult","work":"Ahmed2004"}],"role":"monotonicity","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Membership is monotone under the host world order. ","levels":[],"module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_mono","restsOn":[],"statement":"∀ {w w' : Effect4.Program.Typed.World},\n  w.leHost w' →\n    ∀ {ty : Effect4.Program.Ty} {v : Effect4.Machine.Val},\n      Effect4.Program.Typed.Fits w v ty → Effect4.Program.Typed.Fits w' v ty","withinSemanticAxiomCeiling":true}},"title":"Membership is monotone under host world order"},{"concept":"store-typing","contestedBy":[],"id":"fits-subn","literature":[{"locator":"§15.1, p. 181","relation":"definitionUsed","work":"TAPL"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Membership is closed under the checker's order.** ","levels":[],"module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_subN","restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) {a b : Effect4.Program.Ty},\n  Eq (a.subN b) Bool.true →\n    ∀ (v : Effect4.Machine.Val), Effect4.Program.Typed.Fits w v a → Effect4.Program.Typed.Fits w v b","withinSemanticAxiomCeiling":true}},"title":"Membership is closed under the checker's subtyping order"},{"concept":"store-typing","contestedBy":[],"id":"fits-normalize","literature":[{"locator":"audit P6","relation":"adaptedResult","work":"Castagna2024"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Membership is invariant under normalization** (row 137; `E4-TYPED-CE-009`'s repair). ","levels":[],"module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize","restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) (t : Effect4.Program.Ty) (v : Effect4.Machine.Val),\n  Iff (Effect4.Program.Typed.Fits w v t.normalize) (Effect4.Program.Typed.Fits w v t)","withinSemanticAxiomCeiling":true}},"title":"Membership is invariant under type normalization"},{"concept":"store-typing","contestedBy":[],"id":"fits-scope-inv","literature":[{"locator":"ch. 3, pp. 87–136","relation":"analogy","work":"ATTAPL"}],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A member of `Ty.scope` is a present scope's handle** (row 156): the handle former's scope arm\nreads the scope store, and no other arm accepts the scope target. The posts that answer a scope\nhandle state `Fits w' ans Ty.scope`; their consumers read the scope back here. ","levels":[],"module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_scope_inv","restsOn":[],"statement":"∀ {w : Effect4.Program.Typed.World} {v : Effect4.Machine.Val},\n  Effect4.Program.Typed.Fits w v Effect4.Program.Ty.scope →\n    Exists fun sc =>\n      And (Eq v (Effect4.Machine.Val.scopeHandle sc)) (Effect4.Program.Typed.ScopeLive w sc)","withinSemanticAxiomCeiling":true}},"title":"A member of Ty.scope is a present scope's handle"},{"concept":"store-typing","contestedBy":[],"id":"term-maps-mono","literature":[{"locator":"audit P1","relation":"adaptedResult","work":"Ahmed2004"}],"role":"monotonicity","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The term relation is closed under later worlds**, by the order's transitivity: what\n`storePre_mono` needs of a read-modify-write row. Quantifying over later worlds is what closes\nit; a statement at one world is not closed (the control `termMaps_oneWorld_not_mono` of the\nretired battery `git:68856e778:Test/Program/ProtocolPosts.lean`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TermMaps.mono","restsOn":[],"statement":"∀ {w w' : Effect4.Program.Typed.World} {f : Effect4.Program.Term} {env : List Effect4.Machine.Val}\n  {A R : Effect4.Program.Ty},\n  w.leHost w' →\n    Effect4.Program.Typed.TermMaps w f env A R → Effect4.Program.Typed.TermMaps w' f env A R","withinSemanticAxiomCeiling":true}},"title":"A binder term's map between member types is monotone under host world order"},{"concept":"store-typing","contestedBy":[],"id":"term-typed-maps","literature":[{"locator":"audit P1","relation":"adaptedResult","work":"Ahmed2004"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A typed binder term maps its parameter into its type**, at every later world (the claim\n`term-typed-maps`): a term the checker types at `tys ++ [A]` with type `R`, over an environment\nthat fits `tys`, runs at `env ++ [a]` for every member `a` of `A` to a member of `R`. It is the\nterm relation's fundamental property for the term typer (`TermMaps`, `Typed/Residual.lean`):\nthe environment stays typed at every later world (`envTyped_mono`), the current value extends it\n(`envTyped_append`), and a typed term over fitting values evaluates into its type\n(`evalTerm_progress`). Under any signature whose atoms are the native table's. Its consumer is\n`syncRow_typed`, which discharges a read-modify-write row's pre from the term's typing. It says\nnothing of a term the checker refuses. ","levels":[],"module":"Effect4.Laws.Program.Typed.Denotation.Terms","name":"Effect4.Program.Typed.termMaps_of_typed","restsOn":[],"statement":"∀ {sig : Effect4.Program.Signature Effect4.Program.NativeOp},\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {w : Effect4.Program.Typed.World} {tys : Effect4.Program.TyEnv}\n      {env : List Effect4.Machine.Val},\n      Effect4.Program.Typed.EnvTyped w tys env →\n        ∀ {f : Effect4.Program.Term} {A R : Effect4.Program.Ty},\n          Eq (Effect4.Program.termTy sig (instHAppendOfAppend.hAppend tys (List.cons A List.nil)) f)\n              (Option.some R) →\n            Effect4.Program.Typed.TermMaps w f env A R","withinSemanticAxiomCeiling":true}},"title":"A binder term the term typer admits at the node's environment and the cell's type maps that type into its own type at every later world, over an environment that fits (the state plan's T3b)"},{"concept":"store-typing","contestedBy":[],"id":"fold-typed-atomic-update","literature":[{"locator":"audit P1","relation":"adaptedResult","work":"Ahmed2004"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The list fold's rules hold** (the claim `fold-typed-atomic-update`), at every signature.\nEach field is one theorem: the two definitional equations, the builder's scope law\n(`Authoring.fold_scoped`), `foldlM_refuses`, `evalTerm_weaken`, `termTy_weaken`,\n`termTy_fold_inv`, `fold_fits`, the fold's cases of `evalTerm_progress` and of\n`evalTerm_fitsAll`, `refModify_typed_step`, and the fold's cases of `readTerm_printTerm` and\n`readTerm_exact`.\n\nIt establishes nothing about a module that uses the fold and no agreement with a target. Its\nconsumer is the Queue's service pass (decisions row 228), on the M5 and M6 path through\n`syncRow_typed`. ","levels":[],"module":"Effect4.Laws.Program.Typed.ListFold","name":"Effect4.Program.Typed.fold_typed_atomic_update","restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Effect4.Program.Typed.ListFoldRules sig","withinSemanticAxiomCeiling":true}},"title":"The list fold with two binders, the accumulator and the element: its scope, evaluation, failure, weakening and typing rules; a fold the checker types answers a member of its type over values that fit, in a fixed world; a term reads back from its printed image; one Ref.modify whose term the checker types is one store step that answers B and stores A (decisions row 228)"},{"concept":"store-typing","contestedBy":[],"id":"handle-identity-laws","literature":[{"locator":"audit P1","relation":"analogy","work":"Ahmed2004"}],"role":"canonicalForms","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The laws of a handle's identity hold** (the claim `handle-identity-laws`). Each field is\none theorem: `sameHandle_eval`, the two totality theorems, `sameHandle_refl`,\n`sameHandle_symm`, the two allocation facts, the two freshness theorems and their two list\nforms, `list_later`, and `RawHandles.evalTerm_handles` with its fold case.\n\nIt establishes no correspondence in a target: that two handles have equal keys exactly when\ntheir host objects are one object is each target's relation. Its consumer is the Queue's\nwithdrawal by identity (decisions row 229). ","levels":[],"module":"Effect4.Laws.Program.Typed.ListFold","name":"Effect4.Program.Typed.handle_identity_laws","restsOn":[],"statement":"Effect4.Program.Typed.HandleIdentityLaws","withinSemanticAxiomCeiling":true}},"title":"The identity of a handle in a term: sameHandle is total on two members of one handle type at any payload types, reflexive and symmetric, and it decides key equality; a handle an allocation just made is the same as no handle of a value that fits the earlier world; a later world keeps a list's membership; a term's handles are its environment's (decisions row 229)"},{"concept":"store-typing","contestedBy":[],"id":"saved-mask-image-membership","literature":[],"role":"canonicalForms","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The saved state's membership** (the claim `saved-mask-image-membership`; concept\n`store-typing`, requirement R4; decisions row 244). The image is the frame `ctor 7` over the\nbit (`Value.maskImage`, `src/Effect4/Machine/Value.lean`): data, with no handle.\n\nReach: `Fits` at any world, `Val.hasTy` at any allocation table, the three refusals at their\nown functions. It does not establish reply admission: `externalValue` asked at the type admits\nan image as it admits any handle-free member, and the refusal of a host answer is the column\nscan at table admission. Its consumers are the getter's typed clause and M5 arm\n(`clause_getInterruptible`, `getInterruptible_arm`), the restore node's arm (`restore_arm`),\nand every store that holds a saved value. ","levels":[],"module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.saved_mask_image_membership","restsOn":[],"statement":"Effect4.Program.Typed.SavedMaskImage","withinSemanticAxiomCeiling":true}},"title":"The mask's saved state: membership at Ty.maskRestore is exactly the two saved images, in Fits and in the shape check; the image is no Boolean, a Boolean is no image, and no subtyping relates the two types; the target is reserved against an external allocation, a host answer column and a service carrier; an image holds no handle, so every world, every store and every environment keep its membership (decisions row 244; no reply admission)"},{"concept":"store-typing","contestedBy":[],"id":"modeled-membership","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Membership on the checked domain** (claim `modeled-membership`): every carrier value's\nencoding inhabits its type, at every allocation table. ","levels":[],"module":"Effect4.Laws.Schema.Modeled","name":"Effect4.Schema.Model.member","restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq (Effect4.Schema.Model.refusal t) Option.none →\n    ∀ (x : Effect4.Schema.Model.Carrier t) (alloc : List String),\n      Eq (Effect4.Program.Val.hasTy ((Effect4.Schema.Model.image t).toVal x) t alloc) Bool.true","withinSemanticAxiomCeiling":true}},"title":"On the checked domain, every carrier value's encoding inhabits its type at every allocation table: the refusal fold answers none at the type, and the carrier and its image are the carrier fold's (Model.member); an instance of Modeled inherits it across its equivalence, with no proof of its own (Modeled.member); nothing for an identity type, an optional field or a refused constructor, and no codec admission (decisions row 330, slice L1)"},{"concept":"store-typing","contestedBy":[],"id":"step-language-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The typing law, requiring scope alignment only when a fold occurs. ","levels":[],"module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.typed","restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀\n      {src :\n        {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n      (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n          Effect4.Modules.TypesEach sig (src x) env path types t) →\n        ∀ {s : Effect4.Program.Ty} (e : Effect4.Modules.Step Γ s),\n          e.Facts →\n            autoParam (e.ScopeFacts env types.length) Effect4.Modules.Step.typed._auto_1 →\n              Effect4.Modules.TypesEach sig (Effect4.Modules.Step.term (fun {t} => src) e) env path\n                types s","withinSemanticAxiomCeiling":true}},"title":"A stored step translates to its indexed type from native atom typing, typed caller inputs and Step.Facts; records retain formation and normality, and empty-value subtyping follows from the shared construction law; a fold additionally requires the caller type list to match the source scope length; Step.normal derives Facts for a closed step; no run, optional field, allocation or host behavior follows (decisions row 330)"},{"concept":"store-typing","contestedBy":[],"id":"store-safety","literature":[{"locator":"§13.5, pp. 165–169","relation":"excludedFeature","work":"TAPL"}],"role":"progress","status":{"_tag":"absent","reason":"Machine safety is established by inductive configuration typing rather than operational progress (decisions row 139)"},"title":"Store safety through inductive configuration typing"},{"concept":"residual-program-typing","contestedBy":[],"id":"seq-typed","literature":[{"locator":"ch. 3, pp. 87–136","relation":"adaptedResult","work":"ATTAPL"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The `seqR` compatibility lemma.** A first program typed at `mid`, a value continuation\ntyped at `ty` at every later world on every value that fits `mid`'s answer column, and equal\nerror columns: the sequence `denoteR` builds is typed at `ty`. A failure of the first program\nskips the continuation and must fit `ty`'s error column, which the equal columns give. The\ninstance of `seqGuard_typed` at `seqR`. ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.seq_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram}\n  {k : Effect4.Machine.Val → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    (∀ (w' : Effect4.Program.Typed.World),\n        w.leHost w' →\n          ∀ (v : Effect4.Machine.Val),\n            Effect4.Program.Typed.Fits w' v mid.answer →\n              Effect4.Program.Typed.TypedProg root w' ty (k v)) →\n      Eq mid.error ty.error →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind\n            (Effect4.Program.Sched.guardR Effect4.Program.Sched.GuardKind.onSuccess a)\n            (Effect4.Program.Sched.seqR k))","withinSemanticAxiomCeiling":true}},"title":"The seqR compatibility lemma: denoteR sequences with typed continuations"},{"concept":"residual-program-typing","contestedBy":[],"id":"close-typed","literature":[{"locator":"audit P8","relation":"proofTechnique","work":"deVilhenaPottier2021"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Closing keeps the type.** Closing a typed program with `unguard` is typed at the same\ntype: every leaf becomes a closing marker carrying the leaf's exit. ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.close_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {T : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w T a →\n    ∀ (g : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram),\n      Effect4.Program.Typed.TypedProg root w T\n        (Effects.Program.bind a fun ex =>\n          Effects.Program.vis (Sum.inr (Effect4.Program.Sched.FiberOp.unguard ex)) g)","withinSemanticAxiomCeiling":true}},"title":"Closing a typed program with unguard preserves typing"},{"concept":"residual-program-typing","contestedBy":[],"id":"sound-at-app-signature","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`run_typed` (the machine) at an application's signature** (R1). ","levels":[],"module":"Effect4.Laws.Program.SoundAnySignature","name":"Effect4.Program.Denote.run_typed_app","restsOn":[],"statement":"∀ (t : Effect4.Program.RowTable) (s : List (Prod Effect4.ServiceKey Effect4.Program.Ty)),\n  (∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem s entry → { rows := t }.FreshCode entry) →\n    ∀ (e : Effect4.Program.NativeEff) (ty : Effect4.Program.EffTy) (fuel : Nat),\n      Eq (Effect4.Program.Denote.Straight e) Bool.true →\n        Eq (Effect4.Program.effTy { rows := t, services := s }.signature List.nil e)\n            (Option.some ty) →\n          instLENat.le (Effect4.Program.Agreement.depth e) fuel →\n            instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps e)) 6)\n                fuel →\n              And (Eq (Effect4.Api.run e fuel).outcome Effect4.Api.Outcome.finished)\n                (Exists fun ex =>\n                  And (Eq (Effect4.Api.run e fuel).exit (Option.some ex))\n                    (Effect4.Program.Denote.ExitHasTy ty.answer ty.error\n                      (Effect4.Api.run e fuel).stores ex))","withinSemanticAxiomCeiling":true}},"title":"Meaning, loop and run soundness at an application's signature: any table, service declarations at fresh codes, by C3's reflection (R1)"},{"concept":"residual-program-typing","contestedBy":[],"id":"straight-meaning-typed","literature":[],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A typed straight program's meaning has its type.** From the empty stores, the exit is a\nvalid value of the answer type or a cause inside the error type. ","levels":[],"module":"Effect4.Laws.Program.MeaningSound","name":"Effect4.Program.Denote.meaning_typed","restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (t : Effect4.Program.EffTy),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    Eq (Effect4.Program.effTy Effect4.Program.nativeSignature List.nil e) (Option.some t) →\n      Effect4.Program.Denote.ExitHasTy t.answer t.error\n        (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).snd\n        (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).fst","withinSemanticAxiomCeiling":true}},"title":"Typed straight programs return ExitHasTy from the empty environment and stores"},{"concept":"residual-program-typing","contestedBy":[{"id":"E4-TYPED-CE-020","record":"| `E4-TYPED-CE-020` | REPAIRED 2026-10-01 (seat D2, merged `aabb1b5e`: `DenotesTyped` takes row 170's premise `layerRefsWF`, discharged at the load by `layerRefsWF_of_typeOf`); SEEDED 2026-10-01 (seat D2) | `DenotesTyped` is false at a root whose layer reference targets a reference | Codex's candidate (`docs/research/2026-10-01-landing/codex-second-eyes/2016-d1-review.md`): three `provideLayer`s of `Test.Program.TypedSplit.key` with unit bodies, the last `.ref [1,0,0]` to `.ref [0,0]`; the point `[1,1]` is `PointTyped` at `pure unit` through `Eff.expandIn`, the run's `.ref` arm answers `badShapeExit` (reading, not compiled) | decisions row 170: the premise `layerRefsWF` on `DenotesTyped`, discharged at the load from `typeOfProgram` |","registerStatus":"REPAIRED","witness":null},{"id":"E4-TYPED-CE-021","record":"| `E4-TYPED-CE-021` | REPAIRED 2026-10-01 (seat D2, merged `aabb1b5e`: `PointTyped` carries the completed view, row 175 (a)); SEEDED 2026-10-01 (seat D2) | `DenotesTyped` is false at a point whose completed view holds an exit the world refuses, because `PointTyped` never reads `point.completed` | seat D2's witness: the corpus program `awaitFiber.value`, point `[1]`, env `[fiber 1]`, completed `[(1, success \"x\")]`, world `Γ 1 = pure nat`; `PointTyped` at `pure (exitOf nat never)`, the denotation `.pure (success (exitOk \"x\"))` refused | decisions row 175 (ruled): `PointTyped` carries the completed view |","registerStatus":"REPAIRED","witness":null},{"id":"E4-TYPED-CE-022","record":"| `E4-TYPED-CE-022` | REPAIRED 2026-10-01 (seat D2, merged `aabb1b5e`: `DenotesTyped` ranges over worlds whose service table is the source's, row 175); SEEDED 2026-10-01 (seat D2) | `DenotesTyped` is false at a world whose service table differs from the checker's | seat D2's witness: `.service ⟨4,4⟩` (native carrier `nat`) at a world with `serviceTy := fun _ => none` and a context holding `str \"x\"` under the key | decisions row 175 (ruled): `DenotesTyped` ranges over worlds whose service table is the source's |","registerStatus":"REPAIRED","witness":null},{"id":"E4-TYPED-CE-023","record":"| `E4-TYPED-CE-023` | REPAIRED 2026-10-02 (seat L: built layers answer the fiber-context image, decisions row 176 (b), `f8571cf0`, merged `9a2b7651`; the layer family's arm proved at every source, `provideLayerArm`, `8c9464b6`, merged `71b1c9c1`); SEEDED 2026-10-02 (seat L, `c1c05314`, merged `3f9c2a77`; D2's reserved id) | `DenotesTyped` holds at a typed `provideLayer` point whose memo lookup hits | `memoSrc`, `provideLayer (effect K (succeed 7)) false (succeed unit)` checked at `pure unit`: the hit answers a fiber-context image, which fits `Ty.context` and which the build's reader `Env.decode` refuses, so `addCurrentMemoMapR` answers `badShapeExit`; `old_memo_refuted : ¬ DenotesTyped memoSrc`, kernel-checked at `c1c05314` over the old helpers (`Test/Program/LayerDenotation.lean`; the history control `hit_image_refused_old` stays) | decisions row 176 (b) (ruled): a build answers `builtContext`, every reader is `Val.context?`; row 187 types the memo rows so a guard keeps the hit's type |","registerStatus":"REPAIRED","witness":null},{"id":"E4-TYPED-CE-031","record":"| `E4-TYPED-CE-031` | REPAIRED 2026-10-02 (seat L, L1 `569d3d69`, merged `71b1c9c1`: `orDie` resolves its inner layer on both machines, `resolveLayerWith` and `denoteLayerWith`'s `orDie` arm; the controls `orDie_runs`, `chain_runs` and their reference twins); SEEDED 2026-10-02 (seat L, `c1c05314`, merged `3f9c2a77`) | `ProvideLayerArm` and `DenotesTyped` hold at a well-formed program with a layer reference under `orDie` | `orDieSrc`: `layerRefsWF` admits `orDie (ref t)` and the checker types the expansion, where the reference is its target's term, while the run compiled `orDie`'s inner term directly, the wrong shape at every fuel; `orDie_arm_refuted : ¬ ProvideLayerArm orDieSrc`, `orDie_denotes_refuted`, kernel-checked at `c1c05314` over the old arms | decisions row 185 (owner, 2026-10-02): `orDie` builds its inner layer as it resolves (`Layer.ts:3327-3328`, `self.build(memoMap, scope)`) |","registerStatus":"REPAIRED","witness":null}],"id":"denote-typed","literature":[{"locator":"audit P37","relation":"definitionUsed","work":"XiaEtAl2020"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**M5's fundamental property** (decisions rows 148 and 349, `denotesTyped`): at every source\nwhose layer references are well formed, a checked point denotes a program typed by the ambient\njudgment at every world whose service table is the source's and every row holding its requirement\nrow. The arms by induction on fuel (`childDenotes_upto`), the layer family's by\n`provideLayerArm`. ","levels":[],"module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.denotesTyped","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource), Effect4.Program.Typed.DenotesTyped root","withinSemanticAxiomCeiling":true}},"title":"The denotation of a checked program is TypedProg at its certificate (M5)"},{"concept":"residual-program-typing","contestedBy":[],"id":"invocation-arm","literature":[],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An invocation** (decisions row 328, goal G3; the arm of `denote-typed`): the counted step,\nthen the definition's body at its path, its one variable the request's value. The checker types\nthe invocation by the definition's declared row (`invoke_hasTy`), which the declaration's\nformation keeps closed: the request's value fits the declared request and the node's type is the\ndeclared columns (`rowTy_closed_some`). The body is typed at its point by the block's typing\n(`BodiesTyped`), one unit of fuel lighter (`Point.redirect`), and its type widens to the declared\ncolumns (`DefDecl.admits`). Its consumer is `perform_arm`. ","levels":[],"module":"Effect4.Laws.Program.Typed.Denotation","name":"Effect4.Program.Typed.call_arm","restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {p : Effect4.Program.Point} {ty : Effect4.Program.EffTy}\n  {available : Effect4.Machine.Env.Requirement} {k : Nat} {r : Effect4.Program.Term} {f : Nat},\n  Eq p.fuel (instHAdd.hAdd f 1) →\n    Eq ((Effect4.Program.Node.eff root.program).at_ p.path)\n        (Option.some\n          (Effect4.Program.Node.eff\n            (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.call k) r))) →\n      Effect4.Program.Typed.PointTyped root w p ty →\n        Eq w.serviceTy root.sig.serviceTy →\n          Effect4.Program.Typed.BodiesTyped root →\n            (∀ (c : Effect4.Program.NativeEff) (path : List Nat),\n                Eq ((Effect4.Program.Node.eff root.program).at_ path)\n                    (Option.some (Effect4.Program.Node.eff c)) →\n                  Effect4.Program.Typed.ChildDenotes root f c path) →\n              Effect4.Row.Subset ty.requires available →\n                Effect4.Program.Typed.AmbientProg root w available\n                  (Effect4.Program.Typed.AmbientPosition.result\n                    { fst := ty, snd := { fst := available, snd := available } }.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.snd)\n                  (Effect4.Program.Sched.denoteR root.program\n                    (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.call k) r) p)","withinSemanticAxiomCeiling":true}},"title":"An invocation of a checked definition block denotes TypedProg at the declared row: the body at its point, its type widened to the declaration (M5's arm, decisions row 328, G3)"},{"concept":"residual-program-typing","contestedBy":[],"id":"rebuild-admission","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Successful rebuilding retains the host setup and checks exactly the candidate. The\nreturned `Built.admitted` certificate is indexed by those program and table fields. ","levels":[],"module":"Effect4.Laws.Program.Author","name":"Effect4.Program.Authoring.rebuild_spec","restsOn":[],"statement":"∀ {before after : Effect4.Api.Built} {candidate : Effect4.Api.Program},\n  Eq (before.rebuild candidate) (Except.ok after) →\n    And (Eq after.program candidate)\n      (And (Eq after.table before.table) (Eq after.rowNames before.rowNames))","withinSemanticAxiomCeiling":true}},"title":"Successful rebuilding checks the exact candidate under the retained host table and row names (Built.rebuild)"},{"concept":"residual-program-typing","contestedBy":[],"id":"denote-typed-layer-free","literature":[{"locator":"audit P37","relation":"definitionUsed","work":"XiaEtAl2020"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**M5 on the layer-free fragment**: a program none of whose nodes is a `provideLayer` satisfies\nthe fundamental property; the layer family's arm cannot be reached there\n(`provideLayerArm_of_layerFree`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.denotesTyped_of_layerFree","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource),\n  Effect4.Program.Typed.LayerFree root.program → Effect4.Program.Typed.DenotesTyped root","withinSemanticAxiomCeiling":true}},"title":"M5 on the layer-free fragment: every arm but provideLayer's, assembled by induction on fuel"},{"concept":"residual-program-typing","contestedBy":[],"id":"load-typed-layer-free","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The typed load on the layer-free fragment**: a checked program none of whose nodes is a\n`provideLayer` loads into `J` (`denotesTyped_of_layerFree`, then the load connector). ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Finish","name":"Effect4.Program.Typed.loadsTyped_of_layerFree","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat),\n  Effect4.Program.Typed.LayerFree root.program →\n    Effect4.Program.Typed.LoadsTyped root rootTy fuel compileFuel","withinSemanticAxiomCeiling":true}},"title":"The typed load on the layer-free fragment: a checked program loads into J (M5's load connector, the marker premise discharged)"},{"concept":"residual-program-typing","contestedBy":[{"id":"E4-TYPED-CE-023","record":"| `E4-TYPED-CE-023` | REPAIRED 2026-10-02 (seat L: built layers answer the fiber-context image, decisions row 176 (b), `f8571cf0`, merged `9a2b7651`; the layer family's arm proved at every source, `provideLayerArm`, `8c9464b6`, merged `71b1c9c1`); SEEDED 2026-10-02 (seat L, `c1c05314`, merged `3f9c2a77`; D2's reserved id) | `DenotesTyped` holds at a typed `provideLayer` point whose memo lookup hits | `memoSrc`, `provideLayer (effect K (succeed 7)) false (succeed unit)` checked at `pure unit`: the hit answers a fiber-context image, which fits `Ty.context` and which the build's reader `Env.decode` refuses, so `addCurrentMemoMapR` answers `badShapeExit`; `old_memo_refuted : ¬ DenotesTyped memoSrc`, kernel-checked at `c1c05314` over the old helpers (`Test/Program/LayerDenotation.lean`; the history control `hit_image_refused_old` stays) | decisions row 176 (b) (ruled): a build answers `builtContext`, every reader is `Val.context?`; row 187 types the memo rows so a guard keeps the hit's type |","registerStatus":"REPAIRED","witness":null},{"id":"E4-TYPED-CE-031","record":"| `E4-TYPED-CE-031` | REPAIRED 2026-10-02 (seat L, L1 `569d3d69`, merged `71b1c9c1`: `orDie` resolves its inner layer on both machines, `resolveLayerWith` and `denoteLayerWith`'s `orDie` arm; the controls `orDie_runs`, `chain_runs` and their reference twins); SEEDED 2026-10-02 (seat L, `c1c05314`, merged `3f9c2a77`) | `ProvideLayerArm` and `DenotesTyped` hold at a well-formed program with a layer reference under `orDie` | `orDieSrc`: `layerRefsWF` admits `orDie (ref t)` and the checker types the expansion, where the reference is its target's term, while the run compiled `orDie`'s inner term directly, the wrong shape at every fuel; `orDie_arm_refuted : ¬ ProvideLayerArm orDieSrc`, `orDie_denotes_refuted`, kernel-checked at `c1c05314` over the old arms | decisions row 185 (owner, 2026-10-02): `orDie` builds its inner layer as it resolves (`Layer.ts:3327-3328`, `self.build(memoMap, scope)`) |","registerStatus":"REPAIRED","witness":null}],"id":"provide-layer-arm","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`ProvideLayerArm` holds at every source**: the hypothesis the assembly was conditional on. ","levels":[],"module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.provideLayerArm","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource), Effect4.Program.Typed.ProvideLayerArm root","withinSemanticAxiomCeiling":true}},"title":"The layer family's arm: a layer build at an admitted layer point answers the built context at the layer's checked error type, and the provide protocol around it is typed (decisions rows 176 (b), 185-187)"},{"concept":"residual-program-typing","contestedBy":[],"id":"load-typed","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**M5** (`loadsTyped`): a lawful, checked, closed source whose requirement row is\nempty loads into `J` at the initial world, at every fuel and compile budget. ","levels":[],"module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.loadsTyped","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat), Effect4.Program.Typed.LoadsTyped root rootTy fuel compileFuel","withinSemanticAxiomCeiling":true}},"title":"M5: a lawful, checked, closed source with an empty requirement row loads into J"},{"concept":"residual-program-typing","contestedBy":[],"id":"load-typed-checked","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The typed load for a checked closed program**: row 117's empty requirement row applies\nat the load. The source's lawful-signature premise is not read here. ","levels":[],"module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.load_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Exists fun w =>\n        Effect4.Program.Typed.MachineTyped root rootTy w\n          (Effect4.Program.Sched.loadR root.program fuel compileFuel)","withinSemanticAxiomCeiling":true}},"title":"The typed load for every checked program: M5 with no lawful-signature or closed-row premise"},{"concept":"residual-program-typing","contestedBy":[],"id":"bind-closed","literature":[{"locator":"audit P8","relation":"excludedFeature","work":"deVilhenaPottier2021"}],"role":"compatibility","status":{"_tag":"refuted","counterexample":{"id":"E4-TYPED-CE-030","record":"| `E4-TYPED-CE-030` | REPAIRED 2026-10-01 (seat D2, merged `aabb1b5e`: every guard shape has its compatibility lemma); SEEDED 2026-10-01 (coordinator; the red controls landed with decisions row 148, in the battery under the gate's ceiling) | `TypedProg` is closed under bind: a program typed at `mid` and a continuation typed at `ty` at every later world on every exit `ExitOk` admits at `mid` make a sequence typed at `ty` | `Test/Program/TypedProgBindRed.lean`: `typedProg_not_bind_closed` (`:32`; a closing marker's exit must fit the current type), `bind_not_typed` and `guard_bind_not_closed` (a first program whose only closing marker sits inside a guard body does not bind either); green control `seq_sample` | no bind rule: M5 sequences per construct (`seq_typed`, `src/Effect4/Laws/Program/Typed/Seq.lean:59`, with `close_typed`); the `onFailure`, `all` and `onExit` shapes beside it, landed by seat D2 (`catchGuard_typed`, `allGuard_typed`, `onExit_typed`, the general `guardBind_typed`; decisions row 148) |","registerStatus":"REPAIRED","witness":{"axioms":["Quot.sound","propext"],"doc":"**Red control: `TypedProg` is not closed under bind.** `closeAtNat` is typed at `nat`,\n`toUnit` is typed at `unit` on every exit at every later world, and their sequence is not typed\nat `unit`: the marker's exit must fit the current type. ","levels":[],"module":"Test.Program.TypedProgBindRed","name":"Test.Program.TypedProgBindRed.typedProg_not_bind_closed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (w : Effect4.Program.Typed.World),\n  Exists fun mid =>\n    Exists fun ty =>\n      Exists fun p =>\n        Exists fun k =>\n          And (Effect4.Program.Typed.TypedProg root w mid p)\n            (And\n              (∀ (w' : Effect4.Program.Typed.World),\n                w.leHost w' →\n                  ∀ (ex : Effect4.Machine.ExitV),\n                    Effect4.Program.Typed.ExitOk w' mid ex →\n                      Effect4.Program.Typed.TypedProg root w' ty (k ex))\n              (Not (Effect4.Program.Typed.TypedProg root w ty (Effects.Program.bind p k))))","withinSemanticAxiomCeiling":true}}},"title":"TypedProg is closed under bind"},{"concept":"residual-program-typing","contestedBy":[],"id":"guard-bind-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The guard compatibility lemma** (the general form of `seq_typed`, decisions row 148): a\nfirst program typed at `mid`, a continuation typed at `ty` at every later world on every exit the\nguard's arm takes and `mid` admits, and every exit the arm does not take admitted at `ty`: the\nguarded sequence is typed at `ty`. Every guard `denoteR` builds has this shape\n(`guardR kind a`, bound to a continuation); the body closes by `close_typed`. ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.guardBind_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {kind : Effect4.Program.Sched.GuardKind}\n  {a : Effect4.Program.Sched.RProgram} {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    (∀ (w' : Effect4.Program.Typed.World),\n        w.leHost w' →\n          ∀ (ex : Effect4.Machine.ExitV),\n            Eq (kind.hasExitArm ex) Bool.true →\n              Effect4.Program.Typed.ExitOk w' mid ex →\n                Effect4.Program.Typed.TypedProg root w' ty (K ex)) →\n      (∀ (w' : Effect4.Program.Typed.World),\n          w.leHost w' →\n            ∀ (ex : Effect4.Machine.ExitV),\n              Effect4.Program.Typed.ExitOk w' mid ex →\n                Eq (kind.hasExitArm ex) Bool.false → Effect4.Program.Typed.ExitOk w' ty ex) →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind (Effect4.Program.Sched.guardR kind a) K)","withinSemanticAxiomCeiling":true}},"title":"The guard compatibility lemma: a guarded program bound into its arms is typed (the general form of seq_typed, row 148)"},{"concept":"residual-program-typing","contestedBy":[],"id":"on-failure-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The `onFailure` shape** (`catchCause`, `catchIf`, `orDie`, a finalizer's cleanup): the\ncontinuation at every failure `mid` admits; a success skips it and must fit `ty`'s answer\ncolumn, below which `mid`'s is. ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.catchGuard_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram}\n  {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    Eq (mid.answer.subN ty.answer) Bool.true →\n      (∀ (w' : Effect4.Program.Typed.World),\n          w.leHost w' →\n            ∀\n              (c :\n                Effect4.Cause Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n              Effect4.Program.Typed.ExitOk w' mid (Effect4.Exit.failure c) →\n                Effect4.Program.Typed.TypedProg root w' ty (K (Effect4.Exit.failure c))) →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind\n            (Effect4.Program.Sched.guardR Effect4.Program.Sched.GuardKind.onFailure a) K)","withinSemanticAxiomCeiling":true}},"title":"The onFailure shape (catchCause, catchIf, orDie, a finalizer's cleanup) is typed"},{"concept":"residual-program-typing","contestedBy":[],"id":"all-guard-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The `all` and `onExit` shapes** (`exit`, `matchCause`, a finalizer's boundary): a guard\nwhose arm takes every exit runs the continuation on every exit `mid` admits; nothing skips. ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.allGuard_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {kind : Effect4.Program.Sched.GuardKind},\n  (∀ (ex : Effect4.Machine.ExitV), Eq (kind.hasExitArm ex) Bool.true) →\n    ∀ {a : Effect4.Program.Sched.RProgram}\n      {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n      Effect4.Program.Typed.TypedProg root w mid a →\n        (∀ (w' : Effect4.Program.Typed.World),\n            w.leHost w' →\n              ∀ (ex : Effect4.Machine.ExitV),\n                Effect4.Program.Typed.ExitOk w' mid ex →\n                  Effect4.Program.Typed.TypedProg root w' ty (K ex)) →\n          Effect4.Program.Typed.TypedProg root w ty\n            (Effects.Program.bind (Effect4.Program.Sched.guardR kind a) K)","withinSemanticAxiomCeiling":true}},"title":"The all and onExit guard shapes (exit, matchCause, a finalizer's boundary) are typed"},{"concept":"residual-program-typing","contestedBy":[],"id":"on-exit-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The `onExit` shape** (`onExitR`, `DenoteR.lean`): the body typed at `b`, below the result\nin both columns, and the finalizer typed at `f` on every exit `b` admits, its error column below\nthe result's: the region is typed at the result. The guard's arm takes every exit\n(`allGuard_typed`); each runs the finalizer's boundary (`finalizer_typed`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.onExit_typed","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {b f ty : Effect4.Program.EffTy} {body : Effect4.Program.Sched.RProgram}\n  {fin : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram} {flag : Bool},\n  Eq (b.answer.subN ty.answer) Bool.true →\n    Eq (b.error.subN ty.error) Bool.true →\n      Eq (f.error.subN ty.error) Bool.true →\n        Effect4.Program.Typed.TypedProg root w b body →\n          (∀ (w' : Effect4.Program.Typed.World),\n              w.leHost w' →\n                ∀ (ex : Effect4.Machine.ExitV),\n                  Effect4.Program.Typed.ExitOk w' b ex →\n                    Effect4.Program.Typed.TypedProg root w' f (fin ex)) →\n            Effect4.Program.Typed.TypedProg root w ty (Effect4.Program.Sched.onExitR body fin flag)","withinSemanticAxiomCeiling":true}},"title":"The onExit shape onExitR builds: the body and the finalizer at their types"},{"concept":"residual-program-typing","contestedBy":[],"id":"scoped-body-substitution-boundary","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The restore node's body** (the claim `scoped-body-substitution-boundary`, for the mask;\nconcept `residual-program-typing`, requirement R4; decisions rows 245 and 246).\n\nReach: the checker at any signature and path; the compile at a positive budget; the typed\nstate at a source whose layer references are well formed and a world whose service table is\nthe source's (`denotesTyped`). It does not establish agreement with a target. The claim's\nsecond half, a later constructor that binds a scope, has no statement: the mask adds none.\nIts consumers are the Queue's waiting wrapper and the Semaphore's protected permit, which\ndescend into a restore site's body by `bodyTyped`. ","levels":[],"module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.scoped_body_substitution_boundary","restsOn":[],"statement":"Effect4.Program.Typed.RestoreBodyBoundary","withinSemanticAxiomCeiling":true}},"title":"A restore site is one node that binds nothing, with its checked body at child 0: both saved choices run that one body in the node's environment; a typed point at the node denotes a typed program, its saved term evaluates to an image, and its body's point is typed at the node's type; a saved value passed as data keeps its choice and holds no handle; the mask's builder is the program's own expansion over bind (decisions rows 245, 246; the restore node's half of the claim; no agreement with a target)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"finalizer-starts-bounded","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Finalizer starts spend recorded pushes, retaining any unspent stack credits.\nEvery native decision prefix satisfies the bound. ","levels":[],"module":"Effect4.Laws.Program.FinalizerRun","name":"Effect4.Program.FinalizerRun.starts_le_pushes","restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Effect4.Program.Guard.Reachable p table cf m →\n    instLENat.le\n      (List.countP (Effect4.Program.FinalizerRun.startedAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n      (List.countP (Effect4.Program.FinalizerRun.registeredAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))","withinSemanticAxiomCeiling":true}},"title":"Every native decision prefix starts an onExit finalizer no more often than it pushes that source's finalizer frame; arbitrary program, table and budget; no progress, source uniqueness or cleanup-log claim"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"once-placed-finalizer","literature":[],"role":"preservation","status":{"_tag":"goal","by":"goal","goal":{"axioms":[],"doc":"Control-source uniqueness obligation of the at-most-once claim.\nA once-placed source pushes its finalizer frame at most once across all fibers.\nConsumer: the atomic cleanup-log claim. It supplies no finalizer progress. ","levels":[],"module":"Effect4.Laws.Program.FinalizerRun","name":"Effect4.Program.FinalizerRun.once_placed_pushes_once","restsOn":["Effect4.Program.FinalizerRun.once_placed_pushes_once"],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Eq (Effect4.Program.OncePlaced (Effect4.Program.Node.eff p) q) Bool.true →\n    Effect4.Program.Guard.Reachable p table cf m →\n      instLENat.le\n        (List.countP (Effect4.Program.FinalizerRun.registeredAt q)\n          (m.trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        1","withinSemanticAxiomCeiling":true}},"title":"A once-placed source pushes its finalizer frame at most once across every fiber of a native decision prefix; no progress or log-writer claim"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"close-idempotent","literature":[{"locator":"ch. 28, §28.1, p. 261","relation":"adaptedResult","work":"PFPL"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"Closing an already-closed scope returns it without running a finalizer.\ncensus: scope.close-state-first ","levels":["u","v"],"module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_idempotent","restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u}\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (exit : Effect4.Exit β ε δ ι α),\n  Eq self.isClosed Bool.true →\n    Eq (Effect4.Scope.close run self exit) { fst := self, snd := Effect4.Exit.void }","withinSemanticAxiomCeiling":true}},"title":"Closing an already-closed scope returns void without re-running finalizers"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"close-twice","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"A second close runs nothing. census: scope.close-state-first ","levels":["u","v"],"module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_twice","restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u}\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (first second : Effect4.Exit β ε δ ι α),\n  Eq (Effect4.Scope.close run (Effect4.Scope.close run self first).fst second)\n    { fst := (Effect4.Scope.close run self first).fst, snd := Effect4.Exit.void }","withinSemanticAxiomCeiling":true}},"title":"A second close runs nothing"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"close-order-eq","literature":[{"locator":"ch. 3, pp. 87–136","relation":"analogy","work":"ATTAPL"}],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"Finalizers are materialised in insertion order and iterated backwards.\ncensus: scope.close-lifo ","levels":["u","v"],"module":"Effect4.Machine.Scope","name":"Effect4.Scope.closeOrder_eq","restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u} (self : Effect4.Scope κ φ β ε δ ι α),\n  Eq self.closeOrder (List.map Prod.snd self.finalizers).reverse","withinSemanticAxiomCeiling":true}},"title":"Scope finalizers run in reverse registration order (LIFO)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"close-reentrant-add","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"The sharp form of \"state before finalizers\": a finalizer that re-enters the\nscope while it closes sees a `Closed` scope, so its own registration runs\nimmediately with the closing exit rather than being recorded.\ncensus: rule.scope-close-lifo-state-first ","levels":["u","v"],"module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_reentrant_add","restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u} [inst : DecidableEq κ]\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (exit : Effect4.Exit β ε δ ι α) (key : κ) (finalizer : φ),\n  Eq self.isClosed Bool.false →\n    Eq (Effect4.Scope.addExit run (self.closeState exit) key finalizer)\n      { fst := self.closeState exit, snd := run finalizer exit }","withinSemanticAxiomCeiling":true}},"title":"Re-entrant finalizer addition observes closed state immediately"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"close-seq-protocol","literature":[{"locator":"audit P8","relation":"adaptedResult","work":"deVilhenaPottier2021"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A typed walk frame has its protocol**: coinduction from the invariant. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.Close","name":"Effect4.Program.Typed.closeSeqProtocol","restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {row : Effect4.Machine.Env.Requirement} {tin tout : Effect4.Program.EffTy}\n  {name : Effect4.Program.EffName},\n  Effect4.Program.Typed.CloseSeqTyped root\n      { fst := w,\n        snd :=\n          { fst := row,\n            snd := { fst := row, snd := { fst := tin, snd := { fst := tout, snd := name } } } } } →\n    Effect4.Program.Typed.AmbientIteratorProtocol root w row row tin tout name","withinSemanticAxiomCeiling":true}},"title":"The sequential close walk meets the ambient iterator protocol at one row for admitted finalizers"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"saved-mask-restoration","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The mask's law at the boundaries of regions** (the claim `saved-mask-restoration`;\nconcept `scope-lifetime-finalization`, requirement R11; decisions rows 227 and 244 to 246).\n\nReach: the frame machine at the program's interpreter, any completed view, any fiber and any\nmachine; the compile at a positive budget; both saved bits; any exit. It does not establish\nprogress, and it names no module that uses the mask. **It does not state that a region which\nchanges no flag ends with its entry flag**: such a region pushes no frame, and its exit flag\nis what its body left (the module's head; the receipt's open part). The reference machine's\nclause is related to the frame's by the simulation (`evaluate_rel`'s cases `actMask` and\n`actGetInterruptible`, `Laws/Program/Simulation/Evaluate.lean`), and it keeps the typed state\n(`clause_mask`, `clause_getInterruptible`). Its consumers are the Queue's waiting wrapper and\nthe Semaphore's protected permit. ","levels":[],"module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.saved_mask_restoration","restsOn":[],"statement":"Effect4.Program.Typed.MaskRestoration","withinSemanticAxiomCeiling":true}},"title":"The mask's law at the boundaries of regions, on the frame machine: the getter masks and answers the image of the entry flag; a restore site at a true bit is the interruptible region over its body, and at a false bit it is its body's own code; a region's entry sets its own flag at every fiber and saves the earlier flag exactly when it changes it; the saved frame's pass returns that flag on every exit, and with a cause pending an exit that leaves the fiber interruptible fails there with it (decisions rows 227, 244 to 246; no progress, nothing about a module, and no statement for a region that changes no flag)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"saved-mask-pop-discipline","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The saved mask's chain through a pop of the stack** (the proposed registry claim\n`saved-mask-pop-discipline`; concept `scope-lifetime-finalization`, requirement R11). It is a\nstep of the open run-level half of `saved-mask-restoration`. Each field cites one theorem of\nthis module, so its status is derived from theirs (`#plan_status`).\n\nReach: the polymorphic `FrameFiber`, at every stack, demand, skip flag and carried cause, with\none fixed base. The pop asks for an empty scratch stack, as `getCont` calls it.\n\nIt does not establish a law of a run, a completed exit, a cleanup's multiplicity, a delivery, a\nbudget or liveness. It says nothing of a host or of a printed form. The bracket of a whole region\nand each fiber's base in a run are not stated.\n\nIts consumers are the later lift through `Machine.Lift`, then the waiting wrapper under a masked\ncaller and Semaphore's protected permit. ","levels":["u","v"],"module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.saved_mask_pop_discipline","restsOn":[],"statement":"∀ (ν σ : Type u) (β : Type v) (ε δ ι α : Type u) [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α], Effect4.Machine.MaskPopDiscipline ν σ β ε δ ι α","withinSemanticAxiomCeiling":true}},"title":"At one fixed base bit, the frame machine keeps the chain of restoring frames on a fiber's stack: FrameFiber.popFrom from an empty scratch stack, getCont, Machine.frameExitState and the entry of each region keep it, and two fibers with one base and one stack have one flag (a local law at every demand, skip flag and carried cause; no statement of a run, of a completed exit, of cleanup or of delivery)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"saved-mask-chain-runs","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Each live fiber of a run of a compiled program holds the saved mask's chain at its start\nflag** (the proposed registry claim `saved-mask-chain-runs`; concept\n`scope-lifetime-finalization`, requirement R11). It is the placed statement of the claim: the\nlift of `saved_mask_pop_discipline` to runs, at the compiled program's interpreter\n`interpOf root table` and under the native evaluator `evaluatorFor root table`. A printed form\nof the statement hides that instance.\n\nIts general form is `Machine.saved_mask_chain_runs`, at the frame evaluator. This statement is\n`Machine.replayEval_maskRuns` at the native evaluator's premise `evaluateNative_keepsMask`.\n\nReach: every program, row table, decision tape and fuel, from each machine that holds the\ninvariant. It asks for no typing, no admission and no premise on the table.\n\nIt does not establish the bracket of a region, a flag or a stack of an exited fiber as a state\ninvariant, a cleanup's multiplicity, a delivery, a budget or liveness. An invariant is not\nprogress.\n\nIts consumers are the bracket's law, then the waiting wrapper under a masked caller,\nSemaphore's protected permit and Pool's `use`. ","levels":[],"module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.compiled_mask_chain_runs","restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (fuel : Nat)\n  (tape :\n    List\n      (Effect4.Machine.RunDecision Effect4.Program.EffName Effect4.Program.EffThunk\n        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n        Effect4.Machine.Ann))\n  (bases : List Bool)\n  (m :\n    Effect4.Machine.RunMachine Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx Effect4.Machine.Stores),\n  Effect4.Machine.MaskRuns bases m →\n    Exists fun bases' =>\n      And (bases.IsPrefix bases')\n        (Effect4.Machine.MaskRuns bases'\n          (Effect4.Machine.replayEval (Effect4.Program.interpOf root table) fuel tape m).machine)","withinSemanticAxiomCeiling":true}},"title":"Each live fiber of a run of a compiled program holds the saved mask's chain at its start flag: the invariant MaskRuns, at a table of start flags, is kept by every decision tape and fuel at the compiled program's interpreter, from each machine that holds it; each command keeps it under the condition just before a clearing, which the command loop discharges, so each entry outside the machine that returns a machine keeps it, with no premise for the condition (the lift of saved-mask-pop-discipline to runs; no typing, no admission and no premise on the table; no bracket of a region, no flag or stack of an exited fiber, no cleanup's multiplicity, no delivery, no budget, no liveness)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"saved-mask-region-bracket","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A region of a compiled program ends at its entry's stack and at its entry flag**, for an\narbitrary body (the proposed registry claim `saved-mask-region-bracket`; concept\n`scope-lifetime-finalization`, requirement R11). It is the run-level half of\n`saved-mask-restoration`, at the compiled program's interpreter `interpOf p table` and under\nthe native evaluator.\n\nThe two cuts are cuts of one command loop's run (`LoopCut`, at tables in the prefix order), and\nat each a pending command steps the fiber. The first is the region's entry: its stack is the\nentry's stack, and its flag is the entry flag. At the second the fiber is inside the region: its\nstack is the own frames `above` over the entry's stack. Where the pop of the own frames answers\nnothing, the body's exit has passed each own frame. Then the region's end has the entry's stack\nand the entry flag, and the pop of the fiber goes on as the pop of the region's end\n(`RegionEnds`).\n\nIts two facts are its steps. The stack at the region's end is the entry's stack\n(`FrameFiber.regionEnd_stack`). The fiber is live at both cuts (`stepped_live`), so the\nstatement takes no premise on an exit. Its general form is\n`Machine.saved_mask_region_bracket`, which takes that premise.\n\nReach: every program, row table, demand, skip flag and carried cause. It asks for no typing and\nno admission. A region that changes its flag and a region that changes no flag are one case: the\nstatement reads the entry's stack and the entry flag alone.\n\nThe later cut's stack shape `above ++ below` is a premise, and it is the region's only mark on\nthe machine. The theorem then gives the entry's stack and the entry flag at the region's end. It\ndoes not give that a body's run keeps that shape.\n\nIt gives no cleanup, no release count, no delivery, no budget and no liveness, and nothing of a\nregion whose fiber exits inside it. The client premise of the mask's derived form stays with the\nclient: nothing is acquired or registered before the body begins (decisions rows 227 and 244 to\n246).\n\nIts consumers are the waiting wrapper under a masked caller, then Semaphore's protected permit\nand Pool's `use`. ","levels":[],"module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.compiled_region_bracket","restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) {bases bases' : List Bool}\n  {m m' : Effect4.Program.NativeMachine} {cmds cmds' : List Effect4.Program.Guard.NCmd},\n  Effect4.Program.LoopCut p table bases m cmds →\n    Effect4.Program.LoopCut p table bases' m' cmds' →\n      bases.IsPrefix bases' →\n        ∀ {c c' : Effect4.Program.Guard.NCmd},\n          List.instMembership.mem cmds c →\n            List.instMembership.mem cmds' c' →\n              ∀ {id : Effect4.FiberId},\n                Effect4.Machine.Steps id c →\n                  Effect4.Machine.Steps id c' →\n                    ∀ {f g : Effect4.Program.Guard.NFiber},\n                      Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n                        Eq (Effect4.Machine.RunMachine.fiber? m' id) (Option.some g) →\n                          ∀ {above : List Effect4.Program.NCode},\n                            Eq\n                                (g.frame\n                                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                      Effect4.FiberId Effect4.Machine.Ann)\n                                    (Effect4.FrameFiber Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann)).stack\n                                (instHAppendOfAppend.hAppend above\n                                  (f.frame\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)).stack) →\n                              ∀ (demand : Effect4.Arm) (skip : Bool)\n                                (cause : Option Effect4.Machine.CauseV),\n                                Eq\n                                    (((g.frame\n                                                (Effect4.Prim Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)\n                                                (Effect4.FrameFiber Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)).own\n                                            above).getCont\n                                        demand skip cause).answer\n                                    Effect4.ContAnswer.empty →\n                                  (f.frame\n                                        (Effect4.Prim Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)\n                                        (Effect4.FrameFiber Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)).RegionEnds\n                                    (g.frame\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann))\n                                    above demand skip cause","withinSemanticAxiomCeiling":true}},"title":"A region of a compiled program ends at its entry's stack and at its entry flag, for an arbitrary body: at two cuts of one command loop's run where a pending command steps the fiber, the later cut's stack shape above ++ below is a premise, and it is the region's only mark on the machine; the theorem then gives the entry's stack and the entry flag at the region's end, which is the fiber that the pop of the own frames leaves where no own frame answers, and the pop goes on from it; it does not give that a body's run keeps that shape (the run-level half of saved-mask-restoration; no premise on an exit, by stepped-fiber-live; no cleanup, no release count, no delivery, no budget, no liveness; nothing of a region whose fiber exits inside it; the client premise of the mask's derived form stays: nothing acquired or registered before the body begins, decisions rows 227, 244 to 246)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"stepped-fiber-live","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**At each cut of a compiled command loop, a fiber that a pending command steps has not\nexited** (the proposed registry claim `stepped-fiber-live`; concept\n`scope-lifetime-finalization`, requirement R11). The guard's queue gives the fiber of each\npending `Cmd.loop` and `Cmd.deliver` as running and not parked, and the guard's state gives each\nexited fiber as not running. It is the second fact of the bracket, and its own source.\n\nSo no compiled program reaches a machine where the command loop steps an exited fiber. The\ninvariant `MaskRuns` ranges over the live fibers for that machine's sake\n(`Laws/Machine/MaskRuns.lean`).\n\nReach: every program and row table, and each machine and pending commands that hold the guard's\nstate and the guard's queue. `Guard.driveStep_invariants` keeps both along a command loop, and\n`Guard.guardState_reachable` gives the state at each reachable machine.\n\nIt does not establish that a fiber is stepped, and it gives nothing of a fiber that no pending\ncommand steps. The statement is false at a hand-written interpreter: there the command loop\nsteps an exited fiber, and `Test/Machine/MaskBracket.lean` holds two such cuts.\n\nIts consumers are `compiled_region_bracket`, and each law that reads a fiber at its own step. ","levels":[],"module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.stepped_live","restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  {m : Effect4.Program.NativeMachine} {cmds : List Effect4.Program.Guard.NCmd},\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue p table m cmds →\n      ∀ {c : Effect4.Program.Guard.NCmd},\n        List.instMembership.mem cmds c →\n          ∀ {id : Effect4.FiberId},\n            Effect4.Machine.Steps id c →\n              ∀ {f : Effect4.Program.Guard.NFiber},\n                Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n                  Eq\n                    (f.exit\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    Option.none","withinSemanticAxiomCeiling":true}},"title":"At each cut of a compiled command loop, a fiber that a pending command steps has not exited: the guard's queue gives the fiber of each pending Cmd.loop and Cmd.deliver as running, and the guard's state gives each exited fiber as not running (every program and row table, each machine and pending commands that hold GuardState and GuardQueue; false at a hand-written interpreter; no statement that a fiber is stepped, and nothing of a fiber that no pending command steps)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"pool-return-front","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A return puts its item at the front, and it keeps every item.** Where the lease holds\nthe item, the item's stamp joins the front of the idle stamps, the lease returned, and a wake\nis owed exactly when a waiter is enrolled. Every item stays, with its resource: a return\nfinalizes nothing. After it the lease holds no item. Consumer: the proposed claim\n`pool-lease-return`. It states one transition, and nothing about a finalizer's run. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_front","restsOn":[],"statement":"∀ {s : Effect4.Pool.Model.State} {i l : Nat},\n  Eq (s.items.any fun x => x.heldBy i l) Bool.true →\n    And (Eq (Effect4.Pool.Model.giveBack s i l).fst.available (List.cons i s.available))\n      (And\n        (Eq (Effect4.Pool.Model.giveBack s i l).snd\n          { fst := Bool.true, snd := s.waiters.isEmpty.not })\n        (And\n          (Eq\n            (List.map (fun it => { fst := it.stamp, snd := it.resource })\n              (Effect4.Pool.Model.giveBack s i l).fst.items)\n            (List.map (fun it => { fst := it.stamp, snd := it.resource }) s.items))\n          (Eq ((Effect4.Pool.Model.giveBack s i l).fst.items.any fun x => x.heldBy i l)\n            Bool.false)))","withinSemanticAxiomCeiling":true}},"title":"A return of a lease that holds its item puts the item at the front of the idle items, keeps every item, and leaves the lease holding nothing (a helper of pool-lease-return; no finalizer's run)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"pool-return-once","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A lease returns at most once.** After a return of a lease, a second return of the same\nlease changes nothing and owes no wake, whatever the first one did. Consumer: the proposed\nclaim `pool-lease-return`. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_once","restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (i l : Nat),\n  Eq (Effect4.Pool.Model.giveBack (Effect4.Pool.Model.giveBack s i l).fst i l)\n    { fst := (Effect4.Pool.Model.giveBack s i l).fst,\n      snd := { fst := Bool.false, snd := Bool.false } }","withinSemanticAxiomCeiling":true}},"title":"A second return of one lease changes nothing in Pool's model, and it owes no wake (a helper of pool-lease-return, from pool-return-front; the model's step only: no program and no finalizer's run)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"pool-close-refuses","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"**After the close's first step no lease begins.** The step leaves a closing pool, it tells\nwhether it began the close, and its count is the count of the waiters. At a closing pool every\nlease is refused, and a refused lease changes no item, no idle stamp and no stamp of a lease.\nNo transition opens the pool again (`step_closing`). Consumer: the proposed claim\n`pool-close-waits`. It states no wait for a lease, no finalizer's run and no completed\nclose. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.close_refuses","restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State),\n  And (Eq (Effect4.Pool.Model.close s).fst.closing Bool.true)\n    (And (Eq (Effect4.Pool.Model.close s).snd { fst := s.closing.not, snd := s.waiters.length })\n      (∀ (id : Nat),\n        Eq (Effect4.Pool.Model.lease (Effect4.Pool.Model.close s).fst id)\n          { fst := Effect4.Pool.Model.withdraw (Effect4.Pool.Model.close s).fst id,\n            snd := { fst := Bool.true, snd := Option.none } }))","withinSemanticAxiomCeiling":true}},"title":"After the close's first step of Pool's model every lease is refused, and a refused lease changes no item (a helper of pool-close-waits; no wait for a lease and no finalizer's run; decisions row 268)"},{"concept":"scope-lifetime-finalization","contestedBy":[],"id":"pool-drain-waits","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The closer's step answers true exactly where no lease is outstanding** (decisions rows\n268 and 276, point 2). It enrols the closer exactly otherwise: the closer's own entry leaves\nfirst, so an entry after the step is this step's enrolment. The check and the enrolment are one\ntransition, so each later return finds a waiter. The step changes the waiters alone: it frees no\nitem, and it finalizes none. Consumer: the proposed claim `pool-close-waits`. It states one\ntransition. It states no wait along a run, no progress of the closer and no finalizer's run. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_waits","restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (id : Nat),\n  And\n    (Iff (Eq (Effect4.Pool.Model.drain s id).snd Bool.true)\n      (Eq (Effect4.Pool.Model.leases s) List.nil))\n    (And\n      (Iff (List.instMembership.mem (Effect4.Pool.Model.drain s id).fst.waiters id)\n        (Ne (Effect4.Pool.Model.leases s) List.nil))\n      (Eq (Effect4.Pool.Model.drain s id).fst\n        { items := s.items, available := s.available,\n          waiters := (Effect4.Pool.Model.drain s id).fst.waiters, closing := s.closing,\n          next := s.next }))","withinSemanticAxiomCeiling":true}},"title":"The closer's step of Pool's model answers that the pool is drained exactly when no lease is outstanding, it enrols the closer exactly otherwise, and it changes the waiters alone (a helper of pool-close-waits; one transition: no wait along a run, no progress of the closer and no finalizer's run; decisions rows 268 and 276)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"machine-typed-not-halted","literature":[{"locator":"ch. 28, §28.2, p. 263","relation":"adaptedResult","work":"PFPL"}],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"A halted machine is outside `J` (row 139; probe C's `typedState_halt`, read at `J`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineTyped_not_halted","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (w : Effect4.Program.Typed.World) (m : Effect4.Program.Sched.RState)\n  (why : Effect4.Machine.Stuck),\n  Not (Effect4.Program.Typed.MachineTyped root rootTy w (Effect4.Machine.RunMachine.halt m why))","withinSemanticAxiomCeiling":true}},"title":"Halted machine configuration outside MachineTyped invariant"},{"concept":"reactive-scheduling","contestedBy":[],"id":"flush-fair","literature":[{"locator":"audit C4","relation":"proofTechnique","work":"LynchVaandrager1995"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"LIVE/fair: under enough command fuel for the initial queue, every initially\narmed owner is entered within its length in rounds, even if callbacks rearm. ","levels":["u","v"],"module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.flush_fair","restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St) (fuel rounds : Nat)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St),\n  (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n        (Effect4.FrameEvent ν σ β ε δ ι α)).Nodup →\n    Eq\n        (Effect4.Machine.Scheduling.FlushReady interp fuel\n          (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n              (Effect4.FrameEvent ν σ β ε δ ι α)).length\n          m)\n        Bool.true →\n      instLENat.le\n          (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n              (Effect4.FrameEvent ν σ β ε δ ι α)).length\n          rounds →\n        ∀ (owner : Effect4.FiberId),\n          List.instMembership.mem\n              (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n                (Effect4.FrameEvent ν σ β ε δ ι α))\n              owner →\n            Eq (Effect4.Machine.Scheduling.FiredWithin interp fuel rounds m owner) Bool.true","withinSemanticAxiomCeiling":true}},"title":"Every initially armed owner in a duplicate-free queue is entered within its length in rounds"},{"concept":"reactive-scheduling","contestedBy":[],"id":"random-descent","literature":[],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Every complete tape has the same length and an `R`-equal end.** The pointer of the claim\n`random-descent`. ","levels":["u","v"],"module":"Effect4.Laws.Machine.Descent","name":"Effect4.Machine.Descent.complete_unique","restsOn":[],"statement":"∀ {S : Type u} {D : Type v} {step : S → D → Option S} {R : S → S → Prop},\n  Equivalence R →\n    Effect4.Machine.Descent.Bisim step R →\n      Effect4.Machine.Descent.Diamond step R →\n        ∀ {s t1 t2 : S} {c1 c2 : List D},\n          Eq (Effect4.Machine.Descent.run step s c1) (Option.some t1) →\n            Effect4.Machine.Descent.Terminal step t1 →\n              Eq (Effect4.Machine.Descent.run step s c2) (Option.some t2) →\n                Effect4.Machine.Descent.Terminal step t2 → And (R t1 t2) (Eq c1.length c2.length)","withinSemanticAxiomCeiling":true}},"title":"Under a bisimulation that is an equivalence, and the local diamond up to it, every complete tape of a step labelled by decisions has one length and an equal end; one complete tape bounds every tape. Nothing of the machine: the checked fragment of decisions row 361 is its use"},{"concept":"reactive-scheduling","contestedBy":[{"id":"E4-TYPED-CE-025","record":"| `E4-TYPED-CE-025` | REPAIRED 2026-10-03 (row 134 (b), the waiter column `MachineWide.waiters`; the refuted goals `M6Ledger.step_loop` and `step_deliver` are proved over it: `loop_preserves`, `deliver_preserves`, `Typed/Commands/Clauses/All.lean`, `053aa3d9`, `[propext, Quot.sound]`); SEEDED 2026-10-01 (seat D3, `5789df56`, merged `7d50cfe6`; kernel-checked at `[propext, Quot.sound]`) | `StepPreserves` for `loop` and `deliver` is false: completing a Deferred owes its waiters the completion at tokens no clause relates to the cell | `docs/research/2026-10-01-landing/seat-D3/probes/LoopDeliver.lean`: `loop_false`, `deliver_false` | row 134 (b): a waiter column in `J` (ruled; seat D5) |","registerStatus":"REPAIRED","witness":null}],"id":"step-loop-preserves","literature":[{"locator":"audit P36","relation":"adaptedResult","work":"WrightFelleisen1994"}],"role":"preservation","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**`loop` keeps `I`** (`loop_preserves`): every clause, the walk. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.loop_preserves","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (id : Effect4.FiberId) (y : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.loop id y)","withinSemanticAxiomCeiling":true}},"title":"The loop decision preserves configuration typing"},{"concept":"reactive-scheduling","contestedBy":[{"id":"E4-TYPED-CE-025","record":"| `E4-TYPED-CE-025` | REPAIRED 2026-10-03 (row 134 (b), the waiter column `MachineWide.waiters`; the refuted goals `M6Ledger.step_loop` and `step_deliver` are proved over it: `loop_preserves`, `deliver_preserves`, `Typed/Commands/Clauses/All.lean`, `053aa3d9`, `[propext, Quot.sound]`); SEEDED 2026-10-01 (seat D3, `5789df56`, merged `7d50cfe6`; kernel-checked at `[propext, Quot.sound]`) | `StepPreserves` for `loop` and `deliver` is false: completing a Deferred owes its waiters the completion at tokens no clause relates to the cell | `docs/research/2026-10-01-landing/seat-D3/probes/LoopDeliver.lean`: `loop_false`, `deliver_false` | row 134 (b): a waiter column in `J` (ruled; seat D5) |","registerStatus":"REPAIRED","witness":null}],"id":"step-deliver-preserves","literature":[],"role":"preservation","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**`deliver` keeps `I`** (`deliver_preserves`): every clause, the walk. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.deliver_preserves","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (id : Effect4.FiberId) (y : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.deliver id y)","withinSemanticAxiomCeiling":true}},"title":"The deliver decision preserves configuration typing"},{"concept":"reactive-scheduling","contestedBy":[],"id":"store-frame-typing","literature":[{"locator":"§4.2.4 (frame rule); audit P8","relation":"analogy","work":"deVilhenaPottier2021"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A store edit keeps `I`** at the world over the edited store (`note.md` §4): the views\n`J` reads move as the frame says, and the new store states its own clauses (well-formedness, the\ngenerated store typing, no new internal key, owners for its scheduled due entries). ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.configTyped_frame","restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {rootTy : Effect4.Program.EffTy}\n  {w : Effect4.Program.Typed.World} {m : Effect4.Program.Sched.RState}\n  {q : List Effect4.Program.Sched.RCmd},\n  Effect4.Program.Typed.ConfigTyped root rootTy w m q →\n    ∀ {s : Effect4.Machine.Stores},\n      Effect4.Program.Typed.StoreFrame m.state s →\n        s.WF →\n          Effect4.Program.Typed.StoresOk (Effect4.Program.Typed.preds root)\n              { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                serviceTy := w.serviceTy }\n              Effect4.Program.Typed.Expect.root s →\n            List.instHasSubset.Subset\n                (Effect4.Program.Guard.internalKeys\n                  { fibers := m.fibers, races := m.races, nextId := m.nextId,\n                    nextToken := m.nextToken, nextRace := m.nextRace,\n                    middlewareInstalled := m.middlewareInstalled, armed := m.armed, state := s,\n                    trace := m.trace, stuck := m.stuck, forks := m.forks })\n                (Effect4.Program.Guard.internalKeys m) →\n              (∀\n                  (o :\n                    Effect4.Machine.Owed\n                      (Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err\n                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)),\n                  List.instMembership.mem\n                      (s.deferreds.due\n                        (Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err\n                          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n                      o →\n                    ∀ (owner : Effect4.FiberId) (priority : Nat),\n                      Eq o.mode (Effect4.Machine.WakeMode.scheduled owner priority) →\n                        Eq (Effect4.Machine.RunMachine.fiber? m owner).isSome Bool.true) →\n                And\n                  (w.leHost\n                    { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                      serviceTy := w.serviceTy })\n                  (Effect4.Program.Typed.ConfigTyped root rootTy\n                    { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                      serviceTy := w.serviceTy }\n                    { fibers := m.fibers, races := m.races, nextId := m.nextId,\n                      nextToken := m.nextToken, nextRace := m.nextRace,\n                      middlewareInstalled := m.middlewareInstalled, armed := m.armed, state := s,\n                      trace := m.trace, stuck := m.stuck, forks := m.forks }\n                    q)","withinSemanticAxiomCeiling":true}},"title":"A store edit satisfying the stated frame, store typing, key and due-owner premises keeps configuration typing"},{"concept":"reactive-scheduling","contestedBy":[],"id":"waiter-completion-typing","literature":[{"locator":"§3.3 (protocol subsumption); audit P8","relation":"proofTechnique","work":"deVilhenaPottier2021"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The waiter → due transfer** (`note.md` §3): a waiter declared at a type that accepts its\ncell's columns accepts any completion the cell holds, the cell's completion moving along both\ncolumns (`fitsExit_sub`; a delayed read along the checker's order, `Ty.sub_le_subN`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.completionStrong_await","restsOn":[],"statement":"∀ {w : Effect4.Program.Typed.World} {a e : Effect4.Program.Ty} {ty : Effect4.Program.EffTy}\n  {c :\n    Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n      Effect4.FiberId Effect4.Machine.Ann},\n  Effect4.Program.Typed.AwaitDemand a e ty →\n    Effect4.Program.Typed.CompletionStrong w\n        { answer := a, error := e, requires := Effect4.Machine.Env.Requirement.empty } c →\n      Effect4.Program.Typed.CompletionStrong w ty c","withinSemanticAxiomCeiling":true}},"title":"A completion fitting its cell's columns meets a waiter's declared answer and error demand"},{"concept":"reactive-scheduling","contestedBy":[],"id":"step-wake-preserves","literature":[{"locator":"§6 (invariants); audit C4","relation":"proofTechnique","work":"LynchVaandrager1995"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`wake` keeps `I`** at the world over the woken store. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.wake_preserves","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (list : Effect4.Machine.WakeKey) (phase : Effect4.Machine.WakePhase),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.wake list phase)","withinSemanticAxiomCeiling":true}},"title":"The wake command keeps configuration typing through its waiter-to-due transfer"},{"concept":"reactive-scheduling","contestedBy":[{"id":"E4-TYPED-CE-029","record":"| `E4-TYPED-CE-029` | REPAIRED 2026-10-03 (row 134 (e), fresh-bounded fiber ids; the refuted goal `M6Ledger.step_launch` is proved over it: `launch_preserves`, `Typed/Commands/Launch.lean`); SEEDED 2026-10-01 (seat D3, `5789df56`, merged `7d50cfe6`; kernel-checked at `[propext, Quot.sound]`) | `StepPreserves` for `launch` is false: a race's live set may name the next fiber id | `docs/research/2026-10-01-landing/seat-D3/probes/Races.lean`: `Launch.launch_false` | row 134 (e): fresh-bounded fiber ids (ruled; seat D5) |","registerStatus":"REPAIRED","witness":null}],"id":"step-launch-preserves","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`launch` keeps `I`** (`Machine/Fibers.lean:1879-1896`, rc.112 `:1520-1528`): the entrant is\nallocated at the old `nextId` and declared at the race's result type (its program, typed at a\ntype whose columns are below it, widened there; closed because the race token's declaration is),\nthe race loses that program, and the entrant's evaluation and enrollment are queued ahead of the\nnext launch. Every other arm leaves the machine and drops the head. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Launch","name":"Effect4.Program.Typed.launch_preserves","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (raceId : Nat),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.launch raceId)","withinSemanticAxiomCeiling":true}},"title":"The launch command keeps configuration typing when adding a fresh race entrant"},{"concept":"reactive-scheduling","contestedBy":[],"id":"step-registration-done-preserves","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`registrationDone` keeps `I`** at the same world (Concept 4, scheduler step preservation;\n`Machine/Fibers.lean:1912-1931`). The head's authority names the race and its running, unparked\nhost on the race's marker; `RegistrationState` gives the race token's declared type `resultTy`\nand a host stack accepting it (`StackReply`); `RaceOk` gives the race column at that type\n(`RacePayload`), which does not read `registering`. An accepted exit is typed by the column and\ninstalled as `raceSettle` (`raceSettle_typed`) under the queued `loop`. With no answer the cancel\nframe is pushed (`stackAccepts_raceFinalizer`): a deferred interrupt clears the park and the\nqueued `loop` reads the marker, which `ReadCode` leaves to `RegistrationState`; otherwise the host\nparks idle at the race key with a `void` record, which no observer reads (decisions row 134 (d);\n`configTyped_rupdate_park`), and the race retains its declared token. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Registration","name":"Effect4.Program.Typed.registrationDone_preserves","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (raceId : Nat)\n  (yielding : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy\n    (Effect4.Machine.Cmd.registrationDone raceId yielding)","withinSemanticAxiomCeiling":true}},"title":"Completing race registration keeps configuration typing through immediate settlement or parking"},{"concept":"reactive-scheduling","contestedBy":[],"id":"drivestate-lift","literature":[{"locator":"ch. 28, pp. 261–268","relation":"proofTechnique","work":"PFPL"}],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Lift 1, the command loop.** One fact per command gives the fact for `driveState` at every\nfuel, machine and pending list, at some later world. ","levels":["u","v","w"],"module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_lift","restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  {κ φ η : Type (max u v)} [inst_4 : Effect4.Machine.FiberCore ν β ε δ ι α κ φ]\n  [inst_5 : Effect4.Machine.FiberEvaluator ν σ β ε δ ι α χ St κ φ η] {W : Type w}\n  (o : Effect4.Laws.Effects.WorldOrder W) (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St κ)\n  (I :\n    W →\n      Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η →\n        List (Effect4.Machine.Cmd ν σ β ε δ ι α κ) → Prop),\n  Effect4.Machine.Lift.StepKeeps o interp I →\n    ∀ (fuel : Nat) (w : W) (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η)\n      (cmds : List (Effect4.Machine.Cmd ν σ β ε δ ι α κ)),\n      I w m cmds →\n        Exists fun w' =>\n          And (o.le w w')\n            (I w' (Effect4.Machine.driveState interp fuel m cmds).fst\n              (Effect4.Machine.driveState interp fuel m cmds).snd)","withinSemanticAxiomCeiling":true}},"title":"Command loop invariant lifting for driveState"},{"concept":"reactive-scheduling","contestedBy":[],"id":"typed-state-admitted","literature":[],"role":"preservation","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**Every admitted replay of a checked program is typed**: the reference replay of a tape whose\nhost answers are admitted (`AdmittedTape`, the ghost admission at `Θ`) ends in `J`, for every\nchecked closed program, with row 117's empty requirement row at the load. M5\n(`load_typed`) and M6 (`decision_preserves`) through `admitted_typed`. Concept 4\n(`typed-state-reachable`); it reduces the host lane's typing half (T4) to executable admission\n(`admit_sound`, decisions rows 97–99). ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.reachable_typed","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      ∀ (tape : List Effect4.Api.Decision),\n        Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n          Exists fun w =>\n            Effect4.Program.Typed.MachineTyped root rootTy w\n              (Effect4.Machine.ReplayResult.machine\n                (Effect4.Program.Sched.replayR root.program fuel tape))","withinSemanticAxiomCeiling":true}},"title":"Every admitted replay of a checked program ends in J: host answers admitted at the ghost token table keep the typed state"},{"concept":"reactive-scheduling","contestedBy":[],"id":"run-work-selection","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The selected control belongs to the declared two-choice policy. ","levels":[],"module":"Effect4.Laws.Run","name":"Effect4.Run.nextControl_spec","restsOn":[],"statement":"∀ (s : Effect4.Run) (decision : Effect4.Api.Decision),\n  Iff (Eq s.nextControl (Option.some decision))\n    (And\n      (Eq\n        (s.machine.stuck\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        Option.none)\n      (Or (And (Eq decision Effect4.Api.flush) (Ne s.work.queued List.nil))\n        (Exists fun fiber =>\n          And (Eq decision (Effect4.Machine.RunDecision.evaluate fiber))\n            (And (Eq s.work.queued List.nil) (Eq s.work.runnable.head? (Option.some fiber))))))","withinSemanticAxiomCeiling":true}},"title":"The opt-in control planner selects exactly a queued flush or the first runnable evaluation on a non-stuck machine"},{"concept":"reactive-scheduling","contestedBy":[],"id":"scheduler-progress","literature":[],"role":"progress","status":{"_tag":"absent","reason":"Operational progress is an open obligation; machineTyped_not_halted provides an invariant consequence (stuck = none) without successor existence"},"title":"Operational progress with successor transitions or live frontier classification"},{"concept":"reactive-scheduling","contestedBy":[],"id":"fair-tape-drains-armed","literature":[],"role":"adequacy","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A fair finite tape leaves nothing armed at its live end** (R12-a, the finite endpoint\nconsequence): when the whole tape suffices and its replay is not stuck, `FairTape` at the split\n`tape ++ []` asks each armed owner for a later servicing decision inside the empty suffix, so no\nowner is armed. Concept `reactive-scheduling`, claim `fair-tape-drains-armed`. Reach: one finite\ntape, at any interpreter and fuel. It does not establish liveness on infinite tapes, termination,\nhost progress, general scheduler fairness (`flush_fair` permits rearming), or that the frontier\nnames the remaining waits (R12-b). It serves R12 as the finite half of \"liveness under\n`FairTape`\". ","levels":["u","v"],"module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fairTape_unarmed","restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St) (fuel : Nat)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St)\n  (tape : List (Effect4.Machine.RunDecision ν σ β ε δ ι α)),\n  Effect4.Machine.Scheduling.FairTape interp fuel m tape →\n    Eq (Effect4.Machine.Suffices interp fuel tape m) Bool.true →\n      Eq\n          ((Effect4.Machine.replayEval interp fuel tape m).machine.stuck\n            (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n            (Effect4.FrameEvent ν σ β ε δ ι α))\n          Option.none →\n        Eq\n          ((Effect4.Machine.replayEval interp fuel tape m).machine.armed\n            (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n            (Effect4.FrameEvent ν σ β ε δ ι α))\n          List.nil","withinSemanticAxiomCeiling":true}},"title":"A fair finite tape that suffices leaves no armed owner at its live end (R12-a: the finite endpoint consequence of FairTape's final prefix; not general fairness, not infinite tapes)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"frontier-names-work","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**R12-b: at a live, unfinished machine, the tape frontier is empty exactly at a deadlock.**\nSo the frontier names a reason whenever work is armed (`E4-SCHED-CE-021`, repaired by decisions\nrow 201 (b)).\n\nConcept `reactive-scheduling`, claim `frontier-names-work`: the frontier half of the\nclassification that `scheduler-progress` asks for. Reach: every frame machine (`NativeMachine`),\nwith no reachability or typing premise, at the tape exhaustion site; a fuel frontier always names\n`.commandFuel` (`commandFuel_iff`). It does not establish that the named decision steps the\nmachine, what any decision does at a deadlocked machine, or liveness (R12-c). It serves R12:\n`Deadlocked` requires nothing armed. ","levels":[],"module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.frontier_empty_iff_deadlocked","restsOn":[],"statement":"∀ (m : Effect4.Program.NativeMachine),\n  Eq\n      (m.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq (Effect4.Machine.RunMachine.finished m) Bool.false →\n      Iff (Eq (Effect4.Api.frontierReasons Effect4.Machine.Exhaustion.tape m) List.nil)\n        (Effect4.Api.Deadlocked m)","withinSemanticAxiomCeiling":true}},"title":"R12-b: at a live, unfinished machine whose tape ran out, the frontier is empty exactly at a deadlock: nothing runnable, nothing armed, no host request, no timer, no compile budget (not progress, not liveness)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"decision-keeps-typed","literature":[],"role":"preservation","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**A tape decision keeps `J`** (`decision_preserves`): the command facts and the six\nedits through the decision lift (`decisionKeeps_of_ledger`). ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.decision_preserves","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (d : Effect4.Api.Decision), Effect4.Program.Typed.DecisionKeeps root rootTy fuel d","withinSemanticAxiomCeiling":true}},"title":"M6b: one tape decision keeps J when its host answer, if any, is admitted"},{"concept":"reactive-scheduling","contestedBy":[],"id":"fair-scheduling","literature":[{"locator":"chs. 39–41, pp. 371–406","relation":"excludedFeature","work":"PFPL"}],"role":"adequacy","status":{"_tag":"absent","reason":"Weak fairness progress is open (R12; decisions row 86)"},"title":"Progress under weak fairness"},{"concept":"reactive-scheduling","contestedBy":[],"id":"queue-step-capacity","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Abstract positive-capacity suspend steps keep the configuration and buffer bound.\nConsumer: the later Queue term-to-model refinement. No wrapper or host claim. The proof does not\nuse `_hpos`. ","levels":[],"module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.positive_suspend_step_capacity","restsOn":[],"statement":"∀ (c : Nat) (s : Effect4.Queue.Model.State) (op : Effect4.Queue.Model.Op),\n  instLTNat.lt 0 c →\n    Eq s.capacity (Option.some c) →\n      Eq s.strategy Effect4.Queue.Model.Strategy.suspend →\n        instLENat.le s.messages.length c →\n          have next := (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none { s := s } op).s;\n          And (Eq next.capacity (Option.some c))\n            (And (Eq next.strategy Effect4.Queue.Model.Strategy.suspend)\n              (instLENat.le next.messages.length c))","withinSemanticAxiomCeiling":true}},"title":"One step of the Queue's abstract model under suspend keeps the capacity, the strategy and the buffer's bound (a helper of queue-expansion-agrees on its abstract client's side; lengths in the natural-number model, no delivery and no target; decisions rows 219, 233 and 255)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"queue-first-profile-closed","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The first profile is closed.** Each first operation of the model leaves a state of the\nprofile, when its request keeps the premise. Consumer: each step goal of the Queue's\nterm-to-model refinement, along a run. No wrapper or host claim. ","levels":[],"module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.first_profile_closed","restsOn":[],"statement":"∀ (s : Effect4.Queue.Model.State) (op : Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstProfile s →\n    Eq (Effect4.Queue.Model.firstOp op) Bool.true →\n      Effect4.Queue.Model.Requested s op →\n        Effect4.Queue.Model.FirstProfile\n          (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none { s := s } op).s","withinSemanticAxiomCeiling":true}},"title":"Each first operation of the Queue's abstract model keeps the first profile, when its request keeps the step's premise (a helper of queue-expansion-agrees: the domain of the step goals; no agreement of a term with the model; decisions rows 219, 233 and 255)"},{"concept":"store-typing","contestedBy":[],"id":"semaphore-profile-closed","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The first profile is closed.** Each transition of the model leaves a state of the\nprofile. No premise names the request: a take removes its own entry first, and a release is\ntotal. Consumer: the public law, along a run. It establishes nothing about a program, and no\nprogress of a waiter. ","levels":[],"module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.profile_closed","restsOn":[],"statement":"∀ (s : Effect4.Semaphore.Model.State) (op : Effect4.Semaphore.Model.Op),\n  Effect4.Semaphore.Model.Profile s →\n    Effect4.Semaphore.Model.Profile (Effect4.Semaphore.Model.step s op)","withinSemanticAxiomCeiling":true}},"title":"Each transition of Semaphore's abstract model keeps the first profile, with no premise on its request (the model's half of semaphore-accounting-preserved; nothing about a program, and no progress of a waiter; decisions rows 259 to 261 and 265)"},{"concept":"store-typing","contestedBy":[],"id":"waiting-wrapper-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The loop at a caller's restore answers the result**, where the module's part is typed and\nthe caller's restore keeps what its argument answers, at every scope that the surface's binders\nreach. The result type is its own normal form. ","levels":[],"module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetryAt_answers","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable}\n  {restore :\n    Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n      Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {result : Effect4.Program.Ty} {ended : String} {w : Effect4.Modules.Waiter}\n  {s : Effect4.Modules.TypedScope} {F : Effect4.Program.Ty},\n  Eq result.normalize result →\n    (∀ (t : Effect4.Modules.TypedScope)\n        (inner : Effect4.Program.Authoring.Src Effect4.Program.NativeOp) (Y : Effect4.Program.Ty),\n        s.Reaches t →\n          Effect4.Modules.Answers (Effect4.Program.nativeSignature table) inner t Y →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (restore inner) t Y) →\n      Effect4.Modules.Waiter.Typed table w s result F →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n          (Effect4.Modules.waitRetryAt restore result ended w) s result","withinSemanticAxiomCeiling":true}},"title":"The waiting wrapper at a caller's restore answers its result type at every typed scope, when the module's part is typed: its attempt answers the join of what its two exits answer, and its withdrawal answers a type; the wrapper with no loop answers its hint's type from the same part, with no premise on that type (waitAnswer_answers, HintTy.canonical) (the shared typing of a module that waits, decisions row 275, point 3; its users are Semaphore's take and its protected form, and the Queue's take and offer; a result type in normal form; no run)"},{"concept":"store-typing","contestedBy":[],"id":"protected-form-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The protected body has its body's effect type**, with the failure type in normal form.\nThe acquisition answers a type with no failure, for every restore function that keeps what its\nargument answers. The body has one effect type for every kept reader of the acquired value: it\nmay fail, and it may require a service. The release answers a type with no failure, under the\nbody's exit. ","levels":[],"module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.protectedBy_has","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable}\n  {acquire :\n    (Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n        Effect4.Program.Authoring.Src Effect4.Program.NativeOp) →\n      Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {release body :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {s : Effect4.Modules.TypedScope} {G F : Effect4.Program.Ty} {b : Effect4.Program.EffTy},\n  (∀\n      (restore :\n        Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n          Effect4.Program.Authoring.Src Effect4.Program.NativeOp),\n      (∀ (t : Effect4.Modules.TypedScope)\n          (inner : Effect4.Program.Authoring.Src Effect4.Program.NativeOp) (Y : Effect4.Program.Ty),\n          (s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).Reaches t →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) inner t Y →\n              Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (restore inner) t Y) →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (acquire restore)\n          (s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore) G) →\n    (∀ (got : Effect4.Program.Authoring.TermSrc),\n        Effect4.Modules.Kept (Effect4.Program.nativeSignature table) got\n            ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n              Effect4.Modules.Stem.answer G)\n            G →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table) (body got)\n            ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n              Effect4.Modules.Stem.answer G)\n            b) →\n      (∀ (got : Effect4.Program.Authoring.TermSrc),\n          Effect4.Modules.Kept (Effect4.Program.nativeSignature table) got\n              ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n                Effect4.Modules.Stem.answer G)\n              G →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (release got)\n              (((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n                    Effect4.Modules.Stem.answer G).push\n                Effect4.Modules.Stem.exit (b.answer.exitOf b.error))\n              F) →\n        Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n          (Effect4.Modules.protectedBy acquire release body) s\n          { answer := b.answer, error := b.error.normalize, requires := b.requires }","withinSemanticAxiomCeiling":true}},"title":"The protected form keeps its body's effect type: one mask over an acquisition that answers a type, a body of any effect type at the restore site, and a release that answers a type under the exit's binder; the form has the body's answer, its failure type in normal form and its requirement (decisions row 276, point 1; its users are Semaphore's two protected forms; typing only: no run, no law of the mask and no release at an exit)"},{"concept":"store-typing","contestedBy":[],"id":"pool-use-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`Pool.use` is typed at every scope**, for a body of one effect type at every kept reader\nof a resource and at every scope that the surface's binders reach. It keeps the body's answer,\nits failure type in normal form and its requirement: the lease and the return add no failure and\nno requirement. ","levels":[],"module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.use_types","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ {pool : Effect4.Program.Authoring.TermSrc}\n      {body :\n        Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n      {s : Effect4.Modules.TypedScope} {b : Effect4.Program.EffTy},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) pool s\n          (Effect4.Pool.cellTy A).refOf →\n        (∀ (t : Effect4.Modules.TypedScope) (r : Effect4.Program.Authoring.TermSrc),\n            s.Reaches t →\n              Effect4.Modules.Kept (Effect4.Program.nativeSignature table) r t A →\n                Effect4.Modules.Has (Effect4.Program.nativeSignature table) (body r) t b) →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table) (Effect4.Pool.use A pool body)\n            s { answer := b.answer, error := b.error.normalize, requires := b.requires }","withinSemanticAxiomCeiling":true}},"title":"Pool's use keeps its body's effect type at every typed scope: for a kept handle at the reference type of Pool's cell and a body of one effect type at every kept resource, the form has the body's answer, its failure type in normal form and its requirement; the lease and the return add no failure and no requirement, and the refusal at a closed pool adds none, since an interruption has no failure type (the protected form's second user; decisions rows 267, 276 and 279; a resource type in normal form whose item record and cell record are formed; typing only: no run, no law of the mask and no return at an exit)"},{"concept":"store-typing","contestedBy":[],"id":"pool-make-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`Pool.make` is typed at every scope**, for an acquisition of one effect type at every\nscope that the surface's binders reach, whose answer is the resource's type. It answers the\nhandle of a cell at Pool's cell type. Its failure type is the acquisition's, in normal form: a\nfailed acquisition fails `make`. **Its requirement is the acquisition's, with the scope's\nservice**: `make` registers the close as a finalizer of the scope that it runs in, so a pool is\nmade inside a scope. ","levels":[],"module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_types","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ (size : Nat) (positive : instLTNat.lt 0 size)\n      {acquire : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n      {s : Effect4.Modules.TypedScope} {a : Effect4.Program.EffTy},\n      Eq a.answer A →\n        (∀ (t : Effect4.Modules.TypedScope),\n            s.Reaches t → Effect4.Modules.Has (Effect4.Program.nativeSignature table) acquire t a) →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n            (Effect4.Pool.make A size acquire positive) s\n            { answer := (Effect4.Pool.cellTy A).refOf, error := a.error.normalize,\n              requires :=\n                a.requires.union\n                  (Effect4.Machine.Env.Requirement.single\n                    (Effect4.Program.nativeSignature table).scopeKey) }","withinSemanticAxiomCeiling":true}},"title":"Pool's make answers the pool's handle at every typed scope, for an acquisition of one effect type whose answer is the resource's type: its failure type is the acquisition's in normal form, so a failed acquisition fails make, and its requirement is the acquisition's with the scope's key, so a pool is made inside a scope (decisions rows 267 and 268; a positive size, and a resource type in normal form whose item record and cell record are formed; typing only: no run and no finalizer's run; an acquisition whose answer type is another type is outside the statement)"},{"concept":"store-typing","contestedBy":[],"id":"pool-close-typed","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The close is typed at every scope**: it answers nothing, it has no failure and it\nrequires nothing. So it is a release that cannot fail, and `make` registers it. ","levels":[],"module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_answers","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ {pool : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) pool s\n          (Effect4.Pool.cellTy A).refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (Effect4.Pool.close pool) s\n          Effect4.Program.Ty.unit","withinSemanticAxiomCeiling":true}},"title":"Pool's close answers the unit at every typed scope, with no failure and no requirement, for a kept handle at the reference type of Pool's cell: the close's first step, the posted wake at the counted waiters, and the closer's loop over the closer's step; so it is a release that cannot fail, and make registers it (decisions rows 268 and 276, point 2; a resource type in normal form whose item record and cell record are formed; typing only: no wait along a run, no end of the loop and no finalizer's run)"},{"concept":"store-typing","contestedBy":[],"id":"pool-profile-closed","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The first profile is closed.** Each transition of the model leaves a state of the\nprofile. No premise names the request: a lease removes its own entry first, and a return of a\nlease that holds nothing changes nothing. Consumer: the public law, along a run. It establishes\nnothing about a program, and no progress of a waiter. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.profile_closed","restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (op : Effect4.Pool.Model.Op),\n  Effect4.Pool.Model.Profile s → Effect4.Pool.Model.Profile (Effect4.Pool.Model.step s op)","withinSemanticAxiomCeiling":true}},"title":"Each transition of Pool's abstract model keeps the first profile, with no premise on its request (the model's half of pool-profile-preserved; nothing about a program, and no progress of a waiter; decisions rows 267 to 269)"},{"concept":"store-typing","contestedBy":[],"id":"pool-lease-enrols","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The enrolment rule.** Lease or enrol adds a waiter only when the pool is open and no\nitem is idle: on a state of the profile, the request is enrolled after the step exactly when\nthe pool is open and a lease holds every item. The request's own entry leaves first, so an\nentry after the step is this step's enrolment. Consumers: the lease step's agreement, and then\nthe public waiting wrapper. It is a fact of this one transition. It states no fairness and no\nliveness, and nothing about a later selection. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_enrols_iff","restsOn":[],"statement":"∀ {s : Effect4.Pool.Model.State},\n  Effect4.Pool.Model.Profile s →\n    ∀ (id : Nat),\n      Iff (List.instMembership.mem (Effect4.Pool.Model.lease s id).fst.waiters id)\n        (And (Eq s.closing Bool.false)\n          (∀ (it : Effect4.Pool.Model.Item),\n            List.instMembership.mem s.items it → Eq it.borrowed Bool.true))","withinSemanticAxiomCeiling":true}},"title":"One lease of Pool's model enrols its request exactly when the pool is open and a lease holds every item (on the profile's states; a helper of the public waiting wrapper; no fairness and no liveness)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"semaphore-visit-selects-earliest","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A visit resumes the earliest fitting waiter at or after its cursor.** On a profile\nstate, the selected waiter is enrolled, its stamp is at or after the cursor, and its count fits\nthe free count. Its stamp is the least among the waiters that are at or after the cursor and\nfit. The selected waiter leaves the list, and nothing else changes. Consumer: the waiting\nclauses of the proposed claim `semaphore-expansion-agrees`. It states one visit, and nothing\nabout a whole walk. ","levels":[],"module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_selects_earliest","restsOn":[],"statement":"∀ {s : Effect4.Semaphore.Model.State},\n  Effect4.Semaphore.Model.Profile s →\n    ∀ {cursor : Nat} {w : Effect4.Semaphore.Model.Waiter},\n      Eq (Effect4.Semaphore.Model.visit s cursor).snd (Option.some w) →\n        And (List.instMembership.mem s.waiters w)\n          (And (instLENat.le cursor w.stamp)\n            (And (instLENat.le w.need (Effect4.Semaphore.Model.free s))\n              (And\n                (∀ (u : Effect4.Semaphore.Model.Waiter),\n                  List.instMembership.mem s.waiters u →\n                    instLENat.le cursor u.stamp →\n                      instLENat.le u.need (Effect4.Semaphore.Model.free s) →\n                        instLENat.le w.stamp u.stamp)\n                (Eq (Effect4.Semaphore.Model.visit s cursor).fst\n                  { permits := s.permits, taken := s.taken, waiters := s.waiters.erase w,\n                    next := s.next }))))","withinSemanticAxiomCeiling":true}},"title":"One visit of Semaphore's model selects the earliest fitting waiter at or after its cursor, and that waiter leaves (a helper of semaphore-expansion-agrees' waiting clauses; one visit, no walk and no liveness; decisions row 259)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"semaphore-visit-stops","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A visit stops only when no permit is free or no such waiter fits.** A visit selects\nnobody exactly when the free count is zero, or each waiter at or after the cursor needs more\nthan the free count. It then changes nothing. Consumer: the waiting clauses of the proposed\nclaim `semaphore-expansion-agrees`. It states one visit, and no liveness. ","levels":[],"module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_stops_iff","restsOn":[],"statement":"∀ (s : Effect4.Semaphore.Model.State) (cursor : Nat),\n  And\n    (Iff (Eq (Effect4.Semaphore.Model.visit s cursor).snd Option.none)\n      (Or (Eq (Effect4.Semaphore.Model.free s) 0)\n        (∀ (u : Effect4.Semaphore.Model.Waiter),\n          List.instMembership.mem s.waiters u →\n            instLENat.le cursor u.stamp → instLTNat.lt (Effect4.Semaphore.Model.free s) u.need)))\n    (Eq (Effect4.Semaphore.Model.visit s cursor).snd Option.none →\n      Eq (Effect4.Semaphore.Model.visit s cursor).fst s)","withinSemanticAxiomCeiling":true}},"title":"One visit of Semaphore's model selects nobody exactly when no permit is free or no waiter at or after the cursor fits, and then it changes nothing (a helper of semaphore-expansion-agrees' waiting clauses; one visit, no walk and no liveness; decisions row 259)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"queue-first-step-invariant","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**One step of a first operation keeps the run invariant.** From every run of the invariant,\nthe model's step by a first operation whose request keeps `Requested` leaves a run of the\ninvariant. So the step keeps both flags. After it no taker stands ready without a signal. Each\nrequest that waited still waits, is the step's own, or is named by a signal.\n\nIt is the model's half of `wait-registration-no-gap` and of\n`waiting-request-obligation-preserved`. Consumer: `first_run_inv`, and then the run-level law of\nthe Queue's wrapper. The statement is of the model alone: no program, no delivery of a signal, no\nliveness and no fairness. ","levels":[],"module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_step_inv","restsOn":[],"statement":"∀ (r : Effect4.Queue.Model.Run) (op : Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstRunInv r →\n    Eq (Effect4.Queue.Model.firstOp op) Bool.true →\n      Effect4.Queue.Model.Requested r.s op →\n        Effect4.Queue.Model.FirstRunInv\n          (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none r op)","withinSemanticAxiomCeiling":true}},"title":"One step of a first operation of the Queue's abstract model keeps the run invariant of the first profile: the profile, the buffer's bound, tidy, quiet at the run's signalled, and the two flags (the model's half of wait-registration-no-gap and of waiting-request-obligation-preserved; no program, no delivery of a signal and no liveness; decisions rows 219, 233, 255 and 275)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"queue-first-run-flags","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**From the empty queue both flags hold after every list of first operations.** The model's\nbounded exploration holds both flags to a fixed depth, over more operations. This statement\nholds them at every length, on the first profile. Consumer: the run-level law of the Queue's\nwrapper. It says nothing of `close` or `shutdown`, and nothing of a delivery. ","levels":[],"module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_run_flags","restsOn":[],"statement":"∀ (c : Nat) (ops : List Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstOps { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops →\n    And\n      (Eq\n        (List.foldl (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none)\n            { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops).ok\n        Bool.true)\n      (Eq\n        (List.foldl (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none)\n            { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops).named\n        Bool.true)","withinSemanticAxiomCeiling":true}},"title":"From the empty queue of a positive capacity both flags of the Queue's abstract model hold after every list of first operations whose requests keep their premises at each prefix (the bounded exploration's two flags at every length, on the first profile; decisions rows 219, 233, 255 and 275)"},{"concept":"reactive-scheduling","contestedBy":[],"id":"pool-select-takes-first","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"**A selection takes the first waiters of the state that it finds, at most its count, and\nexactly those.** The selected identities are a prefix of the waiters, in the order of\nenrolment. They are as many as the count, or every waiter where fewer wait. They leave the\nlist, and nothing else changes: a wake reserves nothing. Consumer: the proposed claim\n`pool-wake-selection`. It states one selection, and nothing about a run. ","levels":[],"module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.select_takes_first","restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (count : Nat),\n  And\n    (Eq\n      (instHAppendOfAppend.hAppend (Effect4.Pool.Model.select s count).snd\n        (Effect4.Pool.Model.select s count).fst.waiters)\n      s.waiters)\n    (And (Eq (Effect4.Pool.Model.select s count).snd.length (instMinNat.min count s.waiters.length))\n      (Eq (Effect4.Pool.Model.select s count).fst\n        { items := s.items, available := s.available, waiters := List.drop count s.waiters,\n          closing := s.closing, next := s.next }))","withinSemanticAxiomCeiling":true}},"title":"One selection of Pool's model takes the first waiters of the state that it finds, at most its count, and it changes the waiters alone (a helper of pool-wake-selection; one selection, no run and no liveness)"},{"concept":"exact-codecs","contestedBy":[],"id":"decode-iff","literature":[{"locator":"audit P32","relation":"definitionUsed","work":"RendelOstermann2010"}],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The JSON pair is an exact embedding modulo `N_J`** (decisions row 128; `AGENTS.md`'s exact\nembedding with the normaliser `Codec.normJ`): a JSON decodes to a value exactly when it is that\nvalue's encoding up to the order of object entries. ","levels":[],"module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_iff","restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {j : Effect4.Json} {v : Effect4.Machine.Val},\n  Iff (Eq (Effect4.Schema.decode t j) (Option.some v))\n    (Exists fun j' =>\n      And (Eq (Effect4.Schema.encode t v) (Option.some j'))\n        (Eq (Effect4.Schema.Codec.normJ j') (Effect4.Schema.Codec.normJ j)))","withinSemanticAxiomCeiling":true}},"title":"Exactness of JSON decoding modulo normJ"},{"concept":"exact-codecs","contestedBy":[],"id":"decode-encode","literature":[{"locator":"audit P11","relation":"adaptedResult","work":"FosterEtAl2007"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"S-3 round trip without an arbitrary default JSON inhabitant or a failing `get!`. ","levels":[],"module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_encode","restsOn":[],"statement":"∀ {t : Effect4.Program.CTy} {v : Effect4.Machine.Val},\n  Eq (Effect4.Program.Val.hasTy v t.toRaw) Bool.true →\n    Eq (t.toRaw.isCodecValue v) Bool.true →\n      Eq ((Effect4.Schema.encode t.toRaw v).bind (Effect4.Schema.decode t.toRaw)) (Option.some v)","withinSemanticAxiomCeiling":true}},"title":"Retraction of JSON encoding on canonical types"},{"concept":"exact-codecs","contestedBy":[],"id":"of-schema-exact","literature":[{"locator":"audit P32","relation":"adaptedResult","work":"RendelOstermann2010"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Exactness of the reader, modulo `N_S`** (decisions row 128): a representation `ofSchema`\nreads is the read type's schema up to the annotation entries that change no decoding. By\n`fun_induction ofSchema`: one case per arm and branch of the reader, the refusing ones closed by\n`nomatch`. ","levels":[],"module":"Effect4.Schema.Bridge","name":"Effect4.Schema.Bridge.ofSchema_exact","restsOn":[],"statement":"∀ (r : Effect4.Representation) (t : Effect4.Program.Ty),\n  Eq (Effect4.Schema.Bridge.ofSchema r) (Option.some t) →\n    Eq (Effect4.Schema.Bridge.normS r) (Effect4.Schema.Bridge.schema t)","withinSemanticAxiomCeiling":true}},"title":"Exactness of Schema reader modulo normS"},{"concept":"exact-codecs","contestedBy":[],"id":"of-schema-schema","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Raw Schema retraction on the closed exact profile.\nThe profile excludes unsupported forms, nonstring map keys, two-item tuples, and the reserved handle id. ","levels":[],"module":"Effect4.Schema.Bridge","name":"Effect4.Schema.Bridge.ofSchema_schema","restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq t.closed Bool.true →\n    Eq (Effect4.Schema.Bridge.reservedFree t) Bool.true →\n      Eq (Effect4.Schema.Bridge.ofSchema (Effect4.Schema.Bridge.schema t)) (Option.some t)","withinSemanticAxiomCeiling":true}},"title":"Retraction of Schema generation on reserved-free types"},{"concept":"exact-codecs","contestedBy":[],"id":"collection-term-print-read","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The term round trip** (`collection-term-print-read`): a scoped term whose class\nconstructions the classes cover reads back from its printing. Since decisions row 120, part E2,\na class construction prints as `new Tag({ … })` and reads back from the module's classes, with\n`_tag` restored first (`Classes.classTag?`); placed at R8 (`translation-simulation`) as a step of\n`read_print`, and at R3 as the record terms' printed form. ","levels":[],"module":"Effect4.Laws.Codegen.ReadLeaf","name":"Effect4.Program.readTerm_printTerm","restsOn":[],"statement":"∀ {classes : Effect4.Codegen.Classes.Classes} {n : Nat} (t : Effect4.Program.Term),\n  Eq (Effect4.Program.Term.scoped n t) Bool.true →\n    Eq (Effect4.Program.Term.covers classes t) Bool.true →\n      Eq t.unannotated Bool.true →\n        Eq (Effect4.Program.readTerm classes n (Effect4.Program.printTerm n t)) (Except.ok t)","withinSemanticAxiomCeiling":true}},"title":"Every scoped term reconstructs after structural printing, including records, payload class constructions under classes that cover them (decisions row 120), and every static tuple index"},{"concept":"exact-codecs","contestedBy":[],"id":"record-codec-layout","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The JSON pair is an exact embedding modulo `N_J`** (decisions row 128; `AGENTS.md`'s exact\nembedding with the normaliser `Codec.normJ`): a JSON decodes to a value exactly when it is that\nvalue's encoding up to the order of object entries. ","levels":[],"module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_iff","restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {j : Effect4.Json} {v : Effect4.Machine.Val},\n  Iff (Eq (Effect4.Schema.decode t j) (Option.some v))\n    (Exists fun j' =>\n      And (Eq (Effect4.Schema.encode t v) (Option.some j'))\n        (Eq (Effect4.Schema.Codec.normJ j') (Effect4.Schema.Codec.normJ j)))","withinSemanticAxiomCeiling":true}},"title":"Record JSON decoding is exact under normJ; named record values retain optional presence"},{"concept":"exact-codecs","contestedBy":[],"id":"service-identifier-injective","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"At one fixed signature's scope identity, different keys have different target\nIdentifier syntax, independently of their carriers. This is a syntax theorem; the\npinned TypeScript assignment controls separately test the target interpretation. ","levels":[],"module":"Effect4.Laws.Codegen.ReadLeaf","name":"Effect4.Program.keyIdentifier_injective","restsOn":[],"statement":"∀ (scopeKey : Effect4.ServiceKey), Function.Injective (Effect4.Program.keyIdentifier scopeKey)","withinSemanticAxiomCeiling":true}},"title":"At one signature's scope key, distinct service keys print distinct target Identifier types"},{"concept":"exact-codecs","contestedBy":[],"id":"error-payload-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"A value read out of the error alphabet rebuilds the same error (`errOf` on the left\ninverse of `valOfErr`). `boom` has no image, so it is excluded by the hypothesis rather than\nby a side condition. A payload rebuilds through the last arm (`errOf_payload`). ","levels":[],"module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.errOf_valOfErr","restsOn":[],"statement":"∀ (e : Effect4.Machine.Err) (v : Effect4.Machine.Val),\n  Eq (Effect4.Program.valOfErr e) (Option.some v) → Eq (Effect4.Program.errOf v) e","withinSemanticAxiomCeiling":true}},"title":"A typed failure's record payload reads back exactly through the error image: errOf inverts valOfErr at every represented error, the handle-free record frame included (decisions row 120)"},{"concept":"exact-codecs","contestedBy":[],"id":"payload-class-decl-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The envelope admits exactly the printed class declarations** (decisions row 120, part E2):\nan admitted module's leading class declarations are the ones the printer writes for the program\nit reads to (`ClassTable.moduleClasses`), in order. Concept `exact-codecs`, claim\n`payload-class-decl-exact` (R3); with `ModuleEmission.admit`, the class section's exact\nembedding at the boundary. ","levels":[],"module":"Effect4.Laws.Codegen.Admit","name":"Effect4.Codegen.admitModule_classDecls","restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {name : String}\n  {allowed : List Effect4.Codegen.Bindings.Origin} {ambient : List TypeScript.Import}\n  {module : TypeScript.Module} {r : Effect4.Codegen.ModuleReading table name allowed ambient},\n  Eq (Effect4.Codegen.admitModule name module table allowed ambient) (Except.ok r) →\n    Eq (Effect4.Program.splitClasses module.decls).fst r.classDecls","withinSemanticAxiomCeiling":true}},"title":"An admitted module's payload class declarations are exactly the ones the printer writes for the program it reads to (decisions row 120, part E2)"},{"concept":"exact-codecs","contestedBy":[],"id":"mask-rows-table-premises","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The mask's two rows keep the table's premises** (the claim `mask-rows-table-premises`;\nconcept `exact-codecs`, requirement R8; decisions row 245).\n\nReach: program syntax. The table is the one table of `Codegen/Templates.lean`, and each\npremise is decided again by the kernel at the extended table. It does not establish typing: a\nrestore site of an ill-typed saved term reads back as well. It establishes no behaviour of a\ntarget. An annotated position prints and is not read, as before: `Readable` excludes it. Its\nconsumers are the checked module production and reading, through `read_print` and\n`read_exact`. ","levels":[],"module":"Effect4.Laws.Codegen.Mask","name":"Effect4.Program.mask_rows_table_premises","restsOn":[],"statement":"Effect4.Program.MaskRowsPremises","withinSemanticAxiomCeiling":true}},"title":"The mask's two printed rows, the getter as the mask that answers its own restore and a restore site as pipe(E, saved), have two reserved heads and keep the row table's nine decided premises at the extended table; a restore site is readable exactly when its saved term is a readable leaf and its body is readable; read_print and read_exact keep their statements (decisions row 245; program syntax only)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"subn-refl","literature":[{"locator":"§15.2, p. 182","relation":"definitionUsed","work":"TAPL"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":null,"levels":[],"module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_refl","restsOn":[],"statement":"∀ (a : Effect4.Program.Ty), Eq (a.subN a) Bool.true","withinSemanticAxiomCeiling":true}},"title":"Reflexivity of normalized subtyping"},{"concept":"subtyping-algebra","contestedBy":[],"id":"subn-trans","literature":[{"locator":"§15.2, p. 182","relation":"proofTechnique","work":"TAPL"}],"role":"transitivity","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":null,"levels":[],"module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_trans","restsOn":[],"statement":"∀ {a b c : Effect4.Program.Ty},\n  Eq (a.subN b) Bool.true → Eq (b.subN c) Bool.true → Eq (a.subN c) Bool.true","withinSemanticAxiomCeiling":true}},"title":"Transitivity of normalized subtyping"},{"concept":"subtyping-algebra","contestedBy":[],"id":"subn-equiv-iff","literature":[{"locator":"§16.3, p. 218","relation":"adaptedResult","work":"TAPL"}],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The kernel of the checker's order is equality of normal forms.** ","levels":[],"module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_equiv_iff","restsOn":[],"statement":"∀ (a b : Effect4.Program.Ty),\n  Iff (And (Eq (a.subN b) Bool.true) (Eq (b.subN a) Bool.true)) (Eq a.normalize b.normalize)","withinSemanticAxiomCeiling":true}},"title":"Kernel of subN is syntactic normal form equality"},{"concept":"subtyping-algebra","contestedBy":[],"id":"normalize-idem","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Construction is total; no checked partial constructor is needed. ","levels":[],"module":"Effect4.Program.Ty","name":"Effect4.Program.Ty.normalize_idem","restsOn":[],"statement":"∀ (t : Effect4.Program.Ty), Eq t.normalize.normalize t.normalize","withinSemanticAxiomCeiling":true}},"title":"Normalization idempotence"},{"concept":"subtyping-algebra","contestedBy":[],"id":"sub-antisymm-canonical","literature":[{"locator":"audit P6","relation":"adaptedResult","work":"Castagna2024"}],"role":"antisymmetry","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":null,"levels":[],"module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_antisymm_canonical","restsOn":[],"statement":"∀ (a b : Effect4.Program.CTy),\n  Eq (a.toRaw.sub b.toRaw) Bool.true → Eq (b.toRaw.sub a.toRaw) Bool.true → Eq a b","withinSemanticAxiomCeiling":true}},"title":"Antisymmetry of subtyping on canonical representatives CTy"},{"concept":"subtyping-algebra","contestedBy":[],"id":"template-match-complete","literature":[],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The match by bounds is complete**: a normal request below some instance of the template has\na match. The template is normal, admissible and holds no nominal reference. No premise asks where\na parameter first occurs, and none asks where `never` stands: `Ty.anchored` and `Ty.bottomFree`\n(`src/Effect4/Laws/Program/Template.lean`) are not premises. ","levels":[],"module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_complete","restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) {t r : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK t →\n    r.Normal →\n      ∀ {τ : Effect4.Program.Bounds.Subst},\n        (∀ (j : Nat) (u : Effect4.Program.Ty),\n            Eq (List.lookup j seed) (Option.some u) →\n              Eq (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var j)).normalize\n                u.normalize) →\n          Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n            Exists fun σ => Eq (Effect4.Program.Bounds.matchB seed t r) (Option.some σ)","withinSemanticAxiomCeiling":true}},"title":"The match of a template by bounds is complete: on a template that is its own normal form, is admissible and holds no nominal reference, a normal request below some instance has a match, from any seed that the instance agrees with; no premise asks where a parameter first occurs or where never stands; the match is sound by its guard (matchB_sound), its bindings are the least (matchB_least), an argument list is checked at one final list of bindings (matchArgsB_sound), and smaller arguments have a match with smaller bindings (matchArgsB_monotone); every template of the tree is in reach, as a finite check; the row check and a binder term read the match by bounds with no guard (slice UNGUARD); it does not match under a union head or a nominal reference, and it establishes nothing of tsgo's inference (decisions rows 299, 303)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"slice-lattice-minimal","literature":[],"role":"monotonicity","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The claim `slice-lattice-minimal`, as one statement**: its four parts, for one monotone\nview. A minimal valid type slice exists below each valid slice (Theorem 4.5). The descent ends at\none, below its start. A refined query has a minimal slice below a minimal slice of the wider query\n(Theorem 4.6). The join of two valid slices is valid for the join of their queries (Theorem 4.7).\nIt is the pointer that the claim's row needs, and it adds nothing to its four parts. ","levels":["u","v"],"module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.lattice_minimal","restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] [inst_4 : Max T] [Std.LawfulOrderSup T] (v : Effect4.SliceView α T),\n  And\n    (∀ {q : T} {s : Effect4.Slice α},\n      v.Valid q s → Exists fun m => And (Effect4.Slice.instLE.le m s) (v.Minimal q m))\n    (And\n      (∀ {q : T} {s : Effect4.Slice α},\n        v.Valid q s → And (Effect4.Slice.instLE.le (v.descend q s) s) (v.Minimal q (v.descend q s)))\n      (And\n        (∀ {q₁ q₂ : T} {m₂ : Effect4.Slice α},\n          inst.le q₁ q₂ →\n            v.Minimal q₂ m₂ →\n              Exists fun m₁ => And (Effect4.Slice.instLE.le m₁ m₂) (v.Minimal q₁ m₁))\n        (∀ {q₁ q₂ : T} {a b : Effect4.Slice α},\n          v.Valid q₁ a →\n            v.Valid q₂ b → v.Valid (inst_4.max q₁ q₂) (Effect4.Slice.instMax.max a b))))","withinSemanticAxiomCeiling":true}},"title":"For a monotone map from the type slices of one program to a preorder of types: a minimal valid slice exists below each valid slice, the one-pass descent ends at one below its start, a refined query has a minimal slice below a minimal slice of the wider query, and the join of two valid slices is valid for the join of their queries; no statement names Eff, Ty or the checker (decisions rows 282, 286)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"union-rule-lift","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The claim `union-rule-lift`, as one statement**: its five parts of the brief, for one\nmember rule. The lifted rule answers the least answer at `never`. At a normal type that is one\nunion member it is the member rule, up to the join with the least answer. Two types with one\nnormal form have one answer. A member rule that is monotone in the order lifts to a monotone\nrule. A property of a value and an answer that the join keeps on each side passes from the\nunion members to the lifted rule. It is the pointer that the claim's row needs, and it adds\nnothing to its parts. `lift_all`, `lift_upper` and `lift_least` stand beside it. ","levels":[],"module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_laws","restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] (rule : Effect4.Program.Ty → Option α),\n  And (Eq (Effect4.Program.UnionRule.lift rule Effect4.Program.Ty.never) (Option.some inst.bot))\n    (And\n      (∀ {t : Effect4.Program.Ty},\n        t.Normal →\n          Eq t.isMember Bool.true →\n            Eq (Effect4.Program.UnionRule.lift rule t) (Option.map (inst.join inst.bot) (rule t)))\n      (And\n        (∀ {s t : Effect4.Program.Ty},\n          Eq s.normalize t.normalize →\n            Eq (Effect4.Program.UnionRule.lift rule s) (Effect4.Program.UnionRule.lift rule t))\n        (And\n          (Effect4.Program.UnionRule.Below rule rule →\n            ∀ {s t : Effect4.Program.Ty} {b : α},\n              Eq (s.subN t) Bool.true →\n                Eq (Effect4.Program.UnionRule.lift rule t) (Option.some b) →\n                  Exists fun a =>\n                    And (Eq (Effect4.Program.UnionRule.lift rule s) (Option.some a))\n                      (inst_1.le a b))\n          (∀ {V : Type} {In : V → Effect4.Program.Ty → Prop} {P : V → α → Prop},\n            (∀ {v : V} {t : Effect4.Program.Ty}, In v t → In v t.normalize) →\n              (∀ {v : V} {t : Effect4.Program.Ty},\n                  In v t → Exists fun m => And (List.instMembership.mem t.members m) (In v m)) →\n                (∀ {v : V} (a b : α), P v a → P v (inst.join a b)) →\n                  (∀ {v : V} (a b : α), P v b → P v (inst.join a b)) →\n                    (∀ {m : Effect4.Program.Ty} {a : α} {v : V},\n                        m.Normal →\n                          Eq m.isMember Bool.true → Eq (rule m) (Option.some a) → In v m → P v a) →\n                      ∀ {t : Effect4.Program.Ty} {a : α} {v : V},\n                        Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n                          In v t → P v a))))","withinSemanticAxiomCeiling":true}},"title":"A member rule lifted to every type by reading the union members of the normal form and joining the answers: it answers the least answer at never; at one normal union member it is the member rule, up to the join with the least answer; two types with one normal form have one answer; a member rule that is monotone in the order lifts to a monotone rule; a property of a value and an answer that the join keeps on each side passes from the union members to the lifted rule; the join law is an equation at a type, at a pair of types and at a carrier whose order is antisymmetric (lift_union_eq, lift_union_eq_pair, lift_union_eq_of_antisymm), and a map with the four properties of the lifted rule is the lifted rule, at a type and at a pair of types (lift_unique, lift_unique_pair); its order is read in Lean core's classes: a carrier with those classes is a carrier of answers (AnswerOrder.ofCore), and the checker's order on raw types is the order of canonical types by definition (subN_iff_le); the two record rules are its instances, and the fiber rule is the first converted rule (union-rule-extend) (decisions rows 282, 285, 293, 298, 300)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"union-rule-extend","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The full-fallback contract, without a proper-union refusal. Consumer: the fiber classifier reader. ","levels":[],"module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_laws","restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    And\n      (∀ {t : Effect4.Program.Ty} {a : α},\n        Eq (rule t) (Option.some a) →\n          Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a))\n      (And\n        (∀ {t : Effect4.Program.Ty},\n          Eq (rule t) Option.none →\n            Eq (Effect4.Program.UnionRule.extendAll rule t) (Effect4.Program.UnionRule.lift rule t))\n        (And\n          (Exists fun a =>\n            And\n              (Eq (Effect4.Program.UnionRule.extendAll rule Effect4.Program.Ty.never)\n                (Option.some a))\n              (∀ (b : α), inst_1.le a b))\n          (And\n            (∀ {t : Effect4.Program.Ty} {a : α},\n              Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n                And (Eq (t.subN (C a)) Bool.true)\n                  (∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true)))\n            (∀ {t : Effect4.Program.Ty} {a : α},\n              Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n                Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a)))))","withinSemanticAxiomCeiling":true}},"title":"A converted eliminator of the checker is the full fallback of its member rule: the member rule's own answer where the member rule answers at the raw target, and the lifted rule over every normalized union member elsewhere; for every UnionRule.Eliminator it agrees with the member rule, it is the lifted rule where the member rule refuses, and it keeps every answer of the earlier guarded rule (Eliminator.extendAll_laws); it answers a least answer at never; its answer a puts the target below C a in Ty.subN, and an answer b is above a exactly when the target is below C b; a retained member that the member rule refuses refuses the whole target; it is monotone at every smaller type (Eliminator.extendAll_mono), and its answer equals the lifted rule's up to the order (Eliminator.extendAll_lift); the fiber, list and exit rules are instances (fiberTy, Checker.listOf?, Checker.exitOf?); the cause rule reads two heads, so it is the full fallback of Member.cause with four member facts of an upper type (causeInputError_upper); the option rule reads the normal form alone, so it is the lifted rule of Member.option, and it is the earlier normalized-head rule where the normal form has at most one member and is not never (optionTy_eq_normal; decisions row 304); the guarded rule's laws stay for their earlier consumers (Eliminator.extend_laws); it does not establish checker-monotone or anything that tsgo accepts (decisions rows 292 to 294, 296, 298 and 304; slice P2b)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"variance-semiring","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"**The variance semiring** (claim `variance-semiring`): join and composition form a commutative\nidempotent semiring with `bi` as zero and `co` as one, composition distributes over join, and\nthe order is a preorder whose join is `+`. A step of `instantiate-respects-polarity` (slice VAR-2)\nand of the row census (slice VAR-3). ","levels":[],"module":"Effect4.Laws.Program.Polarity","name":"Effect4.Program.Var4.semiring_laws","restsOn":[],"statement":"And (∀ (a b : Effect4.Program.Var4), Eq (instHAdd.hAdd a b) (instHAdd.hAdd b a))\n  (And\n    (∀ (a b c : Effect4.Program.Var4),\n      Eq (instHAdd.hAdd (instHAdd.hAdd a b) c) (instHAdd.hAdd a (instHAdd.hAdd b c)))\n    (And (∀ (a : Effect4.Program.Var4), Eq (instHAdd.hAdd a a) a)\n      (And (∀ (a : Effect4.Program.Var4), Eq (instHAdd.hAdd Effect4.Program.Var4.bi a) a)\n        (And (∀ (a b : Effect4.Program.Var4), Eq (instHMul.hMul a b) (instHMul.hMul b a))\n          (And\n            (∀ (a b c : Effect4.Program.Var4),\n              Eq (instHMul.hMul (instHMul.hMul a b) c) (instHMul.hMul a (instHMul.hMul b c)))\n            (And (∀ (a : Effect4.Program.Var4), Eq (instHMul.hMul Effect4.Program.Var4.co a) a)\n              (And\n                (∀ (a : Effect4.Program.Var4),\n                  Eq (instHMul.hMul Effect4.Program.Var4.bi a) Effect4.Program.Var4.bi)\n                (And\n                  (∀ (a b c : Effect4.Program.Var4),\n                    Eq (instHMul.hMul a (instHAdd.hAdd b c))\n                      (instHAdd.hAdd (instHMul.hMul a b) (instHMul.hMul a c)))\n                  (And (∀ (a : Effect4.Program.Var4), Eq (a.le a) Bool.true)\n                    (∀ (a b c : Effect4.Program.Var4),\n                      Eq ((instHAdd.hAdd a b).le c) ((a.le c).and (b.le c))))))))))))","withinSemanticAxiomCeiling":true}},"title":"The variance semiring: Var4, the four parity sets of the signed paths that reach an occurrence (bi, co, contra, inv), with join and composition, is a commutative idempotent semiring with bi as zero and co as one, ordered by inclusion with join as least upper bound; on the declared alphabet's image the walk's composition (Bounds.comp) is its product and the reference's Boolean reading (Ty.Variance.select) is its select (Bounds.comp_toVar4, Ty.Variance.select_toVar4); the polarity of a template's parameter is one fold of the generated TyAlgebra at a reading of the heads (Ty.polarity, HeadReading.sub); it establishes no subtyping fact of Ty (the OpenAI math review, slice VAR-1)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"instantiate-respects-polarity","literature":[],"role":"monotonicity","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Instantiation respects polarity** (claim `instantiate-respects-polarity`, slice VAR-2): if\nevery parameter's two bindings are related by `Ty.sub` at the parameter's polarity in `t` (a\nbivariant parameter asks nothing, an invariant one both directions), the two instances are\nrelated. It is the probe's `eval_respects` at the model of `Ty` (raw `Ty.sub`, each head read at\nits variance, `HeadReading.sub`). Its consumers are `checker-monotone`'s share at a row (with\n`Bounds.matchArgsB_monotone`, at an answer that reads its parameters at co or bi) and HO-4's\ninstantiated rows. It establishes no semantic variance and nothing of tsgo's inference. ","levels":[],"module":"Effect4.Laws.Program.Polarity","name":"Effect4.Program.Ty.sub_instantiate_polarity","restsOn":[],"statement":"∀ (t : Effect4.Program.Ty) (σ σ' : Effect4.Program.Ty.Subst),\n  (∀ (i : Nat),\n      Eq\n        ((Effect4.Program.Ty.polarity Effect4.Program.HeadReading.sub i t).select\n          ((σ.at i).sub (σ'.at i)) ((σ'.at i).sub (σ.at i)))\n        Bool.true) →\n    Eq ((Effect4.Program.Ty.instantiate σ t).sub (Effect4.Program.Ty.instantiate σ' t)) Bool.true","withinSemanticAxiomCeiling":true}},"title":"Instantiation respects polarity: if every parameter's two bindings are related by raw Ty.sub at the parameter's polarity in a template (a bivariant parameter asks nothing, an invariant one both directions), the two instances are related; with matchArgsB_monotone it gives a smaller answer at a smaller request where the answer reads its parameters at co or bi; no semantic variance, nothing of tsgo's inference (slice VAR-2)"},{"concept":"subtyping-algebra","contestedBy":[],"id":"checked-types-closed","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A formed program that the checker admits has closed types**, at a closed environment and\na signature with closed atoms and closed service carriers (the claim `checked-types-closed`).\nThe annotations are formed outside a template, so each states a closed type\n(`Formation.closed_of_formed`), and each rule of the checker keeps closed types closed\n(`hasTy_closed`). The path is any path: the checker's answer does not depend on it. ","levels":[],"module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.check_closed","restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (sig : Effect4.Program.Signature Op),\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      (∀ (t : Effect4.Program.Ty), List.instMembership.mem env t → Eq t.closed Bool.true) →\n        ∀ {p : List Nat} {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n          Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites e) →\n            Eq (Effect4.Program.Checker.check sig env p e) (Except.ok t) →\n              And (Eq t.answer.closed Bool.true) (Eq t.error.closed Bool.true)","withinSemanticAxiomCeiling":true}},"title":"A formed program that the checker admits has closed types: at a closed environment, a typing signature with closed atoms and closed service carriers, and annotations formed outside a template; no premise on a row or on a layer reference; the whole-program checker has the same property, and an admitted program has closed types with no premise (typeOfProgram_closed, AdmittedProgram.closed); the checker alone does not have it (decisions rows 288 point 6 a, 297)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"hom-eq-cata-eff","literature":[{"locator":"audit P24","relation":"definitionUsed","work":"MeijerFokkingaPaterson1991"},{"locator":"audit P12","relation":"proofTechnique","work":"Gibbons2002"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":null,"levels":["u"],"module":"Effect4.Program.Fold","name":"Effect4.Program.hom_eq_cata_eff","restsOn":[],"statement":"∀ {Op : Type} {R : Effect4.Program.EffFam → Type u} {alg : Effect4.Program.EffAlgebra Op R}\n  (hom : Effect4.Program.EffHom alg) (node : Effect4.Program.Eff Op),\n  Eq (hom.f_eff node) (Effect4.Program.cata_eff alg node)","withinSemanticAxiomCeiling":true}},"title":"Pointwise equality of algebra homomorphisms with cata_eff"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"inhabited-iff-fits","literature":[{"locator":"§16.1, p. 210","relation":"adaptedResult","work":"TAPL"}],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Inhabitance agrees with membership (proved)**, on every type: the fold says `true` exactly\nwhen some world has a member. Row 127's agreement theorem. ","levels":[],"module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_iff_fits","restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Iff (Eq (Effect4.Program.inhabited t) Bool.true)\n    (Exists fun w => Exists fun v => Effect4.Program.Typed.Fits w v t)","withinSemanticAxiomCeiling":true}},"title":"Syntactic inhabited fold agrees with semantic value existence in Fits"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"cata-eff-congr-on","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"Fold congruence at `Eff`. ","levels":["u"],"module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.cata_eff_congr_on","restsOn":[],"statement":"∀ {Op : Type} {R : Effect4.Program.EffFam → Type u} {alg₁ alg₂ : Effect4.Program.EffAlgebra Op R}\n  {okOp : Op → Prop} {okKey : Effect4.ServiceKey → Prop} {okDef : Nat → Prop},\n  alg₁.AgreeOn alg₂ okOp okKey okDef →\n    ∀ (e : Effect4.Program.Eff Op),\n      Effect4.Program.cata_eff (Effect4.Program.readsAlg okOp okKey okDef) e →\n        Eq (Effect4.Program.cata_eff alg₁ e) (Effect4.Program.cata_eff alg₂ e)","withinSemanticAxiomCeiling":true}},"title":"Fold congruence along agreeing signature algebras"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"addressed-replacement","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"A successful addressed edit exposes its replacement, preserves the root sort,\nand is reversed by restoring the original node. This is the structural witness for\nConcept 7's proposed `addressed-replacement` claim, consumed by the layer laws below. ","levels":[],"module":"Effect4.Laws.Program.References","name":"Effect4.Program.Node.replaceAt_spec","restsOn":[],"statement":"∀ {Op : Type} {node result replacement : Effect4.Program.Node Op} {path : List Nat},\n  Eq (node.replaceAt path replacement) (Option.some result) →\n    And (Eq (result.at_ path) (Option.some replacement))\n      (And (Eq result.ctorIdx node.ctorIdx)\n        (∀ (old : Effect4.Program.Node Op),\n          Eq (node.at_ path) (Option.some old) → Eq (result.replaceAt path old) (Option.some node)))","withinSemanticAxiomCeiling":true}},"title":"Successful same-sort path replacement reads back, retains the root sort, and restores the original tree"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"address-composes","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An edit at `p ++ q` is the edit at `q` inside the node at `p`, put back at `p`.** The\npointer of `address-composes`. No proof consumes it yet: the splice over a whole program's parts\nreads a block's two children directly (`Node.replaceAt_defs_main`, `Node.replaceAt_defs_body`). A\nmove or a paste of a subtree is its first consumer. ","levels":[],"module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.replaceAt_append","restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op) (p q : List Nat) (r : Effect4.Program.Node Op),\n  Eq (n.replaceAt (instHAppendOfAppend.hAppend p q) r)\n    ((n.at_ p).bind fun m => (m.replaceAt q r).bind fun m' => n.replaceAt p m')","withinSemanticAxiomCeiling":true}},"title":"An address is a composite of child lenses: the node and the environment at p ++ q are the ones at q inside the node at p (Node.at_append, Node.envAt_append), and an edit at p ++ q is the edit at q inside the node at p, put back at p (Node.replaceAt_append); below an edit the edited node reads the replacement; nothing of typing, of behaviour, or of a moved subtree's variable levels and layer-reference targets (seat ORG's theory map, section 3)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"path-fold-natural","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"**A path fold from `q ++ r` is the fold from `r`, each yield read below `q`.** At a program.\nThe pointer of `path-fold-natural`. ","levels":["u"],"module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_eff_base","restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.Eff Op) (q r : List Nat)\n  (f1 : Effect4.Program.Eff Op → List Nat → M) (f2 : Effect4.Program.Stmt Op → List Nat → M)\n  (f3 : Effect4.Program.Stmts Op → List Nat → M) (f4 : Effect4.Program.Effs Op → List Nat → M)\n  (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_eff unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6 f7)\n    (Effect4.Program.foldMapAt_eff unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","withinSemanticAxiomCeiling":true}},"title":"A path fold is natural in its base: the fold from q ++ r is the fold from r with each yield read below q (foldMapAt_eff_base and six siblings), and a map that keeps the operation commutes with the fold (foldMapAt_eff_hom); the address list's shift is their instance; nothing of a judgment, a table, or a refusal's location, which the checker's base law owns (checker-base-natural; seat ORG's L5 and L6)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"checker-base-natural","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The checker at `q ++ p` is the checker at `p`, its refusal moved below `q`.** The pointer\nof `checker-base-natural`. ","levels":[],"module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.check_rebase","restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (p : List Nat) (e : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.Checker.check sig env (instHAppendOfAppend.hAppend q p) e)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.check sig env p e))","withinSemanticAxiomCeiling":true}},"title":"The checker is natural in its base path: checking at q ++ p is checking at p with each refusal moved below q (Checker.check_rebase and its six siblings), so a subtree's table at q ++ a is its table at a with each entry moved below q (tableAt_rebase); nothing of the verdict's correctness (check_sound), of a definition block's module check, or of cost (seat ORG's L7 and L8)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"operation-data-scoped","literature":[],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"**An operation's own data is scope-checked.** A `perform` node is scoped at level `n`\nexactly when its operation's data is, by the alphabet's `ScopedOp` instance, and its request\nis: the generated operation arm of the scope fold (`scopedAlgebra`, `Program/Scoped.lean`),\nread as a decision.\n\nConcept `initial-algebras-folds`, claim `operation-data-scoped` (role decidability), serving\nR4 (state plan T0). Reach: the scope check `Eff.scopedAt`, at every level, at every alphabet\nwith a `ScopedOp` instance, with no other hypothesis. It does not establish term typing: scope\nis not typing, and the type of a term an operation carries is state plan T3's (`rowTy`). It\ndoes not establish that an instance follows `ScopedOp`'s binder convention, which is each\ninstance's contract. Consumer: T3's term rows, where the checker refuses an unscoped term\nbefore typing it; the red controls are `Test/Program/ScopedOpContract.lean`. ","levels":[],"module":"Effect4.Laws.Program.Authoring","name":"Effect4.Program.Eff.perform_scoped_iff","restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (n : Nat) (op : Op) (arg : Effect4.Program.Term),\n  Iff (Eq (Effect4.Program.Eff.scopedAt n (Effect4.Program.Eff.perform op arg)) Bool.true)\n    (And (Eq (inst.scopedAt op n) Bool.true) (Eq (Effect4.Program.Term.scoped n arg) Bool.true))","withinSemanticAxiomCeiling":true}},"title":"The scope fold decides a perform node: scoped exactly when its operation's own data (the alphabet's ScopedOp) and its request are"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"reference-expansion-complete","literature":[],"role":"substitution","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A well-formed program expands to a program with no reference site**, at the bound that\n`Eff.expandRefs` uses: one more round than the program has reference sites. The case of no\nreference site is the same statement, at one round. ","levels":[],"module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.expanded_refs_nil_of_wf","restsOn":[],"statement":"∀ {Op : Type} (root : Effect4.Program.Eff Op),\n  Eq root.layerRefsWF Bool.true →\n    Eq (Effect4.Program.Eff.refSites List.nil root.expandRefs) List.nil","withinSemanticAxiomCeiling":true}},"title":"A program with well-formed layer references expands to a program with no reference site, at the bound of expandRefs"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"sketch-conservative","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H1, the claim `sketch-conservative`**: a program that performs no hole is checked the\nsame with any hole table, refusals included, at every environment and path. The premise is\n`SigProgram` at the application's signature: every operation that the program performs is one of\nthe application's, and every service key that it reads has a carrier. It is C3's reflection\n(`check_restrict`) at the hole table. ","levels":[],"module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.holes_conservative","restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable) {e : Effect4.Program.NativeEff},\n  Effect4.Program.SigProgram app.signature e →\n    ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n      Eq (Effect4.Program.Checker.check (app.withHoles holes).signature env p e)\n        (Effect4.Program.Checker.check app.signature env p e)","withinSemanticAxiomCeiling":true}},"title":"A program that performs no hole row is checked the same with any hole table appended after the application's rows, refusals included, at every environment and path (decisions rows 288, 291)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"sketch-weakening","literature":[],"role":"weakening","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The claim `sketch-weakening`, as one statement**: H2 and H3 for one application and two\nhole tables. It is the pointer that the claim's row needs, and it adds nothing to its two\nparts. ","levels":[],"module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.sketch_weakening","restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes more : Effect4.Program.RowTable),\n  And\n    (∀ {e : Effect4.Program.NativeEff} {env : Effect4.Program.TyEnv} {p : List Nat}\n      {t : Effect4.Program.EffTy},\n      Eq (Effect4.Program.Checker.check (app.withHoles holes).signature env p e) (Except.ok t) →\n        Eq\n          (Effect4.Program.Checker.check\n            (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n          (Except.ok t))\n    (∀ {e : Effect4.Program.NativeEff},\n      Effect4.Program.SigProgram (app.withHoles holes).signature e →\n        ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n          Eq\n            (Effect4.Program.Checker.check\n              (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n            (Effect4.Program.Checker.check (app.withHoles holes).signature env p e))","withinSemanticAxiomCeiling":true}},"title":"A program with holes that the checker admits stays admitted at its type with more holes declared, and the checker reads the rows of the holes that the program performs and no later row"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"hole-rule","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The hole's rule, the claim `hole-rule`**: hole `k` has the type that its row declares, in\nevery environment. The row is a hole row with closed columns that pass strict formation, the\ncheck that the row check runs at each use (`checkRow`). The answer and the error are read in\nnormal form, as the checker gives every type.\n\nNo rule is added to the typing judgment: this is `HasTy.perform` at a closed row\n(`rowTy_closed`). The row has no parameter, and its request is a unit, which the literal has in\nany environment. ","levels":[],"module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.hole_hasTy","restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable) (k : Nat) {name : String}\n  {answer error : Effect4.Program.Ty} {requires : List Effect4.ServiceKey}\n  (env : Effect4.Program.TyEnv),\n  Eq (List.instGetElem?NatLtLength.getElem? holes k)\n      (Option.some (Effect4.Program.Row.hole name answer error requires)) →\n    Eq answer.closed Bool.true →\n      Eq error.closed Bool.true →\n        Effect4.Program.Formation.Formed\n            (Effect4.Program.Formation.instantiatedSites\n              (Effect4.Program.Row.hole name answer error requires).normalizeTypes List.nil) →\n          Conform.Effect4.Typing.HasTy (app.withHoles holes).signature env\n            (Effect4.Program.Sketch.hole app k)\n            { answer := answer.normalize, error := error.normalize,\n              requires := Effect4.Machine.Env.Requirement.ofList requires }","withinSemanticAxiomCeiling":true}},"title":"A hole row with a unit request and closed, formed columns types its perform at those columns in normal form, in every environment, at any position of the hole table; no rule is added to HasTy"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"defs-conservative","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**G1, the claim `defs-conservative`** (decisions row 328, point 5): a program that invokes no\ndefinition is checked the same at any block's signature, refusals included, at every\nenvironment and path. No service key is assumed typed: the block's signature changes only an\ninvocation's domain bit and row. ","levels":[],"module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.defs_conservative","restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  {e : Effect4.Program.Eff Op},\n  Effect4.Program.NoInvocation sig e →\n    ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n      Eq (Effect4.Program.Checker.check (sig.withDefs decls) env p e)\n        (Effect4.Program.Checker.check sig env p e)","withinSemanticAxiomCeiling":true}},"title":"A program that invokes no definition is checked the same at any definition block's signature, refusals included, at every environment and path, with no service key assumed typed (decisions row 328, G1)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"invocation-rule","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**G2, the claim `invocation-rule`** (decisions row 328): at a block's signature, the\ninvocation of definition `k` has the type of the row that definition `k` declares, in normal\nform, at its request's type. It is `HasTy.perform` read at the block's signature: no rule is\nadded to `HasTy`. ","levels":[],"module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.invoke_hasTy","restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl) {op : Op}\n  {k : Nat} {d : Effect4.Program.DefDecl},\n  Eq (sig.callOf op) (Option.some k) →\n    Eq (List.instGetElem?NatLtLength.getElem? decls k) (Option.some d) →\n      Eq d.params List.nil →\n        ∀ (env : Effect4.Program.TyEnv) (request : Effect4.Program.Term)\n          (t : Effect4.Program.EffTy),\n          Iff\n            (Conform.Effect4.Typing.HasTy (sig.withDefs decls) env\n              (Effect4.Program.Eff.perform op request) t)\n            (Exists fun requestTy =>\n              And (Eq (Effect4.Program.termTy sig env request) (Option.some requestTy))\n                (Eq (Effect4.Program.rowTy d.row.normalizeTypes requestTy (sig.termUse env op))\n                  (Option.some t)))","withinSemanticAxiomCeiling":true}},"title":"At a block's signature the invocation of a definition has the type of the row it declares, in normal form, at its request's type; no rule is added to HasTy (decisions row 328, G2)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"module-check","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**G2's soundness, the claim `module-check`**: what the module check accepts, the module\njudgment derives. ","levels":[],"module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.checkModule_sound","restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (t : Effect4.Program.EffTy),\n  Eq (Effect4.Program.Checker.checkModule sig e) (Except.ok t) → Effect4.Program.ModuleHasTy sig e t","withinSemanticAxiomCeiling":true}},"title":"The whole module's check and the module judgment agree at the root: what the check accepts the judgment derives, and what the judgment derives the check accepts (decisions row 328, G2)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"typed-replacement","literature":[],"role":"substitution","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The replacement law, at a node: the claim `typed-replacement`.** A typed node splits at an\naddress of a program into an environment and a type of the focus. Every program of that type in\nthat environment, under every extension of the signature, stands in the focus's place, and the\nnode keeps its type. The six statements below are its instances. It is\n`NodeHasTy.replace_envAt` without the function that names the environment. ","levels":[],"module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.NodeHasTy.replace","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} (path : List Nat) {n : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {q : Effect4.Program.Eff Op},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {n' : Effect4.Program.Node Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n                    Effect4.Program.NodeHasTy s' n' τ)","withinSemanticAxiomCeiling":true}},"title":"A typed node splits at an address of a program into an environment and a type of the focus, and every program of that type in that environment, under every extension of the typing signature, stands in the focus's place with the node keeping its type; one statement over the six typing judgments, with no rule added; the environment and the type are existential, and the focus's type is kept exactly (decisions rows 288, 294)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"focus-function","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The law at the environment that the step function answers: the claim `focus-function`.**\nA typed node splits at an address of a program into an environment and a type of the focus, and\nthe environment is the one that `Node.envAt` computes from the node's own. Every program of\nthat type in that environment, under every extension of the signature, stands in the focus's\nplace, and the node keeps its type. `NodeHasTy.replace` is this statement without the\nfunction. ","levels":[],"module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.NodeHasTy.replace_envAt","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} (path : List Nat) {n : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {q : Effect4.Program.Eff Op},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And\n            (Eq (Effect4.Program.Node.envAt s τ.env n path)\n              (Option.some (Effect4.Program.NodeEnv.env env)))\n            (And (Conform.Effect4.Typing.HasTy s env q t)\n              (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n                {n' : Effect4.Program.Node Op},\n                Effect4.Program.SigExtends s s' →\n                  Conform.Effect4.Typing.HasTy s' env q' t →\n                    Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n                      Effect4.Program.NodeHasTy s' n' τ))","withinSemanticAxiomCeiling":true}},"title":"The typing rules invert along a path, as a function: at an address of a program in a typed node, the fold of the step function answers the environment of the focus, the checker answers its type there, and the replacement law holds at that pair with no existential; the step has one case for each arm of Node.child, and Checker.check does not change; one answer costs up to one check of the program (decisions rows 292, 296)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"address-table","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The list of refusals is empty exactly when the checker admits the program.** It is the\ntable's form of `explain_none_iff`. The pointer of the claim `address-table`. Its consumer is\nthe query driver's refusals (slice QUERY). ","levels":[],"module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.refusals_nil_iff","restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Iff (Eq (Effect4.Program.refusals s env0 p) List.nil)\n    (Eq (Effect4.Program.effTy s env0 p).isSome Bool.true)","withinSemanticAxiomCeiling":true}},"title":"The address table of a program has one entry for each address of a node, and no other (mem_addresses_iff); an entry of a program holds the environment that the step function answers and the checker's answer there; the distinct refusals of the entries start with the located refusal of explain (refusals_head), and the list is empty exactly when the checker admits the program; an entry after a refused sibling is not reached and holds no answer; the table is a specification, and each entry costs up to one check of the program; no law orders the refusals after the head (decisions row 302)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"edit-splices-table","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An edit that keeps its focus's type splices the address table** (the claim\n`edit-splices-table`). In a program that the checker types, take the focus that `focusAt`\nanswers at an address. Replace the sub-program there by a program of the focus's type in the\nfocus's environment. The edited program's table is the old table with the subtree at the address\nreplaced by the new sub-program's table, at the focus's environment and at the subtree's own\naddresses. Nothing outside the subtree is checked again. ","levels":[],"module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.table_splice","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p p' q' : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat}\n  {f : Effect4.Program.Focus Op},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq (Effect4.Program.focusAt s env0 p path) (Option.some f) →\n      Conform.Effect4.Typing.HasTy s f.env q' f.ty →\n        Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n            (Option.some (Effect4.Program.Node.eff p')) →\n          Eq (Effect4.Program.table s env0 p')\n            (Effect4.Program.Table.splice (Effect4.Program.table s env0 p) path\n              (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env f.env))\n                (Effect4.Program.Node.eff q') path))","withinSemanticAxiomCeiling":true}},"title":"An edit that keeps its focus's type splices the address table: in a program that the checker types, replace the sub-program at the address that focusAt answers by a program of the focus's type in the focus's environment; the edited program's table is the old table with the subtree's segment replaced by the new sub-program's table at the focus's environment and the subtree's own addresses (Table.splice), so nothing outside the subtree is checked again; nothing of an edit that changes the type, of layer references, of a refused program, or of a whole program with a block (cutover slice S1; Reps, Teitelbaum and Demers 1983; decisions rows 302 and 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"edit-session-coherent","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**What a session shows is the checker's answer on its sketch**, after an open and any run of\nedits: the sketch's refusals, whose head is the check's and which are empty exactly when the\nsketch checks, and the sketch's type. An edit that splices checks only its new subtree; an edit\nthat checks again checks the whole sketch. The pointer of `edit-session-coherent`. ","levels":[],"module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.reached_view","restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (s : Effect4.Program.Sketch) (edits : List Effect4.Program.Edit),\n  And\n    (Eq ((Effect4.Program.EditSession.open app s).run edits).view.refusals\n      (((Effect4.Program.EditSession.open app s).run edits).sketch.refusals app))\n    (Eq ((Effect4.Program.EditSession.open app s).run edits).view.type\n      (((Effect4.Program.EditSession.open app s).run edits).sketch.check app).toOption)","withinSemanticAxiomCeiling":true}},"title":"What an edit session shows after an open and any run of edits is the checker's answer on its sketch, refusals and type, definition blocks and holes included, because its table stays its sketch's table: the open computes it part by part, and each edit keeps it, splicing below the root where the table types the root and the edited address and the checker gives the new sub-program the old type at the part's signature (Sketch.table_fill), and computing it again elsewhere; nothing of an edit of the hole table, of a run of the program, or of the cost (decisions row 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"edit-session-undo","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Undo**: an edit that applies, then the edit that puts back the old sub-program, restores a\ncoherent session exactly, its table included. The path lens's get-put (`replaceAt_spec`) restores\nthe sketch, and coherence restores the table. The pointer of `edit-session-undo`. ","levels":[],"module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_undo","restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession},\n  l.Coherent →\n    ∀ {a : List Nat} {q old : Effect4.Program.NativeEff} {s' : Effect4.Program.Sketch},\n      Eq ((Effect4.Program.Node.eff l.sketch.program).at_ a)\n          (Option.some (Effect4.Program.Node.eff old)) →\n        Eq (l.sketch.fillAt a q) (Option.some s') →\n          Eq\n            ((l.feed (Effect4.Program.Edit.fill a q)).fst.feed\n                (Effect4.Program.Edit.fill a old)).fst\n            l","withinSemanticAxiomCeiling":true}},"title":"An edit that applies, then the edit that puts back the old sub-program, restores a coherent edit session exactly, its table included: the path lens's get-put (replaceAt_spec) restores the sketch, and coherence the table; nothing of two edits at disjoint addresses, or of undoing a run (decisions row 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"edit-repaint-set","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A spliced edit repaints its subtree and nothing else**: the addresses it shows again are the\nnew subtree's, and every entry of the new table at another address is an entry of the old table.\nThe pointer of `edit-repaint-set`. ","levels":[],"module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_repaint","restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession} {a : List Nat} {q : Effect4.Program.NativeEff}\n  {shown : List (List Nat)},\n  Eq (l.feed (Effect4.Program.Edit.fill a q)).snd (Effect4.Program.Edit.Delta.spliced shown) →\n    And\n      (Eq shown\n        (List.map (fun x => instHAppendOfAppend.hAppend a x)\n          (Effect4.Program.Node.eff q).addresses))\n      (∀ (x : Effect4.Program.Table.Entry),\n        List.instMembership.mem (l.feed (Effect4.Program.Edit.fill a q)).fst.table x →\n          Not (List.instMembership.mem shown x.path) → List.instMembership.mem l.table x)","withinSemanticAxiomCeiling":true}},"title":"A spliced edit repaints its subtree and nothing else: the addresses an edit session shows again after an edit that kept its focus's type are the new subtree's, at the edited address, and every entry of the new table at another address is an entry of the old table; nothing of an edit that changes the type, which shows the whole table again, or of a page drawn from the table (decisions row 334; the live authoring note's repaint set)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"module-address-table","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The list of refusals of a sketch is empty exactly when the sketch checks**, block\nincluded: the proposed claim `module-address-table`. Its consumer is the query tool's refusals. ","levels":[],"module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.refusals_nil_iff","restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Iff (Eq (s.refusals app) List.nil) (Eq (s.check app).toOption.isSome Bool.true)","withinSemanticAxiomCeiling":true}},"title":"The address table of a sketch reads a whole program, definition block included: the root's entry holds the module check's answer, and every other address is read in the part that holds it, at the part's signature and environment, located at the whole program's address; the distinct refusals start with the sketch's check's refusal (Sketch.refusals_head), and the list is empty exactly when the sketch checks; every part of a typed module is typed (moduleHasTy_partAt_typed); no law orders the refusals after the head, and no law yet equates the table with the program's off a block (cutover slice S1; decisions rows 302, 328 and 333)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"module-annotate-table","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A sketch's table, part by part, is its table.** The pointer of `module-annotate-table`. ","levels":[],"module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.annotate_eq_table","restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp), Eq (s.annotate app) (s.table app)","withinSemanticAxiomCeiling":true}},"title":"A sketch's address table, computed part by part (Sketch.annotate: the module check's answer at the root, each body's table at its base in its declared request, the main program's table at [1], all at the block's signature), is its table's specification (Sketch.table), refused sketches and mismatched blocks included; nothing of the cost (decisions rows 328, 333 and 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"module-table-splices","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A filling at a sketch's focus, of the focus's type, splices the sketch's table.** Below\nthe root, in the part that holds the address, at the part's signature: the root's entry holds\nthe same check, the other parts' entries stay, and the part's segment is the splice law's. The\npointer of `module-table-splices`. ","levels":[],"module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.table_fill","restsOn":[],"statement":"∀ {s s' : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp}\n  {q' : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Ne path List.nil →\n      Eq (s.focusAt app path) (Option.some f) →\n        Conform.Effect4.Typing.HasTy (s.sigAt app path) f.env q' f.ty →\n          Eq (s.fillAt path q') (Option.some s') →\n            Eq (s'.table app)\n              (Effect4.Program.Table.splice (s.table app) path\n                (Effect4.Program.tableAt (s.sigAt app path)\n                  (Option.some (Effect4.Program.NodeEnv.env f.env)) (Effect4.Program.Node.eff q')\n                  path))","withinSemanticAxiomCeiling":true}},"title":"A filling at a sketch's focus below the root, of the focus's type in the focus's environment at the part's signature, splices the whole program's table: the root keeps the module check's answer, the other parts' entries stay, and the edited part's segment is the splice law's, definition blocks included; nothing of an edit at the root, of an edit that changes the type, or of layer references (decisions rows 328, 333 and 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"omit-splices-table","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An omission at the focus's type splices the table**: the hole row declares the focus's\nthree columns, and the table is the old one with the subtree's segment replaced by the hole's one\nentry. The grown sketch keeps its table (`Sketch.table_more_holes`), and the hole is a filling of\nthe focus's type (`Sketch.table_fill`). The pointer of `omit-splices-table`. ","levels":[],"module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.table_omit","restsOn":[],"statement":"∀ {s s' : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp} (name : String),\n  Eq (s.check app) (Except.ok T) →\n    Ne path List.nil →\n      Eq (s.focusAt app path) (Option.some f) →\n        Eq f.ty.answer.closed Bool.true →\n          Eq f.ty.error.closed Bool.true →\n            Eq f.ty.answer.normalize f.ty.answer →\n              Eq f.ty.error.normalize f.ty.error →\n                Effect4.Program.Formation.Formed\n                    (Effect4.Program.Formation.instantiatedSites\n                      (Effect4.Program.Row.hole name f.ty.answer f.ty.error\n                          f.ty.requires.elems).normalizeTypes\n                      List.nil) →\n                  Eq\n                      (s.omitAt app path\n                        (Effect4.Program.Row.hole name f.ty.answer f.ty.error f.ty.requires.elems))\n                      (Option.some s') →\n                    Eq (s'.table app)\n                      (Effect4.Program.Table.splice (s.table app) path\n                        (List.cons\n                          { path := path, env := Option.some (Effect4.Program.NodeEnv.env f.env),\n                            result := Option.some (Except.ok f.ty) }\n                          List.nil))","withinSemanticAxiomCeiling":true}},"title":"An omission at a typed sketch's focus below the root, whose hole row declares the focus's closed and normal columns, splices the table: the hole's one entry replaces the subtree's segment, because a typed sketch's table stays under a grown hole table (Sketch.table_more_holes); a planned goal; until it is proved, the edit session checks the table again at an omission (decisions row 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"module-holes-conservative","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H1 on a whole program**: a sketch whose program performs no hole is checked as its program by\nthe module check, definition block included. So a sketch with every hole filled is an ordinary\nmodule. The pointer of `module-holes-conservative`. ","levels":[],"module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_filled_module","restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Effect4.Program.ModuleSigProgram app.signature s.program →\n    Eq (s.check app) (Effect4.Program.Checker.checkModule app.signature s.program)","withinSemanticAxiomCeiling":true}},"title":"A sketch whose whole program performs no hole, each body and the main program read at the block's signature, is checked by the module check as its program, refusals included (Sketch.check_filled_module); the module check is unchanged under an extension of the signature for such a program (checkModule_restrict); nothing of a program that performs a hole (decisions rows 282 and 328)"},{"concept":"exact-codecs","contestedBy":[],"id":"sketch-wire","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Exactness**: whatever reads as a sketch was that sketch's bytes, and its value trees are\nwell-formed. The pointer of `sketch-wire`. ","levels":[],"module":"Effect4.Laws.Program.SketchWire","name":"Effect4.Program.Sketch.decode_exact","restsOn":[],"statement":"∀ {b : Prod Effect4.Store.Bytes Effect4.Store.Bytes} {s : Effect4.Program.Sketch},\n  Eq (Effect4.Program.Sketch.decode b) (Option.some s) →\n    And (Eq b s.encode)\n      (And (Effect4.Store.ProgramGen.EffC.instCanonicalEff.toVal s.program).WF\n        (Effect4.Store.instCanonicalList.toVal s.holes).WF)","withinSemanticAxiomCeiling":true}},"title":"A sketch's bytes are its program's canonical bytes and its hole table's (Sketch.encode): a well-formed sketch reads back (Sketch.decode_encode), and whatever reads was that sketch's bytes, well-formed (Sketch.decode_exact); the query tool takes a hole table with a request and gives the grown one with an omission, so the sketch it answers can be sent back; nothing of a stored sketch's renumbering when its application gains a row (decisions row 305, point 3)"},{"concept":"exact-codecs","contestedBy":[],"id":"json-read-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A carrier read from JSON is the carrier whose canonical print that JSON is.** The pointer\nof `json-read-exact`. ","levels":[],"module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.Canonical.ofJson_exact","restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Store.Canonical α] {j : Effect4.Json} {a : α},\n  Eq (Effect4.Store.Canonical.ofJson j) (Option.some a) → Eq (Effect4.Store.Canonical.print a) j","withinSemanticAxiomCeiling":true}},"title":"A canonical carrier read from JSON is the carrier whose canonical print that JSON is (Canonical.ofJson_exact): the reader takes only the canonical print, a number as the binary64 of a natural, hex exact, fields in the shape's order, a case's name checked against its tag; JSON whose objects come in any order reads once ordered by the shape (Canonical.ofJsonAnyOrder), the named normaliser; nothing of the round trip, which needs every natural at most 2^53 and no option holding a shape that prints null (the agent's schema form; decisions row 334)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"call-instance-address","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The call instance is the row check's answer at the request's type.** Where `callAt`\nanswers, the node at the address is a `perform` of the instance's operation. The request has\nthe instance's request type in the environment at the address. The row check at that type\nanswers the instance's two columns, and the instance's bindings are the row's there. ","levels":[],"module":"Effect4.Laws.Program.Typing.Call","name":"Effect4.Program.callAt_rowTy","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {c : Effect4.Program.CallInstance Op},\n  Eq (Effect4.Program.callAt s env0 p path) (Option.some c) →\n    Exists fun request =>\n      Exists fun env =>\n        Exists fun t =>\n          And\n            (Eq ((Effect4.Program.Node.eff p).at_ path)\n              (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform c.op request))))\n            (And\n              (Eq\n                (Effect4.Program.Node.envAt s (Effect4.Program.NodeEnv.env env0)\n                  (Effect4.Program.Node.eff p) path)\n                (Option.some (Effect4.Program.NodeEnv.env env)))\n              (And (Eq (Effect4.Program.termTy s env request) (Option.some c.request))\n                (And\n                  (Eq (Effect4.Program.rowTy (s.rowOf c.op) c.request (s.termUse env c.op))\n                    (Option.some t))\n                  (And (Eq t.answer c.answer)\n                    (And (Eq t.error c.error)\n                      (Eq\n                        (Effect4.Program.rowBindings (s.rowOf c.op) c.request (s.termUse env c.op))\n                        (Option.some c.bindings)))))))","withinSemanticAxiomCeiling":true}},"title":"The call instance at an address is the row check's answer: where callAt answers, the node there is a call of the instance's operation, its request has the instance's request type in the address's environment, and the row check at that type answers the instance's two columns; the instance keeps the row's bindings at the request (rowBindings), which instantiate the two columns where the row check answers (checkRow_rowBindings) (nothing about a run's call at that address: no registration records it; decisions row 310)"},{"concept":"exact-codecs","contestedBy":[],"id":"typed-print-connector","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Without a row join annotation, the typed print is the ordinary print.\nThis remains the pointer of `typed-print-connector`, exact-codecs, R8.\nThe `NoJoin` premise states absence at every checked address.\nIt makes no TypeScript typing or execution claim. ","levels":[],"module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Program.printTyped_eq_print","restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Effect4.Program.NoJoin s env0 p →\n    Eq (Effect4.Program.printTyped s env0 p) (Effect4.Program.print s (List.length env0) p)","withinSemanticAxiomCeiling":true}},"title":"The typed print, the table-driven print with each node's address, writes a call's type arguments where the row check joins the call's request, in the order of the row's variables, and the type arguments of an approved eliminator site where the site's checked context needs them; a program with no such row and no such site (NoJoin) has the typed print that is its print, byte for byte (printTyped_eq_print); it does not say that tsgo accepts a printed call (decisions row 325)"},{"concept":"exact-codecs","contestedBy":[],"id":"typed-print-erasure","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Every successful public typed print erases to the existing ordinary print.\nThe exact old readable and spelling premises remain visible (exact-codecs, R8). ","levels":[],"module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.eraseJoinArgs_printTyped","restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {env0 : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig (List.length env0) e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Program.printTyped sig env0 e) (Except.ok x) →\n            Eq (Effect4.Program.print sig (List.length env0) e)\n              (Except.ok (Effect4.Codegen.eraseJoinArgs classes sig spell (List.length env0) x))","withinSemanticAxiomCeiling":true}},"title":"A successful typed print erases to the print: at a readable program and a lawful spelling, the named erasure of the inserted type arguments gives the print of the program, byte for byte; the erasure keeps an operation's own arguments and the stored type annotations; it does not say that tsgo accepts the typed print, or anything of its run (decisions row 325; slice P2b)"},{"concept":"exact-codecs","contestedBy":[],"id":"typed-print-read","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The existing reader reads every successful public typed print after named erasure.\nThe theorem carries the existing read_print fragment (exact-codecs, R8). ","levels":[],"module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.readTyped_printTyped","restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {env0 : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig (List.length env0) e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Program.printTyped sig env0 e) (Except.ok x) →\n            Eq (Effect4.Codegen.readTyped classes sig spell (List.length env0) x) (Except.ok e)","withinSemanticAxiomCeiling":true}},"title":"The reader reads a successful typed print back to its program after the named erasure, at a readable program and a lawful spelling, by the existing read_print; what the typed reader accepts is the erasure of a print (readTyped_exact); the raw reader still refuses an inserted argument before the erasure, and no equality of raw foreign spellings follows (decisions row 325; slice P3)"},{"concept":"exact-codecs","contestedBy":[],"id":"module-defs-round-trip","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**G6: the round trip of a module with a definition block** (decisions rows 328 and 341). The\nmodule printer prints a block's definitions as constants, each body's own hoisted layers as\nconstants at the top of its suspension (decisions row 341, step 3), then the block's services'\nkeys and layers (decisions rows 338 and 339), then its module layers, each named by its path\n(step 2), before the hoisted layers no body took and the main declaration (`printModule`). When\neach declaration is readable (`DefDecl.readable`: readable columns, an empty requirement row, a\nname with no layer path); each body and each of its own layers read back from their printing at\nthe signature its parameters extend (`bodyDeclOf`); the main program, each module layer and each\nother hoisted layer read back at the block's signature through the block's spelling map\n(`defsSpell`); and the layers' names decode, the module reads back to the program, with each\ndefinition's role given back by the services' layers (`roleOf`, `restoreRoles`) and the module's\nlayers by their paths (`moduleLayersOf`). No hoisted layer stands in the module\n(`Eff.hoistAll_outside`). The premises concern the pieces, as `readModule_printModule`'s do, and\nthey are stated of any reader.\n\nRestated for step 3: each body reads back itself (it was its suspension), and the hoisted layers'\npremise is split by the scope that prints them (`localsReadable`, `layersReadable`).\n\nPlacement: concept `exact-codecs`, claim `module-defs-round-trip`, requirement R8. Consumers: the\nmodule round trip of the readable domain (`readModule_printModule_readable`) and, through it,\n`ModuleEmission.readModule`. It is a structural equation: it does not say that tsgo accepts the\nmodule or how rc.112 runs it. ","levels":[],"module":"Effect4.Laws.Codegen.Module","name":"Effect4.Program.readModule_printModule_defs","restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op} {call param : Nat → Op}\n  {root main body : Effect4.Program.Eff Op} {defs : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {layers : Effect4.Program.LayerTerms Op}\n  {history : List (Prod (List Nat) (Effect4.Program.LayerTerm Op))},\n  Eq root.hoistAll (Except.ok { fst := main, snd := history }) →\n    Eq main.block?\n        (Option.some\n          { fst := defs, snd := { fst := bodies, snd := { fst := body, snd := layers } } }) →\n      ∀ {classDecls : List TypeScript.ClassDecl},\n        Eq (Effect4.Codegen.Classes.readClassDecls classDecls) (Option.some classes) →\n          (∀ (d : Effect4.Program.DefDecl),\n              List.instMembership.mem defs d → Eq d.readable Bool.true) →\n            (∀ (p : Prod Effect4.Program.DefDecl (Effect4.Program.Eff Op)),\n                List.instMembership.mem (defs.zip bodies.toList) p →\n                  Effect4.Program.ReadsBack classes ((sig.withDefs defs).withParams p.fst.params)\n                    (Effect4.Program.paramsSpell param p.fst.params\n                      (Effect4.Program.defsSpell call defs spell))\n                    1 p.snd) →\n              Effect4.Program.ReadsBack classes (sig.withDefs defs)\n                  (Effect4.Program.defsSpell call defs spell) 0 body →\n                (∀ (l : Effect4.Program.LayerTerm Op),\n                    List.instMembership.mem layers.toList l →\n                      Effect4.Program.LayerTerm.ReadsBack classes (sig.withDefs defs)\n                        (Effect4.Program.defsSpell call defs spell) l) →\n                  (∀ (k : Nat),\n                      instLTNat.lt k layers.toList.length →\n                        Eq\n                          (Effect4.Program.LayerTerm.readRefName\n                            (Effect4.Program.LayerTerm.refName (Effect4.Program.Path.layerPath k)))\n                          (Option.some (Effect4.Program.Path.layerPath k))) →\n                    (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                        List.instMembership.mem history entry →\n                          ∀ (d : Effect4.Program.DefDecl),\n                            Eq (Effect4.Program.bodyDeclOf defs entry.fst) (Option.some d) →\n                              Effect4.Program.LayerTerm.ReadsBack classes\n                                ((sig.withDefs defs).withParams d.params)\n                                (Effect4.Program.paramsSpell param d.params\n                                  (Effect4.Program.defsSpell call defs spell))\n                                entry.snd) →\n                      (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                          List.instMembership.mem history entry →\n                            Eq (Effect4.Program.bodyDeclOf defs entry.fst) Option.none →\n                              Effect4.Program.LayerTerm.ReadsBack classes (sig.withDefs defs)\n                                (Effect4.Program.defsSpell call defs spell) entry.snd) →\n                        (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                            List.instMembership.mem history entry →\n                              Eq\n                                (Effect4.Program.LayerTerm.readRefName\n                                  (Effect4.Program.LayerTerm.refName entry.fst))\n                                (Option.some entry.fst)) →\n                          ∀ {name : String} {ty : Effect4.Program.EffTy}\n                            {decls : List TypeScript.ConstDecl},\n                            Eq (Effect4.Program.printModule sig name ty root) (Except.ok decls) →\n                              Eq\n                                (Effect4.Program.readModule sig spell call param\n                                  (instHAppendOfAppend.hAppend\n                                    (List.map TypeScript.Decl.classDecl classDecls)\n                                    (List.map TypeScript.Decl.const decls)))\n                                (Except.ok root)","withinSemanticAxiomCeiling":true}},"title":"A module with a definition block reads back: the module printer prints each definition as a constant before the layers, an arrow from its request and its parameters, each a function named by its declaration (slice HO-3a), with its declared result type around a suspension of its body, an invocation as the definition's name applied to its request, and an invocation with programs as that name applied to the request and to each program as an arrow of the binder due at the call (slice HO-3b, read back under the block's invocation laws, LawfulInvokes); the block's module layers print after the services as constants named by their paths (printModuleLayers), and a reference to one prints as that name; when each declaration has readable columns, an empty requirement row and a name with no layer path, each body and each of its own layers at the signature and spelling map its parameters extend (LawfulSpelling.withParams; a body's own hoisted layers print as constants at the top of its suspension, row 341, step 3b), the main program, each layer and each module layer read back at the block's signature through the block's spelling map, and each module layer's name decodes to its path, the module reads back to the program, its module layers rebuilt in order (readModule_printModule_defs); the block's spelling map is lawful under the signature's invocation laws and readable names (LawfulSpelling.withDefs), which the native signature and the printer's name check give (nativeCalls, defsNamed_of_fault), so the program interface's module round trip holds for a program with a block (Api.printModule_roundTrip); the printer refuses an empty block and a reference out of its scope (Eff.inScope), and a requirement row other than never is printed and not read; the block's services, declared by its definitions' roles, print after the definitions as an Effect service's key and layer each (printServices) and give the roles back from the layers (roleOf), when serviceFault finds no fault (printServices_ok, restoreRoles); it does not say that tsgo accepts the module or how rc.112 runs it (decisions rows 328, 338, 339 and 341, G6; slices PROC-3 and CO-6b)"},{"concept":"exact-codecs","contestedBy":[],"id":"modeled-codec","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The JSON round trip of a modeled value** (claim `modeled-codec`), at the normal form of its\ntype. Membership comes from `Modeled.member` and `hasTy_normalize`. Codec admission stays a\npremise: it is value-specific, and a natural above 2^53 has no exact JSON image. ","levels":[],"module":"Effect4.Laws.Schema.Modeled","name":"Effect4.Schema.Modeled.codec_roundtrip","restsOn":[],"statement":"∀ (α : Type) [m : Effect4.Schema.Modeled α] (a : α),\n  Eq\n      ((Effect4.Program.CTy.ofRaw (m.ty α)).toRaw.isCodecValue\n        ((Effect4.Schema.Modeled.image α).toVal a))\n      Bool.true →\n    Eq\n      (((Effect4.Schema.encode (Effect4.Program.CTy.ofRaw (m.ty α)).toRaw\n                ((Effect4.Schema.Modeled.image α).toVal a)).bind\n            (Effect4.Schema.decode (Effect4.Program.CTy.ofRaw (m.ty α)).toRaw)).bind\n        (Effect4.Schema.Modeled.image α).ofVal)\n      (Option.some a)","withinSemanticAxiomCeiling":true}},"title":"A modeled value survives JSON and back at the normal form of its type, under codec admission at the value (Ty.isCodecValue): decoding its encoding and reading the value back answers the value; admission stays a premise, since a natural above 2^53 inhabits nat and has no exact JSON image; no TypeScript codec and no target execution (decisions row 330, slice L1)"},{"concept":"exact-codecs","contestedBy":[],"id":"record-field-laws","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The record frame's field laws** (claim `record-field-laws`): for a record with ascending\nnames, the machine's read at a reference's name reads the field's encoding, and its overwrite at\nthat name writes the record that the reference's write gives. ","levels":[],"module":"Effect4.Laws.Schema.FieldRef","name":"Effect4.Schema.FieldRef.frame_laws","restsOn":[],"statement":"∀ {L : Effect4.Schema.Model.Leaves} {fs : List (Prod String (Prod Bool Effect4.Program.Ty))}\n  {t : Effect4.Program.Ty},\n  Effect4.Field.Ascending Effect4.Field.bytesKey fs →\n    ∀ (f : Effect4.Schema.FieldRef fs t)\n      (x : Effect4.Schema.Model.CarrierAt L (Effect4.Program.Ty.record fs))\n      (v : Effect4.Schema.Model.CarrierAt L t),\n      And\n        (Eq\n          (Effect4.Machine.Record.read Bool.false\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal x) f.name)\n          (Option.some ((Effect4.Schema.Model.imageAt L t).toVal (f.get x))))\n        (Eq\n          (Effect4.Machine.Record.set\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal x) f.name\n            ((Effect4.Schema.Model.imageAt L t).toVal v))\n          (Option.some\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal (f.set x v))))","withinSemanticAxiomCeiling":true}},"title":"A field reference is a lens on the record frame: for a record with ascending names, at every identity context, the machine's read at the reference's name reads the field's encoding, and its overwrite at that name writes the record the reference's write gives (FieldRef.frame_laws); on carriers the reference is a lawful lens whose writes at two positions commute; nothing of an optional field (decisions row 330, slice L2)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"annotate-table","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The one traversal answers the address table.** `annotate` checks each node once, and its\nentries are the table's, in the table's order: the environment and the checker's answer at\nevery address of a program, and no environment where a step reads a refused sibling. The\npointer of the claim proposed as `annotate-table`; it implements the claim `address-table`,\nwhose specification is the table. Its consumers are the typed print (slice P2) and the\nsession's call instances.\n\nIt says nothing of the cost, and nothing past a refused read: there, as in the table, the\nsubtree is not reached. ","levels":[],"module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.annotate_eq_table","restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.annotate s env0 p) (Effect4.Program.table s env0 p)","withinSemanticAxiomCeiling":true}},"title":"The address table in one traversal: annotate, the checker's seven functions with a record at each node, answers the address table at every program, entry for entry and in its order; each node's checker arm runs once, and a child's environment comes from the answers before it; past a refused read the subtree is not reached, as in the table; no theorem counts the cost, and the left child's entries are copied at each node (decisions rows 302, 324)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"term-slot-environment","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**On a typed node, the term in a slot has a type at the slot's environment.** The slot\ntable answers an environment at each slot that the node has (`Node.extSlotTerm`), and the\ntyping rule of the node types the slot's term there: the test of `catchIf`, the test, the step\nand the result of `iterate`, and an operation's own term at the instance of its parameter. The\nproof is the inversion of `HasTy` at the three constructors. The pointer of the claim\n`term-slot-environment`. Its consumer is the TypeScript printer at an eliminator inside such a\nterm (slice PRINT).\n\nIt does not say that the environment is the only one at which the term has a type, and it\nsays nothing at a node that the checker refuses. ","levels":[],"module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.hasTy_extSlotEnv","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env p T →\n    ∀ {slot : Effect4.Program.ExtSlot} {t : Effect4.Program.Term},\n      Eq (Effect4.Program.Node.extSlotTerm s (Effect4.Program.Node.eff p) slot) (Option.some t) →\n        Exists fun env' =>\n          Exists fun ty =>\n            And\n              (Eq (Effect4.Program.Node.extSlotEnv s env (Effect4.Program.Node.eff p) slot)\n                (Option.some env'))\n              (Eq (Effect4.Program.termTy s env' t) (Option.some ty))","withinSemanticAxiomCeiling":true}},"title":"On a typed node, the term in each slot whose rule extends the node's environment has a type at the environment that the slot table answers: the test of catchIf, the test, the step and the result of iterate, and an operation's own term at the instance of its parameter; the proof is the inversion of HasTy at the three constructors; it does not say that the environment is the only one, and it says nothing at a refused node (decisions row 302)"},{"concept":"context-requirements","contestedBy":[],"id":"satisfies-empty","literature":[{"locator":"audit C8","relation":"analogy","work":"PetricekOrchardMycroft2014"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"Law 7 (satisfaction, empty): every environment satisfies the empty row. ","levels":["u"],"module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_empty","restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U),\n  self.Satisfies Effect4.Machine.Env.Requirement.empty","withinSemanticAxiomCeiling":true}},"title":"The empty requirement is satisfied by every context"},{"concept":"context-requirements","contestedBy":[],"id":"satisfies-single","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Law 8 (satisfaction, singleton): iff the key is bound. ","levels":["u"],"module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_single","restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U) (key : Effect4.ServiceKey),\n  Iff (self.Satisfies (Effect4.Machine.Env.Requirement.single key))\n    (Eq (self.get? key).isSome Bool.true)","withinSemanticAxiomCeiling":true}},"title":"A singleton requirement is satisfied iff the key is present in the context"},{"concept":"context-requirements","contestedBy":[],"id":"satisfies-union","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Law 9 (satisfaction, union): iff both rows are satisfied. ","levels":["u"],"module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_union","restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U)\n  (r s : Effect4.Machine.Env.Requirement),\n  Iff (self.Satisfies (r.union s)) (And (self.Satisfies r) (self.Satisfies s))","withinSemanticAxiomCeiling":true}},"title":"Union requirement satisfaction splits across components"},{"concept":"context-requirements","contestedBy":[],"id":"satisfies-weaken","literature":[],"role":"weakening","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"Law 10 (weakening): satisfying a row satisfies every subrow. ","levels":["u"],"module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_weaken","restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U)\n  {r s : Effect4.Machine.Env.Requirement},\n  self.Satisfies s → Effect4.Row.Subset r s → self.Satisfies r","withinSemanticAxiomCeiling":true}},"title":"Context satisfaction is monotone under requirement row inclusion"},{"concept":"context-requirements","contestedBy":[],"id":"emission-requirements-complete","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"R5/R8: a checked emission retains an explicit answer, error and complete\nrequirement annotation on its main declaration. This certifies generated syntax,\nnot TypeScript execution. ","levels":[],"module":"Effect4.Laws.Codegen.Checked","name":"Effect4.Codegen.ModuleEmission.annotation_complete","restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff} {table : Effect4.Program.RowTable} {name : String}\n  (emission : Effect4.Codegen.ModuleEmission program table name),\n  Exists fun layers =>\n    Exists fun main =>\n      Exists fun body =>\n        Exists fun answer =>\n          Exists fun error =>\n            And\n              (Eq emission.declarations\n                (instHAppendOfAppend.hAppend layers (List.cons main List.nil)))\n              (And\n                (Eq\n                  (Effect4.Program.printDecl name emission.typing.ty body\n                    Effect4.Program.nativeScopeKey)\n                  (Except.ok main))\n                (Eq main.type\n                  (Option.some\n                    (TypeScript.TypeRef.name (List.cons \"Effect\" (List.cons \"Effect\" List.nil))\n                      (List.cons answer\n                        (List.cons error\n                          (List.cons\n                            (Effect4.Program.requirementType Effect4.Program.nativeScopeKey\n                              emission.typing.ty.requires)\n                            List.nil)))))))","withinSemanticAxiomCeiling":true}},"title":"A checked emission's main declaration carries its answer, error and complete requirement row"},{"concept":"context-requirements","contestedBy":[],"id":"provide-discharges","literature":[{"locator":"audit P22","relation":"adaptedResult","work":"Leijen2014"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"A requirement of the dependent that the dependency provides is discharged. ","levels":[],"module":"Effect4.Program.Provision","name":"Effect4.Program.Provision.LayerTy.provide_discharges","restsOn":[],"statement":"∀ (s t : Effect4.Program.LayerTy) (key : Effect4.ServiceKey),\n  Effect4.Row.instMembership.mem t.out key →\n    Not (Effect4.Row.instMembership.mem t.requires key) →\n      Not (Effect4.Row.instMembership.mem (s.provide t).requires key)","withinSemanticAxiomCeiling":true}},"title":"Providing a layer discharges its output services from requirement rows"},{"concept":"context-requirements","contestedBy":[],"id":"provide-closed","literature":[],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The closure theorem.** A dependency that is itself closed and provides everything the\ndependent needs closes the dependent: `Layer<ROut, E, never>`. This is the sentence\n`Effect.provide(program, layer)` type-checks by, and the sentence a deployment is checked by. ","levels":[],"module":"Effect4.Program.Provision","name":"Effect4.Program.Provision.LayerTy.provide_closed","restsOn":[],"statement":"∀ (s t : Effect4.Program.LayerTy),\n  t.Closed → Effect4.Row.Subset s.requires t.out → (s.provide t).Closed","withinSemanticAxiomCeiling":true}},"title":"A closed dependency layer that covers all requirements yields a closed program"},{"concept":"context-requirements","contestedBy":[],"id":"build-total","literature":[],"role":"progress","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Build totality** (`build_total`, cut at `b08f3b58`, restored under decisions row 147):\nunder a typed leaf semantics, a layer the checker types builds under every context that satisfies\nits requirement row, and the built context satisfies its output row. ","levels":[],"module":"Effect4.Laws.Program.BuildTotal","name":"Effect4.Program.Provision.build_total","restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (sem : Effect4.Program.Provision.LeafSem Op),\n  Effect4.Program.Provision.LeafSem.Typed sig sem →\n    ∀ (l : Effect4.Program.LayerTerm Op) (t : Effect4.Program.LayerTy)\n      (ctx : Effect4.Machine.Env.Ctx),\n      Eq (Effect4.Program.layerTy sig l) (Option.some t) →\n        Effect4.Machine.Env.Context.Satisfies ctx t.requires →\n          Exists fun out =>\n            And (Eq (Effect4.Program.Provision.build sem l ctx) (Option.some out))\n              (Effect4.Machine.Env.Context.Satisfies out t.out)","withinSemanticAxiomCeiling":true}},"title":"Build totality: under a typed leaf semantics, a layer the checker types builds under every context satisfying its requirement row, and the built context satisfies its output row (restored, decisions row 147)"},{"concept":"host-session-protocol","contestedBy":[],"id":"run-admitted-history","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Every reached run's machine is a history of its program.** Reach: every built program,\nname, budget and profile, every row. ","levels":[],"module":"Effect4.Laws.Run.Frame","name":"Effect4.Run.reached_history","restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    And (Eq s.session.calls (Effect4.Api.HostSession.callTable s.built.program s.built.table))\n      (Effect4.Run.HistoryOf s.built s.budget.compileFuel s.machine)","withinSemanticAxiomCeiling":true}},"title":"Every reached recorded run has its built program's call table and a history of session-admitted native decisions, at its compile budget; no progress or outside-host claim"},{"concept":"host-session-protocol","contestedBy":[],"id":"keys-once","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Each key is bound once, received once and applied once, and a retired call is never\napplied.** In every recorded run of every program: the session binds a key at most once, accepts\nat most one reply receipt and applies at most one reply at a key, and no key that a control or an\napplication retired is ever applied. Concept `host-session-protocol`, R6; the proposed claim\n`keys-once` (role preservation). The machine's part is that a guard the machine dropped never\nholds a request again (`reservedKeys_steppedBy`): a later park takes a fresh token. Consumer:\n`stale_never_applies`, clauses one to three. Reach: every program, table, budget and journal of\nthe four row kinds, with its raw rows. It does not establish reply admission at the application,\nthe retirement edge of the host protocol, the order of two applications, or which reply a host\nsends: a host may answer a call with any body it chooses. ","levels":[],"module":"Effect4.Laws.Run.Journal","name":"Effect4.Run.session_keys_once","restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    And s.boundKeys.Nodup\n      (And s.submittedKeys.Nodup\n        (And s.appliedKeys.Nodup\n          (∀ (k : Effect4.Api.HostSession.Key),\n            List.instMembership.mem s.retiredKeys k →\n              Not (List.instMembership.mem s.appliedKeys k))))","withinSemanticAxiomCeiling":true}},"title":"A reached run binds, submits and applies each key at most once, and applies no retired key"},{"concept":"host-session-protocol","contestedBy":[],"id":"allows-answer","literature":[{"locator":"audit P35","relation":"adaptedResult","work":"Wadler2012"}],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":[],"doc":"An answer is an edge from `awaitingAsync` to every state, so the machine it leaves is\nnever a protocol refusal. ","levels":[],"module":"Effect4.Laws.Run","name":"Effect4.Run.allows_answer","restsOn":[],"statement":"∀ (key : Effect4.Api.HostSession.Key) (target : Effect4.Api.HostProtocol.State),\n  Eq\n    (Effect4.Api.HostProtocol.allows Effect4.Api.HostProtocol.State.awaitingAsync\n      (Effect4.Api.HostProtocol.Label.answer key) target)\n    Bool.true","withinSemanticAxiomCeiling":true}},"title":"Answering an async request is an allowed transition from awaitingAsync"},{"concept":"host-session-protocol","contestedBy":[],"id":"reply-commute","literature":[{"locator":"audit C4","relation":"analogy","work":"LynchVaandrager1995"}],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Two accepted receipts for distinct keys commute as whole sessions. The machine,\nactive calls, call IDs, consumed ledger, and retired ownership are unchanged in either\norder. This is receipt/storage only, not `answerAsync` continuation execution. ","levels":[],"module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.reply_commute","restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (a b : Effect4.Api.HostSession.Reply),\n  Ne a.key b.key →\n    Eq (Effect4.Api.HostSession.submit s a).phase Effect4.Api.HostSession.Phase.preflight →\n      Eq (Effect4.Api.HostSession.submit s b).phase Effect4.Api.HostSession.Phase.preflight →\n        Eq (Effect4.Api.HostSession.submit (Effect4.Api.HostSession.submit s a).session b).session\n          (Effect4.Api.HostSession.submit (Effect4.Api.HostSession.submit s b).session a).session","withinSemanticAxiomCeiling":true}},"title":"Independent host replies commute in session submission"},{"concept":"host-session-protocol","contestedBy":[],"id":"session-success-prepared-membership","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"A session-accepted successful completion prepares the actual row-typed value, or it is\nadmitted at the call's checked instance and reaches the program unchanged. On the row's path\nmembership requires the selected row's shape-decided answer column. Failures, world-reading\ncolumns and token-world correlation remain outside this theorem. The session is not executed\nhere. ","levels":[],"module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_success_prepared_fits","restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (reply : Effect4.Api.HostSession.Reply)\n  (decision : Effect4.Program.NativeDecision) (value : Effect4.Machine.Val),\n  Eq\n      (s.machine.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq reply.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.success value)) →\n      Eq (Effect4.Api.HostSession.preflight s reply) (Except.ok decision) →\n        Or (Effect4.Api.HostSession.PreparedSuccess s reply decision)\n          (Effect4.Api.HostSession.InstanceSuccess s reply decision)","withinSemanticAxiomCeiling":true}},"title":"A session-accepted successful reply prepares a member of its selected shape-decided row, or, where the row's own columns refuse it, it is admitted at its call's checked instance (InstanceSuccess; decisions row 323)"},{"concept":"host-session-protocol","contestedBy":[],"id":"reply-at-call-instance","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A success admitted at its call's instance is a member of the instance's answer column**,\nholds no handle, and reaches the program unchanged: the machine's preparation leaves the stores\nas they are and answers the value itself. ","levels":[],"module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.instance_prepared_success","restsOn":[],"statement":"∀ (program : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (instanceAt : List Nat → Option (Effect4.Program.CallInstance Effect4.Program.NativeOp))\n  (m : Effect4.Program.NativeMachine) (r : Effect4.Program.RecordedReply)\n  (value : Effect4.Machine.Val),\n  Eq\n      (m.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq r.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.success value)) →\n      Effect4.Program.InstanceEnvelope table instanceAt m r →\n        Exists fun origin =>\n          Exists fun c =>\n            And (Eq (Effect4.Program.originOf m r.fiber r.token) (Option.some origin))\n              (And (Eq (instanceAt origin) (Option.some c))\n                (And (Eq c.op r.op)\n                  (And\n                    (Eq\n                      (Effect4.Program.Val.hasTy value c.answer\n                        (m.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)).externals.allocated)\n                      Bool.true)\n                    (And (Eq (Effect4.Store.Val.handles value) List.nil)\n                      (Eq\n                        (Effect4.Machine.prepareAsyncAnswer (Effect4.Program.interpOf program table)\n                          m r.fiber r.token r.completion)\n                        {\n                          fst :=\n                            m.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          snd := Effect4.Prim.success value })))))","withinSemanticAxiomCeiling":true}},"title":"A reply admitted at its call's checked instance is a handle-free member of the instance's answer column, and the machine prepares it unchanged, at a row whose answer column allocates nothing; a failure admitted there holds no reserved defect; the registration keeps its call's address and the session reads programCallAt there, from a table made once at open (reached_callInstance); in a recorded, funded run that address holds a call of the operation in the program (origin_addresses_call); the expansion of layer references keeping it there is open (decisions rows 183, 323)"},{"concept":"host-session-protocol","contestedBy":[],"id":"block-call-instance","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The claim `block-call-instance`.** On a program that the module check admits, the call\ninstance answers at every call, with the call's operation: inside a definition's body, in the\nmain program of a block, and in a program with no block. Before this law the session's call\ntable missed every call of a program with a block (seat HOST's probe, part B). ","levels":[],"module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.checkModule_programCallAt","restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {op : Op} {request : Effect4.Program.Term},\n  Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op request))) →\n      Exists fun c =>\n        And (Eq (Effect4.Program.programCallAt s List.nil p path) (Option.some c)) (Eq c.op op)","withinSemanticAxiomCeiling":true}},"title":"On a program that the module check admits, the call instance answers at every call, with the call's operation: in a definition's body at the block's signature and its declared request, in a block's main program at the block's signature, and in a program with no block (programCallAt over Eff.partAt); the session's call table is its lookup, so a session that start made has an instance at every call of its admitted program (start_callInstance_complete); it does not say that the expansion of layer references keeps a call at its address, nor anything of a run (decisions rows 323, 328, 333)"},{"concept":"host-session-protocol","contestedBy":[{"id":"E4-HOST-CE-008","record":"| `E4-HOST-CE-008` | REPAIRED 2026-10-03 (decisions row 191: `admit` and `externalAdmits` refuse a host failure carrying `badName` or `notImplemented`, `Refusal.reservedDefect`; `preflight_failure_noShapeDefect`, `Laws/Api/HostSession.lean`, `[propext, Quot.sound]`); SEEDED 2026-10-03 (Codex, `docs/research/2026-10-03-session-work/t4-audit.lean`; registered by Claude) | Executable admission is at least as strict as the typed exit judgment on failures: `admit = none` on a failing reply gives `CompletionStrong`, the failure half of `admit_sound` (T4) | `Test/Counterexamples/Machine/Runtime/HostReservedDefect.lean`: the session accepted `die badName` (`preflight` returned the answer decision, `admit` no refusal, `externalAdmits` true) while `ExitOk` refuses it at every world (`NoShapeDefect`, row 152) | Admission refuses the two reserved defects before reading the error column, on the decision path and the oracle path; ordinary defects and interrupts stay admitted at every error column. The value half of admission (row 97) is unchanged. |","registerStatus":"REPAIRED","witness":null}],"id":"session-failure-shape-free","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An accepted failing reply has no shape defect** (decisions row 191, `E4-HOST-CE-008`):\nexecutable admission refuses the reserved defects (`admit_failure_reservedFree`), so a\nsession-accepted failure satisfies `NoShapeDefect` at every type. This is the failure half of\n`admit_sound`, executable admission implying the ghost `AnswerOk`; the value half waits on\nrow 97's handle declarations, and the cause's membership in the error column is\n`external_error_typed`. ","levels":[],"module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_failure_noShapeDefect","restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (reply : Effect4.Api.HostSession.Reply)\n  (decision : Effect4.Program.NativeDecision) (c : Effect4.Machine.CauseV),\n  Eq reply.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.failure c)) →\n    Eq (Effect4.Api.HostSession.preflight s reply) (Except.ok decision) →\n      ∀ (ty : Effect4.Program.EffTy),\n        Effect4.Program.Typed.NoShapeDefect ty (Effect4.Exit.failure c)","withinSemanticAxiomCeiling":true}},"title":"A session-accepted failing reply carries no reserved defect: the failure half of admit_sound (decisions row 191, E4-HOST-CE-008)"},{"concept":"host-session-protocol","contestedBy":[],"id":"frontier-awaithost","literature":[],"role":"inversion","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":null,"levels":[],"module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_awaitingAsync_iff","restsOn":[],"statement":"∀ (why : Effect4.Machine.Exhaustion) (m : Effect4.Program.NativeMachine),\n  Iff (Eq (Effect4.Api.HostProtocol.observe m) Effect4.Api.HostProtocol.State.awaitingAsync)\n    (Exists fun key =>\n      List.instMembership.mem (Effect4.Api.frontierReasons why m)\n        (Effect4.Api.FrontierReason.awaitHost key))","withinSemanticAxiomCeiling":true}},"title":"Machine awaitingAsync state matches frontier awaitHost reasons"},{"concept":"host-session-protocol","contestedBy":[],"id":"host-progress","literature":[],"role":"progress","status":{"_tag":"assumed","reason":"Host session progress is subject to external driver execution; outside closed runtime","source":"docs/core/host-boundary.md"},"title":"Host session progress under external answers"},{"concept":"translation-simulation","contestedBy":[],"id":"recorded-call-tree-prefix","literature":[],"role":"inversion","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Run.CallTree.request_leads"],"witness":{"axioms":["Quot.sound","propext"],"doc":"Every accepted call binding names a wait in the admitted call tree.\nThe tape contains only exits carried by submitted replies in this run.\nThis is the command-prefix connection consumed by the original routing clause. ","levels":[],"module":"Effect4.Laws.Run.CallTree","name":"Effect4.Run.CallTree.bound_in_tree","restsOn":["Effect4.Run.CallTree.request_leads"],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq (Effect4.Program.Denote.StraightRows s.built.table s.built.program) Bool.true →\n      Eq (Effect4.Run.CallTree.NoCauseHandler s.built.program) Bool.true →\n        Effect4.Program.SourceScope.ExternalOnly s.built.program →\n          Effect4.Program.SourceScope.ConcreteReplies s.built.table →\n            ∀ (call : Effect4.Api.HostSession.Call) (token : Nat),\n              List.instMembership.mem (s.journal.zip s.phases)\n                  { fst := Effect4.Api.Runner.Command.bind call token,\n                    snd := Effect4.Api.HostSession.Phase.bound } →\n                Exists fun i =>\n                  Exists fun row =>\n                    Exists fun T =>\n                      And (Eq call.op (Effect4.Program.NativeOp.external i))\n                        (And (Eq (Effect4.Program.externalRow s.built.table i) (Option.some row))\n                          (And\n                            (∀ (ex : Effect4.Machine.ExitV),\n                              List.instMembership.mem T ex →\n                                Exists fun reply =>\n                                  And\n                                    (List.instMembership.mem s.journal\n                                      (Effect4.Api.Runner.Command.submit reply))\n                                    (Eq reply.completion (Effect4.Machine.Completion.ofExit ex)))\n                            (Eq (Effect4.Run.CallTree.treeWaits s.built.table s.built.program T)\n                              (Effect4.Program.Denote.RowsStop.waiting i call.request))))","withinSemanticAxiomCeiling":true}},"title":"Each recorded call binding on StraightRows without cause handlers names a wait in the admitted call tree, using replies submitted in that run; arbitrary command budget, no progress"},{"concept":"translation-simulation","contestedBy":[],"id":"run-eq-meaning","literature":[{"locator":"audit C10","relation":"analogy","work":"Leroy2009"}],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The ordinary run of a straight-line program, with fuel for its depth and its commands,\nfinishes with the exit and the stores of its meaning — under the op budget or past it, where\nthe root yields, parks, and `flush` fires its dispatcher round after round (`E4-DEN-CE-005`,\nrepaired). The trace is not pinned (`E4-DEN-CE-003`). ","levels":[],"module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.run_eq_meaning","restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    instLENat.le (Effect4.Program.Agreement.depth e) fuel →\n      instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps e)) 6) fuel →\n        And (Eq (Effect4.Api.run e fuel).outcome Effect4.Api.Outcome.finished)\n          (And\n            (Eq (Effect4.Api.run e fuel).exit\n              (Option.some\n                (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).fst))\n            (Eq (Effect4.Api.run e fuel).stores\n              (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).snd))","withinSemanticAxiomCeiling":true}},"title":"Frame machine execution matches denotational meaning on Straight fragment"},{"concept":"translation-simulation","contestedBy":[],"id":"loop-agreement","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The loop agreement (O12, S8a-L).** For every program of the loop-bearing fragment: when\nits budgeted meaning finishes at a budget `k`, the machine's ordinary run finishes with that\nexit and those stores at every fuel past a bound. The bound is the compile depth and twice the\nlocal step bound at `k`; by `meaningB_unique` the answer does not depend on the budget that\nfound it. ","levels":[],"module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loopAgreement","restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff),\n  Eq (Effect4.Program.Denote.Looped e) Bool.true → Effect4.Program.Agreement.LoopAgreement e","withinSemanticAxiomCeiling":true}},"title":"Loop agreement on the loop-bearing fragment (Looped)"},{"concept":"translation-simulation","contestedBy":[],"id":"run-eq-ref","literature":[{"locator":"audit C4","relation":"proofTechnique","work":"LynchVaandrager1995"}],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**`run_eq_ref`.** The frame machine's replay and the term reference's replay of the\nsame program, at the same compile and command budget, on the same `Completion` tape, end\nthe same way and observe the same thing: every fiber's exit and the whole\nstores. No premise: the relation is inhabited at the load and preserved by every command.\nNothing is said about an external host.\n\n**At the empty table** (DI-57). `Api.replay` takes a `RowTable`; this theorem takes none, so\nit stays at its default, the empty table. The reference takes the row table too (`interpR`,\n`replayR`), and the agreement at every row table is `run_eq_ref_table`\n(`Laws/Program/Table/Agreement.lean`, decisions row 314). ","levels":[],"module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.run_eq_ref","restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat) (tape : List Effect4.Api.Decision),\n  And\n    (Eq (Effect4.Api.replay e fuel tape).outcome\n      (Effect4.Program.Sched.classify (Effect4.Program.Sched.replayR e fuel tape)))\n    (Eq (Effect4.Machine.obs (Effect4.Api.replay e fuel tape).machine)\n      (Effect4.Program.Sched.obsR\n        (Effect4.Machine.ReplayResult.machine (Effect4.Program.Sched.replayR e fuel tape))))","withinSemanticAxiomCeiling":true}},"title":"Frame machine replay matches term reference replay at empty host table"},{"concept":"translation-simulation","contestedBy":[],"id":"profile-plus-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The checked row answers exactly when the reference row answers inside the profile.**\nPremise: both arguments are inside it. ","levels":[],"module":"Effect4.Laws.Machine.IntegerProfile","name":"Effect4.Program.intAddIn_eq_some_iff","restsOn":[],"statement":"∀ (bound : Nat) (x y v : Effect4.Machine.Val),\n  Eq (Effect4.Program.Within bound x) Bool.true →\n    Eq (Effect4.Program.Within bound y) Bool.true →\n      Iff (Eq (Effect4.Program.intAddIn bound x y) (Option.some v))\n        (And (Eq (Effect4.Program.intAdd x y) (Option.some v))\n          (Eq (Effect4.Program.Within bound v) Bool.true))","withinSemanticAxiomCeiling":true}},"title":"The checked integer addition answers exactly when the reference addition answers inside the profile, for two arguments inside it: a face equals the reference inside its profile and refuses outside it (DI-56), for the one operation that grows; nothing about the OCaml row or the TypeScript helper, each a trusted row run by a control (decisions rows 108 and 321)"},{"concept":"translation-simulation","contestedBy":[],"id":"profile-mul-exact","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["propext"],"doc":"The represented natural multiplication uses exactly the checked product judgment.\nClaim: profile-mul-exact, translation-simulation R8. Target execution remains a separate control. ","levels":[],"module":"Effect4.Laws.Machine.IntegerProfile","name":"Effect4.Program.mulIn_eq_some_iff","restsOn":[],"statement":"∀ (bound a b n : Nat),\n  Iff (Eq (Effect4.Program.scaleIn bound a b) (Option.some n))\n    (And\n      (Eq\n        (Effect4.Program.NativeAtom.mul.eval\n          (List.cons (Effect4.Store.Val.nat a) (List.cons (Effect4.Store.Val.nat b) List.nil)))\n        (Option.some (Effect4.Store.Val.nat n)))\n      (Eq (Effect4.Program.Within bound (Effect4.Store.Val.nat n)) Bool.true))","withinSemanticAxiomCeiling":true}},"title":"The checked natural multiplication answers exactly for the represented atom product inside the supplied bound; target rows remain trusted implementations with finite controls (DI-56)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-straight","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**On `Straight` the tree is `denote`'s tree, injected on the left.** The connector of the\ntwo denotations: `denote` is `denoteRows` at no host call. ","levels":[],"module":"Effect4.Laws.Program.DenoteRows","name":"Effect4.Program.Denote.denoteRows_straight","restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRows table e env) (Effect4.Program.Denote.denote e env).inl","withinSemanticAxiomCeiling":true}},"title":"The call tree over the stores and the host rows extends denote: on Straight it is denote's tree injected on the left of the coproduct (DI-69; the fragment StraightRows admits catchIf, decisions row 310)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-append","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**C2 for host rows, on the fragment**: the meaning of an old program under a host of an\nappended table is its meaning under that host's restriction to its own table. ","levels":[],"module":"Effect4.Laws.Program.DenoteRowsAppend","name":"Effect4.Program.Denote.meaningUnder_append","restsOn":[],"statement":"∀ {σ : Type} (table ext : Effect4.Program.RowTable)\n  (host :\n    Effects.Handler (Effect4.Program.Denote.RowSig (instHAppendOfAppend.hAppend table ext))\n      (StateT σ Option))\n  (e : Effect4.Program.NativeEff) (env : List Effect4.Machine.Val) (s : Effect4.Machine.Stores)\n  (state : σ),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    Eq (Effect4.Program.Denote.meaningUnder host e env s state)\n      (Effect4.Program.Denote.meaningUnder (Effect4.Program.Denote.restrictRows table ext host) e\n        env s state)","withinSemanticAxiomCeiling":true}},"title":"C2 of DB-01 for host rows, on StraightRows: the meaning of an old program under a host of an appended row table is its meaning under that host restricted to its own rows (nothing outside the fragment, where C2 stays operational; decisions row 310)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-reference","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The reference's term of a program of the fragment, with its control markers erased, is\nthe program's tree over the stores and the rows**, when the compile budget covers its depth.\nIt extends `denoteR_straight` by the one arm of a host call. ","levels":[],"module":"Effect4.Laws.Program.DenoteRowsR","name":"Effect4.Program.Sched.denoteR_straightRows","restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (e : Effect4.Program.NativeEff) (p : Effect4.Program.Point),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    instLENat.le (Effect4.Program.Sched.depthRows e) p.fuel →\n      Eq (Effect4.Program.Sched.eraseControl (Effect4.Program.Sched.denoteR root e p))\n        (Effects.interpret (Effect4.Program.Sched.toRef table)\n          (Effect4.Program.Denote.denoteRows table e p.env))","withinSemanticAxiomCeiling":true}},"title":"The reference machine's term of a StraightRows program, its control markers erased, is the program's call tree read into the reference machine's signature, when the compile budget covers the program's depth (a step of rows-denotation-session on the reference route; decisions row 310)"},{"concept":"translation-simulation","contestedBy":[],"id":"run-eq-ref-table","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The frame machine and the reference machine agree at every row table** (DI-57). On every\nprogram, row table, decision tape and pair of budgets, the two replays end in the same class,\nand they have the same observation `obs`: every fiber's exit and the whole stores, the external\nallocations included. It is `Machine.Book`'s replay theorem at the two instances at the table:\n`stepAgrees` and `hooksAgree_of` hold at every row table under the store invariant `StoresOk`,\nwhose clause `externals` holds at the empty row table alone; the registration arm answers\nnothing on both machines, since a host answer is a decision (DI-23). Reach: no premise on the\ntape, so an answer that no session admits is in reach. It does not establish reply admission,\nthe typing of a reply, a host's conformance or the session's ledger. `run_eq_ref` is its\ninstance at the empty row table. Concept `translation-simulation`, claim `run-eq-ref-table`,\nrole simulation; requirement R6. Consumer: `session_eq_ref`. ","levels":[],"module":"Effect4.Laws.Program.Table.Agreement","name":"Effect4.Program.Sched.run_eq_ref_table","restsOn":[],"statement":"Effect4.Program.Sched.RunEqRefTable","withinSemanticAxiomCeiling":true}},"title":"The frame machine and the reference machine agree at every row table: on every program, decision tape and pair of budgets, the same class and the same observation obs (no premise on the tape; a host answer reaches either machine only as a decision, DI-23; nothing of reply admission, reply typing, a host's conformance or the session's ledger; DI-57, decisions rows 310 and 314)"},{"concept":"translation-simulation","contestedBy":[],"id":"session-eq-ref","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A session's reading is the reference machine's replay of the run's tape** (DI-57). For a\nrecorded run that is funded, the session's class and observation are the class and observation\nof the reference machine's replay of the run's own tape, at the run's row table and budgets.\nReach: any built program and any journal, under `funded`: no row of the journal is a stopped\nrow. It does not establish that a run is funded, the session's ledger, reply admission or a\nhost's conformance. A run with a stopped row is outside it: the control is three calls at a\ncommand budget of 5. It is proved by `session_eq_ref_of_raw` from `run_eq_ref_table`\n(slice H6a), so it rests on no planned goal. Concept\n`translation-simulation`, claim `session-eq-ref`, role simulation; requirement R6. Consumer: the\ntyped session (decisions row 99), and the meaning of a run's certificate. ","levels":[],"module":"Effect4.Laws.Api.SessionRef","name":"Effect4.Run.session_eq_ref","restsOn":[],"statement":"Effect4.Program.Sched.SessionEqRef","withinSemanticAxiomCeiling":true}},"title":"A session's reading is the reference machine's replay of the run's own tape: for a recorded, funded run, the same class and the same observation (proved by session_eq_ref_of_raw from run_eq_ref_table; nothing about a run with a stopped row, the session's ledger or reply admission; DI-57, decisions rows 310 and 314)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-session","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The meaning under a run's reply tape is the run's observation** (DI-69). For a recorded\nrun of a program of the fragment, the meaning of the program under the run's reply tape is the\nroot's exit with the stores, and the reply tape is read to its end. Where the root has no exit,\nthe meaning is the frontier. Reach: `StraightRows`, one fiber, every compile budget; a run that\nis funded, at rest and driven by a host: its controls evaluate the root or flush, and each reply\nholds an exit. It does not establish the same for a run with an interruption, a clock step, a\ndelayed cell read or a handle row: each has a red control. It says nothing of a fiber, a scope or\na loop. Concept `translation-simulation`, claim `rows-denotation-session`, role simulation;\nrequirement R6. Consumer: a fact of a program's call tree, read on a run.\n\nThe proof (slice H8): the session's tape is answered (`tapeFrom_answered`); each decision keeps\nthe machine in a settled form whose position the local run with calls reaches (`tape_holds`); a\nmachine at rest is exited or waits on a call; and there the meaning is what the local run says\n(`meaning_settled`), the compile's frontier being a divergence that rest excludes. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaning","name":"Effect4.Run.denoteRows_eq_session","restsOn":[],"statement":"Effect4.Run.DenoteRowsEqSession Effect4.Program.Denote.StraightRows","withinSemanticAxiomCeiling":true}},"title":"The meaning of a StraightRows program under a run's reply tape is the root's exit with the stores, or the frontier: for a recorded run that is funded, at rest and driven by a host (one fiber; nothing about an interruption, a clock step, a delayed cell read or a handle row; DI-69, decisions row 310)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-host","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H9: the host as a handler.** For a recorded run of a program of the fragment that is\nfunded, at rest, driven by a host, and whose root exited: under any host whose answers are the\nrun's (`HostAnswered`), the run of the program's call tree under that host is the root's exit\nwith the stores, and the host ends at the state the run's answers left it in. The reply host is\none host: H8. Reach: `StraightRows`, one fiber, every compile budget, finished runs. It does not\nestablish that a host's drive finishes (progress), nor anything of a run that stopped at a call,\nan interruption, a clock step or a handle row. Concept `translation-simulation`, role\nsimulation; requirement R6. Consumer: host utilities composed with `Effects.Comodel`'s\nconstructions (`docs/research/2026-10-09-host-coalgebra.md`, slice CO-5). ","levels":[],"module":"Effect4.Laws.Api.SessionMeaning","name":"Effect4.Run.denoteRows_eq_session_host","restsOn":[],"statement":"Effect4.Run.DenoteRowsEqSessionHost Effect4.Program.Denote.StraightRows","withinSemanticAxiomCeiling":true}},"title":"H9, the host as a handler: for a recorded StraightRows run that is funded, at rest, driven by a host and finished, under any host (a comodel of the row signature) whose answers are the run's, the host's run of the call tree is the root's exit with the stores and the host ends where the answers left it (one fiber; no progress claim; nothing about a run stopped at a call, an interruption, a clock step or a handle row; decisions row 310; the coalgebra note, slice CO-5)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-loop-session","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H8 on loops** (Q7): for a recorded run of a program of the row fragment with loops that is\nfunded, at rest and driven by a host, past a budget bound the coarse observation of the budgeted\nmeaning under the run's reply tape is the root's exit with the stores, the tape read to its end;\nwhere the root has no exit it is `none`. Concept `translation-simulation`, claim\n`rows-loop-session`, role simulation; requirement R6. Consumers: the paged data-row client and the\ndriver theorem on loops. It establishes no scope, external handle allocation, interruption, fork,\nprogress or target claim, and no waiting position's stores or request. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.h8_loopedRows","restsOn":[],"statement":"Effect4.Run.H8LoopedRows","withinSemanticAxiomCeiling":true}},"title":"H8 on loops: for a recorded run of a LoopedRows program the row fragment with loops admits (LoopedDataRows), funded, at rest and driven by a host, past a budget bound the coarse observation of the budgeted meaning under the run's reply tape is the root's exit with the stores, or none (one fiber; no global compile-depth premise; a budget cut is no failure and no divergence; nothing of a waiting position's stores or request, a scope, a handle allocation, a fork or an interruption; the host-meaning widening, slice L1)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-loop-host","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H9 on loops** (Q8): for a finished recorded run of the same fragment, under any host whose\nanswers are the run's (`HostAnswered`), past a budget bound the budgeted meaning under the host is\nthe root's exit with the stores, and the host ends where the answers left it. H8 on loops at a\nfinished run is its instance at the reply host. Concept `translation-simulation`, claim\n`rows-loop-host`, role simulation; requirement R6. Consumer: the driver theorem on loops (Q9). It\ndoes not establish that a host's drive finishes, nor anything of a run that stopped at a call. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.denoteRowsB_eq_session_host","restsOn":[],"statement":"Effect4.Run.H9LoopedRows","withinSemanticAxiomCeiling":true}},"title":"H9 on loops: for a finished recorded run of the same fragment, under any host whose answers are the run's, past a budget bound the budgeted meaning under the host is the root's exit with the stores and the host ends where the answers left it (no progress claim; nothing of a run stopped at a call; the host-meaning widening, slice L1)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-loop-driver","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H9 at the driver, on loops** (Q9): open a program of the row fragment with loops, evaluate\nits root and drive it with a reactor inside the envelope that answers with exits. When the run is\nfunded, at rest and its root exited, past a budget bound the reactor read as a host runs the\nbudgeted call tree to the root's exit with the run's stores, and ends at the drive's state.\n`runWith_denotes` with H9 on loops in place of H9. It does not establish that the drive\nfinishes, that its rounds suffice, or that the run is funded. Concept `translation-simulation`,\nclaim `rows-loop-driver`, role simulation; requirement R6. Consumer: the run interface's hosts\non stream and paging modules. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.runWith_denotesB","restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  r.Envelops b.table →\n    r.ExitsOnly →\n      Eq (Effect4.Program.Denote.LoopedRows b.program) Bool.true →\n        Eq (Effect4.Program.Denote.LoopedDataRows b.table b.program) Bool.true →\n          Eq (Effect4.Run.runWith b r st id budget rounds).fst.funded Bool.true →\n            Eq (Effect4.Run.runWith b r st id budget rounds).fst.atRest Bool.true →\n              ∀ (ex : Effect4.Machine.ExitV),\n                Eq (Effect4.Run.runWith b r st id budget rounds).fst.exit (Option.some ex) →\n                  Exists fun lower =>\n                    ∀ (k : Nat),\n                      instLENat.le lower k →\n                        Eq\n                          (Effect4.Program.Denote.hostRunB (Effect4.Run.reactorHost b.table r) k\n                            b.program List.nil Effect4.Machine.Stores.empty st)\n                          (Option.some\n                            { fst := Option.some ex,\n                              snd :=\n                                {\n                                  fst :=\n                                    (Effect4.Run.runWith b r st id budget rounds).fst.machine.state\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)\n                                      (Effect4.FrameEvent Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann),\n                                  snd := (Effect4.Run.runWith b r st id budget rounds).snd } })","withinSemanticAxiomCeiling":true}},"title":"H9 at the driver on loops: open a LoopedRows program the row fragment with loops admits, evaluate its root and drive it with a reactor inside the envelope that answers with exits (Run.runWith); when the run is funded, at rest and its root exited, past a budget bound the reactor read as a host runs the budgeted call tree to the root's exit with the stores and ends at the drive's state (no progress claim; the host-meaning widening, Q9)"},{"concept":"host-session-protocol","contestedBy":[],"id":"rows-loop-frontier","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H8's detailed frontier on loops** (Q4): for a recorded run of a program of the row fragment\nwith loops that is funded, at rest and driven by a host, every call the machine waits on is a\nhost row, and past a budget bound the detailed observation of the budgeted meaning under the\nrun's reply tape waits at that row and request, with the machine's stores and the tape read to\nits end. The session prefix (`session_settled`) leaves a root parked on that call, and the local\nwait is the meaning's (`localWaitC_to_rowsB`). Concept `host-session-protocol`, claim\n`rows-loop-frontier`, role simulation; requirement R12 (and R6). Consumers: the waiting driver and\nthe resource prefix (slices S1 and S2). It establishes no progress: a wait is a frontier, never a\nfailure, and nothing says the host answers; nothing of a fork, a scope or an interruption. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.rows_loop_frontier","restsOn":[],"statement":"Effect4.Run.H8FrontierLoopedRows","withinSemanticAxiomCeiling":true}},"title":"H8's detailed frontier on loops: for a recorded run of a LoopedRows program the row fragment with loops admits, funded, at rest and driven by a host, every call the machine waits on is a host row, and past a budget bound the detailed observation of the budgeted meaning under the run's reply tape waits at that row and request, with the machine's stores and the tape read to its end (no progress claim: a wait is a frontier, never a failure; nothing of a fork, a scope or an interruption; the host-meaning widening, slice L4)"},{"concept":"host-session-protocol","contestedBy":[],"id":"rows-loop-frontier-host","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H9's detailed frontier on loops** (Q4 under a host): as `rows_loop_frontier`, under any host\nwhose answers are the run's (`HostAnswered`) and which does not answer the call the machine waits\non: past a budget bound the meaning under the host waits at that call, with the machine's stores\nand the host where the answers left it. Concept `host-session-protocol`, claim\n`rows-loop-frontier-host`, role simulation; requirement R12 (and R6). It does not establish that the\nhost leaves the call unanswered: that is the premise. ","levels":[],"module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.rows_loop_frontier_host","restsOn":[],"statement":"Effect4.Run.H9FrontierLoopedRows","withinSemanticAxiomCeiling":true}},"title":"H9's detailed frontier on loops: the same under any host whose answers are the run's and which leaves the waited call unanswered: past a budget bound the meaning under the host waits at that call, with the machine's stores and the host where the answers left it (the host's silence is a premise; the host-meaning widening, slice L4)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-loop-straight","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**On `StraightRows` the budgeted meaning is `denoteRows`, finished** (Q1, the conservative\nconnector): no budget is read. Each arm is `thenOpt_map_some` and the induction. Claim\n`rows-loop-straight`. ","levels":[],"module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.denoteRowsB_straight","restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (k : Nat) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRowsB table k e env)\n      (Effects.Program.instMonad.map Option.some (Effect4.Program.Denote.denoteRows table e env))","withinSemanticAxiomCeiling":true}},"title":"The budgeted row meaning extends the row meaning: on StraightRows it is denoteRows finished, at every budget (the host-meaning widening, Q1)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-loop-looped","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**On `Looped` the budgeted meaning is `denoteB`, injected on the left** (Q1): a host-free\nloop calls no row. The left injection commutes with each arm (`inl_thenOpt`, `inl_iter`,\n`inl_loopStep`), and a leaf is `denoteRows_straight`. Claim `rows-loop-looped`. ","levels":[],"module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.denoteRowsB_looped","restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (k : Nat) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.Looped e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRowsB table k e env)\n      (Effect4.Program.Denote.denoteB k e env).inl","withinSemanticAxiomCeiling":true}},"title":"The budgeted row meaning extends the loop meaning: on Looped it is denoteB injected on the left of the coproduct, at the same budget (the host-meaning widening, Q1)"},{"concept":"translation-simulation","contestedBy":[],"id":"rows-denotation-driver","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**H9 at the driver**: the reactor's run of the call tree is the driver's. Open a program of\nthe fragment, evaluate its root and drive it with a reactor inside the envelope that answers\nwith exits. When the run is funded, at rest and its root exited, the reactor read as a host runs\nthe program's call tree to the root's exit with the run's stores, and ends at the drive's state.\nReach: `StraightRows`, one fiber, a reactor inside the envelope that answers with exits. It does\nnot establish that the drive finishes, that its rounds suffice, or that the run is funded.\nConcept `translation-simulation`, role simulation; requirement R6. Consumer: the run\ninterface's hosts, composed by `Effects.Comodel` (slice CO-6). ","levels":[],"module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_denotes","restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  r.Envelops b.table →\n    r.ExitsOnly →\n      Eq (Effect4.Program.Denote.StraightRows b.table b.program) Bool.true →\n        Eq (Effect4.Run.runWith b r st id budget rounds).fst.funded Bool.true →\n          Eq (Effect4.Run.runWith b r st id budget rounds).fst.atRest Bool.true →\n            ∀ (ex : Effect4.Machine.ExitV),\n              Eq (Effect4.Run.runWith b r st id budget rounds).fst.exit (Option.some ex) →\n                Eq\n                  (Effect4.Program.Denote.hostRun (Effect4.Run.reactorHost b.table r) b.program\n                    List.nil Effect4.Machine.Stores.empty st)\n                  (Option.some\n                    { fst := ex,\n                      snd :=\n                        {\n                          fst :=\n                            (Effect4.Run.runWith b r st id budget rounds).fst.machine.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          snd := (Effect4.Run.runWith b r st id budget rounds).snd } })","withinSemanticAxiomCeiling":true}},"title":"H9 at the driver: open a StraightRows program, evaluate its root and drive it with a reactor inside the envelope that answers with exits (Run.runWith); when the run is funded, at rest and its root exited, the reactor read as a host runs the call tree to the root's exit with the stores and ends at the drive's state (one fiber; no progress claim: nothing shows that the drive finishes, that its rounds suffice or that the run is funded; the coalgebra note, slice CO-6)"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-route","literature":[{"locator":"audit P36","relation":"analogy","work":"WrightFelleisen1994"}],"role":"fundamentalProperty","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**M7 from the ledger** (decisions row 138's route): `loadsTyped` and\n`decision_preserves` at one source and budget give M7a–c at every answer-free tape. ","levels":[],"module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.m7_of_ledger","restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Effect4.Program.Typed.LoadsTyped root rootTy fuel fuel →\n    (∀ (d : Effect4.Api.Decision), Effect4.Program.Typed.DecisionKeeps root rootTy fuel d) →\n      And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n        (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n          (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","withinSemanticAxiomCeiling":true}},"title":"M7 conditional route: typed exits and stores from ledger hypotheses M5 and M6"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-exits-typed","literature":[{"locator":"audit P36","relation":"analogy","work":"WrightFelleisen1994"}],"role":"adequacy","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**M7a–c** (decisions row 138): on the M7 fragment (the empty host table, a checked closed\nsource, answer-free tapes), the frame machine's observation is typed and its run never halts:\n`m7_of_ledger` at the proved load (`loadsTyped`) and decisions (`decision_preserves`). The frame\nmachine only: not the OCaml engine, not a TypeScript run. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.m7_proved","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n    (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n      (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","withinSemanticAxiomCeiling":true}},"title":"M7a: every exit the observation records fits its fiber's declared type on M7Fragment"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-stores-typed","literature":[],"role":"adequacy","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**M7a–c** (decisions row 138): on the M7 fragment (the empty host table, a checked closed\nsource, answer-free tapes), the frame machine's observation is typed and its run never halts:\n`m7_of_ledger` at the proved load (`loadsTyped`) and decisions (`decision_preserves`). The frame\nmachine only: not the OCaml engine, not a TypeScript run. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.m7_proved","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n    (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n      (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","withinSemanticAxiomCeiling":true}},"title":"M7b: the observed stores fit at a world that describes them on M7Fragment"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-never-halts","literature":[],"role":"progress","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**M7a–c** (decisions row 138): on the M7 fragment (the empty host table, a checked closed\nsource, answer-free tapes), the frame machine's observation is typed and its run never halts:\n`m7_of_ledger` at the proved load (`loadsTyped`) and decisions (`decision_preserves`). The frame\nmachine only: not the OCaml engine, not a TypeScript run. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.m7_proved","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n    (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n      (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","withinSemanticAxiomCeiling":true}},"title":"M7c: the frame machine never halts on M7Fragment (row 139's stuck = none in J)"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-admitted","literature":[],"role":"fundamentalProperty","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**M7 for a program the API admits** at an empty row table (R9 at the API's admission, within\n`M7Fragment`): with a closed requirement row and an answer-free tape, its replay's exits fit, its\nstores fit, and the frame machine has not halted. The services may be declared. ","levels":[],"module":"Effect4.Laws.Program.Typed.AdmittedSource","name":"Effect4.Program.Typed.m7_admitted","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (a : Effect4.Program.AdmittedProgram program app),\n  Eq app.rows List.nil →\n    ∀ (fuel : Nat) (tape : List Effect4.Api.Decision),\n      Eq a.ty.requires Effect4.Machine.Env.Requirement.empty →\n        (∀ (d : Effect4.Api.Decision),\n            List.instMembership.mem tape d → Effect4.Program.Typed.NoHostAnswer d) →\n          And (Effect4.Program.Typed.M7Exits a.source a.ty fuel tape)\n            (And (Effect4.Program.Typed.M7Stores a.source a.ty fuel tape)\n              (Effect4.Program.Typed.M7NoHalt a.source a.ty fuel tape))","withinSemanticAxiomCeiling":true}},"title":"M7a–c for a program the API admits at the empty row table, with a closed requirement row and an answer-free tape"},{"concept":"residual-program-typing","contestedBy":[{"id":"E4-TYPED-CE-041","record":"| `E4-TYPED-CE-041` | REPAIRED 2026-10-04 (seat S, branch `seat/sigapp`: decisions row 21's slice, step 2; `lawfulSig_of_admitted` has no premise, `[propext, Quot.sound]`); SEEDED 2026-10-04 (Claude, the Σ_app slice survey; kernel-checked by `decide +kernel`) | A program the API admits denotes a lawful source: `AdmittedProgram program table` implies `LawfulSig ⟨table, []⟩`, the premise of M5–M7 (`ProgramSource.lawful`) | `Test/Counterexamples/Program/AdmissionUnserved.lean`, one witness per clause the API did not check: a row requiring the key at service code 30, which no built-in carrier serves, performed by the program; a row whose answer mentions an unbound parameter; a parameter under a union head. Each was admitted by `admitProgram` and refused by `admitSig`. Repaired: `admitProgram` refuses each with the refusal `admitSig` gives (`refused`: `.signature (.unservedKey 0 appKey)`; `refused_unscoped`: `.signature (.row 0 .notWellScoped)`; `refused_union`: `.signature (.row 0 (.templateNotAdmissible \"request\"))`; `decide +kernel`), `not_lawful` stays, and each old acceptance is a red control under `#guard_msgs (error)`; the green controls admit clause 1's program once the application declares the key's carrier (`admitted_served`) and type a read of the declared service at its carrier (`admitted_reads_declared`, against `refused_reads_undeclared`) | decisions row 21's slice, step 2 (`docs/research/2026-10-04-claude-lead/sigapp-slice-plan.md`): program admission runs the signature's located refusal (`admitSig`, `src/Effect4/Program/SigApp.lean`) at `AdmittedProgram program app`, whose certificate holds `admitSig app = .ok ()`; the bridge `lawfulSig_of_admitted` is `admitSig_ok_iff` read off that field, and the premise `AdmissionGap` is deleted |","registerStatus":"REPAIRED","witness":null}],"id":"admitted-source-lawful","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The bridge** (proved; claim `admitted-source-lawful`). An admitted program's signature is\nlawful: admission ran `admitSig` (decisions row 21), and `admitSig_ok_iff` reads its `ok` as\n`LawfulSig`. `E4-TYPED-CE-041`'s three witnesses, which the table-indexed admission admitted, are\nrefused now (`Test/Counterexamples/Program/AdmissionUnserved.lean`). ","levels":[],"module":"Effect4.Laws.Program.Typed.AdmittedSource","name":"Effect4.Program.Typed.lawfulSig_of_admitted","restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (a : Effect4.Program.AdmittedProgram program app), Effect4.Program.LawfulSig app","withinSemanticAxiomCeiling":true}},"title":"An admitted program's signature, its row table and its service declarations, is lawful: program admission runs admitSig (the bridge from admission to the typed state)"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-exit-handles-valid","literature":[],"role":"preservation","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**Recorded successes name only live handles** (`exitHandles_valid`, organization M4, row\n139): on every reachable machine of a checked program, a fiber's successful exit value is valid in\nthe machine's stores. `J` holds there (`reachable_typed`, with a closed root row), the exit\nfits its fiber's declared type, and a member of any type is valid in a typed store\n(`fits_validIn`, the F-WF repair). The exit connector's validity premise. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.exitHandles_valid","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (m : Effect4.Program.Sched.RState), Effect4.Program.Typed.ExitHandlesValid root rootTy fuel m","withinSemanticAxiomCeiling":true}},"title":"Recorded exits name only live scope handles on every reachable machine (row 139)"},{"concept":"translation-simulation","contestedBy":[],"id":"obs-typed-admitted","literature":[],"role":"adequacy","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**The frame machine's observation on every admitted tape is typed** and its run has not\nhalted: `reachable_typed` across `run_eq_ref`'s relation (`obsTyped_admitted`). M7a–c without the\nfragment's lawful and answer-free premises; row 117's closed row remains; the frame machine at its empty row table\nonly. ","levels":[],"module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.obs_typed","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n        Exists fun w =>\n          And\n            (Effect4.Program.Typed.MachineTyped root rootTy w\n              (Effect4.Machine.ReplayResult.machine\n                (Effect4.Program.Sched.replayR root.program fuel tape)))\n            (And\n              (Effect4.Program.Typed.ExitsFit rootTy w\n                (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine))\n              (And\n                (Effect4.Program.Typed.StoresFit root w\n                  (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine).stores)\n                (Eq\n                  ((Effect4.Api.replay root.program fuel tape).machine.stuck\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                  Option.none)))","withinSemanticAxiomCeiling":true}},"title":"The frame machine's observation on every ghost-admitted tape of a checked program is typed and the run has not halted"},{"concept":"translation-simulation","contestedBy":[],"id":"m7-results-exit-hasty","literature":[],"role":"adequacy","status":{"_tag":"modulo","by":"theorem","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"witness":{"axioms":["Quot.sound","propext"],"doc":"**T1. Recorded exits have their declared type, in the meaning layer's judgment.** On every\nadmitted tape of a checked program, there is a declaration of the fibers, the root at the program's\ntype, under which every exit the frame machine's observation records satisfies\n`Denote.ExitHasTy` at its fiber's type over the observed stores. ","levels":[],"module":"Effect4.Laws.Program.Typed.Results","name":"Effect4.Program.Typed.exits_hasTy","restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n        Exists fun Γ =>\n          And (Eq (Γ Effect4.Api.root) (Option.some rootTy))\n            (∀ (id : Effect4.FiberId) (ex : Effect4.Machine.ExitV),\n              List.instMembership.mem\n                  (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine).exits\n                  { fst := id, snd := Option.some ex } →\n                Exists fun ty =>\n                  And (Eq (Γ id) (Option.some ty))\n                    (Effect4.Program.Denote.ExitHasTy ty.answer ty.error\n                      (Effect4.Machine.obs\n                          (Effect4.Api.replay root.program fuel tape).machine).stores\n                      ex))","withinSemanticAxiomCeiling":true}},"title":"Every recorded exit of a checked program's frame-machine run satisfies the meaning layer's exit judgment at its declared type (T1)"},{"concept":"translation-simulation","contestedBy":[],"id":"replay-externals","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**No replay allocates an external handle**, on every tape, host answers included: the frame\nmachine runs at the empty row table, where the external registration and the prepared answer\nfall back without minting (`StoresOk.externals`). The exit connector's allocation premise\n(`exitHasTy_of_fitsExit`). ","levels":[],"module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_externals","restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat) (tape : List Effect4.Api.Decision),\n  Eq\n    ((Effect4.Api.replay e fuel tape).machine.state\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).externals.allocated\n    List.nil","withinSemanticAxiomCeiling":true}},"title":"No replay at the empty row table allocates an external handle"},{"concept":"translation-simulation","contestedBy":[],"id":"run-controls-replay","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Journaled control execution agrees with raw frame replay at the same machine, table\nand command budget when every added row progressed. The initial machine already fixes the\ncompile budget. Earlier phases may include host answers, refusals or fuel frontiers.\n\nThis is machine equality, not equality of session metadata or an assertion that the program\nhas finished. A refused row or an insufficient-budget row cannot satisfy the premise. ","levels":[],"module":"Effect4.Laws.Run","name":"Effect4.Run.play_controls_eq_replay","restsOn":[],"statement":"∀ (s : Effect4.Run) (tape : List Effect4.Api.Decision),\n  Eq (s.play (Effect4.Rows.tape tape)).phases\n      (instHAppendOfAppend.hAppend s.phases\n        (List.replicate tape.length Effect4.Api.HostSession.Phase.progressed)) →\n    Eq (s.play (Effect4.Rows.tape tape)).machine\n      (Effect4.Run.machineOf\n        (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel tape s.machine))","withinSemanticAxiomCeiling":true}},"title":"Journaled control rows leave the raw replay's machine whenever every added phase progressed"},{"concept":"translation-simulation","contestedBy":[],"id":"run-tape-replay","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A journal's machine is the raw replay of its tape.** When the tape reads every row, the\nmachine that the journal leaves is the machine that the raw frame replay leaves on the tape's\ndecisions, at the same table and budgets. It is the machine clause of a lowered run: a replay of\nthe machine alone needs the tape, not the session. Reach: any run, any rows whose tape reads to\nthe end: no row at a frontier, and every decision taken at a live machine with enough fuel. It\nneeds no premise on the session, because the tape holds the decision that the session hands the\nmachine: a reply's own answer decision (`replyDecision`). It does not establish equal session\nledgers: the raw replay has none. It does not reach a journal that stops at a frontier, and it\nsays nothing of a lowered engine: that link is the finite comparison of\n`ocaml/engine/test/scenarios/test_scenarios.ml`. It extends `play_controls_eq_replay`\n(`src/Effect4/Laws/Run.lean`) from control rows to reply applications. Concept\n`translation-simulation`, R8. Consumer: the lowered runs of `Test/Dogfood/Scenario/Lowered.lean`,\nwhose finite runs check it at every position of every fixture. ","levels":[],"module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tape_replays","restsOn":[],"statement":"Effect4.Run.TapeReplays","withinSemanticAxiomCeiling":true}},"title":"A journal's machine is the raw replay of its tape: the controls that progressed and the reply applications, each as the decision the session hands the machine (machine equality for any run and any journal whose tape reads to its end; no session ledger, no journal that stops at a frontier, no lowered engine; decisions row 254)"},{"concept":"translation-simulation","contestedBy":[],"id":"funded-run-replay","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The machine of a funded run is the raw replay of its tape's decisions.** For a recorded\nrun whose journal holds no stopped row, the machine is the machine that the raw frame replay\nleaves on the decisions of the run's tape, from the program's own load, at the run's table and\nbudgets. Reach: any run that was opened and then played (`Run.Reached`), under `funded`. It is\none application of `tape_replays` at the run's fresh open, with `Run.journal_replays`. It does\nnot establish that a run is funded: that is the open claim `embedded-budget-sufficient`. It does\nnot establish equal session ledgers, and it says nothing of a run with a stopped row. Concept\n`translation-simulation`, R8. Consumer: each statement over runs that takes `funded` as its\nbudget premise, the planned goals of `Test/Dogfood/Scenario/QueueWorkers.lean` first. ","levels":[],"module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.funded_replays","restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.funded Bool.true →\n      Eq s.machine\n        (Effect4.Run.machineOf\n          (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel s.tapeOf\n            (Effect4.Api.load s.built.program s.budget.compileFuel)))","withinSemanticAxiomCeiling":true}},"title":"The machine of a funded run is the raw replay of its tape's decisions, from the program's own load (any recorded run whose journal has no stopped row; nothing about a run with a stopped row, a session ledger or a generated engine; decisions rows 226 and 254)"},{"concept":"translation-simulation","contestedBy":[],"id":"journal-position-replay","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The machine after a position is the raw replay of the decisions up to it.** At position\n`i` of a journal's tape, the machine of the run after the position's row is the machine that the\nraw frame replay leaves on the first `i + 1` decisions. The replay starts at the machine of the\nrun that the tape was read from, at the same table and budgets. Reach: any run, any rows and any\nposition of the tape. The tape need not read every row: a later stopped row adds no position.\nIt does not establish the machine after a stopped row, equal session ledgers, or anything of a\ngenerated engine. It replays from the run's own machine: a replay from a new load needs a fresh\nopen, which the consumer states. Concept `translation-simulation`, R13: it is `tape_replays` on\nthe prefix that ends at the position's row. Consumer: `shown_views_opened`\n(`Test/Dogfood/Scenario/Tape.lean`), the views of a lowered run. ","levels":[],"module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tapeFrom_position_replays","restsOn":[],"statement":"∀ (s : Effect4.Run) (rows : List Effect4.Api.Runner.Command) (i : Nat)\n  (position : Effect4.Run.Position),\n  Eq (List.instGetElem?NatLtLength.getElem? (s.tapeFrom rows).fst i) (Option.some position) →\n    Eq position.after.machine\n      (Effect4.Run.machineOf\n        (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel\n          (List.map (fun x => x.decision) (List.take (instHAdd.hAdd i 1) (s.tapeFrom rows).fst))\n          s.machine))","withinSemanticAxiomCeiling":true}},"title":"The machine after a position of a journal's tape is the raw replay of the decisions up to it, from the run's own machine (any run, any rows and any position; nothing about a stopped row's machine, a session ledger or a generated engine)"},{"concept":"translation-simulation","contestedBy":[],"id":"pool-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The six step statements hold** (the claim `pool-steps-agree`, a part of the proposed\nclaim `pool-expansion-agrees`). Each field is one statement of this file. It establishes no\norder of the wake across helpers, no cancellation law, no liveness, no wait of the close along\na run and nothing of a wrapper. Its consumer is the attempt laws of the public operations\n(`src/Effect4/Laws/Library/Pool/Ops.lean`), and then the law of a run. ","levels":[],"module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.pool_steps_agree","restsOn":[],"statement":"Effect4.Pool.Model.StepsAgree","withinSemanticAxiomCeiling":true}},"title":"Each of Pool's six step terms agrees with the abstract model's step on every model state, through an encoding table that is injective for the lease, the withdrawal and the closer's step: the reply, the stored value through the encoding table, and the selected waiters' records (a part of pool-expansion-agrees; the sixth is the closer's step of decisions row 276, point 2; no order of the wake across helpers, no cancellation law, no wait of the close along a run, no liveness, no wrapper and no host; decisions rows 267 to 269 and 276)"},{"concept":"translation-simulation","contestedBy":[],"id":"queue-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The six step statements hold** (the proposed claim `queue-steps-agree`, a part of\n`queue-expansion-agrees`). Each field is one theorem of this file. It establishes no delivery,\nno cancellation law, no liveness and nothing of a wrapper. Its consumer is the wrapper's law,\nin the public path's slice. ","levels":[],"module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.queue_steps_agree","restsOn":[],"statement":"Effect4.Queue.Model.StepsAgree","withinSemanticAxiomCeiling":true}},"title":"Each of the Queue's six step terms agrees with the abstract model's step on the first profile: the reply, the stored value through the encoding table, and the ordered signals (a part of queue-expansion-agrees; no delivery, no cancellation law, no liveness, no wrapper and no host; decisions row 255)"},{"concept":"translation-simulation","contestedBy":[],"id":"semaphore-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The five step statements hold** (the proposed claim `semaphore-steps-agree`, a part of\n`semaphore-expansion-agrees`). Each field is one statement of this file. It establishes no\norder of the wake across visits, no cancellation law, no liveness and nothing of a wrapper. Its\nconsumer is the public law, in the slice of the operations that wait. ","levels":[],"module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.semaphore_steps_agree","restsOn":[],"statement":"Effect4.Semaphore.Model.StepsAgree","withinSemanticAxiomCeiling":true}},"title":"Each of Semaphore's five step terms agrees with the abstract model's step on every model state: the reply, the stored value through the encoding table, and the selected waiter's record (a part of semaphore-expansion-agrees; no order of the wake across visits, no cancellation law, no liveness, no wrapper and no host; decisions rows 259 to 261 and 265)"},{"concept":"translation-simulation","contestedBy":[],"id":"straight-composition-agreement","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Runtime consumer of straight-fragment composition. Budgets may differ: a rewrite can\nchange its step bound. The observation includes state retained after failure/finalization;\ntrace equality and insufficient-budget executions are outside this statement. ","levels":[],"module":"Effect4.Laws.Program.MeaningEq","name":"Effect4.Program.Denote.StraightEq.run_agrees","restsOn":[],"statement":"∀ {a b : Effect4.Program.NativeEff},\n  Effect4.Program.Denote.StraightEq a b →\n    ∀ (fa fb : Nat),\n      instLENat.le (Effect4.Program.Agreement.depth a) fa →\n        instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps a)) 6) fa →\n          instLENat.le (Effect4.Program.Agreement.depth b) fb →\n            instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps b)) 6)\n                fb →\n              And (Eq (Effect4.Api.run a fa).outcome Effect4.Api.Outcome.finished)\n                (And (Eq (Effect4.Api.run b fb).outcome Effect4.Api.Outcome.finished)\n                  (And (Eq (Effect4.Api.run a fa).exit (Effect4.Api.run b fb).exit)\n                    (Eq (Effect4.Api.run a fa).stores (Effect4.Api.run b fb).stores)))","withinSemanticAxiomCeiling":true}},"title":"StraightEq programs run to equal exits and stores at their own sufficient budgets (the straight-fragment composition relation)"},{"concept":"translation-simulation","contestedBy":[],"id":"mask-printed-form-profile","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The printed form's profile** (the claim `mask-printed-form-profile`; concept\n`translation-simulation`, requirements R10 and R11; decisions rows 245 and 246).\n\nReach: the checker at any signature; program syntax at any lawful spelling; the frame machine\nat any interpreter, machine and fiber. The two checkpoints are stated as steps and frame\npasses of the machine, from `saved_mask_restoration`.\n\nIt does not establish equality with the native spelling, and it states no agreement with a\nnamed release: that the compiled form and the pin's printed form answer one observation is a\nfinite check (`harness/truth/Truth.lean`, `pMaskWait` and `pMaskedRestore`), and the cuts at\nthe two checkpoints on the pin are Codex's runs. That the form spends three operations more\nthan the native mask is measured, not proved (`Test/Program/MaskContract.lean`, S8). The\nform's contract has one premise for its clients: nothing is acquired or registered before the\nbody begins. Under it an interrupt at either checkpoint equals an interrupt before the form.\n\nIts consumers are the Queue's waiting wrapper and the Semaphore's protected permit, whose\nfirst step is inside the body. ","levels":[],"module":"Effect4.Laws.Codegen.Mask","name":"Effect4.Program.mask_printed_form_profile","restsOn":[],"statement":"Effect4.Program.MaskFormProfile","withinSemanticAxiomCeiling":true}},"title":"The mask as a derived form, the getter bound to its body under uninterruptible: the surface's builder is that expansion; it types as its body under the saved state's binder, and a restore site of any other saved term has no type; it is readable exactly when its body is, so it prints and reads back; inside the getter the fiber is masked and a pending cause fails it at the getter's restoring frame, and after that frame an interruptible caller is interruptible until the body's mask (decisions rows 245, 246; no equality with the native spelling and no agreement with a release)"},{"concept":"translation-simulation","contestedBy":[],"id":"step-language-sound","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The reading law, with scope alignment only when a fold occurs. ","levels":[],"module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.sound","restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} (L : Effect4.Schema.Model.Leaves) (vs : Effect4.Modules.Inputs L Γ)\n  {src : {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val},\n  (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n      Effect4.Modules.Reads (src x) env path vals\n        ((Effect4.Schema.Model.imageAt L t).toVal (x.get vs))) →\n    ∀ {s : Effect4.Program.Ty} (e : Effect4.Modules.Step Γ s),\n      Eq e.canonical Bool.true →\n        autoParam (e.ScopeFacts env vals.length) Effect4.Modules.Step.sound._auto_1 →\n          autoParam (Effect4.Modules.Step.IdentityFacts L e) Effect4.Modules.Step.sound._auto_3 →\n            Effect4.Modules.Reads (Effect4.Modules.Step.term (fun {t} => src) e) env path vals\n              ((Effect4.Schema.Model.imageAt L s).toVal (Effect4.Modules.Step.eval L vs e))","withinSemanticAxiomCeiling":true}},"title":"A stored step translates to a term reading its carrier value from caller terms reading the input encodings and canonical record names; folds require aligned caller value and source scope lengths, and deferred comparisons require DeferredIdentity at the carrier interpretation; captured sources resolve at their original scope; each module separately proves its value equation against an independent model; no optional field, allocation, wrapper, run or host behavior follows (decisions row 330)"},{"concept":"translation-simulation","contestedBy":[],"id":"step-frame","literature":[],"role":"preservation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":null,"levels":[],"module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.frame","restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} (L : Effect4.Schema.Model.Leaves) (vs : Effect4.Modules.Inputs L Γ)\n  {fs : List (Prod String (Prod Bool Effect4.Program.Ty))}\n  (x : Effect4.Modules.Input Γ (Effect4.Program.Ty.record fs)) {t : Effect4.Program.Ty}\n  (g : Effect4.Schema.FieldRef fs t) (e : Effect4.Modules.Step Γ (Effect4.Program.Ty.record fs)),\n  Eq e.spine (Option.some x.index) →\n    Not (List.instMembership.mem e.writes g.name) →\n      Eq (g.get (Effect4.Modules.Step.eval L vs e)) (g.get (x.get vs))","withinSemanticAxiomCeiling":true}},"title":"On an update spine of an input, a field that no overwrite of the step names keeps its value: on carriers with no premise on the record's names (Step.frame), and on the machine's record frame for ascending names (Step.frame_read); nothing of a step that is no spine (decisions row 330, slice L2)"},{"concept":"translation-simulation","contestedBy":[],"id":"latch-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The Latch's steps agree with its model** (claim `latch-steps-agree`). ","levels":[],"module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.latch_steps_agree","restsOn":[],"statement":"Effect4.Latch.Model.StepsAgree","withinSemanticAxiomCeiling":true}},"title":"Each of the Latch's four steps, written natively in the step language, agrees with the model of rc.112's class Latch: isOpen, open and release with scheduleUnsafe's one flush per batch, flushScheduled and closeUnsafe; the reply and the next state through the table, the cell's value being the carrier's image; each by the step language's reading law and one equation of Lean values; nothing of await, interruption, the posted flush's fiber or liveness (decisions row 330, slice L3)"},{"concept":"translation-simulation","contestedBy":[],"id":"latch-registration-agrees","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Claim latch-registration-agrees: initial construction, registration, and first-match cleanup. ","levels":[],"module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.latch_registration_agrees","restsOn":[],"statement":"Effect4.Latch.Model.RegistrationAgree","withinSemanticAxiomCeiling":true}},"title":"Latch initial construction, await registration and first-match withdrawal read the independent model's reply and next cell; registration uses the table's identity and hint, withdrawal assumes an injective table and aligned value and source scope lengths; cleanup searches waiters before the attached scheduled batch and keeps the scheduled flag, including duplicate registrations; no interruption delivery, posted-flush execution, liveness or host behavior follows (decisions row 330)"},{"concept":"translation-simulation","contestedBy":[],"id":"partitioned-semaphore-bookkeeping","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The four source readings observe the independent scalar model.\nReservation retains the insufficient-availability and within-capacity branch premises.\nThis claim excludes identities, registration, cancellation, delivery, wrappers, and host execution. ","levels":[],"module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.bookkeeping_agrees","restsOn":[],"statement":"And\n  (∀ (capacity : Nat) (source : Effect4.Program.Authoring.TermSrc)\n    (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n    Effect4.Modules.Reads source env path vals (Effect4.Store.Val.nat capacity) →\n      Effect4.Modules.Reads (Effect4.PartitionedSemaphore.initialStep source) env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal\n          (Effect4.PartitionedSemaphore.Model.initial capacity)))\n  (And\n    (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (source : Effect4.Program.Authoring.TermSrc)\n      (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n      Effect4.Modules.Reads source env path vals\n          ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n        Effect4.Modules.Reads (Effect4.PartitionedSemaphore.availableStep source) env path vals\n          (Effect4.Store.Val.nat (Effect4.PartitionedSemaphore.Model.available s)))\n    (And\n      (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n        (amount source : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n        (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n          Effect4.Modules.Reads source env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n            Effect4.Modules.Reads (Effect4.PartitionedSemaphore.tryTakeStep amount source) env path\n              vals\n              ((Effect4.Store.Image.bool.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts)).toVal\n                (Effect4.PartitionedSemaphore.Model.tryTake s n)))\n      (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n        (amount source : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n        (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n          Effect4.Modules.Reads source env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n            instLTNat.lt s.available n →\n              instLENat.le n s.capacity →\n                Effect4.Modules.Reads (Effect4.PartitionedSemaphore.reserveStep amount source) env\n                  path vals\n                  ((Effect4.Store.Image.nat.tuple2\n                        (Effect4.Schema.Modeled.image\n                          Effect4.PartitionedSemaphore.Model.Counts)).toVal\n                    (Effect4.PartitionedSemaphore.Model.reserve s n)))))","withinSemanticAxiomCeiling":true}},"title":"PartitionedSemaphore's four scalar step terms read the independent natural-count model: initialization, availability, attempted acquisition, and reservation of the unmet need; reservation assumes insufficient availability and a request within capacity; initialization returns the scalar record, availability returns its count, and attempted acquisition and reservation return their replies with next scalar records, under successful readings of the input images; no waiter registration, identity allocation, wake delivery, cancellation, wrapper, schedule, progress, codec admission or host behavior (decisions rows 330, 331 and 335)"},{"concept":"translation-simulation","contestedBy":[],"id":"pubsub-single-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"The six pure source observations agree with the independent model images.\nThis claim retains fresh subscribe names and aligned fold scopes.\nModel.Live bounds its source interpretation; the formal equations do not require it. ","levels":[],"module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.single_steps_agree","restsOn":[],"statement":"And\n  (∀ (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n    Effect4.Modules.Reads Effect4.PubSub.initialStep env path vals\n      ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal\n        Effect4.PubSub.Model.initial))\n  (And\n    (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n      (idSrc cellSrc : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n      (path : List Nat) (vals : List Effect4.Store.Val),\n      Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n        Effect4.Modules.Reads cellSrc env path vals\n            ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n          Effect4.PubSub.Model.Fresh s id →\n            Effect4.Modules.Reads (Effect4.PubSub.subscribeStep idSrc cellSrc) env path vals\n              ((Effect4.Store.Image.unit.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                (Effect4.PubSub.Model.subscribe s id)))\n    (And\n      (∀ (s : Effect4.PubSub.Model.State) (message : Nat)\n        (messageSrc cellSrc : Effect4.Program.Authoring.TermSrc)\n        (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads messageSrc env path vals (Effect4.Store.Val.nat message) →\n          Effect4.Modules.Reads cellSrc env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n            Effect4.Modules.Reads (Effect4.PubSub.tryPublishStep messageSrc cellSrc) env path vals\n              ((Effect4.Store.Image.bool.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                (Effect4.PubSub.Model.tryPublish s message)))\n      (And\n        (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n          (idSrc cellSrc : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n          (path : List Nat) (vals : List Effect4.Store.Val),\n          Eq vals.length (List.length env.names) →\n            Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n              Effect4.Modules.Reads cellSrc env path vals\n                  ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n                Effect4.Modules.Reads (Effect4.PubSub.pollStep idSrc cellSrc) env path vals\n                  ((Effect4.Store.Image.nat.option.tuple2\n                        (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                    (Effect4.PubSub.Model.poll s id)))\n        (And\n          (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n            (idSrc cellSrc : Effect4.Program.Authoring.TermSrc)\n            (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n            Eq vals.length (List.length env.names) →\n              Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n                Effect4.Modules.Reads cellSrc env path vals\n                    ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n                  Effect4.Modules.Reads (Effect4.PubSub.unsubscribeStep idSrc cellSrc) env path vals\n                    ((Effect4.Store.Image.unit.tuple2\n                          (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                      (Effect4.PubSub.Model.unsubscribe s id)))\n          (∀ (s : Effect4.PubSub.Model.State) (cellSrc : Effect4.Program.Authoring.TermSrc)\n            (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n            Effect4.Modules.Reads cellSrc env path vals\n                ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n              Effect4.Modules.Reads (Effect4.PubSub.slideStep cellSrc) env path vals\n                ((Effect4.Store.Image.unit.tuple2\n                      (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                  (Effect4.PubSub.Model.slide s)))))))","withinSemanticAxiomCeiling":true}},"title":"Six pure PubSub bookkeeping sources read the independent capacity-one, replay-zero, natural-message model: initial, subscription with a fresh logical name, tryPublish, poll, unsubscribe and slide; input sources read their exact images, and folds require aligned value and source scope lengths; observations contain each reply and next model state; no host subscription-object identity relation, handle allocation, delivery, lifetime, backpressure execution, arbitrary capacity or whole module run (decisions rows 330, 331 and 335)"},{"concept":"store-typing","contestedBy":[],"id":"stream-source-declarations","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"An accepted adapter derives its metadata and invocations from the same declarations.\nEquality of normalized columns does not establish admission of any definition body. ","levels":[],"module":"Effect4.Laws.Library.Stream.Definitions","name":"Effect4.Stream.Source.fromDefinitions_declarations","restsOn":[],"statement":"∀ {opened pull close : Effect4.Program.Authoring.DefSrc Effect4.Program.NativeOp}\n  {arguments : List Effect4.Program.Authoring.TermSrc} {source : Effect4.Stream.Source},\n  Eq (Effect4.Stream.Source.fromDefinitions opened pull close arguments) (Except.ok source) →\n    And\n      (Eq pull.answer.normalize (Effect4.Program.Stream.pulledTy source.elem source.done).normalize)\n      (And (Eq opened.answer.normalize pull.decl.request.normalize)\n        (And (Eq close.decl.request.normalize pull.decl.request.normalize)\n          (And (Eq close.answer.normalize Effect4.Program.Ty.unit)\n            (And (Eq source.opened (Effect4.Program.Authoring.Def.invoke opened.name arguments))\n              (And\n                (∀ (state : Effect4.Program.Authoring.TermSrc),\n                  Eq (source.pull state)\n                    (Effect4.Program.Authoring.Def.invoke pull.name (List.cons state List.nil)))\n                (∀ (state : Effect4.Program.Authoring.TermSrc),\n                  Eq (source.close state)\n                    (Effect4.Program.Authoring.Def.invoke close.name\n                      (List.cons state List.nil))))))))","withinSemanticAxiomCeiling":true}},"title":"An accepted definition-backed Stream source derives its normalized batch/completion protocol, open and close state requests, and unit close answer from the supplied operation declarations; each invocation uses the corresponding declaration name; no body admission, nonempty batch, execution, finalization or host behavior follows"},{"concept":"translation-simulation","contestedBy":[],"id":"channel-batch-transform","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Batch mapping selects the wrapped transformation only for Chunk.\nEnd retains its leftover; an input failure retains its cause and resulting stores.\nThe selected handler's full meaning retains a transformation failure and its stores. ","levels":[],"module":"Effect4.Laws.Library.Channel.Protocol","name":"Effect4.Channel.Internal.mapEffectOf_protocol","restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {transform :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Channel.bindAnswer_protocol.match_1✝\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (Effect4.Program.Authoring.succeed\n                (Effect4.Pull.endValue\n                  (Effect4.Program.Authoring.minted\n                    ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")))\n                ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (Effect4.Program.Authoring.bindWith\n                  (transform\n                    (Effect4.Program.Authoring.app \"snd\"\n                      (List.cons\n                        (Effect4.Program.Authoring.minted\n                          ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\"))\n                        List.nil)))\n                  (fun mapped => Effect4.Program.Authoring.succeed (Effect4.Pull.chunkValue mapped))\n                  ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Exists fun tree =>\n                And\n                  (Eq (Effect4.Channel.Internal.mapEffectOf self transform env path)\n                    (Except.ok tree))\n                  (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                    (Effect4.Channel.bindAnswer_protocol.match_1✝\n                      (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                      (fun leftover =>\n                        Effect4.Program.Denote.meaning done\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                            (List.cons leftover List.nil))\n                          after)\n                      (fun items =>\n                        Effect4.Program.Denote.meaning success\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                          after)\n                      fun cause => { fst := Effect4.Exit.failure cause, snd := after }))","withinSemanticAxiomCeiling":true}},"title":"The authored Channel batch dispatcher selects the wrapped batch transformation only for an exact Chunk input, selects unchanged completion for End, and propagates input failure with its resulting stores; actual handler elaboration and aligned scopes are premises; the selected handler's complete meaning includes its failure and stores; no execution of stored definition calls, nonempty output, scheduling or host simulation"},{"concept":"translation-simulation","contestedBy":[],"id":"channel-completion-transform","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Completion mapping selects the wrapped transformation only for End.\nChunk retains its batch; input failures and selected-handler failures keep their stores. ","levels":[],"module":"Effect4.Laws.Library.Channel.Protocol","name":"Effect4.Channel.Internal.mapDoneEffectOf_protocol","restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {transform :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Channel.bindAnswer_protocol.match_1✝\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (Effect4.Program.Authoring.bindWith\n                (transform\n                  (Effect4.Program.Authoring.minted\n                    ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")))\n                (fun mapped => Effect4.Program.Authoring.succeed (Effect4.Pull.endValue mapped))\n                ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (Effect4.Program.Authoring.succeed\n                  (Effect4.Pull.chunkValue\n                    (Effect4.Program.Authoring.app \"snd\"\n                      (List.cons\n                        (Effect4.Program.Authoring.minted\n                          ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\"))\n                        List.nil)))\n                  ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Exists fun tree =>\n                And\n                  (Eq (Effect4.Channel.Internal.mapDoneEffectOf self transform env path)\n                    (Except.ok tree))\n                  (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                    (Effect4.Channel.bindAnswer_protocol.match_1✝\n                      (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                      (fun leftover =>\n                        Effect4.Program.Denote.meaning done\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                            (List.cons leftover List.nil))\n                          after)\n                      (fun items =>\n                        Effect4.Program.Denote.meaning success\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                          after)\n                      fun cause => { fst := Effect4.Exit.failure cause, snd := after }))","withinSemanticAxiomCeiling":true}},"title":"The authored Channel completion dispatcher selects the wrapped completion transformation only for an exact End input, selects unchanged batches for Chunk, and propagates input failure with its resulting stores; actual handler elaboration and aligned scopes are premises; no execution of stored definition calls, nonempty output, scheduling or host simulation"},{"concept":"translation-simulation","contestedBy":[],"id":"pull-protocol-selection","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Under an exact input observation, Pull chooses its one protocol handler.\nAll handlers elaborate at their actual scopes. The selected handler receives the input's\nresulting stores; its complete exit and final stores are the result. This is a law of the\nexisting denotation, not a scheduling or host correspondence theorem. ","levels":[],"module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.matchEffect_protocol","restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp} {options : Effect4.Pull.Handlers}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done failure : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Pull.matchEffect_protocol.match_1\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (options.onDone\n                (Effect4.Program.Authoring.minted\n                  ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"payload\"))\n                ((env.push (List.cons (env.mint \"value\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (options.onSuccess\n                  (Effect4.Program.Authoring.app \"snd\"\n                    (List.cons\n                      (Effect4.Program.Authoring.minted\n                        ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"rest\"))\n                      List.nil))\n                  ((env.push (List.cons (env.mint \"value\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Eq\n                  (options.onFailure (Effect4.Program.Authoring.minted (env.mint \"cause\"))\n                    (env.push (List.cons (env.mint \"cause\") List.nil))\n                    (instHAppendOfAppend.hAppend path (List.cons 2 List.nil)))\n                  (Except.ok failure) →\n                Exists fun tree =>\n                  And (Eq (Effect4.Pull.matchEffect self options env path) (Except.ok tree))\n                    (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                      (Effect4.Pull.matchEffect_protocol.match_1\n                        (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                        (fun leftover =>\n                          Effect4.Program.Denote.meaning done\n                            (instHAppendOfAppend.hAppend\n                              (instHAppendOfAppend.hAppend vals\n                                (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                              (List.cons leftover List.nil))\n                            after)\n                        (fun items =>\n                          Effect4.Program.Denote.meaning success\n                            (instHAppendOfAppend.hAppend\n                              (instHAppendOfAppend.hAppend vals\n                                (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            after)\n                        fun cause =>\n                        Effect4.Program.Denote.meaning failure\n                          (instHAppendOfAppend.hAppend vals\n                            (List.cons (Effect4.Machine.Val.exitErr cause) List.nil))\n                          after))","withinSemanticAxiomCeiling":true}},"title":"Pull's outcome handler selects exactly one batch, completion or failure branch under the existing denotation: an exact Chunk or End value, or the complete input cause, chooses its branch; aligned source and value scopes and successful elaboration of all handlers are premises; the selected handler receives the input's resulting stores, and its full exit and final stores are the result; no scheduler, whole-stream run, nonempty-batch admission, host Done adapter or mixed-Done correspondence (decisions rows 331 and 335)"},{"concept":"translation-simulation","contestedBy":[],"id":"pull-completion-recovery","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"Completion recovery passes an input failure through with all stores left by the input.\nFor a success it uses the already compiled answer handler, including its failure result. ","levels":[],"module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.catchDone_meaning","restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {onDone :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body rest : Effect4.Program.NativeEff} (stores : Effect4.Machine.Stores),\n  Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n    Eq\n        (Effect4.Pull.matchAnswer (Effect4.Program.Authoring.minted (env.mint \"answer\"))\n          (fun chunk => Effect4.Program.Authoring.succeed chunk) onDone\n          (env.push (List.cons (env.mint \"answer\") List.nil))\n          (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)))\n        (Except.ok rest) →\n      Exists fun tree =>\n        And (Eq (Effect4.Pull.catchDone self onDone env path) (Except.ok tree))\n          (Eq (Effect4.Program.Denote.meaning tree vals stores)\n            (Effect4.Pull.catchDone_meaning.match_1\n              (fun x => Prod Effect4.Machine.ExitV Effect4.Machine.Stores)\n              (Effect4.Program.Denote.meaning body vals stores)\n              (fun value after =>\n                Effect4.Program.Denote.meaning rest\n                  (instHAppendOfAppend.hAppend vals (List.cons value List.nil)) after)\n              fun cause after => { fst := Effect4.Exit.failure cause, snd := after }))","withinSemanticAxiomCeiling":true}},"title":"Pull's completion recovery uses the existing bind denotation: after successful elaboration of the input and answer handler, an input failure retains its complete cause and resulting stores, and an input success runs the answer handler at the bound value with those stores; that handler's failure escapes unchanged; exact Chunk and End selection is the helper matchAnswer_meaning, and no scheduler, whole-stream run or host Done correspondence follows (decisions rows 331 and 335)"},{"concept":"translation-simulation","contestedBy":[],"id":"stream-array-step-agreement","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"One allocated cell step agrees with the independent batch extraction transition. ","levels":[],"module":"Effect4.Laws.Library.Stream.Array","name":"Effect4.Stream.arrayStep_agrees","restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (L : Effect4.Schema.Model.Leaves)\n  (pending : List (Effect4.Schema.Model.CarrierAt L A)) {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val} {receiver : Effect4.Program.Authoring.TermSrc}\n  {q : Effect4.Machine.RefKey} {stores : Effect4.Machine.Stores},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Reads receiver env path vals (Effect4.Machine.Val.cell q) →\n      Eq (Effect4.Machine.refPeek stores.refs q)\n          (Option.some ((Effect4.Schema.Model.imageAt L A.list).toVal pending)) →\n        Exists fun term =>\n          Exists fun request =>\n            And\n              (Eq (Effect4.Stream.arrayBatch A receiver env path)\n                (Except.ok\n                  (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.refModifyWith term)\n                    request)))\n              (And\n                (Eq (Effect4.Program.evalTerm vals request)\n                  (Option.some (Effect4.Machine.Val.cell q)))\n                (Eq\n                  (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q term vals) stores)\n                  (Option.some\n                    {\n                      fst :=\n                        Effect4.Ref.resultStores (Effect4.Schema.Model.imageAt L A.list)\n                          (Effect4.Ref.Model.modify Effect4.Stream.ArrayModel.pull pending) q\n                          stores,\n                      snd :=\n                        (Effect4.Schema.Model.imageAt L A.list).toVal\n                          (Effect4.Ref.Model.modify Effect4.Stream.ArrayModel.pull\n                              pending).reply })))","withinSemanticAxiomCeiling":true}},"title":"The Stream array source's atomic batch extraction returns the pending list and clears its allocated backing cell, under aligned source and value scopes, a receiver reading the cell handle, and the cell holding the input image; the stored Step callback reads an independent list model and consumes Ref's operation law; no whole pull, stream run, scheduling, scope finalization, host correspondence, codec admission or handle allocation (decisions rows 331 and 335)"},{"concept":"translation-simulation","contestedBy":[],"id":"ref-steps-agree","literature":[],"role":"simulation","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**The thirteen operation laws hold** (the claim `ref-steps-agree`, role simulation).\nPlacement: concept `translation-simulation`, requirement R10. Reach: allocation for any exact\nimage; every other operation on one allocated cell holding the encoded value, with a callback\nthat evaluates to the encoded next value. Each law observes the reply and the final stores. Not\nestablished: the laws compare replies and final stores, not write events; no scheduling,\nwhole run, host object identity, callback exception or reentrant mutation. Consumers: the typed\ncallback connector (`src/Effect4/Laws/Library/Ref/Callback.lean`), then SynchronizedRef and the\nkeyed cells (decisions row 335). ","levels":[],"module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.ref_steps_agree","restsOn":[],"statement":"Effect4.Ref.StepsAgree","withinSemanticAxiomCeiling":true}},"title":"Each of Ref's thirteen effectful operations agrees with the independent model of latest's Ref (Effect 4.0.1): allocation appends the initial value; on one allocated cell holding the encoded value, with a callback that evaluates to the encoded next value, each operation's reply and final stores are the model's; the laws compare replies and final stores under their allocation and callback-evaluation premises, not write events, so they say nothing of whether an operation writes an unchanged value; no scheduling, whole run, host object identity, callback exception or reentrant mutation (decisions row 335)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"fold-cache-local-agreement","literature":[],"role":"compatibility","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**Local agreement**: every answer that accepted entries hold is `cata_ty` of the same layer at\nits own source. The pointer of the claim `fold-cache-local-agreement`. Its consumers are\n`CheckedCache.query_agrees`, `answer_agrees` and slice D6's memoized folds. It says nothing of a\ntype that no entry holds, and nothing of speed. ","levels":["u"],"module":"Effect4.Laws.Program.Folds.TyCache","name":"Effect4.Program.TyCache.check_agreement","restsOn":[],"statement":"∀ {R : Type u} [inst : DecidableEq R]\n  (layer : Effect4.Program.TyCtor → List (Effect4.Program.TyArgF R) → R)\n  (entries : Effect4.Program.TyCache.Entries R),\n  Eq (Effect4.Program.TyCache.check layer entries) Bool.true →\n    ∀ (t : Effect4.Program.Ty) (r : R),\n      Eq (Effect4.Program.TyCache.lookup entries t) (Option.some r) →\n        Eq r (Effect4.Program.cata_ty (Effect4.Program.TyAlgebra.ofLayer layer) t)","withinSemanticAxiomCeiling":true}},"title":"Every answer that accepted entries of a type-fold cache hold is cata_ty of the same layer at its own source type: check accepts entries whose children stand in earlier entries and whose answers meet the layer's local equation over the generated view, so payloads, names, flags and child order are part of each equation; check accepts the entries that prepare builds at every type, so answer returns the fold at every type (answer_eq); nothing of speed, of reuse after an edit, of a typing judgment, or of an input the layer inherits (slice D6, serving R14)"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"dependency-summary-exact","literature":[],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**An accepted summary**: a table that `check` accepts holds an entry at a node and a label if\nand only if a path from the node reaches a seed of the label. The pointer of the claim\n`dependency-summary-exact`. Its consumers are `Checked.reports_iff`, the axiom walk's checked\nsummaries and the flow's directed queries. It certifies the supplied graph, not its extraction. ","levels":[],"module":"Tools.Graph.Summary","name":"Tools.Graph.Summary.check_summary_exact","restsOn":[],"statement":"∀ {n m : Nat} {g : Tools.Graph.Summary.Graph n m} {d : Tools.Graph.Summary.Distances n m},\n  Eq (Tools.Graph.Summary.check g d) Bool.true →\n    ∀ (u : Fin n) (l : Fin m),\n      Iff (Tools.Graph.Summary.Present d u l) (Tools.Graph.Summary.Reaches g u l)","withinSemanticAxiomCeiling":true}},"title":"A distance table that check accepts on a finite graph with cycles reports a label at a node if and only if a directed path from the node reaches a node that seeds the label: each seed and each child's label has an entry, and each entry is a seed or has a child at a smaller distance, one distance per node and label; #axiom_audit checked runs it over the axiom walk's answers and their captured graph (ProofGraph.checkDependencies); nothing of the capture's fidelity to the environment, of a theorem that a node names, or of speed"},{"concept":"initial-algebras-folds","contestedBy":[],"id":"view-reachability-summary-exact","literature":[],"role":"decidability","status":{"_tag":"proved","by":"theorem","goal":null,"witness":{"axioms":["Quot.sound","propext"],"doc":"**A checked flow summary**: when `checkReach` accepts a distance table, the table reports a\ntarget at a source if and only if `Reach` leads from the source to the target. The pointer of\nthe claim `view-reachability-summary-exact`. Its consumers are directed queries of the\napplication graph, explanations and impact reports. It establishes no schedule. ","levels":[],"module":"Tools.View.FlowReach","name":"Tools.View.Flow.checkReach_exact","restsOn":[],"statement":"∀ {n : Nat} {es : List Tools.View.Flow.Edge} {d : Tools.Graph.Summary.Distances n n},\n  Eq (Tools.View.Flow.checkReach n es d) Bool.true →\n    ∀ (source target : Fin n),\n      Iff (Tools.Graph.Summary.Present d source target)\n        (Tools.View.Flow.Reach es source.val target.val)","withinSemanticAxiomCeiling":true}},"title":"A flow's distance table that checkReach accepts (every edge's ends below the position bound, and check on the reach graph) reports a target at a source if and only if Flow.Reach leads from the source to the target; an end at or above the bound is refused, never dropped; ReachTable answers directed queries under this law; nothing of a schedule, a layout, a forest or weak connectedness"}],"command":"make gen-semantics","concepts":[{"counts":{"absent":1,"assumed":0,"claims":21,"goal":0,"modulo":0,"proved":20,"refuted":0},"defaultModules":["Effect4.Laws.Program.Typed.Membership","Effect4.Laws.Program.Typed.World","Effect4.Laws.Program.Typed.Validity","Effect4.Laws.Library.Queue.Typing","Effect4.Laws.Step.Checking","Effect4.Laws.Step.Ascribe","Effect4.Laws.Step.Waiting","Effect4.Laws.Library.Pool.Typing","Effect4.Laws.Library.Pool.Profile","Effect4.Laws.Program.Typing.TermIntro","Effect4.Laws.Library.Semaphore.Typing","Effect4.Laws.Library.Semaphore.Profile"],"id":"store-typing","title":"Store Typing: World-indexed semantic value membership (Fits) and store typings"},{"counts":{"absent":0,"assumed":0,"claims":20,"goal":0,"modulo":0,"proved":19,"refuted":1},"defaultModules":["Effect4.Laws.Program.Typed.Residual","Effect4.Laws.Program.Typed.Seq","Effect4.Laws.Program.Typed.Assembly"],"id":"residual-program-typing","title":"Residual Program Typing: TypedProg, the protocol-indexed judgment on residual programs"},{"counts":{"absent":0,"assumed":0,"claims":16,"goal":1,"modulo":0,"proved":15,"refuted":0},"defaultModules":["Effect4.Laws.Machine.ScopeMachine","Effect4.Laws.Machine.ScopeRestoration","Effect4.Laws.Machine.MaskDiscipline","Effect4.Laws.Machine.MaskRuns","Effect4.Laws.Program.MaskRuns","Effect4.Laws.Api.MaskRuns","Effect4.Laws.Machine.MaskBracket","Effect4.Laws.Program.MaskBracket"],"id":"scope-lifetime-finalization","title":"Scope Lifetime & Finalization: Lifetimes, finalizer registration, and LIFO unwinding"},{"counts":{"absent":2,"assumed":0,"claims":25,"goal":0,"modulo":4,"proved":19,"refuted":0},"defaultModules":["Effect4.Laws.Library.Queue.Invariant","Effect4.Laws.Machine.Scheduling","Effect4.Laws.Machine.Lift","Effect4.Laws.Program.Typed.Scheduler","Effect4.Laws.Library.Queue.Capacity","Effect4.Laws.Library.Queue.Profile"],"id":"reactive-scheduling","title":"Reactive Scheduling: Multi-fiber execution, decision steps, and configuration invariants"},{"counts":{"absent":0,"assumed":0,"claims":19,"goal":0,"modulo":0,"proved":19,"refuted":0},"defaultModules":["Effect4.Laws.Schema.Codec","Effect4.Laws.Codegen.ReadPrint","Effect4.Laws.Codegen.Read"],"id":"exact-codecs","title":"Exact Codecs: Invertible embeddings for JSON and Schema representations"},{"counts":{"absent":0,"assumed":0,"claims":13,"goal":0,"modulo":0,"proved":13,"refuted":0},"defaultModules":["Effect4.Laws.Program.TypeAlgebra"],"id":"subtyping-algebra","title":"Subtyping Algebra: Preorder laws, normalization, and join-semilattice on CTy"},{"counts":{"absent":0,"assumed":0,"claims":33,"goal":0,"modulo":0,"proved":33,"refuted":0},"defaultModules":["Effect4.Laws.Program.Folds.Ty","Effect4.Laws.Machine.Folds.Val","Effect4.Laws.Machine.Folds.Stores","Effect4.Laws.Program.ReferenceExpansion"],"id":"initial-algebras-folds","title":"Initial Algebras & Folds: Free syntax objects, catamorphisms, and fold uniqueness"},{"counts":{"absent":0,"assumed":0,"claims":8,"goal":0,"modulo":0,"proved":8,"refuted":0},"defaultModules":["Effect4.Laws.Effects.Protocol"],"id":"context-requirements","title":"Context Requirements: Graded coeffects, requirement rows, and layer discharge"},{"counts":{"absent":0,"assumed":1,"claims":12,"goal":0,"modulo":0,"proved":11,"refuted":0},"defaultModules":["Effect4.Laws.Api.HostSession","Effect4.Laws.Api.Frontier","Effect4.Laws.Api.Guard","Effect4.Laws.Program.RowProtocol"],"id":"host-session-protocol","title":"Host Session Protocol: Session automaton, external reply ingestion, and boundary capabilities"},{"counts":{"absent":0,"assumed":0,"claims":49,"goal":0,"modulo":8,"proved":41,"refuted":0},"defaultModules":["Effect4.Laws.Program.Agreement.Machine","Effect4.Laws.Program.Agreement.Segment","Effect4.Laws.Program.HostRuns","Effect4.Laws.Api.HostDrive","Effect4.Laws.Program.Agreement.Loop","Effect4.Laws.Program.LoopAgreement","Effect4.Laws.Program.RuntimeR","Effect4.Laws.Machine.Book","Effect4.Laws.Step.Table","Effect4.Laws.Step.Reading","Effect4.Laws.Step.Store","Effect4.Laws.Library.Queue.Relation","Effect4.Laws.Library.Queue.Reading","Effect4.Laws.Library.Queue.Steps","Effect4.Laws.Library.Queue.Ops","Effect4.Laws.Library.Pool.Relation","Effect4.Laws.Library.Pool.Reading","Effect4.Laws.Library.Pool.Steps","Effect4.Laws.Library.Pool.Ops","Effect4.Laws.Library.Semaphore.Relation","Effect4.Laws.Library.Semaphore.Reading","Effect4.Laws.Library.Semaphore.Steps","Effect4.Laws.Library.Semaphore.Ops"],"id":"translation-simulation","title":"Translation & Simulation: Semantic preservation, replay relations, and capstone M7"}],"cuts":[{"concept":"store-typing","decisionRow":163,"excluded":"function values and closures in Val: Fits contains no arrow clause","reason":"the language cut, docs/research/history/language-cut.md section 1","who":"owner"},{"concept":"store-typing","decisionRow":96,"excluded":"raw subtyping in handle arms: comparisons use Equiv under Ty.subN","reason":"checker compares and joins in normalized order (decisions row 137, E4-TYPED-CE-009)","who":"owner"},{"concept":"store-typing","decisionRow":156,"excluded":"dangling scope handles: ScopeLive presence required at Ty.scope","reason":"machine halts on absent scope in prepareScopedExitR (E4-SCHED-CE-020)","who":"owner"},{"concept":"residual-program-typing","decisionRow":163,"excluded":"stored function values and closures: stored Eff syntax uses first-order program trees, while proof-side RProgram carries Lean function continuations at visible operations","reason":"the language cut, docs/research/history/language-cut.md section 1; row 163 excludes stored function values, not functions in the semantic model","who":"owner"},{"concept":"residual-program-typing","decisionRow":117,"excluded":"open root requirement rows: M5, M6c and M7 take the premise rootTy.requires = empty","reason":"rc.112 runs closed root rows (Effect.ts:17494-17497), while retaining separate per-position obligations","who":"owner"},{"concept":"residual-program-typing","decisionRow":148,"excluded":"general bind closure: sequencing is proved per construct via compatibility lemmas","reason":"closing marker unguard fixes exit type (E4-TYPED-CE-030)","who":"coordinator"},{"concept":"scope-lifetime-finalization","decisionRow":156,"excluded":"closure or exit of absent scopes: ScopeLive required","reason":"machine halts on absent scope in prepareScopedExitR","who":"owner"},{"concept":"scope-lifetime-finalization","decisionRow":152,"excluded":"badName and notImplemented defect transmission during close walk","reason":"ShapeFree exclusion on encoded causes in exit types (row 152)","who":"owner"},{"concept":"reactive-scheduling","decisionRow":106,"excluded":"unbounded token indices: QueueOk enforces GuardState.keysBelow","reason":"fresh token bounds protect scheduler invariants (decisions row 106)","who":"owner"},{"concept":"reactive-scheduling","decisionRow":107,"excluded":"defect-bearing exit boundaries: ExitOk requires NoShapeDefect","reason":"badName and notImplemented defects excluded from typed exits","who":"owner"},{"concept":"reactive-scheduling","decisionRow":134,"excluded":"untyped timer and race columns in configuration typing","reason":"E4-TYPED-CE-024 through CE-029 separate timer, waiter, and race keys","who":"owner"},{"concept":"exact-codecs","decisionRow":128,"excluded":"arbitrary syntactic equality: embeddings are exact modulo normJ and normS","reason":"JSON object key order and Schema AST annotations do not affect decoding","who":"owner"},{"concept":"exact-codecs","decisionRow":179,"excluded":"unconditional metadata preservation: normS erases only nine approved keys","reason":"arbitrary effect4/* annotations cannot be silently discarded","who":"coordinator"},{"concept":"subtyping-algebra","decisionRow":137,"excluded":"raw subtyping for checker comparisons: subN normalizes both sides first","reason":"raw sub does not distribute products over unions (E4-TYPED-CE-009)","who":"owner"},{"concept":"subtyping-algebra","decisionRow":163,"excluded":"arrow subtyping: Ty contains no function constructor","reason":"the language cut, docs/research/history/language-cut.md section 1","who":"owner"},{"concept":"initial-algebras-folds","decisionRow":127,"excluded":"recursive-type unfolding in inhabited: inhabited is a fold over finite syntax","reason":"Ty is an inductive data type with no infinite equi-recursive unfolding","who":"owner"},{"concept":"context-requirements","decisionRow":117,"excluded":"open root requirement rows: M5, M6c and M7 require rootTy.requires = empty","reason":"rc.112 runs closed rows (Effect.ts:17494-17497)","who":"owner"},{"concept":"context-requirements","decisionRow":104,"excluded":"lexical environment capture in layers: layers build at closed points","reason":"Point.layerBuild prevents layer bodies from reading outer environments (E4-PROV-CE-005)","who":"owner"},{"concept":"context-requirements","decisionRow":105,"excluded":"mismatched layer values: layer value must fit declared service type","reason":"LayerHasTy requires declared service carrier and value subtyping (E4-PROV-CE-006)","who":"owner"},{"concept":"host-session-protocol","decisionRow":122,"excluded":"in-engine boundary decoding: Decision 12 adopts Route A typed membership","reason":"boundary decode checks membership before runtime admission (host-boundary.md section 7)","who":"owner"},{"concept":"host-session-protocol","decisionRow":97,"excluded":"internal handle kinds at host boundary: cells, promises, fibers, scopes refused","reason":"prevents leaking internal runtime capabilities across boundary (E4-HOST-CE-007)","who":"owner"},{"concept":"translation-simulation","decisionRow":138,"excluded":"non-empty host tables in M7: M7 is stated strictly on M7Fragment with root.table = []","reason":"table-aware agreement is deferred to R6 (DI-57)","who":"owner"},{"concept":"translation-simulation","decisionRow":95,"excluded":"host answers on decision tapes: M6 and M7 quantify over answer-free tapes","reason":"reference machine has no host table and refuses every answer (emptyTable_refuses_every_answer)","who":"owner"},{"concept":"translation-simulation","decisionRow":117,"excluded":"open requirement rows: M7Fragment enforces rootTy.requires = empty","reason":"rc.112 runs closed rows (Effect.ts:17494-17497)","who":"owner"}],"format":"effect4-semantics-report","inputs":["tools/ProofGraph/Registry.lean","tools/Tools/Semantics.lean","tools/Drivers/Semantics.lean","tools/Tools/SemanticsDisplay.lean","tools/Tools/SemanticsDocument.lean","tools/Tools/Document.lean","tools/Tools/Document/Json.lean","src/Effect4/Laws/Auto/Semantics.lean","Test/Counterexamples/REGISTER.md","docs/core/decisions.md","lean-toolchain"],"placement":{"declarations":[{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.advance_answer_refuses","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.advance_calls","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.advance_conforms","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.advance_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applied_guard_absent","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applied_reply_refused","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applied_reply_refused_instance","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.applyPending_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applyPending_zero","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applyReply_calls","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applyReply_conforms","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.applyReply_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.applyReply_zero","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.bindCall_calls","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.bindCall_machine","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.callInstance_callTable","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.inspect_machine","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.instanceAt_complete","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.noShapeDefect_of_reservedFree","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_envelope","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_failure_noShapeDefect","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_pending","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_success_prepared_fits","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.readReply_store_other","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.readReply_store_self","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.reply_commute","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.reply_commute_disjoint","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.retire_calls","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.start_callInstance","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.start_callInstance_complete","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.HostSession.start_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.storeReply_commute","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.storeReply_keys","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_calls","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_conditions","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_duplicate","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_key_independence","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_machine","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_refusal_retains","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.submit_success_prepared_fits","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.load_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.replayBytes_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.replayRows_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.replay_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.stepBytes_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.stepRow_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Api.Runner.step_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.all_exited_not_runnable","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.awaitDecision_iff","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.awaitHost_mem","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.commandFuel_iff","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.exists_awaitHost_iff","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.frontier_empty_iff_deadlocked","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Guard","name":"Effect4.Api.guard_persists","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Guard","name":"Effect4.Api.guard_persists_single","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Guard","name":"Effect4.Api.guard_persists_single_tape","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Api.load_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.mem_runnableFibers","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_awaitingAsync_iff","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_idle_iff","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_idle_tape_iff","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_of_reasons","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_terminated_iff","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Api.replayChecked_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Api.replay_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Api.runSync_maskRuns","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.along_of_exists","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.head_of_inst","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.head_of_match","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holesAnn_of_instAnn","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holesFields_of_instFields","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holesStmt_of_instStmt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holesStmts_of_instStmts","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holes_of_inst","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.holess_of_insts","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.instStmt_former","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.inst_generic_ident","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.inst_nodeLike","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.insts_length","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchStmt_former","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchStmt_former_eq","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchStmt_of_instStmt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchT_arrowBlock_arrow","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchT_arrow_arrowBlock","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchT_cond_nodeLike","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchT_generic_ident","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchT_ident_none","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.matchTs_length","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.match_apart","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Codegen.Template.match_of_inst","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.MaskChain.above","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.MaskChain.append_iff","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.MaskChain.base_eq","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.MaskChain.flag_eq","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.RegionEnds.answer","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.RegionEnds.carried","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.RegionEnds.fiber","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.RegionEnds.flag","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.RegionEnds.stack","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.answerOf_ne_empty","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.armA_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.armE_pushes_nothing","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.ensure_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.getCont_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.getCont_regionEnd","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.getCont_unanswered_deferred","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.getCont_unanswered_flag","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.getCont_unanswered_stack","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.getCont_under_answered","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.getCont_under_unanswered","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.interruptibleRegion_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.passPushed_ensure_stack_nil","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.passPushed_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.popFrom_append_answered","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.popFrom_append_unanswered","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.popFrom_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.popFrom_unanswered_flag","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.popFrom_unanswered_stack","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.regionEnd_flag","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.regionEnd_stack","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.regionEnds_of_base","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.regionEnds_of_chain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.resumeCause_finished","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.resumeCause_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.resumeCause_under","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.resumeValue_finished","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.resumeValue_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.resumeValue_under","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.FrameFiber.step_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.step_under","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.under_current","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.FrameFiber.under_own","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.FrameFiber.uninterruptible_maskChain","placement":"tagged"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Protocol.Le.post","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Protocol.Le.pre","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.bind","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inl","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inl_iff","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inl_inv","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inr","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inr_iff","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.inr_inv","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.mono","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.plain_iff","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.pure_inv","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.refine","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.Typed.widen","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.WorldOrder.refl","placement":"inherited"},{"concept":"context-requirements","module":"Effect4.Laws.Effects.Protocol","name":"Effect4.Laws.Effects.WorldOrder.trans","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.armed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.fibers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.forks","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.middleware","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.nextId","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.nextRace","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.nextToken","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.originOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.races","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.state","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.BookMeans.stuck","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.CmdKeepsMask.of_prefix","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.Exited.aged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.IterKeepsMask.finished_flag","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.IterKeepsMask.finished_stack","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.IterKeepsMask.rebase","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.answer","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.clockNone","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.clockSome","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.drain","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.evaluate","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.interrupt","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.middleware","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.nil","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.ran","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.skip","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.step","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.task","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.DecisionLift.yield","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.advanceState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.clockNone","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.clockSome","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.drain","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.fireFold_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.fireState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.flushAllState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.flushRootState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.loop_entry","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.loop_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.nil","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.ofDecisionLift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.ran","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.skip","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.step","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.FoldLift.task","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.clock","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.drain","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.interrupt","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.middleware","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.owed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.prepare","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.ran","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.MachineEdits.yield","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.admittedReplay_true","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.admitted_of_forall","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.admitted_true","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.advanceState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.answer_of_split","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_keeps","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_keeps_of_keeps","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_lift_of","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_lift_unit","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_one","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveStep_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.fireFold_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.fireState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.flushAllState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.foldl_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.framed_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.inert_resume","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.interruptFrom_eq","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.isSome_of_ne_none","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.loop_entry","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.loop_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.machineFact_stepDecision","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.not_isSome_of_none","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.parkedAt_em","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.replayEval_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.replayEval_nil_machine","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.settleOutcome_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.settle_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.stepDecisionState_lift","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.stepKeeps_of_keeps","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.stuck_none_of_not","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.MachineOk.fibers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.MachineOk.state","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.born","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.drainOwed","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.emit","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.halt","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.make","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.mapFibers","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.modify","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.postTask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.refl","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.trans","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.update","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskAged.update_old","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.command","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.decision","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.empty","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.finished","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.finishedAtBase","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.guarded","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.loop","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.replay","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.sameBase","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.sameFlag","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.spawn","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskChainRuns.start","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskLater.of_exited","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskLater.refl","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskLater.trans","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.frameExit","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.getCont","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.interruptibleRegion","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.pop","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.sameFlag","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.MaskPopDiscipline.uninterruptible","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.MaskRuns.above","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskRuns.aged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskRuns.bound","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.MaskRuns.bracket","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskRuns.entry_eq","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskRuns.flag_eq","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.MaskRuns.same","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.OptRel.isSome","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.answered","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.between","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.chain","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.ends","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.frames","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.RegionBracket.inside","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.ReplayRel.machine","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.RunMachine.id_of_fiber?","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.RunMachine.mem_of_fiber?","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.RunMachine.modify_nextId","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.arm_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.countdownEdits_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.countdown_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.drainOwed_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.drainOwed_queue_aux","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.driveStep_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.drive_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.evaluate_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.exit_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fairTape_unarmed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fiberEdit_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fiberEdits_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.finalizer_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.finishFrame_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fireStep_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fireTasks_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fire_keeps_tail","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.firedWithin_more","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.flush_fair","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.flush_fair_prefix","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.forkFinalizers_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.inject_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.interruptAs_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.interrupts_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.iteration_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.launch_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.linkEdits_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.link_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.modify_armed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.observer_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.observers_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.postTask_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.queue_refl","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.queue_trans","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.registerRace_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.settleOutcome_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.settle_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.spawn_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.start_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.stepFrame_queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.withFiber_queue","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.keys.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.keysList.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.keysList.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.validIn.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.validInList.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Val","name":"Effect4.Machine.Val.validInList.eq_foldr","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.all_exits","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.beginRace_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.bookMeans_controls","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.bookMeans_controls_forks","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.bookMeans_exits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.bookMeans_obs","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_advanceState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_arm","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_completedExits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_disarm","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_drainOwed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_drainOwed_aux","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_driveState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_emit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_fiber?","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_fiber?_cases","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_fireState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_fireStep","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_flushAllState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_flushRootState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_halt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_middleware","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_modify","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_postTask","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_replayEval","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_replayEval_ok","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_settled","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_stateOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_stepDecisionState","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_suffices","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.book_update","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.cleared_maskChain_iff","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.clearsExited_of_noClear","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.completedExits_rel","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.cons_eq_of","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.countdownParkEdits_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.countdownPark_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.dispatcherMeans_enqueue","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.dispatcherMeans_isEmpty","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.drainOwed_noClear","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.drain_rel","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.driveState_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.driveStep_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.driveStep_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.evaluatePrim_evaluatorKeepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.evaluatePrim_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.exitFiber_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.fiberEdit_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.fiberEdits_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_context","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_deferred","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_drained","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_enqueue","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_exit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_id","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_interruptedCause","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_interruptible","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_parked","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.fiberMeans_yield","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.finalizerOr_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.finishFrame_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.fireObserver_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.flatten_tasks_rel","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.flushAllState_succ","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.flushRootState_maskRuns","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.flushRootState_succ","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.flushRootState_zero","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.foldl_rel","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.forkFinalizers_maskAged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.fork_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.frameExitState_maskChain","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.injectYield_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptAs_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptEach_if_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptEach_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptEdit_maskAged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptRecord_maskLater","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.interruptRecord_pendingOk","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.interruptWithCause_maskLater","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.interruptWithCause_pendingOk","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.iteration_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.launchEntrant_maskAged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.linkScopeEdits_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.linkScope_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.listRel_find","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.listRel_insert","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.listRel_update","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_arm","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_disarm","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_emit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_halt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_middleware","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_modify","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_stateOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_update","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.machineOk_updateRace","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.maskRuns_decisionLift","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.maskRuns_empty","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.maskRuns_make","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.maskRuns_stepKeeps","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.middleware_maskAged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.noClear_append","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.noClear_append_of","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.noClear_ite","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.noClear_map","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.not_mem_of_noClear","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.outcomeOf_unfinished","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.pendingOk_dispatcher","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.pendingOk_of_fiber?","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.pendingOk_yield","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Stores","name":"Effect4.Machine.reasonsOfList.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Stores","name":"Effect4.Machine.reasonsOfList.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Machine.Folds.Stores","name":"Effect4.Machine.reasonsOfVal.eq_cata","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.registerRace_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.replayEval_cons","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.replayEval_maskRuns","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.replayEval_nil","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.runSyncExit_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.runloopTop_maskLater","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.saved_mask_chain_runs","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.saved_mask_pop_discipline","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.saved_mask_region_bracket","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.settleOutcome_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.settle_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.spawn_maskAged","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.spawn_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.start_keepsMask","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.stepDecisionState_interruptFrom","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.stepDecisionState_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.stepFrame_keepsMask","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.step_finished_flag","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.step_finished_stack","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.taskCmds_noClear","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Machine.Book","name":"Effect4.Machine.taskCmds_rel","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.withFiber_keepsMask","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Answers.has","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Answers.to","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.Captured.atScope","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.Captured.underFold","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.CapturedTy.atScope","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.CapturedTy.underFold","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Has.answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Has.to","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.HintTy.awaited","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.HintTy.canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.HintTy.made","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.HintTy.succeeded","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.captured","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.field","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.here","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.push","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.push2","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.reach","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Kept.tupleAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.Pointwise.of_map","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.Reads.eval","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.Reads.to","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.ReadsAll.trees","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Table","name":"Effect4.Modules.Table.Injective.decides","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.TypedScope.Reaches.of_push","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.TypedScope.Reaches.of_push2","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.TypedScope.Reaches.trans","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.TypedScope.depth","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.Types.to","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.Types.tree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.TypesAll.trees","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Scoped.attempt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Scoped.withdraw","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Typed.attempt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Typed.hint","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Typed.interrupted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.Waiter.Typed.withdraw","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_andThen","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_bindWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_deferredAwait","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_deferredMake","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_deferredSucceed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_die","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_fork","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_getId","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_ifElse","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_interrupt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_iterateWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_iterateWith_kept","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_maskWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_onExitWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_perform","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_refGet","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_refMake","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_refModifyWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_refModifyWith_captured","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_restore","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_selectOptionWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_selectOptionWith_kept","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_succeed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.answers_uninterruptible","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.apart_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.apart_cursor","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.apart_payload","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.apart_restore","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.argsTy_ok","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.ascribeFields_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.ascribe_check","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.ascribe_untyped","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.atomOf_native","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_add","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_and","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_append","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_cons","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_drop","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_get","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_isZero","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_ite","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_length","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_lt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_nil","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_none","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_not","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_or","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_pair","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_sameHandle","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_some","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_sub","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_take","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.atom_tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.bindTerm_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.capturedTy_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.capturedTy_answer_in_row","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.capturedTy_current","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.capturedTy_cursor_in_row","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.capturedTy_field","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.capturedTy_minted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.capturedTy_minted_in_row","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.capturedTy_var","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.captured_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.captured_answer_in_row","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.captured_current","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.captured_cursor_in_row","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.captured_field","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.captured_lit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.captured_minted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.captured_minted_in_row","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.captured_var","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.cell_read","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.deeper_push","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.depth_under","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.evalTerms_ok","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.formed_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.formed_sites","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.front_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_acquireRelease","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_andThen","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_bindWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_ifElse","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_maskWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_onExitWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.has_restore","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.held_last","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.hintTy_bool","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.hintTy_unit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.join_absorb","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.join_never_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_bool","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_cursor","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_minted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_nat","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_payload","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_restore","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_unit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.kept_var","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.later_mint_ne_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.listOf_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mapM_loop_ok","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mapM_ok","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mint_acc_ne_answer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mint_acc_ne_item","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.mint_current_ne_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.mint_current_ne_cursor","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mint_depth_inj","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mint_item_ne_answer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.mint_ne_of_head","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.mint_reserved","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.minted_acc_tree","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.minted_item_tree","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.minted_tree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nativeAtomTy_isSome","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nodesFormed_list","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nodesFormed_never","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nodesFormed_of_check","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nodesFormed_option","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.nodesFormed_refOf","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.normalize_refOf_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.onInterrupt_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.onInterrupt_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.postAll_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.postAll_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.protectedBy_has","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.protectedBy_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.pure_columns","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.push_minted_length","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_add","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_andT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_app","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_append","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.reads_ascribe","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_bool","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_drop","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_eq","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_field","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_foldWith","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_foldWith_model","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_front","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_head","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_ifT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_isEmpty","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_isZero","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_len","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_listOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_lit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_lt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_minT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_minted_acc","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_minted_item","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.reads_minted_last","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_nat","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_nilT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_noneOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_noneT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_notT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_orT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_pair","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_record","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_recordSet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_removeById","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_same","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_single","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_snoc","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_some","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_sub","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_take","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_tuple2","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_tuple3","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.reads_unit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.resolve_answer_in_row","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.resolve_append_free","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.resolve_go_last","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.resolve_last","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.resolve_minted_in_row","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.resolve_under_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.resolve_unshadowed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.resolves_along","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.rowTy_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.single_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.step_keeps_cell","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.step_updates","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.subN_join_of_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.sub_nil_list","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.typeAt_of_types","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.typeAt_tree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.typed_bound","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.typed_first","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.typed_second","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_add","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_andT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_app","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.types_ascribe","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_bool","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_drop","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_eq","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_field","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_foldWith","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_foldWith_same","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_front","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_head","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_ifT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_ifT_above","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_ifT_below","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_isEmpty","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_isZero","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_len","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_listOf","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_lit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_lt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_minT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_minted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_minted_acc","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_minted_item","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.types_minted_last","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_nat","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_nilT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_noneOf","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_noneT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_notT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_orT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_recordSet","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_removeById","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_same","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_sameItem","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_single","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_snoc","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_some","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_take","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_tuple2","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_tuple3","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_tupleAt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_unit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Checking","name":"Effect4.Modules.types_var","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.var_tree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitAnswer_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitAnswer_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitAt_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitAt_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetryAt_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetryAt_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetry_answers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetry_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Step.Reading","name":"Effect4.Modules.written_ne_mint","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.apart","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.below","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.distinct","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.idle","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.leaseFront","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.none_idle_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.once","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.returnFront","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.stamps","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.unheld","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.Profile.waiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.ResourceTy.canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.ResourceTy.cell","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.ResourceTy.item","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.close","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.drain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.giveBack","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.lease","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.select","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.StepsAgree.withdraw","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.apart_of_idle","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.borrowed_nil_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cellFields_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cellTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cellVal_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_available","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_availableTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_closing","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_closingTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_items","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_itemsTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_next","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_nextTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_setAvailable","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_setAvailableTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_setClosing","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_setClosingTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_setItems","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_setItemsTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_setNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_setNextTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_setWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_setWaitersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.cell_waiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.cell_waitersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.closeStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.closeStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.close_profile","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.close_refuses","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.drainStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.drainStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_drained","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_enrols","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_profile","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_waits","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.enrol_nodup","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.eq_of_stamp","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.freed_borrowed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.freed_not_held","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.freed_stamp","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_front","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_once","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_stale","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.heldBy_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.initial_available","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.initial_checkTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.initial_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.initial_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.itemFields_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.itemTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.item_borrowed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_borrowedTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_checkTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.item_lease","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_leaseTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.item_setBorrowed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_setBorrowedTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.item_setLease","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_setLeaseTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.item_stamp","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.item_stampTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.itemsFrom_from","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.itemsFrom_idle","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.itemsFrom_ne_nil","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.itemsFrom_nodup","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.itemsFrom_stamps","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.leaseReplyTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.leaseStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.leaseStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_closed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_enrolled","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_enrols_iff","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_waiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.leasedAs_stamp","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.leases_nil_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.map_keeps","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.map_stamps","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.mem_without","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.pool_steps_agree","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.profile_closed","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_atFront","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_freed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_headStamp","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_heldBy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_holdsT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_leasedAs","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_leasedItem","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_leasedOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_marked","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_mkWaiter","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_noItem","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_outstanding","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.reads_withdrawn","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.returnReplyTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.returnStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.returnStep_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.selectStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.selectStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.select_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.select_takes_first","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.stampsFrom_ne_nil","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.step_closing","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.step_items","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_atFront","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_cellAvailable","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_cellClosing","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_cellItems","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_cellNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_cellWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_freed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_headStamp","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_heldBy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_holdsT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_itemsFrom","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_leaseReply","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_leasedAs","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_leasedItem","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_leasedOf","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_marked","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_mkItem","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_mkWaiter","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_noItem","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_outstanding","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_setAvailable","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_setClosing","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_setItems","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_setNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_setWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_stampsFrom","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.types_withdrawn","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.waiterFields_formed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.waiterTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.waiterVal_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.waiterVal_renewed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.waiter_build","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.waiter_checkTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.waiter_id","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.waiter_idTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Reading","name":"Effect4.Pool.Model.waiters_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.withdrawStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.withdrawStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.withdraw_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.without_sublist","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.acquireAll_has","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.acquireAll_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.atClose_has","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.atClose_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.bool_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.borrower_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.borrower_typed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.cell_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closeReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closeReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closeReply_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closeStep_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_answers","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closer_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.closer_typed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.drainStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.drain_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.drain_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.errorsOf_never","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.giveBack_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.giveBack_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.initial_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.item_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.item_resourceTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.itemsFrom_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.leaseReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.leaseReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.leaseStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_makes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.mkItem_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.mkWaiter_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.reads_initial","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.reads_itemsFrom","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.reads_mkItem","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.reads_stampsFrom","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.refused_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.refused_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.requiresOf_succ","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.resolveAll_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.resolveAll_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.resource_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.returnReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.returnReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.returnStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.return_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.return_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.selectReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.selectReply_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.selectStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.select_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.stampsFrom_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.unit_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.use_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.use_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.waiter_hintTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.wake_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.wake_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.withdrawStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.withdraw_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.withdraw_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.DeferredStore.cancel_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.DeferredStore.complete_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.DeferredStore.make_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.bind","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.catchCause","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.catchIf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.exit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.matchCause","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.of_looped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.onExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.select","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.straight_perform","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.LoopedRows.suspendDecided_iff","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_completedExits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_emit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_fiber?","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_middleware","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_state","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_stuck","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.M_update","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.Mcall_armed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.Mcall_fiber?","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.Mcall_state","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.Mcall_stuck","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Mexit_armed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Mexit_exit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Mexit_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Mexit_state","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Mexit_stuck","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Myield_armed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Myield_completedExits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Myield_fiber?","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Myield_state","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Myield_stuck","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.PlainStack.cons","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.PlainStack.head","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.PlainStack.mask","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.PlainStack.nil","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.PlainStack.tail","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Quiet.empty","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.Quiet.of_deferreds_eq","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.answer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.lt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.none","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.not_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.refl","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.rest","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.same","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.step","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesC.trans","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesQ.refl","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesQ.step","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.ReachesQ.trans","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.SegOwes.call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.SegOwes.finish","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.SegOwes.step","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.SegOwes.yield","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.child_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.depthB_pos","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.depthB_straight","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_deliver_finish","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_deliver_running","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_drainDue","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_evaluate_load","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_finish_M","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.drive_loop_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_finish","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_running","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_sync_op","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_sync_op_none","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_sync_pure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_loop_yield","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.drive_nil","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.drive_seg","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.dueResumes_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.enter_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.eq_async_of_isCall","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.eq_call_of_isCall","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.eq_sync_of_isSync","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluateNative_of_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluateNative_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_failure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_localStep","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_stepShape","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_success","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_sync_op","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_sync_op_none","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.evaluatePrim_sync_pure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.exitScoped_eq_evaluatePrim","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.fiberAt_frame","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.fire_Myield","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.fire_Myield_answer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.flushAll_Mexit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.flushAll_Myield","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.fuel_succB","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.hostAnswer_silent","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.isCall_false_of_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.isCall_ofExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.iter_run_inl","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.iter_run_inr","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.iteration_M","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_agree","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_finish","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_lt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_mono","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_of_localRun","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRunC_waits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localRun_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.localRun_compileB","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.localRun_compileB_straight","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.localRun_rootB","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_async","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.localStep_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_failure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_failure_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_finished_stores","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_other","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_stores","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_success","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.localStep_success_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loopAgreement","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.LoopAgreement","name":"Effect4.Program.Agreement.loopAgreement_of_straight","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loopAt_iterate","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loopResultAt_iterate","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loop_reaches","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.LoopAgreement","name":"Effect4.Program.Agreement.meaningB_straight","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.not_sync_of_isSync_false","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.parkOf_plain","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.parkOf_sync","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_compileEff","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_contAAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_contAOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_contEAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_contEOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_contEOf_caughtError","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_loopFinishAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_loopNextAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_loopResumeAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_ofExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_onExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_resolve","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainCode_suspendBodyAt","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plainFrame_onExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.plain_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.popOf_plain_not_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.registerAsync_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.replayEval_cons","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.replayEval_nil_finished","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.replay_Mexit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.replay_Mexit_of_localRun","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.run_eq_meaning","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.stepFrame_eq","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.step_fst_failure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.step_fst_success","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.steps_le_boundB","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.straight_of_asExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.suspendBodyAt_iterate_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.suspendBodyAt_missing","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.suspendBodyAt_other","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.suspendBodyAt_zero","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.syncOpStep_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.syncState_op","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.syncState_pure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.syncValue_op","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.Agreement.Machine","name":"Effect4.Program.Agreement.syncValue_pure","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.ArgPat.holds_fold","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.ArgPat.supplies_isSome","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.instIsPartialOrder","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.instLawfulOrderLT","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.instLawfulOrderSup","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_assoc","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_comm","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_never","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_never_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_self","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.join_unknown","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.le_unknown","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.CTy.never_le","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.hostRun_bindExit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.hostRun_call","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.hostRun_eq_meaningUnder","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.hostRun_pure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.hostRun_straight","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.interpret_rowsHandler","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.map_reassoc","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.meaningRows_eq_hostRun","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.meaningRows_eq_run","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.meaningUnder_eq_run","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.runRowsH_bind","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.HostRuns","name":"Effect4.Program.Denote.tapeHandler_eq_replies","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.Eff.refSites_expandRound","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.instIsPartialOrder","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.instLawfulOrderSup","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_assoc","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_comm","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_least","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_never","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_never_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.join_self","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.le_join_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.le_join_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.ErrTy.never_le","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.Fixed.holds_eq","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.Fixed.holds_fold","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.LayerTerm.refSites_append","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.LayerTerm.refSites_move","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.drive","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.evaluate","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.kept","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.live","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.load","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.pending","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.queue","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.registration","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.state","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.step","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.LoopCut.task","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.NativeAtom.monoApply_self","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.NativeAtom.projectProduct.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.ReadsBack.of_Readable","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Record.check_declared","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Record.fieldType_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Record.setType_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Record.setType_same","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.BMeans.exitOf","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.BehR_fuel_irrelevant","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.beh_eq_ref","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_frontier","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_pure","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_store","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_store_missing","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_suspend","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.evaluateR_sync","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.interpR_answerCode","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.interpR_body","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.loadR_current","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.load_ok","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.load_rel","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.obsR_load","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.obs_Mexit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replayR_externals","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replayRel_classify_obs","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_externals","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_machine","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_ok","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_outcome","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_rel","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.run_eq_ref","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.run_eq_ref_exit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.straight_beh","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.straight_ref","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.straight_sufficient","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.suffices_eq_ref","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Tuple.project.eq_cata","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Tuple.typeAt_normal","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.Normal.members_ascending","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.Normal.members_maximal","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.Normal.ofMembers_members","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.argsBelow_app_iff","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.factors_coverage","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.join_least","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.member_sub_self","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.members_join","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.members_normalize_prod","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.members_normalize_union","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.members_subset_factors","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normal_args","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normal_children","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normal_factors_nonempty","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normal_headCanon","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normal_members","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.normalizeRow_coverage","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.productMembers_isMember","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sameHead_false_symm","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sizeOf_member_le","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sizeOf_member_lt","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_antisymm_canonical","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_antisymm_normal","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_iff_members","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_join_iff","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_join_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_join_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_member_right_iff","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_never","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_app","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_of_sub","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_prod_mono","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_record","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_tuple","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_union_le","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_union_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_normalize_union_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_prod_mono","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.OrderProof.sub_record_of_canonical","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.WidensSub.refl","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.WidensSub.trans","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.eq_never_of_sub_never","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.eq_of_sub_of_sub","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.hasTy_join_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.hasTy_join_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.instantiate_of_noVars","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.isMember.eq_cata","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.isMember_eq_false","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.isNever.eq_cata","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_assoc","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_comm","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_eq_ofMembers","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_least","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_never","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_never_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_self","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_unknown","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.join_unknown_left","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.key.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.keyFields.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.keyFields.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.keyItems.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.keyItems.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.members.eq_cata","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.members_join","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normal_of_canonical","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.normalize.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.normalizeFields.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.normalizeFields.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.normalizeItems.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.normalizeItems.eq_foldr","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_append_comm","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_append_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_append_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_congr","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_coverage","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalizeRow_fixed","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.normalize_join","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_list_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_option_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_pair_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_prod_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_triple_canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.normalize_tuple_canonical","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.ofRaw_eq_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.record_normal_fields","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.renderFields.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.renderFields.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.renderItems.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.renderItems.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Ty.renderRaw.eq_cata","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_equiv_iff","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_join_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_join_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_normalize_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_normalize_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_refl","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_trans","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_antisymm_canonical","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_join_left","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_join_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_le_subN","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.sub_list","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_never_right","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_normalize_of_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.sub_option","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.sub_prod","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_trans","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.Ty.sub_tuple_of_items","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.CodeArrow.mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ConfigTyped.code","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ConfigTyped.machine","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ConfigTyped.queue","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.CountdownPayload.collected","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.CountdownPayload.resume","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.CountdownPayload.targets","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.CountdownPayload.token","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.answer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.clockNone","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.clockSome","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.drain","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.interrupt","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.DecisionEdits.yield","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.EntrantsWithin.kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.EntrantsWithin.mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Fits.eq_cata","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.all_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.append_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.get?","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.instantiateB","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.instantiate_admits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.nil_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.pair_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.singleton_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.triple_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FitsAll.tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.addFiber","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.addPromise","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.addRef","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.allocExternal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.allocMemo","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.allocScope","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.cell","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.fiber","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.FreshFrom.promise","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.alloc","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.cell","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.fiber","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.promise","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.refl","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.service","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.services","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.store","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.Grows.trans","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.IteratorProtocol.fold","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.IteratorProtocol.unfold","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.LoopProtocol.fold","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.LoopProtocol.unfold","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.M7Fragment.answerFree","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.M7Fragment.checked","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.M7Fragment.closedRow","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.M7Fragment.emptyTable","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.M7Fragment.lawful","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MCodeOk.congr","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MCodeOk.mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MCodeOk.races","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MHostStack.mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MHostStack.of_stack","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MHostStack.races","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MPositionStack.mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MPositionStack.of_host","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MRegistration.mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.MRegistration.races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineLive.dueOwners","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineLive.running","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineTyped.code","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineTyped.live","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineTyped.services","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineTyped.sourceWF","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.MachineTyped.typed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.entries","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.fromEntries","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.get","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.keys","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.map_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.set","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.MapFits.write_canon","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.ObserverState.observers","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.ObserverState.pendingOwner","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ProgramArrow.close","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ProgramArrow.entry","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.ProgramArrow.guardBind","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ProgramArrow.mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ProgramArrow.outputMap","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.PromiseTableOk.due","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.PromiseTableOk.memo","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.authority","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.delivery","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.enroll","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.fresh","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.keys","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.links","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.noRaceAfterInterrupt","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.observer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.owners","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.payload","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.raceObservers","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.QueueOk.registration","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.accepted","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.cleanup","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.failures","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.live","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.token","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RacePayload.winner","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RaceReply.imp","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RaceReply.kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RaceReply.of_exited","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RaceReply.races","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.RaceReply.stackReply","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.code_of_deliver","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.code_of_not_deferred","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.congr","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.cons","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.stackAt","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.sub","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ReadOk.world","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.ReservedKeysR.below","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.ReservedKeysR.disjoint","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.deferredCause","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.exited","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.exitedStack","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.fiberIds","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.fibersBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.keysBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.liveBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.observersBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.parkedBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.parkedIdle","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.pendingShape","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.raceHosts","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.raceIds","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.raceObservers","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.racesBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.requestsBelow","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.requestsOwned","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.SchedulerState.targetsBelow","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.StackCertificates.mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.StackReplyAt.congr","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.StackReplyAt.mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TermMaps.mono","placement":"tagged"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TermMaps.widen","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.fiber_inv","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.guard_frame","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.guard_inv","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.guard_inv_of_ne","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.guard_inv_ordinary","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.pure_inv","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TypedProg.store_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WakeTyped.empty","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WakeTyped.mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WakeTyped.of_subset","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WakeTyped.register","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.cells","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.children","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.fibers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.heap","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.ids","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.promises","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.root","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.state","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.timers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.tokenBound","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.tokenTargets","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.tokens","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.waiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.WorldValid.wf","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.activeDelivery_races","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.admitColumn_except_never_never","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.admitColumn_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.admitColumn_normalize","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.admitColumn_prod_never_nat","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.admittedReplay_noHostAnswer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.admittedTape_of_noHostAnswer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.admitted_typed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.afterInterruptReply_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.allGuard_typed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.allHeads_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.allHeads_tuple","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ambientScope_answers_of_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.ambientScope_live","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ambient_captureContext_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ambient_getContext_answers","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ambient_getContext_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ambient_setContext_guarantees","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.ambient_setContext_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.asyncFinalizerProtocol_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.asyncPre_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.asyncPre_rows_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_alts","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_custom","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_poly","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_shape","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.atomFits_of_variadic","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.await_fits","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.bitEntry_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.bodyTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.bodyTyped_rows_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.canon_instantiate","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.captureTyped_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.capture_lookup","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.capture_release","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.catchGuard_typed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.causeFits_admits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.causeFits_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.causeFits_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.cellAt_append_old","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.cell_inhabited","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.cell_inj","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.cells_of_typedState","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.cleanExit_of_never_fits","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.close_typed","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.codeOk_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.codeOk_of_saved","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.codeOk_races","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.commandAuthority_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.commandDelivery_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.commandOwner_found","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.completionOk_extends","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.completionOk_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.completionOk_of_fitsExit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.completion_transport","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.configTyped_append_tasks","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.contextUpdateTyped_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.context_services_fresh","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.countdownAt_congr","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.decisionKeeps_of_ledger","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.decisionLift_of_ledger","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.deferredMake_extension","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.denotesTyped_of_layerFree","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.denotesTyped_of_provideLayer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.driveState_typed_of_stepPreserves","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_evaluate","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_middleware","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_nil","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_ran","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_skip","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.edit_task","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.entriesLive_addV","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.entriesLive_of_flatMap","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.envTyped_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.equiv_normalize","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.evaluate_entry","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.except_never_never_empty","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.except_never_never_no_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.exists_mem_singleton_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.exitFits_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.exitOk_failure_of_errorN","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.exitOk_finalizer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.exitOk_restore","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.exitOk_success_of_answerN","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.exitOk_unit_finalizer","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.exitOk_widen","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fiberDeclared_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fiberDeclared_normalize","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.fiberListColumns_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.fiberPre_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.fiberPre_rows_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fiber_inhabited","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.finalizerAdmitted_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.finalizerAdmitted_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.finalizerBind_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.finalizerTyped_of_admitted","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.finalizer_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.finalizersAdmitted_of_typedState","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.finalizers_of_typedState","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.finishFinalizer_payload_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsAll_of_pointwise","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsCause_of_clean","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_failure_cause","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_failure_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_failure_of_error","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_failure_shape","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_of_clean","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_subN","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_success","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_success_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitsExit_unknown","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_app_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_bool_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_contextOf_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_contextOf_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_contextOf_provide","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_context_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_deferredOf_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_factors","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_firstErrorValue","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_flatFits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_fst","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_handle_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_instantiate_widens","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_join_left","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_join_right","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_leafEdge","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_leafPath","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_leafRep","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_leafRule","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_list_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_lit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_live","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_maskRestore_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_maskRestore_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_members","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_nat_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_nat_irrel","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalizeRow","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize_prod","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize_tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_ofMembers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_of_hasTy_shapeDecides","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_of_inhabited_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_of_inhabited_handleFree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_of_leafRep","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_option_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_prod_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_productMembers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_queryReasons","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_record_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_record_none","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_refOf_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_savedMask","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_scopeHandle","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_scope_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_string_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_subN","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_tagPayload","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_tuple_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_unit_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitters.eq_cata","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitters.eq_foldr","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fitters_eq_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.flatFits_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.flatFits_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.flatMap_live","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fold_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.fork_extension","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.frameAccepts_iter","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.frameAccepts_loop","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.frameProtocols_iterator","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.frameProtocols_loop","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.getElem?_append_singleton_cases","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.guardBind_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.guarded_stepKeeps_of_stepPreserves","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handleFits_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handle_fits_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handle_fits_live","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handle_fits_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handle_inhabited","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handles_exitErr","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.handles_of_cause","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.hasTy_app_eq","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.hasTy_nat_allocated","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.heads_zip_flag","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.heapNotMonotone","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.heapTable_of_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.heapTypedAt_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.heap_bad","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.heap_coverage_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.heap_good","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.heap_typed_at_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.hostStackAt_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.hostStack_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.hostStack_of_stackAccepts","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.hostStack_push","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.hostStack_races","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_iff_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_iff_handleFree","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_join","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_normalize","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_of_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_of_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_subN","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.initialWorld_freshFrom","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.initial_world_valid","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.initial_world_valid_at","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.insert_extends","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.insert_here","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.insert_other","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.intImage_handles","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.invalid_refl","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.isSome_extends","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemFitters.eq_cata","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemFitters.eq_foldr","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemFitters_eq_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_live","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_of_itemsHasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_witness","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.itemsFit_world_free","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.iteratorProtocol_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.iteratorStep_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.kindLive_map","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.layerPointTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.layerPointTyped_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.layerRefsWF_of_typeOf","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.leHost_base","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.leHost_refl","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.leHost_trans","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.le_serviceTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.leafEdges_target_ne_lit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.leafPath_target","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_cell","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_context_of_servicesFit","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_ctor","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_ctor_one","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_fiber","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_handle","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_kind","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_list","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_of_handles_nil","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_promise","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_some","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.live_validIn","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.load_typed_of_denotesTyped","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.loopPointTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.loopPointTyped_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.loopProtocol_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.loopStep_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.m7_of_ledger","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineLive_of_quiet","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineTyped_congr","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineTyped_load","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineTyped_not_halted","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.mem_rowMeet","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.mem_taskCmds","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.memoBuild_extension","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.memoLive_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_cons_eq","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_live","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_skip","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_witness","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.namedFit_world_free","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.not_readsCode_taskCmds","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.not_retired_of_inhabited","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.numberImage_handles","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.obsTyped_admitted","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.obsTyped_of_machineTyped","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.observerCommandOk_congr","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.observerCommand_resume_typed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.observerDeliveredExit_fits","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.observerState_load","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.observer_exitValue_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.onExit_typed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.order_refl","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.order_trans","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.park_extension","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.pending_below","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.pointTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.pointTyped_rows_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.positionArrow_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.positionArrow_of_registration","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.positionStack_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.positionStack_of_host","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.positionStack_of_stackAccepts","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.preds_savedOk_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.prod_never_nat_empty","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.prod_never_nat_no_hasTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.projectProduct_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.promiseDeclared_map","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.promiseTable_of_strong","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.promiseTypedAt_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.promise_coverage_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.promise_extension","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.promise_inhabited","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.promise_inj","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.promise_typed_at_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.protocol_order","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.queryError_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.queryTag_bool","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.queueOk_append_tasks","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.queueOk_emit","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.queueOk_nil","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.raceRegistrationR_ambient","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.racesKept_of_eq","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.reachable_of_ledger","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.readCode_races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.readsCode_append_tasks","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.reestablishes","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.refDeclared_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.refMake_extension","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.refPeek_append_new","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.refPeek_append_old","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.ref_completion_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.ref_completion_live","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.regionTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.regionTyped_rows_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.registrationArrowAt_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.registrationArrow_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.registrationArrow_races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.registrationQueue_append_tasks","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.registrationState_load","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.registrationState_races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.registrationTail_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.reifyExitVal_fits","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.replayEval_machine_prefix","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.replayR_bmeans_reachable","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.replayR_nil_machine","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.replay_stuck_eq","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.requestOfR_load_none","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.resumeCode_of_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.rootCode_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.rowMeet_left","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.rowMeet_right","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.rreachable_load","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.savedOk_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.schedulerState_load","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.scopeFinalizers_admitted","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.scopeLive_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.scopeSig_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.scopedGuardBind_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.seqGuard_typed","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.seq_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.serviceTy_of_le","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.servicesFit_addV","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.servicesFit_empty","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.servicesFit_map","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.servicesFit_merge","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.settling_fork","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.settling_mask","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.settling_ref_allocation","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.settling_ref_preserves_nat","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.signature_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.sourceWF_of_typeOf","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.stackCertificates_rows_append","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.stackReply_mono","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.stackReply_races","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.stackTyped_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.stackTyped_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.stepKeeps_of_stepPreserves","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.storePre_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.storePre_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.storeTyped_of_typedState","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Program.Typed.Scheduler","name":"Effect4.Program.Typed.storedObserverOk_congr","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.stores_ordered","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.strongExit_bool","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.strongExit_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.strongValue_bool_true","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.strongValue_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.subset_rowMeet","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.syncOpStep_refMake","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.table_refl","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.table_trans","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.taskCmd_not_link","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.taskCmd_not_reads","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.taskCmd_not_registrationDone","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.taskCmd_owner","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.taskCmd_tail","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.termFits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.tupleAt_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.tupleItem_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.tuple_project_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.tuple_typeAt_fits","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.typedProg_mono","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.typedProg_rows_append","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.typedProg_widen","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.typedState_load_of_code","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.typedState_of_load","placement":"inherited"},{"concept":"residual-program-typing","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.unguard_payload_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.valid_deferredMake_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.valid_nextToken_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.valid_refMake_fresh","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.valueOk_mono","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.valueVarsAlg_app","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.valueVarsAlg_record","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.valueVarsAlg_tuple","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.valueVars_record_fields","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.valueVars_tuple_items","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.Validity","name":"Effect4.Program.Typed.value_transport","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.world_order_refuses","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Val.fieldCheckers.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Val.fieldCheckers.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Val.hasTy.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Val.itemCheckers.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.Val.itemCheckers.eq_foldr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.accepted_prints","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.actionHeads_reserved","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.action_image_head","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.any_row_normalize","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.apart_of_lt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.argSortOf_fold","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.argSorts_view","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_app_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_field_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_fold_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_recordSet_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_record_intro","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argTy_tupleAt_intro","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.argsReadable_at","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.argsTy_cons_intro","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.args_of_sorts_single","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.below","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.buildRow_of_findIdx?","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.buildRow_ok","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.captured_of_lookup","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.cata_effs_cons","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.cata_layers_cons","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.cata_stmts_cons","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.causeAdmits_congr_pred","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.child_at_hole","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.clearsExited_of_guard","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.compiled_mask_chain_runs","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.compiled_region_bracket","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.defName_not_reserved","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.dom_effs_cons","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.dom_layers_cons","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.dom_stmts_cons","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_none_action","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_none_invoke","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_none_path","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_none_rigid","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_none_rowCall","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.earlier_stmt_none","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.eff_of_view_op_term","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.evaluateNative_keepsMask","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.exactUpTo","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.excludedAt.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.excludedField.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.excludedField.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.expanded_refs_nil_of_wf","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.famRank_le_one","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.find?_index","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.find?_of_findIdx?","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.find?_selects_fold","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.find?_selects_of_printedRow","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.findSome?_zipIdx","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.fold_eq_invoke","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.fold_eq_op_term","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.foldl_expandRound_refSites_nil","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.guarded_driveStep_liveTransports","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.guarded_driveStep_maskRuns","placement":"tagged"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_factors","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_fibers","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_fibers_nil","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_members","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalizeRow","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_app","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_causeOf","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_except","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_exitOf","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_list","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_map","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_never","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_option","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_prod","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_record","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_tuple","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_normalize_union","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_ofMembers","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_of_normalize_eq","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_productMembers","placement":"inherited"},{"concept":"subtyping-algebra","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.hasTy_tuple_pair","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.hole_of_not_supplied","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.hole_of_not_supplied_stmt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.hole_zero","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.instAnn_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.instFields_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.instStmt_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.instStmts_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.inst_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.insts_congr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.invoke_prints","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.invokedDef_none_of_reserved","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.invokedDef_none_of_row","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.invokedDef_of_def","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.invokedDef_some","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.isTagTy.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.layerAt_ne_nil","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.leafReadable_of_argReadable","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.lookup_cons_ne","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.lookup_of_captured","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.mapM_read_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.mapM_read_write","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.matchT_none_of_reserved","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.mem_actionHeads","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.mem_of_lookup","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.monoApply_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nat_sub_int","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_add","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_and","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_append","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_cons_nil","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_drop","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_eq","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_get","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_isZero","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_ite","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_ite_above","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_ite_below","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_length","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_lt","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_nil","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_none","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_not","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_or","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_pair","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_sameHandle_deferred","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_some","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_take","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Program.Typing.TermIntro","name":"Effect4.Program.nativeAtomTy_tuple","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.patternAt_fold","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.payloadFieldTy.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.payloadFieldTys.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.payloadFieldTys.eq_foldr","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.payloadItemTys.eq_cata","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.payloadItemTys.eq_foldr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.printArg_child","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.printArg_fixed","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printArgs_lookup","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.printArgs_single","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printCall_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printPerform_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printPerform_nodeLike","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printRow_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printRow_nodeLike","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printsBackUpTo","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.printsTo_of_printArg","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.printsTo_of_rowPrint","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Program.rawSupportedErrTy.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readArg_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readArg_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readArgs_at_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readArgs_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readArgs_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readCapture_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readCapture_expr_child","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readCapture_exprs_child","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readCapture_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readCapture_print_leaf","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readCapture_stmts_child","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readKeys_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readLayer_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readLayer_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readLeaf_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readLeaf_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_action_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readRow_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_invoke_none","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_invoke_none_of_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_invoke_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_none_of_fam","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_none_of_nomatch","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_none_of_refuse","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_none_of_same","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_none_of_stmt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_path_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_rigid_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readRow_rowCall_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readSpine_exact_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readSpine_print_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readStmtRow_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readStmtRow_inv","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmtRow_none_of_fam","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmtRow_none_of_nomatch","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmtRow_none_of_out","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmtRow_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmt_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readStmts_exact_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readStmts_print_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readT_action_none_of_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readT_action_none_of_printRow","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.readT_exact_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readT_of_row","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readT_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readT_print_step","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.read_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.read_print","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.readableAt_of_argReadable","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.refSites_nil_of_refsWithin","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.refsWithin_round","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.refsWithin_rounds","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.refsWithin_self","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.replayCheckedFrom_maskRuns","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.rowDom_inv","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.rowHeadReadable_of_request","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.rowPrint_inv","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.selects_fam_ctor","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.selects_fold","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.steppedBy_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.stepped_live","placement":"tagged"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.stmtDom_inv","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.stmtPrint_inv","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.supplied_eq_of_selects","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.table_actionHeaded","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.table_apart","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.table_complete","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_fact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_family","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_fixedNoHole","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_holesLt","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.table_invokeNamed","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_linear","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.table_row","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.table_shape","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.target_refs_prior","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.withFunction_head","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.withHeadTypes_head","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.apart","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.awaiters","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.enrol","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.offers","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.offersDistinct","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.opened","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.peekers","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.pend","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.positive","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.shrink","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.suspend","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.takers","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.FirstProfile.takersDistinct","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.named","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.ok","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.quiet","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.tidy","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.FirstRunInv.within","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.Flags.accounted","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.Flags.spent","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.Flags.woken","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.MessageTy.canonical","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.MessageTy.cell","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.MessageTy.offer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Relation","name":"Effect4.Queue.Model.Notified.entered","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Relation","name":"Effect4.Queue.Model.Notified.signals","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Relation","name":"Effect4.Queue.Model.Notified.woken","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.offer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.poll","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.size","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.take","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.withdrawOffer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.StepsAgree.withdrawTake","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.acceptLoop_length_le","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.acceptLoop_single","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.acceptLoop_spent","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.acceptLoop_suffix","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accept_accounted","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.accept_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.accept_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accept_spent","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accounted_iff","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accounted_of","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accounted_refl","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.accounted_trans","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.afterConsume_closed","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.afterConsume_flags","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.afterConsume_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.afterConsume_opened","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.afterConsume_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.answerOf_single","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.ascribe_formed_for_steps","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.awaitQ_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.behind_iff","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.bump_inv","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cellFields_normal","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cellTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_cap","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_capTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.cell_enrolled","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_msgs","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_msgsTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_offers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_offersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.cell_pended","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.cell_renewed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_setMsgs","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_setMsgsTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_setOffers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_setOffersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_setTakers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_setTakersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.cell_takers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.cell_takersTy","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.clear_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.close_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.consume_flags","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.earlier_isEmpty","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.empty_inv","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.empty_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.empty_typed","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.first_profile_closed","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_run_flags","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_run_inv","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_step_inv","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.fit_succ","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.hasRoom_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.idlePair_sub","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.idleTriple_sub","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.idle_flags","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.isDone_opened","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.isOpen_opened","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.message_nodes_for_steps","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.offerAll_kept","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerFields_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offerStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerStep_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offerVal_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offer_behind","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.offer_build","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offer_checkTy","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.offer_flags","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offer_full","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.offer_id","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offer_idTy","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.offer_kept","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offer_nodes_for_steps","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.offer_profile","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.offer_rest","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offer_restTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offer_room","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offers_renew","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.peek_kept","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.pollReplyTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.pollStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.pollStep_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.pollStep_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.poll_consumes","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.poll_flags","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.poll_idle","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.poll_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.poll_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.positive_suspend_step_capacity","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.pull_buffered","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.pull_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.pull_profile","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.queue_steps_agree","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.quiet_iff_wake","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_enrolled","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_entering","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_fitting","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_gained","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_isHead","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_mkOffer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_mkTaker","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_removeOffer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_removeTaker","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.reads_renewHint","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_sameTaker","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_staying","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.reads_wake","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.ready_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.removeTaker_accounted","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.removeTaker_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.room_eq","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.room_of","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.room_of_full","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.settle_idle","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.settle_kept","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.settle_opened","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.settle_profile","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.shutdown_kept","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.sizeStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.sizeStep_typed","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.step_state","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.step_within","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takeReplyTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.takeStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takeStep_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takeStep_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.take_consumes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.take_eq","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.take_flags","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.take_kept","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.take_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takerFields_formed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takerTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.takerVal_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.takerVal_renewed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.taker_build","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.taker_checkTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Reading","name":"Effect4.Queue.Model.taker_id","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.taker_idTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.takers_renew","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.tidy_iff","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.toWake_stored","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_cellCap","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_cellMsgs","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_cellOffers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_cellTakers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_enrolled","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_entering","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_fitting","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_gained","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_isHead","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_mkOffer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_mkTaker","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_removeOffer","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_removeTaker","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_renewHint","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_setMsgs","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_setOffers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_setTakers","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_staying","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.types_wake","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.waiting_nodup","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.wake_again","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.wake_blocked","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.wake_encoded","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.wake_profile","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.wake_toWake","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.withdrawOffer_agrees","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.withdrawOffer_flags","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.withdrawOffer_kept","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.withdrawOffer_opened","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.withdrawOffer_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawOffer_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawOffer_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.withdrawTake_agrees","placement":"tagged"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.withdrawTake_flags","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.withdrawTake_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawTake_typed","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawTake_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.bounded_makes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.bounded_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.bounded_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.cell_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.empty_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.message_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.mkOffer_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.mkTaker_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offerReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offerReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offerStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_hintTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_withdrawal","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_withdrawal_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.pollReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.pollReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.pollStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.poll_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.poll_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.poll_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.reads_empty","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.sizeStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.size_read","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.size_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.size_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.takeReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.takeReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.takeStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_withdrawal","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_withdrawal_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.taker_hintTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.wakeReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.withdrawOffer_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.withdrawTake_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.admit_of_answerAdmits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.answer_tape","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.comodel_ext","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.driveFrom_maskRuns","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.drive_hostAnswered","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.drive_maskRuns","placement":"tagged"},{"concept":"host-session-protocol","module":"Effect4.Laws.Program.RowProtocol","name":"Effect4.Run.guardRows_answer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.guardRows_envelops","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.guardRows_exitsOnly","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Program.RowProtocol","name":"Effect4.Run.guardRows_meets","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Program.RowProtocol","name":"Effect4.Run.guardRows_of_meets","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.hostAnswered_append","placement":"inherited"},{"concept":"host-session-protocol","module":"Effect4.Laws.Program.RowProtocol","name":"Effect4.Run.hostAnswered_guardRows","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.hostAnswered_quiet","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.hostGuard_of_meets","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.hostGuard_through","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.open_maskRuns","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.open_play_maskRuns","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.openedOf_play_open","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.play_journal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.play_machine_stepsBy","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.play_maskRuns","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.reactorHost_answer","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.reactorHost_ofHost","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.retry_typed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.rowPosition_external","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_denotes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_guarded_denotes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_hostAnswered","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_host_denotes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_layer_denotes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_session","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.sessionSystem_finished","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.sessionSystem_finishes","placement":"tagged"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Api.MaskRuns","name":"Effect4.Run.step_maskRuns","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.tapeFrom_append_read","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.tapeFrom_control","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Bridge.schema.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.Prepared.decode_agrees","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.Prepared.encode_agrees","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.Prepared.isValue_agrees","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeCause_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeCause_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeDefect_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeDefect_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeDefect_obj_other","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeDefect_obj_two","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeErr_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeErr_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeErr_obj_ne","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeErr_obj_two","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Codec.decodeRaw.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_except","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_exitOf","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_map","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_option","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_record","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_tuple","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeRaw_union","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeReason_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.decodeReason_normJ","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Codec.encodeRaw.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.encodeRaw_map","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.encodeRaw_record","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.encodeRaw_tuple","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.encodeRaw_union","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.entries_frame","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_obj","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_one","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_some","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_tag_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.fields?_two","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.insertE_eq_insertBy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.insertE_perm","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.int?_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.int?_normJ","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Codec.isSupported.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.isValue_policy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_cause","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_defect","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_error","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_failure","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_fiberId","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_success","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.key_value","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Codec.layout.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.mapM_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.mapM_map_comp","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.mapM_map_option","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.named_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.named_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.nat?_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.nat?_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.negJson_of_nat?","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normEs_eq_map","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_arr","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_canonBy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_eq_str","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_obj","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_tagged_of_payload","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJ_tagged_orders","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.normJs_eq_map","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.number?_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.number?_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.objectRead_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.objectRead_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.objectValues_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.objectValues_keys","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.objectValues_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.payload?_eq","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.payload?_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.payload?_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.payloadOfHex?_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.pick_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.pick_pair","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.pick_single","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.positions_exact","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.positions_normJ","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.signBit_le_of_div","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.single?_map","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.single?_perm","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.sortE_eq_canonBy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.sortE_perm","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.sortE_two","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.tagPattern_normJ","placement":"inherited"},{"concept":"initial-algebras-folds","module":"Effect4.Laws.Program.Folds.Ty","name":"Effect4.Schema.Codec.wire.eq_cata","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.Codec.wire_type","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_encode","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_iff","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_of_encode","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_policy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_bool","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_eq_some","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_injective","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_isSome_iff","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_of_decode","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_of_hasTy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_policy","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_string","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_sub","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.encode_unit","placement":"inherited"},{"concept":"exact-codecs","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.hasTy_decode","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.request_uses_original","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.respond_rejects_wrong_id","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.respond_rejects_wrong_phase","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_add","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_complete","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_prefix","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_restore","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_result","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_scope","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_zero","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.popFrom_carriedCause_isSome","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_already_masked","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_complete","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_failure_cleanup","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_failure_pending","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_masked_continuation","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_success_cleanup_failure","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_success_no_pending","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_success_pending","placement":"inherited"},{"concept":"scope-lifetime-finalization","module":"Effect4.Laws.Machine.ScopeRestoration","name":"Effect4.ScopeRestoration.resumeClosedScope_unfinished","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.below","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.bounded","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.distinct","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.enrol","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.rising","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.Profile.shrink","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.StepsAgree.release","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.StepsAgree.take","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.StepsAgree.takeIfAvailable","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.StepsAgree.visit","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.StepsAgree.withdraw","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cellFields_formed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cellTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_next","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_nextTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_permits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_permitsTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_setNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_setNextTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_setTaken","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_setTakenTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_setWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_setWaitersTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_taken","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_takenTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.cell_waiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.cell_waitersTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.empty_checkTy","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.empty_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.fits_iff","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.initial_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.mem_without","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.profile_closed","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_eligibleT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_fitsT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_freeT","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_fromFirst","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_mkWaiter","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_removeWaiter","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.reads_visitFrom","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.releaseStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.releaseStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.release_profile","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.semaphore_steps_agree","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.step_permits","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeIfAvailableStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.takeIfAvailableStep_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeIfAvailable_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.takeIfAvailable_profile","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeIfAvailable_stays","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.takeStep_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.take_enrols","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.take_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.take_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_cellNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_cellPermits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_cellTaken","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_cellWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_eligibleT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_fitsT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_freeT","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_fromFirst","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_mkWaiter","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_removeWaiter","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_setNext","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_setTaken","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_setWaiters","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.types_visitFrom","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.visitStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.visitStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_none_fits","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_none_free","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_reserves_nothing","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_selects_earliest","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_some","placement":"inherited"},{"concept":"reactive-scheduling","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_stops_iff","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiterFields_formed","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiterTy_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiterVal_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiterVal_renewed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiter_build","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiter_checkTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiter_id","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiter_idTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiter_need","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiter_needTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiter_stamp","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.waiter_stampTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Reading","name":"Effect4.Semaphore.Model.waiters_renew","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.withdrawStep_agrees","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.withdrawStep_types","placement":"tagged"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.withdraw_profile","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.without_sublist","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.bool_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.capturedTy_cursorOr","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.captured_cursorOr","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.cell_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.empty_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.getOrElse_stamp","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.kept_cursorOr","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.make_makes","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.make_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.make_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.mkWaiter_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.reads_empty","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.releaseReply_at","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.releaseReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.releaseReply_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.releaseStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.release_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.release_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.release_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailableStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailable_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailable_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailable_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_withdrawal","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_withdrawal_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.taker_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.taker_typed","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.unit_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visitReply_nodes","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visitReply_normal","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visitStep_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visit_attempt","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visit_attempt_minted","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.waiter_hintTy","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.walk_answers","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.walk_scoped","placement":"inherited"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermitsIfAvailable_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermitsIfAvailable_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermits_scoped","placement":"inherited"},{"concept":"store-typing","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermits_types","placement":"tagged"},{"concept":"translation-simulation","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withdrawStep_scoped","placement":"inherited"}],"universe":"theorems of the registry's concept-named modules; auxiliary names and planned goals excluded","unplacedByModule":[],"unplacedCount":0},"plan":{"next":["Effect4.Program.Typed.Evaluating.countdown_parks_positional","Test.Dogfood.Scenario.Atomic.Store.shop_stages","Test.Dogfood.Scenario.Atomic.Cleanup.log_debits","Effect4.Run.CallTree.request_leads","Test.Dogfood.Scenario.Timeout.cleanup_keeps","Test.Dogfood.Scenario.Timeout.retries_declared","Test.Dogfood.Scenario.Workers.Assertions.logs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","Effect4.Program.FinalizerRun.once_placed_pushes_once"],"nodes":[{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":281,"lemmas":140,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.CheckSound","name":"Conform.Effect4.Typing.check_sound","placement":null,"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (env : Effect4.Program.TyEnv) (p : List Nat) (t : Effect4.Program.EffTy),\n  Eq (Effect4.Program.Checker.check sig env p e) (Except.ok t) →\n    Conform.Effect4.Typing.HasTy sig env e t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":285,"lemmas":70,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.CheckSound","name":"Conform.Effect4.Typing.check_complete","placement":null,"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (env : Effect4.Program.TyEnv) (t : Effect4.Program.EffTy),\n  Conform.Effect4.Typing.HasTy sig env e t →\n    ∀ (p : List Nat), Eq (Effect4.Program.Checker.check sig env p e) (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":159,"lemmas":44,"nearest":[]},"doc":"**`admitSig_ok_iff`** (proved): the executable check admits exactly the lawful signatures. ","kind":"theorem","module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.admitSig_ok_iff","placement":null,"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp),\n  Iff (Eq (Effect4.Program.admitSig app) (Except.ok Unit.unit)) (Effect4.Program.LawfulSig app)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":404,"lemmas":80,"nearest":["Effect4.Program.check_restrict","Effect4.Program.Denote.meaning_typed"]},"doc":"**`meaning_typed` at an application's signature** (R1). ","kind":"theorem","module":"Effect4.Laws.Program.SoundAnySignature","name":"Effect4.Program.Denote.meaning_typed_app","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.RowTable) (s : List (Prod Effect4.ServiceKey Effect4.Program.Ty)),\n  (∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem s entry → { rows := t }.FreshCode entry) →\n    ∀ (e : Effect4.Program.NativeEff) (ty : Effect4.Program.EffTy),\n      Eq (Effect4.Program.Denote.Straight e) Bool.true →\n        Eq (Effect4.Program.effTy { rows := t, services := s }.signature List.nil e)\n            (Option.some ty) →\n          Effect4.Program.Denote.ExitHasTy ty.answer ty.error\n            (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).snd\n            (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).fst","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1212,"lemmas":108,"nearest":["Effect4.Program.check_restrict","Effect4.Program.Denote.meaning_typed","Effect4.Program.Agreement.run_eq_meaning"]},"doc":"**`run_typed` (the machine) at an application's signature** (R1). ","kind":"theorem","module":"Effect4.Laws.Program.SoundAnySignature","name":"Effect4.Program.Denote.run_typed_app","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.RowTable) (s : List (Prod Effect4.ServiceKey Effect4.Program.Ty)),\n  (∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem s entry → { rows := t }.FreshCode entry) →\n    ∀ (e : Effect4.Program.NativeEff) (ty : Effect4.Program.EffTy) (fuel : Nat),\n      Eq (Effect4.Program.Denote.Straight e) Bool.true →\n        Eq (Effect4.Program.effTy { rows := t, services := s }.signature List.nil e)\n            (Option.some ty) →\n          instLENat.le (Effect4.Program.Agreement.depth e) fuel →\n            instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps e)) 6)\n                fuel →\n              And (Eq (Effect4.Api.run e fuel).outcome Effect4.Api.Outcome.finished)\n                (Exists fun ex =>\n                  And (Eq (Effect4.Api.run e fuel).exit (Option.some ex))\n                    (Effect4.Program.Denote.ExitHasTy ty.answer ty.error\n                      (Effect4.Api.run e fuel).stores ex))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1004,"lemmas":862,"nearest":["Effect4.Program.check_restrict","Effect4.Program.Typed.order_refl","Effect4.Program.Typed.fits_mono","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.deferredMake_extension","Effect4.Program.Typed.refMake_extension","Effect4.Program.Typed.syncRow_typed","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.Ty.subN_refl","Effect4.Program.optionTy_upper","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Program.Typed.order_trans"]},"doc":"**`meaningB_typed` (loops, any budget) at an application's signature** (R1). ","kind":"theorem","module":"Effect4.Laws.Program.SoundAnySignature","name":"Effect4.Program.Denote.meaningB_typed_app","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.RowTable) (s : List (Prod Effect4.ServiceKey Effect4.Program.Ty)),\n  (∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem s entry → { rows := t }.FreshCode entry) →\n    ∀ (k : Nat) (e : Effect4.Program.NativeEff) (ty : Effect4.Program.EffTy),\n      Eq (Effect4.Program.Denote.Looped e) Bool.true →\n        Eq (Effect4.Program.effTy { rows := t, services := s }.signature List.nil e)\n            (Option.some ty) →\n          ∀ {ex : Effect4.Machine.ExitV} {s' : Effect4.Machine.Stores},\n            Eq (Effect4.Program.Denote.meaningB k e List.nil Effect4.Machine.Stores.empty)\n                { fst := Option.some ex, snd := s' } →\n              Effect4.Program.Denote.ExitHasTy ty.answer ty.error s' ex","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1325,"lemmas":81,"nearest":["Effect4.Program.Typed.reachable_typed","Effect4.Program.Typed.lawfulSig_of_admitted"]},"doc":"**M6 for a program the API admits**, at any signature: every machine its admitted tapes reach\nis typed when its requirement row is closed at the load (decisions row 117). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.AdmittedSource","name":"Effect4.Program.Typed.reachable_typed_admitted","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (a : Effect4.Program.AdmittedProgram program app) (fuel : Nat) (tape : List Effect4.Api.Decision),\n  Eq a.ty.requires Effect4.Machine.Env.Requirement.empty →\n    Effect4.Program.Typed.AdmittedTape a.source a.ty fuel tape →\n      Exists fun w =>\n        Effect4.Program.Typed.MachineTyped a.source a.ty w\n          (Effect4.Machine.ReplayResult.machine (Effect4.Program.Sched.replayR program fuel tape))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":275,"lemmas":69,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"**C3's monotone half at the checker**: a program the checker accepts under `s` it accepts\nunder every extension `s'`, at the same type and at every path. ","kind":"theorem","module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.check_ext","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {env : Effect4.Program.TyEnv} {p : List Nat} {e : Effect4.Program.Eff Op}\n      {t : Effect4.Program.EffTy},\n      Eq (Effect4.Program.Checker.check s env p e) (Except.ok t) →\n        Eq (Effect4.Program.Checker.check s' env p e) (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":362,"lemmas":91,"nearest":["Effect4.Program.cata_eff_congr_on","Effect4.Program.hom_eq_cata_eff"]},"doc":"**C3's reflection** (TY-04, proved): on a Σ-program, the checker answers the same under every\nextension of Σ, refusals included, at every environment and path. ","kind":"theorem","module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.check_restrict","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {e : Effect4.Program.Eff Op},\n      Effect4.Program.SigProgram s e →\n        ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n          Eq (Effect4.Program.Checker.check s' env p e) (Effect4.Program.Checker.check s env p e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":154,"lemmas":40,"nearest":[]},"doc":"**C6 (proved)**: an appended signature is lawful exactly when each part's local clauses\nhold, each part's pairwise clauses hold, the cross terms hold, and the whole serves every\nrequired key: `List.forall_mem_append` and `List.pairwise_append`. ","kind":"theorem","module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.lawful_append","placement":null,"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (rows' : Effect4.Program.RowTable)\n  (services' : List (Prod Effect4.ServiceKey Effect4.Program.Ty)),\n  Iff\n    (Effect4.Program.LawfulSig\n      { rows := instHAppendOfAppend.hAppend app.rows rows',\n        services := instHAppendOfAppend.hAppend app.services services' })\n    (And\n      (And\n        (∀ (r : Effect4.Program.Row),\n          List.instMembership.mem app.rows r →\n            ∀ (c : Prod Bool Effect4.Program.RowReason),\n              List.instMembership.mem (Effect4.Program.rowChecks r) c → Eq c.fst Bool.true)\n        (∀ (r : Effect4.Program.Row),\n          List.instMembership.mem rows' r →\n            ∀ (c : Prod Bool Effect4.Program.RowReason),\n              List.instMembership.mem (Effect4.Program.rowChecks r) c → Eq c.fst Bool.true))\n      (And\n        (And\n          (List.Pairwise (fun r r' => Ne (Effect4.Program.rowKey r) (Effect4.Program.rowKey r'))\n            app.rows)\n          (And\n            (List.Pairwise (fun r r' => Ne (Effect4.Program.rowKey r) (Effect4.Program.rowKey r'))\n              rows')\n            (∀ (r : Effect4.Program.Row),\n              List.instMembership.mem app.rows r →\n                ∀ (r' : Effect4.Program.Row),\n                  List.instMembership.mem rows' r' →\n                    Ne (Effect4.Program.rowKey r) (Effect4.Program.rowKey r'))))\n        (And\n          (And\n            (∀ (e : Prod Effect4.ServiceKey Effect4.Program.Ty),\n              List.instMembership.mem app.services e →\n                ∀ (c : Prod Bool Effect4.Program.ServiceReason),\n                  List.instMembership.mem (Effect4.Program.serviceChecks e) c → Eq c.fst Bool.true)\n            (∀ (e : Prod Effect4.ServiceKey Effect4.Program.Ty),\n              List.instMembership.mem services' e →\n                ∀ (c : Prod Bool Effect4.Program.ServiceReason),\n                  List.instMembership.mem (Effect4.Program.serviceChecks e) c → Eq c.fst Bool.true))\n          (And\n            (And (List.Pairwise (fun e e' => Ne e.fst.service e'.fst.service) app.services)\n              (And (List.Pairwise (fun e e' => Ne e.fst.service e'.fst.service) services')\n                (∀ (e : Prod Effect4.ServiceKey Effect4.Program.Ty),\n                  List.instMembership.mem app.services e →\n                    ∀ (e' : Prod Effect4.ServiceKey Effect4.Program.Ty),\n                      List.instMembership.mem services' e' → Ne e.fst.service e'.fst.service)))\n            (∀ (r : Effect4.Program.Row),\n              List.instMembership.mem (instHAppendOfAppend.hAppend app.rows rows') r →\n                ∀ (k : Effect4.ServiceKey),\n                  List.instMembership.mem r.requires k →\n                    Eq\n                      ({ rows := instHAppendOfAppend.hAppend app.rows rows',\n                              services :=\n                                instHAppendOfAppend.hAppend app.services services' }.serviceTy\n                          k).isSome\n                      Bool.true)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":347,"lemmas":56,"nearest":[]},"doc":"**C2 for host rows, on the fragment**: the meaning of an old program under a host of an\nappended table is its meaning under that host's restriction to its own table. ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsAppend","name":"Effect4.Program.Denote.meaningUnder_append","placement":null,"restsOn":[],"statement":"∀ {σ : Type} (table ext : Effect4.Program.RowTable)\n  (host :\n    Effects.Handler (Effect4.Program.Denote.RowSig (instHAppendOfAppend.hAppend table ext))\n      (StateT σ Option))\n  (e : Effect4.Program.NativeEff) (env : List Effect4.Machine.Val) (s : Effect4.Machine.Stores)\n  (state : σ),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    Eq (Effect4.Program.Denote.meaningUnder host e env s state)\n      (Effect4.Program.Denote.meaningUnder (Effect4.Program.Denote.restrictRows table ext host) e\n        env s state)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":126,"lemmas":38,"nearest":[]},"doc":"The `raw-formation` claim, used by every checked boundary's certificate. ","kind":"theorem","module":"Effect4.Program.Formation","name":"Effect4.Program.Formation.checkInput_eq_none_iff","placement":null,"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (program : Effect4.Program.Eff Op)\n  (table : List Effect4.Program.Row)\n  (services : optParam (List (Prod Effect4.ServiceKey Effect4.Program.Ty)) List.nil),\n  Iff (Eq (Effect4.Program.Formation.checkInput program table services) Option.none)\n    (Effect4.Program.Formation.InputFormed program table services)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":235,"lemmas":274,"nearest":["Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.normalize_idem"]},"doc":"**Membership is invariant under normalization** (row 137; `E4-TYPED-CE-009`'s repair). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_normalize","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) (t : Effect4.Program.Ty) (v : Effect4.Machine.Val),\n  Iff (Effect4.Program.Typed.Fits w v t.normalize) (Effect4.Program.Typed.Fits w v t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":235,"lemmas":257,"nearest":["Effect4.Program.Ty.subN_trans","Effect4.Program.Typed.fits_normalize"]},"doc":"**Membership is closed under the checker's order.** ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_subN","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) {a b : Effect4.Program.Ty},\n  Eq (a.subN b) Bool.true →\n    ∀ (v : Effect4.Machine.Val), Effect4.Program.Typed.Fits w v a → Effect4.Program.Typed.Fits w v b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":350,"lemmas":189,"nearest":["Effect4.Program.Ty.subN_refl"]},"doc":"**Inhabitance agrees with membership (proved)**, on every type: the fold says `true` exactly\nwhen some world has a member. Row 127's agreement theorem. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.inhabited_iff_fits","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Iff (Eq (Effect4.Program.inhabited t) Bool.true)\n    (Exists fun w => Exists fun v => Effect4.Program.Typed.Fits w v t)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":42,"lemmas":29,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Program.Fold","name":"Effect4.Program.hom_eq_cata_ty","placement":null,"restsOn":[],"statement":"∀ {R : Effect4.Program.TyFam → Type u} {alg : Effect4.Program.TyAlgebra R}\n  (hom : Effect4.Program.TyHom alg) (node : Effect4.Program.Ty),\n  Eq (hom.f_ty node) (Effect4.Program.cata_ty alg node)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":326,"lemmas":193,"nearest":[]},"doc":"**The JSON pair is an exact embedding modulo `N_J`** (decisions row 128; `AGENTS.md`'s exact\nembedding with the normaliser `Codec.normJ`): a JSON decodes to a value exactly when it is that\nvalue's encoding up to the order of object entries. ","kind":"theorem","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_iff","placement":null,"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {j : Effect4.Json} {v : Effect4.Machine.Val},\n  Iff (Eq (Effect4.Schema.decode t j) (Option.some v))\n    (Exists fun j' =>\n      And (Eq (Effect4.Schema.encode t v) (Option.some j'))\n        (Eq (Effect4.Schema.Codec.normJ j') (Effect4.Schema.Codec.normJ j)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":151,"lemmas":41,"nearest":[]},"doc":"**Exactness of the reader, modulo `N_S`** (decisions row 128): a representation `ofSchema`\nreads is the read type's schema up to the annotation entries that change no decoding. By\n`fun_induction ofSchema`: one case per arm and branch of the reader, the refusing ones closed by\n`nomatch`. ","kind":"theorem","module":"Effect4.Schema.Bridge","name":"Effect4.Schema.Bridge.ofSchema_exact","placement":null,"restsOn":[],"statement":"∀ (r : Effect4.Representation) (t : Effect4.Program.Ty),\n  Eq (Effect4.Schema.Bridge.ofSchema r) (Option.some t) →\n    Eq (Effect4.Schema.Bridge.normS r) (Effect4.Schema.Bridge.schema t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":244,"lemmas":187,"nearest":[]},"doc":"**The term round trip** (`collection-term-print-read`): a scoped term whose class\nconstructions the classes cover reads back from its printing. Since decisions row 120, part E2,\na class construction prints as `new Tag({ … })` and reads back from the module's classes, with\n`_tag` restored first (`Classes.classTag?`); placed at R8 (`translation-simulation`) as a step of\n`read_print`, and at R3 as the record terms' printed form. ","kind":"theorem","module":"Effect4.Laws.Codegen.ReadLeaf","name":"Effect4.Program.readTerm_printTerm","placement":null,"restsOn":[],"statement":"∀ {classes : Effect4.Codegen.Classes.Classes} {n : Nat} (t : Effect4.Program.Term),\n  Eq (Effect4.Program.Term.scoped n t) Bool.true →\n    Eq (Effect4.Program.Term.covers classes t) Bool.true →\n      Eq t.unannotated Bool.true →\n        Eq (Effect4.Program.readTerm classes n (Effect4.Program.printTerm n t)) (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":117,"lemmas":83,"nearest":[]},"doc":"The two directions of the proposed `type-metadata-exact` claim, with no source restriction. ","kind":"theorem","module":"Effect4.Laws.Codegen.Metadata","name":"Effect4.Codegen.Metadata.type_metadata_exact","placement":null,"restsOn":[],"statement":"And\n  (∀ (t : Effect4.Program.Ty),\n    Eq (Effect4.Codegen.Metadata.readTy (Effect4.Codegen.Metadata.writeTy t)) (Option.some t))\n  (∀ (e : TypeScript.Expr) (t : Effect4.Program.Ty),\n    Eq (Effect4.Codegen.Metadata.readTy e) (Option.some t) →\n      Eq (Effect4.Codegen.Metadata.writeTy t) e)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":16,"lemmas":4,"nearest":["Effect4.Program.errOf_payload"]},"doc":"A value read out of the error alphabet rebuilds the same error (`errOf` on the left\ninverse of `valOfErr`). `boom` has no image, so it is excluded by the hypothesis rather than\nby a side condition. A payload rebuilds through the last arm (`errOf_payload`). ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.errOf_valOfErr","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Machine.Err) (v : Effect4.Machine.Val),\n  Eq (Effect4.Program.valOfErr e) (Option.some v) → Eq (Effect4.Program.errOf v) e","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":217,"lemmas":57,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.order_refl","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World), w.le w","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":218,"lemmas":57,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.order_trans","placement":null,"restsOn":[],"statement":"∀ (a b c : Effect4.Program.Typed.World), a.le b → b.le c → a.le c","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":360,"lemmas":113,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.refMake_extension","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) (value : Effect4.Machine.Val) (ty : Effect4.Program.Ty)\n  (state : Effect4.Machine.Stores) (key : Effect4.Machine.RefKey),\n  Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refMake value) w.state)\n      (Option.some { fst := state, snd := Effect4.Machine.Val.cell key }) →\n    Eq (w.Ρ key) Option.none →\n      Effect4.Program.Typed.ValueOk w ty value →\n        And (w.le (w.addRef state key ty))\n          (And (Effect4.Program.Typed.HeapTypedAt (w.addRef state key ty) key ty)\n            (And\n              (Effect4.Program.Typed.HeapTable w →\n                Effect4.Program.Typed.HeapTable (w.addRef state key ty))\n              (And\n                (Effect4.Program.Typed.PromiseTable w →\n                  Effect4.Program.Typed.PromiseTable (w.addRef state key ty))\n                (And\n                  (Effect4.Program.Typed.HeapCoverage w →\n                    Effect4.Program.Typed.HeapCoverage (w.addRef state key ty))\n                  (Effect4.Program.Typed.PromiseCoverage w →\n                    Effect4.Program.Typed.PromiseCoverage (w.addRef state key ty))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":360,"lemmas":112,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.deferredMake_extension","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) (types : Prod Effect4.Program.Ty Effect4.Program.Ty)\n  (state : Effect4.Machine.Stores) (key : Effect4.Machine.DeferredKey),\n  Eq (Effect4.Machine.syncOpStep Effect4.Machine.SyncOp.deferredMake w.state)\n      (Option.some { fst := state, snd := Effect4.Machine.Val.promise key }) →\n    Eq (w.«Π» key) Option.none →\n      And (w.le (w.addPromise state key types))\n        (And (Effect4.Program.Typed.PromiseTypedAt (w.addPromise state key types) key types)\n          (And\n            (Effect4.Program.Typed.HeapTable w →\n              Effect4.Program.Typed.HeapTable (w.addPromise state key types))\n            (And\n              (Effect4.Program.Typed.PromiseTable w →\n                Effect4.Program.Typed.PromiseTable (w.addPromise state key types))\n              (And\n                (Effect4.Program.Typed.HeapCoverage w →\n                  Effect4.Program.Typed.HeapCoverage (w.addPromise state key types))\n                (Effect4.Program.Typed.PromiseCoverage w →\n                  Effect4.Program.Typed.PromiseCoverage (w.addPromise state key types))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":360,"lemmas":111,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typed.World","name":"Effect4.Program.Typed.memoBuild_extension","placement":null,"restsOn":[],"statement":"∀ (w : Effect4.Program.Typed.World) (types : Prod Effect4.Program.Ty Effect4.Program.Ty)\n  (state : Effect4.Machine.Stores) (layer : Effect4.Machine.LayerId)\n  (memoMap : Effect4.Machine.MemoMapId) (answer : Effect4.Machine.Val),\n  Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.memoBuild layer memoMap) w.state)\n      (Option.some { fst := state, snd := answer }) →\n    Eq (w.«Π» w.state.deferreds.make.fst) Option.none →\n      And (w.le (w.addPromise state w.state.deferreds.make.fst types))\n        (And\n          (Effect4.Program.Typed.PromiseTypedAt\n            (w.addPromise state w.state.deferreds.make.fst types) w.state.deferreds.make.fst types)\n          (And\n            (Effect4.Program.Typed.HeapTable w →\n              Effect4.Program.Typed.HeapTable (w.addPromise state w.state.deferreds.make.fst types))\n            (And\n              (Effect4.Program.Typed.PromiseTable w →\n                Effect4.Program.Typed.PromiseTable\n                  (w.addPromise state w.state.deferreds.make.fst types))\n              (And\n                (Effect4.Program.Typed.HeapCoverage w →\n                  Effect4.Program.Typed.HeapCoverage\n                    (w.addPromise state w.state.deferreds.make.fst types))\n                (Effect4.Program.Typed.PromiseCoverage w →\n                  Effect4.Program.Typed.PromiseCoverage\n                    (w.addPromise state w.state.deferreds.make.fst types))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":707,"lemmas":589,"nearest":["Effect4.Program.readTerm_printTerm","Effect4.Program.Typed.order_refl","Effect4.Program.Typed.termMaps_of_typed","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty"]},"doc":"**The list fold's rules hold** (the claim `fold-typed-atomic-update`), at every signature.\nEach field is one theorem: the two definitional equations, the builder's scope law\n(`Authoring.fold_scoped`), `foldlM_refuses`, `evalTerm_weaken`, `termTy_weaken`,\n`termTy_fold_inv`, `fold_fits`, the fold's cases of `evalTerm_progress` and of\n`evalTerm_fitsAll`, `refModify_typed_step`, and the fold's cases of `readTerm_printTerm` and\n`readTerm_exact`.\n\nIt establishes nothing about a module that uses the fold and no agreement with a target. Its\nconsumer is the Queue's service pass (decisions row 228), on the M5 and M6 path through\n`syncRow_typed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.ListFold","name":"Effect4.Program.Typed.fold_typed_atomic_update","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Effect4.Program.Typed.ListFoldRules sig","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":390,"lemmas":180,"nearest":["Effect4.Program.Typed.fits_mono"]},"doc":"**The laws of a handle's identity hold** (the claim `handle-identity-laws`). Each field is\none theorem: `sameHandle_eval`, the two totality theorems, `sameHandle_refl`,\n`sameHandle_symm`, the two allocation facts, the two freshness theorems and their two list\nforms, `list_later`, and `RawHandles.evalTerm_handles` with its fold case.\n\nIt establishes no correspondence in a target: that two handles have equal keys exactly when\ntheir host objects are one object is each target's relation. Its consumer is the Queue's\nwithdrawal by identity (decisions row 229). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.ListFold","name":"Effect4.Program.Typed.handle_identity_laws","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"Effect4.Program.Typed.HandleIdentityLaws","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":123,"nearest":[]},"doc":"**The saved state's membership** (the claim `saved-mask-image-membership`; concept\n`store-typing`, requirement R4; decisions row 244). The image is the frame `ctor 7` over the\nbit (`Value.maskImage`, `src/Effect4/Machine/Value.lean`): data, with no handle.\n\nReach: `Fits` at any world, `Val.hasTy` at any allocation table, the three refusals at their\nown functions. It does not establish reply admission: `externalValue` asked at the type admits\nan image as it admits any handle-free member, and the refusal of a host answer is the column\nscan at table admission. Its consumers are the getter's typed clause and M5 arm\n(`clause_getInterruptible`, `getInterruptible_arm`), the restore node's arm (`restore_arm`),\nand every store that holds a saved value. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.saved_mask_image_membership","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"Effect4.Program.Typed.SavedMaskImage","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1238,"lemmas":805,"nearest":["Effect4.Program.Typed.denotesTyped","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.fits_subN","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Node.at_append"]},"doc":"**The restore node's body** (the claim `scoped-body-substitution-boundary`, for the mask;\nconcept `residual-program-typing`, requirement R4; decisions rows 245 and 246).\n\nReach: the checker at any signature and path; the compile at a positive budget; the typed\nstate at a source whose layer references are well formed and a world whose service table is\nthe source's (`denotesTyped`). It does not establish agreement with a target. The claim's\nsecond half, a later constructor that binds a scope, has no statement: the mask adds none.\nIts consumers are the Queue's waiting wrapper and the Semaphore's protected permit, which\ndescend into a restore site's body by `bodyTyped`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.scoped_body_substitution_boundary","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"Effect4.Program.Typed.RestoreBodyBoundary","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":177,"nearest":["Effect4.Machine.Env.Context.satisfies_union","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Machine.Env.Context.satisfies_empty"]},"doc":"**Build totality** (`build_total`, cut at `b08f3b58`, restored under decisions row 147):\nunder a typed leaf semantics, a layer the checker types builds under every context that satisfies\nits requirement row, and the built context satisfies its output row. ","kind":"theorem","module":"Effect4.Laws.Program.BuildTotal","name":"Effect4.Program.Provision.build_total","placement":null,"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (sem : Effect4.Program.Provision.LeafSem Op),\n  Effect4.Program.Provision.LeafSem.Typed sig sem →\n    ∀ (l : Effect4.Program.LayerTerm Op) (t : Effect4.Program.LayerTy)\n      (ctx : Effect4.Machine.Env.Ctx),\n      Eq (Effect4.Program.layerTy sig l) (Option.some t) →\n        Effect4.Machine.Env.Context.Satisfies ctx t.requires →\n          Exists fun out =>\n            And (Eq (Effect4.Program.Provision.build sem l ctx) (Option.some out))\n              (Effect4.Machine.Env.Context.Satisfies out t.out)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1345,"lemmas":87,"nearest":["Effect4.Program.Typed.decision_preserves","Effect4.Program.Typed.load_typed","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.order_refl"]},"doc":"**Every admitted replay of a checked program is typed**: the reference replay of a tape whose\nhost answers are admitted (`AdmittedTape`, the ghost admission at `Θ`) ends in `J`, for every\nchecked closed program, with row 117's empty requirement row at the load. M5\n(`load_typed`) and M6 (`decision_preserves`) through `admitted_typed`. Concept 4\n(`typed-state-reachable`); it reduces the host lane's typing half (T4) to executable admission\n(`admit_sound`, decisions rows 97–99). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.reachable_typed","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      ∀ (tape : List Effect4.Api.Decision),\n        Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n          Exists fun w =>\n            Effect4.Program.Typed.MachineTyped root rootTy w\n              (Effect4.Machine.ReplayResult.machine\n                (Effect4.Program.Sched.replayR root.program fuel tape))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":798,"lemmas":101,"nearest":["Effect4.Program.instance_prepared_success"]},"doc":"A session-accepted successful completion prepares the actual row-typed value, or it is\nadmitted at the call's checked instance and reaches the program unchanged. On the row's path\nmembership requires the selected row's shape-decided answer column. Failures, world-reading\ncolumns and token-world correlation remain outside this theorem. The session is not executed\nhere. ","kind":"theorem","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_success_prepared_fits","placement":null,"restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (reply : Effect4.Api.HostSession.Reply)\n  (decision : Effect4.Program.NativeDecision) (value : Effect4.Machine.Val),\n  Eq\n      (s.machine.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq reply.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.success value)) →\n      Eq (Effect4.Api.HostSession.preflight s reply) (Except.ok decision) →\n        Or (Effect4.Api.HostSession.PreparedSuccess s reply decision)\n          (Effect4.Api.HostSession.InstanceSuccess s reply decision)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":309,"lemmas":68,"nearest":[]},"doc":"**An accepted failing reply has no shape defect** (decisions row 191, `E4-HOST-CE-008`):\nexecutable admission refuses the reserved defects (`admit_failure_reservedFree`), so a\nsession-accepted failure satisfies `NoShapeDefect` at every type. This is the failure half of\n`admit_sound`, executable admission implying the ghost `AnswerOk`; the value half waits on\nrow 97's handle declarations, and the cause's membership in the error column is\n`external_error_typed`. ","kind":"theorem","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.preflight_failure_noShapeDefect","placement":null,"restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (reply : Effect4.Api.HostSession.Reply)\n  (decision : Effect4.Program.NativeDecision) (c : Effect4.Machine.CauseV),\n  Eq reply.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.failure c)) →\n    Eq (Effect4.Api.HostSession.preflight s reply) (Except.ok decision) →\n      ∀ (ty : Effect4.Program.EffTy),\n        Effect4.Program.Typed.NoShapeDefect ty (Effect4.Exit.failure c)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":619,"lemmas":66,"nearest":[]},"doc":"**A success admitted at its call's instance is a member of the instance's answer column**,\nholds no handle, and reaches the program unchanged: the machine's preparation leaves the stores\nas they are and answers the value itself. ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.instance_prepared_success","placement":null,"restsOn":[],"statement":"∀ (program : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (instanceAt : List Nat → Option (Effect4.Program.CallInstance Effect4.Program.NativeOp))\n  (m : Effect4.Program.NativeMachine) (r : Effect4.Program.RecordedReply)\n  (value : Effect4.Machine.Val),\n  Eq\n      (m.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq r.completion (Effect4.Machine.Completion.ofExit (Effect4.Exit.success value)) →\n      Effect4.Program.InstanceEnvelope table instanceAt m r →\n        Exists fun origin =>\n          Exists fun c =>\n            And (Eq (Effect4.Program.originOf m r.fiber r.token) (Option.some origin))\n              (And (Eq (instanceAt origin) (Option.some c))\n                (And (Eq c.op r.op)\n                  (And\n                    (Eq\n                      (Effect4.Program.Val.hasTy value c.answer\n                        (m.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)).externals.allocated)\n                      Bool.true)\n                    (And (Eq (Effect4.Store.Val.handles value) List.nil)\n                      (Eq\n                        (Effect4.Machine.prepareAsyncAnswer (Effect4.Program.interpOf program table)\n                          m r.fiber r.token r.completion)\n                        {\n                          fst :=\n                            m.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          snd := Effect4.Prim.success value })))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1604,"lemmas":938,"nearest":["Effect4.Program.Node.at_append","Effect4.Run.funded_replays"]},"doc":"**A recorded run's parked call keeps the address of its call** (decisions row 323). For a\nrecorded, funded run, where the machine holds an external call at a token, the address that\nits registration keeps holds a call of that operation in the run's program. So the instance\nthat the session reads there (`HostSession.instanceAt`) is the checker's answer at that call,\nup to the expansion of the program's layer references. Concept `host-session-protocol`; a step\nof the claim `reply-at-call-instance`. It does not establish that the expansion keeps the call\nat its address: the session's lookup checks the expanded program. ","kind":"theorem","module":"Effect4.Laws.Api.SessionRef","name":"Effect4.Run.origin_addresses_call","placement":null,"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.funded Bool.true →\n      ∀ (fiber : Effect4.FiberId) (token : Nat) (op : Effect4.Program.NativeOp)\n        (request : Effect4.Machine.Val) (origin : List Nat),\n        Eq (Effect4.Program.requestOf s.machine fiber token)\n            (Option.some { fst := op, snd := request }) →\n          Eq (Effect4.Program.originOf s.machine fiber token) (Option.some origin) →\n            Exists fun r =>\n              Eq ((Effect4.Program.Node.eff s.built.program).at_ origin)\n                (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op r)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1326,"lemmas":90,"nearest":["Effect4.Program.lookup_programCalls"]},"doc":"**Every reached run's session reads the checker's instance at every address** (decisions\nrow 323; the session note's slice DM5). `Run.open` makes the program's call table, and no\ntransition changes it. So the instance the session admits a reply at is `instanceAt`, with no\ncheck at the reply. Concept `host-session-protocol`; a step of the claim\n`reply-at-call-instance`. ","kind":"theorem","module":"Effect4.Laws.Api.SessionRef","name":"Effect4.Run.reached_callInstance","placement":null,"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.session.callInstance (Effect4.Api.HostSession.instanceAt s.built.program s.built.table)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1535,"lemmas":120,"nearest":["Effect4.Program.Sched.run_eq_ref_table","Effect4.Run.journal_replays","Effect4.Run.funded_replays"]},"doc":"**A session's reading is the reference machine's replay of the run's tape** (DI-57). For a\nrecorded run that is funded, the session's class and observation are the class and observation\nof the reference machine's replay of the run's own tape, at the run's row table and budgets.\nReach: any built program and any journal, under `funded`: no row of the journal is a stopped\nrow. It does not establish that a run is funded, the session's ledger, reply admission or a\nhost's conformance. A run with a stopped row is outside it: the control is three calls at a\ncommand budget of 5. It is proved by `session_eq_ref_of_raw` from `run_eq_ref_table`\n(slice H6a), so it rests on no planned goal. Concept\n`translation-simulation`, claim `session-eq-ref`, role simulation; requirement R6. Consumer: the\ntyped session (decisions row 99), and the meaning of a run's certificate. ","kind":"theorem","module":"Effect4.Laws.Api.SessionRef","name":"Effect4.Run.session_eq_ref","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Program.Sched.SessionEqRef","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1555,"lemmas":385,"nearest":["Effect4.Program.Denote.denoteRowsB_straight","Effect4.Program.Agreement.localRunC_compileB","Effect4.Run.funded_replays"]},"doc":"**H9: the host as a handler.** For a recorded run of a program of the fragment that is\nfunded, at rest, driven by a host, and whose root exited: under any host whose answers are the\nrun's (`HostAnswered`), the run of the program's call tree under that host is the root's exit\nwith the stores, and the host ends at the state the run's answers left it in. The reply host is\none host: H8. Reach: `StraightRows`, one fiber, every compile budget, finished runs. It does not\nestablish that a host's drive finishes (progress), nor anything of a run that stopped at a call,\nan interruption, a clock step or a handle row. Concept `translation-simulation`, role\nsimulation; requirement R6. Consumer: host utilities composed with `Effects.Comodel`'s\nconstructions (`docs/research/2026-10-09-host-coalgebra.md`, slice CO-5). ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaning","name":"Effect4.Run.denoteRows_eq_session_host","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.DenoteRowsEqSessionHost Effect4.Program.Denote.StraightRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1502,"lemmas":165,"nearest":["Effect4.Run.denoteRows_eq_session_host","Effect4.Run.allows_answer","Effect4.Api.observe_awaitingAsync_iff","Effect4.Run.tapeFrom_append"]},"doc":"**H9 at the driver**: the reactor's run of the call tree is the driver's. Open a program of\nthe fragment, evaluate its root and drive it with a reactor inside the envelope that answers\nwith exits. When the run is funded, at rest and its root exited, the reactor read as a host runs\nthe program's call tree to the root's exit with the run's stores, and ends at the drive's state.\nReach: `StraightRows`, one fiber, a reactor inside the envelope that answers with exits. It does\nnot establish that the drive finishes, that its rounds suffice, or that the run is funded.\nConcept `translation-simulation`, role simulation; requirement R6. Consumer: the run\ninterface's hosts, composed by `Effects.Comodel` (slice CO-6). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_denotes","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  r.Envelops b.table →\n    r.ExitsOnly →\n      Eq (Effect4.Program.Denote.StraightRows b.table b.program) Bool.true →\n        Eq (Effect4.Run.runWith b r st id budget rounds).fst.funded Bool.true →\n          Eq (Effect4.Run.runWith b r st id budget rounds).fst.atRest Bool.true →\n            ∀ (ex : Effect4.Machine.ExitV),\n              Eq (Effect4.Run.runWith b r st id budget rounds).fst.exit (Option.some ex) →\n                Eq\n                  (Effect4.Program.Denote.hostRun (Effect4.Run.reactorHost b.table r) b.program\n                    List.nil Effect4.Machine.Stores.empty st)\n                  (Option.some\n                    { fst := ex,\n                      snd :=\n                        {\n                          fst :=\n                            (Effect4.Run.runWith b r st id budget rounds).fst.machine.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          snd := (Effect4.Run.runWith b r st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1560,"lemmas":389,"nearest":["Effect4.Program.Denote.hostRunB_stable","Effect4.Program.Agreement.localRunC_to_rowsB","Effect4.Program.Agreement.localRunC_compileB","Effect4.Run.funded_replays"]},"doc":"**H8 on loops** (Q7): for a recorded run of a program of the row fragment with loops that is\nfunded, at rest and driven by a host, past a budget bound the coarse observation of the budgeted\nmeaning under the run's reply tape is the root's exit with the stores, the tape read to its end;\nwhere the root has no exit it is `none`. Concept `translation-simulation`, claim\n`rows-loop-session`, role simulation; requirement R6. Consumers: the paged data-row client and the\ndriver theorem on loops. It establishes no scope, external handle allocation, interruption, fork,\nprogress or target claim, and no waiting position's stores or request. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.h8_loopedRows","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.H8LoopedRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1550,"lemmas":376,"nearest":["Effect4.Program.Denote.hostRunB_stable","Effect4.Program.Agreement.localRunC_to_rowsB","Effect4.Run.funded_replays"]},"doc":"**H9 on loops** (Q8): for a finished recorded run of the same fragment, under any host whose\nanswers are the run's (`HostAnswered`), past a budget bound the budgeted meaning under the host is\nthe root's exit with the stores, and the host ends where the answers left it. H8 on loops at a\nfinished run is its instance at the reply host. Concept `translation-simulation`, claim\n`rows-loop-host`, role simulation; requirement R6. Consumer: the driver theorem on loops (Q9). It\ndoes not establish that a host's drive finishes, nor anything of a run that stopped at a call. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.denoteRowsB_eq_session_host","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.H9LoopedRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1512,"lemmas":168,"nearest":["Effect4.Run.denoteRowsB_eq_session_host","Effect4.Run.allows_answer","Effect4.Api.observe_awaitingAsync_iff","Effect4.Run.tapeFrom_append"]},"doc":"**H9 at the driver, on loops** (Q9): open a program of the row fragment with loops, evaluate\nits root and drive it with a reactor inside the envelope that answers with exits. When the run is\nfunded, at rest and its root exited, past a budget bound the reactor read as a host runs the\nbudgeted call tree to the root's exit with the run's stores, and ends at the drive's state.\n`runWith_denotes` with H9 on loops in place of H9. It does not establish that the drive\nfinishes, that its rounds suffice, or that the run is funded. Concept `translation-simulation`,\nclaim `rows-loop-driver`, role simulation; requirement R6. Consumer: the run interface's hosts\non stream and paging modules. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.runWith_denotesB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  r.Envelops b.table →\n    r.ExitsOnly →\n      Eq (Effect4.Program.Denote.LoopedRows b.program) Bool.true →\n        Eq (Effect4.Program.Denote.LoopedDataRows b.table b.program) Bool.true →\n          Eq (Effect4.Run.runWith b r st id budget rounds).fst.funded Bool.true →\n            Eq (Effect4.Run.runWith b r st id budget rounds).fst.atRest Bool.true →\n              ∀ (ex : Effect4.Machine.ExitV),\n                Eq (Effect4.Run.runWith b r st id budget rounds).fst.exit (Option.some ex) →\n                  Exists fun lower =>\n                    ∀ (k : Nat),\n                      instLENat.le lower k →\n                        Eq\n                          (Effect4.Program.Denote.hostRunB (Effect4.Run.reactorHost b.table r) k\n                            b.program List.nil Effect4.Machine.Stores.empty st)\n                          (Option.some\n                            { fst := Option.some ex,\n                              snd :=\n                                {\n                                  fst :=\n                                    (Effect4.Run.runWith b r st id budget rounds).fst.machine.state\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)\n                                      (Effect4.FrameEvent Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann),\n                                  snd := (Effect4.Run.runWith b r st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":604,"lemmas":420,"nearest":["Effect4.Program.readTerm_printTerm"]},"doc":"**Law 11.** What the printer prints of a readable program reads back to it. ","kind":"theorem","module":"Effect4.Laws.Codegen.ReadPrint","name":"Effect4.Program.read_print","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {n : Nat} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig n e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Program.print sig n e) (Except.ok x) →\n            Eq (Effect4.Program.readEff classes sig spell n x) (Except.ok e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":549,"lemmas":295,"nearest":[]},"doc":"**Law 12.** What the reader accepts prints back to exactly the tree it read. ","kind":"theorem","module":"Effect4.Laws.Codegen.Read","name":"Effect4.Program.read_exact","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {n : Nat} {x : TypeScript.Expr} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.readEff classes sig spell n x) (Except.ok e) →\n        Eq (Effect4.Program.print sig n e) (Except.ok x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":960,"lemmas":348,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The ordinary run of a straight-line program, with fuel for its depth and its commands,\nfinishes with the exit and the stores of its meaning — under the op budget or past it, where\nthe root yields, parks, and `flush` fires its dispatcher round after round (`E4-DEN-CE-005`,\nrepaired). The trace is not pinned (`E4-DEN-CE-003`). ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.Segment","name":"Effect4.Program.Agreement.run_eq_meaning","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    instLENat.le (Effect4.Program.Agreement.depth e) fuel →\n      instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps e)) 6) fuel →\n        And (Eq (Effect4.Api.run e fuel).outcome Effect4.Api.Outcome.finished)\n          (And\n            (Eq (Effect4.Api.run e fuel).exit\n              (Option.some\n                (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).fst))\n            (Eq (Effect4.Api.run e fuel).stores\n              (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":971,"lemmas":374,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**The loop agreement (O12, S8a-L).** For every program of the loop-bearing fragment: when\nits budgeted meaning finishes at a budget `k`, the machine's ordinary run finishes with that\nexit and those stores at every fuel past a bound. The bound is the compile depth and twice the\nlocal step bound at `k`; by `meaningB_unique` the answer does not depend on the budget that\nfound it. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.Loop","name":"Effect4.Program.Agreement.loopAgreement","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff),\n  Eq (Effect4.Program.Denote.Looped e) Bool.true → Effect4.Program.Agreement.LoopAgreement e","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1113,"lemmas":916,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**`run_eq_ref`.** The frame machine's replay and the term reference's replay of the\nsame program, at the same compile and command budget, on the same `Completion` tape, end\nthe same way and observe the same thing: every fiber's exit and the whole\nstores. No premise: the relation is inhabited at the load and preserved by every command.\nNothing is said about an external host.\n\n**At the empty table** (DI-57). `Api.replay` takes a `RowTable`; this theorem takes none, so\nit stays at its default, the empty table. The reference takes the row table too (`interpR`,\n`replayR`), and the agreement at every row table is `run_eq_ref_table`\n(`Laws/Program/Table/Agreement.lean`, decisions row 314). ","kind":"theorem","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.run_eq_ref","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat) (tape : List Effect4.Api.Decision),\n  And\n    (Eq (Effect4.Api.replay e fuel tape).outcome\n      (Effect4.Program.Sched.classify (Effect4.Program.Sched.replayR e fuel tape)))\n    (Eq (Effect4.Machine.obs (Effect4.Api.replay e fuel tape).machine)\n      (Effect4.Program.Sched.obsR\n        (Effect4.Machine.ReplayResult.machine (Effect4.Program.Sched.replayR e fuel tape))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":569,"lemmas":164,"nearest":["Effect4.Program.read_exact","Effect4.Program.read_print"]},"doc":"**The mask's two rows keep the table's premises** (the claim `mask-rows-table-premises`;\nconcept `exact-codecs`, requirement R8; decisions row 245).\n\nReach: program syntax. The table is the one table of `Codegen/Templates.lean`, and each\npremise is decided again by the kernel at the extended table. It does not establish typing: a\nrestore site of an ill-typed saved term reads back as well. It establishes no behaviour of a\ntarget. An annotated position prints and is not read, as before: `Readable` excludes it. Its\nconsumers are the checked module production and reading, through `read_print` and\n`read_exact`. ","kind":"theorem","module":"Effect4.Laws.Codegen.Mask","name":"Effect4.Program.mask_rows_table_premises","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"Effect4.Program.MaskRowsPremises","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":649,"lemmas":123,"nearest":["Effect4.Codegen.Templates.printTypedAt_none"]},"doc":"Without a row join annotation, the typed print is the ordinary print.\nThis remains the pointer of `typed-print-connector`, exact-codecs, R8.\nThe `NoJoin` premise states absence at every checked address.\nIt makes no TypeScript typing or execution claim. ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Program.printTyped_eq_print","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Effect4.Program.NoJoin s env0 p →\n    Eq (Effect4.Program.printTyped s env0 p) (Effect4.Program.print s (List.length env0) p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":["Effect4.Program.Typed.decision_preserves","Effect4.Program.Typed.loadsTyped","Effect4.Program.Typed.m7_of_ledger"]},"doc":"**M7a–c** (decisions row 138): on the M7 fragment (the empty host table, a checked closed\nsource, answer-free tapes), the frame machine's observation is typed and its run never halts:\n`m7_of_ledger` at the proved load (`loadsTyped`) and decisions (`decision_preserves`). The frame\nmachine only: not the OCaml engine, not a TypeScript run. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.m7_proved","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n    (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n      (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":439,"lemmas":55,"nearest":["Effect4.Program.Typed.m7_proved","Effect4.Program.Typed.lawfulSig_of_admitted"]},"doc":"**M7 for a program the API admits** at an empty row table (R9 at the API's admission, within\n`M7Fragment`): with a closed requirement row and an answer-free tape, its replay's exits fit, its\nstores fit, and the frame machine has not halted. The services may be declared. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.AdmittedSource","name":"Effect4.Program.Typed.m7_admitted","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (a : Effect4.Program.AdmittedProgram program app),\n  Eq app.rows List.nil →\n    ∀ (fuel : Nat) (tape : List Effect4.Api.Decision),\n      Eq a.ty.requires Effect4.Machine.Env.Requirement.empty →\n        (∀ (d : Effect4.Api.Decision),\n            List.instMembership.mem tape d → Effect4.Program.Typed.NoHostAnswer d) →\n          And (Effect4.Program.Typed.M7Exits a.source a.ty fuel tape)\n            (And (Effect4.Program.Typed.M7Stores a.source a.ty fuel tape)\n              (Effect4.Program.Typed.M7NoHalt a.source a.ty fuel tape))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":79,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"The table's effect-valued `andThen` inserts an unused answer slot into its\nsecond argument. Captures in either argument may refer to any position in `env`. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.andThenEffect_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  sig.WeakenNatural →\n    ∀ (env : Effect4.Program.TyEnv) (first second : Effect4.Program.Eff Effect4.Program.NativeOp)\n      (a b : Effect4.Program.EffTy),\n      Eq (Effect4.Program.effTy sig env first) (Option.some a) →\n        Eq (Effect4.Program.effTy sig env second) (Option.some b) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"andThenEffect\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons first (List.cons second List.nil) } f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := b.answer, error := a.error.join b.error,\n                requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"A continuation-valued `andThen` is already authored under its answer binder;\nits argument must not receive the unused-slot insertion of the effect form. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.andThenContinuation_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (first continuation : Effect4.Program.Eff Effect4.Program.NativeOp) (a b : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env first) (Option.some a) →\n    Eq\n        (Effect4.Program.effTy sig (instHAppendOfAppend.hAppend env (List.cons a.answer List.nil))\n          continuation)\n        (Option.some b) →\n      Eq\n        (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"andThenContinuation\")\n                  Effect4.Codegen.Forms.all).bind\n              fun f =>\n              Effect4.Codegen.Forms.Template.expand (List.length env)\n                { effects := List.cons first (List.cons continuation List.nil) } f.expansion).bind\n          (Effect4.Program.effTy sig env))\n        (Option.some\n          { answer := b.answer, error := a.error.join b.error,\n            requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":282,"lemmas":54,"nearest":["Effect4.Codegen.Forms.andThenEffect_typed"]},"doc":"The thunk row shares the effect row's core typing rule. This does not claim\nthat an arbitrary host thunk is an admitted source expression. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.andThenThunk_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  sig.WeakenNatural →\n    ∀ (env : Effect4.Program.TyEnv) (first second : Effect4.Program.Eff Effect4.Program.NativeOp)\n      (a b : Effect4.Program.EffTy),\n      Eq (Effect4.Program.effTy sig env first) (Option.some a) →\n        Eq (Effect4.Program.effTy sig env second) (Option.some b) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"andThenThunk\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons first (List.cons second List.nil) } f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := b.answer, error := a.error.join b.error,\n                requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":297,"lemmas":100,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"The literal admitted by `as` supplies the answer. Sequencing with its pure\nresult normalizes the original error column, as the core bind rule requires. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.as_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (value : Effect4.Program.Lit)\n  (a : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some a) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"as\") Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { effects := List.cons body List.nil,\n                terms := List.cons (Effect4.Program.Term.lit value) List.nil }\n              f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some { answer := value.ty, error := a.error.normalize, requires := a.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":271,"lemmas":54,"nearest":["Effect4.Codegen.Forms.as_typed"]},"doc":"The table's `asVoid` is the unit instance of the same core expansion. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.asVoid_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (a : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some a) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"asVoid\")\n                Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { effects := List.cons body List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := Effect4.Program.Ty.unit, error := a.error.normalize, requires := a.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":174,"nearest":["Effect4.Program.Ty.normalize_idem","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"The table's continuation-valued `tap` retains the first answer even beneath\nthe continuation's own answer binder. Both error and requirement columns join. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.tapContinuation_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (first continuation : Effect4.Program.Eff Effect4.Program.NativeOp) (a b : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env first) (Option.some a) →\n    Eq\n        (Effect4.Program.effTy sig (instHAppendOfAppend.hAppend env (List.cons a.answer List.nil))\n          continuation)\n        (Option.some b) →\n      Eq\n        (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"tapContinuation\")\n                  Effect4.Codegen.Forms.all).bind\n              fun f =>\n              Effect4.Codegen.Forms.Template.expand (List.length env)\n                { effects := List.cons first (List.cons continuation List.nil) } f.expansion).bind\n          (Effect4.Program.effTy sig env))\n        (Option.some\n          { answer := a.answer, error := a.error.join b.error,\n            requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":319,"lemmas":194,"nearest":["Effect4.Program.Ty.normalize_idem","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"An effect-valued `tap` first shifts its captured effect beneath the unused\nanswer slot, then retains the first answer beneath both new binders. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.tapEffect_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  sig.WeakenNatural →\n    ∀ (env : Effect4.Program.TyEnv) (first second : Effect4.Program.Eff Effect4.Program.NativeOp)\n      (a b : Effect4.Program.EffTy),\n      Eq (Effect4.Program.effTy sig env first) (Option.some a) →\n        Eq (Effect4.Program.effTy sig env second) (Option.some b) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"tapEffect\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons first (List.cons second List.nil) } f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := a.answer, error := a.error.join b.error,\n                requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":79,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`ensuring` shifts its captured finalizer under an unused exit slot. Its\nanswer is discarded; its errors and service requirements are still retained. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.ensuring_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  sig.WeakenNatural →\n    ∀ (env : Effect4.Program.TyEnv) (body finalizer : Effect4.Program.Eff Effect4.Program.NativeOp)\n      (a b : Effect4.Program.EffTy),\n      Eq (Effect4.Program.effTy sig env body) (Option.some a) →\n        Eq (Effect4.Program.effTy sig env finalizer) (Option.some b) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"ensuring\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons body (List.cons finalizer List.nil) } f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := a.answer, error := a.error.join b.error,\n                requires := a.requires.union b.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"`Effect.void` answers `unit`. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.void_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv),\n  Eq\n    (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"void\") Effect4.Codegen.Forms.all).bind\n          fun f => Effect4.Codegen.Forms.Template.expand (List.length env) { } f.expansion).bind\n      (Effect4.Program.effTy sig env))\n    (Option.some (Effect4.Program.EffTy.pure Effect4.Program.Ty.unit))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"`Effect.die` fails with its defect's cause and answers `never`. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.die_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (value : Effect4.Program.Term) (ty : Effect4.Program.Ty),\n  Eq (Effect4.Program.causeTy sig env (Effect4.Program.CauseTerm.die value)) (Option.some ty) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"die\") Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { terms := List.cons value List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := Effect4.Program.Ty.never, error := ty,\n          requires := Effect4.Machine.Env.Requirement.empty })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"`yield* Key` answers the key's carrier and requires the key. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.yieldKey_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (key : Effect4.ServiceKey) (ty : Effect4.Program.Ty),\n  Eq (sig.serviceTy key) (Option.some ty) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"yieldKey\")\n                Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { keys := List.cons key List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := ty, error := Effect4.Program.Ty.never,\n          requires := Effect4.Machine.Env.Requirement.single key })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":292,"lemmas":60,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.matchCause` with term arms: each arm is a value under its binder, and the answers\njoin. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.matchCause_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (onValue onCause : Effect4.Program.Term)\n  (b : Effect4.Program.EffTy) (v c answer : Effect4.Program.Ty),\n  Eq (Effect4.Program.effTy sig env body) (Option.some b) →\n    Eq\n        (Effect4.Program.termTy sig (instHAppendOfAppend.hAppend env (List.cons b.answer List.nil))\n          onValue)\n        (Option.some v) →\n      Eq\n          (Effect4.Program.termTy sig\n            (instHAppendOfAppend.hAppend env (List.cons b.error.causeOf List.nil)) onCause)\n          (Option.some c) →\n        Eq\n            (Effect4.Program.EffTy.joinAnswer (Effect4.Program.EffTy.pure v).answer\n              (Effect4.Program.EffTy.pure c).answer)\n            (Option.some answer) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"matchCause\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons body List.nil,\n                      terms := List.cons onValue (List.cons onCause List.nil) }\n                    f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := answer,\n                error :=\n                  (Effect4.Program.EffTy.pure v).error.join (Effect4.Program.EffTy.pure c).error,\n                requires :=\n                  (b.requires.union (Effect4.Program.EffTy.pure v).requires).union\n                    (Effect4.Program.EffTy.pure c).requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":292,"lemmas":60,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.matchCauseEffect`: the handlers are programs under their binders. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.matchCauseEffect_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body onValue onCause : Effect4.Program.Eff Effect4.Program.NativeOp)\n  (b v c : Effect4.Program.EffTy) (answer : Effect4.Program.Ty),\n  Eq (Effect4.Program.effTy sig env body) (Option.some b) →\n    Eq\n        (Effect4.Program.effTy sig (instHAppendOfAppend.hAppend env (List.cons b.answer List.nil))\n          onValue)\n        (Option.some v) →\n      Eq\n          (Effect4.Program.effTy sig\n            (instHAppendOfAppend.hAppend env (List.cons b.error.causeOf List.nil)) onCause)\n          (Option.some c) →\n        Eq (Effect4.Program.EffTy.joinAnswer v.answer c.answer) (Option.some answer) →\n          Eq\n            (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"matchCauseEffect\")\n                      Effect4.Codegen.Forms.all).bind\n                  fun f =>\n                  Effect4.Codegen.Forms.Template.expand (List.length env)\n                    { effects := List.cons body (List.cons onValue (List.cons onCause List.nil)) }\n                    f.expansion).bind\n              (Effect4.Program.effTy sig env))\n            (Option.some\n              { answer := answer, error := v.error.join c.error,\n                requires := (b.requires.union v.requires).union c.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"`Effect.yieldNow` answers `unit`. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.yieldNow_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv),\n  Eq\n    (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"yieldNow\")\n              Effect4.Codegen.Forms.all).bind\n          fun f => Effect4.Codegen.Forms.Template.expand (List.length env) { } f.expansion).bind\n      (Effect4.Program.effTy sig env))\n    (Option.some (Effect4.Program.EffTy.pure Effect4.Program.Ty.unit))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":60,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.forkChild` with the default options answers the child's fiber handle. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.forkChildDefault_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (p : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some p) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"forkChildDefault\")\n                Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { effects := List.cons body List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := p.answer.fiberOf p.error, error := Effect4.Program.Ty.never,\n          requires := p.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":60,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.forkDetach` with the default options answers the child's fiber handle. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.forkDetachDefault_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (p : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some p) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"forkDetachDefault\")\n                Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { effects := List.cons body List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := p.answer.fiberOf p.error, error := Effect4.Program.Ty.never,\n          requires := p.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":61,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.forkIn` with the default options: the target is a scope handle. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.forkInDefault_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (scope : Effect4.Program.Term)\n  (p : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some p) →\n    Eq (Effect4.Program.termTy sig env scope) (Option.some Effect4.Program.Ty.scope) →\n      Eq\n        (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"forkInDefault\")\n                  Effect4.Codegen.Forms.all).bind\n              fun f =>\n              Effect4.Codegen.Forms.Template.expand (List.length env)\n                { effects := List.cons body List.nil, terms := List.cons scope List.nil }\n                f.expansion).bind\n          (Effect4.Program.effTy sig env))\n        (Option.some\n          { answer := p.answer.fiberOf p.error, error := Effect4.Program.Ty.never,\n            requires := p.requires })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":60,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.forkScoped` with the default options requires the ambient scope. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.forkScopedDefault_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp) (env : Effect4.Program.TyEnv)\n  (body : Effect4.Program.Eff Effect4.Program.NativeOp) (p : Effect4.Program.EffTy),\n  Eq (Effect4.Program.effTy sig env body) (Option.some p) →\n    Eq\n      (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"forkScopedDefault\")\n                Effect4.Codegen.Forms.all).bind\n            fun f =>\n            Effect4.Codegen.Forms.Template.expand (List.length env)\n              { effects := List.cons body List.nil } f.expansion).bind\n        (Effect4.Program.effTy sig env))\n      (Option.some\n        { answer := p.answer.fiberOf p.error, error := Effect4.Program.Ty.never,\n          requires := p.requires.union (Effect4.Machine.Env.Requirement.single sig.scopeKey) })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":82,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"`Effect.acquireRelease` with a one-argument release: the release, written under the\nresource's binder, gets an unused exit slot inserted after it. ","kind":"theorem","module":"Effect4.Laws.Codegen.Forms","name":"Effect4.Codegen.Forms.releaseOne_typed","placement":null,"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  sig.WeakenNatural →\n    ∀ (env : Effect4.Program.TyEnv) (acquire release : Effect4.Program.Eff Effect4.Program.NativeOp)\n      (a r : Effect4.Program.EffTy),\n      Eq (Effect4.Program.effTy sig env acquire) (Option.some a) →\n        Eq\n            (Effect4.Program.effTy sig\n              (instHAppendOfAppend.hAppend env (List.cons a.answer List.nil)) release)\n            (Option.some r) →\n          Eq r.error.normalize Effect4.Program.Ty.never →\n            Eq\n              (((List.find? (fun f => instBEqOfDecidableEq.beq f.id \"releaseOne\")\n                        Effect4.Codegen.Forms.all).bind\n                    fun f =>\n                    Effect4.Codegen.Forms.Template.expand (List.length env)\n                      { effects := List.cons acquire (List.cons release List.nil) }\n                      f.expansion).bind\n                (Effect4.Program.effTy sig env))\n              (Option.some\n                { answer := a.answer, error := a.error,\n                  requires :=\n                    (a.requires.union r.requires).union\n                      (Effect4.Machine.Env.Requirement.single sig.scopeKey) })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":923,"lemmas":245,"nearest":["Effect4.Program.Typed.saved_mask_restoration","Effect4.Program.read_print","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"**The printed form's profile** (the claim `mask-printed-form-profile`; concept\n`translation-simulation`, requirements R10 and R11; decisions rows 245 and 246).\n\nReach: the checker at any signature; program syntax at any lawful spelling; the frame machine\nat any interpreter, machine and fiber. The two checkpoints are stated as steps and frame\npasses of the machine, from `saved_mask_restoration`.\n\nIt does not establish equality with the native spelling, and it states no agreement with a\nnamed release: that the compiled form and the pin's printed form answer one observation is a\nfinite check (`harness/truth/Truth.lean`, `pMaskWait` and `pMaskedRestore`), and the cuts at\nthe two checkpoints on the pin are Codex's runs. That the form spends three operations more\nthan the native mask is measured, not proved (`Test/Program/MaskContract.lean`, S8). The\nform's contract has one premise for its clients: nothing is acquired or registered before the\nbody begins. Under it an interrupt at either checkpoint equals an interrupt before the form.\n\nIts consumers are the Queue's waiting wrapper and the Semaphore's protected permit, whose\nfirst step is inside the body. ","kind":"theorem","module":"Effect4.Laws.Codegen.Mask","name":"Effect4.Program.mask_printed_form_profile","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Program.MaskFormProfile","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":15,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_complete","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α σ : Type u}\n  (handler : φ → Effect4.Exit β ε δ ι α → StateT σ Id (Effect4.Exit Unit ε δ ι α))\n  (scope : Effect4.Scope κ φ β ε δ ι α) (original : Effect4.Exit β ε δ ι α) (world : σ),\n  Eq\n    (Effect4.ScopeMachine.runState handler (Effect4.ScopeMachine.bound scope)\n      (Effect4.ScopeMachine.start scope original) world)\n    (have result := (Effect4.Scope.closeExitsM handler scope original).run world;\n    {\n      fst :=\n        { scope := scope.closeState original, original := original, pending := List.nil,\n          captured := scope.closeOrder.zip result.fst,\n          phase := Effect4.ScopeMachine.Phase.complete },\n      snd := result.snd })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":33,"lemmas":0,"nearest":["Effect4.ScopeMachine.runState_complete"]},"doc":"Completion agrees with the exact cleanup fold and existing exit restoration, retaining service state. census: scope.close-merge ","kind":"theorem","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_restore","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α σ : Type u} [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  (handler : φ → Effect4.Exit β ε δ ι α → StateT σ Id (Effect4.Exit Unit ε δ ι α))\n  (scope : Effect4.Scope κ φ β ε δ ι α) (original : Effect4.Exit β ε δ ι α) (world : σ),\n  Eq\n    (have result :=\n      Effect4.ScopeMachine.runState handler (Effect4.ScopeMachine.bound scope)\n        (Effect4.ScopeMachine.start scope original) world;\n    { fst := Effect4.ScopeMachine.restore? result.fst, snd := result.snd })\n    (have result := (Effect4.Scope.closeExitsM handler scope original).run world;\n    have cleanup :=\n      Effect4.ScopeMachine.finish.match_1✝ (fun x => Effect4.Exit Unit ε δ ι α) result.fst\n        (fun _ => Effect4.Exit.void) (fun only => only) fun first second rest =>\n        Effect4.Exit.asVoidAll (List.cons first (List.cons second rest));\n    { fst := Option.some (original.restoreAfterFinalizer cleanup), snd := result.snd })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":16,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Machine.ScopeMachine","name":"Effect4.ScopeMachine.runState_prefix","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α σ : Type u}\n  (handler : φ → Effect4.Exit β ε δ ι α → StateT σ Id (Effect4.Exit Unit ε δ ι α)) (budget : Nat)\n  (scope : Effect4.Scope κ φ β ε δ ι α) (original : Effect4.Exit β ε δ ι α) (world : σ),\n  have result :=\n    Effect4.ScopeMachine.runState handler budget (Effect4.ScopeMachine.start scope original) world;\n  And (Eq result.fst.scope (scope.closeState original))\n    (And (Eq result.fst.original original)\n      (And\n        (Eq\n          (instHAppendOfAppend.hAppend\n            (instHAppendOfAppend.hAppend (List.map Prod.fst result.fst.captured)\n              (Effect4.ScopeMachine.request?.match_1 (fun x => List φ) result.fst.phase\n                (fun operation => List.cons operation List.nil) fun x => List.nil))\n            result.fst.pending)\n          scope.closeOrder)\n        (And\n          (Eq result.fst.phase Effect4.ScopeMachine.Phase.complete → Eq result.fst.pending List.nil)\n          (Eq\n            ((List.mapM (fun operation => handler operation original)\n                  (List.map Prod.fst result.fst.captured)).run\n              world)\n            { fst := List.map Prod.snd result.fst.captured, snd := result.snd }))))","status":"proved"},{"axioms":[],"broughtIn":{"definitions":15,"lemmas":1,"nearest":["Effect4.Scope.close_idempotent"]},"doc":"A second close runs nothing. census: scope.close-state-first ","kind":"theorem","module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_twice","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u}\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (first second : Effect4.Exit β ε δ ι α),\n  Eq (Effect4.Scope.close run (Effect4.Scope.close run self first).fst second)\n    { fst := (Effect4.Scope.close run self first).fst, snd := Effect4.Exit.void }","status":"proved"},{"axioms":[],"broughtIn":{"definitions":11,"lemmas":2,"nearest":[]},"doc":"The sharp form of \"state before finalizers\": a finalizer that re-enters the\nscope while it closes sees a `Closed` scope, so its own registration runs\nimmediately with the closing exit rather than being recorded.\ncensus: rule.scope-close-lifo-state-first ","kind":"theorem","module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_reentrant_add","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u} [inst : DecidableEq κ]\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (exit : Effect4.Exit β ε δ ι α) (key : κ) (finalizer : φ),\n  Eq self.isClosed Bool.false →\n    Eq (Effect4.Scope.addExit run (self.closeState exit) key finalizer)\n      { fst := self.closeState exit, snd := run finalizer exit }","status":"proved"},{"axioms":[],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"Finalizers are materialised in insertion order and iterated backwards.\ncensus: scope.close-lifo ","kind":"theorem","module":"Effect4.Machine.Scope","name":"Effect4.Scope.closeOrder_eq","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u} (self : Effect4.Scope κ φ β ε δ ι α),\n  Eq self.closeOrder (List.map Prod.snd self.finalizers).reverse","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":772,"lemmas":99,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**The mask's law at the boundaries of regions** (the claim `saved-mask-restoration`;\nconcept `scope-lifetime-finalization`, requirement R11; decisions rows 227 and 244 to 246).\n\nReach: the frame machine at the program's interpreter, any completed view, any fiber and any\nmachine; the compile at a positive budget; both saved bits; any exit. It does not establish\nprogress, and it names no module that uses the mask. **It does not state that a region which\nchanges no flag ends with its entry flag**: such a region pushes no frame, and its exit flag\nis what its body left (the module's head; the receipt's open part). The reference machine's\nclause is related to the frame's by the simulation (`evaluate_rel`'s cases `actMask` and\n`actGetInterruptible`, `Laws/Program/Simulation/Evaluate.lean`), and it keeps the typed state\n(`clause_mask`, `clause_getInterruptible`). Its consumers are the Queue's waiting wrapper and\nthe Semaphore's protected permit. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Mask","name":"Effect4.Program.Typed.saved_mask_restoration","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"Effect4.Program.Typed.MaskRestoration","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":299,"lemmas":3,"nearest":[]},"doc":"**A fair finite tape leaves nothing armed at its live end** (R12-a, the finite endpoint\nconsequence): when the whole tape suffices and its replay is not stuck, `FairTape` at the split\n`tape ++ []` asks each armed owner for a later servicing decision inside the empty suffix, so no\nowner is armed. Concept `reactive-scheduling`, claim `fair-tape-drains-armed`. Reach: one finite\ntape, at any interpreter and fuel. It does not establish liveness on infinite tapes, termination,\nhost progress, general scheduler fairness (`flush_fair` permits rearming), or that the frontier\nnames the remaining waits (R12-b). It serves R12 as the finite half of \"liveness under\n`FairTape`\". ","kind":"theorem","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.fairTape_unarmed","placement":null,"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St) (fuel : Nat)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St)\n  (tape : List (Effect4.Machine.RunDecision ν σ β ε δ ι α)),\n  Effect4.Machine.Scheduling.FairTape interp fuel m tape →\n    Eq (Effect4.Machine.Suffices interp fuel tape m) Bool.true →\n      Eq\n          ((Effect4.Machine.replayEval interp fuel tape m).machine.stuck\n            (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n            (Effect4.FrameEvent ν σ β ε δ ι α))\n          Option.none →\n        Eq\n          ((Effect4.Machine.replayEval interp fuel tape m).machine.armed\n            (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n            (Effect4.FrameEvent ν σ β ε δ ι α))\n          List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":42,"lemmas":1,"nearest":[]},"doc":"**R12-b: at a live, unfinished machine, the tape frontier is empty exactly at a deadlock.**\nSo the frontier names a reason whenever work is armed (`E4-SCHED-CE-021`, repaired by decisions\nrow 201 (b)).\n\nConcept `reactive-scheduling`, claim `frontier-names-work`: the frontier half of the\nclassification that `scheduler-progress` asks for. Reach: every frame machine (`NativeMachine`),\nwith no reachability or typing premise, at the tape exhaustion site; a fuel frontier always names\n`.commandFuel` (`commandFuel_iff`). It does not establish that the named decision steps the\nmachine, what any decision does at a deadlocked machine, or liveness (R12-c). It serves R12:\n`Deadlocked` requires nothing armed. ","kind":"theorem","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.frontier_empty_iff_deadlocked","placement":{"concept":"reactive-scheduling","requirement":null},"restsOn":[],"statement":"∀ (m : Effect4.Program.NativeMachine),\n  Eq\n      (m.stuck\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Option.none →\n    Eq (Effect4.Machine.RunMachine.finished m) Bool.false →\n      Iff (Eq (Effect4.Api.frontierReasons Effect4.Machine.Exhaustion.tape m) List.nil)\n        (Effect4.Api.Deadlocked m)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1554,"lemmas":379,"nearest":["Effect4.Program.Agreement.localWaitC_to_rowsB","Effect4.Run.funded_replays"]},"doc":"**H8's detailed frontier on loops** (Q4): for a recorded run of a program of the row fragment\nwith loops that is funded, at rest and driven by a host, every call the machine waits on is a\nhost row, and past a budget bound the detailed observation of the budgeted meaning under the\nrun's reply tape waits at that row and request, with the machine's stores and the tape read to\nits end. The session prefix (`session_settled`) leaves a root parked on that call, and the local\nwait is the meaning's (`localWaitC_to_rowsB`). Concept `host-session-protocol`, claim\n`rows-loop-frontier`, role simulation; requirement R12 (and R6). Consumers: the waiting driver and\nthe resource prefix (slices S1 and S2). It establishes no progress: a wait is a frontier, never a\nfailure, and nothing says the host answers; nothing of a fork, a scope or an interruption. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.rows_loop_frontier","placement":{"concept":"host-session-protocol","requirement":"R12"},"restsOn":[],"statement":"Effect4.Run.H8FrontierLoopedRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1550,"lemmas":375,"nearest":["Effect4.Program.Agreement.localWaitC_to_rowsB","Effect4.Run.funded_replays"]},"doc":"**H9's detailed frontier on loops** (Q4 under a host): as `rows_loop_frontier`, under any host\nwhose answers are the run's (`HostAnswered`) and which does not answer the call the machine waits\non: past a budget bound the meaning under the host waits at that call, with the machine's stores\nand the host where the answers left it. Concept `host-session-protocol`, claim\n`rows-loop-frontier-host`, role simulation; requirement R12 (and R6). It does not establish that the\nhost leaves the call unanswered: that is the premise. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.rows_loop_frontier_host","placement":{"concept":"host-session-protocol","requirement":"R12"},"restsOn":[],"statement":"Effect4.Run.H9FrontierLoopedRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1329,"lemmas":93,"nearest":[]},"doc":"**O-9.** A run replays from its own journal: opening the same built program under the\nsame name and budget and playing the rows it recorded reaches exactly that run, phases and\nledger included. No host is called, because a host is not in the journal. ","kind":"theorem","module":"Effect4.Laws.Run","name":"Effect4.Run.journal_replays","placement":null,"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached → Eq ((Effect4.Run.open s.built s.id s.budget s.profile).play s.journal) s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":["Effect4.SliceView.valid_max","Effect4.SliceView.minimal_refine","Effect4.SliceView.descend_minimal","Effect4.SliceView.descend_le","Effect4.SliceView.exists_minimal_below"]},"doc":"**The claim `slice-lattice-minimal`, as one statement**: its four parts, for one monotone\nview. A minimal valid type slice exists below each valid slice (Theorem 4.5). The descent ends at\none, below its start. A refined query has a minimal slice below a minimal slice of the wider query\n(Theorem 4.6). The join of two valid slices is valid for the join of their queries (Theorem 4.7).\nIt is the pointer that the claim's row needs, and it adds nothing to its four parts. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.lattice_minimal","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] [inst_4 : Max T] [Std.LawfulOrderSup T] (v : Effect4.SliceView α T),\n  And\n    (∀ {q : T} {s : Effect4.Slice α},\n      v.Valid q s → Exists fun m => And (Effect4.Slice.instLE.le m s) (v.Minimal q m))\n    (And\n      (∀ {q : T} {s : Effect4.Slice α},\n        v.Valid q s → And (Effect4.Slice.instLE.le (v.descend q s) s) (v.Minimal q (v.descend q s)))\n      (And\n        (∀ {q₁ q₂ : T} {m₂ : Effect4.Slice α},\n          inst.le q₁ q₂ →\n            v.Minimal q₂ m₂ →\n              Exists fun m₁ => And (Effect4.Slice.instLE.le m₁ m₂) (v.Minimal q₁ m₁))\n        (∀ {q₁ q₂ : T} {a b : Effect4.Slice α},\n          v.Valid q₁ a →\n            v.Valid q₂ b → v.Valid (inst_4.max q₁ q₂) (Effect4.Slice.instMax.max a b))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":236,"lemmas":38,"nearest":["Effect4.Program.SigApp.withHoles_extends","Effect4.Program.check_restrict"]},"doc":"**H1, the claim `sketch-conservative`**: a program that performs no hole is checked the\nsame with any hole table, refusals included, at every environment and path. The premise is\n`SigProgram` at the application's signature: every operation that the program performs is one of\nthe application's, and every service key that it reads has a carrier. It is C3's reflection\n(`check_restrict`) at the hole table. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.holes_conservative","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable) {e : Effect4.Program.NativeEff},\n  Effect4.Program.SigProgram app.signature e →\n    ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n      Eq (Effect4.Program.Checker.check (app.withHoles holes).signature env p e)\n        (Effect4.Program.Checker.check app.signature env p e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":401,"lemmas":54,"nearest":["Effect4.Program.sketch_reads_its_holes","Effect4.Program.sketch_more_holes"]},"doc":"**The claim `sketch-weakening`, as one statement**: H2 and H3 for one application and two\nhole tables. It is the pointer that the claim's row needs, and it adds nothing to its two\nparts. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.sketch_weakening","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes more : Effect4.Program.RowTable),\n  And\n    (∀ {e : Effect4.Program.NativeEff} {env : Effect4.Program.TyEnv} {p : List Nat}\n      {t : Effect4.Program.EffTy},\n      Eq (Effect4.Program.Checker.check (app.withHoles holes).signature env p e) (Except.ok t) →\n        Eq\n          (Effect4.Program.Checker.check\n            (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n          (Except.ok t))\n    (∀ {e : Effect4.Program.NativeEff},\n      Effect4.Program.SigProgram (app.withHoles holes).signature e →\n        ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n          Eq\n            (Effect4.Program.Checker.check\n              (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n            (Effect4.Program.Checker.check (app.withHoles holes).signature env p e))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":232,"lemmas":84,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.SigApp.withHoles_rowOf"]},"doc":"**The hole's rule, the claim `hole-rule`**: hole `k` has the type that its row declares, in\nevery environment. The row is a hole row with closed columns that pass strict formation, the\ncheck that the row check runs at each use (`checkRow`). The answer and the error are read in\nnormal form, as the checker gives every type.\n\nNo rule is added to the typing judgment: this is `HasTy.perform` at a closed row\n(`rowTy_closed`). The row has no parameter, and its request is a unit, which the literal has in\nany environment. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.hole_hasTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable) (k : Nat) {name : String}\n  {answer error : Effect4.Program.Ty} {requires : List Effect4.ServiceKey}\n  (env : Effect4.Program.TyEnv),\n  Eq (List.instGetElem?NatLtLength.getElem? holes k)\n      (Option.some (Effect4.Program.Row.hole name answer error requires)) →\n    Eq answer.closed Bool.true →\n      Eq error.closed Bool.true →\n        Effect4.Program.Formation.Formed\n            (Effect4.Program.Formation.instantiatedSites\n              (Effect4.Program.Row.hole name answer error requires).normalizeTypes List.nil) →\n          Conform.Effect4.Typing.HasTy (app.withHoles holes).signature env\n            (Effect4.Program.Sketch.hole app k)\n            { answer := answer.normalize, error := error.normalize,\n              requires := Effect4.Machine.Env.Requirement.ofList requires }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":281,"lemmas":54,"nearest":["Effect4.Program.NodeHasTy.replace_envAt"]},"doc":"**The replacement law, at a node: the claim `typed-replacement`.** A typed node splits at an\naddress of a program into an environment and a type of the focus. Every program of that type in\nthat environment, under every extension of the signature, stands in the focus's place, and the\nnode keeps its type. The six statements below are its instances. It is\n`NodeHasTy.replace_envAt` without the function that names the environment. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.NodeHasTy.replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} (path : List Nat) {n : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {q : Effect4.Program.Eff Op},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {n' : Effect4.Program.Node Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n                    Effect4.Program.NodeHasTy s' n' τ)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":282,"lemmas":54,"nearest":["Effect4.Program.NodeHasTy.child_step"]},"doc":"**The law at the environment that the step function answers: the claim `focus-function`.**\nA typed node splits at an address of a program into an environment and a type of the focus, and\nthe environment is the one that `Node.envAt` computes from the node's own. Every program of\nthat type in that environment, under every extension of the signature, stands in the focus's\nplace, and the node keeps its type. `NodeHasTy.replace` is this statement without the\nfunction. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.NodeHasTy.replace_envAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} (path : List Nat) {n : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {q : Effect4.Program.Eff Op},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And\n            (Eq (Effect4.Program.Node.envAt s τ.env n path)\n              (Option.some (Effect4.Program.NodeEnv.env env)))\n            (And (Conform.Effect4.Typing.HasTy s env q t)\n              (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n                {n' : Effect4.Program.Node Op},\n                Effect4.Program.SigExtends s s' →\n                  Conform.Effect4.Typing.HasTy s' env q' t →\n                    Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n                      Effect4.Program.NodeHasTy s' n' τ))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":54,"nearest":["Effect4.Program.Formation.annotationsClosed_of_formed","Conform.Effect4.Typing.check_sound","Effect4.Program.hasTy_closed"]},"doc":"**A formed program that the checker admits has closed types**, at a closed environment and\na signature with closed atoms and closed service carriers (the claim `checked-types-closed`).\nThe annotations are formed outside a template, so each states a closed type\n(`Formation.closed_of_formed`), and each rule of the checker keeps closed types closed\n(`hasTy_closed`). The path is any path: the checker's answer does not depend on it. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.check_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (sig : Effect4.Program.Signature Op),\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      (∀ (t : Effect4.Program.Ty), List.instMembership.mem env t → Eq t.closed Bool.true) →\n        ∀ {p : List Nat} {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n          Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites e) →\n            Eq (Effect4.Program.Checker.check sig env p e) (Except.ok t) →\n              And (Eq t.answer.closed Bool.true) (Eq t.error.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":330,"lemmas":59,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.refusals_of_hasTy","Effect4.Program.refusals_head"]},"doc":"**The list of refusals is empty exactly when the checker admits the program.** It is the\ntable's form of `explain_none_iff`. The pointer of the claim `address-table`. Its consumer is\nthe query driver's refusals (slice QUERY). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.refusals_nil_iff","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Iff (Eq (Effect4.Program.refusals s env0 p) List.nil)\n    (Eq (Effect4.Program.effTy s env0 p).isSome Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"**On a typed node, the term in a slot has a type at the slot's environment.** The slot\ntable answers an environment at each slot that the node has (`Node.extSlotTerm`), and the\ntyping rule of the node types the slot's term there: the test of `catchIf`, the test, the step\nand the result of `iterate`, and an operation's own term at the instance of its parameter. The\nproof is the inversion of `HasTy` at the three constructors. The pointer of the claim\n`term-slot-environment`. Its consumer is the TypeScript printer at an eliminator inside such a\nterm (slice PRINT).\n\nIt does not say that the environment is the only one at which the term has a type, and it\nsays nothing at a node that the checker refuses. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.hasTy_extSlotEnv","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env p T →\n    ∀ {slot : Effect4.Program.ExtSlot} {t : Effect4.Program.Term},\n      Eq (Effect4.Program.Node.extSlotTerm s (Effect4.Program.Node.eff p) slot) (Option.some t) →\n        Exists fun env' =>\n          Exists fun ty =>\n            And\n              (Eq (Effect4.Program.Node.extSlotEnv s env (Effect4.Program.Node.eff p) slot)\n                (Option.some env'))\n              (Eq (Effect4.Program.termTy s env' t) (Option.some ty))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":294,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.focusAt_eq_some"]},"doc":"**The call instance is the row check's answer at the request's type.** Where `callAt`\nanswers, the node at the address is a `perform` of the instance's operation. The request has\nthe instance's request type in the environment at the address. The row check at that type\nanswers the instance's two columns, and the instance's bindings are the row's there. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Call","name":"Effect4.Program.callAt_rowTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {c : Effect4.Program.CallInstance Op},\n  Eq (Effect4.Program.callAt s env0 p path) (Option.some c) →\n    Exists fun request =>\n      Exists fun env =>\n        Exists fun t =>\n          And\n            (Eq ((Effect4.Program.Node.eff p).at_ path)\n              (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform c.op request))))\n            (And\n              (Eq\n                (Effect4.Program.Node.envAt s (Effect4.Program.NodeEnv.env env0)\n                  (Effect4.Program.Node.eff p) path)\n                (Option.some (Effect4.Program.NodeEnv.env env)))\n              (And (Eq (Effect4.Program.termTy s env request) (Option.some c.request))\n                (And\n                  (Eq (Effect4.Program.rowTy (s.rowOf c.op) c.request (s.termUse env c.op))\n                    (Option.some t))\n                  (And (Eq t.answer c.answer)\n                    (And (Eq t.error c.error)\n                      (Eq\n                        (Effect4.Program.rowBindings (s.rowOf c.op) c.request (s.termUse env c.op))\n                        (Option.some c.bindings)))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":301,"lemmas":54,"nearest":["Effect4.Program.Annotate.check_eq","Effect4.Program.table_eq_tableAt"]},"doc":"**The one traversal answers the address table.** `annotate` checks each node once, and its\nentries are the table's, in the table's order: the environment and the checker's answer at\nevery address of a program, and no environment where a step reads a refused sibling. The\npointer of the claim proposed as `annotate-table`; it implements the claim `address-table`,\nwhose specification is the table. Its consumers are the typed print (slice P2) and the\nsession's call instances.\n\nIt says nothing of the cost, and nothing past a refused read: there, as in the table, the\nsubtree is not reached. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.annotate_eq_table","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.annotate s env0 p) (Effect4.Program.table s env0 p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":386,"lemmas":56,"nearest":["Effect4.Program.Annotate.checkLayers_eq","Effect4.Program.Annotate.check_eq","Effect4.Program.Table.bodies_eq","Effect4.Program.Node.addresses_eq_cons","Effect4.Program.Eff.eq_defs_of_isBlock","Effect4.Program.Eff.partAt_plain","Effect4.Program.Eff.ne_defs_of_isBlock","Effect4.Program.checkModule_eq_check","Effect4.Program.annotate_eq_table","Effect4.Program.annotateModule_plain"]},"doc":"**A sketch's table, part by part, is its table.** The pointer of `module-annotate-table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.annotate_eq_table","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp), Eq (s.annotate app) (s.table app)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":394,"lemmas":54,"nearest":["Effect4.Program.annotateModule_fill","Effect4.Program.Sketch.annotate_eq_table","Effect4.Program.Sketch.sigAt_part","Effect4.Program.Sketch.check_fill_kept","Effect4.Program.Sketch.fillAt_some"]},"doc":"**A filling at a sketch's focus, of the focus's type, splices the sketch's table.** Below\nthe root, in the part that holds the address, at the part's signature: the root's entry holds\nthe same check, the other parts' entries stay, and the part's segment is the splice law's. The\npointer of `module-table-splices`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.table_fill","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s s' : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp}\n  {q' : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Ne path List.nil →\n      Eq (s.focusAt app path) (Option.some f) →\n        Conform.Effect4.Typing.HasTy (s.sigAt app path) f.env q' f.ty →\n          Eq (s.fillAt path q') (Option.some s') →\n            Eq (s'.table app)\n              (Effect4.Program.Table.splice (s.table app) path\n                (Effect4.Program.tableAt (s.sigAt app path)\n                  (Option.some (Effect4.Program.NodeEnv.env f.env)) (Effect4.Program.Node.eff q')\n                  path))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":453,"lemmas":58,"nearest":["Effect4.Program.EditSession.view_type","Effect4.Program.EditSession.reached_coherent","Effect4.Program.EditSession.view_refusals","Effect4.Program.EditSession.run_keeps"]},"doc":"**What a session shows is the checker's answer on its sketch**, after an open and any run of\nedits: the sketch's refusals, whose head is the check's and which are empty exactly when the\nsketch checks, and the sketch's type. An edit that splices checks only its new subtree; an edit\nthat checks again checks the whole sketch. The pointer of `edit-session-coherent`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.reached_view","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (s : Effect4.Program.Sketch) (edits : List Effect4.Program.Edit),\n  And\n    (Eq ((Effect4.Program.EditSession.open app s).run edits).view.refusals\n      (((Effect4.Program.EditSession.open app s).run edits).sketch.refusals app))\n    (Eq ((Effect4.Program.EditSession.open app s).run edits).view.type\n      (((Effect4.Program.EditSession.open app s).run edits).sketch.check app).toOption)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":254,"lemmas":38,"nearest":["Effect4.Program.SigApp.withHoles_extends","Effect4.Program.checkModule_restrict"]},"doc":"**H1 on a whole program**: a sketch whose program performs no hole is checked as its program by\nthe module check, definition block included. So a sketch with every hole filled is an ordinary\nmodule. The pointer of `module-holes-conservative`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_filled_module","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Effect4.Program.ModuleSigProgram app.signature s.program →\n    Eq (s.check app) (Effect4.Program.Checker.checkModule app.signature s.program)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":598,"lemmas":57,"nearest":["Effect4.Api.Author.finishBuild_retains","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"A successful build retains its elaboration and the declared table and row names.\nStep of the scenario static facts. Consumers: the two crews' program equations. ","kind":"theorem","module":"Effect4.Laws.Api.AuthorBuild","name":"Effect4.Api.Author.build_retains","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {m : Effect4.Program.Authoring.Module Effect4.Program.NativeOp} {b : Effect4.Api.Built},\n  Eq (Effect4.Api.Author.build m) (Except.ok b) →\n    And (Eq (Effect4.Program.Authoring.elaborateModule m) (Except.ok b.program))\n      (And (Eq b.table m.table) (Eq b.rowNames m.rowNames))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":0,"nearest":[]},"doc":"Without declared layers or definitions, a reference-free main tree is the module tree.\nStep of the crews' static facts. Consumers: the crews' elaboration equations. ","kind":"theorem","module":"Effect4.Laws.Api.AuthorBuild","name":"Effect4.Api.Author.elaborateModule_no_declarations","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {Op : Type} (rows : List Effect4.Program.Authoring.RowDef)\n  (main : Effect4.Program.Authoring.Src Op) (names : Effect4.Program.Authoring.RowNames)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.Authoring.rowNamesOf rows) (Except.ok names) →\n    Eq (main { rows := names } List.nil) (Except.ok p) →\n      Eq (Effect4.Program.Eff.refSites List.nil p) List.nil →\n        Eq (Effect4.Program.Authoring.elaborateModule { rows := rows, main := main }) (Except.ok p)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A successful optional projection identifies the elaborated tree.\nStep of the crews' static facts. Consumers: the crews' main equations. ","kind":"theorem","module":"Effect4.Laws.Api.AuthorBuild","name":"Effect4.Api.Author.elaboration_eq_getD","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {Op : Type} (result : Except Effect4.Program.Authoring.Refusal (Effect4.Program.Eff Op))\n  (fallback : Effect4.Program.Eff Op),\n  Eq result.toOption.isSome Bool.true → Eq result (Except.ok (result.toOption.getD fallback))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":533,"lemmas":57,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Successful final admission retains its program, table and row names.\nStep of the scenario static facts. Consumer: `build_retains`. ","kind":"theorem","module":"Effect4.Laws.Api.AuthorBuild","name":"Effect4.Api.Author.finishBuild_retains","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  {rowNames : List (Prod String Nat)} {b : Effect4.Api.Built},\n  Eq (Effect4.Api.Author.Internal.finishBuild program table rowNames) (Except.ok b) →\n    And (Eq b.program program) (And (Eq b.table table) (Eq b.rowNames rowNames))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":293,"lemmas":15,"nearest":["Effect4.Pull.matchAnswer_meaning"]},"doc":"Completion mapping selects the wrapped transformation only for End.\nChunk retains its batch; input failures and selected-handler failures keep their stores. ","kind":"theorem","module":"Effect4.Laws.Library.Channel.Protocol","name":"Effect4.Channel.Internal.mapDoneEffectOf_protocol","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {transform :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Channel.bindAnswer_protocol.match_1✝\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (Effect4.Program.Authoring.bindWith\n                (transform\n                  (Effect4.Program.Authoring.minted\n                    ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")))\n                (fun mapped => Effect4.Program.Authoring.succeed (Effect4.Pull.endValue mapped))\n                ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (Effect4.Program.Authoring.succeed\n                  (Effect4.Pull.chunkValue\n                    (Effect4.Program.Authoring.app \"snd\"\n                      (List.cons\n                        (Effect4.Program.Authoring.minted\n                          ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\"))\n                        List.nil)))\n                  ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Exists fun tree =>\n                And\n                  (Eq (Effect4.Channel.Internal.mapDoneEffectOf self transform env path)\n                    (Except.ok tree))\n                  (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                    (Effect4.Channel.bindAnswer_protocol.match_1✝\n                      (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                      (fun leftover =>\n                        Effect4.Program.Denote.meaning done\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                            (List.cons leftover List.nil))\n                          after)\n                      (fun items =>\n                        Effect4.Program.Denote.meaning success\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                          after)\n                      fun cause => { fst := Effect4.Exit.failure cause, snd := after }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":293,"lemmas":15,"nearest":["Effect4.Pull.matchAnswer_meaning"]},"doc":"Batch mapping selects the wrapped transformation only for Chunk.\nEnd retains its leftover; an input failure retains its cause and resulting stores.\nThe selected handler's full meaning retains a transformation failure and its stores. ","kind":"theorem","module":"Effect4.Laws.Library.Channel.Protocol","name":"Effect4.Channel.Internal.mapEffectOf_protocol","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {transform :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Channel.bindAnswer_protocol.match_1✝\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (Effect4.Program.Authoring.succeed\n                (Effect4.Pull.endValue\n                  (Effect4.Program.Authoring.minted\n                    ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")))\n                ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (Effect4.Program.Authoring.bindWith\n                  (transform\n                    (Effect4.Program.Authoring.app \"snd\"\n                      (List.cons\n                        (Effect4.Program.Authoring.minted\n                          ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\"))\n                        List.nil)))\n                  (fun mapped => Effect4.Program.Authoring.succeed (Effect4.Pull.chunkValue mapped))\n                  ((env.push (List.cons (env.mint \"answer\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"answer\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Exists fun tree =>\n                And\n                  (Eq (Effect4.Channel.Internal.mapEffectOf self transform env path)\n                    (Except.ok tree))\n                  (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                    (Effect4.Channel.bindAnswer_protocol.match_1✝\n                      (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                      (fun leftover =>\n                        Effect4.Program.Denote.meaning done\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                            (List.cons leftover List.nil))\n                          after)\n                      (fun items =>\n                        Effect4.Program.Denote.meaning success\n                          (instHAppendOfAppend.hAppend\n                            (instHAppendOfAppend.hAppend vals\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                          after)\n                      fun cause => { fst := Effect4.Exit.failure cause, snd := after }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":390,"lemmas":107,"nearest":["Effect4.Program.hom_eq_cata_eff"]},"doc":"**At the empty annotation the typed print is the print**, at every program and environment\nlength, by the uniqueness of the fold (`hom_eq_cata_eff`). A step of `printTyped_eq_print`; it\nsays nothing at an annotation that answers. ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.Templates.printTypedAt_none","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (n : Nat) (e : Effect4.Program.Eff Op),\n  Eq (Effect4.Codegen.Templates.printTypedAt sig (fun x => Option.none) n e)\n    (Effect4.Program.print sig n e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":854,"lemmas":169,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The envelope admits exactly the printed class declarations** (decisions row 120, part E2):\nan admitted module's leading class declarations are the ones the printer writes for the program\nit reads to (`ClassTable.moduleClasses`), in order. Concept `exact-codecs`, claim\n`payload-class-decl-exact` (R3); with `ModuleEmission.admit`, the class section's exact\nembedding at the boundary. ","kind":"theorem","module":"Effect4.Laws.Codegen.Admit","name":"Effect4.Codegen.admitModule_classDecls","placement":{"concept":"exact-codecs","requirement":"R3"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {name : String}\n  {allowed : List Effect4.Codegen.Bindings.Origin} {ambient : List TypeScript.Import}\n  {module : TypeScript.Module} {r : Effect4.Codegen.ModuleReading table name allowed ambient},\n  Eq (Effect4.Codegen.admitModule name module table allowed ambient) (Except.ok r) →\n    Eq (Effect4.Program.splitClasses module.decls).fst r.classDecls","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":812,"lemmas":152,"nearest":["Effect4.Codegen.eraseJoinArgs_printTypedSitesAt","Effect4.Codegen.eraseJoinArgs_printTypedAt"]},"doc":"Every successful public typed print erases to the existing ordinary print.\nThe exact old readable and spelling premises remain visible (exact-codecs, R8). ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.eraseJoinArgs_printTyped","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {env0 : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig (List.length env0) e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Program.printTyped sig env0 e) (Except.ok x) →\n            Eq (Effect4.Program.print sig (List.length env0) e)\n              (Except.ok (Effect4.Codegen.eraseJoinArgs classes sig spell (List.length env0) x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":741,"lemmas":642,"nearest":["Effect4.Program.readTerm_printTerm"]},"doc":"The successful raw typed printer erases exactly to the existing ordinary printer.\nThe reader fragment and spelling laws remain the original premises (exact-codecs, R8). ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.eraseJoinArgs_printTypedAt","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op}\n  {ann : List Nat → Option (List Effect4.Program.Ty)},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {n : Nat} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig n e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Codegen.Templates.printTypedAt sig ann n e) (Except.ok x) →\n            Eq (Effect4.Program.print sig n e)\n              (Except.ok (Effect4.Codegen.eraseJoinArgs classes sig spell n x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":989,"lemmas":781,"nearest":["Effect4.Program.Node.envAt_append","Effect4.Program.annotate_eq_table","Effect4.Program.Node.at_child","Effect4.Program.readTerm_printTerm","Effect4.Program.Node.envAt_child"]},"doc":"The full site printer reconstructs today's ordinary print after named join erasure.\nPlacement: exact-codecs R8; consumer: Program.printTyped and the existing reader laws. ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.eraseJoinArgs_printTypedSitesAt","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {env0 : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op}\n      {ann : List Nat → Option (List Effect4.Program.Ty)},\n      Eq (Effect4.Program.Readable classes sig (List.length env0) e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq\n              (Effect4.Codegen.Templates.printTypedSitesAt sig ann\n                (Effect4.Codegen.PrintEliminators.contextAtTable\n                  (Effect4.Program.annotate sig env0 e) e)\n                (List.length env0) e)\n              (Except.ok x) →\n            Eq (Effect4.Program.print sig (List.length env0) e)\n              (Except.ok (Effect4.Codegen.eraseJoinArgs classes sig spell (List.length env0) x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":420,"lemmas":151,"nearest":["Effect4.Program.read_exact"]},"doc":"The typed reader carries the ordinary reader's exactness at the erased input.\nThis is the exactness consumer of the proposed typed-print erasure claim (exact-codecs, R8).\nIt states no equality of raw target spellings and no target execution. ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.readTyped_exact","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {n : Nat} {x : TypeScript.Expr} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Codegen.readTyped classes sig spell n x) (Except.ok e) →\n        Eq (Effect4.Program.print sig n e)\n          (Except.ok (Effect4.Codegen.eraseJoinArgs classes sig spell n x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":857,"lemmas":153,"nearest":["Effect4.Codegen.eraseJoinArgs_printTyped","Effect4.Program.read_print"]},"doc":"The existing reader reads every successful public typed print after named erasure.\nThe theorem carries the existing read_print fragment (exact-codecs, R8). ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.readTyped_printTyped","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {env0 : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig (List.length env0) e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Program.printTyped sig env0 e) (Except.ok x) →\n            Eq (Effect4.Codegen.readTyped classes sig spell (List.length env0) x) (Except.ok e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":599,"lemmas":152,"nearest":["Effect4.Codegen.eraseJoinArgs_printTypedAt","Effect4.Program.read_print"]},"doc":"The existing reader reads a successful raw typed print after named join erasure.\nThis carries the ordinary reader's retraction law on its existing fragment (exact-codecs, R8). ","kind":"theorem","module":"Effect4.Laws.Codegen.PrintTyped","name":"Effect4.Codegen.readTyped_printTypedAt","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op}\n  {ann : List Nat → Option (List Effect4.Program.Ty)},\n  Effect4.Program.LawfulSpelling sig spell →\n    ∀ {n : Nat} {e : Effect4.Program.Eff Op},\n      Eq (Effect4.Program.Readable classes sig n e) Bool.true →\n        ∀ {x : TypeScript.Expr},\n          Eq (Effect4.Codegen.Templates.printTypedAt sig ann n e) (Except.ok x) →\n            Eq (Effect4.Codegen.readTyped classes sig spell n x) (Except.ok e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":309,"lemmas":16,"nearest":["Effect4.Modules.Step.sound"]},"doc":"Await registration reads the immediate-answer flag and the independently specified cell. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.awaitStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Latch.Model.State) (id : Nat)\n  {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n    Effect4.Modules.Reads hintSrc env path vals (Effect4.Machine.Val.promise (tb.hint id)) →\n      Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n        Effect4.Modules.Reads (Effect4.Latch.awaitStep idSrc hintSrc cellSrc) env path vals\n          (Effect4.Program.Val.tuple\n            (List.cons (Effect4.Store.Val.bool (Effect4.Latch.Model.awaitLatch s id).snd)\n              (List.cons (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.awaitLatch s id).fst)\n                List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":296,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Registration inherits the shared record construction and update typing. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.awaitStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig idSrc env path types Effect4.Modules.idTy →\n        Effect4.Modules.TypesEach sig hintSrc env path types Effect4.Modules.idTy →\n          Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n            Effect4.Modules.TypesEach sig (Effect4.Latch.awaitStep idSrc hintSrc cellSrc) env path\n              types (Effect4.Program.Ty.bool.prod Effect4.Latch.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":15,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The close agrees with the model's `close`.** ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.closeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Latch.Model.State)\n  {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n    Effect4.Modules.Reads (Effect4.Latch.closeStep cellSrc) env path vals\n      (Effect4.Program.Val.tuple\n        (List.cons (Effect4.Store.Val.bool (Effect4.Latch.Model.close s).snd)\n          (List.cons (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.close s).fst) List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":298,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.closeStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n        Effect4.Modules.TypesEach sig (Effect4.Latch.closeStep cellSrc) env path types\n          (Effect4.Program.Ty.bool.prod Effect4.Latch.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":305,"lemmas":15,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The flush agrees with the model's `flush`**: the batch in order, and the next state. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.flushStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Latch.Model.State)\n  {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n    Effect4.Modules.Reads (Effect4.Latch.flushStep cellSrc) env path vals\n      (Effect4.Program.Val.tuple\n        (List.cons (Effect4.Latch.Model.batchVal tb (Effect4.Latch.Model.flush s).snd)\n          (List.cons (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.flush s).fst) List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":299,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.flushStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n        Effect4.Modules.TypesEach sig (Effect4.Latch.flushStep cellSrc) env path types\n          (Effect4.Latch.waiterTy.list.prod Effect4.Latch.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":16,"nearest":["Effect4.Modules.Step.sound"]},"doc":"Initial construction reads the independent initial state at every caller scope. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.initialStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (isOpen : Bool) {flag : Effect4.Program.Authoring.TermSrc}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads flag env path vals (Effect4.Store.Val.bool isOpen) →\n    Effect4.Modules.Reads (Effect4.Latch.initialStep flag) env path vals\n      (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.initial isOpen))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":294,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":"The checked construction rule supplies the initial cell type. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.initialStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {flag : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig flag env path types Effect4.Program.Ty.bool →\n        Effect4.Modules.TypesEach sig (Effect4.Latch.initialStep flag) env path types\n          Effect4.Latch.cellTy","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":253,"lemmas":14,"nearest":["Effect4.Modules.Step.sound"]},"doc":"`isOpen()` reads whether the model is open. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.isOpenStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Latch.Model.State)\n  {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n    Effect4.Modules.Reads (Effect4.Latch.isOpenStep cellSrc) env path vals\n      (Effect4.Store.Val.bool s.isOpen)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":298,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.isOpenStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n        Effect4.Modules.TypesEach sig (Effect4.Latch.isOpenStep cellSrc) env path types\n          Effect4.Program.Ty.bool","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":12,"nearest":["Effect4.Latch.Model.withdrawStep_agrees","Effect4.Latch.Model.awaitStep_agrees","Effect4.Latch.Model.initialStep_agrees"]},"doc":"Claim latch-registration-agrees: initial construction, registration, and first-match cleanup. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.latch_registration_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Latch.Model.RegistrationAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":300,"lemmas":12,"nearest":["Effect4.Latch.Model.closeStep_agrees","Effect4.Latch.Model.flushStep_agrees","Effect4.Latch.Model.wakeStep_agrees","Effect4.Latch.Model.isOpenStep_agrees"]},"doc":"**The Latch's steps agree with its model** (claim `latch-steps-agree`). ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.latch_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Latch.Model.StepsAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":15,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**A wake agrees with the model's `wake`**: the reply, whether a flush is posted, and the\nmodel's next state. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.wakeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Latch.Model.State)\n  {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n    ∀ (setOpen : Bool),\n      Effect4.Modules.Reads (Effect4.Latch.wakeStep setOpen cellSrc) env path vals\n        (Effect4.Program.Val.tuple\n          (List.cons\n            (Effect4.Program.Val.tuple\n              (List.cons (Effect4.Store.Val.bool (Effect4.Latch.Model.wake setOpen s).snd.fst)\n                (List.cons (Effect4.Store.Val.bool (Effect4.Latch.Model.wake setOpen s).snd.snd)\n                  List.nil)))\n            (List.cons (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.wake setOpen s).fst)\n              List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":303,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Library.Latch.Steps","name":"Effect4.Latch.Model.wakeStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n        ∀ (setOpen : Bool),\n          Effect4.Modules.TypesEach sig (Effect4.Latch.wakeStep setOpen cellSrc) env path types\n            ((Effect4.Program.Ty.bool.prod Effect4.Program.Ty.bool).prod Effect4.Latch.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":328,"lemmas":24,"nearest":["Effect4.Modules.Step.sound"]},"doc":"Withdrawal erases one registration, preserving waiter priority and the scheduled flag. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.withdrawStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table),\n  tb.Injective →\n    ∀ (s : Effect4.Latch.Model.State) (id : Nat) {idSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n      Effect4.Modules.Reads idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n        Effect4.Modules.Reads cellSrc env path vals (Effect4.Latch.Model.cellVal tb s) →\n          Eq vals.length (List.length env.names) →\n            Effect4.Modules.Reads (Effect4.Latch.withdrawStep idSrc cellSrc) env path vals\n              (Effect4.Program.Val.tuple\n                (List.cons Effect4.Store.Val.unit\n                  (List.cons\n                    (Effect4.Latch.Model.cellVal tb (Effect4.Latch.Model.withdraw s id).fst)\n                    List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":98,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Withdrawal inherits fold typing at a scope aligned with the caller's type list. ","kind":"theorem","module":"Effect4.Laws.Library.Latch.Registration","name":"Effect4.Latch.Model.withdrawStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig idSrc env path types Effect4.Modules.idTy →\n        Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Latch.cellTy →\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.TypesEach sig (Effect4.Latch.withdrawStep idSrc cellSrc) env path types\n              (Effect4.Program.Ty.unit.prod Effect4.Latch.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":182,"lemmas":2,"nearest":["Effect4.Machine.ControlSteps.loop_of_iteration"]},"doc":"One remaining command budget commits the current step before the following fuel cut.\nA step of `fiber-local-positions`; the worker probe consumes it with symbolic residue. ","kind":"theorem","module":"Effect4.Laws.Machine.ControlSteps","name":"Effect4.Machine.ControlSteps.driveState_loop","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  {κ φ η : Type (max u v)} [core : Effect4.Machine.FiberCore ν β ε δ ι α κ φ]\n  [evaluator : Effect4.Machine.FiberEvaluator ν σ β ε δ ι α χ St κ φ η]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St κ) (fuel : Nat)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η) (id : Effect4.FiberId)\n  (f : Effect4.Machine.RunFiber ν σ β ε δ ι α χ κ φ) (yielding : Bool)\n  (rest : List (Effect4.Machine.Cmd ν σ β ε δ ι α κ)),\n  Eq m.stuck Option.none →\n    Eq (m.fiber? id) (Option.some f) →\n      Eq\n        (Effect4.Machine.driveState interp (instHAdd.hAdd fuel 1) m\n          (List.cons (Effect4.Machine.Cmd.loop id yielding) rest))\n        (Effect4.Machine.driveState interp fuel\n          (Effect4.Machine.settle id rest (Effect4.Machine.iteration interp m f yielding)).fst\n          (Effect4.Machine.settle id rest (Effect4.Machine.iteration interp m f yielding)).snd)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":41,"lemmas":0,"nearest":[]},"doc":"An iteration below its budget, with no pending interrupt or override, evaluates\none charged primitive. A step of `fiber-local-positions`; the native store rule consumes it. ","kind":"theorem","module":"Effect4.Laws.Machine.ControlSteps","name":"Effect4.Machine.ControlSteps.iteration_below_budget","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St κ φ η : Type (max u v)}\n  [core : Effect4.Machine.FiberCore ν β ε δ ι α κ φ]\n  [evaluator : Effect4.Machine.FiberEvaluator ν σ β ε δ ι α χ St κ φ η]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St κ)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η)\n  (f : Effect4.Machine.RunFiber ν σ β ε δ ι α χ κ φ) (yielding : Bool),\n  Eq (core.deferredInterrupt ν β ε δ ι α κ f.frame) Bool.false →\n    Eq f.yieldOverride Option.none →\n      instLTNat.lt (instHAdd.hAdd f.currentOpCount 1) f.maxOpsBeforeYield →\n        Eq (Effect4.Machine.iteration interp m f yielding)\n          (evaluator.evaluate interp m (Effect4.Machine.countOp f) yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":181,"lemmas":1,"nearest":[]},"doc":"A loop command commits an arbitrary evaluator result and retains its pending commands.\nA step of `fiber-local-positions`; native store and stage rules consume it. ","kind":"theorem","module":"Effect4.Laws.Machine.ControlSteps","name":"Effect4.Machine.ControlSteps.loop_of_iteration","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  {κ φ η : Type (max u v)} [core : Effect4.Machine.FiberCore ν β ε δ ι α κ φ]\n  [evaluator : Effect4.Machine.FiberEvaluator ν σ β ε δ ι α χ St κ φ η]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St κ)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η) (id : Effect4.FiberId)\n  (f : Effect4.Machine.RunFiber ν σ β ε δ ι α χ κ φ) (yielding : Bool)\n  (rest : List (Effect4.Machine.Cmd ν σ β ε δ ι α κ)),\n  Eq (m.fiber? id) (Option.some f) →\n    Eq (Effect4.Machine.driveStep interp m (Effect4.Machine.Cmd.loop id yielding) rest)\n      (Effect4.Machine.settle id rest (Effect4.Machine.iteration interp m f yielding))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"The keyed replacement changes the weight of exactly the selected record.\nConsumer: `ReleaseCustody.Control.update_credits` and source opportunity installation. ","kind":"theorem","module":"Effect4.Laws.Machine.ControlWeights","name":"Effect4.Machine.ControlWeights.replace_sum","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {α : Type u} {K : Type v} [inst : DecidableEq K] (key : α → K) (weight : α → Nat) (old next : α),\n  Eq (key next) (key old) →\n    ∀ (rows : List α),\n      (List.map key rows).Nodup →\n        List.instMembership.mem rows old →\n          Eq\n            (instHAdd.hAdd\n              (List.map weight (List.map (fun g => ite (Eq (key g) (key next)) next g) rows)).sum\n              (weight old))\n            (instHAdd.hAdd (List.map weight rows).sum (weight next))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":1,"nearest":["Effect4.Machine.ControlWeights.replace_sum"]},"doc":"Installing a uniquely keyed owner spends at most its new weight.\nConsumer: source opportunity settlement across every scheduler outcome. ","kind":"theorem","module":"Effect4.Laws.Machine.ControlWeights","name":"Effect4.Machine.ControlWeights.replace_sum_le_omitted","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {α : Type u} {K : Type v} [inst : DecidableEq K] (key : α → K) (weight : α → Nat) (owner : K)\n  (next : α),\n  Eq (key next) owner →\n    ∀ (rows : List α),\n      (List.map key rows).Nodup →\n        instLENat.le\n          (List.map weight (List.map (fun row => ite (Eq (key row) (key next)) next row) rows)).sum\n          (instHAdd.hAdd\n            (List.map (Effect4.Machine.ControlWeights.omitted key weight owner) rows).sum\n            (weight next))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":5,"lemmas":5,"nearest":[]},"doc":"**Weak termination gives strong termination**: one complete tape bounds every tape. ","kind":"theorem","module":"Effect4.Laws.Machine.Descent","name":"Effect4.Machine.Descent.bounded","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {S : Type u} {D : Type v} {step : S → D → Option S} {R : S → S → Prop},\n  Equivalence R →\n    Effect4.Machine.Descent.Bisim step R →\n      Effect4.Machine.Descent.Diamond step R →\n        ∀ {s t u : S} {c r : List D},\n          Eq (Effect4.Machine.Descent.run step s c) (Option.some t) →\n            Effect4.Machine.Descent.Terminal step t →\n              Eq (Effect4.Machine.Descent.run step s r) (Option.some u) →\n                instLENat.le r.length c.length","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":5,"lemmas":5,"nearest":[]},"doc":"**Every complete tape has the same length and an `R`-equal end.** The pointer of the claim\n`random-descent`. ","kind":"theorem","module":"Effect4.Laws.Machine.Descent","name":"Effect4.Machine.Descent.complete_unique","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {S : Type u} {D : Type v} {step : S → D → Option S} {R : S → S → Prop},\n  Equivalence R →\n    Effect4.Machine.Descent.Bisim step R →\n      Effect4.Machine.Descent.Diamond step R →\n        ∀ {s t1 t2 : S} {c1 c2 : List D},\n          Eq (Effect4.Machine.Descent.run step s c1) (Option.some t1) →\n            Effect4.Machine.Descent.Terminal step t1 →\n              Eq (Effect4.Machine.Descent.run step s c2) (Option.some t2) →\n                Effect4.Machine.Descent.Terminal step t2 → And (R t1 t2) (Eq c1.length c2.length)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":114,"lemmas":50,"nearest":["Effect4.Machine.FinalizerCredits.step_debit","Effect4.Machine.FinalizerCredits.getCont_le"]},"doc":"Starting a reified finalizer consumes the same credit as the pure frame route. ","kind":"theorem","module":"Effect4.Laws.Machine.FinalizerRun","name":"Effect4.Machine.FinalizerCredits.finalizerOr_debit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α] (choose : ν → Bool)\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St)\n  (fiber : Effect4.Machine.RunFiber ν σ β ε δ ι α χ) (yielding : Bool)\n  (exit : Effect4.Exit β ε δ ι α),\n  Effect4.Machine.FinalizerCredits.IterDebit choose m fiber\n    (Effect4.Machine.evaluatePrim.finalizerOr interp m fiber yielding exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":47,"lemmas":18,"nearest":[]},"doc":"The actual continuation lookup retains the debit at every interrupt boundary. ","kind":"theorem","module":"Effect4.Laws.Machine.FinalizerCredits","name":"Effect4.Machine.FinalizerCredits.getCont_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α : Type u} [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α] (choose : ν → Bool)\n  (fiber : Effect4.FrameFiber ν σ β ε δ ι α) (demand : Effect4.Arm) (skip : Bool)\n  (cause : optParam (Option (Effect4.Cause ε δ ι α)) Option.none),\n  instLENat.le (Effect4.Machine.FinalizerCredits.pop choose (fiber.getCont demand skip cause))\n    (Effect4.Machine.FinalizerCredits.stack choose fiber.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":18,"nearest":["Effect4.Machine.FinalizerCredits.getCont_le"]},"doc":"Each frame step debits starts and accounts for every newly pushed finalizer. ","kind":"theorem","module":"Effect4.Laws.Machine.FinalizerStep","name":"Effect4.Machine.FinalizerCredits.step_debit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α : Type u} [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α] (choose : ν → Bool)\n  (interp : Effect4.PrimInterp ν σ β ε δ ι α) (fiber : Effect4.FrameFiber ν σ β ε δ ι α),\n  have result := Effect4.FrameFiber.step interp fiber;\n  instLENat.le\n    (instHAdd.hAdd (List.countP (Effect4.Machine.FinalizerCredits.started choose) result.snd)\n      (Effect4.Machine.FinalizerCredits.remaining choose result.fst))\n    (instHAdd.hAdd (Effect4.Machine.FinalizerCredits.stack choose fiber.stack)\n      (List.countP (Effect4.Machine.FinalizerCredits.registered choose) result.snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":117,"lemmas":11,"nearest":[]},"doc":"**The image of a name agrees with the name on every number**, at every shape, level and outer\nenvironment: at `env ++ [n]` the image at level `env.length` evaluates to the name's value at the\nshape. ","kind":"theorem","module":"Effect4.Laws.Program.Progress","name":"Effect4.Machine.FnName.image_agrees","placement":{"concept":"translation-simulation","requirement":"R4"},"restsOn":[],"statement":"∀ (s : Effect4.Program.FnShape) (f : Effect4.Machine.FnName) (env : List Effect4.Machine.Val)\n  (n : Nat),\n  Eq\n    (Effect4.Program.evalTerm\n      (instHAppendOfAppend.hAppend env (List.cons (Effect4.Store.Val.nat n) List.nil))\n      (Effect4.Machine.FnName.image s env.length f))\n    (Option.some (f.valueAt s (Effect4.Store.Val.nat n)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":41,"lemmas":14,"nearest":[]},"doc":"A deferred interrupt pops no frame; every other actual getCont has one shared pop trace.\nThe trace supplies original-prefix, hook, suffix and actual-event accounting consumers. ","kind":"theorem","module":"Effect4.Laws.Machine.PopTrace","name":"Effect4.Machine.PopTrace.getCont_spec","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α : Type u} [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α] (fiber : Effect4.FrameFiber ν σ β ε δ ι α)\n  (demand : Effect4.Arm) (skip : Bool) (cause : Option (Effect4.Cause ε δ ι α)),\n  Or\n    (And (Eq (fiber.deferredInterrupt.and skip.not) Bool.true)\n      (Eq (fiber.getCont demand skip cause)\n        { answer := Effect4.ContAnswer.deferred fiber.pendingCause, popped := List.nil,\n          events := List.cons (Effect4.FrameEvent.deferred fiber.pendingCause) List.nil,\n          fiber :=\n            { current := fiber.current, stack := fiber.stack, interruptible := fiber.interruptible,\n              interruptedCause := fiber.interruptedCause, deferredInterrupt := Bool.false },\n          carriedCause := cause }))\n    (And (Eq (fiber.deferredInterrupt.and skip.not) Bool.false)\n      (Exists fun parts =>\n        Exists fun suffix =>\n          And\n            (Effect4.Machine.PopTrace.Trace demand skip fiber.stack\n              { current := fiber.current, stack := List.nil, interruptible := fiber.interruptible,\n                interruptedCause := fiber.interruptedCause, deferredInterrupt := Bool.false }\n              cause parts suffix (fiber.getCont demand skip cause))\n            (∀ (selected : Effect4.Prim ν σ β ε δ ι α),\n              Or (Eq demand Effect4.Arm.contA) (Eq demand Effect4.Arm.contE) →\n                Eq (fiber.getCont demand skip cause).answer (Effect4.ContAnswer.frame selected) →\n                  List.instMembership.mem (List.map Prod.fst parts) selected)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":33,"lemmas":0,"nearest":["Effect4.Supervision.raceCompleteFirst_accepts"]},"doc":"The actual first-exit observer records the selected entrant and full exit together. ","kind":"theorem","module":"Effect4.Laws.Machine.RaceFirst","name":"Effect4.Machine.Race.afterExit_first","placement":{"concept":"reactive-scheduling","requirement":"R4"},"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α : Type u} {κ : Type (max u v)}\n  (race : Effect4.Machine.Race ν σ β ε δ ι α κ) (child : Effect4.FiberId)\n  (exit : Effect4.Exit β ε δ ι α),\n  Eq race.mode Effect4.Supervision.RaceMode.firstExit →\n    List.instMembership.mem race.state.live child →\n      Eq race.state.accepted Option.none →\n        And (Eq (race.afterExit child exit).selected (Option.some child))\n          (Eq (race.afterExit child exit).state.accepted (Option.some exit))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":940,"lemmas":317,"nearest":["Effect4.Machine.ControlWeights.replace_sum","Effect4.Machine.Lift.driveState_lift"]},"doc":"**The run law.** A ledger whose evaluations are kept, and which holds at the load, holds at\nevery reachable machine. ","kind":"theorem","module":"Effect4.Laws.Program.LedgerRun","name":"Effect4.Machine.StackLedger.funded_reachable","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (L : Effect4.Machine.StackLedger.NLedger) (cap : Nat) (p : Effect4.Program.NativeEff)\n  (table : Effect4.Program.RowTable) (cf : Nat),\n  Effect4.Machine.StackLedger.Kept L p table →\n    Effect4.Machine.StackLedger.Funded L cap (Effect4.Api.load p cf) →\n      ∀ (m : Effect4.Program.NativeMachine),\n        Effect4.Program.Guard.Reachable p table cf m → Effect4.Machine.StackLedger.Funded L cap m","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":318,"lemmas":189,"nearest":["Effect4.Machine.Lift.driveState_lift"]},"doc":"**Each live fiber of a reached run holds the saved mask's chain at its start flag**, at the\nframe evaluator (concept `scope-lifetime-finalization`, requirement R11). It is the general form\nof the proposed registry claim `saved-mask-chain-runs`: the lift of `saved_mask_pop_discipline`\nto runs of the fiber machine. Each field cites one theorem of this module, so its status is\nderived from theirs (`#plan_status`).\n\nAlone it does not cover a run of a compiled program: the program interface runs the native\nevaluator, and this theorem is at `evaluatePrim`. The claim's pointer is the statement at the\ncompiled program's interpreter, `Program.compiled_mask_chain_runs`\n(`Laws/Program/MaskRuns.lean`), which reads this module's statements over a command at the\nnative evaluator's premise.\n\nReach: the fiber machine at the frame evaluator `evaluatePrim`, at every interpreter, decision\ntape and fuel. It asks for no admission of a decision and no premise on a program. A fiber is\nlive while its `exit` is `none`.\n\nIt does not establish the bracket of a region, a flag or a stack of an exited fiber as a state\ninvariant, a cleanup's multiplicity, a delivery, a budget or liveness. It says nothing of a host\nor of a printed form. An invariant is not progress.\n\nIts consumers are `Program.compiled_mask_chain_runs`'s: the bracket's law, then the waiting\nwrapper under a masked caller and Semaphore's protected permit. ","kind":"theorem","module":"Effect4.Laws.Machine.MaskRuns","name":"Effect4.Machine.saved_mask_chain_runs","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (ν σ : Type u) (β : Type v) (ε δ ι α χ : Type u) (St : Type (max u v)) [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α],\n  Effect4.Machine.MaskChainRuns ν σ β ε δ ι α χ St","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":45,"lemmas":35,"nearest":[]},"doc":"**The saved mask's chain through a pop of the stack** (the proposed registry claim\n`saved-mask-pop-discipline`; concept `scope-lifetime-finalization`, requirement R11). It is a\nstep of the open run-level half of `saved-mask-restoration`. Each field cites one theorem of\nthis module, so its status is derived from theirs (`#plan_status`).\n\nReach: the polymorphic `FrameFiber`, at every stack, demand, skip flag and carried cause, with\none fixed base. The pop asks for an empty scratch stack, as `getCont` calls it.\n\nIt does not establish a law of a run, a completed exit, a cleanup's multiplicity, a delivery, a\nbudget or liveness. It says nothing of a host or of a printed form. The bracket of a whole region\nand each fiber's base in a run are not stated.\n\nIts consumers are the later lift through `Machine.Lift`, then the waiting wrapper under a masked\ncaller and Semaphore's protected permit. ","kind":"theorem","module":"Effect4.Laws.Machine.MaskDiscipline","name":"Effect4.Machine.saved_mask_pop_discipline","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (ν σ : Type u) (β : Type v) (ε δ ι α : Type u) [inst : DecidableEq ε] [inst_1 : DecidableEq δ]\n  [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α], Effect4.Machine.MaskPopDiscipline ν σ β ε δ ι α","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":67,"nearest":[]},"doc":"**A region ends at its entry's stack and at its entry flag**, for an arbitrary body (concept\n`scope-lifetime-finalization`, requirement R11). It is the general form of the proposed registry\nclaim `saved-mask-region-bracket`, the run-level half of `saved-mask-restoration`. Each field\ncites one theorem of this module, so its status is derived from theirs (`#plan_status`).\n\nReach: the polymorphic frame machine, at every stack, demand, skip flag and carried cause. Along\na run: two machines that hold `MaskRuns` at tables in the prefix order, at every interpreter and\nevaluator, and a fiber that is live at both cuts.\n\nThe later cut's stack shape `above ++ below` is a premise, and it is the region's only mark on\nthe machine. The theorem then gives the entry's stack and the entry flag at the region's end. It\ndoes not give that a body's run keeps that shape.\n\nIt does not establish that a fiber is live at a cut: that is a premise too, and\n`Program.compiled_region_bracket` (`Laws/Program/MaskBracket.lean`) discharges it at the\ncompiled program's interpreter. It gives no cleanup, no release count, no delivery, no budget\nand no liveness. It states nothing of a region whose fiber exits inside it. The client premise\nof the mask's derived form stays with the client: nothing is acquired or registered before the\nbody begins (decisions rows 227 and 244 to 246).\n\nIts consumers are `Program.compiled_region_bracket`'s: the waiting wrapper under a masked\ncaller, then Semaphore's protected permit and Pool's `use`. ","kind":"theorem","module":"Effect4.Laws.Machine.MaskBracket","name":"Effect4.Machine.saved_mask_region_bracket","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (ν σ : Type u) (β : Type v) (ε δ ι α χ : Type u) (St : Type (max u v)) [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α],\n  Effect4.Machine.RegionBracket ν σ β ε δ ι α χ St","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":148,"lemmas":13,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.frame","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} (L : Effect4.Schema.Model.Leaves) (vs : Effect4.Modules.Inputs L Γ)\n  {fs : List (Prod String (Prod Bool Effect4.Program.Ty))}\n  (x : Effect4.Modules.Input Γ (Effect4.Program.Ty.record fs)) {t : Effect4.Program.Ty}\n  (g : Effect4.Schema.FieldRef fs t) (e : Effect4.Modules.Step Γ (Effect4.Program.Ty.record fs)),\n  Eq e.spine (Option.some x.index) →\n    Not (List.instMembership.mem e.writes g.name) →\n      Eq (g.get (Effect4.Modules.Step.eval L vs e)) (g.get (x.get vs))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":300,"lemmas":150,"nearest":["Effect4.Modules.reads_ascribe"]},"doc":"The reading law, with scope alignment only when a fold occurs. ","kind":"theorem","module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.sound","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} (L : Effect4.Schema.Model.Leaves) (vs : Effect4.Modules.Inputs L Γ)\n  {src : {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val},\n  (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n      Effect4.Modules.Reads (src x) env path vals\n        ((Effect4.Schema.Model.imageAt L t).toVal (x.get vs))) →\n    ∀ {s : Effect4.Program.Ty} (e : Effect4.Modules.Step Γ s),\n      Eq e.canonical Bool.true →\n        autoParam (e.ScopeFacts env vals.length) Effect4.Modules.Step.sound._auto_1 →\n          autoParam (Effect4.Modules.Step.IdentityFacts L e) Effect4.Modules.Step.sound._auto_3 →\n            Effect4.Modules.Reads (Effect4.Modules.Step.term (fun {t} => src) e) env path vals\n              ((Effect4.Schema.Model.imageAt L s).toVal (Effect4.Modules.Step.eval L vs e))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":262,"lemmas":325,"nearest":["Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons","Effect4.Modules.types_ascribe","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Program.Bounds.matchArgsB_append","Effect4.Program.Bounds.matchArgsB_cons_nil","Effect4.Program.UnionRule.lift_member","Effect4.Program.Bounds.matchArgsB_one_var","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.join_eq_right_of_subN","Effect4.Program.Bounds.matchArgsB_ite"]},"doc":"The typing law, requiring scope alignment only when a fold occurs. ","kind":"theorem","module":"Effect4.Laws.Step","name":"Effect4.Modules.Step.typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Γ : List Effect4.Program.Ty} {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀\n      {src :\n        {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n      (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n          Effect4.Modules.TypesEach sig (src x) env path types t) →\n        ∀ {s : Effect4.Program.Ty} (e : Effect4.Modules.Step Γ s),\n          e.Facts →\n            autoParam (e.ScopeFacts env types.length) Effect4.Modules.Step.typed._auto_1 →\n              Effect4.Modules.TypesEach sig (Effect4.Modules.Step.term (fun {t} => src) e) env path\n                types s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":122,"lemmas":44,"nearest":[]},"doc":"**An ascription is no cast.** Where the type of `e` is not below the declared type, the\nchecker has no type for `ascribe T e`, under either literal flag. With `types_ascribe`, the\nrecord's check decides the form.\n\nReach: the checker's `argTy` at every scope and every signature, for a term `e` that has a type\ninside a const-generic position. It says nothing of a term that has no type there. ","kind":"theorem","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.ascribe_untyped","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {types : List Effect4.Program.Ty} {e : Effect4.Program.Authoring.TermSrc}\n  {S T : Effect4.Program.Ty},\n  Effect4.Modules.Types sig e env path types Bool.true S →\n    Eq (S.subN T) Bool.false →\n      ∀ (const : Bool) (U : Effect4.Program.Ty),\n        Not\n          (Effect4.Modules.Types sig (Effect4.Program.Authoring.ascribe T e) env path types const U)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":208,"lemmas":10,"nearest":[]},"doc":"**The read law of a cell.** A `Ref.get` of the cell answers its value and leaves the\nstores. A step that is a term over that value writes nothing: the Queue's `sizeStep` is one. It\nis the census clause `refStep_get`. ","kind":"theorem","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.cell_read","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey} {cell : Effect4.Machine.Val},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some cell) →\n    Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGet q) stores)\n      (Option.some { fst := stores, snd := cell })","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":115,"lemmas":17,"nearest":[]},"doc":"**An ascription reads what its term reads.** The record's construction builds the frame of\none field, and the field's read answers the value that the field holds: the declared type takes\nno part in the evaluation.\n\nReach: one evaluation of the form's tree, at every scope and every environment of values. It\ndoes not establish typing, a store step or a model's step. ","kind":"theorem","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.reads_ascribe","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} (T : Effect4.Program.Ty)\n  {e : Effect4.Program.Authoring.TermSrc} {vals : List Effect4.Machine.Val}\n  {v : Effect4.Machine.Val},\n  Effect4.Modules.Reads e env path vals v →\n    Effect4.Modules.Reads (Effect4.Program.Authoring.ascribe T e) env path vals v","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":419,"lemmas":57,"nearest":["Effect4.Program.Typed.fold_typed_atomic_update"]},"doc":"**The typed half of the connector.** A step term that the checker types at the pair of a\nreply type and the cell's type keeps the cell a member of its type, and its reply is a member\nof the reply type. It is `ListFoldRules.step`, read at the value that the step answers.\nConsumer: a wrapper's law, with a step's typing statement\n(`src/Effect4/Laws/Library/Queue/Typing.lean`,\n`src/Effect4/Laws/Library/Semaphore/Typing.lean`). ","kind":"theorem","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.step_keeps_cell","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {w : Effect4.Program.Typed.World} {tys : Effect4.Program.TyEnv}\n      {captured : List Effect4.Machine.Val},\n      Effect4.Program.Typed.EnvTyped w tys captured →\n        ∀ {f : Effect4.Program.Term} {C B : Effect4.Program.Ty},\n          Eq (Effect4.Program.termTy sig (instHAppendOfAppend.hAppend tys (List.cons C List.nil)) f)\n              (Option.some (B.prod C)) →\n            ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey}\n              {cell reply next : Effect4.Machine.Val},\n              Eq (Effect4.Machine.refPeek stores.refs q) (Option.some cell) →\n                Effect4.Program.Typed.Fits w cell C →\n                  Eq\n                      (Effect4.Program.evalTerm\n                        (instHAppendOfAppend.hAppend captured (List.cons cell List.nil)) f)\n                      (Option.some\n                        (Effect4.Program.Val.tuple (List.cons reply (List.cons next List.nil)))) →\n                    And (Effect4.Program.Typed.Fits w reply B) (Effect4.Program.Typed.Fits w next C)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":220,"lemmas":10,"nearest":[]},"doc":"**One atomic update.** A step term that reads the pair of a reply and a next value, under\nthe cell's current value as its last binder, is one `Ref.modify`: the store step reads the cell\nonce, answers the reply and writes the next value. Stated once, for every step of a\n`Ref.modify`. Consumer: a wrapper's law, which runs each step so. It is the census clause\n`refStep_modify`, and it needs no typing. ","kind":"theorem","module":"Effect4.Laws.Step.Store","name":"Effect4.Modules.step_updates","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {step : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env} {path : List Nat}\n  {current : String} {captured : List Effect4.Machine.Val} {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey} {cell reply next : Effect4.Machine.Val},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some cell) →\n    Effect4.Modules.Reads step (env.push (List.cons current List.nil)) path\n        (instHAppendOfAppend.hAppend captured (List.cons cell List.nil))\n        (Effect4.Program.Val.tuple (List.cons reply (List.cons next List.nil))) →\n      Exists fun f =>\n        And (Eq (step (env.push (List.cons current List.nil)) path) (Except.ok f))\n          (Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q f captured) stores)\n            (Option.some\n              {\n                fst :=\n                  { refs := Effect4.Machine.refPoke stores.refs q next,\n                    deferreds := stores.deferreds, scopes := stores.scopes, memo := stores.memo,\n                    timers := stores.timers, nextName := stores.nextName,\n                    externals := stores.externals },\n                snd := reply }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":128,"lemmas":94,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem"]},"doc":"**An ascription has its declared type.** At a scope, let `e` have the type `S` inside a\nconst-generic position: a record's value is typed there. Let the declared type `T` be its own\nnormal form, with a formed one-field declaration, and let `S` be below `T` in the checker's\norder: the record's check. Then `ascribe T e` has the type `T` under each literal flag.\n\nReach: the checker's `argTy` at every scope and every signature. The premise on `e` is at one\nflag, so a string literal is a term for this rule. It does not establish program admission, a\nrun or a target's type, and it is no rule of `Ref.make<A>`. ","kind":"theorem","module":"Effect4.Laws.Step.Ascribe","name":"Effect4.Modules.types_ascribe","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {types : List Effect4.Program.Ty} {e : Effect4.Program.Authoring.TermSrc}\n  {S T : Effect4.Program.Ty},\n  Eq T.normalize T →\n    Eq\n        (Effect4.Program.Formation.check\n          (Effect4.Program.Formation.sites Bool.false List.nil\n            (Effect4.Program.Ty.record (Effect4.Program.Authoring.ascribeFields T))))\n        Option.none →\n      Effect4.Modules.Types sig e env path types Bool.true S →\n        Eq (S.subN T) Bool.true →\n          Effect4.Modules.TypesEach sig (Effect4.Program.Authoring.ascribe T e) env path types T","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Order.max_le"]},"doc":"In a partial order with joins, the join is associative. Its consumers are `CTy.join_assoc`\nand `ErrTy.join_assoc`. ","kind":"theorem","module":"Effect4.Laws.Program.Order","name":"Effect4.Order.max_assoc","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : LE α] [inst_1 : Max α] [Std.IsPartialOrder α] [Std.LawfulOrderSup α]\n  (a b c : α), Eq (inst_1.max (inst_1.max a b) c) (inst_1.max a (inst_1.max b c))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Order.max_le"]},"doc":"In a partial order with joins, the join is commutative. Its consumers are `CTy.join_comm`\nand `ErrTy.join_comm`. ","kind":"theorem","module":"Effect4.Laws.Program.Order","name":"Effect4.Order.max_comm","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : LE α] [inst_1 : Max α] [Std.IsPartialOrder α] [Std.LawfulOrderSup α]\n  (a b : α), Eq (inst_1.max a b) (inst_1.max b a)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Order.max_le"]},"doc":"In a partial order with joins, the join is idempotent. Its consumers are `CTy.join_self`\nand `ErrTy.join_self`. ","kind":"theorem","module":"Effect4.Laws.Program.Order","name":"Effect4.Order.max_idem","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : LE α] [inst_1 : Max α] [Std.IsPartialOrder α] [Std.LawfulOrderSup α] (a : α),\n  Eq (inst_1.max a a) a","status":"proved"},{"axioms":[],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"The join is below each upper bound of its two arguments: one direction of core's\n`Std.max_le_iff`, as a rule. Its consumers are the laws below and `AnswerOrder.ofCore`. ","kind":"theorem","module":"Effect4.Laws.Program.Order","name":"Effect4.Order.max_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : LE α] [inst_1 : Max α] [Std.LawfulOrderSup α] {a b c : α},\n  inst.le a c → inst.le b c → inst.le (inst_1.max a b) c","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Order.max_le"]},"doc":"The join is monotone in both arguments. Its consumer is the `mono` premise of a slice view\nof an answer that a join builds (`SliceView`, `Laws/Slice/Lattice.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Order","name":"Effect4.Order.max_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : LE α] [inst_1 : Max α] [Std.LawfulOrderSup α] [Std.IsPreorder α]\n  {a b c d : α}, inst.le a c → inst.le b d → inst.le (inst_1.max a b) (inst_1.max c d)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":162,"lemmas":8,"nearest":[]},"doc":"Helper of partitioned-semaphore-bookkeeping; available_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Data","name":"Effect4.PartitionedSemaphore.Model.available_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PartitionedSemaphore.Model.Counts),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n      { fst := Effect4.PartitionedSemaphore.encoded s, snd := Unit.unit }\n      Effect4.PartitionedSemaphore.Data.available)\n    (Effect4.PartitionedSemaphore.Model.available s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":308,"lemmas":25,"nearest":["Effect4.PartitionedSemaphore.Model.available_eval","Effect4.Modules.Step.sound"]},"doc":"The availability source reads the model's scalar reply. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.available_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PartitionedSemaphore.Model.Counts) {source : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads source env path vals\n      ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n    Effect4.Modules.Reads (Effect4.PartitionedSemaphore.availableStep source) env path vals\n      (Effect4.Store.Val.nat (Effect4.PartitionedSemaphore.Model.available s))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":301,"lemmas":23,"nearest":["Effect4.PartitionedSemaphore.Model.reserve_reads","Effect4.PartitionedSemaphore.Model.tryTake_reads","Effect4.PartitionedSemaphore.Model.available_reads","Effect4.PartitionedSemaphore.Model.initial_reads"]},"doc":"The four source readings observe the independent scalar model.\nReservation retains the insufficient-availability and within-capacity branch premises.\nThis claim excludes identities, registration, cancellation, delivery, wrappers, and host execution. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.bookkeeping_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"And\n  (∀ (capacity : Nat) (source : Effect4.Program.Authoring.TermSrc)\n    (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n    Effect4.Modules.Reads source env path vals (Effect4.Store.Val.nat capacity) →\n      Effect4.Modules.Reads (Effect4.PartitionedSemaphore.initialStep source) env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal\n          (Effect4.PartitionedSemaphore.Model.initial capacity)))\n  (And\n    (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (source : Effect4.Program.Authoring.TermSrc)\n      (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n      Effect4.Modules.Reads source env path vals\n          ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n        Effect4.Modules.Reads (Effect4.PartitionedSemaphore.availableStep source) env path vals\n          (Effect4.Store.Val.nat (Effect4.PartitionedSemaphore.Model.available s)))\n    (And\n      (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n        (amount source : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n        (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n          Effect4.Modules.Reads source env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n            Effect4.Modules.Reads (Effect4.PartitionedSemaphore.tryTakeStep amount source) env path\n              vals\n              ((Effect4.Store.Image.bool.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts)).toVal\n                (Effect4.PartitionedSemaphore.Model.tryTake s n)))\n      (∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n        (amount source : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n        (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n          Effect4.Modules.Reads source env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n            instLTNat.lt s.available n →\n              instLENat.le n s.capacity →\n                Effect4.Modules.Reads (Effect4.PartitionedSemaphore.reserveStep amount source) env\n                  path vals\n                  ((Effect4.Store.Image.nat.tuple2\n                        (Effect4.Schema.Modeled.image\n                          Effect4.PartitionedSemaphore.Model.Counts)).toVal\n                    (Effect4.PartitionedSemaphore.Model.reserve s n)))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":154,"lemmas":8,"nearest":[]},"doc":"Helper of partitioned-semaphore-bookkeeping; initial_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Data","name":"Effect4.PartitionedSemaphore.Model.initial_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (capacity : Nat),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n      { fst := capacity, snd := Unit.unit } Effect4.PartitionedSemaphore.Data.initial)\n    (Effect4.PartitionedSemaphore.encoded (Effect4.PartitionedSemaphore.Model.initial capacity))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":297,"lemmas":14,"nearest":["Effect4.PartitionedSemaphore.Model.initial_eval","Effect4.Modules.Step.sound"]},"doc":"The construction source reads the independent model's derived image. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.initial_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (capacity : Nat) {source : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads source env path vals (Effect4.Store.Val.nat capacity) →\n    Effect4.Modules.Reads (Effect4.PartitionedSemaphore.initialStep source) env path vals\n      ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal\n        (Effect4.PartitionedSemaphore.Model.initial capacity))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":164,"lemmas":8,"nearest":[]},"doc":"Helper of partitioned-semaphore-bookkeeping; reserve_reads consumes this conditional equation.\nThe branch premise remains explicit, although the scalar arithmetic equation needs no premise. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Data","name":"Effect4.PartitionedSemaphore.Model.reserve_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat),\n  instLTNat.lt s.available n →\n    instLENat.le n s.capacity →\n      Eq\n        (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n          (Effect4.PartitionedSemaphore.requests s n) Effect4.PartitionedSemaphore.Data.reserve)\n        { fst := (Effect4.PartitionedSemaphore.Model.reserve s n).fst,\n          snd :=\n            Effect4.PartitionedSemaphore.encoded\n              (Effect4.PartitionedSemaphore.Model.reserve s n).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":310,"lemmas":25,"nearest":["Effect4.PartitionedSemaphore.Model.reserve_eval","Effect4.Modules.Step.sound"]},"doc":"Only the source's waiting branch consumes this reservation connector. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.reserve_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n  {amount source : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n    Effect4.Modules.Reads source env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n      instLTNat.lt s.available n →\n        instLENat.le n s.capacity →\n          Effect4.Modules.Reads (Effect4.PartitionedSemaphore.reserveStep amount source) env path\n            vals\n            ((Effect4.Store.Image.nat.tuple2\n                  (Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts)).toVal\n              (Effect4.PartitionedSemaphore.Model.reserve s n))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":165,"lemmas":8,"nearest":[]},"doc":"Helper of partitioned-semaphore-bookkeeping; tryTake_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Data","name":"Effect4.PartitionedSemaphore.Model.tryTake_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n      (Effect4.PartitionedSemaphore.requests s n) Effect4.PartitionedSemaphore.Data.tryTake)\n    { fst := (Effect4.PartitionedSemaphore.Model.tryTake s n).fst,\n      snd :=\n        Effect4.PartitionedSemaphore.encoded (Effect4.PartitionedSemaphore.Model.tryTake s n).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":310,"lemmas":25,"nearest":["Effect4.PartitionedSemaphore.Model.tryTake_eval","Effect4.Modules.Step.sound"]},"doc":"The attempted take reads the model's reply and final scalar record. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.Model.tryTake_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PartitionedSemaphore.Model.Counts) (n : Nat)\n  {amount source : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads amount env path vals (Effect4.Store.Val.nat n) →\n    Effect4.Modules.Reads source env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts).toVal s) →\n      Effect4.Modules.Reads (Effect4.PartitionedSemaphore.tryTakeStep amount source) env path vals\n        ((Effect4.Store.Image.bool.tuple2\n              (Effect4.Schema.Modeled.image Effect4.PartitionedSemaphore.Model.Counts)).toVal\n          (Effect4.PartitionedSemaphore.Model.tryTake s n))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":344,"lemmas":105,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at this scalar read. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.available_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {source : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig source env path types Effect4.PartitionedSemaphore.countsTy →\n        Effect4.Modules.TypesEach sig (Effect4.PartitionedSemaphore.availableStep source) env path\n          types Effect4.Program.Ty.nat","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":342,"lemmas":105,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at this construction. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.initial_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {source : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig source env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig (Effect4.PartitionedSemaphore.initialStep source) env path\n          types Effect4.PartitionedSemaphore.countsTy","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":345,"lemmas":105,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at this branch arithmetic. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.reserve_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {amount source : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig amount env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig source env path types Effect4.PartitionedSemaphore.countsTy →\n          Effect4.Modules.TypesEach sig (Effect4.PartitionedSemaphore.reserveStep amount source) env\n            path types (Effect4.Program.Ty.nat.prod Effect4.PartitionedSemaphore.countsTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":345,"lemmas":105,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at this attempted take. ","kind":"theorem","module":"Effect4.Laws.Library.PartitionedSemaphore.Steps","name":"Effect4.PartitionedSemaphore.tryTake_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {amount source : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig amount env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig source env path types Effect4.PartitionedSemaphore.countsTy →\n          Effect4.Modules.TypesEach sig (Effect4.PartitionedSemaphore.tryTakeStep amount source) env\n            path types (Effect4.Program.Ty.bool.prod Effect4.PartitionedSemaphore.countsTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":321,"lemmas":17,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The close's first step agrees with the model's `close`.** The reply is whether the step\nbegan the close, and the count of the waiters. The stored value is the model's next state. The\ntable does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.closeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n    Effect4.Modules.Reads (Effect4.Pool.closeStep cellSrc) env path vals\n      (Effect4.Program.Val.tuple\n        (List.cons (Effect4.Pool.Model.closeReplyVal (Effect4.Pool.Model.close s).snd)\n          (List.cons (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.close s).fst)\n            List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":211,"lemmas":49,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The close's first step is typed at every scope.** No fold. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.closeStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {types : List Effect4.Program.Ty},\n          Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Pool.cellTy A) →\n            Effect4.Modules.TypesEach sig (Effect4.Pool.closeStep cellSrc) env path types\n              (Effect4.Pool.Model.closeReplyTy.prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":14,"lemmas":1,"nearest":[]},"doc":"**After the close's first step no lease begins.** The step leaves a closing pool, it tells\nwhether it began the close, and its count is the count of the waiters. At a closing pool every\nlease is refused, and a refused lease changes no item, no idle stamp and no stamp of a lease.\nNo transition opens the pool again (`step_closing`). Consumer: the proposed claim\n`pool-close-waits`. It states no wait for a lease, no finalizer's run and no completed\nclose. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.close_refuses","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State),\n  And (Eq (Effect4.Pool.Model.close s).fst.closing Bool.true)\n    (And (Eq (Effect4.Pool.Model.close s).snd { fst := s.closing.not, snd := s.waiters.length })\n      (∀ (id : Nat),\n        Eq (Effect4.Pool.Model.lease (Effect4.Pool.Model.close s).fst id)\n          { fst := Effect4.Pool.Model.withdraw (Effect4.Pool.Model.close s).fst id,\n            snd := { fst := Bool.true, snd := Option.none } }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":348,"lemmas":36,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The closer's step agrees with the model's `drain`** (decisions row 276, point 2). The\nreply is whether no lease is outstanding. The stored value is the model's next state, through\nthe table that holds `hint` at `id`: where the closer enrols, its entry holds the step's hint.\nNo premise names the closer: the step removes the closer's own entry first, as the model does.\nThe identity stands in the removal's fold, so it is a caller's term under a fold. The cell's own\nsource stands in no fold's body. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.drainStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  (id : Nat) (hint : Effect4.Machine.DeferredKey),\n  tb.Injective →\n    ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Captured idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n          Effect4.Modules.Reads hintSrc env path vals (Effect4.Machine.Val.promise hint) →\n            Effect4.Modules.Reads cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n              Effect4.Modules.Reads (Effect4.Pool.drainStep idSrc hintSrc cellSrc) env path vals\n                (Effect4.Program.Val.tuple\n                  (List.cons (Effect4.Store.Val.bool (Effect4.Pool.Model.drain s id).snd)\n                    (List.cons\n                      (Effect4.Pool.Model.cellVal (tb.renew id hint) res\n                        (Effect4.Pool.Model.drain s id).fst)\n                      List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":235,"lemmas":93,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The closer's step is typed at every scope** (decisions row 276, point 2). The closer's\nidentity stands in the removal's fold, so it is taken with its typed capture. The hint and the\ncell's own source stand outside every fold that reads a caller's term. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.drainStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig hintSrc env path types Effect4.Modules.idTy →\n                Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Pool.cellTy A) →\n                  Effect4.Modules.TypesEach sig (Effect4.Pool.drainStep idSrc hintSrc cellSrc) env\n                    path types (Effect4.Program.Ty.bool.prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":5,"nearest":[]},"doc":"**The closer's step answers true exactly where no lease is outstanding** (decisions rows\n268 and 276, point 2). It enrols the closer exactly otherwise: the closer's own entry leaves\nfirst, so an entry after the step is this step's enrolment. The check and the enrolment are one\ntransition, so each later return finds a waiter. The step changes the waiters alone: it frees no\nitem, and it finalizes none. Consumer: the proposed claim `pool-close-waits`. It states one\ntransition. It states no wait along a run, no progress of the closer and no finalizer's run. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.drain_waits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (id : Nat),\n  And\n    (Iff (Eq (Effect4.Pool.Model.drain s id).snd Bool.true)\n      (Eq (Effect4.Pool.Model.leases s) List.nil))\n    (And\n      (Iff (List.instMembership.mem (Effect4.Pool.Model.drain s id).fst.waiters id)\n        (Ne (Effect4.Pool.Model.leases s) List.nil))\n      (Eq (Effect4.Pool.Model.drain s id).fst\n        { items := s.items, available := s.available,\n          waiters := (Effect4.Pool.Model.drain s id).fst.waiters, closing := s.closing,\n          next := s.next }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":3,"nearest":[]},"doc":"**A return puts its item at the front, and it keeps every item.** Where the lease holds\nthe item, the item's stamp joins the front of the idle stamps, the lease returned, and a wake\nis owed exactly when a waiter is enrolled. Every item stays, with its resource: a return\nfinalizes nothing. After it the lease holds no item. Consumer: the proposed claim\n`pool-lease-return`. It states one transition, and nothing about a finalizer's run. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_front","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {s : Effect4.Pool.Model.State} {i l : Nat},\n  Eq (s.items.any fun x => x.heldBy i l) Bool.true →\n    And (Eq (Effect4.Pool.Model.giveBack s i l).fst.available (List.cons i s.available))\n      (And\n        (Eq (Effect4.Pool.Model.giveBack s i l).snd\n          { fst := Bool.true, snd := s.waiters.isEmpty.not })\n        (And\n          (Eq\n            (List.map (fun it => { fst := it.stamp, snd := it.resource })\n              (Effect4.Pool.Model.giveBack s i l).fst.items)\n            (List.map (fun it => { fst := it.stamp, snd := it.resource }) s.items))\n          (Eq ((Effect4.Pool.Model.giveBack s i l).fst.items.any fun x => x.heldBy i l)\n            Bool.false)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":1,"nearest":["Effect4.Pool.Model.giveBack_front"]},"doc":"**A lease returns at most once.** After a return of a lease, a second return of the same\nlease changes nothing and owes no wake, whatever the first one did. Consumer: the proposed\nclaim `pool-lease-return`. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.giveBack_once","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (i l : Nat),\n  Eq (Effect4.Pool.Model.giveBack (Effect4.Pool.Model.giveBack s i l).fst i l)\n    { fst := (Effect4.Pool.Model.giveBack s i l).fst,\n      snd := { fst := Bool.false, snd := Bool.false } }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":178,"lemmas":129,"nearest":["Effect4.Program.Bounds.matchArgsB_cons_nil","Effect4.Program.Bounds.matchArgsB_append"]},"doc":"**The initial value has the cell's type**, at every list of at least one resource and in\nevery scope, where each resource has the resource's type under each literal flag. The size is\nat least 1 (decisions row 267): the two lists of an empty pool would have the empty element\ntype. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.initial_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Effect4.Pool.Model.ResourceTy A →\n        ∀ {resources : List Effect4.Program.Authoring.TermSrc},\n          Ne resources List.nil →\n            ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat}\n              {types : List Effect4.Program.Ty},\n              (∀ (r : Effect4.Program.Authoring.TermSrc),\n                  List.instMembership.mem resources r →\n                    Effect4.Modules.TypesEach sig r env path types A) →\n                Effect4.Modules.TypesEach sig (Effect4.Pool.initial A resources) env path types\n                  (Effect4.Pool.cellTy A)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":367,"lemmas":45,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The lease step agrees with the model's `lease`.** The reply is whether the pool refused,\nand the leased item's record, if any: its stamp, its resource and its lease's stamp. The stored\nvalue is the model's next state, through the table that holds `hint` at `id`: where the request\nenrols, its entry holds the step's hint. No premise names the request: the step removes the\nrequest's own entry first, as the model does. The request's identity stands in the removal's\nfold, and the cell's own source in the two folds over the items, so each is a caller's term\nunder a fold. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.leaseStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  (id : Nat) (hint : Effect4.Machine.DeferredKey),\n  tb.Injective →\n    ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Captured idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n          Effect4.Modules.Reads hintSrc env path vals (Effect4.Machine.Val.promise hint) →\n            Effect4.Modules.Captured cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n              Effect4.Modules.Reads (Effect4.Pool.leaseStep idSrc hintSrc cellSrc) env path vals\n                (Effect4.Program.Val.tuple\n                  (List.cons\n                    (Effect4.Pool.Model.leaseReplyVal res (Effect4.Pool.Model.lease s id).snd)\n                    (List.cons\n                      (Effect4.Pool.Model.cellVal (tb.renew id hint) res\n                        (Effect4.Pool.Model.lease s id).fst)\n                      List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":249,"lemmas":93,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The lease step is typed at every scope.** The request's identity stands in the removal's\nfold, and the cell's own source stands in the two folds over the items, so each is taken with\nits typed capture. The hint stands outside every fold. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.leaseStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig hintSrc env path types Effect4.Modules.idTy →\n                Effect4.Modules.CapturedTy sig cellSrc env path types (Effect4.Pool.cellTy A) →\n                  Effect4.Modules.TypesEach sig (Effect4.Pool.leaseStep idSrc hintSrc cellSrc) env\n                    path types ((Effect4.Pool.Model.leaseReplyTy A).prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":5,"nearest":[]},"doc":"**The enrolment rule.** Lease or enrol adds a waiter only when the pool is open and no\nitem is idle: on a state of the profile, the request is enrolled after the step exactly when\nthe pool is open and a lease holds every item. The request's own entry leaves first, so an\nentry after the step is this step's enrolment. Consumers: the lease step's agreement, and then\nthe public waiting wrapper. It is a fact of this one transition. It states no fairness and no\nliveness, and nothing about a later selection. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.lease_enrols_iff","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {s : Effect4.Pool.Model.State},\n  Effect4.Pool.Model.Profile s →\n    ∀ (id : Nat),\n      Iff (List.instMembership.mem (Effect4.Pool.Model.lease s id).fst.waiters id)\n        (And (Eq s.closing Bool.false)\n          (∀ (it : Effect4.Pool.Model.Item),\n            List.instMembership.mem s.items it → Eq it.borrowed Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":300,"lemmas":9,"nearest":["Effect4.Pool.Model.drainStep_agrees","Effect4.Pool.Model.closeStep_agrees","Effect4.Pool.Model.withdrawStep_agrees","Effect4.Pool.Model.selectStep_agrees","Effect4.Pool.Model.returnStep_agrees","Effect4.Pool.Model.leaseStep_agrees"]},"doc":"**The six step statements hold** (the claim `pool-steps-agree`, a part of the proposed\nclaim `pool-expansion-agrees`). Each field is one statement of this file. It establishes no\norder of the wake across helpers, no cancellation law, no liveness, no wait of the close along\na run and nothing of a wrapper. Its consumer is the attempt laws of the public operations\n(`src/Effect4/Laws/Library/Pool/Ops.lean`), and then the law of a run. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.pool_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Pool.Model.StepsAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":22,"lemmas":25,"nearest":[]},"doc":"**The first profile is closed.** Each transition of the model leaves a state of the\nprofile. No premise names the request: a lease removes its own entry first, and a return of a\nlease that holds nothing changes nothing. Consumer: the public law, along a run. It establishes\nnothing about a program, and no progress of a waiter. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.profile_closed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (op : Effect4.Pool.Model.Op),\n  Effect4.Pool.Model.Profile s → Effect4.Pool.Model.Profile (Effect4.Pool.Model.step s op)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":347,"lemmas":31,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The return step agrees with the model's `giveBack`.** The reply is whether the lease\nreturned and whether a wake is owed. The stored value is the model's next state: where the\nlease holds the item, the item's stamp is at the front of the idle stamps. No premise names\nthe lease: a return of a lease that holds nothing reads the cell as it is. The step compares\nstamps and no identity, so no premise names the table's injectivity. The table does not\nchange. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.returnStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  (item lease : Nat) {itemSrc leaseSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Captured itemSrc env path vals (Effect4.Store.Val.nat item) →\n      Effect4.Modules.Captured leaseSrc env path vals (Effect4.Store.Val.nat lease) →\n        Effect4.Modules.Reads cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n          Effect4.Modules.Reads (Effect4.Pool.returnStep itemSrc leaseSrc cellSrc) env path vals\n            (Effect4.Program.Val.tuple\n              (List.cons\n                (Effect4.Pool.Model.returnReplyVal (Effect4.Pool.Model.giveBack s item lease).snd)\n                (List.cons\n                  (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.giveBack s item lease).fst)\n                  List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":235,"lemmas":93,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The return step is typed at every scope.** The item's stamp and the lease's stamp stand\nin the two folds over the items, so each is taken with its typed capture. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.returnStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {itemSrc leaseSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig itemSrc env path types Effect4.Program.Ty.nat →\n              Effect4.Modules.CapturedTy sig leaseSrc env path types Effect4.Program.Ty.nat →\n                Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Pool.cellTy A) →\n                  Effect4.Modules.TypesEach sig (Effect4.Pool.returnStep itemSrc leaseSrc cellSrc)\n                    env path types (Effect4.Pool.Model.returnReplyTy.prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":320,"lemmas":18,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The selection step agrees with the model's `select`.** The reply is the selected\nwaiters' records through the table, in order: each names a selected identity and its hint. The\nstored value is the model's next state. The step compares no identity, so no premise names the\ntable's injectivity. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.selectStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  (count : Nat) {countSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads countSrc env path vals (Effect4.Store.Val.nat count) →\n    Effect4.Modules.Reads cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n      Effect4.Modules.Reads (Effect4.Pool.selectStep countSrc cellSrc) env path vals\n        (Effect4.Program.Val.tuple\n          (List.cons (Effect4.Pool.Model.selectReplyVal tb (Effect4.Pool.Model.select s count).snd)\n            (List.cons (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.select s count).fst)\n              List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":209,"lemmas":49,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The selection step is typed at every scope.** No fold: each argument is typed at the\nscope alone. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.selectStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {countSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Effect4.Modules.TypesEach sig countSrc env path types Effect4.Program.Ty.nat →\n            Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Pool.cellTy A) →\n              Effect4.Modules.TypesEach sig (Effect4.Pool.selectStep countSrc cellSrc) env path\n                types (Effect4.Pool.Model.selectReplyTy.prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"**A selection takes the first waiters of the state that it finds, at most its count, and\nexactly those.** The selected identities are a prefix of the waiters, in the order of\nenrolment. They are as many as the count, or every waiter where fewer wait. They leave the\nlist, and nothing else changes: a wake reserves nothing. Consumer: the proposed claim\n`pool-wake-selection`. It states one selection, and nothing about a run. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Profile","name":"Effect4.Pool.Model.select_takes_first","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ (s : Effect4.Pool.Model.State) (count : Nat),\n  And\n    (Eq\n      (instHAppendOfAppend.hAppend (Effect4.Pool.Model.select s count).snd\n        (Effect4.Pool.Model.select s count).fst.waiters)\n      s.waiters)\n    (And (Eq (Effect4.Pool.Model.select s count).snd.length (instMinNat.min count s.waiters.length))\n      (Eq (Effect4.Pool.Model.select s count).fst\n        { items := s.items, available := s.available, waiters := List.drop count s.waiters,\n          closing := s.closing, next := s.next }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":339,"lemmas":26,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The withdrawal agrees with the model's `withdraw`.** The reply is nothing, and the stored\nvalue is the model's next state. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Steps","name":"Effect4.Pool.Model.withdrawStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (s : Effect4.Pool.Model.State)\n  (id : Nat),\n  tb.Injective →\n    ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Captured idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n          Effect4.Modules.Reads cellSrc env path vals (Effect4.Pool.Model.cellVal tb res s) →\n            Effect4.Modules.Reads (Effect4.Pool.withdrawStep idSrc cellSrc) env path vals\n              (Effect4.Program.Val.tuple\n                (List.cons Effect4.Store.Val.unit\n                  (List.cons (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.withdraw s id))\n                    List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":228,"lemmas":93,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The withdrawal is typed at every scope.** The request's identity stands in the removal's\nfold. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Typing","name":"Effect4.Pool.Model.withdrawStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Pool.cellTy A) →\n                Effect4.Modules.TypesEach sig (Effect4.Pool.withdrawStep idSrc cellSrc) env path\n                  types (Effect4.Program.Ty.unit.prod (Effect4.Pool.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":534,"lemmas":252,"nearest":["Effect4.Pool.Model.withdrawStep_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Pool.Model.drainStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Modules.waitRetryAt_answers","Effect4.Program.mask_printed_form_profile","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Program.optionTy_option","Effect4.Pool.Model.selectStep_types","Effect4.Pool.Model.closeStep_types"]},"doc":"**The close is typed at every scope**: it answers nothing, it has no failure and it\nrequires nothing. So it is a release that cannot fail, and `make` registers it. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ {pool : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) pool s\n          (Effect4.Pool.cellTy A).refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (Effect4.Pool.close pool) s\n          Effect4.Program.Ty.unit","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":542,"lemmas":64,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.closeStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.closeStep_agrees"]},"doc":"**The close's first step is the model's `close`.** The store step answers whether it began\nthe close and the count of the waiters, and it writes the model's next state: the pool refuses\nnew leases from now on (`close_refuses`). ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.close_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) {env : Effect4.Program.Authoring.Env} {path : List Nat}\n          {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                  Eq (Effect4.Machine.refPeek stores.refs q)\n                      (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                    Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                        (Effect4.Pool.cellTy A) →\n                      Exists fun f =>\n                        And\n                          (Eq\n                            (Effect4.Pool.closeStep\n                              (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                            (Except.ok f))\n                          (And\n                            (Eq\n                              (Effect4.Machine.syncOpStep\n                                (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                              (Option.some\n                                {\n                                  fst :=\n                                    {\n                                      refs :=\n                                        Effect4.Machine.refPoke stores.refs q\n                                          (Effect4.Pool.Model.cellVal tb res\n                                            (Effect4.Pool.Model.close s).fst),\n                                      deferreds := stores.deferreds, scopes := stores.scopes,\n                                      memo := stores.memo, timers := stores.timers,\n                                      nextName := stores.nextName, externals := stores.externals },\n                                  snd :=\n                                    Effect4.Pool.Model.closeReplyVal\n                                      (Effect4.Pool.Model.close s).snd }))\n                            (And\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Pool.Model.closeReplyVal (Effect4.Pool.Model.close s).snd)\n                                Effect4.Pool.Model.closeReplyTy)\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.close s).fst)\n                                (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":562,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.drainStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.drainStep_agrees"]},"doc":"**The attempt of the closer is the model's `drain`.** The closer's identity is a caller's\nterm of the step, with its capture: it stands in the removal's fold. The hint is the round's.\nThe store step answers whether no lease is outstanding (`drain_waits`). It writes the model's\nnext state through the table that holds the hint at the closer. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.drain_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          tb.Injective →\n            ∀ {idSrc hintSrc : Effect4.Program.Authoring.TermSrc}\n              {env : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Effect4.Modules.Captured idSrc\n                        (env.push (List.cons (env.mint \"current\") List.nil)) path\n                        (instHAppendOfAppend.hAppend captured\n                          (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                        (Effect4.Machine.Val.promise (tb.handle id)) →\n                      Effect4.Modules.Reads hintSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend captured\n                            (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                          (Effect4.Machine.Val.promise hint) →\n                        Effect4.Modules.CapturedTy sig idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend tys\n                              (List.cons (Effect4.Pool.cellTy A) List.nil))\n                            Effect4.Modules.idTy →\n                          Effect4.Modules.TypesEach sig hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend tys\n                                (List.cons (Effect4.Pool.cellTy A) List.nil))\n                              Effect4.Modules.idTy →\n                            ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                              Eq (Effect4.Machine.refPeek stores.refs q)\n                                  (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                                Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                    (Effect4.Pool.cellTy A) →\n                                  Exists fun f =>\n                                    And\n                                      (Eq\n                                        (Effect4.Pool.drainStep idSrc hintSrc\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Eq\n                                          (Effect4.Machine.syncOpStep\n                                            (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                          (Option.some\n                                            {\n                                              fst :=\n                                                {\n                                                  refs :=\n                                                    Effect4.Machine.refPoke stores.refs q\n                                                      (Effect4.Pool.Model.cellVal (tb.renew id hint)\n                                                        res (Effect4.Pool.Model.drain s id).fst),\n                                                  deferreds := stores.deferreds,\n                                                  scopes := stores.scopes, memo := stores.memo,\n                                                  timers := stores.timers,\n                                                  nextName := stores.nextName,\n                                                  externals := stores.externals },\n                                              snd :=\n                                                Effect4.Store.Val.bool\n                                                  (Effect4.Pool.Model.drain s id).snd }))\n                                        (And\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Store.Val.bool\n                                              (Effect4.Pool.Model.drain s id).snd)\n                                            Effect4.Program.Ty.bool)\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.cellVal (tb.renew id hint) res\n                                              (Effect4.Pool.Model.drain s id).fst)\n                                            (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":78,"nearest":["Effect4.Pool.drain_attempt"]},"doc":"**The attempt of the closer at the wrapper's own binders.** The closer's identity and its\nhint are names that `bindWith` mints. The scope binds each, and no later binder shadows\neither. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.drain_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          tb.Injective →\n            ∀ {env outerId outerHint : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val}\n              {beforeId afterId beforeHint afterHint : Effect4.Program.Authoring.Names},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Eq env.names\n                        (instHAppendOfAppend.hAppend beforeId\n                          (List.cons (outerId.mint \"answer\") afterId)) →\n                      (∀ (name : String),\n                          List.instMembership.mem afterId name → Ne name (outerId.mint \"answer\")) →\n                        Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                            (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                          Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                              (Option.some Effect4.Modules.idTy) →\n                            Eq env.names\n                                (instHAppendOfAppend.hAppend beforeHint\n                                  (List.cons (outerHint.mint \"answer\") afterHint)) →\n                              (∀ (name : String),\n                                  List.instMembership.mem afterHint name →\n                                    Ne name (outerHint.mint \"answer\")) →\n                                Eq\n                                    (List.instGetElem?NatLtLength.getElem? captured\n                                      (List.length beforeHint))\n                                    (Option.some (Effect4.Machine.Val.promise hint)) →\n                                  Eq\n                                      (List.instGetElem?NatLtLength.getElem? tys\n                                        (List.length beforeHint))\n                                      (Option.some Effect4.Modules.idTy) →\n                                    ∀ {stores : Effect4.Machine.Stores}\n                                      {q : Effect4.Machine.RefKey},\n                                      Eq (Effect4.Machine.refPeek stores.refs q)\n                                          (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                                        Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.cellVal tb res s)\n                                            (Effect4.Pool.cellTy A) →\n                                          Exists fun f =>\n                                            And\n                                              (Eq\n                                                (Effect4.Pool.drainStep\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerId.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerHint.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (env.mint \"current\"))\n                                                  (env.push\n                                                    (List.cons (env.mint \"current\") List.nil))\n                                                  path)\n                                                (Except.ok f))\n                                              (And\n                                                (Eq\n                                                  (Effect4.Machine.syncOpStep\n                                                    (Effect4.Machine.SyncOp.refModify q f captured)\n                                                    stores)\n                                                  (Option.some\n                                                    {\n                                                      fst :=\n                                                        {\n                                                          refs :=\n                                                            Effect4.Machine.refPoke stores.refs q\n                                                              (Effect4.Pool.Model.cellVal\n                                                                (tb.renew id hint) res\n                                                                (Effect4.Pool.Model.drain s\n                                                                    id).fst),\n                                                          deferreds := stores.deferreds,\n                                                          scopes := stores.scopes,\n                                                          memo := stores.memo,\n                                                          timers := stores.timers,\n                                                          nextName := stores.nextName,\n                                                          externals := stores.externals },\n                                                      snd :=\n                                                        Effect4.Store.Val.bool\n                                                          (Effect4.Pool.Model.drain s id).snd }))\n                                                (And\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Store.Val.bool\n                                                      (Effect4.Pool.Model.drain s id).snd)\n                                                    Effect4.Program.Ty.bool)\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Pool.Model.cellVal (tb.renew id hint)\n                                                      res (Effect4.Pool.Model.drain s id).fst)\n                                                    (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":582,"lemmas":72,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.leaseStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.leaseStep_agrees"]},"doc":"**The attempt of a lease is the model's `lease`.** The cell holds the model state `s`. The\nidentity is a caller's term of the step, with its capture: it stands in the removal's fold. The\nhint is the round's. The cell's own source stands in the two folds over the items, and the row's\nown name has that capture (`captured_current`). The store step answers whether the pool refused\nand the leased item's record, if any. It writes the model's next state through the table that\nholds the hint at the request. The reply and the stored value are members of their types. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          tb.Injective →\n            ∀ {idSrc hintSrc : Effect4.Program.Authoring.TermSrc}\n              {env : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Effect4.Modules.Captured idSrc\n                        (env.push (List.cons (env.mint \"current\") List.nil)) path\n                        (instHAppendOfAppend.hAppend captured\n                          (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                        (Effect4.Machine.Val.promise (tb.handle id)) →\n                      Effect4.Modules.Reads hintSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend captured\n                            (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                          (Effect4.Machine.Val.promise hint) →\n                        Effect4.Modules.CapturedTy sig idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend tys\n                              (List.cons (Effect4.Pool.cellTy A) List.nil))\n                            Effect4.Modules.idTy →\n                          Effect4.Modules.TypesEach sig hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend tys\n                                (List.cons (Effect4.Pool.cellTy A) List.nil))\n                              Effect4.Modules.idTy →\n                            ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                              Eq (Effect4.Machine.refPeek stores.refs q)\n                                  (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                                Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                    (Effect4.Pool.cellTy A) →\n                                  Exists fun f =>\n                                    And\n                                      (Eq\n                                        (Effect4.Pool.leaseStep idSrc hintSrc\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Eq\n                                          (Effect4.Machine.syncOpStep\n                                            (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                          (Option.some\n                                            {\n                                              fst :=\n                                                {\n                                                  refs :=\n                                                    Effect4.Machine.refPoke stores.refs q\n                                                      (Effect4.Pool.Model.cellVal (tb.renew id hint)\n                                                        res (Effect4.Pool.Model.lease s id).fst),\n                                                  deferreds := stores.deferreds,\n                                                  scopes := stores.scopes, memo := stores.memo,\n                                                  timers := stores.timers,\n                                                  nextName := stores.nextName,\n                                                  externals := stores.externals },\n                                              snd :=\n                                                Effect4.Pool.Model.leaseReplyVal res\n                                                  (Effect4.Pool.Model.lease s id).snd }))\n                                        (And\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.leaseReplyVal res\n                                              (Effect4.Pool.Model.lease s id).snd)\n                                            (Effect4.Pool.Model.leaseReplyTy A))\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.cellVal (tb.renew id hint) res\n                                              (Effect4.Pool.Model.lease s id).fst)\n                                            (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":78,"nearest":["Effect4.Pool.lease_attempt"]},"doc":"**The attempt of a lease at the operation's own binders.** The identity and the hint are\nnames that `bindWith` mints. The scope binds each, and no later binder shadows either. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.lease_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          tb.Injective →\n            ∀ {env outerId outerHint : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val}\n              {beforeId afterId beforeHint afterHint : Effect4.Program.Authoring.Names},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Eq env.names\n                        (instHAppendOfAppend.hAppend beforeId\n                          (List.cons (outerId.mint \"answer\") afterId)) →\n                      (∀ (name : String),\n                          List.instMembership.mem afterId name → Ne name (outerId.mint \"answer\")) →\n                        Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                            (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                          Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                              (Option.some Effect4.Modules.idTy) →\n                            Eq env.names\n                                (instHAppendOfAppend.hAppend beforeHint\n                                  (List.cons (outerHint.mint \"answer\") afterHint)) →\n                              (∀ (name : String),\n                                  List.instMembership.mem afterHint name →\n                                    Ne name (outerHint.mint \"answer\")) →\n                                Eq\n                                    (List.instGetElem?NatLtLength.getElem? captured\n                                      (List.length beforeHint))\n                                    (Option.some (Effect4.Machine.Val.promise hint)) →\n                                  Eq\n                                      (List.instGetElem?NatLtLength.getElem? tys\n                                        (List.length beforeHint))\n                                      (Option.some Effect4.Modules.idTy) →\n                                    ∀ {stores : Effect4.Machine.Stores}\n                                      {q : Effect4.Machine.RefKey},\n                                      Eq (Effect4.Machine.refPeek stores.refs q)\n                                          (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                                        Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.cellVal tb res s)\n                                            (Effect4.Pool.cellTy A) →\n                                          Exists fun f =>\n                                            And\n                                              (Eq\n                                                (Effect4.Pool.leaseStep\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerId.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerHint.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (env.mint \"current\"))\n                                                  (env.push\n                                                    (List.cons (env.mint \"current\") List.nil))\n                                                  path)\n                                                (Except.ok f))\n                                              (And\n                                                (Eq\n                                                  (Effect4.Machine.syncOpStep\n                                                    (Effect4.Machine.SyncOp.refModify q f captured)\n                                                    stores)\n                                                  (Option.some\n                                                    {\n                                                      fst :=\n                                                        {\n                                                          refs :=\n                                                            Effect4.Machine.refPoke stores.refs q\n                                                              (Effect4.Pool.Model.cellVal\n                                                                (tb.renew id hint) res\n                                                                (Effect4.Pool.Model.lease s\n                                                                    id).fst),\n                                                          deferreds := stores.deferreds,\n                                                          scopes := stores.scopes,\n                                                          memo := stores.memo,\n                                                          timers := stores.timers,\n                                                          nextName := stores.nextName,\n                                                          externals := stores.externals },\n                                                      snd :=\n                                                        Effect4.Pool.Model.leaseReplyVal res\n                                                          (Effect4.Pool.Model.lease s id).snd }))\n                                                (And\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Pool.Model.leaseReplyVal res\n                                                      (Effect4.Pool.Model.lease s id).snd)\n                                                    (Effect4.Pool.Model.leaseReplyTy A))\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Pool.Model.cellVal (tb.renew id hint)\n                                                      res (Effect4.Pool.Model.lease s id).fst)\n                                                    (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":252,"lemmas":37,"nearest":[]},"doc":"**`Pool.make` makes the cell of the initial state.** The initial state is a state of the\nprofile (`initial_profile`), at every list of resources. The initial value reads that state's\ncell, where each acquired resource's reader reads its value. The store step of `Ref.make`\nappends that cell and answers its handle. The statement is of the one row that makes the cell:\nit states nothing of the acquisitions and nothing of the close's registration. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_makes","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val) (A : Effect4.Program.Ty)\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {resources : List Effect4.Program.Authoring.TermSrc} {names : List Nat}\n  (stores : Effect4.Machine.Stores),\n  Effect4.ListRel (fun src r => Effect4.Modules.Reads src env path vals (res r)) resources names →\n    And (Effect4.Pool.Model.Profile (Effect4.Pool.Model.initial names))\n      (And\n        (Effect4.Modules.Reads (Effect4.Pool.initial A resources) env path vals\n          (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.initial names)))\n        (Eq\n          (Effect4.Machine.syncOpStep\n            (Effect4.Machine.SyncOp.refMake\n              (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.initial names)))\n            stores)\n          (Option.some\n            {\n              fst :=\n                {\n                  refs :=\n                    instHAppendOfAppend.hAppend stores.refs\n                      (List.cons\n                        (Effect4.Pool.Model.cellVal tb res (Effect4.Pool.Model.initial names))\n                        List.nil),\n                  deferreds := stores.deferreds, scopes := stores.scopes, memo := stores.memo,\n                  timers := stores.timers, nextName := stores.nextName,\n                  externals := stores.externals },\n              snd := Effect4.Machine.Val.cell { index := List.length stores.refs } })))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":547,"lemmas":249,"nearest":["Effect4.Program.Ty.normalize_idem","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Pool.close_answers","Effect4.Pool.Model.initial_types","Effect4.Program.Bounds.matchB_one_var"]},"doc":"**`Pool.make` is typed at every scope**, for an acquisition of one effect type at every\nscope that the surface's binders reach, whose answer is the resource's type. It answers the\nhandle of a cell at Pool's cell type. Its failure type is the acquisition's, in normal form: a\nfailed acquisition fails `make`. **Its requirement is the acquisition's, with the scope's\nservice**: `make` registers the close as a finalizer of the scope that it runs in, so a pool is\nmade inside a scope. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.make_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ (size : Nat) (positive : instLTNat.lt 0 size)\n      {acquire : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n      {s : Effect4.Modules.TypedScope} {a : Effect4.Program.EffTy},\n      Eq a.answer A →\n        (∀ (t : Effect4.Modules.TypedScope),\n            s.Reaches t → Effect4.Modules.Has (Effect4.Program.nativeSignature table) acquire t a) →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n            (Effect4.Pool.make A size acquire positive) s\n            { answer := (Effect4.Pool.cellTy A).refOf, error := a.error.normalize,\n              requires :=\n                a.requires.union\n                  (Effect4.Machine.Env.Requirement.single\n                    (Effect4.Program.nativeSignature table).scopeKey) }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":562,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.returnStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.returnStep_agrees"]},"doc":"**The step of a return is the model's `giveBack`.** The item's stamp and the lease's stamp\nare a caller's terms of the step, each with its capture: each stands in the two folds over the\nitems. The store step answers whether the lease returned and whether a wake is owed, and it\nwrites the model's next state. No premise names the lease: a return of a lease that holds\nnothing changes nothing, as the model's does. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.return_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (item lease : Nat)\n          {itemSrc leaseSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {tys : List Effect4.Program.Ty}\n          {w : Effect4.Program.Typed.World} {captured : List Effect4.Machine.Val},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Effect4.Modules.Captured itemSrc\n                    (env.push (List.cons (env.mint \"current\") List.nil)) path\n                    (instHAppendOfAppend.hAppend captured\n                      (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                    (Effect4.Store.Val.nat item) →\n                  Effect4.Modules.Captured leaseSrc\n                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                      (instHAppendOfAppend.hAppend captured\n                        (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                      (Effect4.Store.Val.nat lease) →\n                    Effect4.Modules.CapturedTy sig itemSrc\n                        (env.push (List.cons (env.mint \"current\") List.nil)) path\n                        (instHAppendOfAppend.hAppend tys\n                          (List.cons (Effect4.Pool.cellTy A) List.nil))\n                        Effect4.Program.Ty.nat →\n                      Effect4.Modules.CapturedTy sig leaseSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend tys\n                            (List.cons (Effect4.Pool.cellTy A) List.nil))\n                          Effect4.Program.Ty.nat →\n                        ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                          Eq (Effect4.Machine.refPeek stores.refs q)\n                              (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                            Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                (Effect4.Pool.cellTy A) →\n                              Exists fun f =>\n                                And\n                                  (Eq\n                                    (Effect4.Pool.returnStep itemSrc leaseSrc\n                                      (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                    (Except.ok f))\n                                  (And\n                                    (Eq\n                                      (Effect4.Machine.syncOpStep\n                                        (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                      (Option.some\n                                        {\n                                          fst :=\n                                            {\n                                              refs :=\n                                                Effect4.Machine.refPoke stores.refs q\n                                                  (Effect4.Pool.Model.cellVal tb res\n                                                    (Effect4.Pool.Model.giveBack s item lease).fst),\n                                              deferreds := stores.deferreds,\n                                              scopes := stores.scopes, memo := stores.memo,\n                                              timers := stores.timers, nextName := stores.nextName,\n                                              externals := stores.externals },\n                                          snd :=\n                                            Effect4.Pool.Model.returnReplyVal\n                                              (Effect4.Pool.Model.giveBack s item lease).snd }))\n                                    (And\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Pool.Model.returnReplyVal\n                                          (Effect4.Pool.Model.giveBack s item lease).snd)\n                                        Effect4.Pool.Model.returnReplyTy)\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Pool.Model.cellVal tb res\n                                          (Effect4.Pool.Model.giveBack s item lease).fst)\n                                        (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":383,"lemmas":131,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Pool.return_attempt"]},"doc":"**The step of a return at the hook's own binder.** The leased item's record is the name\nthat the protected form's `bindWith` mints. The step reads the item's stamp and the lease's\nstamp as two fields of it, each under the step's folds. The scope binds the name, and no later\nbinder shadows it. The return is the model's `giveBack` at the record's two stamps. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.return_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (it : Effect4.Pool.Model.Item)\n          {env outerItem : Effect4.Program.Authoring.Env} {path : List Nat}\n          {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val} {before after : Effect4.Program.Authoring.Names},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Eq env.names\n                    (instHAppendOfAppend.hAppend before\n                      (List.cons (outerItem.mint \"answer\") after)) →\n                  (∀ (name : String),\n                      List.instMembership.mem after name → Ne name (outerItem.mint \"answer\")) →\n                    Eq (List.instGetElem?NatLtLength.getElem? captured (List.length before))\n                        (Option.some (Effect4.Pool.Model.itemVal res it)) →\n                      Eq (List.instGetElem?NatLtLength.getElem? tys (List.length before))\n                          (Option.some (Effect4.Pool.itemTy A)) →\n                        ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                          Eq (Effect4.Machine.refPeek stores.refs q)\n                              (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                            Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                (Effect4.Pool.cellTy A) →\n                              Exists fun f =>\n                                And\n                                  (Eq\n                                    (Effect4.Pool.returnStep\n                                      (Effect4.Program.Authoring.field\n                                        (Effect4.Program.Authoring.minted (outerItem.mint \"answer\"))\n                                        \"stamp\")\n                                      (Effect4.Program.Authoring.field\n                                        (Effect4.Program.Authoring.minted (outerItem.mint \"answer\"))\n                                        \"lease\")\n                                      (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                    (Except.ok f))\n                                  (And\n                                    (Eq\n                                      (Effect4.Machine.syncOpStep\n                                        (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                      (Option.some\n                                        {\n                                          fst :=\n                                            {\n                                              refs :=\n                                                Effect4.Machine.refPoke stores.refs q\n                                                  (Effect4.Pool.Model.cellVal tb res\n                                                    (Effect4.Pool.Model.giveBack s it.stamp\n                                                        it.lease).fst),\n                                              deferreds := stores.deferreds,\n                                              scopes := stores.scopes, memo := stores.memo,\n                                              timers := stores.timers, nextName := stores.nextName,\n                                              externals := stores.externals },\n                                          snd :=\n                                            Effect4.Pool.Model.returnReplyVal\n                                              (Effect4.Pool.Model.giveBack s it.stamp\n                                                  it.lease).snd }))\n                                    (And\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Pool.Model.returnReplyVal\n                                          (Effect4.Pool.Model.giveBack s it.stamp it.lease).snd)\n                                        Effect4.Pool.Model.returnReplyTy)\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Pool.Model.cellVal tb res\n                                          (Effect4.Pool.Model.giveBack s it.stamp it.lease).fst)\n                                        (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":541,"lemmas":64,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.selectStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.selectStep_agrees"]},"doc":"**The selection of a wake is the model's `select`.** The count is a caller's term of the\nstep, read at the row's scope alone: the step folds nothing. The store step answers the\nselected waiters' records through the table, in order, and it writes the model's next state. A\nselection reserves nothing: only the waiters change (`select_takes_first`). ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.select_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (count : Nat)\n          {countSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Effect4.Modules.Reads countSrc (env.push (List.cons (env.mint \"current\") List.nil))\n                    path\n                    (instHAppendOfAppend.hAppend captured\n                      (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                    (Effect4.Store.Val.nat count) →\n                  Effect4.Modules.TypesEach sig countSrc\n                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                      (instHAppendOfAppend.hAppend tys (List.cons (Effect4.Pool.cellTy A) List.nil))\n                      Effect4.Program.Ty.nat →\n                    ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                      Eq (Effect4.Machine.refPeek stores.refs q)\n                          (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                        Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                            (Effect4.Pool.cellTy A) →\n                          Exists fun f =>\n                            And\n                              (Eq\n                                (Effect4.Pool.selectStep countSrc\n                                  (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                (Except.ok f))\n                              (And\n                                (Eq\n                                  (Effect4.Machine.syncOpStep\n                                    (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                  (Option.some\n                                    {\n                                      fst :=\n                                        {\n                                          refs :=\n                                            Effect4.Machine.refPoke stores.refs q\n                                              (Effect4.Pool.Model.cellVal tb res\n                                                (Effect4.Pool.Model.select s count).fst),\n                                          deferreds := stores.deferreds, scopes := stores.scopes,\n                                          memo := stores.memo, timers := stores.timers,\n                                          nextName := stores.nextName,\n                                          externals := stores.externals },\n                                      snd :=\n                                        Effect4.Pool.Model.selectReplyVal tb\n                                          (Effect4.Pool.Model.select s count).snd }))\n                                (And\n                                  (Effect4.Program.Typed.Fits w\n                                    (Effect4.Pool.Model.selectReplyVal tb\n                                      (Effect4.Pool.Model.select s count).snd)\n                                    Effect4.Pool.Model.selectReplyTy)\n                                  (Effect4.Program.Typed.Fits w\n                                    (Effect4.Pool.Model.cellVal tb res\n                                      (Effect4.Pool.Model.select s count).fst)\n                                    (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":551,"lemmas":275,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Program.optionTy_option","Effect4.Pool.Model.selectStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Pool.Model.returnStep_types","Effect4.Pool.Model.withdrawStep_types","Effect4.Pool.Model.leaseStep_types","Effect4.Modules.waitRetryAt_answers","Effect4.Modules.protectedBy_has"]},"doc":"**`Pool.use` is typed at every scope**, for a body of one effect type at every kept reader\nof a resource and at every scope that the surface's binders reach. It keeps the body's answer,\nits failure type in normal form and its requirement: the lease and the return add no failure and\nno requirement. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.use_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty},\n  Effect4.Pool.Model.ResourceTy A →\n    ∀ {pool : Effect4.Program.Authoring.TermSrc}\n      {body :\n        Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n      {s : Effect4.Modules.TypedScope} {b : Effect4.Program.EffTy},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) pool s\n          (Effect4.Pool.cellTy A).refOf →\n        (∀ (t : Effect4.Modules.TypedScope) (r : Effect4.Program.Authoring.TermSrc),\n            s.Reaches t →\n              Effect4.Modules.Kept (Effect4.Program.nativeSignature table) r t A →\n                Effect4.Modules.Has (Effect4.Program.nativeSignature table) (body r) t b) →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table) (Effect4.Pool.use A pool body)\n            s { answer := b.answer, error := b.error.normalize, requires := b.requires }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":553,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Pool.Model.withdrawStep_types","Effect4.Modules.step_updates","Effect4.Pool.Model.withdrawStep_agrees"]},"doc":"**The withdrawal of a request is the model's `withdraw`.** The store step answers nothing,\nand it writes the model's next state: the request's entry leaves, and no other field changes.\nThe table does not change. A borrower's withdrawal and the closer's are this one statement. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.withdraw_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat),\n          tb.Injective →\n            ∀ {idSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n              {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Effect4.Modules.Captured idSrc\n                        (env.push (List.cons (env.mint \"current\") List.nil)) path\n                        (instHAppendOfAppend.hAppend captured\n                          (List.cons (Effect4.Pool.Model.cellVal tb res s) List.nil))\n                        (Effect4.Machine.Val.promise (tb.handle id)) →\n                      Effect4.Modules.CapturedTy sig idSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend tys\n                            (List.cons (Effect4.Pool.cellTy A) List.nil))\n                          Effect4.Modules.idTy →\n                        ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                          Eq (Effect4.Machine.refPeek stores.refs q)\n                              (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                            Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                (Effect4.Pool.cellTy A) →\n                              Exists fun f =>\n                                And\n                                  (Eq\n                                    (Effect4.Pool.withdrawStep idSrc\n                                      (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                    (Except.ok f))\n                                  (And\n                                    (Eq\n                                      (Effect4.Machine.syncOpStep\n                                        (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                      (Option.some\n                                        {\n                                          fst :=\n                                            {\n                                              refs :=\n                                                Effect4.Machine.refPoke stores.refs q\n                                                  (Effect4.Pool.Model.cellVal tb res\n                                                    (Effect4.Pool.Model.withdraw s id)),\n                                              deferreds := stores.deferreds,\n                                              scopes := stores.scopes, memo := stores.memo,\n                                              timers := stores.timers, nextName := stores.nextName,\n                                              externals := stores.externals },\n                                          snd := Effect4.Store.Val.unit }))\n                                    (And\n                                      (Effect4.Program.Typed.Fits w Effect4.Store.Val.unit\n                                        Effect4.Program.Ty.unit)\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Pool.Model.cellVal tb res\n                                          (Effect4.Pool.Model.withdraw s id))\n                                        (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":76,"nearest":["Effect4.Pool.withdraw_attempt"]},"doc":"**The withdrawal of a request at the operation's own binders.** The identity is a name that\n`bindWith` mints. The scope binds it, and no later binder shadows it. ","kind":"theorem","module":"Effect4.Laws.Library.Pool.Ops","name":"Effect4.Pool.withdraw_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {A : Effect4.Program.Ty},\n      Eq A.normalize A →\n        ∀ (tb : Effect4.Modules.Table) (res : Nat → Effect4.Machine.Val)\n          (s : Effect4.Pool.Model.State) (id : Nat),\n          tb.Injective →\n            ∀ {env outerId : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val}\n              {beforeId afterId : Effect4.Program.Authoring.Names},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    Eq env.names\n                        (instHAppendOfAppend.hAppend beforeId\n                          (List.cons (outerId.mint \"answer\") afterId)) →\n                      (∀ (name : String),\n                          List.instMembership.mem afterId name → Ne name (outerId.mint \"answer\")) →\n                        Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                            (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                          Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                              (Option.some Effect4.Modules.idTy) →\n                            ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                              Eq (Effect4.Machine.refPeek stores.refs q)\n                                  (Option.some (Effect4.Pool.Model.cellVal tb res s)) →\n                                Effect4.Program.Typed.Fits w (Effect4.Pool.Model.cellVal tb res s)\n                                    (Effect4.Pool.cellTy A) →\n                                  Exists fun f =>\n                                    And\n                                      (Eq\n                                        (Effect4.Pool.withdrawStep\n                                          (Effect4.Program.Authoring.minted (outerId.mint \"answer\"))\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Eq\n                                          (Effect4.Machine.syncOpStep\n                                            (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                          (Option.some\n                                            {\n                                              fst :=\n                                                {\n                                                  refs :=\n                                                    Effect4.Machine.refPoke stores.refs q\n                                                      (Effect4.Pool.Model.cellVal tb res\n                                                        (Effect4.Pool.Model.withdraw s id)),\n                                                  deferreds := stores.deferreds,\n                                                  scopes := stores.scopes, memo := stores.memo,\n                                                  timers := stores.timers,\n                                                  nextName := stores.nextName,\n                                                  externals := stores.externals },\n                                              snd := Effect4.Store.Val.unit }))\n                                        (And\n                                          (Effect4.Program.Typed.Fits w Effect4.Store.Val.unit\n                                            Effect4.Program.Ty.unit)\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Pool.Model.cellVal tb res\n                                              (Effect4.Pool.Model.withdraw s id))\n                                            (Effect4.Pool.cellTy A))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":454,"lemmas":56,"nearest":["Effect4.Program.typeOfProgram_closed_app"]},"doc":"**An admitted program has closed types**, with no premise: its certificate holds the formed\ninput and the whole-program checker's answer. The claim `checked-types-closed` at program\nadmission. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.AdmittedProgram.closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (admitted : Effect4.Program.AdmittedProgram program app),\n  And (Eq admitted.ty.answer.closed Bool.true) (Eq admitted.ty.error.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":715,"lemmas":91,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The sequence arm: a cut of either part cuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_bind","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {a b : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k a →\n    Effect4.Program.Agreement.CompilesBO host root k b →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.bind a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":715,"lemmas":91,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The handler arm: a cut of the body or the handler\ncuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_catchCause","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {b h : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k b →\n    Effect4.Program.Agreement.CompilesBO host root k h →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.catchCause b h)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":715,"lemmas":90,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The typed-failure handler arm; a cut of the body or the handler cuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_catchIf","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {test : Effect4.Program.Term}\n  {b h : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k b →\n    Effect4.Program.Agreement.CompilesBO host root k h →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.catchIf test b h)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":798,"lemmas":116,"nearest":["Effect4.Program.Denote.denoteRowsB_straight","Effect4.Program.Node.at_append"]},"doc":"The reified exit arm: its fold case through `straight_of_asExit`; a cut of the body cuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_exit","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {b : Effect4.Program.NativeEff},\n  Eq (Effect4.Program.Denote.LoopedDataRows table b) Bool.true →\n    Effect4.Program.Agreement.CompilesBO host root k b →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.exit b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":718,"lemmas":112,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The loop arm: `localRun_compileB`'s `.iterate` arm and `loop_reaches` (`Agreement/Loop.lean`)\nunder a host. A body's wait or cut ends the loop with it; the budget's last test is at least `k`\nsteps in. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_iterate","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {cty : Option Effect4.Program.Ty}\n  {init test step result : Effect4.Program.Term} {body : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k body →\n    Effect4.Program.Agreement.CompilesBO host root k\n      (Effect4.Program.Eff.iterate cty init test step result body)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":715,"lemmas":91,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The two-way handler arm; a cut of the body or either arm cuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_matchCause","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {b v c : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k b →\n    Effect4.Program.Agreement.CompilesBO host root k v →\n      Effect4.Program.Agreement.CompilesBO host root k c →\n        Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.matchCause b v c)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":716,"lemmas":99,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The finalizer arm: a cut of the body cuts the whole\nbefore the finalizer starts, and a cut of the finalizer cuts the whole. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_onExit","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {b f : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k b →\n    Effect4.Program.Agreement.CompilesBO host root k f →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.onExit b f)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":714,"lemmas":86,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The decision arm: the chosen branch's outcome. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_select","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {t : Effect4.Program.Term}\n  {d : Effect4.Program.Decision} {a b : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k a →\n    Effect4.Program.Agreement.CompilesBO host root k b →\n      Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.select t d a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":714,"lemmas":82,"nearest":["Effect4.Program.Node.at_append"]},"doc":"The suspension arm: a cut passes through. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.compilesBO_suspend","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) {b : Effect4.Program.NativeEff},\n  Effect4.Program.Agreement.CompilesBO host root k b →\n    Effect4.Program.Agreement.CompilesBO host root k (Effect4.Program.Eff.suspend b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":790,"lemmas":67,"nearest":["Effect4.Program.Agreement.localRunC_compileBO"]},"doc":"**The forward agreement on loops** (Q5): a program of the row fragment with loops, compiled at\nan address of the root, runs with calls where its budgeted meaning goes at any budget, from any\nouter stack, or diverges at the compile's frontier; at a budget cut the run is still going after\nthe budget's count of steps. The detailed agreement's projection (`RunsToDO.project`).\n`localRunC_compile` is its straight instance, `localRun_compileB` its host-free one. A step of\n`h8_loopedRows`, `denoteRowsB_eq_session_host` and `localRunC_compile`. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.localRunC_compileB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) (e : Effect4.Program.NativeEff)\n  (p : Effect4.Program.Point) (K : List Effect4.Program.NCode) (i : Bool)\n  (s : Effect4.Machine.Stores) (r : σ),\n  Eq (Effect4.Program.Denote.LoopedDataRows table e) Bool.true →\n    Eq ((Effect4.Program.Node.eff root).at_ p.path) (Option.some (Effect4.Program.Node.eff e)) →\n      Effect4.Program.Agreement.RunsToDB host root K i k\n        (Effect4.Program.Agreement.fiberOf (Effect4.Program.compileEff e p) K i) s r\n        (Effect4.Program.Denote.hostRunB host k e p.env s r)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":802,"lemmas":116,"nearest":["Effect4.Program.Agreement.compilesBO_onExit","Effect4.Program.Agreement.compilesBO_matchCause","Effect4.Program.Agreement.compilesBO_catchIf","Effect4.Program.Agreement.compilesBO_catchCause","Effect4.Program.Agreement.compilesBO_select","Effect4.Program.Agreement.compilesBO_bind","Effect4.Program.Agreement.compilesBO_iterate","Effect4.Program.Agreement.compilesBO_exit","Effect4.Program.Agreement.compilesBO_suspend","Effect4.Program.Denote.denoteRowsB_straight","Effect4.Program.Denote.denoteRows_straight"]},"doc":"**The forward agreement on loops, detailed** (the core of Q6b): a program of the row fragment\nwith loops, compiled at an address of the root, runs with calls where its detailed budgeted run\ngoes, at any budget and from any outer stack: to its exit, past the budget's count of steps at a\ncut, or to a host call with the run's row and request, at its stores and host state, which the\nhost does not answer; or it diverges at the compile's frontier. `localRunC_compileB` is its\nprojection. A step of `localWaitC_to_rowsB` (Q6b, `Agreement/HostedLoop.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.LoopCalls","name":"Effect4.Program.Agreement.localRunC_compileBO","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff) (k : Nat) (e : Effect4.Program.NativeEff)\n  (p : Effect4.Program.Point) (K : List Effect4.Program.NCode) (i : Bool)\n  (s : Effect4.Machine.Stores) (r : σ),\n  Eq (Effect4.Program.Denote.LoopedDataRows table e) Bool.true →\n    Eq ((Effect4.Program.Node.eff root).at_ p.path) (Option.some (Effect4.Program.Node.eff e)) →\n      Effect4.Program.Agreement.RunsToDO host root K i k\n        (Effect4.Program.Agreement.fiberOf (Effect4.Program.compileEff e p) K i) s r\n        (Effect4.Program.Denote.runRowsO host (Effect4.Program.Denote.denoteRowsB table k e p.env) s\n          r)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":792,"lemmas":75,"nearest":["Effect4.Program.Agreement.localRunC_compileB"]},"doc":"**The reverse agreement on loops** (Q6a): a local run with calls that exits from the root's\nstart within `c` steps is the finished approximant at budget `c`, with the same exit, stores and\nhost state. Q5 at budget `c`: a wait or a divergence never exits, a cut is still going after `c`\nsteps, so the approximant finishes, and the run is deterministic (`localRunC_agree`). A step of\n`h8_loopedRows` and `denoteRowsB_eq_session_host`, through `hostRunB_exits`. It says nothing of\na waiting run (Q6b). ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.HostedLoop","name":"Effect4.Program.Agreement.localRunC_to_rowsB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff),\n  Eq (Effect4.Program.Denote.LoopedDataRows table root) Bool.true →\n    ∀ (cf : Nat) (R : σ) {c : Nat} {ex : Effect4.Machine.ExitV} {s' : Effect4.Machine.Stores}\n      {r' : σ},\n      Eq\n          (Effect4.Program.Agreement.localRunC host root c\n            (Effect4.Program.Agreement.fiberOf (Effect4.Program.compile root cf) List.nil)\n            Effect4.Machine.Stores.empty R)\n          (Option.some (Effect4.Program.Agreement.RunEnd.exit ex s' r')) →\n        Exists fun k =>\n          Eq (Effect4.Program.Denote.hostRunB host k root List.nil Effect4.Machine.Stores.empty R)\n            (Option.some { fst := Option.some ex, snd := { fst := s', snd := r' } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":792,"lemmas":77,"nearest":["Effect4.Program.Agreement.localRunC_compileBO"]},"doc":"**The detailed meaning waits where the local run waits** (Q6b): a local run with calls that\nreaches, from the root's start, a host call the host does not answer, at stores `s` and host\nstate `st`, has past a budget bound the detailed budgeted run waiting at that call's row and\nrequest, with those stores and that host state. Past the wait's step count the detailed forward\nagreement (`localRunC_compileBO`) leaves only a wait, and the local run's determinism fixes its\ndata (`RunEnd.waits`, `localRunC_agree`). Concept `translation-simulation`, claim\n`rows-loop-frontier`, role adequacy; requirements R6 and R12. Consumer: `rows_loop_frontier`\n(`Laws/Api/SessionMeaningLoop.lean`). It says nothing of a host's answer after the wait, nor of\nany budget below the bound. ","kind":"theorem","module":"Effect4.Laws.Program.Agreement.HostedLoop","name":"Effect4.Program.Agreement.localWaitC_to_rowsB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {σ : Type}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (root : Effect4.Program.NativeEff),\n  Eq (Effect4.Program.Denote.LoopedDataRows table root) Bool.true →\n    ∀ (cf : Nat) (R st : σ) {fr : Effect4.Program.Agreement.NFiber} {s : Effect4.Machine.Stores},\n      Effect4.Program.Agreement.Leads host root\n          (Effect4.Program.Agreement.Pos.live\n            (Effect4.Program.Agreement.fiberOf (Effect4.Program.compile root cf) List.nil)\n            Effect4.Machine.Stores.empty)\n          R (Effect4.Program.Agreement.Pos.live fr s) st →\n        Eq (Effect4.Program.Agreement.IsCall fr.current) Bool.true →\n          Eq (Effect4.Program.Agreement.hostAnswer host fr.current st) Option.none →\n            ∀ {row : Nat} {request : Effect4.Machine.Val},\n              Eq (Effect4.Program.Agreement.callOf fr.current)\n                  (Option.some { fst := row, snd := request }) →\n                Exists fun lower =>\n                  ∀ (k : Nat),\n                    instLENat.le lower k →\n                      Eq\n                        (Effect4.Program.Denote.runRowsO host\n                          (Effect4.Program.Denote.denoteRowsB table k root List.nil)\n                          Effect4.Machine.Stores.empty R)\n                        (Effect4.Program.Denote.RowsEnd.waiting row request s st)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkAction_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (a : Effect4.Program.ActionTerm Op)\n  (env : Effect4.Program.TyEnv) (p : List Nat),\n  Eq (Effect4.Program.Annotate.checkAction s env p a)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env env))\n          (Effect4.Program.Node.action a) p,\n      snd := Effect4.Program.Checker.checkAction s env p a }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a spine of programs at its slots: a race's entrants, and an\ninvocation's programs at their parameters (decisions row 340). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkEffs_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (es : Effect4.Program.Effs Op)\n  (env : Effect4.Program.TyEnv) (p : List Nat) (qs : List Effect4.Program.ParamDecl),\n  Eq (Effect4.Program.Annotate.checkEffs s env p qs es)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.spine env qs))\n          (Effect4.Program.Node.effs es) p,\n      snd := Effect4.Program.Checker.checkEffs s env p qs es }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a layer, which is typed closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkLayer_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (l : Effect4.Program.LayerTerm Op) (p : List Nat),\n  Eq (Effect4.Program.Annotate.checkLayer s p l)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some Effect4.Program.NodeEnv.closed)\n          (Effect4.Program.Node.layer l) p,\n      snd := Effect4.Program.Checker.checkLayer s p l }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkLayers_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ls : Effect4.Program.LayerTerms Op)\n  (p : List Nat),\n  Eq (Effect4.Program.Annotate.checkLayers s p ls)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some Effect4.Program.NodeEnv.closed)\n          (Effect4.Program.Node.layers ls) p,\n      snd := Effect4.Program.Checker.checkLayers s p ls }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkStmt_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (st : Effect4.Program.Stmt Op)\n  (env : Effect4.Program.TyEnv) (inLoop : Bool) (p : List Nat),\n  Eq (Effect4.Program.Annotate.checkStmt s env inLoop p st)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.body env inLoop))\n          (Effect4.Program.Node.stmt st) p,\n      snd := Effect4.Program.Checker.checkStmt s env inLoop p st }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"`Annotate.check_eq` at a statement list, at every `afterRet`: the entries do not read it.\nThe statements after a head read its type only after a `bindYield`; after every other head\nthey stand at the head's environment, whether the checker reaches them or not. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.checkStmts_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ss : Effect4.Program.Stmts Op)\n  (env : Effect4.Program.TyEnv) (inLoop : Bool) (afterRet : Option (List Nat)) (p : List Nat),\n  Eq (Effect4.Program.Annotate.checkStmts s env inLoop afterRet p ss)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.body env inLoop))\n          (Effect4.Program.Node.stmts ss) p,\n      snd := Effect4.Program.Checker.checkStmts s env inLoop afterRet p ss }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":370,"lemmas":89,"nearest":[]},"doc":"**The annotating algebra agrees with itself across an extension**, on the read guard of the\nsmaller signature: at a leaf it is the checker's answer, whose algebra agrees\n(`check_alg_agreeOn`), and every other field reads the signature only through the terms' checker\n(`term?_ext`). A step of `omit-splices-table`. Its consumer is `Annotate.check_restrict`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.Annotate.check_alg_agreeOn","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    (Effect4.Program.Annotate.check.alg s').AgreeOn (Effect4.Program.Annotate.check.alg s)\n      (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s) (Effect4.Program.SigOkDef s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":307,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons","Effect4.Program.tableAt_none","Effect4.Program.Checker.checkStmt_step_binds","Effect4.Program.effTy_of_check","Effect4.Program.termTy_of_term?"]},"doc":"**The traversal at a program is the table at it, with the checker's answer.** At every\nenvironment and every path. The cases are the traversal's arms, in its order. A step of\n`annotate-table`. Its consumer is `annotate_eq_table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Annotate.check_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (env : Effect4.Program.TyEnv) (p : List Nat),\n  Eq (Effect4.Program.Annotate.check s env p e)\n    {\n      fst :=\n        Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env env))\n          (Effect4.Program.Node.eff e) p,\n      snd := Effect4.Program.Checker.check s env p e }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":373,"lemmas":55,"nearest":["Effect4.Program.Annotate.check_alg_agreeOn","Effect4.Program.cata_eff_congr_on","Effect4.Program.hom_eq_cata_eff"]},"doc":"**The annotating traversal answers the same at an extension**, on a program that reads only\nthe smaller signature. The fold congruence at `Annotate.check_alg_agreeOn`. A step of\n`omit-splices-table`. Its consumers are `Table.bodies_restrict` and `annotateModule_restrict`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.Annotate.check_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {e : Effect4.Program.Eff Op},\n      Effect4.Program.SigProgram s e →\n        ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n          Eq (Effect4.Program.Annotate.check s' env p e) (Effect4.Program.Annotate.check s env p e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":10,"lemmas":7,"nearest":[]},"doc":"An ascription is scoped where its term is: the declared type introduces no variable. ","kind":"theorem","module":"Effect4.Laws.Program.Authoring.Ascribe","name":"Effect4.Program.Authoring.ascribe_scoped","placement":{"concept":"initial-algebras-folds","requirement":"R4"},"restsOn":[],"statement":"∀ (ty : Effect4.Program.Ty) {e : Effect4.Program.Authoring.TermSrc},\n  e.Scoped → (Effect4.Program.Authoring.ascribe ty e).Scoped","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":127,"lemmas":52,"nearest":[]},"doc":"**A typed spine of bodies holds a typed body at every address of a program inside it**: the\nbody that `Part.bodyAt` answers is typed at the block's signature and its declared request, and\nit holds the node. A step of `block-call-instance`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.BodiesHasTy.bodyAt","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {path : List Nat} {q : Effect4.Program.Eff Op},\n  Effect4.Program.BodiesHasTy sig decls bodies →\n    Eq ((Effect4.Program.Node.effs bodies).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun part =>\n        Exists fun rest =>\n          Exists fun T =>\n            And\n              (Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n                (Option.some { fst := part, snd := rest }))\n              (And (Conform.Effect4.Typing.HasTy part.sig part.env part.program T)\n                (Eq ((Effect4.Program.Node.eff part.program).at_ rest)\n                  (Option.some (Effect4.Program.Node.eff q))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":125,"lemmas":52,"nearest":[]},"doc":"**A typed spine's body is typed**: the part that `Part.bodyAt` answers has a type at the\nblock's signature and its declared request. A step of `moduleHasTy_partAt_typed`, toward the\nproposed claim `module-address-table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.BodiesHasTy.bodyAt_typed","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {part : Effect4.Program.Part Op}\n  {rest : List Nat} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {path : List Nat},\n  Effect4.Program.BodiesHasTy sig decls bodies →\n    Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n        (Option.some { fst := part, snd := rest }) →\n      Exists fun t => Conform.Effect4.Typing.HasTy part.sig part.env part.program t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":302,"lemmas":73,"nearest":["Effect4.Program.hasTy_replace_focusAt","Effect4.Program.focusAt_typed","Effect4.Program.Node.replaceAt_eff"]},"doc":"**A typed spine of bodies takes a filling at the focus of a body**: the filling, typed at the\nfocus's type in the focus's environment at the signature of its part in the extended spine (the\nextended block's signature and the body's parameters, decisions row 340), replaces the body's\nsub-program, and the spine stays typed under the extension. Each body keeps its own type, so\nits declaration still admits it. A step of `moduleHasTy_replace_programFocusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.BodiesHasTy.replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig sig' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends sig sig' →\n    ∀ {q' : Effect4.Program.Eff Op} {part part' : Effect4.Program.Part Op} {rest rest' : List Nat}\n      {f : Effect4.Program.Focus Op} {decls : List Effect4.Program.DefDecl}\n      {bodies : Effect4.Program.Effs Op} {path : List Nat},\n      Effect4.Program.BodiesHasTy sig decls bodies →\n        Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n            (Option.some { fst := part, snd := rest }) →\n          Eq (Effect4.Program.focusAt part.sig part.env part.program rest) (Option.some f) →\n            Eq (Effect4.Program.Part.bodyAt sig' decls bodies path)\n                (Option.some { fst := part', snd := rest' }) →\n              Conform.Effect4.Typing.HasTy part'.sig f.env q' f.ty →\n                Exists fun bodies' =>\n                  And\n                    (Eq\n                      ((Effect4.Program.Node.effs bodies).replaceAt path\n                        (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.effs bodies')))\n                    (Effect4.Program.BodiesHasTy sig' decls bodies')","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":57,"lemmas":25,"nearest":["Effect4.Program.Bounds.noApp_args"]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.TemplateOK.args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK t →\n    Eq t.isMember Bool.true →\n      ∀ (p : Prod Effect4.Program.Ty.Variance Effect4.Program.Ty),\n        List.instMembership.mem t.args p → Effect4.Program.Bounds.TemplateOK p.snd","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":19,"lemmas":5,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.TemplateOK.head","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK t →\n    Eq t.closed Bool.false →\n      (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n        And (∀ (a b : Effect4.Program.Ty), Ne t (a.union b))\n          (And (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts))\n            (And (Ne t.args List.nil) (Eq t.isMember Bool.true)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":72,"nearest":["Effect4.Program.Bounds.mem_zip_map_right","Effect4.Program.Bounds.instance_shape"]},"doc":"It is a step of `matchB_complete`, and `covers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.above_args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (σ : Effect4.Program.Bounds.Subst) {t r : Effect4.Program.Ty},\n  t.Normal →\n    (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n      (∀ (a b : Effect4.Program.Ty), Ne t (a.union b)) →\n        (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts)) →\n          (∀ (a b : Effect4.Program.Ty), Ne t (a.prod b)) →\n            Ne t.args List.nil →\n              Eq r.isMember Bool.true →\n                Eq (t.sameHead r) Bool.true →\n                  (∀\n                      (p :\n                        Prod (Prod Effect4.Program.Ty.Variance Effect4.Program.Ty)\n                          (Prod Effect4.Program.Ty.Variance Effect4.Program.Ty)),\n                      List.instMembership.mem (t.args.zip r.args) p →\n                        Eq\n                          (Effect4.Program.Ty.Variance.holds Effect4.Program.Ty.sub p.fst.fst\n                            p.snd.snd (Effect4.Program.Ty.instantiate σ p.fst.snd).normalize)\n                          Bool.true) →\n                    Eq (r.sub (Effect4.Program.Ty.instantiate σ t).normalize) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":161,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `covers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.above_prod","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (σ : Effect4.Program.Bounds.Subst) {a b r1 r2 : Effect4.Program.Ty},\n  (r1.prod r2).Normal →\n    Eq (r1.sub (Effect4.Program.Ty.instantiate σ a).normalize) Bool.true →\n      Eq (r2.sub (Effect4.Program.Ty.instantiate σ b).normalize) Bool.true →\n        Eq ((r1.prod r2).sub (Effect4.Program.Ty.instantiate σ (a.prod b)).normalize) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":["Effect4.Program.Ty.normalize_idem"]},"doc":"It is a step of `matchArgsN_complete`, and `matchArgsN_complete` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.admits_normalize","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {τ : Effect4.Program.Bounds.Subst} {ps rs : List Effect4.Program.Ty},\n  Effect4.Program.Bounds.Admits τ ps rs →\n    Effect4.Program.Bounds.Admits τ ps (List.map Effect4.Program.Ty.normalize rs)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":85,"lemmas":194,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.below_args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ : Effect4.Program.Bounds.Subst) {t r : Effect4.Program.Ty},\n  t.Normal →\n    (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n      (∀ (a b : Effect4.Program.Ty), Ne t (a.union b)) →\n        (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts)) →\n          Ne t.args List.nil →\n            r.Normal →\n              Eq r.isMember Bool.true →\n                Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n                  And (Eq (t.sameHead r) Bool.true)\n                    (∀\n                      (p :\n                        Prod (Prod Effect4.Program.Ty.Variance Effect4.Program.Ty)\n                          (Prod Effect4.Program.Ty.Variance Effect4.Program.Ty)),\n                      List.instMembership.mem (t.args.zip r.args) p →\n                        And p.snd.snd.Normal\n                          (And\n                            (Eq p.fst.fst Effect4.Program.Ty.Variance.inv →\n                              Eq p.snd.snd (Effect4.Program.Ty.instantiate τ p.fst.snd).normalize)\n                            (Eq\n                              (p.snd.snd.sub (Effect4.Program.Ty.instantiate τ p.fst.snd).normalize)\n                              Bool.true)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_args` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.candsFields_eq","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance)\n  (L fs gs : List (Prod String (Prod Bool Effect4.Program.Ty))),\n  Eq fs.length gs.length →\n    (∀\n        (p :\n          Prod (Prod String (Prod Bool Effect4.Program.Ty))\n            (Prod String (Prod Bool Effect4.Program.Ty))),\n        List.instMembership.mem (fs.zip gs) p →\n          Eq (List.lookup p.snd.fst L) (Option.some p.fst.snd)) →\n      Eq (Effect4.Program.Bounds.candsFields v L gs)\n        (List.flatMap (fun p => Effect4.Program.Bounds.cands v p.fst.snd.snd p.snd.snd.snd)\n          (fs.zip gs))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_args` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.candsItems_eq","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance) (ts rs : List Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.candsItems v ts rs)\n    (List.flatMap (fun p => Effect4.Program.Bounds.cands v p.fst p.snd) (ts.zip rs))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":62,"nearest":["Effect4.Program.Bounds.cands_below"]},"doc":"It is a step of `matchArgsB_least`, and `matchArgsB_least` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.candsList_below","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ : Effect4.Program.Bounds.Subst) {ps rs : List Effect4.Program.Ty},\n  (∀ (p : Effect4.Program.Ty), List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n    (∀ (r : Effect4.Program.Ty), List.instMembership.mem rs r → r.Normal) →\n      Effect4.Program.Bounds.Admits τ ps rs →\n        ∀ (c : Effect4.Program.Bounds.Cand),\n          List.instMembership.mem (Effect4.Program.Bounds.candsList ps rs) c →\n            And (Ne c.snd.fst Effect4.Program.Ty.Variance.contra)\n              (And c.snd.snd.Normal\n                (Eq\n                  (c.snd.snd.sub\n                    (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var c.fst)).normalize)\n                  Bool.true))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchArgsB_least`, and `candsList_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.candsList_cons","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (p : Effect4.Program.Ty) (ps : List Effect4.Program.Ty) (r : Effect4.Program.Ty)\n  (rs : List Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.candsList (List.cons p ps) (List.cons r rs))\n    (instHAppendOfAppend.hAppend (Effect4.Program.Bounds.cands Effect4.Program.Ty.Variance.co p r)\n      (Effect4.Program.Bounds.candsList ps rs))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchArgsB_one_var`, and `matchArgsB_one_var` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.candsList_nil","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"Eq (Effect4.Program.Bounds.candsList List.nil List.nil) List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":39,"lemmas":21,"nearest":["Effect4.Program.Bounds.candsItems_eq","Effect4.Program.Bounds.candsFields_eq","Effect4.Program.Bounds.comp_inv","Effect4.Program.Bounds.comp_co"]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.cands_args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance) {t r : Effect4.Program.Ty},\n  (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n    (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts)) →\n      Eq t.headCanon Bool.true →\n        Eq r.headCanon Bool.true →\n          Eq (t.sameHead r) Bool.true →\n            Eq (Effect4.Program.Bounds.cands v t r)\n              (List.flatMap\n                (fun p =>\n                  Effect4.Program.Bounds.cands (Effect4.Program.Bounds.comp v p.fst.fst) p.fst.snd\n                    p.snd.snd)\n                (t.args.zip r.args))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":86,"lemmas":122,"nearest":["Effect4.Program.Bounds.TemplateOK.args","Effect4.Program.Bounds.comp_ne_contra","Effect4.Program.Bounds.cands_args","Effect4.Program.Bounds.below_args","Effect4.Program.Bounds.cands_union_right","Effect4.Program.Bounds.cands_mem_members","Effect4.Program.Bounds.TemplateOK.head","Effect4.Program.Bounds.cands_var"]},"doc":"It is a step of `matchB_least`, and `matchB_least_step` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.cands_below","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ : Effect4.Program.Bounds.Subst) (n : Nat) (r t : Effect4.Program.Ty)\n  (v : Effect4.Program.Bounds.Variance),\n  instLTNat.lt (Effect4.Program.Ty._sizeOf_inst.sizeOf r) n →\n    Ne v Effect4.Program.Ty.Variance.contra →\n      Effect4.Program.Bounds.TemplateOK t →\n        r.Normal →\n          Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n            ∀ (c : Effect4.Program.Bounds.Cand),\n              List.instMembership.mem (Effect4.Program.Bounds.cands v t r) c →\n                And (Ne c.snd.fst Effect4.Program.Ty.Variance.contra)\n                  (And c.snd.snd.Normal\n                    (Eq\n                      (c.snd.snd.sub\n                        (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var c.fst)).normalize)\n                      Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":13,"lemmas":1,"nearest":["Effect4.Program.Bounds.cands_union_right"]},"doc":"It is a step of `matchB_complete`, and `recovers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.cands_mem_members","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance) {t : Effect4.Program.Ty},\n  (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n    (∀ (a b : Effect4.Program.Ty), Ne t (a.union b)) →\n      ∀ (r : Effect4.Program.Ty) (c : Effect4.Program.Bounds.Cand),\n        Iff (List.instMembership.mem (Effect4.Program.Bounds.cands v t r) c)\n          (Exists fun x =>\n            And (List.instMembership.mem r.members x)\n              (List.instMembership.mem (Effect4.Program.Bounds.cands v t x) c))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":16,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.cands_union_right","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance) {t : Effect4.Program.Ty},\n  (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n    (∀ (a b : Effect4.Program.Ty), Ne t (a.union b)) →\n      ∀ (c d : Effect4.Program.Ty),\n        Eq (Effect4.Program.Bounds.cands v t (c.union d))\n          (instHAppendOfAppend.hAppend (Effect4.Program.Bounds.cands v t c)\n            (Effect4.Program.Bounds.cands v t d))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":16,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.cands_var","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance) (i : Nat) (r : Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.cands v (Effect4.Program.Ty.var i) r)\n    (List.cons { fst := i, snd := { fst := v, snd := r } } List.nil)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.comp_co","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance),\n  Eq (Effect4.Program.Bounds.comp v Effect4.Program.Ty.Variance.co) v","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.comp_inv","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Bounds.Variance),\n  Eq (Effect4.Program.Bounds.comp v Effect4.Program.Ty.Variance.inv) Effect4.Program.Ty.Variance.inv","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Program.Bounds.comp_inv","Effect4.Program.Bounds.comp_co"]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.comp_ne_contra","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {v w : Effect4.Program.Bounds.Variance},\n  Ne v Effect4.Program.Ty.Variance.contra →\n    Or (Eq w Effect4.Program.Ty.Variance.co) (Eq w Effect4.Program.Ty.Variance.inv) →\n      Ne (Effect4.Program.Bounds.comp v w) Effect4.Program.Ty.Variance.contra","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":93,"lemmas":180,"nearest":["Effect4.Program.Bounds.above_args","Effect4.Program.Bounds.above_prod","Effect4.Program.Bounds.prod_or_not","Effect4.Program.Bounds.recovers","Effect4.Program.Bounds.cands_args","Effect4.Program.Bounds.TemplateOK.args","Effect4.Program.Bounds.below_args","Effect4.Program.Bounds.cands_union_right","Effect4.Program.Bounds.TemplateOK.head","Effect4.Program.Bounds.cands_var"]},"doc":"It is a step of `matchB_complete`, and `matchB_complete` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.covers","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ σ : Effect4.Program.Bounds.Subst),\n  (∀ (i : Nat),\n      Eq\n        ((Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).normalize.sub\n          (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)).normalize)\n        Bool.true) →\n    ∀ (n : Nat) (r t : Effect4.Program.Ty) (v : Effect4.Program.Bounds.Variance),\n      instLTNat.lt (Effect4.Program.Ty._sizeOf_inst.sizeOf r) n →\n        Effect4.Program.Bounds.TemplateOK t →\n          r.Normal →\n            Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n              (∀ (c : Effect4.Program.Bounds.Cand),\n                  List.instMembership.mem (Effect4.Program.Bounds.cands v t r) c →\n                    Eq\n                      (c.snd.snd.sub\n                        (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n                      Bool.true) →\n                Eq (r.sub (Effect4.Program.Ty.instantiate σ t).normalize) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":75,"lemmas":53,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `covers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.instance_shape","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ : Effect4.Program.Bounds.Subst) {t : Effect4.Program.Ty},\n  t.Normal →\n    (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n      (∀ (a b : Effect4.Program.Ty), Ne t (a.union b)) →\n        (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts)) →\n          (∀ (a b : Effect4.Program.Ty), Ne t (a.prod b)) →\n            Ne t.args List.nil →\n              And (Eq (Effect4.Program.Ty.instantiate τ t).normalize.isMember Bool.true)\n                (And (Eq (t.sameHead (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true)\n                  (Eq (Effect4.Program.Ty.instantiate τ t).normalize.args\n                    (List.map\n                      (fun p =>\n                        { fst := p.fst, snd := (Effect4.Program.Ty.instantiate τ p.snd).normalize })\n                      t.args)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":38,"nearest":["Effect4.Program.Bounds.lookup_added"]},"doc":"It is a step of `matchB_sound`, and `matchB_sound_step` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.instantiate_solve","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) (cs : List Effect4.Program.Bounds.Cand) (i : Nat),\n  Eq (List.lookup i seed) Option.none →\n    Eq\n      (Effect4.Program.Ty.instantiate (Effect4.Program.Bounds.solve seed cs)\n        (Effect4.Program.Ty.var i))\n      (Effect4.Program.Bounds.joinCands (Effect4.Program.Bounds.lowers cs i))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.Bounds.subN_join_least","Effect4.Program.Bounds.subN_never"]},"doc":"It is a step of `matchB_least`, and `solve_between` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.joinCands_least","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (l : List Effect4.Program.Ty) (u : Effect4.Program.Ty),\n  (∀ (c : Effect4.Program.Ty), List.instMembership.mem l c → Eq (c.subN u) Bool.true) →\n    Eq ((Effect4.Program.Bounds.joinCands l).subN u) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":129,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"It is a step of `matchB_sound`, and `matchB_sound_step` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.joinCands_upper","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (l : List Effect4.Program.Ty) (c : Effect4.Program.Ty),\n  List.instMembership.mem l c → Eq (c.subN (Effect4.Program.Bounds.joinCands l)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":49,"nearest":["Effect4.Program.Bounds.join_eq_right_of_subN"]},"doc":"It is a step of `TermIntro`, and `nativeAtomTy_ite_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.join_eq_left_of_subN","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {a b : Effect4.Program.Ty},\n  Eq (b.normalize.sub a.normalize) Bool.true → a.Normal → Eq (a.join b) a","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":80,"lemmas":186,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.Bounds.subN_join_least"]},"doc":"It is a step of `TermIntro`, and `nativeAtomTy_ite_above` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.join_eq_right_of_subN","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {a b : Effect4.Program.Ty},\n  Eq (a.normalize.sub b.normalize) Bool.true → b.Normal → Eq (a.join b) b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":1,"nearest":["Effect4.Program.Bounds.lowers_cons"]},"doc":"It is a step of `matchB_sound`, and `instantiate_solve` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.lookup_added","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) (f : Nat → Effect4.Program.Ty) (i : Nat),\n  Eq (List.lookup i seed) Option.none →\n    ∀ (ds : List Effect4.Program.Bounds.Cand),\n      Or\n        (And\n          (Eq\n            (List.lookup i\n              (List.filterMap\n                (fun c =>\n                  ite\n                    (Or (Eq c.snd.fst Effect4.Program.Ty.Variance.contra)\n                      (Eq (List.lookup c.fst seed).isSome Bool.true))\n                    Option.none (Option.some { fst := c.fst, snd := f c.fst }))\n                ds))\n            (Option.some (f i)))\n          (Ne (Effect4.Program.Bounds.lowers ds i) List.nil))\n        (And\n          (Eq\n            (List.lookup i\n              (List.filterMap\n                (fun c =>\n                  ite\n                    (Or (Eq c.snd.fst Effect4.Program.Ty.Variance.contra)\n                      (Eq (List.lookup c.fst seed).isSome Bool.true))\n                    Option.none (Option.some { fst := c.fst, snd := f c.fst }))\n                ds))\n            Option.none)\n          (Eq (Effect4.Program.Bounds.lowers ds i) List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":38,"nearest":[]},"doc":"It is a step of `matchB_sound`, and `matchB_sound_step` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.lookup_solve_seed","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) (cs : List Effect4.Program.Bounds.Cand) {i : Nat}\n  {u : Effect4.Program.Ty},\n  Eq (List.lookup i seed) (Option.some u) →\n    Eq (List.lookup i (Effect4.Program.Bounds.solve seed cs)) (Option.some u)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":5,"lemmas":1,"nearest":[]},"doc":"It is a step of `matchB_least`, and `mem_lowers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.lowers_cons","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (c : Effect4.Program.Bounds.Cand) (ds : List Effect4.Program.Bounds.Cand) (i : Nat),\n  Eq (Effect4.Program.Bounds.lowers (List.cons c ds) i)\n    (ite (And (Eq c.fst i) (Ne c.snd.fst Effect4.Program.Ty.Variance.contra))\n      (List.cons c.snd.snd (Effect4.Program.Bounds.lowers ds i))\n      (Effect4.Program.Bounds.lowers ds i))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":83,"lemmas":72,"nearest":["Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `nativeAtomTy_append` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_append","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X : Effect4.Program.Ty),\n  Eq X.normalize X →\n    Eq\n      (Effect4.Program.Bounds.matchArgsB\n        (List.cons (Effect4.Program.Ty.var 0).list\n          (List.cons (Effect4.Program.Ty.var 0).list List.nil))\n        (List.cons X.list (List.cons X.list List.nil)))\n      (Option.some\n        (List.cons { fst := 0, snd := X.join X }\n          (List.cons { fst := 0, snd := X.join X } List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":83,"lemmas":63,"nearest":["Effect4.Program.Bounds.covers","Effect4.Program.Bounds.candsList_below","Effect4.Program.Bounds.solve_between"]},"doc":"**The match of an argument list is complete**: normal arguments that some bindings place\nbelow their parameters' instances have a match. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_complete","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {ps rs : List Effect4.Program.Ty},\n  Eq ps.length rs.length →\n    (∀ (p : Effect4.Program.Ty),\n        List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n      (∀ (r : Effect4.Program.Ty), List.instMembership.mem rs r → r.Normal) →\n        ∀ {τ : Effect4.Program.Bounds.Subst},\n          Effect4.Program.Bounds.Admits τ ps rs →\n            Exists fun σ => Eq (Effect4.Program.Bounds.matchArgsB ps rs) (Option.some σ)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":86,"lemmas":81,"nearest":["Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `Checking` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_cons_nil","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {X : Effect4.Program.Ty},\n  Eq X.normalize X →\n    Eq\n      (Effect4.Program.Bounds.matchArgsB\n        (List.cons (Effect4.Program.Ty.var 0) (List.cons (Effect4.Program.Ty.var 0).list List.nil))\n        (List.cons X (List.cons Effect4.Program.Ty.never.list List.nil)))\n      (Option.some\n        (List.cons { fst := 0, snd := X.join Effect4.Program.Ty.never }\n          (List.cons { fst := 0, snd := X.join Effect4.Program.Ty.never } List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":93,"lemmas":132,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `nativeAtomTy_ite` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_ite","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X Y : Effect4.Program.Ty),\n  Eq\n    (Effect4.Program.Bounds.matchArgsB\n      (List.cons Effect4.Program.Ty.bool\n        (List.cons (Effect4.Program.Ty.var 0) (List.cons (Effect4.Program.Ty.var 0) List.nil)))\n      (List.cons Effect4.Program.Ty.bool (List.cons X (List.cons Y List.nil))))\n    (Option.some\n      (List.cons { fst := 0, snd := X.join Y } (List.cons { fst := 0, snd := X.join Y } List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":38,"nearest":["Effect4.Program.Bounds.candsList_below","Effect4.Program.Bounds.solve_between"]},"doc":"**The match of an argument list answers the least bindings.** ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_least","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {ps rs : List Effect4.Program.Ty} {σ : Effect4.Program.Bounds.Subst},\n  Eq (Effect4.Program.Bounds.matchArgsB ps rs) (Option.some σ) →\n    (∀ (p : Effect4.Program.Ty),\n        List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n      (∀ (r : Effect4.Program.Ty), List.instMembership.mem rs r → r.Normal) →\n        ∀ {τ : Effect4.Program.Bounds.Subst},\n          Effect4.Program.Bounds.Admits τ ps rs →\n            ∀ (i : Nat),\n              Eq\n                ((Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).subN\n                  (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)))\n                Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":83,"lemmas":41,"nearest":["Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `Checking` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_list_var_nat","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X : Effect4.Program.Ty),\n  Eq\n    (Effect4.Program.Bounds.matchArgsB\n      (List.cons (Effect4.Program.Ty.var 0).list (List.cons Effect4.Program.Ty.nat List.nil))\n      (List.cons X.list (List.cons Effect4.Program.Ty.nat List.nil)))\n    (Option.some (List.cons { fst := 0, snd := X } List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":88,"lemmas":106,"nearest":["Effect4.Program.Bounds.matchArgsB_least","Effect4.Program.Bounds.matchArgsB_complete","Effect4.Program.Bounds.matchArgsB_sound"]},"doc":"**The match of an argument list is monotone.** Smaller arguments, in the checker's order, have\na match too, and its bindings are smaller at every parameter. It follows from the complete match\nand the least bindings. An answer that reads a parameter covariantly is then smaller; an answer\nthat reads one invariantly (`Ref.make`'s cell) is not ordered, which no rule of a template\nrepairs. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_monotone","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {ps rs rs' : List Effect4.Program.Ty} {σ : Effect4.Program.Bounds.Subst},\n  Eq (Effect4.Program.Bounds.matchArgsB ps rs) (Option.some σ) →\n    (∀ (p : Effect4.Program.Ty),\n        List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n      (∀ (r : Effect4.Program.Ty), List.instMembership.mem rs' r → r.Normal) →\n        Eq rs'.length rs.length →\n          (∀ (rr : Prod Effect4.Program.Ty Effect4.Program.Ty),\n              List.instMembership.mem (rs'.zip rs) rr → Eq (rr.fst.subN rr.snd) Bool.true) →\n            Exists fun σ' =>\n              And (Eq (Effect4.Program.Bounds.matchArgsB ps rs') (Option.some σ'))\n                (∀ (i : Nat),\n                  Eq\n                    ((Effect4.Program.Ty.instantiate σ' (Effect4.Program.Ty.var i)).subN\n                      (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)))\n                    Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":39,"nearest":["Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `Checking` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_one_var","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X : Effect4.Program.Ty),\n  Eq\n    (Effect4.Program.Bounds.matchArgsB (List.cons (Effect4.Program.Ty.var 0) List.nil)\n      (List.cons X List.nil))\n    (Option.some (List.cons { fst := 0, snd := X } List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":78,"lemmas":38,"nearest":[]},"doc":"**The match of an argument list is sound at one instance**: every argument is below its\nparameter's instance at the same, final bindings. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_sound","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {ps rs : List Effect4.Program.Ty} {σ : Effect4.Program.Bounds.Subst},\n  Eq (Effect4.Program.Bounds.matchArgsB ps rs) (Option.some σ) →\n    And (Eq ps.length rs.length) (Effect4.Program.Bounds.Admits σ ps rs)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":39,"nearest":["Effect4.Program.Bounds.candsList_nil","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.candsList_cons"]},"doc":"It is a step of `TermIntro`, and `Checking` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsB_two_vars","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X Y : Effect4.Program.Ty),\n  Eq\n    (Effect4.Program.Bounds.matchArgsB\n      (List.cons (Effect4.Program.Ty.var 0) (List.cons (Effect4.Program.Ty.var 1) List.nil))\n      (List.cons X (List.cons Y List.nil)))\n    (Option.some (List.cons { fst := 0, snd := X } (List.cons { fst := 1, snd := Y } List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":62,"nearest":["Effect4.Program.Bounds.admits_normalize","Effect4.Program.Bounds.matchArgsB_complete"]},"doc":"**At the normal form the match is complete for every request**: arguments of any raw form\nthat some bindings place below their parameters' instances have a match. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsN_complete","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {ps rs : List Effect4.Program.Ty},\n  Eq ps.length rs.length →\n    (∀ (p : Effect4.Program.Ty),\n        List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n      ∀ {τ : Effect4.Program.Bounds.Subst},\n        Effect4.Program.Bounds.Admits τ ps rs →\n          Exists fun σ => Eq (Effect4.Program.Bounds.matchArgsN ps rs) (Option.some σ)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":85,"lemmas":63,"nearest":["Effect4.Program.Bounds.admits_normalize","Effect4.Program.Bounds.matchArgsB_least"]},"doc":"**At the normal form the match answers the least bindings, for every request.** ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchArgsN_least","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {ps rs : List Effect4.Program.Ty} {σ : Effect4.Program.Bounds.Subst},\n  Eq (Effect4.Program.Bounds.matchArgsN ps rs) (Option.some σ) →\n    (∀ (p : Effect4.Program.Ty),\n        List.instMembership.mem ps p → Effect4.Program.Bounds.TemplateOK p) →\n      ∀ {τ : Effect4.Program.Bounds.Subst},\n        Effect4.Program.Bounds.Admits τ ps rs →\n          ∀ (i : Nat),\n            Eq\n              ((Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).subN\n                (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)))\n              Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":92,"lemmas":169,"nearest":["Effect4.Program.Bounds.matchB_sound"]},"doc":"**At a cell the match binds the cell's own content**, up to the normal form. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_cell_fixed","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {seed σ : Effect4.Program.Bounds.Subst} {i : Nat} {c : Effect4.Program.Ty},\n  Eq (Effect4.Program.Bounds.matchB seed (Effect4.Program.Ty.var i).refOf c.refOf) (Option.some σ) →\n    Eq (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).normalize c.normalize","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":81,"lemmas":63,"nearest":["Effect4.Program.Bounds.covers","Effect4.Program.Bounds.cands_below","Effect4.Program.Bounds.solve_between"]},"doc":"**The match by bounds is complete**: a normal request below some instance of the template has\na match. The template is normal, admissible and holds no nominal reference. No premise asks where\na parameter first occurs, and none asks where `never` stands: `Ty.anchored` and `Ty.bottomFree`\n(`src/Effect4/Laws/Program/Template.lean`) are not premises. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_complete","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) {t r : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK t →\n    r.Normal →\n      ∀ {τ : Effect4.Program.Bounds.Subst},\n        (∀ (j : Nat) (u : Effect4.Program.Ty),\n            Eq (List.lookup j seed) (Option.some u) →\n              Eq (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var j)).normalize\n                u.normalize) →\n          Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n            Exists fun σ => Eq (Effect4.Program.Bounds.matchB seed t r) (Option.some σ)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":38,"nearest":["Effect4.Program.Bounds.cands_below","Effect4.Program.Bounds.solve_between"]},"doc":"**The match by bounds answers the least bindings**: under any bindings that place the request\nbelow the template's instance and agree with the seed, each binding of the match is below `τ`'s,\nin the checker's order. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_least","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {seed σ : Effect4.Program.Bounds.Subst} {t r : Effect4.Program.Ty},\n  Eq (Effect4.Program.Bounds.matchB seed t r) (Option.some σ) →\n    Effect4.Program.Bounds.TemplateOK t →\n      r.Normal →\n        ∀ {τ : Effect4.Program.Bounds.Subst},\n          (∀ (j : Nat) (u : Effect4.Program.Ty),\n              Eq (List.lookup j seed) (Option.some u) →\n                Eq (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var j)).normalize\n                  u.normalize) →\n            Eq (r.sub (Effect4.Program.Ty.instantiate τ t).normalize) Bool.true →\n              ∀ (i : Nat),\n                Eq\n                  ((Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).subN\n                    (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)))\n                  Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":39,"nearest":["Effect4.Program.Bounds.cands_var"]},"doc":"It is a step of `Waiting`, and `answers_refModifyWith_captured` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_modify_use","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (C B : Effect4.Program.Ty),\n  Eq\n    (Effect4.Program.Bounds.matchB (List.cons { fst := 0, snd := C } List.nil)\n      ((Effect4.Program.Ty.var 1).prod (Effect4.Program.Ty.var 0)) (B.prod C))\n    (Option.some (List.cons { fst := 0, snd := C } (List.cons { fst := 1, snd := B } List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":39,"nearest":["Effect4.Program.Bounds.cands_var"]},"doc":"It is a step of `Waiting`, and `TypedScope` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_one_var","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X : Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.matchB List.nil (Effect4.Program.Ty.var 0) X)\n    (Option.some (List.cons { fst := 0, snd := X } List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":39,"nearest":["Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.comp_inv"]},"doc":"It is a step of `Waiting`, and `TypedScope` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_refOf_var","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X : Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.matchB List.nil (Effect4.Program.Ty.var 0).refOf X.refOf)\n    (Option.some (List.cons { fst := 0, snd := X } List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":38,"nearest":["Effect4.Program.Bounds.lookup_solve_seed"]},"doc":"**The match by bounds is sound**: the request is below the template's instance at the\nbindings, both sides normalized, and the bindings keep the seed's. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchB_sound","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {seed σ : Effect4.Program.Bounds.Subst} {t r : Effect4.Program.Ty},\n  Eq (Effect4.Program.Bounds.matchB seed t r) (Option.some σ) →\n    And (Eq (r.normalize.sub (Effect4.Program.Ty.instantiate σ t).normalize) Bool.true)\n      (∀ (j : Nat) (u : Effect4.Program.Ty),\n        Eq (List.lookup j seed) (Option.some u) → Eq (List.lookup j σ) (Option.some u))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":38,"nearest":[]},"doc":"**Two requests with one normal form have one match.** ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.matchN_congr","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) (t : Effect4.Program.Ty) {r r' : Effect4.Program.Ty},\n  Eq r.normalize r'.normalize →\n    Eq (Effect4.Program.Bounds.matchN seed t r) (Effect4.Program.Bounds.matchN seed t r')","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":5,"lemmas":1,"nearest":[]},"doc":"It is a step of `matchB_least`, and `solve_between` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.mem_lowers","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {cs : List Effect4.Program.Bounds.Cand} {i : Nat} {x : Effect4.Program.Ty},\n  Iff (List.instMembership.mem (Effect4.Program.Bounds.lowers cs i) x)\n    (Exists fun c =>\n      And (List.instMembership.mem cs c)\n        (And (Eq c.fst i) (And (Ne c.snd.fst Effect4.Program.Ty.Variance.contra) (Eq c.snd.snd x))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":94,"lemmas":43,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `recovers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.mem_varsOf_args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty},\n  t.Normal →\n    (∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n      (∀ (n : String) (ts : List Effect4.Program.Ty), Ne t (Effect4.Program.Ty.app n ts)) →\n        Eq t.isMember Bool.true →\n          ∀ {i : Nat},\n            List.instMembership.mem t.varsOf i →\n              Exists fun p =>\n                And (List.instMembership.mem t.args p) (List.instMembership.mem p.snd.varsOf i)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `covers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.mem_zip_map_right","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {α β γ : Type} (f : β → γ) {xs : List α} {ys : List β} {a : α} {c : γ},\n  List.instMembership.mem (xs.zip (List.map f ys)) { fst := a, snd := c } →\n    Exists fun b => And (List.instMembership.mem (ys.zip xs) { fst := b, snd := a }) (Eq c (f b))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `covers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.mem_zip_self_map","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {α β : Type} (f : α → β) {l : List α} {p : α},\n  List.instMembership.mem l p →\n    List.instMembership.mem (l.zip (List.map f l)) { fst := p, snd := f p }","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `noApp_args` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.noAppFields_eq_all","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (fs : List (Prod String (Prod Bool Effect4.Program.Ty))),\n  Eq (Effect4.Program.Bounds.noAppFields fs)\n    (fs.all fun p => Effect4.Program.Bounds.noApp p.snd.snd)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `noApp_args` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.noAppItems_eq_all","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (ts : List Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.noAppItems ts) (ts.all Effect4.Program.Bounds.noApp)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":17,"lemmas":4,"nearest":["Effect4.Program.Bounds.noAppItems_eq_all","Effect4.Program.Bounds.noAppFields_eq_all"]},"doc":"It is a step of `matchB_complete`, and `TemplateOK.args` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.noApp_args","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty},\n  Eq (Effect4.Program.Bounds.noApp t) Bool.true →\n    ∀ (p : Prod Effect4.Program.Ty.Variance Effect4.Program.Ty),\n      List.instMembership.mem t.args p → Eq (Effect4.Program.Bounds.noApp p.snd) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":112,"nearest":["Effect4.Program.Bounds.TemplateOK.head","Effect4.Program.Bounds.TemplateOK.args","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.cands_mem_members","Effect4.Program.Bounds.prod_member_left"]},"doc":"It is a step of `matchB_complete`, and `recovers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.prod_left_cands","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ σ : Effect4.Program.Bounds.Subst) (v : Effect4.Program.Bounds.Variance)\n  {a b : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK (a.prod b) →\n    (∀ (c : Effect4.Program.Bounds.Cand),\n        List.instMembership.mem\n            (Effect4.Program.Bounds.cands v (a.prod b)\n              (Effect4.Program.Ty.instantiate τ (a.prod b)).normalize)\n            c →\n          Eq\n            (c.snd.snd.sub\n              (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n            Bool.true) →\n      ∀ (c : Effect4.Program.Bounds.Cand),\n        List.instMembership.mem\n            (Effect4.Program.Bounds.cands v a (Effect4.Program.Ty.instantiate τ a).normalize) c →\n          Eq\n            (c.snd.snd.sub\n              (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n            Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":78,"lemmas":178,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `prod_left_cands` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.prod_member_left","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X Y : Effect4.Program.Ty) {x : Effect4.Program.Ty},\n  List.instMembership.mem X.normalize.members x →\n    Exists fun y => List.instMembership.mem (X.prod Y).normalize.members (x.prod y)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":78,"lemmas":178,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `prod_right_cands` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.prod_member_right","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (X Y : Effect4.Program.Ty) {y : Effect4.Program.Ty},\n  List.instMembership.mem Y.normalize.members y →\n    Exists fun x => List.instMembership.mem (X.prod Y).normalize.members (x.prod y)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"It is a step of `matchB_complete`, and `recovers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.prod_or_not","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Or (Exists fun a => Exists fun b => Eq t (a.prod b))\n    (∀ (a b : Effect4.Program.Ty), Ne t (a.prod b))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":112,"nearest":["Effect4.Program.Bounds.TemplateOK.head","Effect4.Program.Bounds.TemplateOK.args","Effect4.Program.Bounds.cands_var","Effect4.Program.Bounds.cands_mem_members","Effect4.Program.Bounds.prod_member_right"]},"doc":"It is a step of `matchB_complete`, and `recovers` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.prod_right_cands","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ σ : Effect4.Program.Bounds.Subst) (v : Effect4.Program.Bounds.Variance)\n  {a b : Effect4.Program.Ty},\n  Effect4.Program.Bounds.TemplateOK (a.prod b) →\n    (∀ (c : Effect4.Program.Bounds.Cand),\n        List.instMembership.mem\n            (Effect4.Program.Bounds.cands v (a.prod b)\n              (Effect4.Program.Ty.instantiate τ (a.prod b)).normalize)\n            c →\n          Eq\n            (c.snd.snd.sub\n              (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n            Bool.true) →\n      ∀ (c : Effect4.Program.Bounds.Cand),\n        List.instMembership.mem\n            (Effect4.Program.Bounds.cands v b (Effect4.Program.Ty.instantiate τ b).normalize) c →\n          Eq\n            (c.snd.snd.sub\n              (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n            Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":77,"nearest":["Effect4.Program.Bounds.mem_zip_self_map","Effect4.Program.Bounds.cands_args","Effect4.Program.Bounds.instance_shape","Effect4.Program.Bounds.mem_varsOf_args","Effect4.Program.Bounds.prod_right_cands","Effect4.Program.Bounds.prod_left_cands","Effect4.Program.Bounds.TemplateOK.args","Effect4.Program.Bounds.prod_or_not","Effect4.Program.Bounds.TemplateOK.head","Effect4.Program.Bounds.cands_var"]},"doc":"It is a step of `matchB_complete`, and `matchB_complete` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.recovers","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (τ σ : Effect4.Program.Bounds.Subst) (n : Nat) (t : Effect4.Program.Ty)\n  (v : Effect4.Program.Bounds.Variance),\n  instLTNat.lt (Effect4.Program.Ty._sizeOf_inst.sizeOf t) n →\n    Effect4.Program.Bounds.TemplateOK t →\n      (∀ (c : Effect4.Program.Bounds.Cand),\n          List.instMembership.mem\n              (Effect4.Program.Bounds.cands v t (Effect4.Program.Ty.instantiate τ t).normalize) c →\n            Eq\n              (c.snd.snd.sub\n                (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var c.fst)).normalize)\n              Bool.true) →\n        ∀ (i : Nat),\n          List.instMembership.mem t.varsOf i →\n            Eq\n              ((Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)).normalize.sub\n                (Effect4.Program.Ty.instantiate σ (Effect4.Program.Ty.var i)).normalize)\n              Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":64,"nearest":["Effect4.Program.Bounds.joinCands_upper","Effect4.Program.Bounds.lookup_solve_seed","Effect4.Program.Bounds.mem_lowers","Effect4.Program.Bounds.joinCands_least","Effect4.Program.Bounds.instantiate_solve"]},"doc":"It is a step of `matchB_least`, and `matchB_least_step` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.solve_between","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (seed : Effect4.Program.Bounds.Subst) (cs : List Effect4.Program.Bounds.Cand)\n  (τ : Effect4.Program.Bounds.Subst),\n  (∀ (j : Nat) (u : Effect4.Program.Ty),\n      Eq (List.lookup j seed) (Option.some u) →\n        Eq (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var j)).normalize u.normalize) →\n    (∀ (c : Effect4.Program.Bounds.Cand),\n        List.instMembership.mem cs c →\n          And (Ne c.snd.fst Effect4.Program.Ty.Variance.contra)\n            (And c.snd.snd.Normal\n              (Eq\n                (c.snd.snd.sub\n                  (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var c.fst)).normalize)\n                Bool.true))) →\n      And\n        (∀ (i : Nat),\n          Eq\n            ((Effect4.Program.Ty.instantiate (Effect4.Program.Bounds.solve seed cs)\n                    (Effect4.Program.Ty.var i)).normalize.sub\n              (Effect4.Program.Ty.instantiate τ (Effect4.Program.Ty.var i)).normalize)\n            Bool.true)\n        (∀ (c : Effect4.Program.Bounds.Cand),\n          List.instMembership.mem cs c →\n            Eq\n              (c.snd.snd.sub\n                (Effect4.Program.Ty.instantiate (Effect4.Program.Bounds.solve seed cs)\n                    (Effect4.Program.Ty.var c.fst)).normalize)\n              Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":122,"nearest":["Effect4.Program.Ty.normalize_idem"]},"doc":"It is a step of `matchB_least`, and `joinCands_least` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.subN_join_least","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ {a b c : Effect4.Program.Ty},\n  Eq (a.subN c) Bool.true → Eq (b.subN c) Bool.true → Eq ((a.join b).subN c) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":62,"lemmas":38,"nearest":[]},"doc":"It is a step of `matchB_least`, and `cands_below` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.subN_never","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (u : Effect4.Program.Ty), Eq (Effect4.Program.Ty.never.subN u) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":62,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Bounds","name":"Effect4.Program.Bounds.templateOK_of","placement":{"concept":"subtyping-algebra","requirement":"R4"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq (Effect4.Program.Bounds.templateOKb t) Bool.true → Effect4.Program.Bounds.TemplateOK t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkAction_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (p : List Nat) (a : Effect4.Program.ActionTerm Op),\n  Eq (Effect4.Program.Checker.checkAction sig env (instHAppendOfAppend.hAppend q p) a)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.checkAction sig env p a))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a spine of programs at its slots: a race's entrants, an invocation's\nprograms (decisions row 340). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkEffs_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (p : List Nat) (qs : List Effect4.Program.ParamDecl) (es : Effect4.Program.Effs Op),\n  Eq (Effect4.Program.Checker.checkEffs sig env (instHAppendOfAppend.hAppend q p) qs es)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.checkEffs sig env p qs es))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkLayer_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q p : List Nat)\n  (l : Effect4.Program.LayerTerm Op),\n  Eq (Effect4.Program.Checker.checkLayer sig (instHAppendOfAppend.hAppend q p) l)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.checkLayer sig p l))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkLayers_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q p : List Nat)\n  (ls : Effect4.Program.LayerTerms Op),\n  Eq (Effect4.Program.Checker.checkLayers sig (instHAppendOfAppend.hAppend q p) ls)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.checkLayers sig p ls))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a statement: its `return` answer moves too. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkStmt_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (inLoop : Bool) (p : List Nat) (st : Effect4.Program.Stmt Op),\n  Eq (Effect4.Program.Checker.checkStmt sig env inLoop (instHAppendOfAppend.hAppend q p) st)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Except.map (Effect4.Program.StmtTy.rebase q)\n        (Effect4.Program.Checker.checkStmt sig env inLoop p st)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":274,"lemmas":60,"nearest":[]},"doc":"**A statement other than a `bindYield` binds nothing**: where the checker answers it as a\nstep, the step's bindings are empty. So the statements after it are checked at its own\nenvironment, which is the step function's. A step of `annotate-table`. Its consumer is the\ncase of a statement list in `Annotate.checkStmts_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Checker.checkStmt_step_binds","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv} {inLoop : Bool}\n  {q : List Nat} {head : Effect4.Program.Stmt Op} {g : Effect4.Program.GenTy}\n  {binds : List Effect4.Program.Ty},\n  (∀ (e : Effect4.Program.Eff Op), Ne head (Effect4.Program.Stmt.bindYield e)) →\n    Eq (Effect4.Program.Checker.checkStmt s env inLoop q head)\n        (Except.ok (Effect4.Program.StmtTy.step g binds)) →\n      Eq binds List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"`check_rebase` at a generator body that no `return` has ended. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.checkStmts_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (inLoop : Bool) (p : List Nat) (body : Effect4.Program.Stmts Op),\n  Eq\n    (Effect4.Program.Checker.checkStmts sig env inLoop Option.none (instHAppendOfAppend.hAppend q p)\n      body)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.checkStmts sig env inLoop Option.none p body))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":280,"lemmas":66,"nearest":[]},"doc":"**The checker at `q ++ p` is the checker at `p`, its refusal moved below `q`.** The pointer\nof `checker-base-natural`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.Checker.check_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (q : List Nat) (env : Effect4.Program.TyEnv)\n  (p : List Nat) (e : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.Checker.check sig env (instHAppendOfAppend.hAppend q p) e)\n    (Except.mapError (Effect4.Program.TypeRefusal.rebase q)\n      (Effect4.Program.Checker.check sig env p e))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":[]},"doc":"An environment extended by closed types. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.ClosedEnv.append","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {env ext : Effect4.Program.TyEnv},\n  Effect4.Program.ClosedEnv env →\n    (∀ (t : Effect4.Program.Ty), List.instMembership.mem ext t → Eq t.closed Bool.true) →\n      Effect4.Program.ClosedEnv (instHAppendOfAppend.hAppend env ext)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.ClosedEnv.nil","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.ClosedEnv List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":["Effect4.Program.ClosedEnv.append"]},"doc":"An environment extended by one closed type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.ClosedEnv.push","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {env : Effect4.Program.TyEnv} {t : Effect4.Program.Ty},\n  Effect4.Program.ClosedEnv env →\n    Eq t.closed Bool.true →\n      Effect4.Program.ClosedEnv (instHAppendOfAppend.hAppend env (List.cons t List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":837,"lemmas":65,"nearest":["Effect4.Program.ControlSteps.native_sync_op","Effect4.Machine.ControlSteps.iteration_below_budget","Effect4.Machine.ControlSteps.loop_of_iteration"]},"doc":"One compiled store command on an arbitrary fiber commits before its owed resumes.\nA step of `heap_sites_keep` and `fiber-local-positions`; the worker probe consumes it. ","kind":"theorem","module":"Effect4.Laws.Program.ControlSteps","name":"Effect4.Program.ControlSteps.loop_sync_op","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (m : Effect4.Api.Machine)\n  (id : Effect4.FiberId)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (op : Effect4.Machine.SyncOp) (state : Effect4.Machine.Stores) (value : Effect4.Machine.Val)\n  (yielding : Bool)\n  (rest :\n    List\n      (Effect4.Machine.Cmd Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)),\n  Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n    Eq\n        (f.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (Effect4.Prim.sync (Effect4.Program.EffThunk.op op)) →\n      Eq\n          (f.frame\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).deferredInterrupt\n          Bool.false →\n        Eq\n            (f.yieldOverride\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))\n            Option.none →\n          instLTNat.lt\n              (instHAdd.hAdd\n                (f.currentOpCount\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                1)\n              (f.maxOpsBeforeYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)) →\n            Eq\n                (Effect4.Machine.syncOpStep op\n                  (m.state\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)))\n                (Option.some { fst := state, snd := value }) →\n              Eq\n                (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                  (Effect4.Machine.Cmd.loop id yielding) rest)\n                {\n                  fst :=\n                    {\n                          fibers :=\n                            m.fibers\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          races :=\n                            m.races\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          nextId :=\n                            m.nextId\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          nextToken :=\n                            m.nextToken\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          nextRace :=\n                            m.nextRace\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          middlewareInstalled :=\n                            m.middlewareInstalled\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          armed :=\n                            m.armed\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          state := state,\n                          trace :=\n                            m.trace\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          stuck :=\n                            m.stuck\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann),\n                          forks :=\n                            m.forks\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann) }.update\n                      (have __src := Effect4.Machine.countOp f;\n                      {\n                        id :=\n                          __src.id\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        frame :=\n                          have __src :=\n                            f.frame\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann);\n                          { current := Effect4.Prim.success value, stack := __src.stack,\n                            interruptible := __src.interruptible,\n                            interruptedCause := __src.interruptedCause,\n                            deferredInterrupt := __src.deferredInterrupt },\n                        running :=\n                          __src.running\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        parked :=\n                          __src.parked\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        pending :=\n                          __src.pending\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        finalizing :=\n                          __src.finalizing\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        exit :=\n                          __src.exit\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        currentOpCount :=\n                          __src.currentOpCount\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        maxOpsBeforeYield :=\n                          __src.maxOpsBeforeYield\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        preventYield :=\n                          __src.preventYield\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        yieldOverride :=\n                          __src.yieldOverride\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        observers :=\n                          __src.observers\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        children :=\n                          __src.children\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        dispatcher :=\n                          __src.dispatcher\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        context :=\n                          __src.context\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann) }),\n                  snd :=\n                    instHAppendOfAppend.hAppend\n                      (List.cons Effect4.Machine.Cmd.drainDue\n                        (List.cons\n                          (Effect4.Machine.Cmd.deliver\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            id yielding)\n                          List.nil))\n                      rest }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":780,"lemmas":73,"nearest":["Effect4.Program.ControlSteps.native_sync_op"]},"doc":"An actual compiled store answer consumes the post-state contract on the unchanged saved stack.\nConsumer: Timeout's count read, cleanup writer and selected-exit writer.\nThe world reads the actual stores; source selection and post-state admissibility remain premises. ","kind":"theorem","module":"Effect4.Laws.Program.ControlSteps","name":"Effect4.Program.ControlSteps.native_sync_answer","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {World Kind : Type} (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Api.Machine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (op : Effect4.Machine.SyncOp) (state : Effect4.Machine.Stores)\n  (value : Effect4.Machine.Val) (world : Effect4.Machine.Stores → World)\n  (model : Effect4.Machine.AnswerFlow.Model World Kind)\n  (interp :\n    Effect4.PrimInterp Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n  (input output : Kind),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.sync (Effect4.Program.EffThunk.op op)) →\n    Eq\n        (Effect4.Machine.syncOpStep op\n          (m.state\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        (Option.some { fst := state, snd := value }) →\n      model.future\n          (world\n            (m.state\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)))\n          (world state) →\n        model.value (world state) input value →\n          Effect4.Machine.AnswerFlow.StackAt model interp\n              (world\n                (m.state\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)))\n              input output\n              (f.frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).stack →\n            And\n              (Eq (Effect4.Program.evaluateNative root m f yielding table)\n                {\n                  machine :=\n                    {\n                      fibers :=\n                        m.fibers\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      races :=\n                        m.races\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      nextId :=\n                        m.nextId\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      nextToken :=\n                        m.nextToken\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      nextRace :=\n                        m.nextRace\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      middlewareInstalled :=\n                        m.middlewareInstalled\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      armed :=\n                        m.armed\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      state := state,\n                      trace :=\n                        m.trace\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      stuck :=\n                        m.stuck\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      forks :=\n                        m.forks\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann) },\n                  fiber :=\n                    {\n                      id :=\n                        f.id\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      frame :=\n                        have __src :=\n                          f.frame\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann);\n                        { current := Effect4.Prim.success value, stack := __src.stack,\n                          interruptible := __src.interruptible,\n                          interruptedCause := __src.interruptedCause,\n                          deferredInterrupt := __src.deferredInterrupt },\n                      running :=\n                        f.running\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      parked :=\n                        f.parked\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      pending :=\n                        f.pending\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      finalizing :=\n                        f.finalizing\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      exit :=\n                        f.exit\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      currentOpCount :=\n                        f.currentOpCount\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      maxOpsBeforeYield :=\n                        f.maxOpsBeforeYield\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      preventYield :=\n                        f.preventYield\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      yieldOverride :=\n                        f.yieldOverride\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      observers :=\n                        f.observers\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      children :=\n                        f.children\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      dispatcher :=\n                        f.dispatcher\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      context :=\n                        f.context\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann) },\n                  yielding := yielding, outcome := Effect4.Machine.Outcome.answered,\n                  nested := List.cons Effect4.Machine.Cmd.drainDue List.nil })\n              (Effect4.Machine.AnswerFlow.FrameAt model interp (world state) output\n                (have __src :=\n                  f.frame\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann);\n                { current := Effect4.Prim.success value, stack := __src.stack,\n                  interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                  deferredInterrupt := __src.deferredInterrupt }))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":772,"lemmas":65,"nearest":[]},"doc":"A recognized compiled store operation answers on any fiber and retains its stack.\nA step of `heap_sites_keep`; the worker store rule consumes it. ","kind":"theorem","module":"Effect4.Laws.Program.ControlSteps","name":"Effect4.Program.ControlSteps.native_sync_op","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (m : Effect4.Api.Machine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (op : Effect4.Machine.SyncOp) (state : Effect4.Machine.Stores)\n  (value : Effect4.Machine.Val),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.sync (Effect4.Program.EffThunk.op op)) →\n    Eq\n        (Effect4.Machine.syncOpStep op\n          (m.state\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        (Option.some { fst := state, snd := value }) →\n      Eq (Effect4.Program.evaluateNative root m f yielding table)\n        {\n          machine :=\n            {\n              fibers :=\n                m.fibers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              races :=\n                m.races\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              nextId :=\n                m.nextId\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              nextToken :=\n                m.nextToken\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              nextRace :=\n                m.nextRace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              middlewareInstalled :=\n                m.middlewareInstalled\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              armed :=\n                m.armed\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              state := state,\n              trace :=\n                m.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              stuck :=\n                m.stuck\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              forks :=\n                m.forks\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann) },\n          fiber :=\n            {\n              id :=\n                f.id\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              frame :=\n                have __src :=\n                  f.frame\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann);\n                { current := Effect4.Prim.success value, stack := __src.stack,\n                  interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                  deferredInterrupt := __src.deferredInterrupt },\n              running :=\n                f.running\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              parked :=\n                f.parked\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              pending :=\n                f.pending\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              finalizing :=\n                f.finalizing\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              exit :=\n                f.exit\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              currentOpCount :=\n                f.currentOpCount\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              maxOpsBeforeYield :=\n                f.maxOpsBeforeYield\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              preventYield :=\n                f.preventYield\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              yieldOverride :=\n                f.yieldOverride\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              observers :=\n                f.observers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              children :=\n                f.children\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              dispatcher :=\n                f.dispatcher\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              context :=\n                f.context\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann) },\n          yielding := yielding, outcome := Effect4.Machine.Outcome.answered,\n          nested := List.cons Effect4.Machine.Cmd.drainDue List.nil }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":86,"lemmas":59,"nearest":["Effect4.Program.Record.closed_tagArms","Effect4.Program.Ty.closed_diffTag","Effect4.Program.Ty.closed_payloadTy","Effect4.Program.closed_optionTy"]},"doc":"What a decision's arms bind is closed, at a closed scrutinee. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Decision.closed_arms","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {d : Effect4.Program.Decision} {t : Effect4.Program.Ty} {e0 e1 : List Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (d.arms t) (Option.some { fst := e0, snd := e1 }) →\n      And (∀ (x : Effect4.Program.Ty), List.instMembership.mem e0 x → Eq x.closed Bool.true)\n        (∀ (x : Effect4.Program.Ty), List.instMembership.mem e1 x → Eq x.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":255,"lemmas":66,"nearest":["Effect4.Program.Denote.denoteRows_straight"]},"doc":"**On `Looped` the budgeted meaning is `denoteB`, injected on the left** (Q1): a host-free\nloop calls no row. The left injection commutes with each arm (`inl_thenOpt`, `inl_iter`,\n`inl_loopStep`), and a leaf is `denoteRows_straight`. Claim `rows-loop-looped`. ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.denoteRowsB_looped","placement":{"concept":"translation-simulation","requirement":"R2"},"restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (k : Nat) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.Looped e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRowsB table k e env)\n      (Effect4.Program.Denote.denoteB k e env).inl","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":253,"lemmas":51,"nearest":[]},"doc":"**On `StraightRows` the budgeted meaning is `denoteRows`, finished** (Q1, the conservative\nconnector): no budget is read. Each arm is `thenOpt_map_some` and the induction. Claim\n`rows-loop-straight`. ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.denoteRowsB_straight","placement":{"concept":"translation-simulation","requirement":"R2"},"restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (k : Nat) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRowsB table k e env)\n      (Effects.Program.instMonad.map Option.some (Effect4.Program.Denote.denoteRows table e env))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":342,"lemmas":52,"nearest":[]},"doc":"**A finished approximant stays finished at every larger budget** (Q2): the same exit, stores\nand host state. A step of the loop closing step (`meaning_settledB`,\n`Agreement/HostedLoop.lean`), which turns one finishing budget into H8's eventual bound. It says\nnothing of an unfinished approximant. The route: the tree at `k` approximates the tree at\n`k'` (`Effects.Program.Approx`), and an approximant that finishes against a host finishes the same\nway as what it approximates (`Effects.Comodel.run_approx`). ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.hostRunB_stable","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} {table : Effect4.Program.RowTable}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ) {k k' : Nat},\n  instLENat.le k k' →\n    ∀ (e : Effect4.Program.NativeEff) (env : List Effect4.Machine.Val) (s : Effect4.Machine.Stores)\n      (st : σ) {ex : Effect4.Machine.ExitV} {r : Prod Effect4.Machine.Stores σ},\n      Eq (Effect4.Program.Denote.hostRunB host k e env s st)\n          (Option.some { fst := Option.some ex, snd := r }) →\n        Eq (Effect4.Program.Denote.hostRunB host k' e env s st)\n          (Option.some { fst := Option.some ex, snd := r })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":295,"lemmas":46,"nearest":[]},"doc":"**The detailed observation projects to the host meaning** (Q3): a finished tree to its exit,\na budget cut to `none` inside with its stores and host state, a wait to the outer `none`. A step\nof the frontier claim (`docs/research/2026-10-10-host-meaning-widening/README.md` Q4). ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsB","name":"Effect4.Program.Denote.observeRows_project","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} {table : Effect4.Program.RowTable}\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig table) σ)\n  (t : Effects.Program (Effect4.Program.Denote.RowsSig table) (Option Effect4.Machine.ExitV))\n  (s : Effect4.Machine.Stores) (state : σ),\n  Eq (((Effects.interpret (Effect4.Program.Denote.rowsHandler host.handler) t).run s).run state)\n    (Effect4.Program.Denote.observeRows host t s state).project","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":366,"lemmas":54,"nearest":[]},"doc":"**Two coherent sessions of one application and one sketch are one session**: the table is the\nsketch's. A step of `edit-session-undo`. Its consumer is `feed_undo`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.Coherent.ext","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l₁ l₂ : Effect4.Program.EditSession},\n  l₁.Coherent → l₂.Coherent → Eq l₁.app l₂.app → Eq l₁.sketch l₂.sketch → Eq l₁ l₂","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":416,"lemmas":60,"nearest":["Effect4.Program.Sketch.table_omit","Effect4.Program.Sketch.table_fill","Effect4.Program.effTy_of_check","Conform.Effect4.Typing.check_sound","Effect4.Program.Annotate.check_eq","Effect4.Program.Table.typedAt_table","Effect4.Program.Table.typedAt_table_nil","Effect4.Program.Sketch.annotate_eq_table"]},"doc":"**An edit keeps a session coherent.** Where the edit splices, the table read the focus and the\nroot's type, and the checker gave the new sub-program the focus's type at the part's signature,\nso the splice over a whole program's parts (`Sketch.table_fill`) gives the edited sketch's table.\nEvery other edit computes the table again, or changes nothing. A step of\n`edit-session-coherent`. Its consumers are `run_coherent` and `feed_undo`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_coherent","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession},\n  l.Coherent → ∀ (e : Effect4.Program.Edit), (l.feed e).fst.Coherent","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":397,"lemmas":57,"nearest":[]},"doc":"**An edit keeps the application, and one that applies holds the filled sketch.** A step of\n`edit-session-coherent` and of `edit-session-undo`. Its consumers are `run_keeps` and\n`feed_undo`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_keeps","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (l : Effect4.Program.EditSession) (e : Effect4.Program.Edit),\n  And (Eq (l.feed e).fst.app l.app)\n    (∀ (a : List Nat) (q : Effect4.Program.NativeEff) (s' : Effect4.Program.Sketch),\n      Eq e (Effect4.Program.Edit.fill a q) →\n        Eq (l.sketch.fillAt a q) (Option.some s') → Eq (l.feed e).fst.sketch s')","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":397,"lemmas":57,"nearest":["Effect4.Program.Table.mem_splice","Effect4.Program.EditSession.feed_spliced","Effect4.Program.EditSession.feed_shown"]},"doc":"**A spliced edit repaints its subtree and nothing else**: the addresses it shows again are the\nnew subtree's, and every entry of the new table at another address is an entry of the old table.\nThe pointer of `edit-repaint-set`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_repaint","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession} {a : List Nat} {q : Effect4.Program.NativeEff}\n  {shown : List (List Nat)},\n  Eq (l.feed (Effect4.Program.Edit.fill a q)).snd (Effect4.Program.Edit.Delta.spliced shown) →\n    And\n      (Eq shown\n        (List.map (fun x => instHAppendOfAppend.hAppend a x)\n          (Effect4.Program.Node.eff q).addresses))\n      (∀ (x : Effect4.Program.Table.Entry),\n        List.instMembership.mem (l.feed (Effect4.Program.Edit.fill a q)).fst.table x →\n          Not (List.instMembership.mem shown x.path) → List.instMembership.mem l.table x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":406,"lemmas":57,"nearest":["Effect4.Program.Annotate.check_eq"]},"doc":"**The addresses a spliced edit shows again are the new subtree's**, at the edited address. A\nstep of `edit-repaint-set`. Its consumer is `feed_repaint`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_shown","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession} {a : List Nat} {q : Effect4.Program.NativeEff}\n  {shown : List (List Nat)},\n  Eq (l.feed (Effect4.Program.Edit.fill a q)).snd (Effect4.Program.Edit.Delta.spliced shown) →\n    Eq shown\n      (List.map (fun x => instHAppendOfAppend.hAppend a x) (Effect4.Program.Node.eff q).addresses)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":398,"lemmas":57,"nearest":[]},"doc":"**A spliced edit's table is a splice of the old one**, and the addresses it shows are the\nspliced segment's. A step of `edit-repaint-set`. Its consumer is `feed_repaint`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_spliced","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession} {a : List Nat} {q : Effect4.Program.NativeEff}\n  {shown : List (List Nat)},\n  Eq (l.feed (Effect4.Program.Edit.fill a q)).snd (Effect4.Program.Edit.Delta.spliced shown) →\n    Exists fun sub =>\n      And\n        (Eq (l.feed (Effect4.Program.Edit.fill a q)).fst.table\n          (Effect4.Program.Table.splice l.table a sub))\n        (Eq shown (List.map (fun x => x.path) sub))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":408,"lemmas":57,"nearest":["Effect4.Program.EditSession.feed_coherent","Effect4.Program.EditSession.Coherent.ext","Effect4.Program.Node.replaceAt_spec","Effect4.Program.Sketch.fillAt_of_replaceAt","Effect4.Program.EditSession.feed_keeps","Effect4.Program.Sketch.fillAt_some"]},"doc":"**Undo**: an edit that applies, then the edit that puts back the old sub-program, restores a\ncoherent session exactly, its table included. The path lens's get-put (`replaceAt_spec`) restores\nthe sketch, and coherence restores the table. The pointer of `edit-session-undo`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.feed_undo","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession},\n  l.Coherent →\n    ∀ {a : List Nat} {q old : Effect4.Program.NativeEff} {s' : Effect4.Program.Sketch},\n      Eq ((Effect4.Program.Node.eff l.sketch.program).at_ a)\n          (Option.some (Effect4.Program.Node.eff old)) →\n        Eq (l.sketch.fillAt a q) (Option.some s') →\n          Eq\n            ((l.feed (Effect4.Program.Edit.fill a q)).fst.feed\n                (Effect4.Program.Edit.fill a old)).fst\n            l","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Program.Sketch.annotate_eq_table"]},"doc":"**An open session is coherent**: the table part by part is the table. A step of\n`edit-session-coherent`. Its consumer is `reached_coherent`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.open_coherent","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (s : Effect4.Program.Sketch),\n  (Effect4.Program.EditSession.open app s).Coherent","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":365,"lemmas":54,"nearest":["Effect4.Program.EditSession.open_coherent","Effect4.Program.EditSession.run_coherent"]},"doc":"**Every session reached by an open and edits is coherent.** A step of\n`edit-session-coherent`. Its consumer is `reached_view`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.reached_coherent","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (s : Effect4.Program.Sketch) (edits : List Effect4.Program.Edit),\n  ((Effect4.Program.EditSession.open app s).run edits).Coherent","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":409,"lemmas":57,"nearest":["Effect4.Program.EditSession.feed_coherent"]},"doc":"**A run of edits keeps a session coherent**: the fold of `feed_coherent`. A step of\n`edit-session-coherent`. Its consumer is `reached_coherent`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.run_coherent","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession},\n  l.Coherent → ∀ (edits : List Effect4.Program.Edit), (l.run edits).Coherent","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":398,"lemmas":57,"nearest":["Effect4.Program.EditSession.feed_keeps"]},"doc":"**A run of edits keeps the application.** A step of `edit-session-coherent`. Its consumer is\n`reached_view`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.run_keeps","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (l : Effect4.Program.EditSession) (edits : List Effect4.Program.Edit), Eq (l.run edits).app l.app","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":413,"lemmas":55,"nearest":[]},"doc":"**A coherent session shows its sketch's refusals**: the head is the sketch's check's refusal,\nand the list is empty exactly when the sketch checks (`Sketch.refusals_nil_iff`). A step of\n`edit-session-coherent`. Its consumer is `reached_view`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.view_refusals","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession}, l.Coherent → Eq l.view.refusals (l.sketch.refusals l.app)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":412,"lemmas":55,"nearest":["Effect4.Program.Table.typedAt_table_nil"]},"doc":"**A coherent session shows its sketch's type**, its check's answer, with no check. A step of\n`edit-session-coherent`. Its consumer is `reached_view`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.EditSession.view_type","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {l : Effect4.Program.EditSession}, l.Coherent → Eq l.view.type (l.sketch.check l.app).toOption","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":[]},"doc":"A program that is a block is one. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Eff.eq_defs_of_isBlock","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {e : Effect4.Program.Eff Op},\n  Eq e.isBlock Bool.true →\n    Exists fun decls =>\n      Exists fun bodies =>\n        Exists fun main =>\n          Exists fun layers => Eq e (Effect4.Program.Eff.defs decls bodies main layers)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":[]},"doc":"A program that is no block is none of the block's constructor. A step of\n`module-table-splices`. Its consumers are `annotateModule_plain` and `Eff.partAt_plain`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Eff.ne_defs_of_isBlock","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {e : Effect4.Program.Eff Op},\n  Eq e.isBlock Bool.false →\n    ∀ (decls : List Effect4.Program.DefDecl) (bodies : Effect4.Program.Effs Op)\n      (main : Effect4.Program.Eff Op) (layers : Effect4.Program.LayerTerms Op),\n      Ne e (Effect4.Program.Eff.defs decls bodies main layers)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":109,"lemmas":37,"nearest":["Effect4.Program.Part.bodyAt_at"]},"doc":"**The part holds the node at the address**: the node at an address of a program is the node\nat the rest of the address in the part that `Eff.partAt` answers. A step of\n`programCallAt_rowTy`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Eff.partAt_at","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {part : Effect4.Program.Part Op} {rest : List Nat},\n  Eq (Effect4.Program.Eff.partAt s env0 p path) (Option.some { fst := part, snd := rest }) →\n    Eq ((Effect4.Program.Node.eff p).at_ path) ((Effect4.Program.Node.eff part.program).at_ rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":248,"lemmas":54,"nearest":[]},"doc":"**A typed program with no block is its own part**: `HasTy` derives no type for a block, so\nthe part at every address is the program itself. A step of `hasTy_programCallAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Eff.partAt_of_hasTy","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    ∀ (path : List Nat),\n      Eq (Effect4.Program.Eff.partAt s env0 p path)\n        (Option.some { fst := { sig := s, env := env0, program := p }, snd := path })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":107,"lemmas":37,"nearest":[]},"doc":"A program that is no block is one part. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Eff.partAt_plain","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op},\n  Eq p.isBlock Bool.false →\n    ∀ (path : List Nat),\n      Eq (Effect4.Program.Eff.partAt s env0 p path)\n        (Option.some { fst := { sig := s, env := env0, program := p }, snd := path })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":106,"lemmas":37,"nearest":["Effect4.Program.Part.bodyAt_resig"]},"doc":"**The part at another signature**: the address names a part at every signature, with the\nsame rest. A step of `Sketch.check_fill_focusAt`, where the hole table grows. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Eff.partAt_resig","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {part : Effect4.Program.Part Op} {rest : List Nat},\n  Eq (Effect4.Program.Eff.partAt s env0 p path) (Option.some { fst := part, snd := rest }) →\n    Exists fun part' =>\n      Eq (Effect4.Program.Eff.partAt s' env0 p path) (Option.some { fst := part', snd := rest })","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":82,"lemmas":0,"nearest":[]},"doc":"**An operation's own data is scope-checked.** A `perform` node is scoped at level `n`\nexactly when its operation's data is, by the alphabet's `ScopedOp` instance, and its request\nis: the generated operation arm of the scope fold (`scopedAlgebra`, `Program/Scoped.lean`),\nread as a decision.\n\nConcept `initial-algebras-folds`, claim `operation-data-scoped` (role decidability), serving\nR4 (state plan T0). Reach: the scope check `Eff.scopedAt`, at every level, at every alphabet\nwith a `ScopedOp` instance, with no other hypothesis. It does not establish term typing: scope\nis not typing, and the type of a term an operation carries is state plan T3's (`rowTy`). It\ndoes not establish that an instance follows `ScopedOp`'s binder convention, which is each\ninstance's contract. Consumer: T3's term rows, where the checker refuses an unscoped term\nbefore typing it; the red controls are `Test/Program/ScopedOpContract.lean`. ","kind":"theorem","module":"Effect4.Laws.Program.Authoring","name":"Effect4.Program.Eff.perform_scoped_iff","placement":{"concept":"initial-algebras-folds","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (n : Nat) (op : Op) (arg : Effect4.Program.Term),\n  Iff (Eq (Effect4.Program.Eff.scopedAt n (Effect4.Program.Eff.perform op arg)) Bool.true)\n    (And (Eq (inst.scopedAt op n) Bool.true) (Eq (Effect4.Program.Term.scoped n arg) Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":978,"lemmas":466,"nearest":["Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.FinalizerCredits.getCont_le","Effect4.Machine.FinalizerCredits.step_debit","Effect4.Machine.FinalizerCredits.finalizerOr_debit","Effect4.Machine.ControlWeights.replace_sum","Effect4.Machine.Lift.driveState_lift"]},"doc":"Whole-run custody law of the at-most-once claim.\nThe command lift consumes the checked evaluator, native scoped exit, observer and bookkeeping clauses.\nConsumer: `starts_le_pushes`, then the atomic cleanup-log claim. ","kind":"theorem","module":"Effect4.Laws.Program.FinalizerRun","name":"Effect4.Program.FinalizerRun.funded_reachable","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Effect4.Program.Guard.Reachable p table cf m →\n    Effect4.Machine.FinalizerCredits.Funded (Effect4.Program.FinalizerRun.atPath q) m","status":"proved"},{"axioms":[],"broughtIn":{"definitions":873,"lemmas":65,"nearest":[]},"doc":"Control-source uniqueness obligation of the at-most-once claim.\nA once-placed source pushes its finalizer frame at most once across all fibers.\nConsumer: the atomic cleanup-log claim. It supplies no finalizer progress. ","kind":"goal","module":"Effect4.Laws.Program.FinalizerRun","name":"Effect4.Program.FinalizerRun.once_placed_pushes_once","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Effect4.Program.FinalizerRun.once_placed_pushes_once"],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Eq (Effect4.Program.OncePlaced (Effect4.Program.Node.eff p) q) Bool.true →\n    Effect4.Program.Guard.Reachable p table cf m →\n      instLENat.le\n        (List.countP (Effect4.Program.FinalizerRun.registeredAt q)\n          (m.trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        1","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":877,"lemmas":65,"nearest":["Effect4.Program.FinalizerRun.funded_reachable"]},"doc":"Finalizer starts spend recorded pushes, retaining any unspent stack credits.\nEvery native decision prefix satisfies the bound. ","kind":"theorem","module":"Effect4.Laws.Program.FinalizerRun","name":"Effect4.Program.FinalizerRun.starts_le_pushes","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Effect4.Program.Guard.Reachable p table cf m →\n    instLENat.le\n      (List.countP (Effect4.Program.FinalizerRun.startedAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n      (List.countP (Effect4.Program.FinalizerRun.registeredAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.actionAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.ActionTerm Op),\n      Eq\n        (Effect4.Program.Formation.actionAll P\n          (Effect4.Program.cata_action (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.actionAll P node)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.allTypes_append","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (a b : List (Prod (List String) Effect4.Program.Ty)),\n  Eq (Effect4.Program.Formation.allTypes P (instHAppendOfAppend.hAppend a b))\n    (And (Effect4.Program.Formation.allTypes P a) (Effect4.Program.Formation.allTypes P b))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.allTypes_nil","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop), Eq (Effect4.Program.Formation.allTypes P List.nil) True","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.allTypes_singleton","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (path : List String) (ty : Effect4.Program.Ty),\n  Eq (Effect4.Program.Formation.allTypes P (List.cons { fst := path, snd := ty } List.nil)) (P ty)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"The types a list states at its positions, whatever path each is filed under. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.allTypes_zipIdx_map","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (tys : List Effect4.Program.Ty)\n  (f : Prod Effect4.Program.Ty Nat → Prod (List String) Effect4.Program.Ty),\n  (∀ (x : Prod Effect4.Program.Ty Nat), Eq (f x).snd x.fst) →\n    Eq (Effect4.Program.Formation.allTypes P (List.map f tys.zipIdx))\n      (∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → P t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":140,"lemmas":0,"nearest":["Effect4.Program.Formation.effAll_onRef","Effect4.Program.Formation.layerAll_of_layerAt","Effect4.Program.Formation.programAnnotations_all"]},"doc":"**A program's expansion states what the program states.** Each round replaces a reference\nby the layer at its target in the stored program, and that layer's annotations are the\nprogram's (`layerAll_of_layerAt`). So each round keeps the fold (`effAll_onRef`). No premise is\nasked of the references. A step of `typeOfProgram_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.annotationsAll_expandRefs","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (root : Effect4.Program.Eff Op),\n  Effect4.Program.Formation.AnnotationsAll P Effect4.Program.EffFam.eff root →\n    Effect4.Program.Formation.AnnotationsAll P Effect4.Program.EffFam.eff root.expandRefs","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":135,"lemmas":37,"nearest":["Effect4.Program.Formation.annotations_closed","Effect4.Program.Formation.programAnnotations_all"]},"doc":"A program whose annotations are formed states closed types only, in the fold's form. A step\nof `check_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.annotationsClosed_of_formed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {e : Effect4.Program.Eff Op},\n  Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites e) →\n    Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.eff e","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":112,"lemmas":37,"nearest":["Effect4.Program.Formation.closed_of_formed"]},"doc":"Every annotation of a program whose annotations are formed has a closed type. A step of\n`check_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.annotations_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {e : Effect4.Program.Eff Op},\n  Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites e) →\n    ∀ (x : Prod (List String) Effect4.Program.Ty),\n      List.instMembership.mem (Effect4.Program.Formation.programAnnotations e) x →\n        Eq x.snd.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":29,"lemmas":0,"nearest":["Effect4.Program.Formation.allTypes_append","Effect4.Program.Formation.allTypes_nil"]},"doc":"The annotations of an argument list, as `ArgsAll`. A step of `nodeAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.argsAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f :\n    Prod (Effect4.Program.ArgF Op (Effect4.Program.EffSelfCarrier Op)) Nat →\n      List (Prod (List String) Effect4.Program.Ty)),\n  (∀ (x : Prod (Effect4.Program.ArgF Op (Effect4.Program.EffSelfCarrier Op)) Nat),\n      Eq (Effect4.Program.Formation.allTypes P (f x)) (Effect4.Program.Formation.ArgAll P x.fst)) →\n    ∀ (args : List (Effect4.Program.ArgF Op (Effect4.Program.EffSelfCarrier Op))) (k : Nat),\n      Eq (Effect4.Program.Formation.allTypes P (List.flatMap f (args.zipIdx k)))\n        (Effect4.Program.Formation.ArgsAll P args)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":33,"lemmas":0,"nearest":["Effect4.Program.Formation.declAnnotations_all","Effect4.Program.Formation.forall_mem_some","Effect4.Program.Formation.allTypes_singleton","Effect4.Program.Formation.forall_mem_none","Effect4.Program.Formation.allTypes_zipIdx_map","Effect4.Program.Formation.optionTerm_all","Effect4.Program.Formation.allTypes_append","Effect4.Program.Formation.causeAnnotations_all","Effect4.Program.Formation.termAnnotations_all","Effect4.Program.Formation.allTypes_nil"]},"doc":"The annotations of one argument, as `ArgAll`. A step of `nodeAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.argumentAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (path : List String) (index : Nat)\n  (arg : Effect4.Program.ArgF Op (Effect4.Program.EffSelfCarrier Op)),\n  Eq\n    (Effect4.Program.Formation.allTypes P\n      (Effect4.Program.Formation.argumentAnnotations path index arg))\n    (Effect4.Program.Formation.ArgAll P arg)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.Formation.allTypes_append","Effect4.Program.Formation.optionTerm_all","Effect4.Program.Formation.termAnnotations_all"]},"doc":"The annotations of a cause, as a fold. A step of `programAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.causeAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (c : Effect4.Program.CauseTerm) (path : List String),\n  Eq (Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.causeAnnotations path c))\n    (Effect4.Program.Formation.CauseAll P c)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":37,"nearest":["Effect4.Program.Formation.formed_sites_iff","Effect4.Program.Formation.closed_of_nodes"]},"doc":"**Strict formation gives a closed type.** Outside a template the head judgment refuses a\nvariable, so a type whose sites are formed there holds none. The row rule and the record rule\nof the checker check exactly this judgment, so each answers a closed type with no premise\n(`closed_rowTy`, `argTy_closed`). A step of `check_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.closed_of_formed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {path : List String} {ty : Effect4.Program.Ty},\n  Effect4.Program.Formation.Formed (Effect4.Program.Formation.sites Bool.false path ty) →\n    Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":13,"lemmas":3,"nearest":["Effect4.Program.Formation.mem_nodes_item","Effect4.Program.Formation.mem_nodes_field"]},"doc":"A type with no variable among its raw occurrences is closed. A step of `closed_of_formed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.closed_of_nodes","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {ty : Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty),\n      List.instMembership.mem (Effect4.Program.Formation.nodes ty) t →\n        ∀ (i : Nat), Ne t (Effect4.Program.Ty.var i)) →\n    Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":[]},"doc":"The declared columns of a definition block, as `ArgAll`. A step of\n`argumentAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.declAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (path : List String) (ds : List Effect4.Program.DefDecl),\n  Eq (Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.declAnnotations path ds))\n    (∀ (d : Effect4.Program.DefDecl),\n      List.instMembership.mem ds d →\n        And (P d.request)\n          (And (P d.answer)\n            (And (P d.error)\n              (∀ (q : Effect4.Program.ParamDecl),\n                List.instMembership.mem d.params q →\n                  And (P q.request) (And (P q.answer) (P q.error))))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"**A substitution of the layer references keeps the annotations' fold**, when each substitute\nsatisfies it. A reference states nothing, a substitute states what its fold says, and no other\nnode's own arguments change. The statement is on the generated folds, one per sort, each proved\nby the sort's own case list. Its consumer is `annotationsAll_expandRefs`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.effAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.Eff Op),\n      Eq\n        (Effect4.Program.Formation.effAll P\n          (Effect4.Program.cata_eff (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.effAll P node)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.effsAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.Effs Op),\n      Eq\n        (Effect4.Program.Formation.effsAll P\n          (Effect4.Program.cata_effs (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.effsAll P node)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A property of each member of an option, at `none`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.forall_mem_none","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} (p : α → Prop), Eq (∀ (x : α), Option.instMembership.mem Option.none x → p x) True","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A property of each member of an option, at `some`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.forall_mem_some","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} (p : α → Prop) (a : α),\n  Eq (∀ (x : α), Option.instMembership.mem (Option.some a) x → p x) (p a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":37,"nearest":[]},"doc":"**The judgment of a type's sites is the head judgment at each raw occurrence**, at the\nsites' template flag. A step of `closed_of_formed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.formed_sites_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {template : Bool} {path : List String} {ty : Effect4.Program.Ty},\n  Iff (Effect4.Program.Formation.Formed (Effect4.Program.Formation.sites template path ty))\n    (∀ (t : Effect4.Program.Ty),\n      List.instMembership.mem (Effect4.Program.Formation.nodes ty) t →\n        Effect4.Program.Formation.HeadFormed template t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":119,"lemmas":37,"nearest":[]},"doc":"The program sites of a formed input are formed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.inputFormed_program","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {program : Effect4.Program.Eff Op}\n  {table : List Effect4.Program.Row} {services : List (Prod Effect4.ServiceKey Effect4.Program.Ty)},\n  Effect4.Program.Formation.InputFormed program table services →\n    Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites program)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":119,"lemmas":37,"nearest":[]},"doc":"The service sites of a formed input are formed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.inputFormed_services","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {program : Effect4.Program.Eff Op}\n  {table : List Effect4.Program.Row} {services : List (Prod Effect4.ServiceKey Effect4.Program.Ty)},\n  Effect4.Program.Formation.InputFormed program table services →\n    Effect4.Program.Formation.Formed (Effect4.Program.Formation.serviceSites services)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":3,"nearest":["Effect4.Program.Formation.nodeAnnotations_all","Effect4.Program.Formation.allTypes_append","Effect4.Program.foldMapAt_layer_fuse"]},"doc":"**The layer at a path of a program states what the program states there.** The path fold\ncollects every addressed node's fold (`Node.foldList_subset_of_at`), and the layer's path fold\nis its fold with no path (`foldMapAt_layer_fuse`). A step of `annotationsAll_expandRefs`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.layerAll_of_layerAt","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  {root : Effect4.Program.Eff Op} {target : List Nat} {layer : Effect4.Program.LayerTerm Op},\n  Eq ((Effect4.Program.Node.eff root).layerAt target) (Option.some layer) →\n    Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.programAnnotations root) →\n      Effect4.Program.Formation.layerAll P layer","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a layer, the one sort with a reference: the substitute stands there. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.layerAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.LayerTerm Op),\n      Eq\n        (Effect4.Program.Formation.layerAll P\n          (Effect4.Program.cata_layer (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.layerAll P node)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.layersAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.LayerTerms Op),\n      Eq\n        (Effect4.Program.Formation.layersAll P\n          (Effect4.Program.cata_layers (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.layersAll P node)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"A field's raw occurrences are occurrences of its field list. A step of `closed_of_nodes`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.mem_nodes_field","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {n : String} {o : Bool} {u t : Effect4.Program.Ty}\n  {fs : List (Prod String (Prod Bool Effect4.Program.Ty))},\n  List.instMembership.mem fs { fst := n, snd := { fst := o, snd := u } } →\n    List.instMembership.mem (Effect4.Program.Formation.nodes u) t →\n      List.instMembership.mem\n        (Effect4.Program.foldMap_pos_list_prod_string_prod_bool_ty List.nil\n          (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) fs fun t => List.cons t List.nil)\n        t","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":[]},"doc":"An item's raw occurrences are occurrences of its item list. A step of `closed_of_nodes`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.mem_nodes_item","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {u t : Effect4.Program.Ty} {ts : List Effect4.Program.Ty},\n  List.instMembership.mem ts u →\n    List.instMembership.mem (Effect4.Program.Formation.nodes u) t →\n      List.instMembership.mem\n        (Effect4.Program.foldMap_pos_list_ty List.nil\n          (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) ts fun t => List.cons t List.nil)\n        t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":41,"lemmas":0,"nearest":["Effect4.Program.Formation.argumentAnnotations_all","Effect4.Program.Formation.argsAnnotations_all"]},"doc":"The annotations of one node, as `NodeAll`, at every path. A step of\n`programAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.nodeAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (fam : Effect4.Program.EffFam) (node : Effect4.Program.EffSelfCarrier Op fam) (path : List Nat),\n  Eq\n    (Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.nodeAnnotations fam node path))\n    (Effect4.Program.Formation.NodeAll P fam node)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.Formation.forall_mem_some","Effect4.Program.Formation.termAnnotations_all","Effect4.Program.Formation.forall_mem_none","Effect4.Program.Formation.allTypes_nil"]},"doc":"The annotations of an optional term. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.optionTerm_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (path : List String) (t : Option Effect4.Program.Term),\n  Eq\n    (Effect4.Program.Formation.allTypes P\n      (List.flatMap (Effect4.Program.Formation.termAnnotations path) t.toList))\n    (∀ (x : Effect4.Program.Term),\n      Option.instMembership.mem t x → Effect4.Program.Formation.TermAll P x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":61,"lemmas":0,"nearest":["Effect4.Program.Formation.nodeAnnotations_all","Effect4.Program.Formation.allTypes_append","Effect4.Program.foldMapAt_eff_fuse"]},"doc":"**The annotations of a program, as a fold**: every annotation's type satisfies `P` exactly\nwhen the program's fold does. The collector reads each node through the generated view, and so\ndoes `NodeAll`: no constructor of the program's family is named. A step of `check_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.programAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (e : Effect4.Program.Eff Op),\n  Iff (Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.programAnnotations e))\n    (Effect4.Program.Formation.AnnotationsAll P Effect4.Program.EffFam.eff e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":80,"lemmas":37,"nearest":["Effect4.Program.Formation.closed_of_formed"]},"doc":"Each declared carrier of a formed list of service sites is closed. A step of\n`closedSig_app`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.services_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {services : List (Prod Effect4.ServiceKey Effect4.Program.Ty)},\n  Effect4.Program.Formation.Formed (Effect4.Program.Formation.serviceSites services) →\n    ∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem services entry → Eq entry.snd.closed Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.stmtAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.Stmt Op),\n      Eq\n        (Effect4.Program.Formation.stmtAll P\n          (Effect4.Program.cata_stmt (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.stmtAll P node)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":128,"lemmas":0,"nearest":[]},"doc":"`effAll_onRef` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.stmtsAll_onRef","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (P : Effect4.Program.Ty → Prop)\n  (f : List Nat → Effect4.Program.LayerTerm Op),\n  (∀ (target : List Nat), Eq (Effect4.Program.Formation.layerAll P (f target)) True) →\n    ∀ (node : Effect4.Program.Stmts Op),\n      Eq\n        (Effect4.Program.Formation.stmtsAll P\n          (Effect4.Program.cata_stmts (Effect4.Program.refAlgebra f) node))\n        (Effect4.Program.Formation.stmtsAll P node)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.Formation.allTypes_singleton","Effect4.Program.Formation.allTypes_nil","Effect4.Program.Formation.allTypes_append","Effect4.Program.foldMapAt_term_fuse"]},"doc":"**The annotations of a term, as a fold**: every annotation's type satisfies `P` exactly when\nthe term's fold does, at every path. A step of `programAnnotations_all`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Formation.termAnnotations_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (P : Effect4.Program.Ty → Prop) (path : List String) (t : Effect4.Program.Term),\n  Eq (Effect4.Program.Formation.allTypes P (Effect4.Program.Formation.termAnnotations path t))\n    (Effect4.Program.Formation.TermAll P t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"The answer of a generator over a closed state is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.GenTy.closed_genAnswer","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {g : Effect4.Program.GenTy}, g.Closed → Eq g.genAnswer.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"The joined answer of two generator states. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.GenTy.closed_joinAnswerT","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a b : Option Effect4.Program.Ty},\n  (∀ (x : Effect4.Program.Ty), Option.instMembership.mem a x → Eq x.closed Bool.true) →\n    (∀ (x : Effect4.Program.Ty), Option.instMembership.mem b x → Eq x.closed Bool.true) →\n      ∀ (x : Effect4.Program.Ty),\n        Option.instMembership.mem (Effect4.Program.GenTy.joinAnswerT a b) x → Eq x.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":81,"lemmas":54,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.GenTy.closed_joinAnswerT"]},"doc":"An `if`'s merged state is closed when both branches' are. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.GenTy.closed_merge","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a b ab : Effect4.Program.GenTy},\n  Eq (a.merge b) (Option.some ab) → a.Closed → b.Closed → ab.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":81,"lemmas":54,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.GenTy.closed_joinAnswerT"]},"doc":"A statement's state before its tail's is closed when both are. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.GenTy.closed_seq","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {s r g : Effect4.Program.GenTy}, Eq (s.seq r) (Option.some g) → s.Closed → r.Closed → g.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":237,"lemmas":54,"nearest":[]},"doc":"A typed program is no block. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill_plain`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.HasTy.isBlock","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env e t → Eq e.isBlock Bool.false","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1004,"lemmas":478,"nearest":["Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Scope.closeOrder_eq","Effect4.Machine.Lift.driveState_lift"]},"doc":"Every reachable store row retains its source and environment level.\nThis theorem is the pointer of `cell-invariant-from-write-sites`.\nThe command/history induction belongs to `Machine.Lift`; the obligation is source provenance\nand store preservation. Consumer: `Atomic.bounded`. ","kind":"theorem","module":"Effect4.Laws.Program.HeapSites","name":"Effect4.Program.HeapSites.heap_sites_keep","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (b : Effect4.Api.Built) (compileFuel : Nat) (P : Effect4.Machine.Val → Prop),\n  Effect4.Program.SourceScope.Fragment b.program →\n    Effect4.Program.HeapSites.SitesKeep b.program P →\n      ∀ (m : Effect4.Program.NativeMachine),\n        Effect4.Run.ControlHistory b compileFuel m →\n          Effect4.Program.HeapSites.HeapOk P\n            (m.state\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).refs","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":935,"lemmas":231,"nearest":["Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.FinalizerCredits.getCont_le","Effect4.Machine.FinalizerCredits.step_debit","Effect4.Machine.FinalizerCredits.finalizerOr_debit","Effect4.Machine.ControlWeights.replace_sum","Effect4.Machine.StackLedger.funded_reachable"]},"doc":"**The run law's instance**: finalizer custody at every reachable machine, re-derived through\n`StackLedger.funded_reachable` with no command case of its own. ","kind":"theorem","module":"Effect4.Laws.Program.LedgerFinalizer","name":"Effect4.Program.LedgerFinalizer.funded_reachable","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (cf : Nat)\n  (m : Effect4.Program.NativeMachine) (q : List Nat),\n  Effect4.Program.Guard.Reachable p table cf m →\n    Effect4.Machine.FinalizerCredits.Funded (Effect4.Program.FinalizerRun.atPath q) m","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A `dropWhile` that drops every element: every element satisfied the test. A step of\n`Table.splice_append_out_right`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.List.all_of_dropWhile_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} {p : α → Bool} {l : List α},\n  Eq (List.dropWhile p l) List.nil → ∀ (x : α), List.instMembership.mem l x → Eq (p x) Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A `takeWhile` as long as its list keeps every element. A step of\n`Table.splice_append_out_right`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.List.all_of_takeWhile_length","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} {p : α → Bool} {l : List α},\n  Eq (List.takeWhile p l).length l.length →\n    ∀ (x : α), List.instMembership.mem l x → Eq (p x) Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A `dropWhile` of a list whose every element satisfies the test is empty. A step of\n`Table.splice_all_under`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.List.dropWhile_eq_nil_of_all","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} {p : α → Bool} {l : List α},\n  (∀ (x : α), List.instMembership.mem l x → Eq (p x) Bool.true) → Eq (List.dropWhile p l) List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":80,"lemmas":138,"nearest":[]},"doc":"A normal member below `causeUpper b` is a cause or exit type whose error is below `b`. The\none inversion that `Member.cause_least` and `Member.cause_reads` read, its two consumers. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.cause_cases_of_below","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m b : Effect4.Program.Ty},\n  m.Normal →\n    Eq m.isMember Bool.true →\n      Eq (m.subN (Effect4.Program.causeUpper b)) Bool.true →\n        Exists fun e =>\n          And (Eq (Effect4.Program.Member.cause m) (Option.some e)) (Eq (e.subN b) Bool.true)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"A closed cause or exit type has a closed error type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Member.cause_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m a : Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Member.cause m) (Option.some a) → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":["Effect4.Program.Member.cause_cases_of_below"]},"doc":"**The least member fact of the cause rule.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.cause_least","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m a b : Effect4.Program.Ty},\n  m.Normal →\n    Eq m.isMember Bool.true →\n      Eq (Effect4.Program.Member.cause m) (Option.some a) →\n        Eq (m.subN (Effect4.Program.causeUpper b)) Bool.true → Eq (a.subN b) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":130,"nearest":["Effect4.Program.Member.cause_reads","Effect4.Program.Member.cause_least","Effect4.Program.Member.cause_upper","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.below_of_upper"]},"doc":"**The cause rule is monotone on normal union members.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.cause_monotone","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.UnionRule.Below Effect4.Program.Member.cause Effect4.Program.Member.cause","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":["Effect4.Program.Member.cause_cases_of_below"]},"doc":"**The reads member fact of the cause rule.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.cause_reads","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m b : Effect4.Program.Ty},\n  m.Normal →\n    Eq m.isMember Bool.true →\n      Eq (m.subN (Effect4.Program.causeUpper b)) Bool.true →\n        Exists fun a => Eq (Effect4.Program.Member.cause m) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":["Effect4.Program.subN_causeOf_causeUpper","Effect4.Program.subN_exitOf_causeUpper"]},"doc":"**The upper member fact of the cause rule.** Every normal member that `Member.cause`\nanswers is below `causeUpper` of its answer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.cause_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m a : Effect4.Program.Ty},\n  m.Normal →\n    Eq m.isMember Bool.true →\n      Eq (Effect4.Program.Member.cause m) (Option.some a) →\n        Eq (m.subN (Effect4.Program.causeUpper a)) Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"**A closed exit type has closed value and error types.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.exit_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Member.exit m) (Option.some a) →\n      And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":86,"lemmas":154,"nearest":["Effect4.Program.Ty.subN_exitOf_iff","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**`Member.exit` is the eliminator of the exit constructor.** It answers only at an exit type,\nwith that type's columns. The constructor keeps and reflects the order. It reads each normal\nunion member that is below an exit type. A step of the claim `union-rule-extend`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.exit_eliminator","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.UnionRule.Eliminator Effect4.Program.Member.exit\n  (Function.uncurry Effect4.Program.Ty.exitOf)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":37,"nearest":[]},"doc":"**`Member.exit` answers at one union member.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.exit_one","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq (Effect4.Program.Member.exit t) (Option.some a) → instLENat.le t.normalize.members.length 1","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"**A closed fiber type has closed columns**: the member fact of `extend_closed_pair` at the\nfiber rule. Its consumer is `closed_fiberTy`\n(`src/Effect4/Laws/Program/Typing/Closed.lean`), the fiber case of the claim\n`checked-types-closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.fiber_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Member.fiber m) (Option.some a) →\n      And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":86,"lemmas":154,"nearest":["Effect4.Program.Ty.subN_fiberOf_iff","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**`Member.fiber` is the eliminator of the fiber constructor.** It answers only at a fiber\ntype, with that type's columns. The constructor keeps and reflects the order. It reads each\nnormal union member that is below a fiber type. A step of the claim\n`union-rule-extend`, at its first instance. Its consumers are `fiberTy_upper`, and the order\nlaws of the fiber rule by projection (`Test/Program/Eliminators.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.fiber_eliminator","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.UnionRule.Eliminator Effect4.Program.Member.fiber\n  (Function.uncurry Effect4.Program.Ty.fiberOf)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":37,"nearest":[]},"doc":"**`Member.fiber` answers at one union member.** Where it answers at a raw type, that type's\nnormal form has at most one union member: the normal form of a fiber type is a fiber type. It\nis the premise of `Eliminator.extend_liftOne` at the fiber rule, its consumer: the raw answer of\n`fiberTy` is a matter of spelling. A rule that reads a product does not have this fact. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.fiber_one","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq (Effect4.Program.Member.fiber t) (Option.some a) → instLENat.le t.normalize.members.length 1","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"**A closed list type has a closed element type.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.list_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m a : Effect4.Program.Ty},\n  Eq m.closed Bool.true → Eq (Effect4.Program.Member.list m) (Option.some a) → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":148,"nearest":["Effect4.Program.Ty.subN_list_iff","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**`Member.list` is the eliminator of the list constructor.** It answers only at a list type,\nwith that type's element type. The constructor keeps and reflects the order. It reads each normal\nunion member that is below a list type. A step of the claim `union-rule-extend`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.list_eliminator","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.UnionRule.Eliminator Effect4.Program.Member.list Effect4.Program.Ty.list","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":37,"nearest":[]},"doc":"**`Member.list` answers at one union member.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.list_one","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t a : Effect4.Program.Ty},\n  Eq (Effect4.Program.Member.list t) (Option.some a) → instLENat.le t.normalize.members.length 1","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"**A closed option type has a closed element type.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.option_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {m a : Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Member.option m) (Option.some a) → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":148,"nearest":["Effect4.Program.Ty.subN_option_iff","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**`Member.option` is the eliminator of the option constructor.** It answers only at an option type,\nwith that type's element type. The constructor keeps and reflects the order. It reads each normal\nunion member that is below an option type. A step of the claim `union-rule-extend`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Member.option_eliminator","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"Effect4.Program.UnionRule.Eliminator Effect4.Program.Member.option Effect4.Program.Ty.option","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":794,"lemmas":153,"nearest":["Effect4.Program.Moves.evaluatePrim_producer"]},"doc":"**One native evaluation keeps the saved mask's chain**: the evaluation half of\n`MaskRuns`, as an instance of the moves. ","kind":"theorem","module":"Effect4.Laws.Program.MovesConnect","name":"Effect4.Program.Moves.evaluateNative_maskChain","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (base : Bool) (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (f : Effect4.Program.Moves.NFiber) (yielding : Bool),\n  Effect4.FrameFiber.MaskChain base\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).interruptible\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.FrameFiber.MaskChain base\n      (((Effect4.Program.evaluateNative p m f yielding table).fiber\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).interruptible\n      (((Effect4.Program.evaluateNative p m f yielding table).fiber\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":785,"lemmas":75,"nearest":["Effect4.Program.Moves.evaluatePrim_under"]},"doc":"**One native evaluation that goes on is the same over more frames.** ","kind":"theorem","module":"Effect4.Laws.Program.StackLocal","name":"Effect4.Program.Moves.evaluateNative_under","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (f : Effect4.Program.Moves.NFiber) (yielding : Bool)\n  (below : List Effect4.Program.NCode),\n  Effect4.Program.Moves.GoesOn (Effect4.Program.evaluateNative root m f yielding table) →\n    Eq\n      (Effect4.Program.evaluateNative root m (Effect4.Program.Moves.fiberUnder f below) yielding\n        table)\n      (Effect4.Program.Moves.iterUnder (Effect4.Program.evaluateNative root m f yielding table)\n        below)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":228,"lemmas":4,"nearest":[]},"doc":"The one generated primitive classification retains its actual producer evidence.\nEvery source, reference, and frame consumer reads this witness instead of reclassifying evaluation. ","kind":"theorem","module":"Effect4.Laws.Program.PrimitiveProducer","name":"Effect4.Program.Moves.evaluatePrim_producer","placement":{"concept":"reactive-scheduling","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.Moves.NInterp) (m : Effect4.Program.NativeMachine)\n  (f : Effect4.Program.Moves.NFiber) (yielding : Bool),\n  Effect4.Program.Moves.PrimitiveProducer interp m f yielding\n    (Effect4.Machine.evaluatePrim interp m f yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":236,"lemmas":25,"nearest":[]},"doc":"**One primitive evaluation that goes on is the same over more frames.** ","kind":"theorem","module":"Effect4.Laws.Program.StackLocal","name":"Effect4.Program.Moves.evaluatePrim_under","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.Moves.NInterp) (m : Effect4.Program.NativeMachine)\n  (f : Effect4.Program.Moves.NFiber) (yielding : Bool) (below : List Effect4.Program.NCode),\n  Effect4.Program.Moves.GoesOn (Effect4.Machine.evaluatePrim interp m f yielding) →\n    Eq (Effect4.Machine.evaluatePrim interp m (Effect4.Program.Moves.fiberUnder f below) yielding)\n      (Effect4.Program.Moves.iterUnder (Effect4.Machine.evaluatePrim interp m f yielding) below)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":804,"lemmas":103,"nearest":["Effect4.Program.Moves.evaluatePrim_producer"]},"doc":"The native iteration charges exactly once, even when it injects a yield.\nConsumer: the operation-room premise of the original Timeout count prefix. ","kind":"theorem","module":"Effect4.Laws.Program.Footprint","name":"Effect4.Program.Moves.iteration_currentOpCount","placement":{"concept":"reactive-scheduling","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (interp : Effect4.Program.Moves.NInterp) (m : Effect4.Program.NativeMachine)\n  (f : Effect4.Program.Moves.NFiber) (yielding : Bool),\n  Eq\n    (((Effect4.Machine.iteration interp m f yielding).fiber\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).currentOpCount\n      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n    (instHAdd.hAdd\n      (f.currentOpCount\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      1)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":796,"lemmas":67,"nearest":["Effect4.Program.Moves.evaluateNative_under"]},"doc":"**One iteration of the native loop that goes on is the same over more frames**: the frame rule\nof the fiber machine at one command. The pointer of the evaluation's half of the proposed claim\n`stack-local`. ","kind":"theorem","module":"Effect4.Laws.Program.StackLocal","name":"Effect4.Program.Moves.iteration_under","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (interp : Effect4.Program.Moves.NInterp) (m : Effect4.Program.NativeMachine)\n  (f : Effect4.Program.Moves.NFiber) (yielding : Bool) (below : List Effect4.Program.NCode),\n  Effect4.Program.Moves.GoesOn (Effect4.Machine.iteration interp m f yielding) →\n    Eq (Effect4.Machine.iteration interp m (Effect4.Program.Moves.fiberUnder f below) yielding)\n      (Effect4.Program.Moves.iterUnder (Effect4.Machine.iteration interp m f yielding) below)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":83,"lemmas":59,"nearest":["Effect4.Program.closed_causeInputError","Effect4.Program.NativeAtom.closed_projectProduct"]},"doc":"A custom rule answers a closed type at closed arguments. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.CustomScheme.closed_apply","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (tag : Effect4.Program.NativeAtom.CustomScheme) {tys : List Effect4.Program.Ty}\n  {ty : Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → Eq t.closed Bool.true) →\n    Eq (tag.apply tys) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":95,"lemmas":38,"nearest":["Effect4.Program.NativeAtom.CustomScheme.closed_apply","Effect4.Program.Ty.closedSubst_matchArgsB","Effect4.Program.Ty.closed_instantiate","Effect4.Program.NativeAtom.closed_monoApply"]},"doc":"**A scheme answers a closed type at closed arguments**, when its declared answers are\nclosed. A step of `closedSig_native`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.Scheme.closed_apply","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.NativeAtom.Scheme),\n  Eq s.answersClosed Bool.true →\n    ∀ {tys : List Effect4.Program.Ty} {ty : Effect4.Program.Ty},\n      (∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → Eq t.closed Bool.true) →\n        Eq (s.apply tys) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":45,"lemmas":15,"nearest":[]},"doc":"A fixed signature answers its declared answer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.closed_monoApply","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {params tys : List Effect4.Program.Ty} {answer ty : Effect4.Program.Ty},\n  Eq answer.closed Bool.true →\n    Eq (Effect4.Program.NativeAtom.monoApply params answer tys) (Option.some ty) →\n      Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"The selected column of a closed product type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.closed_projectProduct","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {second : Bool} {t r : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.NativeAtom.projectProduct second t) (Option.some r) → Eq r.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":97,"lemmas":38,"nearest":["Effect4.Program.NativeAtom.spec_answersClosed","Effect4.Program.NativeAtom.Scheme.closed_apply"]},"doc":"An atom answers a closed type at closed arguments. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.closed_typeOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (atom : Effect4.Program.NativeAtom) {tys : List Effect4.Program.Ty} {ty : Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → Eq t.closed Bool.true) →\n    Eq (atom.typeOf tys) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":[],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"Every atom's declared answers are closed: read off the table, atom by atom. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.NativeAtom.spec_answersClosed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (atom : Effect4.Program.NativeAtom), Eq atom.spec.scheme.answersClosed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":142,"lemmas":47,"nearest":[]},"doc":"**`tagIs` is sound at records** (decisions row 120): on a value of a record type with a\nliteral `_tag`, the atom answers whether that literal is the tag, as the record select reads it\n(`Record.tagHit_eq_isTag`). A record frame is no pair, so the atom's pair arm never fires on it.\nConcept `residual-program-typing`, R10. No proof reads it yet: decisions row 130's residual,\nwhich subtracts a caught tag from the column, is its consumer; the batteries test `catchIf` over\n`tagIs` on payloads meanwhile. It establishes nothing about the residual a hit leaves, which stays\nthe whole error column until row 130. ","kind":"theorem","module":"Effect4.Laws.Program.RecordTag","name":"Effect4.Program.NativeAtom.tagHit_record","placement":{"concept":"residual-program-typing","requirement":"R10"},"restsOn":[],"statement":"∀ {type : Effect4.Program.Ty} {v : Effect4.Machine.Val} {allocated : List String} (tag : String),\n  Eq (Effect4.Program.Record.tagOf type).isSome Bool.true →\n    Eq (Effect4.Program.Val.hasTy v type allocated) Bool.true →\n      Eq (Effect4.Program.NativeAtom.tagHit tag v) (Effect4.Program.Record.isTag tag type)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":16,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_stmt_paths_cons","Effect4.Program.foldMapAt_layers_paths_cons","Effect4.Program.foldMapAt_effs_paths_cons","Effect4.Program.foldMapAt_layer_paths_cons","Effect4.Program.foldMapAt_action_paths_cons","Effect4.Program.foldMapAt_stmts_paths_cons","Effect4.Program.foldMapAt_eff_paths_cons"]},"doc":"**The address list, one step down**: the node first, then the addresses of its children at\nthe indices 0, 1 and 2. No node has a fourth child, so a constructor with one fails this proof.\nThe children are reduced by evaluation (`whnf`), not by the equations of `Node.child`. A step\nof `annotate-table`. Its consumer is `tableAt_eq_cons`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.Node.addresses_eq_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op),\n  Eq n.addresses\n    (List.cons List.nil\n      (instHAppendOfAppend.hAppend (n.childAddresses 0)\n        (instHAppendOfAppend.hAppend (n.childAddresses 1) (n.childAddresses 2))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"**The node at `p ++ q` is the node at `q` inside the node at `p`.** A step of\n`address-composes`. Its consumers are the typed print's laws. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.at_append","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (root : Effect4.Program.Node Op) (path rest : List Nat),\n  Eq (root.at_ (instHAppendOfAppend.hAppend path rest))\n    ((root.at_ path).bind fun source => source.at_ rest)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**One more child index.** A step of `address-composes`. Its consumers are the typed print's\nlaws. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.at_child","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {root source child : Effect4.Program.Node Op} {path : List Nat} {i : Nat},\n  Eq (root.at_ path) (Option.some source) →\n    Eq (source.child i) (Option.some child) →\n      Eq (root.at_ (instHAppendOfAppend.hAppend path (List.cons i List.nil))) (Option.some child)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"An empty layer spine leads to no program. A step of `typed-replacement`: the dead end after\na one-layer spine in `NodeHasTy.child_step`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.Node.at_layers_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (rest : List Nat) (q : Effect4.Program.Eff Op),\n  Ne ((Effect4.Program.Node.layers Effect4.Program.LayerTerms.nil).at_ rest)\n    (Option.some (Effect4.Program.Node.eff q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":["Effect4.Program.Node.replaceAt_spec","Effect4.Program.Node.at_append"]},"doc":"**Below an edit, the edited node reads the replacement.** A step of `address-composes`. Its\nconsumer is a read of a pasted subtree. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.at_replaceAt_below","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {n n' r : Effect4.Program.Node Op} {p : List Nat},\n  Eq (n.replaceAt p r) (Option.some n') →\n    ∀ (q : List Nat), Eq (n'.at_ (instHAppendOfAppend.hAppend p q)) (r.at_ q)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"An empty statement list leads to no program. A step of `typed-replacement`: the dead end\nafter a `return` in `NodeHasTy.child_step`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.Node.at_stmts_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (rest : List Nat) (q : Effect4.Program.Eff Op),\n  Ne ((Effect4.Program.Node.stmts Effect4.Program.Stmts.nil).at_ rest)\n    (Option.some (Effect4.Program.Node.eff q))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":59,"nearest":["Effect4.Program.Node.stmtsHead_replace_kept","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.NodeHasTy.replace_envAt","Effect4.Program.NodeHasTy.child_step"]},"doc":"**No child's environment changes**: a step reads the types of earlier siblings and the\nnode's terms, and the edited child keeps its type. A step of `tableAt_splice`.\n\nThe proof is casework over the 56 arms of `Node.setChild` and the four indices of\n`Node.childEnv`, and it raises the heartbeat bound for that unfolding (a finding: a law of\n`childEnv` by its reads would remove the casework). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Node.childEnv_replace_kept","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {n n' c c' : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {i : Nat} {rest : List Nat} {q q' : Effect4.Program.Eff Op}\n  {env : Effect4.Program.TyEnv} {t : Effect4.Program.EffTy},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.child i) (Option.some c) →\n      Eq (c.at_ rest) (Option.some (Effect4.Program.Node.eff q)) →\n        Eq (Effect4.Program.Node.envAt s τ.env n (List.cons i rest))\n            (Option.some (Effect4.Program.NodeEnv.env env)) →\n          Conform.Effect4.Typing.HasTy s env q t →\n            Conform.Effect4.Typing.HasTy s env q' t →\n              Eq (c.replaceAt rest (Effect4.Program.Node.eff q')) (Option.some c') →\n                Eq (n.setChild i c') (Option.some n') →\n                  ∀ (j : Nat),\n                    Eq (Effect4.Program.Node.childEnv s τ.env n' j)\n                      (Effect4.Program.Node.childEnv s τ.env n j)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":[]},"doc":"A node has at most three children. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Node.child_add_three","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op) (i : Nat), Eq (n.child (instHAdd.hAdd i 3)) Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":277,"lemmas":54,"nearest":[]},"doc":"**The environment at `p ++ q` is the environment at `q` inside the node at `p`**, from the\nenvironment at `p`. A step of `address-composes`. Its consumers are the typed print's laws. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.envAt_append","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (root : Effect4.Program.Node Op)\n  (env : Effect4.Program.NodeEnv) (path rest : List Nat),\n  Eq (Effect4.Program.Node.envAt sig env root (instHAppendOfAppend.hAppend path rest))\n    ((root.at_ path).bind fun source =>\n      (Effect4.Program.Node.envAt sig env root path).bind fun childEnv =>\n        Effect4.Program.Node.envAt sig childEnv source rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":277,"lemmas":54,"nearest":["Effect4.Program.Node.envAt_append"]},"doc":"**One more child index, for the environment.** A step of `address-composes`. Its consumers\nare the typed print's laws. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.envAt_child","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {root source child : Effect4.Program.Node Op}\n  {env rho childEnv : Effect4.Program.NodeEnv} {path : List Nat} {i : Nat},\n  Eq (root.at_ path) (Option.some source) →\n    Eq (Effect4.Program.Node.envAt sig env root path) (Option.some rho) →\n      Eq (source.child i) (Option.some child) →\n        Eq (Effect4.Program.Node.childEnv sig rho source i) (Option.some childEnv) →\n          Eq\n            (Effect4.Program.Node.envAt sig env root\n              (instHAppendOfAppend.hAppend path (List.cons i List.nil)))\n            (Option.some childEnv)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":26,"lemmas":0,"nearest":["Effect4.Program.Node.sizeOf_child_lt","Effect4.Program.Node.foldList_cases"]},"doc":"**A member of the path fold is the yield of an addressed node, at the node's path**: the\nconverse of `yieldAt_subset_of_at`. The step is `foldList_cases`, and the recursion goes down\n`Node.child`. A step of `focus-function`. Its consumer is `mem_foldList_iff` below. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.Node.exists_at_of_mem_foldList","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op α : Type} (y : Effect4.Program.PathYield Op α) (n : Effect4.Program.Node Op) (p : List Nat)\n  {x : α},\n  List.instMembership.mem (Effect4.Program.Node.foldList y p n) x →\n    Exists fun path =>\n      Exists fun m =>\n        And (Eq (n.at_ path) (Option.some m))\n          (List.instMembership.mem\n            (Effect4.Program.Node.yieldAt y m (instHAppendOfAppend.hAppend p path)) x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":23,"lemmas":0,"nearest":[]},"doc":"**One step of the path fold, read back.** A member of a node's fold is in the node's own\nyield, or in the fold of a child at the child's path. It is the converse of\n`yieldAt_subset_foldList` and `foldList_child` together.\n\nThe proof reads each generated arm against `Node.child` at the indices 0, 1 and 2, which\nevaluation reduces at a constructor. A constructor with a fourth node-typed argument fails the\nproof at its case, so the bound cannot go stale in silence. A step of `focus-function`. Its\nconsumer is `exists_at_of_mem_foldList` below. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.Node.foldList_cases","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op α : Type} (y : Effect4.Program.PathYield Op α) (p : List Nat) (n : Effect4.Program.Node Op)\n  {x : α},\n  List.instMembership.mem (Effect4.Program.Node.foldList y p n) x →\n    Or (List.instMembership.mem (Effect4.Program.Node.yieldAt y n p) x)\n      (Exists fun i =>\n        Exists fun c =>\n          And (Eq (n.child i) (Option.some c))\n            (List.instMembership.mem\n              (Effect4.Program.Node.foldList y\n                (instHAppendOfAppend.hAppend p (List.cons i List.nil)) c)\n              x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":25,"lemmas":4,"nearest":["Effect4.Program.Node.exists_at_of_mem_foldList"]},"doc":"**The path fold collects the yields of the addressed nodes, each at its path, and nothing\nelse.** The two inclusions are `yieldAt_subset_of_at` and `exists_at_of_mem_foldList`. It says\nnothing of the order of the fold's list. A step of `focus-function`. Its consumer is the\naddress list of a node (`mem_addresses_iff`, `Laws/Program/Typing/Table.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.Node.mem_foldList_iff","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op α : Type} (y : Effect4.Program.PathYield Op α) (n : Effect4.Program.Node Op) (p : List Nat)\n  (x : α),\n  Iff (List.instMembership.mem (Effect4.Program.Node.foldList y p n) x)\n    (Exists fun path =>\n      Exists fun m =>\n        And (Eq (n.at_ path) (Option.some m))\n          (List.instMembership.mem\n            (Effect4.Program.Node.yieldAt y m (instHAppendOfAppend.hAppend p path)) x))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":["Effect4.Program.Node.replaceAt_spec"]},"doc":"**An edit at `p ++ q` is the edit at `q` inside the node at `p`, put back at `p`.** The\npointer of `address-composes`. No proof consumes it yet: the splice over a whole program's parts\nreads a block's two children directly (`Node.replaceAt_defs_main`, `Node.replaceAt_defs_body`). A\nmove or a paste of a subtree is its first consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.Node.replaceAt_append","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op) (p q : List Nat) (r : Effect4.Program.Node Op),\n  Eq (n.replaceAt (instHAppendOfAppend.hAppend p q) r)\n    ((n.at_ p).bind fun m => (m.replaceAt q r).bind fun m' => n.replaceAt p m')","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":11,"lemmas":0,"nearest":["Effect4.Program.Node.setChild_isBlock"]},"doc":"An edit below the root keeps whether a node is a block. A step of `module-table-splices`.\nIts consumer is `annotateModule_fill_plain`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.replaceAt_cons_isBlock","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {node result r : Effect4.Program.Node Op} {i : Nat} {rest : List Nat},\n  Eq (node.replaceAt (List.cons i rest) r) (Option.some result) → Eq result.isBlock node.isBlock","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"An edit of a block's bodies. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill_body`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.replaceAt_defs_body","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {main p' q' : Effect4.Program.Eff Op} {layers : Effect4.Program.LayerTerms Op} {r : List Nat},\n  Eq\n      ((Effect4.Program.Node.eff (Effect4.Program.Eff.defs decls bodies main layers)).replaceAt\n        (List.cons 0 r) (Effect4.Program.Node.eff q'))\n      (Option.some (Effect4.Program.Node.eff p')) →\n    Exists fun bodies' =>\n      And\n        (Eq ((Effect4.Program.Node.effs bodies).replaceAt r (Effect4.Program.Node.eff q'))\n          (Option.some (Effect4.Program.Node.effs bodies')))\n        (Eq p' (Effect4.Program.Eff.defs decls bodies' main layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"An edit of a block's main program. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill_main`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.replaceAt_defs_main","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {main p' q' : Effect4.Program.Eff Op} {layers : Effect4.Program.LayerTerms Op} {r : List Nat},\n  Eq\n      ((Effect4.Program.Node.eff (Effect4.Program.Eff.defs decls bodies main layers)).replaceAt\n        (List.cons 1 r) (Effect4.Program.Node.eff q'))\n      (Option.some (Effect4.Program.Node.eff p')) →\n    Exists fun main' =>\n      And\n        (Eq ((Effect4.Program.Node.eff main).replaceAt r (Effect4.Program.Node.eff q'))\n          (Option.some (Effect4.Program.Node.eff main')))\n        (Eq p' (Effect4.Program.Eff.defs decls bodies main' layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":11,"lemmas":2,"nearest":["Effect4.Program.Node.replaceAt_spec"]},"doc":"A program stands where a program stood: the replacement at an address of a program exists,\nand it is a program. A step of `typed-replacement`: `check_replace` reads it, so that the law at\nthe checker answers the replaced program. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.Node.replaceAt_eff","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {p q : Effect4.Program.Eff Op} (q' : Effect4.Program.Eff Op) {path : List Nat},\n  Eq ((Effect4.Program.Node.eff p).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n    Exists fun p' =>\n      Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n        (Option.some (Effect4.Program.Node.eff p'))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"An edit of the spine's head body. A step of `module-table-splices`. Its consumer is\n`Table.bodies_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.replaceAt_effs_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {body q' : Effect4.Program.Eff Op} {rest bodies' : Effect4.Program.Effs Op}\n  {r : List Nat},\n  Eq\n      ((Effect4.Program.Node.effs (Effect4.Program.Effs.cons body rest)).replaceAt (List.cons 0 r)\n        (Effect4.Program.Node.eff q'))\n      (Option.some (Effect4.Program.Node.effs bodies')) →\n    Exists fun body' =>\n      And\n        (Eq ((Effect4.Program.Node.eff body).replaceAt r (Effect4.Program.Node.eff q'))\n          (Option.some (Effect4.Program.Node.eff body')))\n        (Eq bodies' (Effect4.Program.Effs.cons body' rest))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"An edit of the spine's tail. A step of `module-table-splices`. Its consumer is\n`Table.bodies_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.replaceAt_effs_tail","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {body q' : Effect4.Program.Eff Op} {rest bodies' : Effect4.Program.Effs Op}\n  {r : List Nat},\n  Eq\n      ((Effect4.Program.Node.effs (Effect4.Program.Effs.cons body rest)).replaceAt (List.cons 1 r)\n        (Effect4.Program.Node.eff q'))\n      (Option.some (Effect4.Program.Node.effs bodies')) →\n    Exists fun rest' =>\n      And\n        (Eq ((Effect4.Program.Node.effs rest).replaceAt r (Effect4.Program.Node.eff q'))\n          (Option.some (Effect4.Program.Node.effs rest')))\n        (Eq bodies' (Effect4.Program.Effs.cons body rest'))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":[]},"doc":"A child edit keeps whether a node is a block. A step of `module-table-splices`. Its consumer\nis `Node.replaceAt_cons_isBlock`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Node.setChild_isBlock","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {node result r : Effect4.Program.Node Op} {i : Nat},\n  Eq (node.setChild i r) (Option.some result) → Eq result.isBlock node.isBlock","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"A child is smaller than its node: the measure of the recursion along `Node.child`. The case\nlist is `Node.child`'s own. A step of `focus-function`. Its consumer is\n`exists_at_of_mem_foldList` below. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.Node.sizeOf_child_lt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op) (i : Nat) (c : Effect4.Program.Node Op),\n  Eq (n.child i) (Option.some c) →\n    instLTNat.lt ((Effect4.Program.Node._sizeOf_inst Op).sizeOf c)\n      ((Effect4.Program.Node._sizeOf_inst Op).sizeOf n)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":286,"lemmas":59,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.NodeHasTy.replace_envAt","Effect4.Program.NodeHasTy.child_step"]},"doc":"**A statement list's head keeps what its tail's environment reads**: a type-kept edit\ninside the head statement leaves the environment of the list's tail as it was. The tail reads the\ntype of the head's program only after a `bindYield`, and that program keeps its type. A step of\n`Node.childEnv_replace_kept`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Node.stmtsHead_replace_kept","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {a0 x : Effect4.Program.Stmt Op}\n  {a1 : Effect4.Program.Stmts Op} {τ : Effect4.Program.NodeTy Op} {rest : List Nat}\n  {q q' : Effect4.Program.Eff Op} {env : Effect4.Program.TyEnv} {t : Effect4.Program.EffTy},\n  Effect4.Program.NodeHasTy s (Effect4.Program.Node.stmts (Effect4.Program.Stmts.cons a0 a1)) τ →\n    Eq ((Effect4.Program.Node.stmt a0).at_ rest) (Option.some (Effect4.Program.Node.eff q)) →\n      Eq\n          (Effect4.Program.Node.envAt s τ.env\n            (Effect4.Program.Node.stmts (Effect4.Program.Stmts.cons a0 a1)) (List.cons 0 rest))\n          (Option.some (Effect4.Program.NodeEnv.env env)) →\n        Conform.Effect4.Typing.HasTy s env q t →\n          Conform.Effect4.Typing.HasTy s env q' t →\n            Eq ((Effect4.Program.Node.stmt a0).replaceAt rest (Effect4.Program.Node.eff q'))\n                (Option.some (Effect4.Program.Node.stmt x)) →\n              Eq\n                (Effect4.Program.Node.childEnv s τ.env\n                  (Effect4.Program.Node.stmts (Effect4.Program.Stmts.cons x a1)) 1)\n                (Effect4.Program.Node.childEnv s τ.env\n                  (Effect4.Program.Node.stmts (Effect4.Program.Stmts.cons a0 a1)) 1)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":74,"nearest":["Effect4.Program.layersHasTy_cons","Effect4.Program.Node.at_layers_nil","Effect4.Program.Node.at_stmts_nil","Effect4.Program.effTy_map_of_hasTy"]},"doc":"**One step of the law.** A typed node's child that leads to a program is typed, at the\nenvironment that the step function answers (`Node.childEnv`). A node of the child's type stands\nin its place: the parent keeps its type, under every extension of the signature.\n\nOne case for each arm of `Node.child`, in that function's order, and one for each rule where a\nnode has several. Each case inverts the rule and has three parts:\n\n- the child's premise, which is its typing;\n- the environment fact: `rfl` where the child is typed at its parent's environment or at a\n  fixed one, and the checker's answer on what the rule reads first where the rule extends the\n  environment (`effTy_map_of_hasTy`, or the term's premise);\n- the rule applied again: the new premise stands at the child, and every other premise moves\n  along the extension.\n\nThe two dead ends read `hlead`. A step of `typed-replacement` and of `focus-function`:\n`NodeHasTy.replace_envAt` folds it along a path. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.NodeHasTy.child_step","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {n c : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {i : Nat},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.child i) (Option.some c) →\n      (Exists fun rest =>\n          Exists fun q => Eq (c.at_ rest) (Option.some (Effect4.Program.Node.eff q))) →\n        Exists fun τc =>\n          And (Effect4.Program.NodeHasTy s c τc)\n            (And (Eq (Effect4.Program.Node.childEnv s τ.env n i) (Option.some τc.env))\n              (∀ {s' : Effect4.Program.Signature Op} {c' n' : Effect4.Program.Node Op},\n                Effect4.Program.SigExtends s s' →\n                  Effect4.Program.NodeHasTy s' c' τc →\n                    Eq (n.setChild i c') (Option.some n') → Effect4.Program.NodeHasTy s' n' τ))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":101,"lemmas":37,"nearest":[]},"doc":"**A body holds its address**: the node at an address of a block's bodies' spine is the node\nat the rest of the address in the body that `Part.bodyAt` answers. A step of `Eff.partAt_at`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Part.bodyAt_at","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {part : Effect4.Program.Part Op}\n  {rest : List Nat} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {path : List Nat},\n  Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n      (Option.some { fst := part, snd := rest }) →\n    Eq ((Effect4.Program.Node.effs bodies).at_ path)\n      ((Effect4.Program.Node.eff part.program).at_ rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":98,"lemmas":37,"nearest":[]},"doc":"**The bodies' part at another signature**: `Part.bodyAt` reads its signature only into the\npart. A step of `Eff.partAt_resig`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Part.bodyAt_resig","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig sig' : Effect4.Program.Signature Op} {part : Effect4.Program.Part Op}\n  {rest : List Nat} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {path : List Nat},\n  Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n      (Option.some { fst := part, snd := rest }) →\n    Exists fun part' =>\n      Eq (Effect4.Program.Part.bodyAt sig' decls bodies path)\n        (Option.some { fst := part', snd := rest })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":99,"lemmas":37,"nearest":[]},"doc":"**A body's part is at the block's signature extended by the body's parameters**\n(decisions row 340). A step of `Sketch.sigAt_extends`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.Part.bodyAt_sig","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {part : Effect4.Program.Part Op}\n  {rest : List Nat} {decls : List Effect4.Program.DefDecl} {bodies : Effect4.Program.Effs Op}\n  {path : List Nat},\n  Eq (Effect4.Program.Part.bodyAt sig decls bodies path)\n      (Option.some { fst := part, snd := rest }) →\n    Exists fun ps => Eq part.sig (sig.withParams ps)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":59,"nearest":[]},"doc":"A record term's type is the normal form of its declaration. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_check","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {fields : Effect4.Program.Record.Fields} {names : List String} {types : List Effect4.Program.Ty}\n  {ty : Effect4.Program.Ty},\n  Eq (Effect4.Program.Ty.record fields).closed Bool.true →\n    Eq (Effect4.Program.Record.check fields names types) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":10,"lemmas":2,"nearest":[]},"doc":"A record member's field read answers a closed type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_fieldOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {optional : Bool} {name : String} {m r : Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Record.fieldOf optional name m) (Option.some r) → Eq r.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":37,"nearest":["Effect4.Program.Record.closed_fieldOf","Effect4.Program.UnionRule.lift_closed"]},"doc":"The field read keeps closed types closed. It is a lifted rule (`UnionRule.lift`), and its\nmember rule `fieldOf` keeps closed types closed (`UnionRule.lift_closed`,\n`Laws/Program/UnionRule.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_fieldType","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {optional : Bool} {target ty : Effect4.Program.Ty} {name : String},\n  Eq target.closed Bool.true →\n    Eq (Effect4.Program.Record.fieldType optional target name) (Option.some ty) →\n      Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":59,"nearest":[]},"doc":"A record member's overwrite answers a closed type, at a closed replacement. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_setOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {name : String} {valueType m r : Effect4.Program.Ty},\n  Eq valueType.closed Bool.true →\n    Eq m.closed Bool.true →\n      Eq (Effect4.Program.Record.setOf name valueType m) (Option.some r) → Eq r.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.Record.closed_setOf","Effect4.Program.UnionRule.lift_closed"]},"doc":"The field write keeps closed types closed, at a closed replacement: `UnionRule.lift_closed`\nat the member rule `setOf`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_setType","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {target valueType ty : Effect4.Program.Ty} {name : String},\n  Eq target.closed Bool.true →\n    Eq valueType.closed Bool.true →\n      Eq (Effect4.Program.Record.setType target name valueType) (Option.some ty) →\n        Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":59,"nearest":[]},"doc":"The two arms of a record tag decision keep members of the target's normal form. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Record.closed_tagArms","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {tag : String} {t : Effect4.Program.Ty} {arms : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.Record.tagArms tag t) (Option.some arms) →\n      And (Eq arms.fst.closed Bool.true) (Eq arms.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":901,"lemmas":132,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_cons","Effect4.Program.ReleaseCustody.ReplySequencing.terminal"]},"doc":"Every command outside evaluator entry retains saved-frame sequencing.\nConsumer: the whole native command assertion and original Workers history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.AdministrativeKept","name":"Effect4.Program.ReleaseCustody.AdministrativeKept.non_evaluator","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (command : Effect4.Program.Guard.NCmd)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n    Effect4.Program.ReleaseCustody.CommandStacks.QueueStable m (List.cons command rest) →\n      Effect4.Program.SourceScope.CommandAt root command →\n        Effect4.Program.SourceScope.RaceFreeSource root →\n          Eq\n              (m.races\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann))\n              List.nil →\n            (∀ (id : Effect4.FiberId) (yielding : Bool),\n                Ne command\n                  (Effect4.Machine.Cmd.loop\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    id yielding)) →\n              (∀ (id : Effect4.FiberId) (yielding : Bool),\n                  Ne command\n                    (Effect4.Machine.Cmd.deliver\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      id yielding)) →\n                Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept\n                  (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m command\n                      rest).fst","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":878,"lemmas":168,"nearest":[]},"doc":"Every administrative command retains the actual pending-owner stack condition.\nConsumer: full command closure and the original admitted Workers history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.AdministrativeQueue","name":"Effect4.Program.ReleaseCustody.AdministrativeQueue.non_evaluator","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (command : Effect4.Program.Guard.NCmd)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue root table m (List.cons command rest) →\n      Effect4.Program.ReleaseCustody.CommandStacks.QueueStable m (List.cons command rest) →\n        Eq\n            (m.races\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))\n            List.nil →\n          (∀ (id : Effect4.FiberId) (yielding : Bool),\n              Ne command\n                (Effect4.Machine.Cmd.loop\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  id yielding)) →\n            (∀ (id : Effect4.FiberId) (yielding : Bool),\n                Ne command\n                  (Effect4.Machine.Cmd.deliver\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    id yielding)) →\n              have out :=\n                Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m command rest;\n              Effect4.Program.ReleaseCustody.CommandStacks.QueueStable out.fst out.snd","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":655,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Producers.cancel","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","Effect4.Program.ReleaseCustody.Producers.interp_contE"]},"doc":"Invoking the selected failure handler consumes its retained reservation.\nConsumer: resumeCause below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CausePop","name":"Effect4.Program.ReleaseCustody.CausePop.armE","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (frame : Effect4.Program.NCode) (cause : Effect4.Machine.CauseV)\n  (provided : Option Effect4.Machine.ExitV) (next : Effect4.Program.NCode)\n  (pushed rest : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armE\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame cause provided)\n      (Option.some { fst := next, snd := pushed }) →\n    instLENat.le\n      (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.currentCredits q next)\n        (Effect4.Program.ReleaseCustody.Control.stackCredits q next\n          (instHAppendOfAppend.hAppend pushed rest)))\n      (Effect4.Program.ReleaseCustody.CausePop.answerCredits q (Effect4.ContAnswer.frame frame)\n        rest)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":113,"lemmas":8,"nearest":[]},"doc":"Cause payloads change no reservation in a remaining failure stack.\nConsumer: native cause resumption below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CausePop","name":"Effect4.Program.ReleaseCustody.CausePop.failure_stack_eq","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (cause : Effect4.Machine.CauseV) (frames : List Effect4.Program.NCode),\n  Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.failure cause) frames)\n    (Effect4.Program.ReleaseCustody.CausePop.failureStack q frames)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":162,"lemmas":16,"nearest":["Effect4.Program.ReleaseCustody.CausePop.popFrom_cause","Effect4.Program.ReleaseCustody.CausePop.failure_stack_eq"]},"doc":"The actual failure pop retains no more than the interrupted failure stack.\nConsumer: native resumeCause below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CausePop","name":"Effect4.Program.ReleaseCustody.CausePop.getCont_cause","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Effect4.Machine.CauseV),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.CausePop.popCredits q\n      (Effect4.FrameFiber.getCont fiber Effect4.Arm.contE Bool.true (Option.some cause)))\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.failure cause) fiber.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":160,"lemmas":10,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","Effect4.Program.ReleaseCustody.Control.stack_credits_bounded"]},"doc":"Failure popping discards skipped constants and transfers the selected cause reservation.\nConsumer: getCont_cause and native cause resumption. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CausePop","name":"Effect4.Program.ReleaseCustody.CausePop.popFrom_cause","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (frames : List Effect4.Program.NCode)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Eq fiber.stack List.nil →\n    instLENat.le\n      (Effect4.Program.ReleaseCustody.CausePop.popCredits q\n        (Effect4.FrameFiber.popFrom Effect4.Arm.contE Bool.true frames fiber))\n      (Effect4.Program.ReleaseCustody.CausePop.failureStack q frames)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":690,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.CausePop.armE","Effect4.Program.ReleaseCustody.CausePop.failure_stack_eq","Effect4.Program.ReleaseCustody.CausePop.getCont_cause"]},"doc":"Native failure resumption consumes the actual saved stack reservation.\nConsumer: evaluator debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CausePop","name":"Effect4.Program.ReleaseCustody.CausePop.resumeCause","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Effect4.Machine.CauseV)\n  (provided : Option Effect4.Machine.ExitV),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Pop.stepCredits q\n      (Effect4.FrameFiber.resumeCause\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber cause provided).fst)\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.failure cause) fiber.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":954,"lemmas":169,"nearest":["Effect4.Program.ReleaseCustody.LoopCommand.deliver","Effect4.Program.ReleaseCustody.LoopCommand.loop","Effect4.Program.ReleaseCustody.AdministrativeQueue.non_evaluator","Effect4.Program.ReleaseCustody.AdministrativeKept.non_evaluator","Effect4.Program.ReleaseCustody.Control.update_credits","Effect4.Program.ReleaseCustody.Control.emit_credits","Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.ScopeTransfer.link","Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Sequencing.resume_command","Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.mem_addresses_iff"]},"doc":"Every native command retains release accounting, stored frames and pending-owner stacks.\nConsumer: the joint command assertion used by Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CommandClosure","name":"Effect4.Program.ReleaseCustody.CommandClosure.command","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (head : Effect4.Program.Guard.NCmd)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue root table m (List.cons head rest) →\n      Effect4.Program.ReleaseCustody.Execution.ScopeRows m →\n        Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n          Effect4.Program.ReleaseCustody.CommandStacks.QueueStable m (List.cons head rest) →\n            Effect4.Program.SourceScope.ConfigurationAt root m →\n              Effect4.Program.SourceScope.CommandsAt root (List.cons head rest) →\n                Effect4.Program.SourceScope.Fragment root →\n                  Effect4.Program.SourceScope.SequentialSource root →\n                    Effect4.Program.SourceScope.RaceFreeSource root →\n                      Effect4.Program.ReleaseCustody.Control.Funded q m (List.cons head rest) →\n                        have out :=\n                          Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m head\n                            rest;\n                        And (Effect4.Program.ReleaseCustody.Control.Funded q out.fst out.snd)\n                          (And\n                            (Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept out.fst)\n                            (Effect4.Program.ReleaseCustody.CommandStacks.QueueStable out.fst\n                              out.snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1142,"lemmas":1280,"nearest":["Effect4.Program.Moves.evaluatePrim_producer","Effect4.Scope.closeOrder_eq","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.CommandClosure.command"]},"doc":"The actual command step retains every component of the joined custody assertion.\nConsumer: the command prefix and scheduler lifts below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.CommandClosure","name":"Effect4.Program.ReleaseCustody.CommandClosure.joined","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (head : Effect4.Program.Guard.NCmd)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.SourceScope.Fragment root →\n    Effect4.Program.SourceScope.SequentialSource root →\n      Effect4.Program.SourceScope.RaceFreeSource root →\n        Effect4.Program.ReleaseCustody.CommandClosure.Held q root m →\n          Effect4.Program.ReleaseCustody.CommandClosure.Queued q root table m\n              (List.cons head rest) →\n            have out := Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m head rest;\n            And (Effect4.Program.ReleaseCustody.CommandClosure.Held q root out.fst)\n              (Effect4.Program.ReleaseCustody.CommandClosure.Queued q root table out.fst out.snd)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":139,"lemmas":8,"nearest":[]},"doc":"The concrete custody assertion supplies the original trace debit observation.\nConsumer: `Workers.Assertions.releases_step`, through complete command preservation and admitted history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.Funded.read","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {q : List Nat} {m : Effect4.Program.NativeMachine}\n  {pending : List Effect4.Program.ReleaseCustody.Control.Command},\n  Effect4.Program.ReleaseCustody.Control.Funded q m pending →\n    instLENat.le\n      (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n      (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":317,"lemmas":24,"nearest":["Effect4.Program.ReleaseCustody.Control.fin_program_credits"]},"doc":"The actual scope-add callback carries exactly its response-dependent credit into the next program.\nConsumer: the scope-add response debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.after_add_code_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (q : List Nat) (a : Effect4.Machine.Val)\n  (fin : Effect4.Machine.FinName) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.contAOf root (Effect4.Program.EffName.afterScopeAdd a fin) value))\n    (Effect4.Program.ReleaseCustody.afterAddCredits q fin value)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":173,"lemmas":10,"nearest":[]},"doc":"Asynchronous source rows carry no already-registered release.\nConsumer: `compile_credits`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.async_route_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (op : Effect4.Program.NativeOp) (request : Effect4.Program.Term)\n  (p : Effect4.Program.Point),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.asyncRoute op request p))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":111,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.fin_program_credits"]},"doc":"The actual close result owns the exact captured close order, including singleton and empty cases.\nConsumer: the native scope-close debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.close_program_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (strategy : Effect4.FinalizerStrategy) (order : List Effect4.Machine.FinName)\n  (exit : Effect4.Machine.ExitV),\n  Eq\n    ((Effect4.Program.ReleaseCustody.Control.close_program_credits.match_1\n          (fun order =>\n            Option\n              (Effect4.Prim Effect4.Machine.Name Effect4.Machine.Thunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          order (fun _ => Option.none)\n          (fun fin =>\n            Option.some\n              (Effect4.Prim.onSuccessConst (Effect4.Machine.finProgram fin exit)\n                (Effect4.Prim.success Effect4.Store.Val.unit)))\n          fun x =>\n          Option.some\n            (Effect4.Prim.suspend\n              (Effect4.Machine.Thunk.body\n                (Effect4.Machine.ProgName.closeWalk strategy order exit)))).elim\n      0 fun program =>\n      Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.embed program))\n    (Effect4.Program.ReleaseCustody.orderCredits q order)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":242,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.source_op_credits","Effect4.Program.ReleaseCustody.Control.async_route_credits"]},"doc":"Source compilation starts with no outstanding foreign custody.\nConsumer: `load_credits`, then `Execution.load`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.compile_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (e : Effect4.Program.NativeEff) (p : Effect4.Program.Point),\n  Eq (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.compileEff e p)) 0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":142,"lemmas":8,"nearest":[]},"doc":"Trace emission changes no outstanding control credit.\nConsumer: the native registration debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.emit_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (m : Effect4.Program.NativeMachine)\n  (events : List Effect4.Program.ReleaseTrace.Event),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.machineCredits q\n      (Effect4.Machine.RunMachine.emit m events))\n    (Effect4.Program.ReleaseCustody.Control.machineCredits q m)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":114,"lemmas":8,"nearest":[]},"doc":"The store's finalizer program owns exactly its source-indexed foreign credit.\nConsumer: the actual scope-close command custody clause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.fin_program_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fin : Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Machine.finProgram fin exit)))\n    (Effect4.Program.ReleaseCustody.credit q fin)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":451,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.compile_credits"]},"doc":"The actual native load owns no outstanding foreign credit.\nConsumer: `load_funded`, then `Execution.load`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.load_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (fuel : Nat),\n  Eq (Effect4.Program.ReleaseCustody.Control.machineCredits q (Effect4.Api.load root fuel)) 0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":457,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.load_credits"]},"doc":"The concrete command assertion holds on the actual initial machine and empty pending list.\nConsumer: `Execution.load`, then the admitted-history custody theorem. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.load_funded","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (fuel : Nat),\n  Effect4.Program.ReleaseCustody.Control.Funded q (Effect4.Api.load root fuel) List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":115,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.fin_program_credits"]},"doc":"Interpreting every stored program constructor retains its residual credits.\nConsumer: the stored-suspension command custody clause of `Workers.Assertions.releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.prog_of_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (program : Effect4.Machine.ProgName),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Machine.progOf program)))\n    (Effect4.Program.ReleaseCustody.Names.progCredits q program)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":106,"lemmas":8,"nearest":[]},"doc":"The unpushed registration template owns no credit yet.\nConsumer: the native registration debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.registration_template","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (scope : Nat) (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      ((Effect4.Prim.sync\n            (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin))).onSuccess\n        (Effect4.Program.EffName.afterScopeAdd a fin)))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":100,"lemmas":8,"nearest":[]},"doc":"Any actual scope-add response owns at most its reserved finalizer credit.\nConsumer: `stack_credits_bounded`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.response_credits_bounded","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fin : Effect4.Machine.FinName) (body : Effect4.Program.NCode),\n  instLENat.le (Effect4.Program.ReleaseCustody.Control.responseCredits q fin body)\n    (Effect4.Program.ReleaseCustody.credit q fin)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":66,"lemmas":13,"nearest":[]},"doc":"Source store rows mint no foreign registration; consumer: compile-load custody setup. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.source_op_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (op : Effect4.Program.NativeOp) (env : List Effect4.Machine.Val)\n  (v : Effect4.Machine.Val) (actual : Effect4.Machine.SyncOp),\n  Eq (op.syncOpOf env v) (Option.some actual) →\n    Eq (Effect4.Program.ReleaseCustody.Control.opCredits q actual) 0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"A with-fiber action retains every lower stack reservation before it returns a program.\nConsumer: the actual scope-close command custody clause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.stack_before_action","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (action : Effect4.Program.EffThunk) (stack : List Effect4.Program.NCode),\n  Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.withFiber action) stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCap q stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"An active close iterator retains every lower callback reservation.\nConsumer: the sequential close-iterator debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.stack_before_iterator","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Program.EffName) (cursor : Effect4.Machine.Val)\n  (stack : List Effect4.Program.NCode),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.iterator name cursor)\n      stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCap q stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"Active non-exit code keeps every lower callback reservation.\nConsumer: the native registration debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.stack_before_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (body : Effect4.Program.NCode) (name : Effect4.Program.EffName)\n  (stack : List Effect4.Program.NCode),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.onSuccess body name) stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCap q stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"A suspended stored program retains every lower callback reservation.\nConsumer: the native suspension debit and command closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.stack_before_suspend","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (thunk : Effect4.Program.EffThunk) (stack : List Effect4.Program.NCode),\n  Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.suspend thunk) stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCap q stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.response_credits_bounded"]},"doc":"The active response cannot exceed the lower stack's reserved credit.\nConsumer: the actual scope-close command custody clause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (body : Effect4.Program.NCode) (stack : List Effect4.Program.NCode),\n  instLENat.le (Effect4.Program.ReleaseCustody.Control.stackCredits q body stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCap q stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":142,"lemmas":8,"nearest":["Effect4.Machine.ControlWeights.replace_sum"]},"doc":"An actual keyed fiber update changes only the selected fiber's control credit.\nConsumer: native command closure; distinct IDs come from the existing Guard invariant. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Control","name":"Effect4.Program.ReleaseCustody.Control.update_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (m : Effect4.Program.NativeMachine)\n  (old next : Effect4.Program.ReleaseCustody.Control.Fiber),\n  (List.map Effect4.Machine.RunFiber.id\n        (m.fibers\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann))).Nodup →\n    List.instMembership.mem\n        (m.fibers\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        old →\n      Eq\n          (next.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          (old.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Eq\n          (instHAdd.hAdd\n            (Effect4.Program.ReleaseCustody.Control.machineCredits q\n              (Effect4.Machine.RunMachine.update m next))\n            (Effect4.Program.ReleaseCustody.Control.fiberCredits q old))\n          (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.machineCredits q m)\n            (Effect4.Program.ReleaseCustody.Control.fiberCredits q next))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":157,"lemmas":22,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.add_memo_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (memo : Effect4.Machine.MemoMapId) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.addCurrentMemoMapK memo value))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":147,"lemmas":22,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.bind_service_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (key : Option Effect4.ServiceKey) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.bindServiceK key value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":140,"lemmas":17,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.build_scope_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (point : Effect4.Program.Point) (scope : Nat) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.buildWithScopeK point scope value))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":154,"lemmas":22,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.combine_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (mode : Effect4.Program.CombineMode) (that : Effect4.Machine.Env.Ctx)\n  (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.combineWithK mode that value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":134,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.constant_stack_credits"]},"doc":"Pushing any constant continuation transfers its saved code without duplicating lower custody.\nConsumer: the full frame-step clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.constant_push_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (body next : Effect4.Program.NCode),\n  Eq\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.onSuccessConst body next) →\n    Eq\n      (Effect4.Program.ReleaseCustody.Control.fiberCredits q\n        {\n          id :=\n            fiber.id\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          frame :=\n            have __src :=\n              fiber.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann);\n            { current := body,\n              stack :=\n                List.cons (Effect4.Prim.onSuccessConst body next)\n                  (fiber.frame\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)).stack,\n              interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n              deferredInterrupt := __src.deferredInterrupt },\n          running :=\n            fiber.running\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          parked :=\n            fiber.parked\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          pending :=\n            fiber.pending\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          finalizing :=\n            fiber.finalizing\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          exit :=\n            fiber.exit\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          currentOpCount :=\n            fiber.currentOpCount\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          maxOpsBeforeYield :=\n            fiber.maxOpsBeforeYield\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          preventYield :=\n            fiber.preventYield\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          yieldOverride :=\n            fiber.yieldOverride\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          observers :=\n            fiber.observers\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          children :=\n            fiber.children\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          dispatcher :=\n            fiber.dispatcher\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          context :=\n            fiber.context\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann) })\n      (Effect4.Program.ReleaseCustody.Control.fiberCredits q fiber)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"The saved constant determines response custody beneath a wrapper.\nConsumer: the complete forced-yield clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.constant_stack_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (body next : Effect4.Program.NCode) (stack : List Effect4.Program.NCode),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.onSuccessConst body next)\n      stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q next stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":773,"lemmas":65,"nearest":[]},"doc":"The native evaluator pushes every constant continuation with its actual frame event.\nConsumer: the actual forced-yield command clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.constant_start","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (machine : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool) (body next : Effect4.Program.NCode),\n  Eq\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.onSuccessConst body next) →\n    Eq (Effect4.Program.evaluateNative root machine fiber yielding table)\n      {\n        machine :=\n          Effect4.Machine.RunMachine.emit machine\n            (List.cons\n              (Effect4.Machine.RunEvent.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (fiber.id\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                (Effect4.FrameEvent.pushed (Effect4.Prim.onSuccessConst body next)))\n              List.nil),\n        fiber :=\n          {\n            id :=\n              fiber.id\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            frame :=\n              have __src :=\n                fiber.frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann);\n              { current := body,\n                stack :=\n                  List.cons (Effect4.Prim.onSuccessConst body next)\n                    (fiber.frame\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).stack,\n                interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                deferredInterrupt := __src.deferredInterrupt },\n            running :=\n              fiber.running\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            parked :=\n              fiber.parked\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            pending :=\n              fiber.pending\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            finalizing :=\n              fiber.finalizing\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            exit :=\n              fiber.exit\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            currentOpCount :=\n              fiber.currentOpCount\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            maxOpsBeforeYield :=\n              fiber.maxOpsBeforeYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            preventYield :=\n              fiber.preventYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            yieldOverride :=\n              fiber.yieldOverride\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            observers :=\n              fiber.observers\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            children :=\n              fiber.children\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            dispatcher :=\n              fiber.dispatcher\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            context :=\n              fiber.context\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann) },\n        yielding := yielding, outcome := Effect4.Machine.Outcome.continue_, nested := List.nil }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":320,"lemmas":24,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.bind_service_credits","Effect4.Program.ReleaseCustody.Evaluation.service_lookup_credits","Effect4.Program.ReleaseCustody.Evaluation.merge_context_credits","Effect4.Program.ReleaseCustody.Evaluation.combine_credits","Effect4.Program.ReleaseCustody.Evaluation.provide_then_credits","Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits","Effect4.Program.ReleaseCustody.Evaluation.layer_construction_credits","Effect4.Program.ReleaseCustody.Control.registration_template","Effect4.Program.ReleaseCustody.Evaluation.layer_inner_credits","Effect4.Program.ReleaseCustody.Evaluation.add_memo_credits","Effect4.Program.ReleaseCustody.Evaluation.build_scope_credits","Effect4.Program.ReleaseCustody.Evaluation.update_body_credits","Effect4.Program.ReleaseCustody.Evaluation.provide_body_credits","Effect4.Program.ReleaseCustody.Evaluation.provide_layer_credits","Effect4.Program.ReleaseCustody.Control.fin_program_credits","Effect4.Program.ReleaseCustody.Evaluation.store_contA_credits","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits"]},"doc":"Every native value callback fits the reservation of its existing name.\nConsumer: the value-pop clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.contA_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (name : Effect4.Program.EffName)\n  (value : Effect4.Machine.Val),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.contAOf root name value))\n    (Effect4.Program.ReleaseCustody.Control.nameCredits q name)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":254,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.store_contE_credits","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits"]},"doc":"Every native failure callback has zero outstanding foreign release custody.\nConsumer: the cause-pop clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.contE_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (name : Effect4.Program.EffName)\n  (cause : Effect4.Machine.CauseV),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.contEOf root name cause))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":107,"lemmas":8,"nearest":[]},"doc":"Context administration introduces no foreign release custody.\nConsumer: the native layer callback clauses of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.context_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (update : Effect4.Machine.Env.ContextUpdate) (body : Effect4.Program.Region),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.updateContextAt update body))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":107,"lemmas":8,"nearest":[]},"doc":"Native exits have no outstanding foreign release credit.\nConsumer: `contE_credits` and the native value continuation clause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.exit_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (exit : Effect4.Machine.ExitV),\n  Eq (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.ofExit exit)) 0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":134,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le"]},"doc":"An interruption cause discards active and response custody without creating credits.\nConsumer: the actual interrupt edit in `Execution.outer_custody`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (cause : Effect4.Machine.CauseV),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q\n      {\n        id :=\n          fiber.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        frame :=\n          have __src :=\n            fiber.frame\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann);\n          { current := Effect4.Prim.failure cause, stack := __src.stack,\n            interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n            deferredInterrupt := __src.deferredInterrupt },\n        running :=\n          fiber.running\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        parked :=\n          fiber.parked\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        pending :=\n          fiber.pending\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        finalizing :=\n          fiber.finalizing\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        exit :=\n          fiber.exit\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        currentOpCount :=\n          fiber.currentOpCount\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        maxOpsBeforeYield :=\n          fiber.maxOpsBeforeYield\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        preventYield :=\n          fiber.preventYield\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        yieldOverride :=\n          fiber.yieldOverride\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        observers :=\n          fiber.observers\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        children :=\n          fiber.children\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        dispatcher :=\n          fiber.dispatcher\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        context :=\n          fiber.context\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann) })\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q fiber)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"Replacing active code by an interruption cause can only discard response custody.\nConsumer: loop-top interruption in `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (cause : Effect4.Machine.CauseV) (active : Effect4.Program.NCode)\n  (stack : List Effect4.Program.NCode),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.failure cause) stack)\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q active stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":787,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.constant_start"]},"doc":"A true charged yield verdict injects and pushes the saved constant at one charged checkpoint.\nConsumer: the full yield branch of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.forced_yield_iteration","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (machine : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber),\n  Eq\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).deferredInterrupt\n      Bool.false →\n    Eq (Effect4.Machine.yieldVerdict (Effect4.Machine.countOp fiber)) Bool.true →\n      Eq\n          (fiber.preventYield\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          Bool.false →\n        Eq\n          (Effect4.Machine.iteration (Effect4.Program.interpOf root table) machine fiber Bool.false)\n          {\n            machine :=\n              (Effect4.Machine.RunMachine.emit machine\n                    (List.cons\n                      (Effect4.Machine.RunEvent.yieldInjected\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (fiber.id\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann))\n                        (instHAdd.hAdd\n                          (fiber.currentOpCount\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann))\n                          1))\n                      List.nil)).emit\n                (List.cons\n                  (Effect4.Machine.RunEvent.frame\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (fiber.id\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    (Effect4.FrameEvent.pushed\n                      ((Effect4.Prim.yieldNowWith 0).onSuccessConst\n                        (fiber.frame\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)).current)))\n                  List.nil),\n            fiber :=\n              have __src := Effect4.Machine.countOp fiber;\n              {\n                id :=\n                  __src.id\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                frame :=\n                  have __src :=\n                    fiber.frame\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann);\n                  { current := Effect4.Prim.yieldNowWith 0,\n                    stack :=\n                      List.cons\n                        ((Effect4.Prim.yieldNowWith 0).onSuccessConst\n                          (fiber.frame\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)).current)\n                        (fiber.frame\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)).stack,\n                    interruptible := __src.interruptible,\n                    interruptedCause := __src.interruptedCause,\n                    deferredInterrupt := __src.deferredInterrupt },\n                running :=\n                  __src.running\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                parked :=\n                  __src.parked\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                pending :=\n                  __src.pending\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                finalizing :=\n                  __src.finalizing\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                exit :=\n                  __src.exit\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                currentOpCount :=\n                  __src.currentOpCount\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                maxOpsBeforeYield :=\n                  __src.maxOpsBeforeYield\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                preventYield :=\n                  __src.preventYield\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                yieldOverride := Option.none,\n                observers :=\n                  __src.observers\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                children :=\n                  __src.children\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                dispatcher :=\n                  __src.dispatcher\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann),\n                context :=\n                  __src.context\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann) },\n            yielding := Bool.true, outcome := Effect4.Machine.Outcome.continue_,\n            nested := List.nil }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":872,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.Control.emit_credits","Effect4.Program.ReleaseCustody.Control.update_credits","Effect4.Program.ReleaseCustody.Evaluation.forced_yield_iteration","Effect4.Machine.ControlSteps.loop_of_iteration"]},"doc":"The actual forced-yield command retains full custody on every selected native fiber.\nConsumer: the yield-injection branch of `Execution.history`.\nThe arbitrary pending suffix, actual operation count and stored continuation remain explicit. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.forced_yield_loop_funded","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (machine : Effect4.Program.NativeMachine) (id : Effect4.FiberId)\n  (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (pending : List Effect4.Program.ReleaseCustody.Control.Command) (q : List Nat),\n  (List.map Effect4.Machine.RunFiber.id\n        (machine.fibers\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann))).Nodup →\n    Effect4.Program.ReleaseCustody.Control.Funded q machine\n        (List.cons\n          (Effect4.Machine.Cmd.loop\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            id Bool.false)\n          pending) →\n      Eq (Effect4.Machine.RunMachine.fiber? machine id) (Option.some fiber) →\n        Eq\n            (fiber.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).deferredInterrupt\n            Bool.false →\n          Eq (Effect4.Machine.yieldVerdict (Effect4.Machine.countOp fiber)) Bool.true →\n            Eq\n                (fiber.preventYield\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                Bool.false →\n              Effect4.Program.ReleaseCustody.Control.Funded q\n                (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) machine\n                    (Effect4.Machine.Cmd.loop id Bool.false) pending).fst\n                (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) machine\n                    (Effect4.Machine.Cmd.loop id Bool.false) pending).snd","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":164,"lemmas":22,"nearest":[]},"doc":"Layer compilation creates no foreign release custody before registration.\nConsumer: `layer_zero_credits` and the native value continuation clause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_compile_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (layer : Effect4.Program.LayerTerm Effect4.Program.NativeOp)\n  (point : Effect4.Program.Point) (memo : Effect4.Machine.MemoMapId) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.compileLayer layer point memo scope))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":134,"lemmas":8,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_construction_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.constructionAt root point scope))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":174,"lemmas":22,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.layer_compile_credits","Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits"]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_inner_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point)\n  (memo : Effect4.Machine.MemoMapId) (child : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.innerLayerAt root point memo child))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":173,"lemmas":22,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.layer_with_credits"]},"doc":"Looking up the native layer producer introduces no foreign credit.\nConsumer: native layer and value callback clauses of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point)\n  (memo : Effect4.Machine.MemoMapId) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.resolveLayer root point memo scope))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":171,"lemmas":22,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.layer_compile_credits","Effect4.Program.ReleaseCustody.Evaluation.layer_zero_credits"]},"doc":"A layer redirection retains zero custody at every fuel.\nConsumer: `layer_resolve_credits`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_with_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (fuel : Nat)\n  (layer : Effect4.Program.LayerTerm Effect4.Program.NativeOp) (point : Effect4.Program.Point)\n  (memo : Effect4.Machine.MemoMapId) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.resolveLayerWith root fuel layer point memo scope))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":166,"lemmas":22,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.layer_compile_credits"]},"doc":"A layer frontier and its structural failure wrappers create no custody.\nConsumer: `layer_with_credits`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.layer_zero_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (layer : Effect4.Program.LayerTerm Effect4.Program.NativeOp)\n  (point : Effect4.Program.Point) (memo : Effect4.Machine.MemoMapId) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.resolveLayerZero layer point memo scope))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":143,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le"]},"doc":"The actual loop-top edit never increases selected control custody.\nConsumer: the full iteration clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.loop_top_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q\n      (Effect4.Machine.countOp (Effect4.Machine.runloopTop fiber)))\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q fiber)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":168,"lemmas":22,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.merge_context_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.mergeContextsK value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":246,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.exit_credits"]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.provide_body_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point)\n  (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.provideLayerBodyK root point value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":131,"lemmas":8,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.provide_layer_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point) (scope : Nat),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.provideLayerWithK root point scope))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":143,"lemmas":17,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.provide_then_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (point : Effect4.Program.Point) (memo : Effect4.Machine.MemoMapId) (scope : Nat)\n  (mode : Effect4.Program.CombineMode) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.provideThenK point memo scope mode value))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":269,"lemmas":24,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits"]},"doc":"Native region bodies retain zero custody before their registrations run.\nConsumer: the native value continuation clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.region_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (region : Effect4.Program.Region),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.regionCode root region))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":245,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.compile_credits"]},"doc":"Every compiled source callback starts with zero outstanding foreign custody.\nConsumer: the native continuation and suspension clauses of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.resolve_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point),\n  Eq (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.resolve root point))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":138,"lemmas":17,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.service_lookup_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (key : Effect4.ServiceKey) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.serviceLookupK key value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":122,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.prog_of_credits","Effect4.Program.ReleaseCustody.Evaluation.store_exit_credits"]},"doc":"Store value callbacks retain only their explicitly saved program credits.\nConsumer: the native continuation-pop clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.store_contA_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Machine.Name) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Machine.contAOf name value)))\n    (Effect4.Program.ReleaseCustody.Names.contCredits q name)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":130,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.store_exit_credits"]},"doc":"Store cause callbacks produce exits, without new foreign release custody.\nConsumer: the native continuation-pop clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.store_contE_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Machine.Name) (cause : Effect4.Machine.CauseV),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Machine.contEOf name cause)))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":109,"lemmas":8,"nearest":[]},"doc":"Embedded exits carry no foreign release custody.\nConsumer: `store_contA_credits` and `store_contE_credits`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.store_exit_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (exit : Effect4.Machine.ExitV),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Prim.ofExit exit)))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":273,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.prog_of_credits","Effect4.Program.ReleaseCustody.Control.compile_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits"]},"doc":"Opening every native suspension retains exactly the credits of its stored residual.\nConsumer: the suspension and with-fiber fallback clauses of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.suspend_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (thunk : Effect4.Program.EffThunk),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.suspendBodyAt root thunk))\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.suspend thunk))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":155,"lemmas":22,"nearest":[]},"doc":"This native value producer introduces no foreign release custody.\nConsumer: `contA_credits`, then `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.update_body_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (update : Effect4.Machine.Env.ContextUpdate)\n  (body : Effect4.Program.Region) (flag : Bool) (value : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.updateThenK root update body flag value))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":133,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.constant_stack_credits"]},"doc":"Injecting a yield keeps the selected fiber's full residual credit.\nConsumer: the complete loop injection clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Evaluation","name":"Effect4.Program.ReleaseCustody.Evaluation.yield_wrapper_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q\n      {\n        id :=\n          fiber.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        frame :=\n          have __src :=\n            fiber.frame\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann);\n          {\n            current :=\n              (Effect4.Prim.yieldNowWith 0).onSuccessConst\n                (fiber.frame\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).current,\n            stack := __src.stack, interruptible := __src.interruptible,\n            interruptedCause := __src.interruptedCause,\n            deferredInterrupt := __src.deferredInterrupt },\n        running :=\n          fiber.running\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        parked :=\n          fiber.parked\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        pending :=\n          fiber.pending\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        finalizing :=\n          fiber.finalizing\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        exit :=\n          fiber.exit\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        currentOpCount :=\n          fiber.currentOpCount\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        maxOpsBeforeYield :=\n          fiber.maxOpsBeforeYield\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        preventYield :=\n          fiber.preventYield\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        yieldOverride := Option.none,\n        observers :=\n          fiber.observers\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        children :=\n          fiber.children\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        dispatcher :=\n          fiber.dispatcher\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n        context :=\n          fiber.context\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann) })\n    (Effect4.Program.ReleaseCustody.Control.fiberCredits q fiber)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1322,"lemmas":116,"nearest":["Effect4.Program.ReleaseCustody.HistoryLift.decision","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.RuntimeShape.load","Effect4.Program.ReleaseCustody.Execution.load"]},"doc":"Custody on sequential direct-source admitted histories retains every registration credit.\nConsumer: `Workers.Assertions.releases_step`; the source identities and original application scope are unchanged.\nThe unrestricted internal command contract is refuted by `CustodyCommandControl.lean`.\nThe checked command and scheduler assertions retain actual owners, saved frames and reply codes.\nThis endpoint assumes neither an arbitrary command contract nor the desired release bound. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Execution","name":"Effect4.Program.ReleaseCustody.Execution.history","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (b : Effect4.Api.Built) (fuel : Nat) (q : List Nat) (m : Effect4.Program.NativeMachine),\n  Effect4.Program.SourceScope.Fragment b.program →\n    Effect4.Program.SourceScope.SequentialSource b.program →\n      Effect4.Program.SourceScope.RaceFreeSource b.program →\n        Effect4.Run.HistoryOf b fuel m → Effect4.Program.ReleaseCustody.Execution.Ready q m","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":471,"lemmas":20,"nearest":["Effect4.Program.ReleaseCustody.Control.load_funded"]},"doc":"Actual load has empty scopes, pending continuations and dispatcher buckets.\nConsumer: `history`; initial custody uses the universal checked compile projection. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Execution","name":"Effect4.Program.ReleaseCustody.Execution.load","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (fuel : Nat) (q : List Nat),\n  Effect4.Program.ReleaseCustody.Execution.Ready q (Effect4.Api.load root fuel)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1280,"lemmas":106,"nearest":["Effect4.Program.ReleaseCustody.Execution.ready_update","Effect4.Program.ReleaseCustody.Execution.ready_emit","Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le"]},"doc":"The actual edits outside the command loop provide the existing decision-lift fields.\nConsumer: `decision`, then the admitted-history custody assembly.\nThe command premise is explicit; no reachability predicate assumes a release bound. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Lift","name":"Effect4.Program.ReleaseCustody.Execution.outer_custody","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (q : List Nat),\n  Effect4.Program.ReleaseCustody.Execution.CommandContract root table q →\n    Effect4.Machine.Lift.DecisionLift Effect4.Machine.Lift.unitOrder\n      (Effect4.Program.interpOf root table)\n      (fun x m => Effect4.Program.ReleaseCustody.Execution.Ready q m)\n      (fun x m commands => Effect4.Program.ReleaseCustody.Control.Funded q m commands)\n      (fun x x_1 => Effect4.Program.ReleaseCustody.Execution.TasksZero q) fun x m decision =>\n      Effect4.Run.Accepted table (Effect4.Api.HostSession.callTable root table) m decision","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":162,"lemmas":14,"nearest":["Effect4.Program.ReleaseCustody.Control.emit_credits"]},"doc":"A zero-count event emission retains the concrete ready assertion.\nConsumer: task execution, interruption and actual scheduler bookkeeping in `outer_custody`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Lift","name":"Effect4.Program.ReleaseCustody.Execution.ready_emit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (m : Effect4.Program.NativeMachine)\n  (events : List Effect4.Program.ReleaseTrace.Event),\n  Effect4.Program.ReleaseCustody.Execution.Ready q m →\n    Eq (List.countP (Effect4.Program.ReleaseTrace.releaseAt q) events) 0 →\n      Eq (List.countP (Effect4.Program.ReleaseTrace.registeredAt q) events) 0 →\n        Effect4.Program.ReleaseCustody.Execution.Ready q (Effect4.Machine.RunMachine.emit m events)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":164,"lemmas":22,"nearest":["Effect4.Program.ReleaseCustody.Control.update_credits"]},"doc":"Updating one existing row preserves native shapes and consumes only its own credits.\nConsumer: the actual yield, interrupt and dispatcher edits in `outer_custody`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Lift","name":"Effect4.Program.ReleaseCustody.Execution.ready_update","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (m : Effect4.Program.NativeMachine)\n  (old next : Effect4.Program.ReleaseCustody.Control.Fiber),\n  Effect4.Program.ReleaseCustody.Execution.Ready q m →\n    Eq\n        (Effect4.Machine.RunMachine.fiber? m\n          (old.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        (Option.some old) →\n      Eq\n          (next.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          (old.id\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        (∀\n            (p :\n              Effect4.Machine.Pending Effect4.Program.EffName Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n            List.instMembership.mem\n                (next.pending\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                p →\n              Or (Eq p.resumeWith Effect4.Machine.Resume.exitsValue)\n                (Or (Eq p.resumeWith Effect4.Machine.Resume.void)\n                  (Exists fun exit =>\n                    Eq p.resumeWith\n                      (Effect4.Machine.Resume.continueWith\n                        (Effect4.Program.EffName.restore exit))))) →\n          (∀\n              (bucket :\n                Effect4.Machine.Bucket Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n              List.instMembership.mem\n                  ((next.dispatcher\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).buckets\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                  bucket →\n                Effect4.Program.ReleaseCustody.Execution.TasksZero q\n                  (bucket.tasks\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))) →\n            instLENat.le (Effect4.Program.ReleaseCustody.Control.fiberCredits q next)\n                (Effect4.Program.ReleaseCustody.Control.fiberCredits q old) →\n              Effect4.Program.ReleaseCustody.Execution.Ready q\n                (Effect4.Machine.RunMachine.update m next)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":634,"lemmas":64,"nearest":[]},"doc":"Native value arms push only iterator or loop frames.\nConsumer: resumption trace accounting below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.armA_counts","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (frame : Effect4.Program.NCode) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV) (next : Effect4.Program.NCode)\n  (pushed : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armA\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame value provided)\n      (Option.some { fst := next, snd := pushed }) →\n    And\n      (Eq\n        (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n          (List.map Effect4.FrameEvent.pushed pushed))\n        0)\n      (Eq\n        (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n          (List.map Effect4.FrameEvent.pushed pushed))\n        0)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":634,"lemmas":64,"nearest":[]},"doc":"Native cause arms push no new frame. Consumer: failure resumption trace accounting. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.armE_counts","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (frame : Effect4.Program.NCode) (cause : Effect4.Machine.CauseV)\n  (provided : Option Effect4.Machine.ExitV) (next : Effect4.Program.NCode)\n  (pushed : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armE\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame cause provided)\n      (Option.some { fst := next, snd := pushed }) →\n    And\n      (Eq\n        (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n          (List.map Effect4.FrameEvent.pushed pushed))\n        0)\n      (Eq\n        (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n          (List.map Effect4.FrameEvent.pushed pushed))\n        0)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.finalizerEvents_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (frame : Effect4.Program.NCode) (exit : Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush (Effect4.Prim.finalizerEvents frame exit)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":115,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le"]},"doc":"Failure replacement can discard stack reservations, never create one.\nConsumer: the administrative primitive cases below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.frame_failure_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Effect4.Machine.CauseV),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Pop.stepCredits q\n      (Effect4.FrameStep.running\n        { current := Effect4.Prim.failure cause, stack := fiber.stack,\n          interruptible := fiber.interruptible, interruptedCause := fiber.interruptedCause,\n          deferredInterrupt := fiber.deferredInterrupt }))\n    (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.currentCredits q fiber.current)\n      (Effect4.Program.ReleaseCustody.Control.stackCredits q fiber.current fiber.stack))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.popFrom_no_push"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (demand : Effect4.Arm) (skip : Bool)\n  (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush\n    (Effect4.FrameFiber.getCont fiber demand skip cause).events","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":649,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Producers.loopNext_credits"]},"doc":"The actual loop-entry producer creates source code before its registrations are pushed.\nConsumer: while-loop primitive debit below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.interp_loopEnter","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (name : Effect4.Program.EffName) (cursor : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Producers.loopCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).loopEnter\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        name cursor))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":648,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.suspend_credits"]},"doc":"Native suspension retains the producer's existing credit.\nConsumer: the suspension primitive case below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.interp_suspend","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (thunk : Effect4.Program.EffThunk),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).suspendBody\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        thunk))\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.suspend thunk))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":62,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.passPushed_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_append"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.joinPushed_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (demand : Effect4.Arm) (skip : Bool) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (rest : List Effect4.Program.NCode) (tail : Effect4.Program.ReleaseCustody.Pop.Result)\n  (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush tail.events →\n    Effect4.Program.ReleaseCustody.FrameDebit.noPush\n      (Effect4.FrameFiber.joinPushed demand skip fiber rest tail cause).events","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.noPush_append","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {a b : List Effect4.Program.ReleaseCustody.FrameDebit.Event},\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush a →\n    Effect4.Program.ReleaseCustody.FrameDebit.noPush b →\n      Effect4.Program.ReleaseCustody.FrameDebit.noPush (instHAppendOfAppend.hAppend a b)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":18,"lemmas":0,"nearest":[]},"doc":"Actual continuation removal starts and registers no acquireRelease callback.\nConsumer: resumeValue and resumeCause trace accounting. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (events : List Effect4.Program.ReleaseCustody.FrameDebit.Event),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush events →\n    And (Eq (Effect4.Program.ReleaseCustody.FrameDebit.starts q events) 0)\n      (Eq (Effect4.Program.ReleaseCustody.FrameDebit.registrations q events) 0)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":10,"lemmas":1,"nearest":[]},"doc":"Passing a frame emits no push. Consumer: continuation-pop trace accounting below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.passEvents_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (frame : Effect4.Program.NCode) (replacement : Option Effect4.Program.NCode),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush (Effect4.Prim.passEvents frame replacement)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":55,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.passEvents_no_push"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.passPushed_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (demand : Effect4.Arm) (skip : Bool) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush\n    (Effect4.FrameFiber.passPushed demand skip fiber cause).events","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.joinPushed_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_append","Effect4.Program.ReleaseCustody.FrameDebit.passEvents_no_push"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.popFrom_no_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (demand : Effect4.Arm) (skip : Bool) (frames : List Effect4.Program.NCode)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.FrameDebit.noPush\n    (Effect4.FrameFiber.popFrom demand skip frames fiber cause).events","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":115,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.stack_before_push"]},"doc":"Pushing an actual value continuation funds exactly its source-indexed registration or release event.\nConsumer: the onSuccess primitive debit below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.push_onSuccess","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (body : Effect4.Program.NCode) (name : Effect4.Program.EffName)\n  (rest : List Effect4.Program.NCode),\n  instLENat.le\n    (instHAdd.hAdd\n      (instHAdd.hAdd\n        (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n          (List.cons (Effect4.FrameEvent.pushed (Effect4.Prim.onSuccess body name)) List.nil))\n        (Effect4.Program.ReleaseCustody.Control.currentCredits q body))\n      (Effect4.Program.ReleaseCustody.Control.stackCredits q body\n        (List.cons (Effect4.Prim.onSuccess body name) rest)))\n    (instHAdd.hAdd\n      (instHAdd.hAdd\n        (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.onSuccess body name))\n        (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.onSuccess body name)\n          rest))\n      (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n        (List.cons (Effect4.FrameEvent.pushed (Effect4.Prim.onSuccess body name)) List.nil)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.registrations_append","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (left right : List Effect4.Program.ReleaseCustody.FrameDebit.Event),\n  Eq\n    (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n      (instHAppendOfAppend.hAppend left right))\n    (instHAdd.hAdd (Effect4.Program.ReleaseCustody.FrameDebit.registrations q left)\n      (Effect4.Program.ReleaseCustody.FrameDebit.registrations q right))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":666,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.armE_counts","Effect4.Program.ReleaseCustody.FrameDebit.registrations_append","Effect4.Program.ReleaseCustody.FrameDebit.starts_append","Effect4.Program.ReleaseCustody.FrameDebit.finalizerEvents_no_push","Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.resumeCause_counts","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Effect4.Machine.CauseV)\n  (provided : Option Effect4.Machine.ExitV),\n  And\n    (Eq\n      (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n        (Effect4.FrameFiber.resumeCause\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber cause provided).snd)\n      0)\n    (Eq\n      (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n        (Effect4.FrameFiber.resumeCause\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber cause provided).snd)\n      0)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":665,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.armA_counts","Effect4.Program.ReleaseCustody.FrameDebit.registrations_append","Effect4.Program.ReleaseCustody.FrameDebit.starts_append","Effect4.Program.ReleaseCustody.FrameDebit.finalizerEvents_no_push","Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.resumeValue_counts","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV),\n  And\n    (Eq\n      (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n        (Effect4.FrameFiber.resumeValue\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber value provided).snd)\n      0)\n    (Eq\n      (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n        (Effect4.FrameFiber.resumeValue\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber value provided).snd)\n      0)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":[]},"doc":"A non-response primitive keeps all lower reservations.\nConsumer: primitive evaluation and parked-frame cuts. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.stack_full","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (active : Effect4.Program.NCode) (frames : List Effect4.Program.NCode),\n  (∀ (fin : Effect4.Machine.FinName),\n      Eq (Effect4.Program.ReleaseCustody.Control.responseCredits q fin active)\n        (Effect4.Program.ReleaseCustody.credit q fin)) →\n    Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q active frames)\n      (Effect4.Program.ReleaseCustody.Control.stackCap q frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":11,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.starts_append","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (left right : List Effect4.Program.ReleaseCustody.FrameDebit.Event),\n  Eq (Effect4.Program.ReleaseCustody.FrameDebit.starts q (instHAppendOfAppend.hAppend left right))\n    (instHAdd.hAdd (Effect4.Program.ReleaseCustody.FrameDebit.starts q left)\n      (Effect4.Program.ReleaseCustody.FrameDebit.starts q right))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":701,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.FrameDebit.interp_loopEnter","Effect4.Program.ReleaseCustody.FrameDebit.stack_full","Effect4.Program.ReleaseCustody.Evaluation.constant_stack_credits","Effect4.Program.ReleaseCustody.FrameDebit.push_onSuccess","Effect4.Program.ReleaseCustody.Control.stack_before_iterator","Effect4.Program.ReleaseCustody.FrameDebit.armA_counts","Effect4.Program.ReleaseCustody.Pop.armA","Effect4.Program.ReleaseCustody.FrameDebit.frame_failure_le","Effect4.Program.ReleaseCustody.FrameDebit.withFiber_suspend_le","Effect4.Program.ReleaseCustody.Control.stack_before_action","Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","Effect4.Program.ReleaseCustody.Control.stack_before_suspend","Effect4.Program.ReleaseCustody.FrameDebit.interp_suspend","Effect4.Program.ReleaseCustody.FrameDebit.sync_stack_le","Effect4.Program.ReleaseCustody.FrameDebit.resumeCause_counts","Effect4.Program.ReleaseCustody.CausePop.resumeCause","Effect4.Program.ReleaseCustody.FrameDebit.resumeValue_counts","Effect4.Program.ReleaseCustody.Pop.resumeValue"]},"doc":"Every actual native frame step spends only its current and saved reservations.\nConsumer: stateful evaluator debit in Execution.command_custody. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  instLENat.le\n    (instHAdd.hAdd\n      (Effect4.Program.ReleaseCustody.FrameDebit.starts q\n        (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber).snd)\n      (Effect4.Program.ReleaseCustody.Pop.stepCredits q\n        (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber).fst))\n    (instHAdd.hAdd\n      (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.currentCredits q fiber.current)\n        (Effect4.Program.ReleaseCustody.Control.stackCredits q fiber.current fiber.stack))\n      (Effect4.Program.ReleaseCustody.FrameDebit.registrations q\n        (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber).snd))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.response_credits_bounded"]},"doc":"A synchronous answer uses either its full lower stack or the scope-add credit it returns.\nConsumer: the sync primitive debit below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.sync_stack_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (thunk : Effect4.Program.EffThunk) (value : Effect4.Machine.Val)\n  (stack : List Effect4.Program.NCode),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.success value) stack)\n    (instHAdd.hAdd\n      (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.sync thunk))\n      (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.sync thunk) stack))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":106,"lemmas":8,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameDebit","name":"Effect4.Program.ReleaseCustody.FrameDebit.withFiber_suspend_le","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (thunk : Effect4.Program.EffThunk),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.suspend thunk))\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Prim.withFiber thunk))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":669,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.constant_push_kept","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_cons","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","Effect4.Program.ReleaseCustody.PopSequencing.armA_noAdd","Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.PopSequencing.resumeCause_kept","Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd"]},"doc":"All eighteen native primitive cases retain the callback sequence.\nThe template premise is the existing CodeAt registration-body projection.\nConsumer: native evaluator and admitted command histories. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.FrameSequencing","name":"Effect4.Program.ReleaseCustody.FrameSequencing.step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    (∀\n        (body :\n          Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName),\n        Eq fiber.current (body.onSuccess (Effect4.Program.EffName.afterScopeAdd a fin)) →\n          Exists fun scope =>\n            Eq body\n              (Effect4.Prim.sync\n                (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin)))) →\n      Effect4.Program.ReleaseCustody.FrameSequencing.step.match_1 (fun x => Prop)\n        (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber).fst\n        (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n        fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1181,"lemmas":1642,"nearest":["Effect4.Machine.Lift.driveState_lift","Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.Execution.ready_update","Effect4.Program.ReleaseCustody.Execution.ready_emit","Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","Effect4.Scope.closeOrder_eq","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Program.ReleaseCustody.CommandClosure.joined","Effect4.Program.ReleaseCustody.AdministrativeKept.non_evaluator","Effect4.Program.ReleaseCustody.Control.update_credits","Effect4.Program.ReleaseCustody.Control.emit_credits","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.ScopeTransfer.link","Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Sequencing.resume_command","Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.HistoryLift.fold_lift"]},"doc":"Every actual native decision retains custody on the sequential race-free source fragment.\nConsumer: Execution.history uses the existing admitted-history induction. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.HistoryLift","name":"Effect4.Program.ReleaseCustody.HistoryLift.decision","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (fuel : Nat)\n  (m : Effect4.Program.NativeMachine) (row : Effect4.Program.NativeDecision),\n  Effect4.Program.SourceScope.Fragment root →\n    Effect4.Program.SourceScope.SequentialSource root →\n      Effect4.Program.SourceScope.RaceFreeSource root →\n        Effect4.Program.ReleaseCustody.CommandClosure.Held q root m →\n          Effect4.Program.ReleaseCustody.CommandClosure.Held q root\n            (Effect4.Program.steppedBy root fuel table m row)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1155,"lemmas":1384,"nearest":["Effect4.Program.ReleaseCustody.Execution.ready_emit","Effect4.Program.ReleaseCustody.Execution.ready_update","Effect4.Program.ReleaseCustody.CommandClosure.joined","Effect4.Scope.closeOrder_eq","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.Lift.driveState_lift"]},"doc":"The actual scheduler fold combines Guard reservations, source ownership and custody.\nConsumer: fire, flush and clock branches of admitted-history closure. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.HistoryLift","name":"Effect4.Program.ReleaseCustody.HistoryLift.fold_lift","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (before : Effect4.Program.NativeMachine),\n  Effect4.Program.SourceScope.Fragment root →\n    Effect4.Program.SourceScope.SequentialSource root →\n      Effect4.Program.SourceScope.RaceFreeSource root →\n        Effect4.Machine.Lift.FoldLift Effect4.Machine.Lift.unitOrder\n          (Effect4.Program.interpOf root table)\n          (fun x m => Effect4.Program.ReleaseCustody.HistoryLift.Persistent q root before m)\n          (fun x m commands =>\n            Effect4.Program.ReleaseCustody.CommandClosure.Queued q root table m commands)\n          fun x m tasks => Effect4.Program.ReleaseCustody.HistoryLift.Snapshot root m tasks","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1044,"lemmas":448,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.NativeMachineShape.native","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.NativeScopeDebit.native","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Program.ReleaseCustody.NativeSequencing.native_returned"]},"doc":"The actual delivery installs one returned owner and protects every waiting command.\nConsumer: full command induction for the original Workers release history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.LoopCommand","name":"Effect4.Program.ReleaseCustody.LoopCommand.deliver","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (id : Effect4.FiberId) (yielding : Bool)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue root table m\n        (List.cons\n          (Effect4.Machine.Cmd.deliver\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            id yielding)\n          rest) →\n      Effect4.Program.ReleaseCustody.Execution.ScopeRows m →\n        Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n          Effect4.Program.ReleaseCustody.CommandStacks.QueueStable m\n              (List.cons\n                (Effect4.Machine.Cmd.deliver\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  id yielding)\n                rest) →\n            Effect4.Program.SourceScope.ConfigurationAt root m →\n              Effect4.Program.SourceScope.Fragment root →\n                Effect4.Program.SourceScope.SequentialSource root →\n                  Effect4.Program.SourceScope.RaceFreeSource root →\n                    Effect4.Program.ReleaseCustody.Control.Funded q m\n                        (List.cons\n                          (Effect4.Machine.Cmd.deliver\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            id yielding)\n                          rest) →\n                      have out :=\n                        Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                          (Effect4.Machine.Cmd.deliver\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            id yielding)\n                          rest;\n                      And (Effect4.Program.ReleaseCustody.Control.Funded q out.fst out.snd)\n                        (And (Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept out.fst)\n                          (Effect4.Program.ReleaseCustody.CommandStacks.QueueStable out.fst\n                            out.snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1046,"lemmas":462,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.NativeMachineShape.iteration","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.NativeIterationDebit.iteration","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Program.ReleaseCustody.NativeSequencing.iteration_returned"]},"doc":"The actual loop installs one returned owner and protects every waiting command.\nConsumer: full command induction for the original Workers release history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.LoopCommand","name":"Effect4.Program.ReleaseCustody.LoopCommand.loop","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (id : Effect4.FiberId) (yielding : Bool)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue root table m\n        (List.cons\n          (Effect4.Machine.Cmd.loop\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            id yielding)\n          rest) →\n      Effect4.Program.ReleaseCustody.Execution.ScopeRows m →\n        Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n          Effect4.Program.ReleaseCustody.CommandStacks.QueueStable m\n              (List.cons\n                (Effect4.Machine.Cmd.loop\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  id yielding)\n                rest) →\n            Effect4.Program.SourceScope.ConfigurationAt root m →\n              Effect4.Program.SourceScope.Fragment root →\n                Effect4.Program.SourceScope.SequentialSource root →\n                  Effect4.Program.SourceScope.RaceFreeSource root →\n                    Effect4.Program.ReleaseCustody.Control.Funded q m\n                        (List.cons\n                          (Effect4.Machine.Cmd.loop\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            id yielding)\n                          rest) →\n                      have out :=\n                        Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                          (Effect4.Machine.Cmd.loop\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            id yielding)\n                          rest;\n                      And (Effect4.Program.ReleaseCustody.Control.Funded q out.fst out.snd)\n                        (And (Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept out.fst)\n                          (Effect4.Program.ReleaseCustody.CommandStacks.QueueStable out.fst\n                            out.snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":271,"lemmas":18,"nearest":["Effect4.Program.ReleaseCustody.after_add_exit_credit","Effect4.Program.ReleaseCustody.add_open","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.after_add_unit_credit","Effect4.Program.ReleaseCustody.ScopeTransfer.syncOp","Effect4.Program.ReleaseCustody.Sequencing.noAdd_full"]},"doc":"Every stateful native operation accounts for the actual pending scope-add response.\nConsumer: synchronous evaluator custody in the original Workers history proof. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeDebit","name":"Effect4.Program.ReleaseCustody.NativeDebit.sync_op","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (s next : Effect4.Machine.Stores) (op : Effect4.Machine.SyncOp)\n  (value : Effect4.Machine.Val) (frames : List Effect4.Program.NCode),\n  (List.map Effect4.Machine.ScopeEntry.key s.scopes.entries).Nodup →\n    s.ScopeKeysFresh →\n      Effect4.Program.ReleaseCustody.Sequencing.Kept\n          (Effect4.Prim.sync (Effect4.Program.EffThunk.op op)) frames →\n        Eq (Effect4.Machine.syncOpStep op s) (Option.some { fst := next, snd := value }) →\n          instLENat.le\n            (instHAdd.hAdd\n              (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q next.scopes)\n              (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.success value)\n                frames))\n            (instHAdd.hAdd\n              (instHAdd.hAdd (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q s.scopes)\n                (Effect4.Program.ReleaseCustody.Control.opCredits q op))\n              (Effect4.Program.ReleaseCustody.Control.stackCredits q\n                (Effect4.Prim.sync (Effect4.Program.EffThunk.op op)) frames))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":865,"lemmas":67,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.yield_wrapper_credits","Effect4.Program.ReleaseCustody.Sequencing.forced_wrapper","Effect4.Program.ReleaseCustody.NativeScopeDebit.native","Effect4.Program.ReleaseCustody.Evaluation.loop_top_credits","Effect4.Program.ReleaseCustody.NativeSequencing.loop_top_source","Effect4.Program.ReleaseCustody.NativeSequencing.loop_top"]},"doc":"Actual loop charging, interruption and forced yield compose with the complete native debit.\nConsumer: the loop command scalar bound, then the original admitted Workers history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeIterationDebit","name":"Effect4.Program.ReleaseCustody.NativeIterationDebit.iteration","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.SourceScope.Fragment root →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.SourceScope.SequentialSource root →\n          (List.map Effect4.Machine.RunFiber.id\n                (m.fibers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))).Nodup →\n            (List.map Effect4.Machine.ScopeEntry.key\n                  (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).scopes.entries).Nodup →\n              (m.state\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).ScopeKeysFresh →\n                Eq\n                    (m.races\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    List.nil →\n                  Effect4.Program.ReleaseCustody.IterDebit q m fiber\n                    (Effect4.Machine.iteration (Effect4.Program.interpOf root table) m fiber\n                      yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":808,"lemmas":108,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.Sequencing.interrupt"]},"doc":"Yield injection and the native iteration retain every stored fiber's sequencing.\nConsumer: `Execution.history` through actual loop command settlement. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeMachineShape","name":"Effect4.Program.ReleaseCustody.NativeMachineShape.iteration","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (interp : Effect4.Program.Moves.NInterp) (m : Effect4.Program.NativeMachine)\n  (fiber : Effect4.Program.Moves.NFiber) (yielding : Bool),\n  Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n    Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept\n      ((Effect4.Machine.iteration interp m fiber yielding).machine\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":795,"lemmas":107,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.Sequencing.interrupt"]},"doc":"Every native evaluation retains stored-fiber sequencing before its result is installed.\nConsumer: `Execution.history` through actual command settlement. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeMachineShape","name":"Effect4.Program.ReleaseCustody.NativeMachineShape.native","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.Moves.NFiber) (yielding : Bool),\n  Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept m →\n    Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept\n      ((Effect4.Program.evaluateNative root m fiber yielding table).machine\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":901,"lemmas":183,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","Effect4.Program.ReleaseCustody.Sequencing.async_noAdd","Effect4.Program.ReleaseCustody.Sequencing.stable_full","Effect4.Program.ReleaseCustody.Sequencing.yield_stable","Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits","Effect4.Program.ReleaseCustody.Control.prog_of_credits","Effect4.Program.ReleaseCustody.Evaluation.region_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits","Effect4.Program.ReleaseCustody.Control.compile_credits","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.ScopeTransfer.close","Effect4.Program.ReleaseCustody.ScopeTransfer.link","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd","Effect4.Program.ReleaseCustody.FrameDebit.resumeCause_counts","Effect4.Program.ReleaseCustody.FrameDebit.resumeValue_counts","Effect4.Program.ReleaseCustody.FrameDebit.step","Effect4.Program.ReleaseCustody.ScopeTransfer.syncOp","Effect4.Program.ReleaseCustody.NativeDebit.sync_op","Effect4.Program.ReleaseCustody.FrameDebit.sync_stack_le","Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","Effect4.Program.ReleaseCustody.CausePop.getCont_cause","Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts","Effect4.Program.ReleaseCustody.Control.fin_program_credits","Effect4.Program.ReleaseCustody.Pop.getCont_value","Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd"]},"doc":"Every actual primitive evaluator case accounts for its foreign-release custody.\nConsumer: native scoped evaluator assembly and the original admitted Workers history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeParkDebit","name":"Effect4.Program.ReleaseCustody.NativeParkDebit.primitive","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.SourceScope.Fragment root →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.SourceScope.SequentialSource root →\n          (List.map Effect4.Machine.RunFiber.id\n                (m.fibers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))).Nodup →\n            (List.map Effect4.Machine.ScopeEntry.key\n                  (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).scopes.entries).Nodup →\n              (m.state\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).ScopeKeysFresh →\n                Eq\n                    (m.races\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    List.nil →\n                  Effect4.Program.ReleaseCustody.IterDebit q m fiber\n                    (Effect4.Machine.evaluatePrim\n                      (Effect4.Program.interpAt root (Effect4.Machine.RunMachine.completedExits m)\n                        table)\n                      m fiber yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":871,"lemmas":74,"nearest":["Effect4.Program.ReleaseCustody.Control.fin_program_credits","Effect4.Program.ReleaseCustody.close_scope","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","Effect4.Program.ReleaseCustody.CausePop.getCont_cause","Effect4.Program.ReleaseCustody.Pop.getCont_value","Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd","Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd","Effect4.Program.ReleaseCustody.NativeParkDebit.primitive"]},"doc":"All native evaluator branches retain the actual scope and continuation debit.\nConsumer: iteration accounting, then `Execution.history` at the original Workers statement. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeScopeDebit","name":"Effect4.Program.ReleaseCustody.NativeScopeDebit.native","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.SourceScope.Fragment root →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.SourceScope.SequentialSource root →\n          (List.map Effect4.Machine.RunFiber.id\n                (m.fibers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))).Nodup →\n            (List.map Effect4.Machine.ScopeEntry.key\n                  (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).scopes.entries).Nodup →\n              (m.state\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).ScopeKeysFresh →\n                Eq\n                    (m.races\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    List.nil →\n                  Effect4.Program.ReleaseCustody.IterDebit q m fiber\n                    (Effect4.Program.evaluateNative root m fiber yielding table)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":130,"lemmas":1,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_mask","Effect4.Program.ReleaseCustody.Sequencing.noAdd_asyncFinalizer"]},"doc":"Every fiber action changes the local saved stack only by administrative frames.\nConsumer: the actual opaque action evaluator's parked and command boundaries. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.ReleaseCustody.NativeSequencing.Interp)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (yielding : Bool) (action : Effect4.Program.ReleaseCustody.NativeSequencing.Action),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (((Effect4.Machine.evaluatePrim.withFiber interp m fiber yielding action).fiber\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":128,"lemmas":1,"nearest":[]},"doc":"No fiber action returns the finished-frame boundary.\nConsumer: action sequencing exposes the actual command boundary without a synthetic finish. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_not_finished","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.ReleaseCustody.NativeSequencing.Interp)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (yielding : Bool) (action : Effect4.Program.ReleaseCustody.NativeSequencing.Action)\n  (exit : Effect4.Machine.ExitV),\n  Ne\n    ((Effect4.Machine.evaluatePrim.withFiber interp m fiber yielding action).outcome\n      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n    (Effect4.Machine.Outcome.finished exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":130,"lemmas":1,"nearest":["Effect4.Program.ReleaseCustody.NativeSequencing.action_not_finished","Effect4.Program.ReleaseCustody.NativeSequencing.action_noAdd","Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.ReleaseCustody.NativeSequencing.Interp)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (yielding : Bool) (action : Effect4.Program.ReleaseCustody.NativeSequencing.Action),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n      (Effect4.Machine.evaluatePrim.withFiber interp m fiber yielding action)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":["Effect4.Program.ReleaseCustody.NativeSequencing.action_noAdd"]},"doc":"Countdown parks add only the actual cancellation finalizer to an already clean stack.\nConsumer: suspended await-all and join evaluator cases. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.countdown_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (interp : Effect4.Program.ReleaseCustody.NativeSequencing.Interp)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (targets : List Effect4.FiberId),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      ((Effect4.Machine.countdownPark interp m fiber targets\n                  Effect4.Machine.Resume.exitsValue).snd.fst.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.getCont_cause_kept","Effect4.Program.ReleaseCustody.PopSequencing.getCont_value_finalizer"]},"doc":"Selecting an exit finalizer leaves no response-sensitive registration beneath it.\nConsumer: native program finalizers and scoped-close cleanup. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    ∀ (exit : Effect4.Machine.ExitV) (body : Effect4.Program.NCode) (name : Effect4.Program.EffName)\n      (flag : Bool)\n      (found :\n        Eq\n          (Effect4.FrameFiber.getCont fiber\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_1\n                (fun exit => Effect4.Arm) exit (fun value => Effect4.Arm.contA) fun cause =>\n                Effect4.Arm.contE)\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_1\n                (fun exit => Bool) exit (fun value => Bool.false) fun cause => Bool.true)\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_1\n                (fun exit =>\n                  Option\n                    (Effect4.Cause Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                exit (fun value => Option.none) fun cause => Option.some cause)).answer\n          (Effect4.ContAnswer.frame (Effect4.Prim.onExit body name flag))),\n      Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n        (Effect4.FrameFiber.getCont fiber\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_3 fiber body\n                name flag (fun exit found => Effect4.Arm) exit found\n                (fun value found => Effect4.Arm.contA) fun cause found => Effect4.Arm.contE)\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_3 fiber body\n                name flag (fun exit found => Bool) exit found (fun value found => Bool.false)\n                fun cause found => Bool.true)\n              (Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd.match_3 fiber body\n                name flag\n                (fun exit found =>\n                  Option\n                    (Effect4.Cause Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                exit found (fun value found => Option.none) fun cause found =>\n                Option.some cause)).fiber.stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":731,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.NativeSequencing.step_frame","Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd"]},"doc":"Program finalizers run on a clean residual stack after the actual continuation pop.\nConsumer: success and failure evaluation in the native interpreter. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.finalizer_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (m : Effect4.Program.NativeMachine)\n  (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber) (yielding : Bool)\n  (exit : Effect4.Machine.ExitV),\n  Eq\n      (fiber.parked\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Effect4.Machine.Parked.notParked →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n          (Effect4.Machine.evaluatePrim.finalizerOr (Effect4.Program.interpAt root completed table)\n            m fiber yielding exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":166,"lemmas":10,"nearest":["Effect4.Program.ReleaseCustody.FrameSequencing.step"]},"doc":"The native frame rule consumes the source predicate's existing registration-body field.\nConsumer: the primitive evaluator delegation below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.frame_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    Effect4.Program.SourceScope.FrameAt root fiber →\n      Effect4.Program.ReleaseCustody.NativeSequencing.frame_step.match_1 (fun x => Prop)\n        (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            fiber).fst\n        (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n        fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":813,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.forced_wrapper","Effect4.Program.ReleaseCustody.NativeSequencing.native_returned","Effect4.Program.ReleaseCustody.NativeSequencing.loop_top_source","Effect4.Program.ReleaseCustody.NativeSequencing.loop_top"]},"doc":"Forced yield and the loop-top interruption cut preserve every actual evaluator boundary.\nConsumer: the original Workers release history, through the actual scheduler iteration. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.iteration_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (yielding : Bool),\n  Eq\n      (fiber.parked\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Effect4.Machine.Parked.notParked →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n          (Effect4.Machine.iteration (Effect4.Program.interpOf root table) m fiber yielding)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":32,"lemmas":0,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.interrupt"]},"doc":"Loop-top interruption retains the pending registration phase before the next operation.\nConsumer: native iteration sequencing. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.loop_top","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n      ((Effect4.Machine.runloopTop fiber).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      ((Effect4.Machine.runloopTop fiber).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":191,"lemmas":9,"nearest":[]},"doc":"Loop-top interruption retains the shared source predicate's original saved frames.\nConsumer: native iteration's source-linked primitive rule. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.loop_top_source","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber),\n  Effect4.Program.SourceScope.FrameAt root\n      (fiber.frame\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n    Effect4.Program.SourceScope.FrameAt root\n      ((Effect4.Machine.runloopTop fiber).frame\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":804,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.NativeSequencing.scoped_exit_returned","Effect4.Program.ReleaseCustody.NativeSequencing.primitive_returned","Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd"]},"doc":"Native scoped entry and both stateful exit routes retain the same returned shape.\nConsumer: the actual command loop's evaluator premise. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.native_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber)\n  (yielding : Bool),\n  Eq\n      (fiber.parked\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Effect4.Machine.Parked.notParked →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n          (Effect4.Program.evaluateNative root m fiber yielding table)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":797,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.async_noAdd","Effect4.Program.ReleaseCustody.Sequencing.stable_value","Effect4.Program.ReleaseCustody.Sequencing.yield_stable","Effect4.Program.ReleaseCustody.NativeSequencing.action_returned","Effect4.Program.ReleaseCustody.NativeSequencing.countdown_noAdd","Effect4.Program.ReleaseCustody.Sequencing.noAdd_asyncFinalizer","Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","Effect4.Program.ReleaseCustody.Sequencing.value_response","Effect4.Program.ReleaseCustody.NativeSequencing.finalizer_returned","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd","Effect4.Program.ReleaseCustody.NativeSequencing.step_frame"]},"doc":"A native primitive evaluation retains sequencing at every park and returned command.\nConsumer: the stateful native evaluator and actual Workers command loop. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.primitive_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (m : Effect4.Program.NativeMachine)\n  (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber) (yielding : Bool),\n  Eq\n      (fiber.parked\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Effect4.Machine.Parked.notParked →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n          (Effect4.Machine.evaluatePrim (Effect4.Program.interpAt root completed table) m fiber\n            yielding)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":12,"lemmas":0,"nearest":[]},"doc":"A clean residual stack retains every reply and command boundary.\nConsumer: the opaque native action and park evaluator cases. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (it : Effect4.Program.ReleaseCustody.RuntimeShape.Iteration),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      ((it.fiber\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    (∀\n        (exit :\n          Effect4.Exit Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n            Effect4.FiberId Effect4.Machine.Ann),\n        Eq\n            (it.outcome\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))\n            (Effect4.Machine.Outcome.finished exit) →\n          Eq\n            ((it.fiber\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).stack\n            List.nil) →\n      Effect4.Program.ReleaseCustody.RuntimeShape.Returned it","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":778,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd"]},"doc":"The stateful scoped callback also starts cleanup only after the registration is passed.\nConsumer: native scoped-success and scoped-failure evaluation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.scoped_exit_returned","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (m : Effect4.Program.NativeMachine)\n  (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber) (yielding : Bool)\n  (exit : Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n        (Effect4.Machine.evaluatePrim\n          (Effect4.Program.interpAt root (Effect4.Machine.RunMachine.completedExits m)) m fiber\n          yielding) →\n      Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n        (Effect4.Program.exitScoped root m fiber yielding exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":729,"lemmas":100,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","Effect4.Program.ReleaseCustody.NativeSequencing.frame_step"]},"doc":"The actual primitive delegate retains both its running and finished boundary shapes.\nConsumer: the native evaluator's ordinary cases. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.NativeSequencing","name":"Effect4.Program.ReleaseCustody.NativeSequencing.step_frame","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (m : Effect4.Program.NativeMachine)\n  (fiber : Effect4.Program.ReleaseCustody.RuntimeShape.Fiber) (yielding : Bool),\n  Eq\n      (fiber.parked\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n      Effect4.Machine.Parked.notParked →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack →\n      Effect4.Program.SourceScope.FrameAt root\n          (fiber.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)) →\n        Effect4.Program.ReleaseCustody.RuntimeShape.Returned\n          (Effect4.Machine.evaluatePrim.stepFrame (Effect4.Program.interpAt root completed table) m\n            fiber yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":657,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Producers.iterator_future","Effect4.Program.ReleaseCustody.Producers.interp_iter","Effect4.Program.ReleaseCustody.Producers.interp_loopResume","Effect4.Program.ReleaseCustody.Evaluation.exit_credits","Effect4.Program.ReleaseCustody.Control.after_add_code_credits","Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","Effect4.Program.ReleaseCustody.Producers.interp_contA"]},"doc":"Invoking the selected native value arm consumes its retained answer reservation.\nConsumer: resumeValue debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Pop","name":"Effect4.Program.ReleaseCustody.Pop.armA","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (frame : Effect4.Program.NCode) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV) (next : Effect4.Program.NCode)\n  (pushed rest : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armA\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame value provided)\n      (Option.some { fst := next, snd := pushed }) →\n    instLENat.le\n      (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.currentCredits q next)\n        (Effect4.Program.ReleaseCustody.Control.stackCredits q next\n          (instHAppendOfAppend.hAppend pushed rest)))\n      (Effect4.Program.ReleaseCustody.Pop.valueAnswer q (Effect4.Prim.success value)\n        (Effect4.ContAnswer.frame frame) rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":159,"lemmas":10,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","Effect4.Program.ReleaseCustody.Pop.value_cap"]},"doc":"The actual value pop consumes the active response projection rather than an independent stack sum.\nConsumer: native resumeValue debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Pop","name":"Effect4.Program.ReleaseCustody.Pop.getCont_value","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (active : Effect4.Program.NCode)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Pop.valueCredits q active\n      (Effect4.FrameFiber.getCont fiber Effect4.Arm.contA Bool.false))\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q active fiber.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":688,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Pop.armA","Effect4.Program.ReleaseCustody.Pop.getCont_value"]},"doc":"Resuming an actual native value consumes the credits transferred by getCont.\nConsumer: native evaluator debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Pop","name":"Effect4.Program.ReleaseCustody.Pop.resumeValue","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Pop.stepCredits q\n      (Effect4.FrameFiber.resumeValue\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber value provided).fst)\n    (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.success value) fiber.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":157,"lemmas":10,"nearest":["Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","Effect4.Program.ReleaseCustody.Control.response_credits_bounded"]},"doc":"Value popping transfers at most the reservations held by the saved frames.\nConsumer: the sharper current-response value pop below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Pop","name":"Effect4.Program.ReleaseCustody.Pop.value_cap","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (active : Effect4.Program.NCode) (frames : List Effect4.Program.NCode)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Eq fiber.stack List.nil →\n    instLENat.le\n      (Effect4.Program.ReleaseCustody.Pop.valueCredits q active\n        (Effect4.FrameFiber.popFrom Effect4.Arm.contA Bool.false frames fiber))\n      (Effect4.Program.ReleaseCustody.Control.stackCap q frames)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":2,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.answerOf_clean","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (frame : Effect4.Program.NCode) (demand : Effect4.Arm)\n  (replacement : Option Effect4.Program.NCode)\n  (answer :\n    Effect4.ContAnswer Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n  (∀\n      (body :\n        Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName),\n      Ne frame (body.onSuccess (Effect4.Program.EffName.afterScopeAdd a fin))) →\n    Eq (Effect4.Prim.answerOf frame demand replacement) (Option.some answer) →\n      Effect4.Program.ReleaseCustody.PopSequencing.AnswerClean answer","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":629,"lemmas":65,"nearest":[]},"doc":"Native value arms push only iterator or loop frames.\nConsumer: actual clean-stack value resumption. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.armA_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (frame : Effect4.Program.NCode) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV) (next : Effect4.Program.NCode)\n  (pushed : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armA\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame value provided)\n      (Option.some { fst := next, snd := pushed }) →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd pushed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":629,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty"]},"doc":"Native cause arms push no new frame.\nConsumer: actual clean-stack failure resumption. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.armE_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (frame : Effect4.Program.NCode)\n  (cause : Effect4.Machine.CauseV) (provided : Option Effect4.Machine.ExitV)\n  (next : Effect4.Program.NCode) (pushed : List Effect4.Program.NCode),\n  Eq\n      (Effect4.Prim.armE\n        ((Effect4.Program.interpAt root completed table).toPrimInterp\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        frame cause provided)\n      (Option.some { fst := next, snd := pushed }) →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd pushed","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.forced_unwrap","Effect4.Program.ReleaseCustody.Sequencing.forced_push","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_cons","Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd"]},"doc":"The actual constant push either saves the pending phase or pushes an ordinary frame.\nConsumer: the native onSuccessConst primitive case. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.constant_push_kept","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (body next : Effect4.Program.NCode) {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.onSuccessConst body next) frames →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept body\n      (List.cons (Effect4.Prim.onSuccessConst body next) frames)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":0,"nearest":[]},"doc":"Ensure pushes only masks, preserving absence of transient scope callbacks.\nConsumer: the actual fused pop below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.ensure_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (frame : Effect4.Program.NCode) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd (Effect4.Prim.ensure frame fiber).fst.stack","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"The saved constant retains the exact phase below its injected yield.\nConsumer: constant_push_kept. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.forced_unwrap","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (priority : Nat) {next : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      ((Effect4.Prim.yieldNowWith priority).onSuccessConst next) frames →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept next frames","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.popFrom_cause_kept"]},"doc":"The actual cause pop discards all transient value callback positions.\nConsumer: resumeCause_kept. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_cause_kept","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (Effect4.FrameFiber.getCont fiber Effect4.Arm.contE Bool.true (Option.some cause)).fiber.stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.PopSequencing.popFrom_noAdd"]},"doc":"The actual deferred-interrupt branch retains the original clean stack.\nConsumer: native resumeValue and resumeCause. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (demand : Effect4.Arm) (skip : Bool)\n  (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n    And\n      (Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n        (Effect4.FrameFiber.getCont fiber demand skip cause).fiber.stack)\n      (Effect4.Program.ReleaseCustody.PopSequencing.AnswerClean\n        (Effect4.FrameFiber.getCont fiber demand skip cause).answer)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":64,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.popFrom_value_finalizer"]},"doc":"The actual continuation getter reaching a finalizer has no pending registration below it.\nConsumer: both native stateful exit routes. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_value_finalizer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    ∀ (body : Effect4.Program.NCode) (name : Effect4.Program.EffName) (flag : Bool),\n      Eq (Effect4.FrameFiber.getCont fiber Effect4.Arm.contA Bool.false).answer\n          (Effect4.ContAnswer.frame (Effect4.Prim.onExit body name flag)) →\n        Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n          (Effect4.FrameFiber.getCont fiber Effect4.Arm.contA Bool.false).fiber.stack","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (first second : List Effect4.Program.NCode),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd first →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd second →\n      Effect4.Program.ReleaseCustody.Sequencing.NoAdd (instHAppendOfAppend.hAppend first second)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_cons","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (head : Effect4.Program.NCode) {rest : List Effect4.Program.NCode},\n  (∀\n      (body :\n        Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName),\n      Ne head (body.onSuccess (Effect4.Program.EffName.afterScopeAdd a fin))) →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd rest →\n      Effect4.Program.ReleaseCustody.Sequencing.NoAdd (List.cons head rest)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_tail","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (head : Effect4.Program.NCode) {rest : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd (List.cons head rest) →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd rest","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":57,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.answerOf_clean","Effect4.Program.ReleaseCustody.PopSequencing.ensure_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_tail"]},"doc":"The hook's single drain preserves the remaining clean stack and answering frame.\nConsumer: popFrom_noAdd. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.passPushed_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (demand : Effect4.Arm) (skip : Bool) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n    And\n      (Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n        (Effect4.FrameFiber.passPushed demand skip fiber cause).fiber.stack)\n      (Effect4.Program.ReleaseCustody.PopSequencing.AnswerClean\n        (Effect4.FrameFiber.passPushed demand skip fiber cause).answer)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.PopSequencing.popFrom_noAdd"]},"doc":"Failure passes every transient value callback and saved constant.\nConsumer: actual cause resumption, including pending scope-add cuts. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_cause_kept","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Option Effect4.Machine.CauseV),\n      Eq fiber.stack List.nil →\n        Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n          (Effect4.FrameFiber.popFrom Effect4.Arm.contE Bool.true frames fiber cause).fiber.stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":7,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","Effect4.Program.ReleaseCustody.PopSequencing.answerOf_clean","Effect4.Program.ReleaseCustody.PopSequencing.passPushed_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.ensure_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.noAdd_tail"]},"doc":"The actual fused pop preserves clean saved stacks, including hook pushes.\nConsumer: the native clean-stack value and cause continuation cases. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (demand : Effect4.Arm) (skip : Bool) (frames : List Effect4.Program.NCode)\n  (fiber : Effect4.Program.ReleaseCustody.Pop.Frame) (cause : Option Effect4.Machine.CauseV),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n      And\n        (Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n          (Effect4.FrameFiber.popFrom demand skip frames fiber cause).fiber.stack)\n        (Effect4.Program.ReleaseCustody.PopSequencing.AnswerClean\n          (Effect4.FrameFiber.popFrom demand skip frames fiber cause).answer)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":64,"lemmas":3,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","Effect4.Program.ReleaseCustody.PopSequencing.popFrom_noAdd"]},"doc":"A value pop reaching an exit callback passes the transient registration completely.\nConsumer: the stateful finalizer evaluator retains a clean residual stack. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_value_finalizer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n      Eq fiber.stack List.nil →\n        ∀ (body : Effect4.Program.NCode) (name : Effect4.Program.EffName) (flag : Bool),\n          Eq (Effect4.FrameFiber.popFrom Effect4.Arm.contA Bool.false frames fiber).answer\n              (Effect4.ContAnswer.frame (Effect4.Prim.onExit body name flag)) →\n            Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n              (Effect4.FrameFiber.popFrom Effect4.Arm.contA Bool.false frames fiber).fiber.stack","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":662,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","Effect4.Program.ReleaseCustody.PopSequencing.armE_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.getCont_noAdd"]},"doc":"Native failure resumption over a clean stack retains callback sequencing.\nConsumer: the clean case of admitted frame evaluation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeCause_clean","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Effect4.Machine.CauseV) (provided : Option Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n    Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean.match_1 (fun x => Prop)\n      (Effect4.FrameFiber.resumeCause\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber cause provided).fst\n      (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n      fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":661,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","Effect4.Program.ReleaseCustody.PopSequencing.armE_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.getCont_cause_kept"]},"doc":"Actual failure continuation removal closes every Kept sequence case.\nConsumer: native failure primitive and scoped-exit evaluation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeCause_kept","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (cause : Effect4.Machine.CauseV) (provided : Option Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean.match_1 (fun x => Prop)\n      (Effect4.FrameFiber.resumeCause\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber cause provided).fst\n      (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n      fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":661,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","Effect4.Program.ReleaseCustody.PopSequencing.armA_noAdd","Effect4.Program.ReleaseCustody.PopSequencing.getCont_noAdd"]},"doc":"A native value resumption over a clean stack retains callback sequencing.\nConsumer: the clean case of admitted frame evaluation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (value : Effect4.Machine.Val) (provided : Option Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd fiber.stack →\n    Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean.match_1 (fun x => Prop)\n      (Effect4.FrameFiber.resumeValue\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber value provided).fst\n      (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n      fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":659,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.interrupt","Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept_clear"]},"doc":"Actual native value resumption preserves callback sequencing through deferred interrupts too.\nConsumer: native success, sync and scoped-exit evaluator branches. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (value : Effect4.Machine.Val) (provided : Option Effect4.Machine.ExitV),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept fiber.current fiber.stack →\n    Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean.match_1 (fun x => Prop)\n      (Effect4.FrameFiber.resumeValue\n          ((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n          fiber value provided).fst\n      (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n      fun exit => True","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":660,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean"]},"doc":"The ordinary value pop closes every pending callback, mask and saved-yield case.\nConsumer: resumeValue_kept's deferred-interrupt split. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.PopSequencing","name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept_clear","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV) {active : Effect4.Program.NCode}\n  {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (fiber : Effect4.Program.ReleaseCustody.Pop.Frame),\n      Eq fiber.stack frames →\n        Eq fiber.deferredInterrupt Bool.false →\n          Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean.match_1 (fun x => Prop)\n            (Effect4.FrameFiber.resumeValue\n                ((Effect4.Program.interpAt root completed table).toPrimInterp\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n                fiber value provided).fst\n            (fun next => Effect4.Program.ReleaseCustody.Sequencing.Kept next.current next.stack)\n            fun exit => True","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":111,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Producers.store_cancel"]},"doc":"Actual asynchronous cancellation introduces no release registration credit.\nConsumer: native cause-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.cancel","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Program.EffName),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.cancelProgramOf name))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":117,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Control.fin_program_credits"]},"doc":"A stored close iterator splits its first finalizer from the residual close order.\nConsumer: interp_iter below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.closeSeq_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (order : List Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV)\n  (captured :\n    List\n      (Effect4.Reason Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n        Effect4.Machine.Ann))\n  (value : Effect4.Machine.Val),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Producers.iterCredits q\n      (Effect4.Program.embedStep (Effect4.Machine.closeSeqStep order exit captured value)))\n    (Effect4.Program.ReleaseCustody.orderCredits q order)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":648,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.contA_credits"]},"doc":"The current completed-exit view changes no callback credit.\nConsumer: native value-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.interp_contA","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (name : Effect4.Program.EffName) (value : Effect4.Machine.Val),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).contA\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        name value))\n    (Effect4.Program.ReleaseCustody.Control.nameCredits q name)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":648,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Evaluation.contE_credits"]},"doc":"Every native cause callback carries no release registration credit.\nConsumer: native cause-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.interp_contE","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (name : Effect4.Program.EffName) (cause : Effect4.Machine.CauseV),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).contE\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        name cause))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":649,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Producers.closeSeq_credits","Effect4.Program.ReleaseCustody.Producers.runStmts_credits"]},"doc":"Every native iterator transfers only credits already present in its saved name.\nConsumer: native iterator-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.interp_iter","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (name : Effect4.Program.EffName) (value : Effect4.Machine.Val),\n  instLENat.le\n    (Effect4.Program.ReleaseCustody.Producers.iterCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).iterNext\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          name value).snd)\n    (Effect4.Program.ReleaseCustody.Control.futureCredits q\n      (Effect4.Prim.iterator name Effect4.Store.Val.unit))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":649,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Producers.loopResume_credits"]},"doc":"The actual completed-exit loop callback creates no prior registration credits.\nConsumer: native loop-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.interp_loopResume","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff)\n  (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV)) (table : Effect4.Program.RowTable)\n  (name : Effect4.Program.EffName) (cursor answer : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Producers.loopCredits q\n      (((Effect4.Program.interpAt root completed table).toPrimInterp\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).loopResume\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        name cursor answer))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":107,"lemmas":8,"nearest":[]},"doc":"A stored iterator's reservation depends on its saved finalizers, not its answer cursor.\nConsumer: native iterator-arm debit in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.iterator_future","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Program.EffName) (a b : Effect4.Machine.Val),\n  Eq (Effect4.Program.ReleaseCustody.Control.futureCredits q (Effect4.Prim.iterator name a))\n    (Effect4.Program.ReleaseCustody.Control.futureCredits q (Effect4.Prim.iterator name b))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":178,"lemmas":10,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.loopFinish_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (p : Effect4.Program.Point)\n  (cursor : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.loopFinishAt root p cursor))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":251,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Producers.loopFinish_credits","Effect4.Program.ReleaseCustody.Evaluation.resolve_credits"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.loopNext_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (p : Effect4.Program.Point)\n  (cursor : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Producers.loopCredits q\n      (Effect4.Program.loopNextAt root p cursor))\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":249,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Producers.loopNext_credits"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.loopResume_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (p : Effect4.Program.Point)\n  (cursor answer : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Producers.loopCredits q\n      (Effect4.Program.loopResumeAt root p cursor answer))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":252,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Producers.yieldOf_credits"]},"doc":"Source generator yields create registration templates without pre-existing credits.\nConsumer: interp_iter below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.runStmts_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (p : Effect4.Program.Point) (fuel : Nat)\n  (pc : List Nat) (env folded : List Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.ReleaseCustody.Producers.iterCredits q\n      (Effect4.Program.runStmts root p fuel pc env folded).snd)\n    0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":113,"lemmas":8,"nearest":[]},"doc":"Stored asynchronous cancellation contains administrative commands only.\nConsumer: native cancellation callback bound below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.store_cancel","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (name : Effect4.Machine.Name),\n  Eq\n    (Effect4.Program.ReleaseCustody.Control.currentCredits q\n      (Effect4.Program.embed (Effect4.Machine.cancelProgram name)))\n    0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":252,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Control.compile_credits"]},"doc":"One actual source yield retains zero credits before its registration frame is pushed.\nConsumer: runStmts_credits below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Producers","name":"Effect4.Program.ReleaseCustody.Producers.yieldOf_credits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (root : Effect4.Program.NativeEff) (p : Effect4.Program.Point)\n  (e : Effect4.Program.NativeEff) (bind : Bool) (fuel : Nat) (pc : List Nat)\n  (env folded : List Effect4.Machine.Val),\n  (∀ (pc : List Nat) (env folded : List Effect4.Machine.Val),\n      Eq\n        (Effect4.Program.ReleaseCustody.Producers.iterCredits q\n          (Effect4.Program.runStmts root p fuel pc env folded).snd)\n        0) →\n    Eq\n      (Effect4.Program.ReleaseCustody.Producers.iterCredits q\n        (Effect4.Program.runStmts.yieldOf root p e bind fuel pc env folded).snd)\n      0","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":170,"lemmas":10,"nearest":["Effect4.Program.mem_addresses_iff","Effect4.Program.ReleaseCustody.Sequencing.stable_refGet","Effect4.Program.ReleaseCustody.Sequencing.stable_cause","Effect4.Program.ReleaseCustody.Sequencing.stable_value"]},"doc":"Every native reply available to this source retains its saved callback sequence.\nConsumer: the actual token-matched resume command. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.ReplySequencing","name":"Effect4.Program.ReleaseCustody.ReplySequencing.terminal","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff),\n  Effect4.Program.SourceScope.RaceFreeSource root →\n    ∀ (answer : Effect4.Program.NCode),\n      Effect4.Program.SourceScope.CodeAt root answer →\n        Effect4.Program.SourceScope.TerminalReply answer →\n          ∀ (frames : List Effect4.Program.NCode),\n            Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames →\n              Effect4.Program.ReleaseCustody.Sequencing.Kept answer frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":413,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty"]},"doc":"Loading any native source starts with an empty saved stack.\nConsumer: the admitted-history sequencing induction. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.RuntimeShape","name":"Effect4.Program.ReleaseCustody.RuntimeShape.load","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (fuel : Nat),\n  Effect4.Program.ReleaseCustody.RuntimeShape.ConfigurationKept (Effect4.Api.load root fuel)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":139,"lemmas":10,"nearest":["Effect4.Program.ReleaseCustody.Control.close_program_credits","Effect4.Program.ReleaseCustody.close_scope","Effect4.Machine.ControlWeights.replace_sum"]},"doc":"State-first close transfers all selected credits to the actual returned close program.\nConsumer: the scope-close evaluator clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.ScopeTransfer","name":"Effect4.Program.ReleaseCustody.ScopeTransfer.close","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (scope : Nat) (exit : Effect4.Machine.ExitV) (masked : Bool)\n  {s next : Effect4.Machine.Stores} {program : Option Effect4.Machine.Program},\n  (List.map Effect4.Machine.ScopeEntry.key s.scopes.entries).Nodup →\n    Eq (Effect4.Machine.storesCloseScope scope exit masked s)\n        (Option.some { fst := next, snd := program }) →\n      Eq\n        (instHAdd.hAdd (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q next.scopes)\n          (program.elim 0 fun p =>\n            Effect4.Program.ReleaseCustody.Control.currentCredits q (Effect4.Program.embed p)))\n        (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q s.scopes)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":354,"lemmas":23,"nearest":["Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.add_open"]},"doc":"Linking a fiber registers an administrative cleanup with no foreign release credit.\nConsumer: the actual `link` command clause of `Execution.history`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.ScopeTransfer","name":"Effect4.Program.ReleaseCustody.ScopeTransfer.link","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (mode : Effect4.Supervision.ScopeMode) (scope : Nat) (fiber : Effect4.FiberId)\n  {s next : Effect4.Machine.Stores} {key : Nat},\n  (List.map Effect4.Machine.ScopeEntry.key s.scopes.entries).Nodup →\n    s.ScopeKeysFresh →\n      Eq\n          (Effect4.Machine.stores.scopeLinkFiber\n            (Effect4.Prim Effect4.Machine.Name Effect4.Machine.Thunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            mode scope fiber s)\n          (Option.some { fst := next, snd := key }) →\n        Eq (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q next.scopes)\n          (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q s.scopes)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":230,"lemmas":39,"nearest":["Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.ReleaseCustody.after_add_exit_credit","Effect4.Program.ReleaseCustody.add_open","Effect4.Program.ReleaseCustody.after_add_unit_credit"]},"doc":"Any native synchronous operation adds at most its explicitly carried finalizer credit.\nConsumer: the native evaluator clause of `Execution.history`.\nThe stronger `add` equation accounts for the response-sensitive continuation separately. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.ScopeTransfer","name":"Effect4.Program.ReleaseCustody.ScopeTransfer.syncOp","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) {s next : Effect4.Machine.Stores} {op : Effect4.Machine.SyncOp}\n  {value : Effect4.Machine.Val},\n  (List.map Effect4.Machine.ScopeEntry.key s.scopes.entries).Nodup →\n    s.ScopeKeysFresh →\n      Eq (Effect4.Machine.syncOpStep op s) (Option.some { fst := next, snd := value }) →\n        instLENat.le (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q next.scopes)\n          (instHAdd.hAdd (Effect4.Program.ReleaseCustody.ScopeTransfer.storedCredits q s.scopes)\n            (Effect4.Program.ReleaseCustody.Control.opCredits q op))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":292,"lemmas":24,"nearest":[]},"doc":"The native acquired callback creates exactly the correlated registration template.\nConsumer: registration_step; no lexical or value-typing premise is assumed here. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.acquired_registration","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (point : Effect4.Program.Point) (ctx : Effect4.Machine.Ctx)\n  (scope : Nat) (a : Effect4.Machine.Val),\n  Eq (Effect4.Program.contAOf root (Effect4.Program.EffName.acquired point ctx scope) a)\n    ((Effect4.Prim.sync\n          (Effect4.Program.EffThunk.op\n            (Effect4.Machine.SyncOp.scopeAdd scope\n              (Effect4.Machine.FinName.foreign (point.capture a ctx))))).onSuccess\n      (Effect4.Program.EffName.afterScopeAdd a\n        (Effect4.Machine.FinName.foreign (point.capture a ctx))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd"]},"doc":"The async producer enters with no pending scope-add callback.\nConsumer: evaluatePrim's controller/cancel frame and async park. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.async_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (register : Effect4.Program.EffName) (signal : Bool) (cancel : Option Effect4.Program.EffName)\n  {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.async register signal cancel)\n      frames →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":757,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_asyncFinalizer","Effect4.Program.ReleaseCustody.Sequencing.async_noAdd"]},"doc":"Both immediate and parked async branches retain stable saved frames.\nConsumer: native async resume command preservation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.async_producer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool) (register : Effect4.Program.EffName) (signal : Bool)\n  (cancel : Option Effect4.Program.EffName),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.async register signal cancel)\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    have next :=\n      (Effect4.Machine.evaluatePrim (Effect4.Program.interpOf root table) m\n            {\n              id :=\n                fiber.id\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              frame :=\n                have __src :=\n                  fiber.frame\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann);\n                { current := Effect4.Prim.async register signal cancel, stack := __src.stack,\n                  interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                  deferredInterrupt := __src.deferredInterrupt },\n              running :=\n                fiber.running\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              parked :=\n                fiber.parked\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              pending :=\n                fiber.pending\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              finalizing :=\n                fiber.finalizing\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              exit :=\n                fiber.exit\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              currentOpCount :=\n                fiber.currentOpCount\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              maxOpsBeforeYield :=\n                fiber.maxOpsBeforeYield\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              preventYield :=\n                fiber.preventYield\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              yieldOverride :=\n                fiber.yieldOverride\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              observers :=\n                fiber.observers\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              children :=\n                fiber.children\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              dispatcher :=\n                fiber.dispatcher\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann),\n              context :=\n                fiber.context\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann) }\n            yielding).fiber\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann);\n    And\n      (Effect4.Program.ReleaseCustody.Sequencing.StableFrames\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack)\n      (Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"Pushing the injected yield leaves its saved callback phase under the constant.\nConsumer: actual forced-yield primitive push. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.forced_push","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (priority : Nat),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.yieldNowWith priority)\n        (List.cons ((Effect4.Prim.yieldNowWith priority).onSuccessConst active) frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"The injected constant retains the exact callback phase of its saved primitive.\nConsumer: actual forced-yield wrapper construction. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.forced_wrapper","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (priority : Nat),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept\n        ((Effect4.Prim.yieldNowWith priority).onSuccessConst active) frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":[]},"doc":"Interruption replaces the current primitive without opening a pending callback.\nConsumer: native runloop-top and interrupt-record cuts. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.interrupt","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (cause : Effect4.Machine.CauseV),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.failure cause) frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":210,"lemmas":19,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty"]},"doc":"The compiled root starts before any scope callback is pushed. Consumer: history load. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.load","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (fuel : Nat),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Program.compile root fuel) List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"An async cancel frame is not a scope-add callback.\nConsumer: the actual async park's stable-stack producer. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_asyncFinalizer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (name : Effect4.Program.EffName) {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (List.cons (Effect4.Prim.asyncFinalizer name) frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"Effect4.Program.ReleaseCustody.Sequencing.NoAdd List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":111,"lemmas":8,"nearest":[]},"doc":"Frames without the callback have their full response-independent credits.\nConsumer: the actual raw-yield parked response below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (active : Effect4.Program.NCode) (frames : List Effect4.Program.NCode),\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames →\n    Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q active frames)\n      (Effect4.Program.ReleaseCustody.Control.stackCap q frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"A mask is not a scope-add callback. Consumer: opaque primitive sequencing. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_mask","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (flag : Bool) {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames →\n    Effect4.Program.ReleaseCustody.Sequencing.NoAdd\n      (List.cons (Effect4.Prim.setInterruptible flag) frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"Other current primitives cannot own the transient scope-add response.\nConsumer: native async, suspend and action producers of parked stacks. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    (∀ (fin : Effect4.Machine.FinName),\n        Not (Effect4.Program.ReleaseCustody.Sequencing.AddPhase fin active)) →\n      Not (Effect4.Program.ReleaseCustody.Sequencing.YieldPhase active) →\n        Effect4.Program.ReleaseCustody.Sequencing.NoAdd frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":15,"lemmas":0,"nearest":[]},"doc":"A direct raw yield cannot replace the operation immediately above scope-add's callback.\nConsumer: the parked response fullness theorem below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.raw_yield_excluded","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (priority scope : Nat) (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName)\n  (rest : List Effect4.Program.NCode),\n  Not\n    (Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.yieldNowWith priority)\n      (List.cons\n        ((Effect4.Prim.sync\n              (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin))).onSuccess\n          (Effect4.Program.EffName.afterScopeAdd a fin))\n        rest))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":668,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd"]},"doc":"The actual registration push installs its matching transient callback.\nConsumer: evaluateNative's registration command. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.registration_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (scope : Nat) (a : Effect4.Machine.Val) (fin : Effect4.Machine.FinName),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept\n      ((Effect4.Prim.sync\n            (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin))).onSuccess\n        (Effect4.Program.EffName.afterScopeAdd a fin))\n      fiber.stack →\n    Exists fun returned =>\n      And\n        (Eq\n          (Effect4.FrameFiber.step\n            ((Effect4.Program.interpAt root completed table).toPrimInterp\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n            {\n              current :=\n                (Effect4.Prim.sync\n                      (Effect4.Program.EffThunk.op\n                        (Effect4.Machine.SyncOp.scopeAdd scope fin))).onSuccess\n                  (Effect4.Program.EffName.afterScopeAdd a fin),\n              stack := fiber.stack, interruptible := fiber.interruptible,\n              interruptedCause := fiber.interruptedCause,\n              deferredInterrupt := fiber.deferredInterrupt })\n          { fst := Effect4.FrameStep.running returned,\n            snd :=\n              List.cons\n                (Effect4.FrameEvent.pushed\n                  ((Effect4.Prim.sync\n                        (Effect4.Program.EffThunk.op\n                          (Effect4.Machine.SyncOp.scopeAdd scope fin))).onSuccess\n                    (Effect4.Program.EffName.afterScopeAdd a fin)))\n                List.nil })\n        (Effect4.Program.ReleaseCustody.Sequencing.Kept returned.current returned.stack)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":872,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.Control.emit_credits","Effect4.Program.ReleaseCustody.Sequencing.resume_frame_debit","Effect4.Program.ReleaseCustody.Control.update_credits"]},"doc":"The actual token-matched resume consumes its queued answer credit.\nConsumer: the native admitted-command history obligation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.resume_command","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (q : List Nat)\n  (m : Effect4.Program.NativeMachine) (id : Effect4.FiberId) (token : Nat)\n  (answer : Effect4.Program.NCode) (rest : List Effect4.Program.ReleaseCustody.Control.Command)\n  (fiber : Effect4.Program.ReleaseCustody.Control.Fiber),\n  Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some fiber) →\n    Eq\n        (fiber.parked\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        (Effect4.Machine.Parked.withGuard token) →\n      (List.map Effect4.Machine.RunFiber.id\n            (m.fibers\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))).Nodup →\n        Effect4.Program.ReleaseCustody.Sequencing.StableFrames\n            (fiber.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).stack →\n          Effect4.Program.ReleaseCustody.Control.Funded q m\n              (List.cons\n                (Effect4.Machine.Cmd.resume\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  id token answer)\n                rest) →\n            Effect4.Program.ReleaseCustody.Control.Funded q\n              (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                  (Effect4.Machine.Cmd.resume id token answer) rest).fst\n              (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                  (Effect4.Machine.Cmd.resume id token answer) rest).snd","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":135,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.stable_full"]},"doc":"A stable parked stack cannot create saved credit when its answer changes.\nConsumer: the actual successful resume command below. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.resume_frame_debit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (answer : Effect4.Program.NCode),\n  Effect4.Program.ReleaseCustody.Sequencing.StableFrames\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    instLENat.le\n      (Effect4.Program.ReleaseCustody.Control.fiberCredits q\n        {\n          id :=\n            fiber.id\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          frame :=\n            have __src :=\n              fiber.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann);\n            { current := answer, stack := __src.stack, interruptible := __src.interruptible,\n              interruptedCause := __src.interruptedCause,\n              deferredInterrupt := __src.deferredInterrupt },\n          running :=\n            fiber.running\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          parked :=\n            fiber.parked\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          pending :=\n            fiber.pending\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          finalizing :=\n            fiber.finalizing\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          exit :=\n            fiber.exit\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          currentOpCount :=\n            fiber.currentOpCount\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          maxOpsBeforeYield :=\n            fiber.maxOpsBeforeYield\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          preventYield :=\n            fiber.preventYield\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          yieldOverride :=\n            fiber.yieldOverride\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          observers :=\n            fiber.observers\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          children :=\n            fiber.children\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          dispatcher :=\n            fiber.dispatcher\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann),\n          context :=\n            fiber.context\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann) })\n      (instHAdd.hAdd (Effect4.Program.ReleaseCustody.Control.fiberCredits q fiber)\n        (Effect4.Program.ReleaseCustody.Control.currentCredits q answer))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":659,"lemmas":66,"nearest":[]},"doc":"The actual injected constant resumes precisely the saved callback sequence.\nConsumer: the success response after a forced-yield park. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.saved_resume","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (completed : List (Prod Effect4.FiberId Effect4.Machine.ExitV))\n  (table : Effect4.Program.RowTable) (fiber : Effect4.Program.ReleaseCustody.Pop.Frame)\n  (priority : Nat) (next : Effect4.Program.NCode) (value : Effect4.Machine.Val)\n  (provided : Option Effect4.Machine.ExitV),\n  Eq fiber.deferredInterrupt Bool.false →\n    Effect4.Program.ReleaseCustody.Sequencing.Kept next fiber.stack →\n      Exists fun returned =>\n        And\n          (Eq\n            (Effect4.FrameFiber.resumeValue\n              ((Effect4.Program.interpAt root completed table).toPrimInterp\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n              { current := fiber.current,\n                stack :=\n                  List.cons ((Effect4.Prim.yieldNowWith priority).onSuccessConst next) fiber.stack,\n                interruptible := fiber.interruptible, interruptedCause := fiber.interruptedCause,\n                deferredInterrupt := fiber.deferredInterrupt }\n              value provided)\n            { fst := Effect4.FrameStep.running returned,\n              snd :=\n                List.cons\n                  (Effect4.FrameEvent.popped\n                    ((Effect4.Prim.yieldNowWith priority).onSuccessConst next))\n                  List.nil })\n          (Effect4.Program.ReleaseCustody.Sequencing.Kept returned.current returned.stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":[]},"doc":"A parked failure retains the sequence even when interruption replaces its answer.\nConsumer: native interrupt-record and resume command. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.stable_cause","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames →\n    ∀ (cause : Effect4.Machine.CauseV),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.failure cause) frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_full"]},"doc":"Stability is response independent, unlike equality at one parked value.\nConsumer: actual resume debit and interrupt replacement. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.stable_full","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (active : Effect4.Program.NCode) {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames →\n    Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q active frames)\n      (Effect4.Program.ReleaseCustody.Control.stackCap q frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"A delayed reference answer retains the saved forced-yield sequence.\nConsumer: native completion resumes in the actual admitted command history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.stable_refGet","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames →\n    ∀ (cell : Effect4.Machine.RefKey),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (Effect4.Prim.sync\n          (Effect4.Program.EffThunk.store\n            (Effect4.Machine.Thunk.op (Effect4.Machine.SyncOp.refGet cell))))\n        frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"A parked success retains the saved forced-yield sequence.\nConsumer: native resume command and synchronous async responses. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.stable_value","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames →\n    ∀ (value : Effect4.Machine.Val),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.success value) frames","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"Any actual scope-add result retains the active callback until its pop.\nConsumer: native sync-state success and failure cuts. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.value_response","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {active : Effect4.Program.NCode} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept active frames →\n    ∀ (value : Effect4.Machine.Val),\n      Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.success value) frames","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":629,"lemmas":64,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.stable_value","Effect4.Program.ReleaseCustody.Sequencing.yield_stable"]},"doc":"The actual yield producer parks with a stable stack and its unit response.\nConsumer: raw and forced yield command preservation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.yield_producer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (fiber : Effect4.Program.ReleaseCustody.Control.Fiber)\n  (yielding : Bool) (priority : Nat),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.yieldNowWith priority)\n      (fiber.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).stack →\n    have next :=\n      (Effect4.Machine.FiberAction.yieldNow (Effect4.Program.interpOf root table) m fiber yielding\n            priority).fiber\n        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann);\n    And\n      (Effect4.Program.ReleaseCustody.Sequencing.StableFrames\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack)\n      (Effect4.Program.ReleaseCustody.Sequencing.Kept\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (next.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).stack)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":110,"lemmas":8,"nearest":["Effect4.Program.ReleaseCustody.Sequencing.noAdd_full"]},"doc":"The real raw-yield evaluator replaces current with unit before parking.\nThe sequence clause proves that this change retains full saved credits.\nConsumer: native parked-full preservation in Execution.history. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.yield_response_full","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (priority : Nat) (frames : List Effect4.Program.NCode),\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.yieldNowWith priority) frames →\n    ∀ (value : Effect4.Machine.Val),\n      Eq (Effect4.Program.ReleaseCustody.Control.stackCredits q (Effect4.Prim.success value) frames)\n        (Effect4.Program.ReleaseCustody.Control.stackCap q frames)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":[]},"doc":"The real yield producer supplies a stable stack before replacing current with unit.\nConsumer: evaluatePrim's raw and injected yield parks. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody.Sequencing","name":"Effect4.Program.ReleaseCustody.Sequencing.yield_stable","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {priority : Nat} {frames : List Effect4.Program.NCode},\n  Effect4.Program.ReleaseCustody.Sequencing.Kept (Effect4.Prim.yieldNowWith priority) frames →\n    Effect4.Program.ReleaseCustody.Sequencing.StableFrames frames","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":19,"lemmas":2,"nearest":[]},"doc":"Fresh open registration transfers one source credit into the scope entry.\nConsumer: the scope-add command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.add_open","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (scope : Effect4.Machine.ScopeV) (key : Nat) (fin : Effect4.Machine.FinName),\n  Eq (Effect4.Scope.isClosed scope) Bool.false →\n    Not (List.instMembership.mem (Effect4.Scope.finalizerKeys scope) key) →\n      Eq (Effect4.Program.ReleaseCustody.scopeCredits q (Effect4.Scope.addUnsafe scope key fin))\n        (instHAdd.hAdd (Effect4.Program.ReleaseCustody.scopeCredits q scope)\n          (Effect4.Program.ReleaseCustody.credit q fin))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":296,"lemmas":26,"nearest":["Effect4.Program.ReleaseCustody.after_add_exit_credit"]},"doc":"Actual native closed-scope continuation moves its credit to exactly one residual finalizer program.\nConsumer: the delivery command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.after_add_exit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (q : List Nat) (a : Effect4.Machine.Val)\n  (fin : Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV),\n  And\n    (Eq (Effect4.Program.ReleaseCustody.afterAddCredits q fin (Effect4.Machine.reifyExitVal exit))\n      (Effect4.Program.ReleaseCustody.credit q fin))\n    (Eq\n      (Effect4.Program.contAOf root (Effect4.Program.EffName.afterScopeAdd a fin)\n        (Effect4.Machine.reifyExitVal exit))\n      (Effect4.Prim.onSuccess (Effect4.Program.embed (Effect4.Machine.finProgram fin exit))\n        (Effect4.Program.EffName.constant a)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":69,"lemmas":10,"nearest":[]},"doc":"A reified closing exit carries one residual release credit.\nConsumer: `after_add_exit`, then the delivery command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.after_add_exit_credit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fin : Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV),\n  Eq (Effect4.Program.ReleaseCustody.afterAddCredits q fin (Effect4.Machine.reifyExitVal exit))\n    (Effect4.Program.ReleaseCustody.credit q fin)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":296,"lemmas":24,"nearest":["Effect4.Program.ReleaseCustody.after_add_unit_credit"]},"doc":"Actual native unit continuation consumes its response-dependent credit and answers the acquisition value.\nConsumer: the delivery command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.after_add_unit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (q : List Nat) (a : Effect4.Machine.Val)\n  (fin : Effect4.Machine.FinName),\n  And (Eq (Effect4.Program.ReleaseCustody.afterAddCredits q fin Effect4.Store.Val.unit) 0)\n    (Eq\n      (Effect4.Program.contAOf root (Effect4.Program.EffName.afterScopeAdd a fin)\n        Effect4.Store.Val.unit)\n      (Effect4.Prim.success a))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":65,"lemmas":8,"nearest":[]},"doc":"Unit delivery leaves no release credit in `afterScopeAdd`.\nConsumer: `after_add_unit`, then the delivery command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.after_add_unit_credit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (fin : Effect4.Machine.FinName),\n  Eq (Effect4.Program.ReleaseCustody.afterAddCredits q fin Effect4.Store.Val.unit) 0","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":19,"lemmas":0,"nearest":["Effect4.Program.ReleaseCustody.close_scope"]},"doc":"The first close-chain step moves one credit to the selected finalizer and retains the tail.\nConsumer: the sequential iterator command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.close_chain_transfer","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (scope : Effect4.Machine.ScopeV) (exit : Effect4.Machine.ExitV)\n  (fin : Effect4.Machine.FinName) (rest : List Effect4.Machine.FinName),\n  Eq (Effect4.Scope.closeOrder scope) (List.cons fin rest) →\n    Eq\n      (instHAdd.hAdd\n        (instHAdd.hAdd\n          (Effect4.Program.ReleaseCustody.scopeCredits q (Effect4.Scope.closeState scope exit))\n          (Effect4.Program.ReleaseCustody.credit q fin))\n        (Effect4.Program.ReleaseCustody.orderCredits q rest))\n      (Effect4.Program.ReleaseCustody.scopeCredits q scope)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":18,"lemmas":1,"nearest":["Effect4.Scope.closeOrder_eq"]},"doc":"Closing transfers every source credit into the exact residual close order and empties the entry.\nConsumer: `close_chain_transfer`, then the close command custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.close_scope","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (q : List Nat) (scope : Effect4.Machine.ScopeV) (exit : Effect4.Machine.ExitV),\n  And (Eq (Effect4.Program.ReleaseCustody.scopeCredits q (Effect4.Scope.closeState scope exit)) 0)\n    (Eq (Effect4.Program.ReleaseCustody.orderCredits q (Effect4.Scope.closeOrder scope))\n      (Effect4.Program.ReleaseCustody.scopeCredits q scope))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":779,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.close_seq_start"]},"doc":"The actual native close iterator transfers its head credit to the selected finalizer,\nretains its tail in the pushed iterator, and emits no release-start event yet.\nConsumer: the close-iterator command custody clause of `Workers.Assertions.releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.close_seq_command","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (fin : Effect4.Machine.FinName)\n  (rest : List Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV)\n  (captured :\n    List\n      (Effect4.Reason Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n        Effect4.Machine.Ann))\n  (cursor : Effect4.Machine.Val),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.iterator\n        (Effect4.Program.EffName.store\n          (Effect4.Machine.Name.closeSeq (List.cons fin rest) exit captured))\n        cursor) →\n    And\n      (Eq\n        (((Effect4.Program.evaluateNative root m f yielding table).fiber\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (Effect4.Prim.exitFrame (Effect4.Program.embed (Effect4.Machine.finProgram fin exit))))\n      (And\n        (Eq\n          (((Effect4.Program.evaluateNative root m f yielding table).fiber\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).frame\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).stack\n          (List.cons\n            (Effect4.Prim.iterator\n              (Effect4.Program.EffName.store\n                (Effect4.Machine.Name.closeSeq rest exit\n                  (instHAppendOfAppend.hAppend captured (Effect4.Machine.reasonsOfVal cursor))))\n              cursor)\n            (f.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).stack))\n        (And\n          (Eq\n            (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n              (((Effect4.Program.evaluateNative root m f yielding table).machine\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).trace\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)))\n            (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n              (m.trace\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann))))\n          (Eq\n            (instHAdd.hAdd (Effect4.Program.ReleaseCustody.credit q fin)\n              (Effect4.Program.ReleaseCustody.orderCredits q rest))\n            (Effect4.Program.ReleaseCustody.orderCredits q (List.cons fin rest)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":772,"lemmas":66,"nearest":[]},"doc":"The actual close iterator selects its head and retains the exact residual order.\nConsumer: `close_seq_command` and the close-iterator custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.close_seq_start","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (fin : Effect4.Machine.FinName) (rest : List Effect4.Machine.FinName)\n  (exit : Effect4.Machine.ExitV)\n  (captured :\n    List\n      (Effect4.Reason Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n        Effect4.Machine.Ann))\n  (cursor : Effect4.Machine.Val),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.iterator\n        (Effect4.Program.EffName.store\n          (Effect4.Machine.Name.closeSeq (List.cons fin rest) exit captured))\n        cursor) →\n    Eq (Effect4.Program.evaluateNative root m f yielding table)\n      {\n        machine :=\n          Effect4.Machine.RunMachine.emit m\n            (List.cons\n              (Effect4.Machine.RunEvent.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (f.id\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                (Effect4.FrameEvent.pushed\n                  (Effect4.Prim.iterator\n                    (Effect4.Program.EffName.store\n                      (Effect4.Machine.Name.closeSeq rest exit\n                        (instHAppendOfAppend.hAppend captured\n                          (Effect4.Machine.reasonsOfVal cursor))))\n                    cursor)))\n              List.nil),\n        fiber :=\n          {\n            id :=\n              f.id\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            frame :=\n              have __src :=\n                f.frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann);\n              {\n                current :=\n                  Effect4.Prim.exitFrame\n                    (Effect4.Program.embed (Effect4.Machine.finProgram fin exit)),\n                stack :=\n                  List.cons\n                    (Effect4.Prim.iterator\n                      (Effect4.Program.EffName.store\n                        (Effect4.Machine.Name.closeSeq rest exit\n                          (instHAppendOfAppend.hAppend captured\n                            (Effect4.Machine.reasonsOfVal cursor))))\n                      cursor)\n                    (f.frame\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).stack,\n                interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                deferredInterrupt := __src.deferredInterrupt },\n            running :=\n              f.running\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            parked :=\n              f.parked\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            pending :=\n              f.pending\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            finalizing :=\n              f.finalizing\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            exit :=\n              f.exit\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            currentOpCount :=\n              f.currentOpCount\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            maxOpsBeforeYield :=\n              f.maxOpsBeforeYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            preventYield :=\n              f.preventYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            yieldOverride :=\n              f.yieldOverride\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            observers :=\n              f.observers\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            children :=\n              f.children\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            dispatcher :=\n              f.dispatcher\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            context :=\n              f.context\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann) },\n        yielding := yielding, outcome := Effect4.Machine.Outcome.continue_, nested := List.nil }","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":241,"lemmas":19,"nearest":[]},"doc":"A foreign suspension transfers the registered capture to the actual release-start continuation.\nConsumer: the suspension and frame-push command custody clauses of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.foreign_suspension","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (q : List Nat) (c : Effect4.Machine.Capture)\n  (exit : Effect4.Machine.ExitV),\n  And\n    (Eq\n      (Effect4.Program.suspendBodyAt root\n        (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit)))\n      ((Effect4.Prim.withFiber Effect4.Program.EffThunk.getCtx).onSuccess\n        (Effect4.Program.EffName.releaseUnder (Effect4.Program.Point.ofCapture c) c.ctx exit)))\n    (Eq\n      (Effect4.Program.ReleaseTrace.releaseAt q\n        (Effect4.Machine.RunEvent.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          { value := 0 }\n          (Effect4.FrameEvent.pushed\n            ((Effect4.Prim.withFiber Effect4.Program.EffThunk.getCtx).onSuccess\n              (Effect4.Program.EffName.releaseUnder (Effect4.Program.Point.ofCapture c) c.ctx\n                exit)))))\n      (Effect4.Program.ReleaseCustody.foreignAt q (Effect4.Machine.FinName.foreign c)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":842,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.release_start_debit","Effect4.Program.ReleaseCustody.release_start","Effect4.Machine.ControlSteps.iteration_below_budget","Effect4.Machine.ControlSteps.loop_of_iteration"]},"doc":"An arbitrary-fiber loop command consumes the source credit and retains its unfinished commands.\nConsumer: the loop command custody clause of `Workers.Assertions.releases_step`.\nThe available-credit premise remains the whole-configuration custody obligation. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.release_loop_debit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (id : Effect4.FiberId)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool)\n  (rest :\n    List\n      (Effect4.Machine.Cmd Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n  (q : List Nat) (c : Effect4.Machine.Capture) (exit : Effect4.Machine.ExitV),\n  Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n    Eq\n        (f.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (Effect4.Program.suspendBodyAt root\n          (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit))) →\n      Eq\n          (f.frame\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).deferredInterrupt\n          Bool.false →\n        Eq\n            (f.yieldOverride\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))\n            Option.none →\n          instLTNat.lt\n              (instHAdd.hAdd\n                (f.currentOpCount\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                1)\n              (f.maxOpsBeforeYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)) →\n            instLENat.le\n                (instHAdd.hAdd\n                  (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n                    (m.trace\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)))\n                  (Effect4.Program.ReleaseCustody.credit q (Effect4.Machine.FinName.foreign c)))\n                (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n                  (m.trace\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))) →\n              instLENat.le\n                (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n                  ((Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                          (Effect4.Machine.Cmd.loop id yielding) rest).fst.trace\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)))\n                (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n                  ((Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                          (Effect4.Machine.Cmd.loop id yielding) rest).fst.trace\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":772,"lemmas":65,"nearest":[]},"doc":"The actual release-start command pushes one source-identified frame on the arbitrary fiber.\nConsumer: `release_start_count`, then the frame-push custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.release_start","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (c : Effect4.Machine.Capture) (exit : Effect4.Machine.ExitV),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Program.suspendBodyAt root\n        (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit))) →\n    Eq (Effect4.Program.evaluateNative root m f yielding table)\n      {\n        machine :=\n          Effect4.Machine.RunMachine.emit m\n            (List.cons\n              (Effect4.Machine.RunEvent.frame\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (f.id\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                (Effect4.FrameEvent.pushed\n                  ((Effect4.Prim.withFiber Effect4.Program.EffThunk.getCtx).onSuccess\n                    (Effect4.Program.EffName.releaseUnder (Effect4.Program.Point.ofCapture c) c.ctx\n                      exit))))\n              List.nil),\n        fiber :=\n          {\n            id :=\n              f.id\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            frame :=\n              have __src :=\n                f.frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann);\n              { current := Effect4.Prim.withFiber Effect4.Program.EffThunk.getCtx,\n                stack :=\n                  List.cons\n                    ((Effect4.Prim.withFiber Effect4.Program.EffThunk.getCtx).onSuccess\n                      (Effect4.Program.EffName.releaseUnder (Effect4.Program.Point.ofCapture c)\n                        c.ctx exit))\n                    (f.frame\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).stack,\n                interruptible := __src.interruptible, interruptedCause := __src.interruptedCause,\n                deferredInterrupt := __src.deferredInterrupt },\n            running :=\n              f.running\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            parked :=\n              f.parked\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            pending :=\n              f.pending\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            finalizing :=\n              f.finalizing\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            exit :=\n              f.exit\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            currentOpCount :=\n              f.currentOpCount\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            maxOpsBeforeYield :=\n              f.maxOpsBeforeYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            preventYield :=\n              f.preventYield\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            yieldOverride :=\n              f.yieldOverride\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            observers :=\n              f.observers\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            children :=\n              f.children\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            dispatcher :=\n              f.dispatcher\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n            context :=\n              f.context\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann) },\n        yielding := yielding, outcome := Effect4.Machine.Outcome.continue_, nested := List.nil }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":777,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.release_start"]},"doc":"A release-start command spends exactly one credit at its acquisition's source identity.\nConsumer: the frame-push custody clause of `releases_step`; it does not bound prior registrations. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.release_start_count","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (c : Effect4.Machine.Capture) (exit : Effect4.Machine.ExitV),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Program.suspendBodyAt root\n        (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit))) →\n    Eq\n      (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n        (((Effect4.Program.evaluateNative root m f yielding table).machine\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n      (instHAdd.hAdd\n        (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n          (m.trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        (Effect4.Program.ReleaseCustody.credit q (Effect4.Machine.FinName.foreign c)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":778,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.release_start_registered","Effect4.Program.ReleaseCustody.release_start_count"]},"doc":"The actual release-start command consumes one available source credit.\nConsumer: `release_loop_debit`; the custody invariant must supply the available credit. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.release_start_debit","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (c : Effect4.Machine.Capture) (exit : Effect4.Machine.ExitV),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Program.suspendBodyAt root\n        (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit))) →\n    instLENat.le\n        (instHAdd.hAdd\n          (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n            (m.trace\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)))\n          (Effect4.Program.ReleaseCustody.credit q (Effect4.Machine.FinName.foreign c)))\n        (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n          (m.trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))) →\n      instLENat.le\n        (List.countP (Effect4.Program.ReleaseTrace.releaseAt q)\n          (((Effect4.Program.evaluateNative root m f yielding table).machine\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n        (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n          (((Effect4.Program.evaluateNative root m f yielding table).machine\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).trace\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":775,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.release_start"]},"doc":"A release start changes no registration count.\nConsumer: `release_start_debit`, then the frame-push custody clause of `releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.release_start_registered","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (c : Effect4.Machine.Capture) (exit : Effect4.Machine.ExitV),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Program.suspendBodyAt root\n        (Effect4.Program.EffThunk.store (Effect4.Machine.Thunk.foreign c exit))) →\n    Eq\n      (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n        (((Effect4.Program.evaluateNative root m f yielding table).machine\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)).trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))\n      (List.countP (Effect4.Program.ReleaseTrace.registeredAt q)\n        (m.trace\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":777,"lemmas":65,"nearest":["Effect4.Program.ReleaseCustody.after_add_exit_credit","Effect4.Program.ControlSteps.native_sync_op"]},"doc":"The actual native scope-add command on a closed scope leaves the credit in the closing-exit response.\nConsumer: the immediate-release command custody clause of `Workers.Assertions.releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.scope_add_closed","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (scope : Nat) (entry : Effect4.Machine.ScopeEntry)\n  (fin : Effect4.Machine.FinName) (exit : Effect4.Machine.ExitV),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.sync\n        (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin))) →\n    Eq\n        ((m.state\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).scopes.entryAt\n          scope)\n        (Option.some entry) →\n      Eq (Effect4.Scope.closingExit? entry.scope) (Option.some exit) →\n        And\n          (Eq\n            (((Effect4.Program.evaluateNative root m f yielding table).machine\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).state\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann))\n            (m.state\n              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)\n              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                Effect4.Machine.Ann)))\n          (And\n            (Eq\n              (((Effect4.Program.evaluateNative root m f yielding table).fiber\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)).frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).current\n              (Effect4.Prim.success (Effect4.Machine.reifyExitVal exit)))\n            (Eq\n              (Effect4.Program.ReleaseCustody.afterAddCredits q fin\n                (Effect4.Machine.reifyExitVal exit))\n              (Effect4.Program.ReleaseCustody.credit q fin)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":779,"lemmas":66,"nearest":["Effect4.Program.ReleaseCustody.add_open","Effect4.Program.ReleaseCustody.after_add_unit_credit","Effect4.Program.ControlSteps.native_sync_op"]},"doc":"The actual native scope-add command transfers the credit to a fresh open-scope entry.\nConsumer: the registration command custody clause of `Workers.Assertions.releases_step`. ","kind":"theorem","module":"Effect4.Laws.Program.ReleaseCustody","name":"Effect4.Program.ReleaseCustody.scope_add_open","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (yielding : Bool) (q : List Nat) (scope : Nat) (entry : Effect4.Machine.ScopeEntry)\n  (fin : Effect4.Machine.FinName),\n  Eq\n      (f.frame\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)).current\n      (Effect4.Prim.sync\n        (Effect4.Program.EffThunk.op (Effect4.Machine.SyncOp.scopeAdd scope fin))) →\n    Eq\n        ((m.state\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)).scopes.entryAt\n          scope)\n        (Option.some entry) →\n      Eq (Effect4.Scope.isClosed entry.scope) Bool.false →\n        Not\n            (List.instMembership.mem (Effect4.Scope.finalizerKeys entry.scope)\n              (m.state\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).nextName) →\n          And\n            (Eq\n              (((Effect4.Program.evaluateNative root m f yielding table).machine\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)).state\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann)\n                (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann))\n              (have __src :=\n                m.state\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann);\n              { refs := __src.refs, deferreds := __src.deferreds,\n                scopes :=\n                  (m.state\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)).scopes.setEntry\n                    { key := entry.key,\n                      scope :=\n                        Effect4.Scope.addUnsafe entry.scope\n                          (m.state\n                              (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)\n                              (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                                Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                Effect4.FiberId Effect4.Machine.Ann)).nextName\n                          fin },\n                memo := __src.memo, timers := __src.timers,\n                nextName :=\n                  instHAdd.hAdd\n                    (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).nextName\n                    1,\n                externals := __src.externals }))\n            (Eq\n              (instHAdd.hAdd\n                (Effect4.Program.ReleaseCustody.scopeCredits q\n                  (Effect4.Scope.addUnsafe entry.scope\n                    (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)).nextName\n                    fin))\n                (Effect4.Program.ReleaseCustody.afterAddCredits q fin Effect4.Store.Val.unit))\n              (instHAdd.hAdd (Effect4.Program.ReleaseCustody.scopeCredits q entry.scope)\n                (Effect4.Program.ReleaseCustody.credit q fin)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1113,"lemmas":916,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**The frame machine and the reference machine agree at every row table** (DI-57). On every\nprogram, row table, decision tape and pair of budgets, the two replays end in the same class,\nand they have the same observation `obs`: every fiber's exit and the whole stores, the external\nallocations included. It is `Machine.Book`'s replay theorem at the two instances at the table:\n`stepAgrees` and `hooksAgree_of` hold at every row table under the store invariant `StoresOk`,\nwhose clause `externals` holds at the empty row table alone; the registration arm answers\nnothing on both machines, since a host answer is a decision (DI-23). Reach: no premise on the\ntape, so an answer that no session admits is in reach. It does not establish reply admission,\nthe typing of a reply, a host's conformance or the session's ledger. `run_eq_ref` is its\ninstance at the empty row table. Concept `translation-simulation`, claim `run-eq-ref-table`,\nrole simulation; requirement R6. Consumer: `session_eq_ref`. ","kind":"theorem","module":"Effect4.Laws.Program.Table.Agreement","name":"Effect4.Program.Sched.run_eq_ref_table","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Program.Sched.RunEqRefTable","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":159,"lemmas":41,"nearest":[]},"doc":"A hole table appended after an application's rows extends its typing signature: every\noperation that the application admits is admitted at the same row, and every key keeps its\ncarrier. It is `SigApp.rows_append` at the hole table. Every law of a sketch rests on it. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.SigApp.withHoles_extends","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable),\n  Effect4.Program.SigExtends app.signature (app.withHoles holes).signature","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"An empty hole table changes nothing. A step of `Sketch.check_program`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.SigApp.withHoles_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp), Eq (app.withHoles List.nil) app","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":159,"lemmas":38,"nearest":[]},"doc":"The row that the extended signature gives hole `k`: the hole table's row at `k`, with its\nthree type columns in normal form. A step of `Sketch.hole_hasTy`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.SigApp.withHoles_rowOf","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes : Effect4.Program.RowTable) (k : Nat)\n  (row : Effect4.Program.Row),\n  Eq (List.instGetElem?NatLtLength.getElem? holes k) (Option.some row) →\n    Eq\n      ((app.withHoles holes).signature.rowOf\n        (Effect4.Program.NativeOp.external (instHAdd.hAdd (List.length app.rows) k)))\n      row.normalizeTypes","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"Declaring more holes is appending to the hole table. A step of `sketch_weakening`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.SigApp.withHoles_withHoles","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes more : Effect4.Program.RowTable),\n  Eq ((app.withHoles holes).withHoles more) (app.withHoles (instHAppendOfAppend.hAppend holes more))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":96,"lemmas":39,"nearest":[]},"doc":"**An application's signature extends its block's**: a block adds rows to invocations only,\nand an application's signature keeps every invocation outside its domain and declares no\ndefinition. A step of `Sketch.sigAt_extends`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Signature.extends_withDefs","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  (∀ (op : Op) (k : Nat), Eq (sig.callOf op) (Option.some k) → Eq (sig.dom op) Bool.false) →\n    (∀ (k : Nat), Eq (sig.defOf k) Option.none) →\n      ∀ (decls : List Effect4.Program.DefDecl), Effect4.Program.SigExtends sig (sig.withDefs decls)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":94,"lemmas":37,"nearest":[]},"doc":"**A body's signature keeps the declarations.** A step of `denote-typed`; its consumer is\n`invoke_arm` (`Typed/Denotation.lean`), which reads the invoked definition's declaration. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.Signature.withParams_defOf","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (ps : List Effect4.Program.ParamDecl),\n  Eq (sig.withParams ps).defOf sig.defOf","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":94,"lemmas":37,"nearest":[]},"doc":"**An operation that runs no parameter reads the outer signature** in a body's signature: its\ndomain bit and its row. A step of `denote-typed`; its consumers are the row arms\n(`builtinPerform_inv`, `Typed/Denotation.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.Signature.withParams_of_none","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (ps : List Effect4.Program.ParamDecl) {op : Op},\n  Eq (sig.paramOf op) Option.none →\n    And (Eq ((sig.withParams ps).dom op) (sig.dom op))\n      (Eq ((sig.withParams ps).rowOf op) (sig.rowOf op))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":94,"lemmas":37,"nearest":[]},"doc":"**A parameter's run in a body's domain reads its declaration's row**, at an outer signature\nthat keeps the run outside its domain. A step of `denote-typed`; its consumer is `param_arm`\n(`Typed/Denotation.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.Signature.withParams_param","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (ps : List Effect4.Program.ParamDecl) {op : Op}\n  {i : Nat},\n  Eq (sig.paramOf op) (Option.some i) →\n    Eq (sig.dom op) Bool.false →\n      Eq ((sig.withParams ps).dom op) Bool.true →\n        Exists fun q =>\n          And (Eq (List.instGetElem?NatLtLength.getElem? ps i) (Option.some q))\n            (Eq ((sig.withParams ps).rowOf op) q.row.normalizeTypes)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":94,"lemmas":37,"nearest":[]},"doc":"**A body's signature keeps the service table.** A step of `denote-typed`; its consumers are\n`service_arm` and `serviceTy_flat` (`Typed/Denotation.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.Signature.withParams_serviceTy","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (ps : List Effect4.Program.ParamDecl),\n  Eq (sig.withParams ps).serviceTy sig.serviceTy","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":364,"lemmas":54,"nearest":["Effect4.Program.Sketch.check_fill_focusAt","Effect4.Program.focusAt_typed","Effect4.Program.Sketch.sigAt_part","Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.Sketch.sigAt_nil","Effect4.Program.Sketch.focusAt_nil","Effect4.Program.Sketch.check_focusAt"]},"doc":"**Filling keeps the type, and the filling alone is checked.** A sketch that the checker\nadmits splits at an address of a program into an environment and a type of the focus, at the\naddress's signature (`Sketch.sigAt`). Every program that the checker admits at that type in that\nenvironment fills the address, and the checker admits the filled sketch at the same type. The\nfilling may declare more holes: `more` is appended to the hole table. The root of a definition\nblock is no such address: the checker refuses a block as a sub-program, so the premise `hroot`\nleaves it out. A consumer of `typed-replacement`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_fill","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) {T : Effect4.Program.EffTy}\n  {path : List Nat} {q : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff s.program).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      (Eq path List.nil →\n          ∀ (decls : List Effect4.Program.DefDecl)\n            (bodies : Effect4.Program.Effs Effect4.Program.NativeOp)\n            (main : Effect4.Program.Eff Effect4.Program.NativeOp)\n            (layers : Effect4.Program.LayerTerms Effect4.Program.NativeOp),\n            Ne s.program (Effect4.Program.Eff.defs decls bodies main layers)) →\n        Exists fun env =>\n          Exists fun t =>\n            And\n              (∀ (pq : List Nat),\n                Eq (Effect4.Program.Checker.check (s.sigAt app path) env pq q) (Except.ok t))\n              (∀ (more : Effect4.Program.RowTable) {q' : Effect4.Program.NativeEff} {pq : List Nat},\n                Eq\n                    (Effect4.Program.Checker.check\n                      ({ program := s.program,\n                            holes := instHAppendOfAppend.hAppend s.holes more }.sigAt\n                        app path)\n                      env pq q')\n                    (Except.ok t) →\n                  Exists fun s' =>\n                    And\n                      (Eq\n                        ({ program := s.program,\n                              holes := instHAppendOfAppend.hAppend s.holes more }.fillAt\n                          path q')\n                        (Option.some s'))\n                      (Eq (s'.check app) (Except.ok T)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":367,"lemmas":54,"nearest":["Effect4.Program.Sketch.sigAt_part","Effect4.Program.checkModule_replace_programFocusAt","Effect4.Program.Eff.partAt_resig","Conform.Effect4.Typing.check_complete","Effect4.Program.checkModule_eq_check","Effect4.Program.Sketch.fillAt_of_replaceAt","Effect4.Program.Sketch.sigAt_nil","Conform.Effect4.Typing.check_sound","Effect4.Program.Sketch.focusAt_nil","Effect4.Program.SigApp.withHoles_extends","Effect4.Program.SigApp.withHoles_withHoles"]},"doc":"**Filling at the answered focus keeps the type.** In a sketch that the checker admits, take\nthe focus that `Sketch.focusAt` answers at an address. Every program that the checker admits at\nthe focus's type, in the focus's environment and at the address's signature (`Sketch.sigAt`),\nfills the address, and the checker admits the filled sketch at the same type. Inside a\ndefinition block the address's signature is the block's, so the filling may invoke the block's\ndefinitions. The filling may declare more holes: `more` is appended to the hole table. Nothing is\nexistential: a tool computes the focus and checks its filling against it. A consumer of\n`focus-function`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_fill_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp},\n  Eq (s.check app) (Except.ok T) →\n    Eq (s.focusAt app path) (Option.some f) →\n      ∀ (more : Effect4.Program.RowTable) {q' : Effect4.Program.NativeEff} {pq : List Nat},\n        Eq\n            (Effect4.Program.Checker.check\n              ({ program := s.program, holes := instHAppendOfAppend.hAppend s.holes more }.sigAt app\n                path)\n              f.env pq q')\n            (Except.ok f.ty) →\n          Exists fun s' =>\n            And\n              (Eq\n                ({ program := s.program, holes := instHAppendOfAppend.hAppend s.holes more }.fillAt\n                  path q')\n                (Option.some s'))\n              (Eq (s'.check app) (Except.ok T))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":362,"lemmas":54,"nearest":["Effect4.Program.Sketch.fillAt_of_replaceAt","Conform.Effect4.Typing.check_complete","Effect4.Program.Sketch.check_fill_focusAt"]},"doc":"A filling of the focus's type keeps the sketch's type. A step of `module-table-splices`. Its\nconsumer is `Sketch.table_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.check_fill_kept","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp}\n  {q' p' : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Eq (s.focusAt app path) (Option.some f) →\n      Conform.Effect4.Typing.HasTy (s.sigAt app path) f.env q' f.ty →\n        Eq ((Effect4.Program.Node.eff s.program).replaceAt path (Effect4.Program.Node.eff q'))\n            (Option.some (Effect4.Program.Node.eff p')) →\n          Eq ({ program := p', holes := s.holes }.check app) (Except.ok T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":413,"lemmas":54,"nearest":["Effect4.Program.holes_conservative","Effect4.Program.checkModule_eq_check"]},"doc":"H1 on a sketch: a sketch whose program performs no hole and holds no block is checked as\nits program. So a sketch with every hole filled is an ordinary program, and the checker decides\nit. A program with a block is the whole-program form's (`Sketch.check_filled_module`). ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_filled","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Effect4.Program.SigProgram app.signature s.program →\n    (∀ (decls : List Effect4.Program.DefDecl)\n        (bodies : Effect4.Program.Effs Effect4.Program.NativeOp)\n        (main : Effect4.Program.Eff Effect4.Program.NativeOp)\n        (layers : Effect4.Program.LayerTerms Effect4.Program.NativeOp),\n        Ne s.program (Effect4.Program.Eff.defs decls bodies main layers)) →\n      Eq (s.check app) (Effect4.Program.Checker.check app.signature List.nil List.nil s.program)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":356,"lemmas":54,"nearest":["Effect4.Program.checkModule_programFocusAt","Effect4.Program.Sketch.focusAt_nil"]},"doc":"**The focus function answers at every address of a program** of a sketch that the checker\nadmits: the sub-program there, with an environment and a type. At the root it is the whole\nprogram; inside a definition block it is the focus in the part that holds the address\n(`checkModule_programFocusAt`). A consumer of `focus-function`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) {T : Effect4.Program.EffTy}\n  {path : List Nat} {q : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff s.program).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t => Eq (s.focusAt app path) (Option.some { program := q, env := env, ty := t })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":339,"lemmas":54,"nearest":["Effect4.Program.SigApp.withHoles_extends","Effect4.Program.checkModule_ext","Effect4.Program.SigApp.withHoles_withHoles"]},"doc":"H2 on a sketch: declaring more holes keeps the sketch admitted modulo its holes, at the\nsame type. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_more_holes","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) (more : Effect4.Program.RowTable)\n  {t : Effect4.Program.EffTy},\n  Eq (s.check app) (Except.ok t) →\n    Eq ({ program := s.program, holes := instHAppendOfAppend.hAppend s.holes more }.check app)\n      (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":359,"lemmas":74,"nearest":["Effect4.Program.Sketch.sigAt_extends","Conform.Effect4.Typing.check_complete","Effect4.Program.Sketch.hole_hasTy","Effect4.Program.Sketch.check_fill"]},"doc":"**Omitting keeps the type, where a hole row declares the focus's type exactly.** A sketch\nthat the checker admits splits at an address of a program into an environment and a type `t` of\nthe focus. When `t` has closed columns, an answer and an error in normal form, and formed\ncolumns, the omission with the hole row that declares `t` exists, and the checker admits it at\nthe same type. The premises are the hole's rule's (`Sketch.hole_hasTy`), and the two on normal\nform: a hole row is read in normal form, and the checker gives a node the raw type of its term.\nThe root of a definition block is left out, as in `Sketch.check_fill`. A consumer of\n`typed-replacement`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_omit","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) {T : Effect4.Program.EffTy}\n  {path : List Nat} {q : Effect4.Program.NativeEff},\n  Eq (s.check app) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff s.program).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      (Eq path List.nil →\n          ∀ (decls : List Effect4.Program.DefDecl)\n            (bodies : Effect4.Program.Effs Effect4.Program.NativeOp)\n            (main : Effect4.Program.Eff Effect4.Program.NativeOp)\n            (layers : Effect4.Program.LayerTerms Effect4.Program.NativeOp),\n            Ne s.program (Effect4.Program.Eff.defs decls bodies main layers)) →\n        Exists fun env =>\n          Exists fun t =>\n            And\n              (∀ (pq : List Nat),\n                Eq (Effect4.Program.Checker.check (s.sigAt app path) env pq q) (Except.ok t))\n              (∀ (name : String),\n                Eq t.answer.closed Bool.true →\n                  Eq t.error.closed Bool.true →\n                    Eq t.answer.normalize t.answer →\n                      Eq t.error.normalize t.error →\n                        Effect4.Program.Formation.Formed\n                            (Effect4.Program.Formation.instantiatedSites\n                              (Effect4.Program.Row.hole name t.answer t.error\n                                  t.requires.elems).normalizeTypes\n                              List.nil) →\n                          Exists fun s' =>\n                            And\n                              (Eq\n                                (s.omitAt app path\n                                  (Effect4.Program.Row.hole name t.answer t.error t.requires.elems))\n                                (Option.some s'))\n                              (Eq (s'.check app) (Except.ok T)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":366,"lemmas":74,"nearest":["Effect4.Program.Sketch.sigAt_extends","Conform.Effect4.Typing.check_complete","Effect4.Program.Sketch.check_fill_focusAt","Effect4.Program.Sketch.hole_hasTy"]},"doc":"**Omitting at the answered focus keeps the type.** In a sketch that the checker admits, take\nthe focus that `Sketch.focusAt` answers at an address. When its type has closed columns, an\nanswer and an error in normal form, and formed columns, the omission with the hole row that\ndeclares that type exists, and the checker admits it at the same type. Each premise is on the\nanswered type, so a tool can decide it. The hole has its declared type at the address's\nsignature too (`Sketch.sigAt_extends`). A consumer of `focus-function`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_omit_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp},\n  Eq (s.check app) (Except.ok T) →\n    Eq (s.focusAt app path) (Option.some f) →\n      ∀ (name : String),\n        Eq f.ty.answer.closed Bool.true →\n          Eq f.ty.error.closed Bool.true →\n            Eq f.ty.answer.normalize f.ty.answer →\n              Eq f.ty.error.normalize f.ty.error →\n                Effect4.Program.Formation.Formed\n                    (Effect4.Program.Formation.instantiatedSites\n                      (Effect4.Program.Row.hole name f.ty.answer f.ty.error\n                          f.ty.requires.elems).normalizeTypes\n                      List.nil) →\n                  Exists fun s' =>\n                    And\n                      (Eq\n                        (s.omitAt app path\n                          (Effect4.Program.Row.hole name f.ty.answer f.ty.error\n                            f.ty.requires.elems))\n                        (Option.some s'))\n                      (Eq (s'.check app) (Except.ok T))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":339,"lemmas":54,"nearest":["Effect4.Program.SigApp.withHoles_nil"]},"doc":"**A program is a sketch with no hole**: the check of a program as a sketch is the module\ncheck's answer on it, refusals included. On a program with no block the module check is the\nchecker's (`checkModule_eq_check`). ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.check_program","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (e : Effect4.Program.NativeEff),\n  Eq ({ program := e }.check app) (Effect4.Program.Checker.checkModule app.signature e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":222,"lemmas":245,"nearest":[]},"doc":"**Round trip**: a sketch whose two value trees are well-formed reads back. A step of\n`sketch-wire`. ","kind":"theorem","module":"Effect4.Laws.Program.SketchWire","name":"Effect4.Program.Sketch.decode_encode","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch),\n  (Effect4.Store.ProgramGen.EffC.instCanonicalEff.toVal s.program).WF →\n    (Effect4.Store.instCanonicalList.toVal s.holes).WF →\n      Eq (Effect4.Program.Sketch.decode s.encode) (Option.some s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":221,"lemmas":228,"nearest":[]},"doc":"**Exactness**: whatever reads as a sketch was that sketch's bytes, and its value trees are\nwell-formed. The pointer of `sketch-wire`. ","kind":"theorem","module":"Effect4.Laws.Program.SketchWire","name":"Effect4.Program.Sketch.decode_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {b : Prod Effect4.Store.Bytes Effect4.Store.Bytes} {s : Effect4.Program.Sketch},\n  Eq (Effect4.Program.Sketch.decode b) (Option.some s) →\n    And (Eq b s.encode)\n      (And (Effect4.Store.ProgramGen.EffC.instCanonicalEff.toVal s.program).WF\n        (Effect4.Store.instCanonicalList.toVal s.holes).WF)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":15,"lemmas":0,"nearest":[]},"doc":"The fill at an address where the program's replacement exists: the sketch with the\nreplaced program. A step of `typed-replacement`: `Sketch.check_fill_focusAt` reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.fillAt_of_replaceAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {path : List Nat} {q program : Effect4.Program.NativeEff},\n  Eq ((Effect4.Program.Node.eff s.program).replaceAt path (Effect4.Program.Node.eff q))\n      (Option.some (Effect4.Program.Node.eff program)) →\n    Eq (s.fillAt path q) (Option.some { program := program, holes := s.holes })","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":15,"lemmas":0,"nearest":[]},"doc":"A filling replaces the program and keeps the hole table. A step of `module-table-splices`.\nIts consumer is `Sketch.table_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Sketch.fillAt_some","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s s' : Effect4.Program.Sketch} {path : List Nat} {q' : Effect4.Program.NativeEff},\n  Eq (s.fillAt path q') (Option.some s') →\n    Exists fun p' =>\n      And\n        (Eq ((Effect4.Program.Node.eff s.program).replaceAt path (Effect4.Program.Node.eff q'))\n          (Option.some (Effect4.Program.Node.eff p')))\n        (Eq s' { program := p', holes := s.holes })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":358,"lemmas":54,"nearest":["Effect4.Program.focusAt_typed","Effect4.Program.Eff.partAt_at"]},"doc":"The focus's program is the node at the address. A step of `omit-splices-table`. Its\nconsumers are `Table.typedAt_table_of_focusAt` and `Sketch.focusAt_more_holes`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.focusAt_at","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {a : List Nat}\n  {f : Effect4.Program.Focus Effect4.Program.NativeOp},\n  Eq (s.focusAt app a) (Option.some f) →\n    Eq ((Effect4.Program.Node.eff s.program).at_ a)\n      (Option.some (Effect4.Program.Node.eff f.program))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":371,"lemmas":54,"nearest":["Effect4.Program.Sketch.focusAt_at","Effect4.Program.Sketch.table_more_holes","Effect4.Program.Table.typedAt_table","Effect4.Program.Table.typedAt_table_of_focusAt","Effect4.Program.Sketch.check_more_holes","Effect4.Program.Sketch.focusAt_nil"]},"doc":"A typed sketch's focus stays under a grown hole table: the grown sketch's table is the\nsketch's (`Sketch.table_more_holes`), and a table answers the focus (`Table.typedAt_table`). A step\nof `omit-splices-table`. Its consumer is `Sketch.table_omit`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.focusAt_more_holes","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp},\n  Eq (s.check app) (Except.ok T) →\n    Eq (s.focusAt app path) (Option.some f) →\n      ∀ (more : Effect4.Program.RowTable),\n        Eq\n          ({ program := s.program, holes := instHAppendOfAppend.hAppend s.holes more }.focusAt app\n            path)\n          (Option.some f)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":355,"lemmas":54,"nearest":[]},"doc":"The focus at the root is the whole program at the sketch's type. A step of\n`Sketch.check_fill_focusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.focusAt_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy},\n  Eq (s.check app) (Except.ok T) →\n    Eq (s.focusAt app List.nil) (Option.some { program := s.program, env := List.nil, ty := T })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":310,"lemmas":74,"nearest":["Effect4.Program.Sketch.sigAt_extends","Effect4.Program.Sketch.hole_hasTy"]},"doc":"The new hole has the focus's type at the part's signature, when its row declares the focus's\nclosed, normal and formed columns. A step of `omit-splices-table`. Its consumer is\n`Sketch.table_omit`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.hole_hasTy_focus","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {path : List Nat}\n  {f : Effect4.Program.Focus Effect4.Program.NativeOp} (name : String),\n  Eq f.ty.answer.closed Bool.true →\n    Eq f.ty.error.closed Bool.true →\n      Eq f.ty.answer.normalize f.ty.answer →\n        Eq f.ty.error.normalize f.ty.error →\n          Effect4.Program.Formation.Formed\n              (Effect4.Program.Formation.instantiatedSites\n                (Effect4.Program.Row.hole name f.ty.answer f.ty.error\n                    f.ty.requires.elems).normalizeTypes\n                List.nil) →\n            Conform.Effect4.Typing.HasTy\n              ({ program := s.program,\n                    holes :=\n                      instHAppendOfAppend.hAppend s.holes\n                        (List.cons\n                          (Effect4.Program.Row.hole name f.ty.answer f.ty.error f.ty.requires.elems)\n                          List.nil) }.sigAt\n                app path)\n              f.env (Effect4.Program.Sketch.hole app (List.length s.holes)) f.ty","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":405,"lemmas":55,"nearest":["Effect4.Program.Sketch.refusals_of_check","Effect4.Program.Sketch.table_head"]},"doc":"**The head of a sketch's refusals is its check's refusal.** The root's entry is first. It\nsays nothing of the order after the head. A step of `Sketch.refusals_nil_iff`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.refusals_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Eq (s.refusals app).head? (Effect4.Program.Checker.refusal (s.check app))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":405,"lemmas":55,"nearest":["Effect4.Program.Sketch.refusals_of_check","Effect4.Program.Sketch.refusals_head"]},"doc":"**The list of refusals of a sketch is empty exactly when the sketch checks**, block\nincluded: the proposed claim `module-address-table`. Its consumer is the query tool's refusals. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.refusals_nil_iff","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Iff (Eq (s.refusals app) List.nil) (Eq (s.check app).toOption.isSome Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":405,"lemmas":55,"nearest":["Effect4.Program.Sketch.table_result_refusal_none"]},"doc":"On a sketch that checks the list of refusals is empty. A step of `Sketch.refusals_head` and\n`Sketch.refusals_nil_iff`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.refusals_of_check","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy},\n  Eq (s.check app) (Except.ok T) → Eq (s.refusals app) List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":183,"lemmas":51,"nearest":["Effect4.Program.Signature.extends_withDefs","Effect4.Program.Part.bodyAt_sig"]},"doc":"**The signature at an address extends the sketch's**: it is the sketch's, or its block's. A\nhole keeps its declared type there, so an omission inside a block keeps the sketch's type. A\nstep of `Sketch.check_omit_focusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.sigAt_extends","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) (path : List Nat),\n  Effect4.Program.SigExtends (app.withHoles s.holes).signature (s.sigAt app path)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":183,"lemmas":38,"nearest":[]},"doc":"**At the root the signature is the sketch's.** A step of `Sketch.check_fill_focusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.sigAt_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Eq (s.sigAt app List.nil) (app.withHoles s.holes).signature","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":183,"lemmas":38,"nearest":[]},"doc":"**Inside a part the signature is the part's.** A step of `Sketch.check_fill_focusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.sigAt_part","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {path : List Nat}\n  {part : Effect4.Program.Part Effect4.Program.NativeOp} {rest : List Nat},\n  Eq (Effect4.Program.Eff.partAt (app.withHoles s.holes).signature List.nil s.program path)\n      (Option.some { fst := part, snd := rest }) →\n    Eq (s.sigAt app path) part.sig","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":354,"lemmas":54,"nearest":[]},"doc":"An entry of a sketch's table stands at its address. A step of `omit-splices-table`. Its\nconsumer is `Table.typedAt_table_of_focusAt`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.tableEntry_path","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp) (x : List Nat),\n  Eq (s.tableEntry app x).path x","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":362,"lemmas":54,"nearest":["Effect4.Program.addresses_eff_head"]},"doc":"The root's entry is first, and it holds the sketch's check. A step of\n`Sketch.refusals_head`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.table_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Exists fun rest =>\n    Eq (s.table app)\n      (List.cons\n        { path := List.nil, env := Option.some (Effect4.Program.NodeEnv.env List.nil),\n          result := Option.some (s.check app) }\n        rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":456,"lemmas":54,"nearest":["Effect4.Program.annotateModule_restrict","Effect4.Program.Sketch.check_more_holes","Effect4.Program.SigApp.withHoles_extends","Effect4.Program.SigApp.withHoles_withHoles","Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_sigProgram","Effect4.Program.Sketch.annotate_eq_table"]},"doc":"**A typed sketch's table stays under a grown hole table.** A typed sketch reads only its\nsignature (`moduleHasTy_sigProgram`), and the table part by part answers the same at an\nextension (`annotateModule_restrict`); the root keeps its check (`Sketch.check_more_holes`). A\nstep of `omit-splices-table`. Its consumer is `Sketch.table_omit`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.table_more_holes","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy},\n  Eq (s.check app) (Except.ok T) →\n    ∀ (more : Effect4.Program.RowTable),\n      Eq ({ program := s.program, holes := instHAppendOfAppend.hAppend s.holes more }.table app)\n        (s.table app)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":381,"lemmas":54,"nearest":["Effect4.Program.tableAt_perform","Conform.Effect4.Typing.check_complete","Effect4.Program.Sketch.table_more_holes","Effect4.Program.Sketch.table_fill","Effect4.Program.Sketch.hole_hasTy_focus","Effect4.Program.Sketch.focusAt_more_holes","Effect4.Program.Sketch.check_more_holes"]},"doc":"**An omission at the focus's type splices the table**: the hole row declares the focus's\nthree columns, and the table is the old one with the subtree's segment replaced by the hole's one\nentry. The grown sketch keeps its table (`Sketch.table_more_holes`), and the hole is a filling of\nthe focus's type (`Sketch.table_fill`). The pointer of `omit-splices-table`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Sketch.table_omit","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s s' : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy}\n  {path : List Nat} {f : Effect4.Program.Focus Effect4.Program.NativeOp} (name : String),\n  Eq (s.check app) (Except.ok T) →\n    Ne path List.nil →\n      Eq (s.focusAt app path) (Option.some f) →\n        Eq f.ty.answer.closed Bool.true →\n          Eq f.ty.error.closed Bool.true →\n            Eq f.ty.answer.normalize f.ty.answer →\n              Eq f.ty.error.normalize f.ty.error →\n                Effect4.Program.Formation.Formed\n                    (Effect4.Program.Formation.instantiatedSites\n                      (Effect4.Program.Row.hole name f.ty.answer f.ty.error\n                          f.ty.requires.elems).normalizeTypes\n                      List.nil) →\n                  Eq\n                      (s.omitAt app path\n                        (Effect4.Program.Row.hole name f.ty.answer f.ty.error f.ty.requires.elems))\n                      (Option.some s') →\n                    Eq (s'.table app)\n                      (Effect4.Program.Table.splice (s.table app) path\n                        (List.cons\n                          { path := path, env := Option.some (Effect4.Program.NodeEnv.env f.env),\n                            result := Option.some (Except.ok f.ty) }\n                          List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":370,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.focusAt_eq_some","Effect4.Program.hasTy_focusAt","Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_partAt_typed"]},"doc":"On a sketch that checks no entry of its table holds a refusal: each part is typed, so the\nchecker answers a type at every address of a program inside it. A step of\n`Sketch.refusals_of_check`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.Sketch.table_result_refusal_none","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {T : Effect4.Program.EffTy},\n  Eq (s.check app) (Except.ok T) →\n    ∀ {e : Effect4.Program.Table.Entry},\n      List.instMembership.mem (s.table app) e →\n        Eq (e.result.bind Effect4.Program.Checker.refusal) Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1369,"lemmas":502,"nearest":["Effect4.Program.Moves.evaluatePrim_producer","Effect4.Scope.closeOrder_eq","Effect4.Program.Node.at_append","Effect4.Program.mem_addresses_iff","Effect4.Machine.Lift.driveState_lift"]},"doc":"The admitted-history carrier retains cell predicates from their source write-site laws. ","kind":"theorem","module":"Effect4.Laws.Program.NativeHeapReplies","name":"Effect4.Program.SourceScope.admitted_heap_history","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (b : Effect4.Api.Built),\n  Effect4.Program.SourceScope.Fragment b.program →\n    ∀ (compileFuel : Nat) (P : Effect4.Machine.Val → Prop),\n      Effect4.Program.HeapSites.SitesKeep b.program P →\n        ∀ (m : Effect4.Program.NativeMachine),\n          Effect4.Run.HistoryOf b compileFuel m →\n            Effect4.Program.HeapSites.HeapOk P\n              (m.state\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).refs","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":881,"lemmas":212,"nearest":["Effect4.Program.Moves.evaluateNative_under","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Program.Moves.iteration_under"]},"doc":"Every actual command keeps the entry suffix before the detached evaluation exits.\nThe clear premise is supplied by the existing compiled command authority. ","kind":"theorem","module":"Effect4.Laws.Program.StackRegionCommands","name":"Effect4.Program.StackRegion.command","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (interp : Effect4.Program.Moves.NInterp) (machine : Effect4.Program.NativeMachine)\n  (head : Effect4.Program.Moves.NCommand) (rest : List Effect4.Program.Moves.NCommand)\n  (id : Effect4.FiberId) (below : List Effect4.Program.NCode),\n  Effect4.Program.StackRegion.Held id below machine →\n    Effect4.Program.StackRegion.Continues root table interp id below machine head →\n      (∀ (target : Effect4.FiberId),\n          Eq head\n              (Effect4.Machine.Cmd.exitDone\n                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                  Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                target) →\n            ∀\n              (fiber :\n                Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann Effect4.Machine.Ctx),\n              Eq (Effect4.Machine.RunMachine.fiber? machine target) (Option.some fiber) →\n                Ne\n                  (fiber.exit\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                  Option.none) →\n        Effect4.Program.StackRegion.Held id below\n          (Effect4.Machine.driveStep interp machine head rest).fst","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":852,"lemmas":75,"nearest":["Effect4.Program.compiled_region_bracket","Effect4.Program.stepped_live","Effect4.Program.StackRegion.drive"]},"doc":"The existing bracket now reads an actual command prefix with no supplied stack-shape premise.\nThe explicit boundary premise excludes exactly an executed detached evaluation that finishes. ","kind":"theorem","module":"Effect4.Laws.Program.StackRegionRun","name":"Effect4.Program.StackRegion.compiled_region_bracket_of_prefix","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) {bases : List Bool}\n  {machine laterMachine : Effect4.Program.NativeMachine}\n  {commands laterCommands : List Effect4.Program.Moves.NCommand},\n  Effect4.Program.LoopCut root table bases machine commands →\n    ∀ (fuel : Nat),\n      Eq (Effect4.Machine.driveState (Effect4.Program.interpOf root table) fuel machine commands)\n          { fst := laterMachine, snd := laterCommands } →\n        ∀ {id : Effect4.FiberId} {first last : Effect4.Program.Moves.NFiber},\n          Eq (Effect4.Machine.RunMachine.fiber? machine id) (Option.some first) →\n            Eq (Effect4.Machine.RunMachine.fiber? laterMachine id) (Option.some last) →\n              Effect4.Machine.Lift.PrefixAllows (Effect4.Program.interpOf root table)\n                  (fun next head x =>\n                    Effect4.Program.StackRegion.Continues root table\n                      (Effect4.Program.interpOf root table) id\n                      (first.frame\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)).stack\n                      next head)\n                  fuel machine commands →\n                ∀ {head laterHead : Effect4.Program.Moves.NCommand},\n                  List.instMembership.mem commands head →\n                    List.instMembership.mem laterCommands laterHead →\n                      Effect4.Machine.Steps id head →\n                        Effect4.Machine.Steps id laterHead →\n                          ∀ (demand : Effect4.Arm) (skip : Bool)\n                            (cause : Option Effect4.Machine.CauseV),\n                            Eq\n                                (((Effect4.Program.StackRegion.detach\n                                            (first.frame\n                                                (Effect4.Prim Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)\n                                                (Effect4.FrameFiber Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)).stack\n                                            last).frame\n                                        (Effect4.Prim Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)\n                                        (Effect4.FrameFiber Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)).getCont\n                                    demand skip cause).answer\n                                Effect4.ContAnswer.empty →\n                              (first.frame\n                                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                      Effect4.FiberId Effect4.Machine.Ann)\n                                    (Effect4.FrameFiber Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann)).RegionEnds\n                                (last.frame\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n                                (List.take\n                                  (instHSub.hSub\n                                    (last.frame\n                                          (Effect4.Prim Effect4.Program.EffName\n                                            Effect4.Program.EffThunk Effect4.Machine.Val\n                                            Effect4.Machine.Err Effect4.Machine.Defect\n                                            Effect4.FiberId Effect4.Machine.Ann)\n                                          (Effect4.FrameFiber Effect4.Program.EffName\n                                            Effect4.Program.EffThunk Effect4.Machine.Val\n                                            Effect4.Machine.Err Effect4.Machine.Defect\n                                            Effect4.FiberId Effect4.Machine.Ann)).stack.length\n                                    (first.frame\n                                          (Effect4.Prim Effect4.Program.EffName\n                                            Effect4.Program.EffThunk Effect4.Machine.Val\n                                            Effect4.Machine.Err Effect4.Machine.Defect\n                                            Effect4.FiberId Effect4.Machine.Ann)\n                                          (Effect4.FrameFiber Effect4.Program.EffName\n                                            Effect4.Program.EffThunk Effect4.Machine.Val\n                                            Effect4.Machine.Err Effect4.Machine.Defect\n                                            Effect4.FiberId Effect4.Machine.Ann)).stack.length)\n                                  (last.frame\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)).stack)\n                                demand skip cause","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1008,"lemmas":957,"nearest":["Effect4.Program.StackRegion.command","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Program.guarded_driveStep_liveTransports"]},"doc":"An actual allowed command prefix retains the region and both compiled cuts.\nThe allowed predicate reads the detached evaluation, not a resulting stack-shape assertion. ","kind":"theorem","module":"Effect4.Laws.Program.StackRegionRun","name":"Effect4.Program.StackRegion.drive","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) {bases : List Bool}\n  (machine : Effect4.Program.NativeMachine) (commands : List Effect4.Program.Moves.NCommand)\n  (id : Effect4.FiberId) (below : List Effect4.Program.NCode) (fuel : Nat),\n  Effect4.Program.LoopCut root table bases machine commands →\n    Effect4.Program.StackRegion.Held id below machine →\n      Effect4.Machine.Lift.PrefixAllows (Effect4.Program.interpOf root table)\n          (fun next head x =>\n            Effect4.Program.StackRegion.Continues root table (Effect4.Program.interpOf root table)\n              id below next head)\n          fuel machine commands →\n        have out :=\n          Effect4.Machine.driveState (Effect4.Program.interpOf root table) fuel machine commands;\n        And (Effect4.Program.StackRegion.Held id below out.fst)\n          (Exists fun laterBases =>\n            And (bases.IsPrefix laterBases)\n              (Effect4.Program.LoopCut root table laterBases out.fst out.snd))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":310,"lemmas":20,"nearest":["Effect4.Program.ControlSteps.loop_sync_op"]},"doc":"One actual compiled Ref.modify command commits its store answer before pending resumes. ","kind":"theorem","module":"Effect4.Laws.Program.StoreExecution","name":"Effect4.Program.StoreExecution.modify_loop","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (m : Effect4.Api.Machine)\n  (id : Effect4.FiberId)\n  (f :\n    Effect4.Machine.RunFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx)\n  (term request : Effect4.Program.Term) (p : Effect4.Program.Point) (fuel : Nat)\n  (q : Effect4.Machine.RefKey) (state : Effect4.Machine.Stores) (value : Effect4.Machine.Val)\n  (yielding : Bool)\n  (rest :\n    List\n      (Effect4.Machine.Cmd Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)),\n  Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n    Eq\n        (f.frame\n            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n              Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n              Effect4.Machine.Ann)).current\n        (Effect4.Program.compileEff\n          (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.refModifyWith term) request) p) →\n      Eq p.fuel (instHAdd.hAdd fuel 1) →\n        Eq (Effect4.Program.evalTerm p.env request) (Option.some (Effect4.Machine.Val.cell q)) →\n          Eq\n              (f.frame\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)).deferredInterrupt\n              Bool.false →\n            Eq\n                (f.yieldOverride\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))\n                Option.none →\n              instLTNat.lt\n                  (instHAdd.hAdd\n                    (f.currentOpCount\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    1)\n                  (f.maxOpsBeforeYield\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)) →\n                Eq\n                    (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q term p.env)\n                      (m.state\n                        (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)\n                        (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                          Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                          Effect4.FiberId Effect4.Machine.Ann)))\n                    (Option.some { fst := state, snd := value }) →\n                  Eq\n                    (Effect4.Machine.driveStep (Effect4.Program.interpOf root table) m\n                      (Effect4.Machine.Cmd.loop id yielding) rest)\n                    {\n                      fst :=\n                        {\n                              fibers :=\n                                m.fibers\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              races :=\n                                m.races\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              nextId :=\n                                m.nextId\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              nextToken :=\n                                m.nextToken\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              nextRace :=\n                                m.nextRace\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              middlewareInstalled :=\n                                m.middlewareInstalled\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              armed :=\n                                m.armed\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              state := state,\n                              trace :=\n                                m.trace\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              stuck :=\n                                m.stuck\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              forks :=\n                                m.forks\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId\n                                    Effect4.Machine.Ann) }.update\n                          (have __src := Effect4.Machine.countOp f;\n                          {\n                            id :=\n                              __src.id\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            frame :=\n                              have __src :=\n                                f.frame\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann);\n                              { current := Effect4.Prim.success value, stack := __src.stack,\n                                interruptible := __src.interruptible,\n                                interruptedCause := __src.interruptedCause,\n                                deferredInterrupt := __src.deferredInterrupt },\n                            running :=\n                              __src.running\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            parked :=\n                              __src.parked\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            pending :=\n                              __src.pending\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            finalizing :=\n                              __src.finalizing\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            exit :=\n                              __src.exit\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            currentOpCount :=\n                              __src.currentOpCount\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            maxOpsBeforeYield :=\n                              __src.maxOpsBeforeYield\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            preventYield :=\n                              __src.preventYield\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            yieldOverride :=\n                              __src.yieldOverride\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            observers :=\n                              __src.observers\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            children :=\n                              __src.children\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            dispatcher :=\n                              __src.dispatcher\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann),\n                            context :=\n                              __src.context\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann) }),\n                      snd :=\n                        instHAppendOfAppend.hAppend\n                          (List.cons Effect4.Machine.Cmd.drainDue\n                            (List.cons\n                              (Effect4.Machine.Cmd.deliver\n                                (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                  Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                  Effect4.FiberId Effect4.Machine.Ann)\n                                id yielding)\n                              List.nil))\n                          rest }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":314,"lemmas":54,"nearest":["Effect4.Program.Annotate.check_eq","Effect4.Program.Table.bodyEntry_tail","Effect4.Program.Table.bodyEntry_head","Effect4.Program.Table.bodyEntry_nil","Effect4.Program.Node.addresses_eq_cons"]},"doc":"**The bodies' spine, part by part, is the specification's.** A step of\n`module-annotate-table`. Its consumer is `Sketch.annotate_eq_table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodies_eq","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  (bodies : Effect4.Program.Effs Op) (base : List Nat),\n  Eq\n    (List.map (Effect4.Program.Table.bodyEntry sig decls bodies base)\n      (Effect4.Program.Node.effs bodies).addresses)\n    (Effect4.Program.Table.bodies sig decls bodies base)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":313,"lemmas":54,"nearest":["Effect4.Program.Table.under_self","Effect4.Program.Table.bodies_eq","Effect4.Program.mem_addresses_iff","Effect4.Program.Part.bodyAt_at"]},"doc":"The spine holds an entry at every address of a body's part. A step of\n`module-table-splices`. Its consumer is `annotateModule_fill_body`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodies_mem_under","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {r rest : List Nat} {part : Effect4.Program.Part Op}\n  {x : Effect4.Program.Node Op} (base : List Nat),\n  Eq (Effect4.Program.Part.bodyAt sig decls bodies r) (Option.some { fst := part, snd := rest }) →\n    Eq ((Effect4.Program.Node.eff part.program).at_ rest) (Option.some x) →\n      Exists fun e =>\n        And (List.instMembership.mem (Effect4.Program.Table.bodies sig decls bodies base) e)\n          (Eq (Effect4.Program.Table.under (instHAppendOfAppend.hAppend base r) e.path) Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":373,"lemmas":64,"nearest":["Effect4.Program.Annotate.check_restrict"]},"doc":"The bodies' spine answers the same at an extension. A step of `omit-splices-table`. Its\nconsumer is `annotateModule_restrict`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.Table.bodies_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ (decls : List Effect4.Program.DefDecl) (bodies : Effect4.Program.Effs Op) (base : List Nat),\n      Effect4.Program.BodiesSigProgram s decls bodies →\n        Eq (Effect4.Program.Table.bodies s' decls bodies base)\n          (Effect4.Program.Table.bodies s decls bodies base)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":321,"lemmas":56,"nearest":["Effect4.Program.Table.splice_append_out_left","Effect4.Program.tableAt_path","Effect4.Program.Node.replaceAt_effs_tail","Effect4.Program.Table.splice_three","Effect4.Program.Table.under_sibling_false","Effect4.Program.Table.bodies_under","Effect4.Program.Table.under_self","Effect4.Program.tableAt_mem_path","Effect4.Program.Table.under_prefix_false","Effect4.Program.Annotate.check_eq","Conform.Effect4.Typing.check_sound","Effect4.Program.tableAt_splice","Effect4.Program.focusAt_eq_some","Effect4.Program.Node.replaceAt_effs_head"]},"doc":"**An edit inside one body splices the spine's entries.** A step of `module-table-splices`.\nIts consumer is `annotateModule_fill_body`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodies_splice","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies bodies' : Effect4.Program.Effs Op} {r rest : List Nat} {part : Effect4.Program.Part Op}\n  {q' : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy} {f : Effect4.Program.Focus Op}\n  (base : List Nat),\n  Eq (Effect4.Program.Part.bodyAt sig decls bodies r) (Option.some { fst := part, snd := rest }) →\n    Conform.Effect4.Typing.HasTy part.sig part.env part.program t →\n      Eq (Effect4.Program.focusAt part.sig part.env part.program rest) (Option.some f) →\n        Conform.Effect4.Typing.HasTy part.sig f.env q' f.ty →\n          Eq ((Effect4.Program.Node.effs bodies).replaceAt r (Effect4.Program.Node.eff q'))\n              (Option.some (Effect4.Program.Node.effs bodies')) →\n            Eq (Effect4.Program.Table.bodies sig decls bodies' base)\n              (Effect4.Program.Table.splice (Effect4.Program.Table.bodies sig decls bodies base)\n                (instHAppendOfAppend.hAppend base r)\n                (Effect4.Program.tableAt part.sig (Option.some (Effect4.Program.NodeEnv.env f.env))\n                  (Effect4.Program.Node.eff q') (instHAppendOfAppend.hAppend base r)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":308,"lemmas":54,"nearest":["Effect4.Program.Annotate.check_eq","Effect4.Program.tableAt_path"]},"doc":"Every entry of the bodies' spine stands under its base. A step of `module-table-splices`. Its\nconsumers are `annotateModule_fill_main` and `Table.bodies_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodies_under","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  (bodies : Effect4.Program.Effs Op) (base : List Nat) (e : Effect4.Program.Table.Entry),\n  List.instMembership.mem (Effect4.Program.Table.bodies sig decls bodies base) e →\n    Exists fun x => Eq e.path (instHAppendOfAppend.hAppend base x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":54,"nearest":[]},"doc":"The spine's head body is a part at its base. A step of `module-annotate-table`. Its consumer\nis `Table.bodies_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodyEntry_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (d : Effect4.Program.DefDecl)\n  (ds : List Effect4.Program.DefDecl) (body : Effect4.Program.Eff Op)\n  (rest : Effect4.Program.Effs Op) (base b : List Nat),\n  Eq\n    (Effect4.Program.Table.bodyEntry sig (List.cons d ds) (Effect4.Program.Effs.cons body rest) base\n      (List.cons 0 b))\n    (Effect4.Program.tableEntryAt (sig.withParams d.params)\n      (Option.some (Effect4.Program.NodeEnv.env (List.cons d.request.normalize List.nil)))\n      (Effect4.Program.Node.eff body) (instHAppendOfAppend.hAppend base (List.cons 0 List.nil)) b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":54,"nearest":[]},"doc":"The spine's own node has no part. A step of `module-annotate-table`. Its consumer is\n`Table.bodies_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodyEntry_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  (bodies : Effect4.Program.Effs Op) (base : List Nat),\n  Eq (Effect4.Program.Table.bodyEntry sig decls bodies base List.nil)\n    { path := base, env := Option.none, result := Option.none }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":54,"nearest":[]},"doc":"With no declaration, the spine holds no part. A step of `module-annotate-table`. Its consumer\nis `Table.bodies_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodyEntry_nodecl","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (bodies : Effect4.Program.Effs Op)\n  (base : List Nat),\n  Eq (Effect4.Program.Table.bodyEntry sig List.nil bodies base) fun r =>\n    { path := instHAppendOfAppend.hAppend base r, env := Option.none, result := Option.none }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":54,"nearest":[]},"doc":"The spine's tail is the spine of the rest, one step further. A step of\n`module-annotate-table`. Its consumer is `Table.bodies_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.bodyEntry_tail","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (d : Effect4.Program.DefDecl)\n  (ds : List Effect4.Program.DefDecl) (body : Effect4.Program.Eff Op)\n  (rest : Effect4.Program.Effs Op) (base b : List Nat),\n  Eq\n    (Effect4.Program.Table.bodyEntry sig (List.cons d ds) (Effect4.Program.Effs.cons body rest) base\n      (List.cons 1 b))\n    (Effect4.Program.Table.bodyEntry sig ds rest\n      (instHAppendOfAppend.hAppend base (List.cons 1 List.nil)) b)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"**Every entry of a splice is an entry of the new subtree's table or of the old table.** A step\nof `edit-repaint-set`. Its consumer is `EditSession.feed_repaint` (`Laws/Program/Edit.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.mem_splice","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {old sub : List Effect4.Program.Table.Entry} {a : List Nat} {x : Effect4.Program.Table.Entry},\n  List.instMembership.mem (Effect4.Program.Table.splice old a sub) x →\n    Or (List.instMembership.mem sub x) (List.instMembership.mem old x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":385,"lemmas":193,"nearest":["Effect4.Program.Annotate.check_alg_agreeOn"]},"doc":"The module layers' table answers the same at an extension, when the layers read only the\nsmaller signature (decisions row 341). The fold congruence at `Annotate.check_alg_agreeOn`. A\nstep of `omit-splices-table`. Its consumer is `annotateModule_restrict`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.Table.moduleLayers_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {ls : Effect4.Program.LayerTerms Op},\n      Effect4.Program.cata_layers\n          (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n            (Effect4.Program.SigOkDef s))\n          ls →\n        Eq (Effect4.Program.Table.moduleLayers s' ls) (Effect4.Program.Table.moduleLayers s ls)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":["Effect4.Program.List.dropWhile_eq_nil_of_all"]},"doc":"A table that is all inside the subtree is replaced whole. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.splice_all_under","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {a : List Nat} {L sub : List Effect4.Program.Table.Entry},\n  (∀ (e : Effect4.Program.Table.Entry),\n      List.instMembership.mem L e → Eq (Effect4.Program.Table.under a e.path) Bool.true) →\n    Eq (Effect4.Program.Table.splice L a sub) sub","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"Entries before the subtree stay in front. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.splice_append_out_left","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {a : List Nat} {X Y sub : List Effect4.Program.Table.Entry},\n  (∀ (e : Effect4.Program.Table.Entry),\n      List.instMembership.mem X e → Eq (Effect4.Program.Table.under a e.path) Bool.false) →\n    Eq (Effect4.Program.Table.splice (instHAppendOfAppend.hAppend X Y) a sub)\n      (instHAppendOfAppend.hAppend X (Effect4.Program.Table.splice Y a sub))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":["Effect4.Program.List.all_of_dropWhile_nil","Effect4.Program.List.all_of_takeWhile_length"]},"doc":"Entries after the subtree stay behind, once the subtree has begun. A step of\n`tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.splice_append_out_right","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {a : List Nat} {Y Z sub : List Effect4.Program.Table.Entry},\n  (Exists fun e =>\n      And (List.instMembership.mem Y e) (Eq (Effect4.Program.Table.under a e.path) Bool.true)) →\n    (∀ (e : Effect4.Program.Table.Entry),\n        List.instMembership.mem Z e → Eq (Effect4.Program.Table.under a e.path) Bool.false) →\n      Eq (Effect4.Program.Table.splice (instHAppendOfAppend.hAppend Y Z) a sub)\n        (instHAppendOfAppend.hAppend (Effect4.Program.Table.splice Y a sub) Z)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":["Effect4.Program.Table.splice_append_out_right","Effect4.Program.Table.splice_append_out_left"]},"doc":"The splice of a table in three segments: the entries before the subtree, a segment that the\nsubtree begins in, and the entries after it. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.splice_three","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {a : List Nat} {X Y Z sub : List Effect4.Program.Table.Entry},\n  (∀ (e : Effect4.Program.Table.Entry),\n      List.instMembership.mem X e → Eq (Effect4.Program.Table.under a e.path) Bool.false) →\n    (Exists fun e =>\n        And (List.instMembership.mem Y e) (Eq (Effect4.Program.Table.under a e.path) Bool.true)) →\n      (∀ (e : Effect4.Program.Table.Entry),\n          List.instMembership.mem Z e → Eq (Effect4.Program.Table.under a e.path) Bool.false) →\n        Eq\n          (Effect4.Program.Table.splice\n            (instHAppendOfAppend.hAppend X (instHAppendOfAppend.hAppend Y Z)) a sub)\n          (instHAppendOfAppend.hAppend X\n            (instHAppendOfAppend.hAppend (Effect4.Program.Table.splice Y a sub) Z))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":372,"lemmas":54,"nearest":["Effect4.Program.effTy_of_check","Effect4.Program.focusAt_eq_some"]},"doc":"**The table answers the focus.** Where a sketch's table holds an environment of variables and\na type at an address below the root, the focus there is that environment and that type, at the\nsub-program the address holds. So a tool reads a focus off a table it keeps, with no check. A\nstep of `edit-session-coherent`. Its consumer is `EditSession.feed_coherent`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Table.typedAt_table","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {a : List Nat}\n  {tys : Effect4.Program.TyEnv} {ty : Effect4.Program.EffTy},\n  Eq (Effect4.Program.Table.typedAt (s.table app) a) (Option.some { fst := tys, snd := ty }) →\n    Ne a List.nil →\n      Exists fun q => Eq (s.focusAt app a) (Option.some { program := q, env := tys, ty := ty })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":364,"lemmas":54,"nearest":["Effect4.Program.Sketch.table_head"]},"doc":"**The table's root holds the sketch's check.** The type a sketch's table holds at the root is\nits check's answer. A step of `edit-session-coherent`. Its consumers are\n`EditSession.feed_coherent` and `EditSession.view_type`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Table.typedAt_table_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (s : Effect4.Program.Sketch) (app : Effect4.Program.SigApp),\n  Eq (Option.map (fun x => x.snd) (Effect4.Program.Table.typedAt (s.table app) List.nil))\n    (s.check app).toOption","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":370,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.focusAt_eq_some","Effect4.Program.Sketch.tableEntry_path","Effect4.Program.mem_addresses_iff","Effect4.Program.Sketch.focusAt_at"]},"doc":"**The table holds the focus's type at the focus**: the converse of `Table.typedAt_table`. A\nstep of `omit-splices-table`. Its consumer is `Sketch.focusAt_more_holes`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.Table.typedAt_table_of_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {s : Effect4.Program.Sketch} {app : Effect4.Program.SigApp} {a : List Nat}\n  {f : Effect4.Program.Focus Effect4.Program.NativeOp},\n  Eq (s.focusAt app a) (Option.some f) →\n    Ne a List.nil →\n      Eq (Effect4.Program.Table.typedAt (s.table app) a) (Option.some { fst := f.env, snd := f.ty })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"An address is inside its own subtree, and so is each extension of it. A step of\n`tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.under_append","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (a b : List Nat), Eq (Effect4.Program.Table.under a (instHAppendOfAppend.hAppend a b)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A node's own address is outside the subtree at a strict extension of it. A step of\n`tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.under_prefix_false","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (pre rest : List Nat) (i : Nat),\n  Eq (Effect4.Program.Table.under (instHAppendOfAppend.hAppend pre (List.cons i rest)) pre)\n    Bool.false","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":["Effect4.Program.Table.under_append"]},"doc":"An address is under itself. A step of `module-table-splices`. Its consumers are\n`Table.bodies_mem_under` and `Table.bodies_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.Table.under_self","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (a : List Nat), Eq (Effect4.Program.Table.under a a) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A sibling's subtree is outside the subtree at another child. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.Table.under_sibling_false","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (pre rest b : List Nat) {i j : Nat},\n  Ne j i →\n    Eq\n      (Effect4.Program.Table.under (instHAppendOfAppend.hAppend pre (List.cons i rest))\n        (instHAppendOfAppend.hAppend pre (List.cons j b)))\n      Bool.false","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":38,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"A positional projection of a closed type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Tuple.closed_project","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {index : Nat} {t r : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.Tuple.project index t) (Option.some r) → Eq r.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":59,"nearest":["Effect4.Program.Tuple.closed_project"]},"doc":"The tuple read keeps closed types closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Tuple.closed_typeAt","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {target ty : Effect4.Program.Ty} {index : Nat},\n  Eq target.closed Bool.true →\n    Eq (Effect4.Program.Tuple.typeAt target index) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":79,"lemmas":38,"nearest":["Effect4.Program.Ty.closed_joinCands","Effect4.Program.Ty.closed_cands"]},"doc":"**A list match by bounds reads closed bindings from closed arguments.** Each binding is the\njoin of candidates (`closed_joinCands`), and each candidate is a part of an argument\n(`closed_cands`). A step of `NativeAtom.Scheme.closed_apply`, its consumer, and so of the claim\n`checked-types-closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closedSubst_matchArgsB","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {σ : Effect4.Program.Ty.Subst} {ps rs : List Effect4.Program.Ty},\n  Eq (Effect4.Program.Bounds.matchArgsB ps rs) (Option.some σ) →\n    (∀ (r : Effect4.Program.Ty), List.instMembership.mem rs r → Eq r.closed Bool.true) →\n      Effect4.Program.Ty.ClosedSubst σ","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":19,"lemmas":0,"nearest":[]},"doc":"**Each candidate's type is closed where the request is.** The walk of the match by bounds\ngives a candidate the request's type at an occurrence, and that type is a part of the request.\nThe case list is the function's. A step of `closedSubst_matchArgsB`, its consumer, and so of the\nclaim `checked-types-closed`. It says nothing of the template. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_cands","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (v : Effect4.Program.Ty.Variance) (t r : Effect4.Program.Ty),\n  Eq r.closed Bool.true →\n    ∀ (c : Effect4.Program.Bounds.Cand),\n      List.instMembership.mem (Effect4.Program.Bounds.cands v t r) c → Eq c.snd.snd.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":3,"nearest":[]},"doc":"The tag residual of a closed type is closed: it keeps members. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_diffTag","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (tag : String) {t : Effect4.Program.Ty},\n  Eq t.closed Bool.true → Eq (Effect4.Program.Ty.diffTag tag t).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":5,"nearest":["Effect4.Program.Ty.mem_of_lookup"]},"doc":"**An instance at closed bindings is closed**, whatever the template: a bound parameter\nbecomes its binding, and a parameter that no binding names becomes `never`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_instantiate","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {σ : Effect4.Program.Ty.Subst},\n  Effect4.Program.Ty.ClosedSubst σ →\n    ∀ (t : Effect4.Program.Ty), Eq (Effect4.Program.Ty.instantiate σ t).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"**The join of closed candidates is closed** (`UnionRule.closed_join`). A step of\n`closedSubst_matchArgsB`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_joinCands","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (l : List Effect4.Program.Ty),\n  (∀ (c : Effect4.Program.Ty), List.instMembership.mem l c → Eq c.closed Bool.true) →\n    Eq (Effect4.Program.Bounds.joinCands l).closed Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":[]},"doc":"A tagged member's payload is closed when the member is. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_payloadOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {tag : String} {m p : Effect4.Program.Ty},\n  Eq m.closed Bool.true →\n    Eq (Effect4.Program.Ty.payloadOf tag m) (Option.some p) → Eq p.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":59,"nearest":["Effect4.Program.Ty.closed_payloadOf"]},"doc":"The payload type of a tag in a closed type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.closed_payloadTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {tag : String} {t p : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.Ty.payloadTy tag t) (Option.some p) → Eq p.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A binding that `lookup` finds is one of the bindings. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.Ty.mem_of_lookup","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {σ : Effect4.Program.Ty.Subst} {i : Nat} {t : Effect4.Program.Ty},\n  Eq (List.lookup i σ) (Option.some t) → List.instMembership.mem σ { fst := i, snd := t }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":43,"nearest":[]},"doc":"The checker's order on cause types is the order on their error types: the cause constructor\nkeeps and reflects the order. A step of `cause_mono` and of `Member.cause_cases_of_below`, its\nconsumers. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Ty.subN_causeOf_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (e e' : Effect4.Program.Ty),\n  Iff (Eq (e.causeOf.subN e'.causeOf) Bool.true) (Eq (e.subN e') Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":43,"nearest":[]},"doc":"The checker's order on exit types is the order on their columns: the exit constructor\nkeeps and reflects the order. The fact `embeds` of `Member.exit_eliminator`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Ty.subN_exitOf_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (a e a' e' : Effect4.Program.Ty),\n  Iff (Eq ((a.exitOf e).subN (a'.exitOf e')) Bool.true)\n    (And (Eq (a.subN a') Bool.true) (Eq (e.subN e') Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":43,"nearest":[]},"doc":"The checker's order on fiber types is the order on their columns: the fiber constructor\nkeeps and reflects the order. The fact `embeds` of `Member.fiber_eliminator`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Ty.subN_fiberOf_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (a e a' e' : Effect4.Program.Ty),\n  Iff (Eq ((a.fiberOf e).subN (a'.fiberOf e')) Bool.true)\n    (And (Eq (a.subN a') Bool.true) (Eq (e.subN e') Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":43,"nearest":[]},"doc":"The checker's order on list types is the order on their element types: the list constructor\nkeeps and reflects the order. The fact `embeds` of `Member.list_eliminator`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Ty.subN_list_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (t t' : Effect4.Program.Ty), Iff (Eq (t.list.subN t'.list) Bool.true) (Eq (t.subN t') Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":43,"nearest":[]},"doc":"The checker's order on option types is the order on their element types: the option constructor\nkeeps and reflects the order. The fact `embeds` of `Member.option_eliminator`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.Ty.subN_option_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (t t' : Effect4.Program.Ty),\n  Iff (Eq (t.option.subN t'.option) Bool.true) (Eq (t.subN t') Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":134,"lemmas":148,"nearest":[]},"doc":"**Instantiation respects polarity** (claim `instantiate-respects-polarity`, slice VAR-2): if\nevery parameter's two bindings are related by `Ty.sub` at the parameter's polarity in `t` (a\nbivariant parameter asks nothing, an invariant one both directions), the two instances are\nrelated. It is the probe's `eval_respects` at the model of `Ty` (raw `Ty.sub`, each head read at\nits variance, `HeadReading.sub`). Its consumers are `checker-monotone`'s share at a row (with\n`Bounds.matchArgsB_monotone`, at an answer that reads its parameters at co or bi) and HO-4's\ninstantiated rows. It establishes no semantic variance and nothing of tsgo's inference. ","kind":"theorem","module":"Effect4.Laws.Program.Polarity","name":"Effect4.Program.Ty.sub_instantiate_polarity","placement":{"concept":"subtyping-algebra","requirement":"R10"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty) (σ σ' : Effect4.Program.Ty.Subst),\n  (∀ (i : Nat),\n      Eq\n        ((Effect4.Program.Ty.polarity Effect4.Program.HeadReading.sub i t).select\n          ((σ.at i).sub (σ'.at i)) ((σ'.at i).sub (σ.at i)))\n        Bool.true) →\n    Eq ((Effect4.Program.Ty.instantiate σ t).sub (Effect4.Program.Ty.instantiate σ' t)) Bool.true","status":"proved"},{"axioms":[],"broughtIn":{"definitions":775,"lemmas":64,"nearest":[]},"doc":"**A positional countdown's park** (`fiberPre`'s positional arm of `awaitAll` and\n`awaitAllFailFast`: a tuple certificate of per-target exit columns, which `Layer.merge`'s siblings\nuse): as `Evaluating.countdown_parks`, the record resuming with the exits at the tuple of the\ntargets' columns. Planned: `J`'s countdown payload holds one pair of columns for every target, so\nit cannot type this record; a positional payload must carry the columns in the targets' order.\n`J` then admits a stale or a duplicate countdown firing that would append past them (seat B's\nfinding, 2026-10-12). Neither rc.112 nor 4.0.1 fires a target's observer twice (`fiberAwaitAll`,\n`internal/effect.ts:779-813`, the same text in 4.0.1), so the proof needs `J` to say that each\ncountdown key has at most one firing to come.\nConsumer: `awaitAllParks`, `awaitAllFailFastParks`. ","kind":"goal","module":"Effect4.Laws.Program.Typed.Commands.Clauses.Park","name":"Effect4.Program.Typed.Evaluating.countdown_parks_positional","placement":{"concept":"reactive-scheduling","requirement":"R9"},"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {rootTy : Effect4.Program.EffTy}\n  {w : Effect4.Program.Typed.World} {m : Effect4.Program.Sched.RState}\n  {rest : List Effect4.Program.Sched.RCmd} {f : Effect4.Program.Sched.RFiber} {y : Bool},\n  Effect4.Program.Typed.Evaluating root rootTy w m rest f y →\n    Eq (Effect4.Program.Typed.raceRegistrationR f.frame.current) Option.none →\n      Eq (Effect4.Program.Sched.externalRequestR f.frame.current) Option.none →\n        ∀ {targets : List Effect4.FiberId} (failFast : Bool) {exits : List Effect4.Machine.ExitV}\n          {target : Effect4.FiberId} {remaining : List Effect4.FiberId},\n          Eq\n              (Effect4.Machine.countdownWalk\n                { fibers := m.fibers, races := m.races, nextId := m.nextId,\n                  nextToken := instHAdd.hAdd m.nextToken 1, nextRace := m.nextRace,\n                  middlewareInstalled := m.middlewareInstalled, armed := m.armed, state := m.state,\n                  trace := m.trace, stuck := m.stuck, forks := m.forks }\n                targets List.nil)\n              { fst := exits, snd := Option.some { fst := target, snd := remaining } } →\n            (∀ (id : Effect4.FiberId),\n                List.instMembership.mem targets id → instLTNat.lt id.value m.nextId) →\n              ∀ (cols : Effect4.FiberId → Prod Effect4.Program.Ty Effect4.Program.Ty),\n                (∀ (id : Effect4.FiberId),\n                    List.instMembership.mem targets id →\n                      Effect4.Program.Typed.FiberColumnsBelow w id (cols id).fst (cols id).snd) →\n                  ∀ (next' : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram)\n                    (row : Effect4.Machine.Env.Requirement) (flag : Bool),\n                    Effect4.Machine.Env.Context.Satisfies f.context.services row →\n                      (∀ (ty : Effect4.Program.EffTy),\n                          Eq (w.Γ f.id) (Option.some ty) →\n                            Effect4.Program.Typed.MHostStack root w\n                              (Effect4.Machine.RunMachine.update m f) f.id\n                              {\n                                fst :=\n                                  Effect4.Program.Typed.AmbientPosition.result\n                                    {\n                                        fst :=\n                                          Effect4.Program.EffTy.pure\n                                            (Effect4.Program.Ty.tuple\n                                              (List.map (fun t => (cols t).fst.exitOf (cols t).snd)\n                                                targets)),\n                                        snd := { fst := row, snd := row } }.fst\n                                    {\n                                          fst :=\n                                            Effect4.Program.EffTy.pure\n                                              (Effect4.Program.Ty.tuple\n                                                (List.map\n                                                  (fun t => (cols t).fst.exitOf (cols t).snd)\n                                                  targets)),\n                                          snd := { fst := row, snd := row } }.snd.fst\n                                    {\n                                          fst :=\n                                            Effect4.Program.EffTy.pure\n                                              (Effect4.Program.Ty.tuple\n                                                (List.map\n                                                  (fun t => (cols t).fst.exitOf (cols t).snd)\n                                                  targets)),\n                                          snd := { fst := row, snd := row } }.snd.snd,\n                                snd := f.frame.interruptible }\n                              (Effect4.Program.Typed.finalPos ty flag)\n                              (List.cons (Effect4.Program.Sched.ScopeFrame.answer next')\n                                f.frame.stack)) →\n                        (∀ (M : Effect4.Program.Sched.RState) (g : Effect4.Program.Sched.RFiber)\n                            (edits :\n                              List\n                                (Effect4.Machine.FiberEdit Effect4.Machine.Err\n                                  Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)),\n                            Eq g.frame.current f.frame.current →\n                              Eq\n                                (Effect4.Program.Sched.prepareIterR\n                                  { machine := M, fiber := g, yielding := y,\n                                    outcome := Effect4.Machine.Outcome.parked, nested := List.nil,\n                                    edits := edits })\n                                { machine := M, fiber := g, yielding := y,\n                                  outcome := Effect4.Machine.Outcome.parked, nested := List.nil,\n                                  edits := edits }) →\n                          Effect4.Program.Typed.SettlesTyped root rootTy w f.id rest\n                            (Effect4.Program.Sched.prepareIterR\n                              { machine := Effect4.Program.Typed.countdownMachine m target f.id,\n                                fiber :=\n                                  Effect4.Program.Typed.countdownFiber root f next'\n                                    { token := m.nextToken, remaining := remaining,\n                                      collected := exits,\n                                      resumeWith := Effect4.Machine.Resume.exitsValue,\n                                      failFast := failFast },\n                                yielding := y,\n                                outcome :=\n                                  Effect4.Machine.FiberAction.outcomeOf\n                                    (Effect4.Program.Typed.countdownMachine m target f.id)\n                                    Bool.true,\n                                nested := List.nil,\n                                edits :=\n                                  List.cons\n                                    (Effect4.Machine.FiberEdit.observe target\n                                      (Effect4.Machine.Observer.countdown f.id m.nextToken))\n                                    List.nil })","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1446,"lemmas":652,"nearest":["Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_mono","Effect4.Program.Bounds.subN_never","Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.order_refl","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.seq_typed","Effect4.Scope.closeOrder_eq","Effect4.Program.Typed.TermMaps.mono","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.configTyped_frame","Effect4.Program.hom_eq_cata_ty"]},"doc":"**The scoped exit's close settles typed** (decisions row 188 (a); finding F-CLOSE): the walk\nstopped at a `scoped` guard's slot and left the scope's exit callback current (`MHostCallback`),\nwhich `prepareScopedExitR` consumes (`internal/effect.ts:3944-3947`): the previous context restored,\nits services fitting (the slot's protocol); the scope, present by the same protocol, closed with\nthe callback's exit, which fits `Exit<unknown, unknown>` (`fitsExit_unknown`; the store edit is\n`configTyped_closeState`); and the code installed is the `finishFinalizer` marker carrying the exit,\nor the close's program (`closeScopeUnsafe_ambient`) under the finalizer boundary\n(`ambient_finalizerBind`). Both are typed at the callback's position at the restored context's\nkeys, over the host stack below it. A captured release in the close runs under its captured context\nmerged over the current one (`releaseContext`), so it is typed at that row too.\nConsumer: `Evaluating.deliver_keeps`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Evaluate","name":"Effect4.Program.Typed.Evaluating.settle_callback","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {rootTy : Effect4.Program.EffTy}\n  {w : Effect4.Program.Typed.World} {m : Effect4.Program.Sched.RState}\n  {rest : List Effect4.Program.Sched.RCmd} {f : Effect4.Program.Sched.RFiber} {y : Bool},\n  Effect4.Program.Typed.Evaluating root rootTy w m rest f y →\n    ∀ (fr : Effect4.Program.Sched.RSaved) {ty : Effect4.Program.EffTy} {flag : Bool},\n      Eq (w.Γ f.id) (Option.some ty) →\n        Effect4.Program.Typed.MHostCallback root w (Effect4.Machine.RunMachine.update m f) f.id\n            (Effect4.Program.Typed.finalPos ty flag) fr →\n          Effect4.Program.Typed.SettlesTyped root rootTy w f.id rest\n            (Effect4.Program.Sched.prepareIterR\n              { machine := m,\n                fiber :=\n                  { id := f.id, frame := fr, running := f.running, parked := f.parked,\n                    pending := f.pending, finalizing := f.finalizing, exit := f.exit,\n                    currentOpCount := f.currentOpCount, maxOpsBeforeYield := f.maxOpsBeforeYield,\n                    preventYield := f.preventYield, yieldOverride := f.yieldOverride,\n                    observers := f.observers, children := f.children, dispatcher := f.dispatcher,\n                    context := f.context },\n                yielding := y, outcome := Effect4.Machine.Outcome.continue_, nested := List.nil })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":57,"nearest":["Effect4.Program.Typed.order_trans"]},"doc":"**The term relation is closed under later worlds**, by the order's transitivity: what\n`storePre_mono` needs of a read-modify-write row. Quantifying over later worlds is what closes\nit; a statement at one world is not closed (the control `termMaps_oneWorld_not_mono` of the\nretired battery `git:68856e778:Test/Program/ProtocolPosts.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Residual","name":"Effect4.Program.Typed.TermMaps.mono","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {w w' : Effect4.Program.Typed.World} {f : Effect4.Program.Term} {env : List Effect4.Machine.Val}\n  {A R : Effect4.Program.Ty},\n  w.leHost w' →\n    Effect4.Program.Typed.TermMaps w f env A R → Effect4.Program.Typed.TermMaps w' f env A R","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1539,"lemmas":657,"nearest":["Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.order_refl","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.seq_typed","Effect4.Scope.closeOrder_eq","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.configTyped_frame","Effect4.Program.hom_eq_cata_ty"]},"doc":"**`closeScope`** (`Scope.close`; latest's `scopeClose`,\n`vendor/effect-4.0.1/src/internal/effect.ts:3929-3935`): the close's state half\n(`configTyped_closeState`) keeps `I`, and so does the installed frame. No finalizer answers `void`\nover the saved answer frame. Otherwise the closer is masked first: an interruptible closer's\nrestoring slot sits over the answer frame, an identity arrow on positions as `clause_mask`'s is, and\nthe program (`closeScope_installs_ambient`) runs at the operation's row. A captured release's context\nis merged over the current one, so a failure leaves at a row the entry row covers.\nConsumer: `deliver_preserves_of_clauses` through `Clauses/All.lean`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Evaluate","name":"Effect4.Program.Typed.clause_closeScope","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (scope : Nat)\n  (ex : Effect4.Machine.ExitV),\n  Effect4.Program.Typed.FiberClauseKeeps root rootTy\n    (Effect4.Program.Sched.FiberOp.closeScope scope ex)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1525,"lemmas":666,"nearest":["Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Program.Typed.order_refl","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.denotesTyped","Effect4.Program.Typed.configTyped_frame","Effect4.Program.hom_eq_cata_ty"]},"doc":"**`scoped`** (`internal/effect.ts:3938-3948`, decisions row 188 (a)): a fresh sequential scope\nmade in the store (the `scopeMake` row's step, so the store's order, well-formedness and typing are\nthe row's, and the new entry is empty), the fiber's context extended with it (`withScope`; the scope\nservice fits because the scope is present), and the body run under the `onExit` guard bound to the\nscope's exit callback (`ambient_scopedGuardBind`) over the saved answer frame keep `I`. The body\nruns at the new context's keys, which hold the operation's row and the body's requirement row (the\npre gives that row without the scope key, `bodyRequires`; the install adds the key). The guard's\nexits land at the operation's row, which the previous context's keys hold. The world grows by the\nstore. Consumer: `deliver_preserves_of_clauses` through `Clauses/All.lean`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Evaluate","name":"Effect4.Program.Typed.clause_scoped","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (body : Effect4.Program.Point),\n  Effect4.Program.Typed.FiberClauseKeeps root rootTy (Effect4.Program.Sched.FiberOp.scoped body)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":803,"lemmas":175,"nearest":["Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_refl","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.order_trans"]},"doc":"**A captured release's finalizer returns at its entry row** (`denoteFin`'s `foreign` arm;\nrc.112 `internal/effect.ts:3983`, `:2180-2199`): it reads the current context, merges the captured\none over it (`releaseContext`, `Context.merge`), runs the release there and restores the previous\ncontext. The merge keeps every key of the entry row, so a failure leaves at a row the entry row\ncovers (`foreignFin_ambient`).\nConsumer: `ambientFinalizerTyped_of_admitted`, hence both close walks. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.Close","name":"Effect4.Program.Typed.foreignFinalizer_ambient","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (w : Effect4.Program.Typed.World)\n  (c : Effect4.Machine.Capture),\n  Effect4.Program.Typed.CaptureTyped root w c →\n    ∀ (ex : Effect4.Machine.ExitV),\n      Effect4.Program.Typed.FitsExit w\n          { answer := Effect4.Program.Ty.unknown, error := Effect4.Program.Ty.unknown,\n            requires := Effect4.Machine.Env.Requirement.empty }\n          ex →\n        ∀ (row : Effect4.Machine.Env.Requirement),\n          Effect4.Program.Typed.AmbientProg root w row\n            (Effect4.Program.Typed.AmbientPosition.result\n              {\n                  fst :=\n                    { answer := Effect4.Program.Ty.unknown, error := Effect4.Program.Ty.never,\n                      requires := Effect4.Machine.Env.Requirement.empty },\n                  snd := { fst := row, snd := row } }.fst\n              {\n                    fst :=\n                      { answer := Effect4.Program.Ty.unknown, error := Effect4.Program.Ty.never,\n                        requires := Effect4.Machine.Env.Requirement.empty },\n                    snd := { fst := row, snd := row } }.snd.fst\n              {\n                    fst :=\n                      { answer := Effect4.Program.Ty.unknown, error := Effect4.Program.Ty.never,\n                        requires := Effect4.Machine.Env.Requirement.empty },\n                    snd := { fst := row, snd := row } }.snd.snd)\n            (Effect4.Program.Sched.denoteFin (Effect4.Machine.FinName.foreign c) ex)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":980,"lemmas":561,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.order_trans","Effect4.Program.Node.at_child","Effect4.Program.scopeParams_below","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.scopeParams_body","Effect4.Program.Signature.withParams_defOf"]},"doc":"**An invocation with programs** (decisions row 340; the arm of `denote-typed`): the counted\nstep, then the definition's body at its path, its one variable the request's value, and the\nsites of the call's programs pushed on the point's stack (`denoteR_invoke`). The checker types\nthe invocation by the definition's declared row (`Checker.inv_invoke`), which the declaration's\nformation keeps closed, so the request fits the declared request and the node's type is the\ndeclared columns (`rowTy_closed_some`). The body has the definition's parameters in scope\n(`scopeParams_body`), so the block's typing types it at its point (`BodiesTyped`); the frame\npushed is typed at those parameters (`argSites_typed`); and the body widens to the declared\ncolumns (`hop_typed`, `DefDecl.admits`). Placed as goal G3's successor in slice HO-1, proved in\nCX2 (`docs/research/2026-10-10-cx-lexical-scope.md` §9). Its consumer is `denote-typed`'s\ndispatch (`childDenotes_upto`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Denotation","name":"Effect4.Program.Typed.invoke_arm","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {p : Effect4.Program.Point} {ty : Effect4.Program.EffTy} {k : Nat} {r : Effect4.Program.Term}\n  {args : Effect4.Program.Effs Effect4.Program.NativeOp} {f : Nat}\n  {available : Effect4.Machine.Env.Requirement},\n  Eq p.fuel (instHAdd.hAdd f 1) →\n    Eq ((Effect4.Program.Node.eff root.program).at_ p.path)\n        (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.invoke k r args))) →\n      Effect4.Program.Typed.PointTyped root w p ty →\n        Eq w.serviceTy root.sig.serviceTy →\n          Effect4.Program.Typed.BodiesTyped root →\n            (∀ (c : Effect4.Program.NativeEff) (path : List Nat),\n                Eq ((Effect4.Program.Node.eff root.program).at_ path)\n                    (Option.some (Effect4.Program.Node.eff c)) →\n                  Effect4.Program.Typed.ChildDenotes root f c path) →\n              Effect4.Row.Subset ty.requires available →\n                Effect4.Program.Typed.AmbientStackTyped root w available\n                    (Effect4.Program.scopeParams root.program p.path) p.params →\n                  Effect4.Program.Typed.AmbientProg root w available\n                    (Effect4.Program.Typed.AmbientPosition.result\n                      { fst := ty, snd := { fst := available, snd := available } }.fst\n                      { fst := ty, snd := { fst := available, snd := available } }.snd.fst\n                      { fst := ty, snd := { fst := available, snd := available } }.snd.snd)\n                    (Effect4.Program.Sched.denoteR root.program\n                      (Effect4.Program.Eff.invoke k r args) p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":976,"lemmas":550,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.order_trans","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.scopeParams_decl","Effect4.Program.Signature.withParams_param"]},"doc":"**A parameter's run** (decisions row 340; the arm of `denote-typed`): the counted step, then\nthe site that the innermost invocation passed for parameter `i`, its values extended by the\nrequest's value, at the stack below that invocation (`denoteR`'s `param` arm). The point's\nscope holds parameter `i` (`ProgramSource.scopeSig_param`), formed with its declaration\n(`paramFormed_of_scope`), so the request fits the parameter's request and the node's type is the\nparameter's columns (`rowTy_closed_some`). The stack's top frame holds a site typed at the\nparameter (`StackTyped`), so the site's program is typed at its own point, with the caller's\nvalues and the stack below, and widens to the parameter's columns (`hop_typed`). Placed in\nslice CX1 (`docs/research/2026-10-10-cx-lexical-scope.md` §9), proved in CX2. Its consumer is\n`perform_arm`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Denotation","name":"Effect4.Program.Typed.param_arm","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {p : Effect4.Program.Point} {ty : Effect4.Program.EffTy} {i : Nat} {r : Effect4.Program.Term}\n  {f : Nat} {available : Effect4.Machine.Env.Requirement},\n  Eq p.fuel (instHAdd.hAdd f 1) →\n    Eq ((Effect4.Program.Node.eff root.program).at_ p.path)\n        (Option.some\n          (Effect4.Program.Node.eff\n            (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.param i) r))) →\n      Effect4.Program.Typed.PointTyped root w p ty →\n        Eq w.serviceTy root.sig.serviceTy →\n          Effect4.Program.Typed.BodiesTyped root →\n            (∀ (c : Effect4.Program.NativeEff) (path : List Nat),\n                Eq ((Effect4.Program.Node.eff root.program).at_ path)\n                    (Option.some (Effect4.Program.Node.eff c)) →\n                  Effect4.Program.Typed.ChildDenotes root f c path) →\n              Effect4.Program.Typed.AmbientStackTyped root w available\n                  (Effect4.Program.scopeParams root.program p.path) p.params →\n                Effect4.Program.Typed.AmbientProg root w available\n                  (Effect4.Program.Typed.AmbientPosition.result\n                    { fst := ty, snd := { fst := available, snd := available } }.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.snd)\n                  (Effect4.Program.Sched.denoteR root.program\n                    (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.param i) r) p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":44,"lemmas":9,"nearest":[]},"doc":"**A reference and its target have the same parameters in scope** (decisions row 340, ruling\nof 2026-10-10, `docs/research/2026-10-10-cx-lexical-scope.md` §11), when the target stands outside\nthe module's layers: the formation check keeps such a reference in its target's scope\n(`layerRefsWF_scopeOf`), and a path's parameters are its scope's (`scopeParams_eq`). So the stack\na reference's hop keeps reads the target's parameters. A step of `denote-typed`; its consumer is\n`ref_builds`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.scopeParams_ref","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff},\n  Eq (Effect4.Program.Eff.layerRefsWF program) Bool.true →\n    ∀ {site target : List Nat},\n      Eq ((Effect4.Program.Node.eff program).at_ site)\n          (Option.some (Effect4.Program.Node.layer (Effect4.Program.LayerTerm.ref target))) →\n        Eq (Effect4.Program.Eff.inModule program target) Bool.false →\n          Eq (Effect4.Program.scopeParams program target) (Effect4.Program.scopeParams program site)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":770,"lemmas":403,"nearest":["Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.subN_trans","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.termMaps_of_typed","Effect4.Program.Bounds.matchB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl"]},"doc":"**The store rows, per instantiation** (the state plan's T3a and T3b): a request fitting the\nchecked type of a `sync` row's use decodes to the row's store operation (`NativeOp.syncOpOf`) at\nthe point's environment, whose pre it meets at a certificate the instance fixes, and whose post\nanswers at the node's checked columns at every later world. A `Ref` row runs at the cell's\ndeclared type through `refRead`; a read-modify-write row discharges its term's pre from the\nterm's typing, over an environment that fits the node's (`bindTerm_termMaps`), and `Ref.modify`\ncertifies at the answer type `B` its term bound, which may differ from the cell's; a\n`Deferred.make` declares its promise at its own type arguments' instance; a completion fits the\npromise's declared columns, and a failure's value is in the error alphabet by the formation rule on\na deferred's error column. A step of the claims `denote-typed` and `straight-meaning-typed`; its\nconsumers are `syncPerform_arm`, `inlineYield_typed` and `progress`. It covers native `sync` rows\nat every instance and term the checker admits, at every world; it says nothing of a host row\n(R6), and one store step is atomic in the model only. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Denotation","name":"Effect4.Program.Typed.syncRow_typed","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {req : Effect4.Machine.Env.Requirement} (op : Effect4.Program.NativeOp),\n  Eq op.kind Effect4.Program.RowKind.sync →\n    ∀ {env : List Effect4.Machine.Val} {tys : Effect4.Program.TyEnv},\n      Effect4.Program.Typed.EnvTyped w tys env →\n        ∀ {reqTy : Effect4.Program.Ty} {t : Effect4.Program.EffTy},\n          Eq (Effect4.Program.rowTy op.row.normalizeTypes reqTy (root.signature.termUse tys op))\n              (Option.some t) →\n            ∀ (v : Effect4.Machine.Val),\n              Effect4.Program.Typed.Fits w v reqTy →\n                Exists fun o =>\n                  And (Eq (op.syncOpOf env v) (Option.some o))\n                    (Effect4.Program.Typed.TypedProg root w\n                      { answer := t.answer, error := t.error, requires := req }\n                      (Effects.Program.vis (Sum.inl o) fun ans =>\n                        Effects.Program.pure (Effect4.Exit.success ans)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":453,"lemmas":471,"nearest":["Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.fits_mono"]},"doc":"**A typed binder term maps its parameter into its type**, at every later world (the claim\n`term-typed-maps`): a term the checker types at `tys ++ [A]` with type `R`, over an environment\nthat fits `tys`, runs at `env ++ [a]` for every member `a` of `A` to a member of `R`. It is the\nterm relation's fundamental property for the term typer (`TermMaps`, `Typed/Residual.lean`):\nthe environment stays typed at every later world (`envTyped_mono`), the current value extends it\n(`envTyped_append`), and a typed term over fitting values evaluates into its type\n(`evalTerm_progress`). Under any signature whose atoms are the native table's. Its consumer is\n`syncRow_typed`, which discharges a read-modify-write row's pre from the term's typing. It says\nnothing of a term the checker refuses. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Denotation.Terms","name":"Effect4.Program.Typed.termMaps_of_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {sig : Effect4.Program.Signature Effect4.Program.NativeOp},\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {w : Effect4.Program.Typed.World} {tys : Effect4.Program.TyEnv}\n      {env : List Effect4.Machine.Val},\n      Effect4.Program.Typed.EnvTyped w tys env →\n        ∀ {f : Effect4.Program.Term} {A R : Effect4.Program.Ty},\n          Eq (Effect4.Program.termTy sig (instHAppendOfAppend.hAppend tys (List.cons A List.nil)) f)\n              (Option.some R) →\n            Effect4.Program.Typed.TermMaps w f env A R","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":84,"nearest":["Effect4.Program.UnionRule.Eliminator.lift_least","Effect4.Program.Ty.subN_trans","Effect4.Program.UnionRule.mapM_total","Effect4.Program.UnionRule.Eliminator.lift_upper"]},"doc":"**The adjoint form.** The lifted rule of a covariant constructor is that constructor's lower\nadjoint, and it answers exactly below the constructor's image. First, the lifted rule answers at\na target exactly when the target is below some `C b`. Second, where it answers `a`, an answer\n`b` is above `a` exactly when the target is below `C b`. It is one statement for the upper form,\nits least half and the fact `reads`. A part of the claim `union-rule-lift`. Its consumers are a\nconverted rule's monotone law with no further premise, the type arguments that a printer writes\nat a proper union, and the expected type of a hole under an eliminator. It says nothing at an\ninvariant constructor or about a target. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.adjoint","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ (t : Effect4.Program.Ty),\n      And\n        (Iff (Eq (Effect4.Program.UnionRule.lift rule t).isSome Bool.true)\n          (Exists fun b => Eq (t.subN (C b)) Bool.true))\n        (∀ {a : α},\n          Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n            ∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":85,"lemmas":130,"nearest":["Effect4.Program.UnionRule.Eliminator.adjoint","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**The adjoint form, in `≤`.** For an eliminator that answers a type, the lifted answer `a`\nand each `b` satisfy `CTy.ofRaw a ≤ CTy.ofRaw b ↔ CTy.ofRaw t ≤ CTy.ofRaw (C b)`. It is\n`Eliminator.adjoint`, read in the lattice of canonical types by `subN_iff_le`: the lifted rule is\nthe lower adjoint of the constructor there. A part of the claim `union-rule-lift`. Its consumer\nis a statement in core's order classes about a converted rule, such as the `mono` premise of a\nslice view of its answer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.adjoint_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty}\n  {C : Effect4.Program.Ty → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ (t : Effect4.Program.Ty),\n      And\n        (Iff (Eq (Effect4.Program.UnionRule.lift rule t).isSome Bool.true)\n          (Exists fun b =>\n            Effect4.Program.CTy.instLE.le (Effect4.Program.CTy.ofRaw t)\n              (Effect4.Program.CTy.ofRaw (C b))))\n        (∀ {a : Effect4.Program.Ty},\n          Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n            ∀ (b : Effect4.Program.Ty),\n              Iff\n                (Effect4.Program.CTy.instLE.le (Effect4.Program.CTy.ofRaw a)\n                  (Effect4.Program.CTy.ofRaw b))\n                (Effect4.Program.CTy.instLE.le (Effect4.Program.CTy.ofRaw t)\n                  (Effect4.Program.CTy.ofRaw (C b))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":39,"nearest":["Effect4.Program.UnionRule.Eliminator.adjoint","Effect4.Program.UnionRule.extendAll_eq_some_iff"]},"doc":"Each full-fallback answer is least below its upper form. Consumer: the classifier upper laws. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_adjoint","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n        ∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":41,"nearest":["Effect4.Program.UnionRule.extendAll_agrees","Effect4.Program.UnionRule.extendAll_never"]},"doc":"The full fallback answers a least answer at bottom. Consumer: its contract. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_bot","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    Exists fun a =>\n      And (Eq (Effect4.Program.UnionRule.extendAll rule Effect4.Program.Ty.never) (Option.some a))\n        (∀ (b : α), inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees","Effect4.Program.UnionRule.extendAll_eq_some_iff","Effect4.Program.UnionRule.Eliminator.adjoint","Effect4.Program.UnionRule.Eliminator.extendAll_upper"]},"doc":"The full fallback answers exactly below a constructor image. Consumer: its monotone and agreement laws. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_isSome_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ (t : Effect4.Program.Ty),\n      Iff (Eq (Effect4.Program.UnionRule.extendAll rule t).isSome Bool.true)\n        (Exists fun b => Eq (t.subN (C b)) Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_of_extend","Effect4.Program.UnionRule.Eliminator.extendAll_adjoint","Effect4.Program.UnionRule.Eliminator.extendAll_upper","Effect4.Program.UnionRule.Eliminator.extendAll_bot","Effect4.Program.UnionRule.extendAll_refused","Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"The full-fallback contract, without a proper-union refusal. Consumer: the fiber classifier reader. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_laws","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    And\n      (∀ {t : Effect4.Program.Ty} {a : α},\n        Eq (rule t) (Option.some a) →\n          Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a))\n      (And\n        (∀ {t : Effect4.Program.Ty},\n          Eq (rule t) Option.none →\n            Eq (Effect4.Program.UnionRule.extendAll rule t) (Effect4.Program.UnionRule.lift rule t))\n        (And\n          (Exists fun a =>\n            And\n              (Eq (Effect4.Program.UnionRule.extendAll rule Effect4.Program.Ty.never)\n                (Option.some a))\n              (∀ (b : α), inst_1.le a b))\n          (And\n            (∀ {t : Effect4.Program.Ty} {a : α},\n              Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n                And (Eq (t.subN (C a)) Bool.true)\n                  (∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true)))\n            (∀ {t : Effect4.Program.Ty} {a : α},\n              Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n                Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.extendAll_adjoint"]},"doc":"The full fallback answers the least upper arguments. Consumer: its monotone law. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_least","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a b : α},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n        Eq (t.subN (C b)) Bool.true → inst_1.le a b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.lift_least","Effect4.Program.UnionRule.Eliminator.lift_upper","Effect4.Program.UnionRule.Eliminator.extendAll_least","Effect4.Program.UnionRule.Eliminator.extendAll_upper","Effect4.Program.UnionRule.Eliminator.adjoint"]},"doc":"Raw-first and normalized answers agree in order. Consumer: the fiber, list, and exit readers. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_lift","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n        Exists fun a' =>\n          And (Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a'))\n            (And (inst_1.le a a') (inst_1.le a' a))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.extendAll_least","Effect4.Program.UnionRule.Eliminator.extendAll_isSome_iff","Effect4.Program.UnionRule.Eliminator.extendAll_upper","Effect4.Program.Ty.subN_trans"]},"doc":"The full fallback is monotone at every smaller type. Consumer: the fiber rule's concrete reader. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {s t : Effect4.Program.Ty},\n      Eq (s.subN t) Bool.true →\n        ∀ {b : α},\n          Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some b) →\n            Exists fun a =>\n              And (Eq (Effect4.Program.UnionRule.extendAll rule s) (Option.some a)) (inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":38,"nearest":["Effect4.Program.UnionRule.Eliminator.extendAll_adjoint"]},"doc":"Each full-fallback input is below its answer's constructor. Consumer: the three classifier upper laws. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extendAll_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) → Eq (t.subN (C a)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":39,"nearest":["Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.Eliminator.adjoint","Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"**The upper form and its least half, through both alternatives.** Where the extended rule of\nan eliminator answers `a` at a target, an answer `b` is above `a` exactly when the target is\nbelow `C b`, in the checker's order. At the member rule's own answer the target is `C a`, and\nthe constructor keeps and reflects the order. At the guarded rule's answer it is the second half\nof `Eliminator.adjoint`. A part of the claim `union-rule-extend`. Its consumers are\n`Eliminator.extend_upper` and `Eliminator.extend_least`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_adjoint","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n        ∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":41,"nearest":["Effect4.Program.UnionRule.extend_agrees","Effect4.Program.UnionRule.extend_never"]},"doc":"**A converted eliminator answers a least answer at `never`.** Its answer there is below\nevery answer. Where the member rule refuses `never`, the answer is the least answer itself\n(`extend_never`). A part of the claim `union-rule-extend`. Its consumer is\n`Eliminator.extend_laws`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_bot","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    Exists fun a =>\n      And (Eq (Effect4.Program.UnionRule.extend rule Effect4.Program.Ty.never) (Option.some a))\n        (∀ (b : α), inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extend_refused","Effect4.Program.UnionRule.extend_agrees","Effect4.Program.UnionRule.extend_eq_some_iff","Effect4.Program.UnionRule.Eliminator.liftOne_isSome_iff"]},"doc":"**Where a converted eliminator answers.** It answers exactly where its member rule answers,\nor where the target's normal form has at most one union member and the target is below some\n`C b`. A part of the claim `union-rule-extend`. Its consumers are\n`Eliminator.extend_mono` and `Eliminator.extend_liftOne`, and the reading of a conversion's\ndifferential: a refusal that stays is a proper union or a target below no `C b`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_isSome_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ (t : Effect4.Program.Ty),\n      Iff (Eq (Effect4.Program.UnionRule.extend rule t).isSome Bool.true)\n        (Or (Eq (rule t).isSome Bool.true)\n          (And (instLENat.le t.normalize.members.length 1)\n            (Exists fun b => Eq (t.subN (C b)) Bool.true)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extend_two","Effect4.Program.UnionRule.Eliminator.extend_adjoint","Effect4.Program.UnionRule.Eliminator.extend_upper","Effect4.Program.UnionRule.Eliminator.extend_bot","Effect4.Program.UnionRule.extend_refused","Effect4.Program.UnionRule.extend_agrees"]},"doc":"**The contract of a converted eliminator, as one statement**: what the extended rule of an\neliminator gives, for every `Eliminator rule C`. It agrees with the member rule wherever the\nmember rule answers. Where the member rule refuses, it is the guarded rule. It answers a least\nanswer at `never`. Its answer `a` puts the target below `C a`, in the checker's order, and an\nanswer `b` is above `a` exactly when the target is below `C b`. Where the member rule refuses a\ntarget whose normal form has two union members or more, it refuses. It is the pointer of the\nclaim `union-rule-extend`, and it adds nothing to its parts.\n`Eliminator.extend_isSome_iff`, `Eliminator.extend_mono` and `Eliminator.extend_liftOne` stand\nbeside it. Its consumer is each conversion of candidate N: an instance proves the three facts of\n`Eliminator` and reads its contract here. It does not establish `checker-monotone`, or anything\nthat tsgo accepts. It says that no admitted program moves at the converted rule, and it says\nnothing of another rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_laws","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    And\n      (∀ {t : Effect4.Program.Ty} {a : α},\n        Eq (rule t) (Option.some a) → Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a))\n      (And\n        (∀ {t : Effect4.Program.Ty},\n          Eq (rule t) Option.none →\n            Eq (Effect4.Program.UnionRule.extend rule t) (Effect4.Program.UnionRule.liftOne rule t))\n        (And\n          (Exists fun a =>\n            And\n              (Eq (Effect4.Program.UnionRule.extend rule Effect4.Program.Ty.never) (Option.some a))\n              (∀ (b : α), inst_1.le a b))\n          (And\n            (∀ {t : Effect4.Program.Ty} {a : α},\n              Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n                And (Eq (t.subN (C a)) Bool.true)\n                  (∀ (b : α), Iff (inst_1.le a b) (Eq (t.subN (C b)) Bool.true)))\n            (∀ {t : Effect4.Program.Ty},\n              Eq (rule t) Option.none →\n                instLTNat.lt 1 t.normalize.members.length →\n                  Eq (Effect4.Program.UnionRule.extend rule t) Option.none))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.extend_adjoint"]},"doc":"**A converted eliminator answers the least.** Each `b` with the target below `C b` is above\nthe extended rule's answer. A part of the claim `union-rule-extend`. Its consumers are\n`Eliminator.extend_mono`, and a type that a printer writes at a call, which must be above the\nanswer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_least","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a b : α},\n      Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n        Eq (t.subN (C b)) Bool.true → inst_1.le a b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":38,"nearest":["Effect4.Program.UnionRule.Eliminator.extend_upper","Effect4.Program.UnionRule.Eliminator.lift_least","Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.Eliminator.lift_upper","Effect4.Program.UnionRule.Eliminator.extend_least","Effect4.Program.UnionRule.Eliminator.liftOne_isSome_iff","Effect4.Program.UnionRule.Eliminator.extend_isSome_iff","Effect4.Program.UnionRule.Eliminator.liftOne_answers","Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"**The raw answer is a matter of spelling, where the member rule answers at one union\nmember.** Fix a target, and let its normal form have at most one union member wherever the\nmember rule answers at it. Then the extended rule and the guarded rule answer at the target\ntogether, and their answers are each below the other. So the removal of the raw answer changes\nno verdict at such a rule, and it changes an answer up to the order only. A part of the claim\n`union-rule-extend`. Its consumer is that removal (decisions row 294), at each converted\nrule whose member rule has the premise: `Member.fiber_one`\n(`src/Effect4/Laws/Program/Eliminators.lean`). It does not say that a later rule of the checker\nreads the two answers alike: an atom's scheme does not. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_liftOne","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty},\n      (∀ {a : α}, Eq (rule t) (Option.some a) → instLENat.le t.normalize.members.length 1) →\n        And\n          (∀ {a : α},\n            Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n              Exists fun a' =>\n                And (Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a'))\n                  (And (inst_1.le a a') (inst_1.le a' a)))\n          (∀ {a' : α},\n            Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a') →\n              Exists fun a =>\n                And (Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a))\n                  (And (inst_1.le a a') (inst_1.le a' a)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.extend_least","Effect4.Program.UnionRule.Eliminator.extend_isSome_iff","Effect4.Program.UnionRule.Eliminator.extend_upper","Effect4.Program.Ty.subN_trans"]},"doc":"**What a converted eliminator keeps of the monotone law.** Take a target `s` below a target\n`t` in the checker's order, and let the normal form of `s` have at most one union member. Where\nthe extended rule answers `b` at `t`, it answers at `s`, and its answer is below `b`. Without\nthe premise on `s` the law is false: a proper union below a fiber type is refused\n(`Test/Program/Eliminators.lean`). A part of the claim `union-rule-extend`. Its\nconsumer is the proposed claim `checker-monotone` at a converted rule, where a smaller type is\n`never` or one union member. It does not establish `checker-monotone`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {s t : Effect4.Program.Ty},\n      Eq (s.subN t) Bool.true →\n        instLENat.le s.normalize.members.length 1 →\n          ∀ {b : α},\n            Eq (Effect4.Program.UnionRule.extend rule t) (Option.some b) →\n              Exists fun a =>\n                And (Eq (Effect4.Program.UnionRule.extend rule s) (Option.some a)) (inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":38,"nearest":["Effect4.Program.UnionRule.Eliminator.extend_adjoint"]},"doc":"**The upper form of a converted eliminator.** A target that the extended rule answers at `a`\nis below `C a`, in the checker's order. It takes the place of the equation of a by-shape rule:\na use site moves a value of the target up by `fits_subN`. A part of the claim\n`union-rule-extend`. Its consumer is the upper form at each converted rule: `fiberTy_upper`\n(`src/Effect4/Laws/Program/Eliminators.lean`). The inequality is false in raw `Ty.sub`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.extend_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) → Eq (t.subN (C a)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":39,"nearest":["Effect4.Program.UnionRule.Eliminator.lift_least","Effect4.Program.UnionRule.Eliminator.lift_upper","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.Eliminator.adjoint","Effect4.Program.UnionRule.liftOne_eq_some_iff"]},"doc":"**Where the member rule answers at a raw type.** Let the member rule of an eliminator answer\n`a` at a type that need not be normal. The guarded rule answers there, with an answer that is\nabove `a` and below `a`, exactly when the type's normal form has at most one union member. That\ncondition is the exact member premise: the three facts of `Eliminator` do not give it. A\nconstructor whose normal form distributes over a union fails it, and a product is one\n(`Test/Program/Eliminators.lean`). A step of the claim `union-rule-extend`. Its\nconsumer is `Eliminator.extend_liftOne`. It gives no equation: the answer's spelling can\nchange, which is why the extended rule keeps the raw answer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.liftOne_answers","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (rule t) (Option.some a) →\n        Iff\n          (Exists fun a' =>\n            And (Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a'))\n              (And (inst_1.le a a') (inst_1.le a' a)))\n          (instLENat.le t.normalize.members.length 1)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_eq_some_iff","Effect4.Program.UnionRule.Eliminator.adjoint"]},"doc":"**Where a guarded eliminator answers.** It answers exactly at a target whose normal form has\nat most one union member and that is below some `C b`. It is the first half of\n`Eliminator.adjoint` under the guard: the guard removes the proper unions and nothing else. A\nstep of the claim `union-rule-extend`. Its consumers are\n`Eliminator.extend_isSome_iff` and `Eliminator.extend_liftOne`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.liftOne_isSome_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ (t : Effect4.Program.Ty),\n      Iff (Eq (Effect4.Program.UnionRule.liftOne rule t).isSome Bool.true)\n        (And (instLENat.le t.normalize.members.length 1)\n          (Exists fun b => Eq (t.subN (C b)) Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_eq_some_iff","Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.Eliminator.lift_mono"]},"doc":"**What the guard keeps of the monotone law.** Take a target `s` below a target `t` in the\nchecker's order, and let the normal form of `s` have at most one union member. Where the guarded\nrule answers `b` at `t`, it answers at `s`, and its answer is below `b`. Without the premise on\n`s` the law is false: a proper union below a fiber type is refused\n(`Test/Program/Eliminators.lean`). A step of the claim `union-rule-extend`. Its\nconsumer is the proposed claim `checker-monotone` at a converted rule once its raw answer goes.\nIt does not establish `checker-monotone`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.liftOne_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {s t : Effect4.Program.Ty},\n      Eq (s.subN t) Bool.true →\n        instLENat.le s.normalize.members.length 1 →\n          ∀ {b : α},\n            Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some b) →\n              Exists fun a =>\n                And (Eq (Effect4.Program.UnionRule.liftOne rule s) (Option.some a)) (inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":39,"nearest":["Effect4.Program.UnionRule.lift_least"]},"doc":"**The lifted eliminator answers the least.** Each `b` with the target below `C b` is above\nthe lifted answer. A part of the claim `union-rule-lift`. Its consumer is a type that a printer\nwrites at a call: it must be above the lifted answer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.lift_least","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a b : α},\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n        Eq (t.subN (C b)) Bool.true → inst_1.le a b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.Eliminator.monotone","Effect4.Program.UnionRule.lift_mono"]},"doc":"**The lifted eliminator is monotone.** A smaller target has an answer where a larger one\nhas, and the answer is smaller. A part of the claim `union-rule-lift`. Its consumer is\n`checker-monotone` at each converted rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.lift_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {s t : Effect4.Program.Ty},\n      Eq (s.subN t) Bool.true →\n        ∀ {b : α},\n          Eq (Effect4.Program.UnionRule.lift rule t) (Option.some b) →\n            Exists fun a =>\n              And (Eq (Effect4.Program.UnionRule.lift rule s) (Option.some a)) (inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":39,"nearest":["Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.lift_upper"]},"doc":"**The upper form of an eliminator.** A target that the lifted rule answers at `a` is below\n`C a`, in the checker's order. It takes the place of the equation that a by-shape rule has\ntoday, such as `fiberTy_eq_some` (`src/Effect4/Laws/Program/Typed/Membership.lean`): a use site\nmoves a value of the target up by `fits_subN`. A part of the claim `union-rule-lift`. Its\nconsumer is each conversion of candidate N. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.lift_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C →\n    ∀ {t : Effect4.Program.Ty} {a : α},\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) → Eq (t.subN (C a)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":40,"nearest":["Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.below_of_upper"]},"doc":"The eliminator of one constructor is monotone in the order: the premise of `lift_mono`. A\npart of the claim `union-rule-lift`. Its consumer is `Eliminator.lift_mono`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.Eliminator.monotone","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Eliminator rule C → Effect4.Program.UnionRule.Below rule rule","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":41,"nearest":["Effect4.Program.UnionRule.lift_transfer"]},"doc":"**Soundness transfer.** Take a membership relation that reads a union, a member rule that\nanswers a type, and an operation on values. Let the member rule be sound against the relation at\neach normal union member: the operation answers a value that fits the member rule's answer.\nThen the lifted rule is sound against the relation at the target. A part of the claim\n`union-rule-lift`, as `lift_transfer` at one property. Its consumers are the four record\ntheorems: `RecordChecks.fieldType` and `RecordChecks.setType`\n(`src/Effect4/Laws/Program/Typed.lean`), `record_fieldType_fits` and `record_setType_fits`\n(`src/Effect4/Laws/Program/Typed/RecordOperations.lean`). It is conditional on the member rule's\nown law, and it says nothing of a host. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.ReadsUnion.lift_sound","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {V : Type} {M : V → Effect4.Program.Ty → Prop},\n  Effect4.Program.UnionRule.ReadsUnion M →\n    ∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty} {op : V → Option V},\n      (∀ {m a : Effect4.Program.Ty} {v : V},\n          m.Normal →\n            Eq m.isMember Bool.true →\n              Eq (rule m) (Option.some a) →\n                M v m → Exists fun out => And (Eq (op v) (Option.some out)) (M out a)) →\n        ∀ {t a : Effect4.Program.Ty} {v : V},\n          Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n            M v t → Exists fun out => And (Eq (op v) (Option.some out)) (M out a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":80,"lemmas":175,"nearest":["Effect4.Program.Ty.subN_trans"]},"doc":"**`Below` from an upper map.** Take a member rule and a map `C` from answers into types.\nLet each normal union member that the rule answers be below `C` of its answer, and let that\nanswer be the least such. Let the rule read each normal union member that is below some `C b`.\nThen the member rule is monotone in the order: `Below rule rule`. A part of the claim\n`union-rule-lift`. Its consumers are `Eliminator.monotone`, and a rule that reads two heads, such\nas the cause rule `causeInputError?` (`src/Effect4/Program/NativeAtom.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.below_of_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  (∀ {m : Effect4.Program.Ty} {a : α},\n      m.Normal →\n        Eq m.isMember Bool.true → Eq (rule m) (Option.some a) → Eq (m.subN (C a)) Bool.true) →\n    (∀ {m : Effect4.Program.Ty} {a b : α},\n        m.Normal →\n          Eq m.isMember Bool.true →\n            Eq (rule m) (Option.some a) → Eq (m.subN (C b)) Bool.true → inst_1.le a b) →\n      (∀ {m : Effect4.Program.Ty} {b : α},\n          m.Normal →\n            Eq m.isMember Bool.true →\n              Eq (m.subN (C b)) Bool.true → Exists fun a => Eq (rule m) (Option.some a)) →\n        Effect4.Program.UnionRule.Below rule rule","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":59,"nearest":[]},"doc":"The join of two closed types is closed: the join is the normal form of their union, and a\nnormal form keeps closedness (`Ty.closed_normalize`). A step of `lift_closed` and\n`lift_closed_pair`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.closed_join","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a b : Effect4.Program.Ty},\n  Eq a.closed Bool.true → Eq b.closed Bool.true → Eq (a.join b).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_eq_some_iff"]},"doc":"The full fallback keeps each raw answer. Consumer: each classifier's raw constructor law. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_agrees","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty} {a : α},\n  Eq (rule t) (Option.some a) → Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_closed","Effect4.Program.UnionRule.extendAll_eq_some_iff"]},"doc":"Closed types survive the full fallback. Consumer: the list and cause closed-type laws. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty},\n  (∀ {m a : Effect4.Program.Ty},\n      Eq m.closed Bool.true → Eq (rule m) (Option.some a) → Eq a.closed Bool.true) →\n    ∀ {t a : Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n        Eq t.closed Bool.true → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_closed_pair","Effect4.Program.UnionRule.extendAll_eq_some_iff"]},"doc":"Closed columns survive the full fallback. Consumer: the fiber and exit closed-type laws. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_closed_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option (Prod Effect4.Program.Ty Effect4.Program.Ty)},\n  (∀ {m : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      Eq m.closed Bool.true →\n        Eq (rule m) (Option.some a) → And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)) →\n    ∀ {t : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a) →\n        Eq t.closed Bool.true → And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":[]},"doc":"The two alternatives of the full fallback. Consumer: the upper and closed laws below. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_eq_some_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty} {a : α},\n  Iff (Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a))\n    (Or (Eq (rule t) (Option.some a))\n      (And (Eq (rule t) Option.none) (Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_never","Effect4.Program.UnionRule.extendAll_refused"]},"doc":"The full fallback answers bottom where the raw rule refuses bottom. Consumer: its contract. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_never","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α},\n  Eq (rule Effect4.Program.Ty.never) Option.none →\n    Eq (Effect4.Program.UnionRule.extendAll rule Effect4.Program.Ty.never) (Option.some inst.bot)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.extendAll_eq_some_iff","Effect4.Program.UnionRule.extendAll_agrees","Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"Every guarded answer survives with its exact spelling. Consumer: `Eliminator.extendAll_laws` and the classifier widening receipt. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_of_extend","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty} {a : α},\n  Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n    Eq (Effect4.Program.UnionRule.extendAll rule t) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":[]},"doc":"The full fallback is the lift where the raw rule refuses. Consumer: its bottom law. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extendAll_refused","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty},\n  Eq (rule t) Option.none →\n    Eq (Effect4.Program.UnionRule.extendAll rule t) (Effect4.Program.UnionRule.lift rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"**Agreement.** Where the member rule answers at a raw target, the extended rule answers\nthere, with the same answer. So a conversion to the extended rule refuses no target that the\nby-shape function answered, and it changes no answer: no admitted program moves at this rule. A\npart of the claim `union-rule-extend`. Its consumers are `Eliminator.extend_laws`, and\neach converted rule at a raw type of its constructor: `fiberTy_fiberOf`\n(`src/Effect4/Laws/Program/Eliminators.lean`). It says nothing of a rule of the checker that\nreads the same type through another function. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_agrees","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty} {a : α},\n  Eq (rule t) (Option.some a) → Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.lift_closed","Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"**A converted rule keeps closed types closed.** Take a member rule that answers a type.\nAt each closed type that it answers, let its answer be closed. Then the extended rule answers a\nclosed type at each closed target. The member rule's own answer is closed by the premise, and the\nguarded rule's answer by `lift_closed`. A part of the claim `union-rule-extend`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty},\n  (∀ {m a : Effect4.Program.Ty},\n      Eq m.closed Bool.true → Eq (rule m) (Option.some a) → Eq a.closed Bool.true) →\n    ∀ {t a : Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n        Eq t.closed Bool.true → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_some","Effect4.Program.UnionRule.lift_closed_pair","Effect4.Program.UnionRule.extend_eq_some_iff"]},"doc":"**A converted rule keeps closed types closed, at a pair.** Take a member rule that answers\ntwo types. At each closed type that it answers, let both types of its answer be closed. Then the\nextended rule answers two closed types at each closed target. The member rule's own answer is\nclosed by the premise, and the guarded rule's answer by `lift_closed_pair`. A part of the\nclaim `union-rule-extend`. Its consumer is the fiber case of the claim\n`checked-types-closed`: `closed_fiberTy` (`src/Effect4/Laws/Program/Typing/Closed.lean`). A rule\nthat answers one type has the same law from `lift_closed`. It is stated with its first\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_closed_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option (Prod Effect4.Program.Ty Effect4.Program.Ty)},\n  (∀ {m : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      Eq m.closed Bool.true →\n        Eq (rule m) (Option.some a) → And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)) →\n    ∀ {t : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a) →\n        Eq t.closed Bool.true → And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":[]},"doc":"**The extended rule, as one fact.** It answers `a` at a target exactly when the member rule\nanswers `a` there, or the member rule refuses the target and the guarded rule answers `a`. It\nis the whole meaning of the definition. A step of the claim `union-rule-extend`. Its\nconsumers are the laws of this section, and each law of a converted rule that is proved by its\ntwo alternatives. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_eq_some_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty} {a : α},\n  Iff (Eq (Effect4.Program.UnionRule.extend rule t) (Option.some a))\n    (Or (Eq (rule t) (Option.some a))\n      (And (Eq (rule t) Option.none)\n        (Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_never","Effect4.Program.UnionRule.extend_refused"]},"doc":"**The extended rule at `never`.** A member rule that refuses `never` extends to a rule that\nanswers the least answer there. `never` is no union member, so a by-shape function refuses it.\nA part of the claim `union-rule-extend`. Its consumers are `Eliminator.extend_bot`, and\na hole that is declared at `never` under a converted rule (`Test/Program/Eliminators.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_never","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α},\n  Eq (rule Effect4.Program.Ty.never) Option.none →\n    Eq (Effect4.Program.UnionRule.extend rule Effect4.Program.Ty.never) (Option.some inst.bot)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":[]},"doc":"**Where the member rule refuses, the extended rule is the guarded rule.** A part of the\nclaim `union-rule-extend`. Its consumers are `extend_never` and `extend_two`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_refused","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty},\n  Eq (rule t) Option.none →\n    Eq (Effect4.Program.UnionRule.extend rule t) (Effect4.Program.UnionRule.liftOne rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_two","Effect4.Program.UnionRule.extend_refused"]},"doc":"**The extended rule keeps the refusal at a proper union.** Where the member rule refuses a\ntarget whose normal form has two union members or more, the extended rule refuses it. A part of\nthe claim `union-rule-extend`: the refusal that decisions row 292 keeps. Its consumer\nis `Eliminator.extend_laws`. The premise on the member rule is needed: a member rule can answer\nat a raw type whose normal form is a proper union, and a product is such a type. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.extend_two","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty},\n  Eq (rule t) Option.none →\n    instLTNat.lt 1 t.normalize.members.length →\n      Eq (Effect4.Program.UnionRule.extend rule t) Option.none","status":"proved"},{"axioms":[],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A property that the join of two answers with it has holds of the fold, where the start and\nevery listed answer have it. The general form of `joinAll_all`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {Q : α → Prop},\n  (∀ {a b : α}, Q a → Q b → Q (inst.join a b)) →\n    ∀ (answers : List α) (acc : α),\n      Q acc →\n        (∀ (a : α), List.instMembership.mem answers a → Q a) → Q (List.foldl inst.join acc answers)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":38,"nearest":["Effect4.Program.Ty.normalize_idem"]},"doc":"A fold of joins from a normal start is its own normal form: each step is a join. The general\nform of `joinAll_normalize`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_join_normalize","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (types : List Effect4.Program.Ty) (acc : Effect4.Program.Ty),\n  Eq acc.normalize acc →\n    Eq (List.foldl Effect4.Program.Ty.join acc types).normalize\n      (List.foldl Effect4.Program.Ty.join acc types)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":[]},"doc":"A fold of pair joins is the fold of joins in each part. A step of `lift_union_eq_pair` and\nof `lift_unique_pair`, its two consumers. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_join_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (types : List (Prod Effect4.Program.Ty Effect4.Program.Ty))\n  (acc : Prod Effect4.Program.Ty Effect4.Program.Ty),\n  Eq (List.foldl Effect4.Program.UnionRule.instAnswerProd.join acc types)\n    { fst := List.foldl Effect4.Program.Ty.join acc.fst (List.map Prod.fst types),\n      snd := List.foldl Effect4.Program.Ty.join acc.snd (List.map Prod.snd types) }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.foldl_join_start","Effect4.Program.UnionRule.foldl_join_pair"]},"doc":"A fold of pair joins from a normal start is the join of the start with the fold from the\nleast answer: `foldl_join_start` in each part. A step of `lift_unique_pair`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_join_pair_start","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (types : List (Prod Effect4.Program.Ty Effect4.Program.Ty))\n  (acc : Prod Effect4.Program.Ty Effect4.Program.Ty),\n  Eq acc.fst.normalize acc.fst →\n    Eq acc.snd.normalize acc.snd →\n      Eq (List.foldl Effect4.Program.UnionRule.instAnswerProd.join acc types)\n        (Effect4.Program.UnionRule.instAnswerProd.join acc\n          (List.foldl Effect4.Program.UnionRule.instAnswerProd.join\n            Effect4.Program.UnionRule.instAnswerProd.bot types))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":148,"nearest":["Effect4.Program.UnionRule.join_normalize_right","Effect4.Program.Ty.normalize_idem"]},"doc":"A fold of joins from a normal start is the join of the start with the fold from `never`: the\njoin is associative, and `never` is its unit up to the normal form. It relates the fold of\n`joinAll`, which starts at the left, to a rule that joins a union's head with its rest. A step\nof `lift_unique`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_join_start","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (types : List Effect4.Program.Ty) (acc : Effect4.Program.Ty),\n  Eq acc.normalize acc →\n    Eq (List.foldl Effect4.Program.Ty.join acc types)\n      (acc.join (List.foldl Effect4.Program.Ty.join Effect4.Program.Ty.never types))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A property that the join keeps on each side passes from the start or from one listed answer\nto the fold. The general form of `joinAll_keeps`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.foldl_keeps","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {Q : α → Prop},\n  (∀ (a b : α), Q a → Q (inst.join a b)) →\n    (∀ (a b : α), Q b → Q (inst.join a b)) →\n      ∀ (answers : List α) (acc : α),\n        Or (Q acc) (Exists fun a => And (List.instMembership.mem answers a) (Q a)) →\n          Q (List.foldl inst.join acc answers)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Program.UnionRule.foldl_all"]},"doc":"**A property that the least answer has, and that the join of two answers with it has, holds\nof the join of a list whose every answer has it.** A step of `lift_all` and of `joinAll_le`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.joinAll_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {Q : α → Prop},\n  Q inst.bot →\n    (∀ {a b : α}, Q a → Q b → Q (inst.join a b)) →\n      ∀ {answers : List α},\n        (∀ (a : α), List.instMembership.mem answers a → Q a) →\n          Q (Effect4.Program.UnionRule.joinAll answers)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Program.UnionRule.foldl_keeps"]},"doc":"**A property that the join keeps on each side passes from one listed answer to the join of\nthe list.** With membership of a value as the property, a value that fits one branch's answer\nfits the joined answer. A step of `lift_transfer` and of `le_joinAll`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.joinAll_keeps","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {Q : α → Prop},\n  (∀ (a b : α), Q a → Q (inst.join a b)) →\n    (∀ (a b : α), Q b → Q (inst.join a b)) →\n      ∀ {answers : List α} {a : α},\n        List.instMembership.mem answers a → Q a → Q (Effect4.Program.UnionRule.joinAll answers)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":3,"lemmas":2,"nearest":["Effect4.Program.UnionRule.joinAll_all"]},"doc":"The join of a list is below each answer that is above every listed answer: it is a least\nupper bound. A step of `lift_mono` and `lift_least`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.joinAll_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {answers : List α} {b : α},\n  (∀ (a : α), List.instMembership.mem answers a → inst_1.le a b) →\n    inst_1.le (Effect4.Program.UnionRule.joinAll answers) b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":62,"lemmas":37,"nearest":["Effect4.Program.UnionRule.foldl_join_normalize"]},"doc":"The join of a list of types is its own normal form. So a lifted rule that answers a type\nanswers a normal type. A step of `lift_union_eq`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.joinAll_normalize","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (types : List Effect4.Program.Ty),\n  Eq (Effect4.Program.UnionRule.joinAll types).normalize (Effect4.Program.UnionRule.joinAll types)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":38,"nearest":["Effect4.Program.Ty.normalize_idem"]},"doc":"The join reads its right side's normal form. A step of `foldl_join_start`, its one\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.join_normalize_right","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (a b : Effect4.Program.Ty), Eq (a.join b.normalize) (a.join b)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":4,"nearest":["Effect4.Program.UnionRule.joinAll_keeps"]},"doc":"Each listed answer is below the join of the list. A step of `lift_mono` and `lift_upper`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.le_joinAll","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {answers : List α} {a : α},\n  List.instMembership.mem answers a → inst_1.le a (Effect4.Program.UnionRule.joinAll answers)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_congr"]},"doc":"**The guarded rule reads the normal form.** Two types with one normal form have one answer.\nA step of the claim `union-rule-extend`, as `lift_congr` under the guard. Its consumers\nare the control that shows what the guarded rule alone answers at a raw fiber type\n(`Test/Program/Eliminators.lean`), and a converted rule once its raw answer goes. The extended\nrule does not have this law: it keeps the raw answer of its member rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_congr","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {s t : Effect4.Program.Ty},\n  Eq s.normalize t.normalize →\n    Eq (Effect4.Program.UnionRule.liftOne rule s) (Effect4.Program.UnionRule.liftOne rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":[]},"doc":"**The guarded rule is the lifted rule at one union member or none.** A step of the claim\n`union-rule-extend`. Its consumer is `liftOne_member`. It says nothing at a proper union:\n`liftOne_two` does. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_eq","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty},\n  instLENat.le t.normalize.members.length 1 →\n    Eq (Effect4.Program.UnionRule.liftOne rule t) (Effect4.Program.UnionRule.lift rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":[]},"doc":"**The guard, as one fact.** The guarded rule answers `a` at a target exactly when the\ntarget's normal form has at most one union member and the lifted rule answers `a` there. It is\nthe whole meaning of the guard. A step of the claim `union-rule-extend`. Its consumers\nare the laws of this section. It says nothing of a member rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_eq_some_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty} {a : α},\n  Iff (Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a))\n    (And (instLENat.le t.normalize.members.length 1)\n      (Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":62,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.UnionRule.liftOne_eq"]},"doc":"**The guarded rule at one normal union member is the member rule**, up to the join with the\nleast answer. A step of the claim `union-rule-extend`, as `lift_member` under the\nguard. Its consumers are the same control as `liftOne_congr`, and a converted rule at a raw type\nof its constructor once its raw answer goes. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_member","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty},\n  t.Normal →\n    Eq t.isMember Bool.true →\n      Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.map (inst.join inst.bot) (rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":[]},"doc":"**The guarded rule is total at `never`.** It answers the least answer, whatever the member\nrule is. A step of the claim `union-rule-extend`. Its consumer is `extend_never`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_never","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α),\n  Eq (Effect4.Program.UnionRule.liftOne rule Effect4.Program.Ty.never) (Option.some inst.bot)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":67,"lemmas":37,"nearest":["Effect4.Program.UnionRule.liftOne_eq_some_iff"]},"doc":"**The guarded rule implies the lifted rule's answer.** Each law whose premise is an answer\nof the lifted rule holds of the guarded rule through it: the transfer law, the closed types, the\nupper form and its least half. A step of the claim `union-rule-extend`. Its consumers\nare `Eliminator.extend_adjoint`, and the closed types of a converted rule (`lift_closed_pair`).\nThe converse fails at a proper union. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_some","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {rule : Effect4.Program.Ty → Option α}\n  {t : Effect4.Program.Ty} {a : α},\n  Eq (Effect4.Program.UnionRule.liftOne rule t) (Option.some a) →\n    Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":[]},"doc":"**The guarded rule refuses a proper union.** A target whose normal form has two union\nmembers or more has no answer, whatever the member rule is. A step of the claim\n`union-rule-extend`: the refusal that decisions row 292 keeps. Its consumer is `extend_two`. It\nis the guard's own refusal: the lifted rule can answer at such a target. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.liftOne_two","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty},\n  instLTNat.lt 1 t.normalize.members.length →\n    Eq (Effect4.Program.UnionRule.liftOne rule t) Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":["Effect4.Program.UnionRule.mapM_source","Effect4.Program.UnionRule.joinAll_all"]},"doc":"**Every member.** Take a property of answers that the least answer has, and that the join of\ntwo answers with it has. Where the member rule's answer has it at each union member of the\ntarget's normal form, the lifted answer has it. It differs from `lift_transfer`, whose property\nthe join keeps on one side: here the join needs both sides. A part of the claim\n`union-rule-lift`. Its consumers are `lift_closed` and `lift_closed_pair`. It reads no property\nof the target: an instance derives each member's property from the target's. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_all","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {Q : α → Prop},\n  Q inst.bot →\n    (∀ {a b : α}, Q a → Q b → Q (inst.join a b)) →\n      ∀ {rule : Effect4.Program.Ty → Option α} {t : Effect4.Program.Ty},\n        (∀ (m : Effect4.Program.Ty),\n            List.instMembership.mem t.normalize.members m →\n              ∀ {a : α}, Eq (rule m) (Option.some a) → Q a) →\n          ∀ {a : α}, Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) → Q a","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":75,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.UnionRule.lift_all"]},"doc":"**A lifted rule keeps closed types closed.** Take a member rule that answers a type. At each\nnormal union member that is closed, let its answer be closed. Then the lifted rule answers a\nclosed type at each closed target. `never` is closed, the join keeps closed types closed, and a\nclosed type has a closed normal form with closed union members (`Ty.closed_normalize`,\n`Ty.closed_members`). A part of the claim `union-rule-lift`, as `lift_all` at one property. Its\nconsumer is the record case of the claim `checked-types-closed`, and then the same case\nof each conversion. It proves the member rule's fact for no rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty},\n  (∀ {m a : Effect4.Program.Ty},\n      m.Normal →\n        Eq m.isMember Bool.true →\n          Eq m.closed Bool.true → Eq (rule m) (Option.some a) → Eq a.closed Bool.true) →\n    ∀ {t a : Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n        Eq t.closed Bool.true → Eq a.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":78,"lemmas":75,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.UnionRule.lift_all"]},"doc":"**A lifted rule keeps closed types closed, at a pair.** The form of `lift_closed` for a rule\nthat answers two types: both are closed. A part of the claim `union-rule-lift`. Its consumer is\nthe same case of a rule that reads a fiber type or an exit type, at its conversion. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_closed_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option (Prod Effect4.Program.Ty Effect4.Program.Ty)},\n  (∀ {m : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      m.Normal →\n        Eq m.isMember Bool.true →\n          Eq m.closed Bool.true →\n            Eq (rule m) (Option.some a) →\n              And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)) →\n    ∀ {t : Effect4.Program.Ty} {a : Prod Effect4.Program.Ty Effect4.Program.Ty},\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n        Eq t.closed Bool.true → And (Eq a.fst.closed Bool.true) (Eq a.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":[]},"doc":"**Normal form.** Two types with one normal form have one answer: the lifted rule reads the\nnormal form and nothing else of its target. A part of the claim `union-rule-lift`. Its consumer\nis each rule that compares a stated type with a type the checker produced. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_congr","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {s t : Effect4.Program.Ty},\n  Eq s.normalize t.normalize →\n    Eq (Effect4.Program.UnionRule.lift rule s) (Effect4.Program.UnionRule.lift rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_transfer","Effect4.Program.UnionRule.lift_mono","Effect4.Program.UnionRule.lift_congr","Effect4.Program.UnionRule.lift_member","Effect4.Program.UnionRule.lift_never"]},"doc":"**The claim `union-rule-lift`, as one statement**: its five parts of the brief, for one\nmember rule. The lifted rule answers the least answer at `never`. At a normal type that is one\nunion member it is the member rule, up to the join with the least answer. Two types with one\nnormal form have one answer. A member rule that is monotone in the order lifts to a monotone\nrule. A property of a value and an answer that the join keeps on each side passes from the\nunion members to the lifted rule. It is the pointer that the claim's row needs, and it adds\nnothing to its parts. `lift_all`, `lift_upper` and `lift_least` stand beside it. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_laws","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] (rule : Effect4.Program.Ty → Option α),\n  And (Eq (Effect4.Program.UnionRule.lift rule Effect4.Program.Ty.never) (Option.some inst.bot))\n    (And\n      (∀ {t : Effect4.Program.Ty},\n        t.Normal →\n          Eq t.isMember Bool.true →\n            Eq (Effect4.Program.UnionRule.lift rule t) (Option.map (inst.join inst.bot) (rule t)))\n      (And\n        (∀ {s t : Effect4.Program.Ty},\n          Eq s.normalize t.normalize →\n            Eq (Effect4.Program.UnionRule.lift rule s) (Effect4.Program.UnionRule.lift rule t))\n        (And\n          (Effect4.Program.UnionRule.Below rule rule →\n            ∀ {s t : Effect4.Program.Ty} {b : α},\n              Eq (s.subN t) Bool.true →\n                Eq (Effect4.Program.UnionRule.lift rule t) (Option.some b) →\n                  Exists fun a =>\n                    And (Eq (Effect4.Program.UnionRule.lift rule s) (Option.some a))\n                      (inst_1.le a b))\n          (∀ {V : Type} {In : V → Effect4.Program.Ty → Prop} {P : V → α → Prop},\n            (∀ {v : V} {t : Effect4.Program.Ty}, In v t → In v t.normalize) →\n              (∀ {v : V} {t : Effect4.Program.Ty},\n                  In v t → Exists fun m => And (List.instMembership.mem t.members m) (In v m)) →\n                (∀ {v : V} (a b : α), P v a → P v (inst.join a b)) →\n                  (∀ {v : V} (a b : α), P v b → P v (inst.join a b)) →\n                    (∀ {m : Effect4.Program.Ty} {a : α} {v : V},\n                        m.Normal →\n                          Eq m.isMember Bool.true → Eq (rule m) (Option.some a) → In v m → P v a) →\n                      ∀ {t : Effect4.Program.Ty} {a : α} {v : V},\n                        Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n                          In v t → P v a))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":82,"nearest":["Effect4.Program.Ty.subN_trans","Effect4.Program.UnionRule.mapM_source","Effect4.Program.UnionRule.joinAll_le"]},"doc":"**The upper form's answer is the least.** Take a member rule and a map `C` from answers into\ntypes. At each normal union member that the rule answers, let an answer `b` with the member\nbelow `C b` be above the rule's answer. Then the lifted rule's answer is below each `b` with the\ntarget below `C b`. A part of the claim `union-rule-lift`, with `lift_upper`: the lifted rule\nanswers the least `a` with the target below `C a`. Its consumer is the same conversion: a type\nwritten at a call must be above the lifted answer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_least","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  (∀ {m : Effect4.Program.Ty} {a b : α},\n      m.Normal →\n        Eq m.isMember Bool.true →\n          Eq (rule m) (Option.some a) → Eq (m.subN (C b)) Bool.true → inst_1.le a b) →\n    ∀ {t : Effect4.Program.Ty} {a b : α},\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) →\n        Eq (t.subN (C b)) Bool.true → inst_1.le a b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":71,"lemmas":62,"nearest":[]},"doc":"**One member.** At a normal type that is one union member, the lifted rule is the member\nrule, up to the join with the least answer. At the carrier `Ty` that join is the answer's normal\nform (`Ty.join_never`). A part of the claim `union-rule-lift`. Its consumers are\n`Record.fieldType_normal` and `Record.setType_normal`\n(`src/Effect4/Laws/Program/Typing/TermIntro.lean`). It says nothing at a union of two members. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_member","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α)\n  {t : Effect4.Program.Ty},\n  t.Normal →\n    Eq t.isMember Bool.true →\n      Eq (Effect4.Program.UnionRule.lift rule t) (Option.map (inst.join inst.bot) (rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":83,"lemmas":134,"nearest":["Effect4.Program.UnionRule.joinAll_le","Effect4.Program.UnionRule.le_joinAll","Effect4.Program.UnionRule.mapM_answer","Effect4.Program.UnionRule.mapM_total"]},"doc":"**Monotone.** Take two member rules with `Below lower upper`, and a target `s` below a target\n`t` in the checker's order. Where the lifted `upper` answers `b` at `t`, the lifted `lower`\nanswers at `s`, and its answer is below `b`. Each union member of the smaller normal form is\nbelow a union member of the larger one (`Ty.OrderProof.sub_iff_members`). A part of the claim\n`union-rule-lift`. Its consumer is `checker-monotone`: a field read at a smaller target, and an\noverwrite at a smaller target and a smaller value. It is conditional: it proves `Below` for no\nrule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {lower upper : Effect4.Program.Ty → Option α},\n  Effect4.Program.UnionRule.Below lower upper →\n    ∀ {s t : Effect4.Program.Ty},\n      Eq (s.subN t) Bool.true →\n        ∀ {b : α},\n          Eq (Effect4.Program.UnionRule.lift upper t) (Option.some b) →\n            Exists fun a =>\n              And (Eq (Effect4.Program.UnionRule.lift lower s) (Option.some a)) (inst_1.le a b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":37,"nearest":[]},"doc":"**Total at `never`.** `never` has no union member, so the lifted rule answers the least\nanswer, whatever the member rule is. A part of the claim `union-rule-lift`. It does not say that\na by-shape rule answers at `never`: `fiberTy` refuses it until its conversion. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_never","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] (rule : Effect4.Program.Ty → Option α),\n  Eq (Effect4.Program.UnionRule.lift rule Effect4.Program.Ty.never) (Option.some inst.bot)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":62,"nearest":["Effect4.Program.UnionRule.joinAll_keeps","Effect4.Program.UnionRule.mapM_answer"]},"doc":"**Transfer.** Take a relation `In` between values and types that reads the normal form and\nthe union members. Take a property `P` of a value and an answer that the join keeps on each\nside. Where the member rule gives `P` at each normal union member that the value fits, the\nlifted rule gives `P` at the target. A part of the claim `union-rule-lift`. Its consumer is\n`ReadsUnion.lift_sound`, and each rule whose answer is no type. It carries the property that it\nis given and no other: it says nothing of evaluation or of a target. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_transfer","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α] {V : Type}\n  {In : V → Effect4.Program.Ty → Prop} {P : V → α → Prop},\n  (∀ {v : V} {t : Effect4.Program.Ty}, In v t → In v t.normalize) →\n    (∀ {v : V} {t : Effect4.Program.Ty},\n        In v t → Exists fun m => And (List.instMembership.mem t.members m) (In v m)) →\n      (∀ {v : V} (a b : α), P v a → P v (inst.join a b)) →\n        (∀ {v : V} (a b : α), P v b → P v (inst.join a b)) →\n          ∀ {rule : Effect4.Program.Ty → Option α},\n            (∀ {m : Effect4.Program.Ty} {a : α} {v : V},\n                m.Normal → Eq m.isMember Bool.true → Eq (rule m) (Option.some a) → In v m → P v a) →\n              ∀ {t : Effect4.Program.Ty} {a : α} {v : V},\n                Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) → In v t → P v a","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":66,"nearest":["Effect4.Program.UnionRule.mapM_source","Effect4.Program.UnionRule.joinAll_le","Effect4.Program.UnionRule.le_joinAll","Effect4.Program.UnionRule.mapM_answer","Effect4.Program.UnionRule.mapM_total","Effect4.Program.UnionRule.members_union"]},"doc":"**Join.** Take a member rule that is monotone in the order: `Below rule rule`. The lifted\nrule answers at a union exactly when it answers at both sides: a refusal on either side refuses\nthe union. Where it answers, its answer at the union is the join of the two answers, up to the\norder: each is below the other. The premise is used at a member that the union's normal form\ndrops: it is below a kept member, so the rule answers it, below the kept member's answer. A part\nof the claim `union-rule-lift`. Its consumers are `lift_union_eq`, and each rule that reads the\njoin of two branch types. Without the premise the first half still holds one way, and the\nsecond fails (`Test/Program/UnionRule.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_union","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α},\n  Effect4.Program.UnionRule.Below rule rule →\n    ∀ (s t : Effect4.Program.Ty),\n      And\n        (∀ {a b : α},\n          Eq (Effect4.Program.UnionRule.lift rule s) (Option.some a) →\n            Eq (Effect4.Program.UnionRule.lift rule t) (Option.some b) →\n              Exists fun c =>\n                And (Eq (Effect4.Program.UnionRule.lift rule (s.union t)) (Option.some c))\n                  (And (inst_1.le c (inst.join a b)) (inst_1.le (inst.join a b) c)))\n        (∀ {c : α},\n          Eq (Effect4.Program.UnionRule.lift rule (s.union t)) (Option.some c) →\n            Exists fun a =>\n              Exists fun b =>\n                And (Eq (Effect4.Program.UnionRule.lift rule s) (Option.some a))\n                  (Eq (Effect4.Program.UnionRule.lift rule t) (Option.some b)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":80,"lemmas":130,"nearest":["Effect4.Program.UnionRule.joinAll_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_equiv_iff","Effect4.Program.UnionRule.lift_union_eq_of","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**Join, at the carrier `Ty`.** For a member rule that answers a type and is monotone in the\norder, the lifted rule at a union is the join of the lifted rule at the two sides, as an\nequation. Two normal types that are each below the other are one type (`Ty.subN_equiv_iff`), and\neach join is a normal type. A part of the claim `union-rule-lift`: `lift_union_eq_of` at a\ncarrier whose joins are canonical. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_union_eq","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option Effect4.Program.Ty},\n  Effect4.Program.UnionRule.Below rule rule →\n    ∀ (s t : Effect4.Program.Ty),\n      Eq (Effect4.Program.UnionRule.lift rule (s.union t))\n        ((Effect4.Program.UnionRule.lift rule s).bind fun a =>\n          Option.map a.join (Effect4.Program.UnionRule.lift rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":69,"lemmas":37,"nearest":["Effect4.Program.UnionRule.lift_union"]},"doc":"**Join, as an equation, at a carrier that says when two joins are equal.** `lift_union` gives\nthe join law up to the order: the answer at the union and the join of the two answers are each\nbelow the other. The premise `same` makes that an equation: a join of a list and a join of two\nanswers that are each below the other are equal. `Option` joins strictly. It is the one case\nanalysis of the three forms below: at a type, at a pair of types, and at a carrier whose order is\nantisymmetric. A part of the claim `union-rule-lift`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_union_eq_of","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α],\n  (∀ (cs : List α) (a b : α),\n      inst_1.le (Effect4.Program.UnionRule.joinAll cs) (inst.join a b) →\n        inst_1.le (inst.join a b) (Effect4.Program.UnionRule.joinAll cs) →\n          Eq (Effect4.Program.UnionRule.joinAll cs) (inst.join a b)) →\n    ∀ {rule : Effect4.Program.Ty → Option α},\n      Effect4.Program.UnionRule.Below rule rule →\n        ∀ (s t : Effect4.Program.Ty),\n          Eq (Effect4.Program.UnionRule.lift rule (s.union t))\n            ((Effect4.Program.UnionRule.lift rule s).bind fun a =>\n              Option.map (inst.join a) (Effect4.Program.UnionRule.lift rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":49,"lemmas":15,"nearest":["Effect4.Program.UnionRule.lift_union_eq_of"]},"doc":"**Join, at a carrier whose order is antisymmetric.** There the join law is an equation with\nno further fact: the canonical types are such a carrier, and so is a pair of them\n(`prod_antisymm`). A part of the claim `union-rule-lift`. Its readers are the battery's two\ninstances, at `CTy` and at a pair of `CTy` (`Test/Program/Order.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_union_eq_of_antisymm","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α],\n  (∀ (a b : α), inst_1.le a b → inst_1.le b a → Eq a b) →\n    ∀ {rule : Effect4.Program.Ty → Option α},\n      Effect4.Program.UnionRule.Below rule rule →\n        ∀ (s t : Effect4.Program.Ty),\n          Eq (Effect4.Program.UnionRule.lift rule (s.union t))\n            ((Effect4.Program.UnionRule.lift rule s).bind fun a =>\n              Option.map (inst.join a) (Effect4.Program.UnionRule.lift rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":82,"lemmas":136,"nearest":["Effect4.Program.UnionRule.joinAll_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.foldl_join_pair","Effect4.Program.Ty.subN_equiv_iff","Effect4.Program.UnionRule.lift_union_eq_of","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl"]},"doc":"**Join, at a pair of types.** The join law as an equation at the carrier of a rule that\nanswers two columns, as the fiber rule does: each part of each join is a normal type, so the\nequation holds part by part (decisions row 293, point 4). The checker's order on raw types is\nnot antisymmetric, so this is no case of `lift_union_eq_of_antisymm`\n(`Test/Program/Order.lean` has the control). A part of the claim `union-rule-lift`. Its first\nreader is the fiber rule's member rule, in the battery. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_union_eq_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule : Effect4.Program.Ty → Option (Prod Effect4.Program.Ty Effect4.Program.Ty)},\n  Effect4.Program.UnionRule.Below rule rule →\n    ∀ (s t : Effect4.Program.Ty),\n      Eq (Effect4.Program.UnionRule.lift rule (s.union t))\n        ((Effect4.Program.UnionRule.lift rule s).bind fun a =>\n          Option.map (Effect4.Program.UnionRule.instAnswerProd.join a)\n            (Effect4.Program.UnionRule.lift rule t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":70,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.lift_congr","Effect4.Program.UnionRule.foldl_join_start","Effect4.Program.UnionRule.mapM_cons_eq_some","Effect4.Program.UnionRule.normal_ofMembers"]},"doc":"**Uniqueness, at the carrier `Ty`.** Take a member rule that answers a type, and a map `f`\nfrom types to answers with four properties. It reads the normal form. It answers `never` at\n`never`. At a normal union member it is the member rule, up to the answer's normal form. At a\nnormal union of a union member `m` and a rest `r`, it is the join of its answers at `m` and at\n`r`, and a refusal on either side refuses. Then `f` is the lifted rule. The lifted rule has the\nfour properties (`lift_congr`, `lift_never`, `lift_member`, and `lift_union_eq` for a monotone\nmember rule), so it is the one map that has them. A part of the claim `union-rule-lift`. Its\nconsumer is each rule that reads a union by its own recursion: `Tuple.typeAt`\n(`src/Effect4/Program/Tuple.lean`) is one (`Test/Program/UnionRule.lean`), and each later\nconversion states one equation with no induction of its own. It asks the join at normal unions\nonly, so it needs no monotone member rule. At another carrier it is not stated: it would need\nthe carrier's joins to be associative as an equation. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_unique","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule f : Effect4.Program.Ty → Option Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty), Eq (f t) (f t.normalize)) →\n    Eq (f Effect4.Program.Ty.never) (Option.some Effect4.Program.Ty.never) →\n      (∀ {m : Effect4.Program.Ty},\n          m.Normal →\n            Eq m.isMember Bool.true → Eq (f m) (Option.map Effect4.Program.Ty.normalize (rule m))) →\n        (∀ {m r : Effect4.Program.Ty},\n            m.Normal →\n              Eq m.isMember Bool.true →\n                r.Normal →\n                  (m.union r).Normal →\n                    Eq (f (m.union r)) ((f m).bind fun a => Option.map a.join (f r))) →\n          ∀ (t : Effect4.Program.Ty), Eq (f t) (Effect4.Program.UnionRule.lift rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":75,"lemmas":83,"nearest":["Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.lift_congr","Effect4.Program.UnionRule.foldl_join_pair_start","Effect4.Program.UnionRule.mapM_cons_eq_some","Effect4.Program.UnionRule.normal_ofMembers"]},"doc":"**Uniqueness, at a pair of types.** A map from types to pairs of types with the four\nproperties of the lifted rule is the lifted rule: `lift_unique` at the carrier of a rule that\nanswers two columns (decisions row 293, point 4). A part of the claim `union-rule-lift`. Its\nproof follows `lift_unique` step for step, with each join read part by part. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_unique_pair","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {rule f : Effect4.Program.Ty → Option (Prod Effect4.Program.Ty Effect4.Program.Ty)},\n  (∀ (t : Effect4.Program.Ty), Eq (f t) (f t.normalize)) →\n    Eq (f Effect4.Program.Ty.never) (Option.some Effect4.Program.UnionRule.instAnswerProd.bot) →\n      (∀ {m : Effect4.Program.Ty},\n          m.Normal →\n            Eq m.isMember Bool.true →\n              Eq (f m)\n                (Option.map (fun p => { fst := p.fst.normalize, snd := p.snd.normalize })\n                  (rule m))) →\n        (∀ {m r : Effect4.Program.Ty},\n            m.Normal →\n              Eq m.isMember Bool.true →\n                r.Normal →\n                  (m.union r).Normal →\n                    Eq (f (m.union r))\n                      ((f m).bind fun a =>\n                        Option.map (Effect4.Program.UnionRule.instAnswerProd.join a) (f r))) →\n          ∀ (t : Effect4.Program.Ty), Eq (f t) (Effect4.Program.UnionRule.lift rule t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":82,"lemmas":148,"nearest":["Effect4.Program.UnionRule.le_joinAll","Effect4.Program.Ty.subN_trans","Effect4.Program.UnionRule.mapM_answer"]},"doc":"**Upper form.** Take a member rule and a map `C` from answers back into types that keeps the\norder. Let each normal union member that the rule answers be below `C` of its answer. Then a\ntarget that the lifted rule answers is below `C` of the answer, in the checker's order. With\n`fits_subN`, a value of the target is a value of `C a`. A part of the claim `union-rule-lift`.\nIts consumer is each conversion of a rule that reads one constructor: `fiberTy` first, in place\nof the equation `fiberTy_eq_some` (`src/Effect4/Laws/Program/Typed/Membership.lean`). The\ninequality is false in raw `Ty.sub` at a target that is not its own normal form\n(`Test/Program/UnionRule.lean`). It says nothing at an invariant constructor, and the record\nfield rule has no such `C`: the order has no width rule. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.lift_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.AnswerOrder α] {rule : Effect4.Program.Ty → Option α}\n  {C : α → Effect4.Program.Ty},\n  (∀ {a b : α}, inst_1.le a b → Eq ((C a).subN (C b)) Bool.true) →\n    (∀ {m : Effect4.Program.Ty} {a : α},\n        m.Normal →\n          Eq m.isMember Bool.true → Eq (rule m) (Option.some a) → Eq (m.subN (C a)) Bool.true) →\n      ∀ {t : Effect4.Program.Ty} {a : α},\n        Eq (Effect4.Program.UnionRule.lift rule t) (Option.some a) → Eq (t.subN (C a)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Program.UnionRule.mapM_cons_eq_some"]},"doc":"Each element of an answered list has its answer among the answers. A step of `lift_mono`,\n`lift_transfer` and `lift_upper`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.mapM_answer","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {β γ : Type} {f : β → Option γ} {xs : List β} {ys : List γ},\n  Eq (List.mapM f xs) (Option.some ys) →\n    ∀ (x : β),\n      List.instMembership.mem xs x →\n        Exists fun y => And (List.instMembership.mem ys y) (Eq (f x) (Option.some y))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A read of a list that is not empty answers its head and its tail. A step of the three laws\nof this section, its consumers. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.mapM_cons_eq_some","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {β γ : Type} {f : β → Option γ} {x : β} {xs : List β} {ys : List γ},\n  Iff (Eq (List.mapM f (List.cons x xs)) (Option.some ys))\n    (Exists fun y =>\n      Exists fun rest =>\n        And (Eq (f x) (Option.some y))\n          (And (Eq (List.mapM f xs) (Option.some rest)) (Eq ys (List.cons y rest))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Program.UnionRule.mapM_cons_eq_some"]},"doc":"Each answer is the answer of an element. A step of `lift_all` and `lift_least`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.mapM_source","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {β γ : Type} {f : β → Option γ} {xs : List β} {ys : List γ},\n  Eq (List.mapM f xs) (Option.some ys) →\n    ∀ (y : γ),\n      List.instMembership.mem ys y →\n        Exists fun x => And (List.instMembership.mem xs x) (Eq (f x) (Option.some y))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":["Effect4.Program.UnionRule.mapM_cons_eq_some"]},"doc":"A list whose every element is answered is answered, and a property of each element's answer\nholds of every answer. A step of `lift_mono`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.mapM_total","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {β γ : Type} {f : β → Option γ} {P : γ → Prop} {xs : List β},\n  (∀ (x : β), List.instMembership.mem xs x → Exists fun y => And (Eq (f x) (Option.some y)) (P y)) →\n    Exists fun ys =>\n      And (Eq (List.mapM f xs) (Option.some ys)) (∀ (y : γ), List.instMembership.mem ys y → P y)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":119,"nearest":[]},"doc":"The union members of a union's normal form are union members of the two sides' normal\nforms, and each union member of a side is below one of them. A normal form keeps maximal\nmembers only. A step of `lift_union`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.members_union","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (s t : Effect4.Program.Ty),\n  And\n    (∀ (k : Effect4.Program.Ty),\n      List.instMembership.mem (s.union t).normalize.members k →\n        Or (List.instMembership.mem s.normalize.members k)\n          (List.instMembership.mem t.normalize.members k))\n    (∀ (m : Effect4.Program.Ty),\n      Or (List.instMembership.mem s.normalize.members m)\n          (List.instMembership.mem t.normalize.members m) →\n        Exists fun k =>\n          And (List.instMembership.mem (s.union t).normalize.members k) (Eq (m.sub k) Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":57,"lemmas":47,"nearest":[]},"doc":"A list of normal union members in the row order, none below another, is the member list of\na normal type. A step of `lift_unique`, its one consumer: each tail of a normal union is\nnormal. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.normal_ofMembers","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {ms : List Effect4.Program.Ty},\n  (∀ (m : Effect4.Program.Ty), List.instMembership.mem ms m → m.Normal) →\n    (∀ (m : Effect4.Program.Ty), List.instMembership.mem ms m → Eq m.isMember Bool.true) →\n      Effect4.Ascending ms →\n        (∀ (x : Effect4.Program.Ty),\n            List.instMembership.mem ms x →\n              ∀ (y : Effect4.Program.Ty),\n                List.instMembership.mem ms y → Eq (x.sub y) Bool.true → Eq (y.sub x) Bool.true) →\n          (Effect4.Program.Ty.ofMembers ms).Normal","status":"proved"},{"axioms":[],"broughtIn":{"definitions":5,"lemmas":6,"nearest":[]},"doc":"The order of a pair of carriers is antisymmetric where the order of each part is. The pair's\norder is by component (`AnswerOrder`'s instance at a pair): no order instance of `Prod` is read.\nIts consumer is `lift_union_eq_of_antisymm` at a pair. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.prod_antisymm","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α β : Type} [inst : Effect4.Program.UnionRule.Answer α]\n  [inst_1 : Effect4.Program.UnionRule.Answer β] [inst_2 : Effect4.Program.UnionRule.AnswerOrder α]\n  [inst_3 : Effect4.Program.UnionRule.AnswerOrder β],\n  (∀ (a b : α), inst_2.le a b → inst_2.le b a → Eq a b) →\n    (∀ (a b : β), inst_3.le a b → inst_3.le b a → Eq a b) →\n      ∀ (x y : Prod α β),\n        Effect4.Program.UnionRule.instAnswerOrderProd.le x y →\n          Effect4.Program.UnionRule.instAnswerOrderProd.le y x → Eq x y","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":37,"nearest":[]},"doc":"**The checker's order on raw types is the order of canonical types**, read through\n`CTy.ofRaw`. It holds by definition. So each law of this module that is stated in `Ty.subN` is a\nlaw of the lattice of canonical types. Its consumer is `Eliminator.adjoint_le`. ","kind":"theorem","module":"Effect4.Laws.Program.UnionRule","name":"Effect4.Program.UnionRule.subN_iff_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (a b : Effect4.Program.Ty),\n  Iff (Eq (a.subN b) Bool.true)\n    (Effect4.Program.CTy.instLE.le (Effect4.Program.CTy.ofRaw a) (Effect4.Program.CTy.ofRaw b))","status":"proved"},{"axioms":[],"broughtIn":{"definitions":9,"lemmas":11,"nearest":[]},"doc":"**The variance semiring** (claim `variance-semiring`): join and composition form a commutative\nidempotent semiring with `bi` as zero and `co` as one, composition distributes over join, and\nthe order is a preorder whose join is `+`. A step of `instantiate-respects-polarity` (slice VAR-2)\nand of the row census (slice VAR-3). ","kind":"theorem","module":"Effect4.Laws.Program.Polarity","name":"Effect4.Program.Var4.semiring_laws","placement":{"concept":"subtyping-algebra","requirement":"R10"},"restsOn":[],"statement":"And (∀ (a b : Effect4.Program.Var4), Eq (instHAdd.hAdd a b) (instHAdd.hAdd b a))\n  (And\n    (∀ (a b c : Effect4.Program.Var4),\n      Eq (instHAdd.hAdd (instHAdd.hAdd a b) c) (instHAdd.hAdd a (instHAdd.hAdd b c)))\n    (And (∀ (a : Effect4.Program.Var4), Eq (instHAdd.hAdd a a) a)\n      (And (∀ (a : Effect4.Program.Var4), Eq (instHAdd.hAdd Effect4.Program.Var4.bi a) a)\n        (And (∀ (a b : Effect4.Program.Var4), Eq (instHMul.hMul a b) (instHMul.hMul b a))\n          (And\n            (∀ (a b c : Effect4.Program.Var4),\n              Eq (instHMul.hMul (instHMul.hMul a b) c) (instHMul.hMul a (instHMul.hMul b c)))\n            (And (∀ (a : Effect4.Program.Var4), Eq (instHMul.hMul Effect4.Program.Var4.co a) a)\n              (And\n                (∀ (a : Effect4.Program.Var4),\n                  Eq (instHMul.hMul Effect4.Program.Var4.bi a) Effect4.Program.Var4.bi)\n                (And\n                  (∀ (a b c : Effect4.Program.Var4),\n                    Eq (instHMul.hMul a (instHAdd.hAdd b c))\n                      (instHAdd.hAdd (instHMul.hMul a b) (instHMul.hMul a c)))\n                  (And (∀ (a : Effect4.Program.Var4), Eq (a.le a) Bool.true)\n                    (∀ (a b c : Effect4.Program.Var4),\n                      Eq ((instHAdd.hAdd a b).le c) ((a.le c).and (b.le c))))))))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"A fiber action has closed types. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.actionHasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv} {a : Effect4.Program.ActionTerm Op} {t : Effect4.Program.EffTy},\n      Conform.Effect4.Typing.ActionHasTy sig env a t →\n        Effect4.Program.ClosedEnv env →\n          Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.action a → t.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"The replacement law, at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.actionHasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {a : Effect4.Program.ActionTerm Op} {q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy}\n  {path : List Nat},\n  Conform.Effect4.Typing.ActionHasTy s env0 a T →\n    Eq ((Effect4.Program.Node.action a).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {a' : Effect4.Program.ActionTerm Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.action a).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.action a')) →\n                    Conform.Effect4.Typing.ActionHasTy s' env0 a' T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"A typed fiber action reads only its signature. A step of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.actionHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {a : Effect4.Program.ActionTerm Op} {t : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.ActionHasTy s env a t →\n    Effect4.Program.cata_action\n      (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n        (Effect4.Program.SigOkDef s))\n      a","status":"proved"},{"axioms":[],"broughtIn":{"definitions":14,"lemmas":0,"nearest":[]},"doc":"The address list of a program starts at the root. A step of `address-table`. Its consumer\nis `table_head`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.addresses_eff_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (p : Effect4.Program.Eff Op),\n  Exists fun rest => Eq (Effect4.Program.Node.eff p).addresses (List.cons List.nil rest)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":23,"lemmas":0,"nearest":[]},"doc":"`Node.addresses` is the path fold at `addressYield`, from the empty path. A step of\n`address-table`. Its consumer is `mem_addresses_iff`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.addresses_eq_foldList","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op),\n  Eq n.addresses (Effect4.Program.Node.foldList Effect4.Program.addressYield List.nil n)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":332,"lemmas":54,"nearest":["Effect4.Program.annotateModule_fill_layers","Effect4.Program.annotateModule_fill_main","Effect4.Program.annotateModule_fill_body","Effect4.Program.Eff.eq_defs_of_isBlock","Effect4.Program.annotateModule_fill_plain","Effect4.Program.Eff.partAt_plain"]},"doc":"**An edit inside one part splices a whole program's table**: the part's own table is spliced\nat its base, and the root's entry and the other parts' entries stay. A step of\n`module-table-splices`. Its consumer is `Sketch.table_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_fill","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p p' q' : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path rest : List Nat} {part : Effect4.Program.Part Op}\n  {f : Effect4.Program.Focus Op},\n  Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n    Eq (Effect4.Program.Eff.partAt s List.nil p path) (Option.some { fst := part, snd := rest }) →\n      Eq (Effect4.Program.focusAt part.sig part.env part.program rest) (Option.some f) →\n        Conform.Effect4.Typing.HasTy part.sig f.env q' f.ty →\n          Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n              (Option.some (Effect4.Program.Node.eff p')) →\n            Eq (Effect4.Program.annotateModule s (Except.ok T) p')\n              (Effect4.Program.Table.splice (Effect4.Program.annotateModule s (Except.ok T) p) path\n                (Effect4.Program.tableAt part.sig (Option.some (Effect4.Program.NodeEnv.env f.env))\n                  (Effect4.Program.Node.eff q') path))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":332,"lemmas":55,"nearest":["Effect4.Program.Table.splice_three","Effect4.Program.Annotate.checkLayers_eq","Effect4.Program.tableAt_path","Effect4.Program.Table.under_sibling_false","Effect4.Program.Annotate.check_eq","Effect4.Program.Table.bodies_mem_under","Effect4.Program.focusAt_eq_some","Effect4.Program.Table.bodies_splice","Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_partAt_typed","Effect4.Program.Node.replaceAt_defs_body"]},"doc":"**An edit inside one of a block's bodies splices the whole table.** A step of\n`module-table-splices`. Its consumer is `annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_fill_body","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {main p' q' : Effect4.Program.Eff Op}\n  {layers : Effect4.Program.LayerTerms Op} {T : Effect4.Program.EffTy} {r rest : List Nat}\n  {part : Effect4.Program.Part Op} {f : Effect4.Program.Focus Op},\n  Eq (Effect4.Program.Checker.checkModule s (Effect4.Program.Eff.defs decls bodies main layers))\n      (Except.ok T) →\n    Eq (Effect4.Program.Part.bodyAt (s.withDefs decls) decls bodies r)\n        (Option.some { fst := part, snd := rest }) →\n      Eq (Effect4.Program.focusAt part.sig part.env part.program rest) (Option.some f) →\n        Conform.Effect4.Typing.HasTy part.sig f.env q' f.ty →\n          Eq\n              ((Effect4.Program.Node.eff\n                    (Effect4.Program.Eff.defs decls bodies main layers)).replaceAt\n                (List.cons 0 r) (Effect4.Program.Node.eff q'))\n              (Option.some (Effect4.Program.Node.eff p')) →\n            Eq (Effect4.Program.annotateModule s (Except.ok T) p')\n              (Effect4.Program.Table.splice\n                (Effect4.Program.annotateModule s (Except.ok T)\n                  (Effect4.Program.Eff.defs decls bodies main layers))\n                (List.cons 0 r)\n                (Effect4.Program.tableAt part.sig (Option.some (Effect4.Program.NodeEnv.env f.env))\n                  (Effect4.Program.Node.eff q') (List.cons 0 r)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":338,"lemmas":61,"nearest":["Effect4.Program.Table.splice_append_out_left","Effect4.Program.Annotate.check_eq","Effect4.Program.tableAt_path","Effect4.Program.Table.under_sibling_false","Effect4.Program.Table.bodies_under","Effect4.Program.Annotate.checkLayers_eq","Conform.Effect4.Typing.check_sound","Effect4.Program.tableAt_splice","Effect4.Program.focusAt_eq_some","Effect4.Program.checkModule_sound"]},"doc":"**An edit inside one of a block's module layers splices the whole table** (decisions row\n341): the module layers' segment is the splice law's at the layer spine, at base `[2]`, and the\nroot's, the bodies' and the main program's entries stay. A step of `module-table-splices`. Its\nconsumer is `annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_fill_layers","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {main p' q' : Effect4.Program.Eff Op}\n  {head : Effect4.Program.LayerTerm Op} {tail : Effect4.Program.LayerTerms Op}\n  {T : Effect4.Program.EffTy} {r : List Nat} {f : Effect4.Program.Focus Op},\n  Eq\n      (Effect4.Program.Checker.checkModule s\n        (Effect4.Program.Eff.defs decls bodies main (Effect4.Program.LayerTerms.cons head tail)))\n      (Except.ok T) →\n    Eq\n        (Effect4.Program.focusAt (s.withDefs decls) List.nil\n          (Effect4.Program.Part.layersProgram (Effect4.Program.LayerTerms.cons head tail))\n          (List.cons 0 (List.cons 0 r)))\n        (Option.some f) →\n      Conform.Effect4.Typing.HasTy (s.withDefs decls) f.env q' f.ty →\n        Eq\n            ((Effect4.Program.Node.eff\n                  (Effect4.Program.Eff.defs decls bodies main\n                    (Effect4.Program.LayerTerms.cons head tail))).replaceAt\n              (List.cons 2 r) (Effect4.Program.Node.eff q'))\n            (Option.some (Effect4.Program.Node.eff p')) →\n          Eq (Effect4.Program.annotateModule s (Except.ok T) p')\n            (Effect4.Program.Table.splice\n              (Effect4.Program.annotateModule s (Except.ok T)\n                (Effect4.Program.Eff.defs decls bodies main\n                  (Effect4.Program.LayerTerms.cons head tail)))\n              (List.cons 2 r)\n              (Effect4.Program.tableAt (s.withDefs decls)\n                (Option.some (Effect4.Program.NodeEnv.env f.env)) (Effect4.Program.Node.eff q')\n                (List.cons 2 r)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":332,"lemmas":57,"nearest":["Effect4.Program.Table.splice_three","Effect4.Program.Annotate.checkLayers_eq","Effect4.Program.tableAt_path","Effect4.Program.Table.under_self","Effect4.Program.tableAt_mem_path","Effect4.Program.Table.under_sibling_false","Effect4.Program.Table.bodies_under","Effect4.Program.Annotate.check_eq","Conform.Effect4.Typing.check_sound","Effect4.Program.tableAt_splice","Effect4.Program.focusAt_eq_some","Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_partAt_typed","Effect4.Program.Node.replaceAt_defs_main"]},"doc":"**An edit inside a block's main program splices the whole table.** The splice law at the\nmain program's base `[1]`. A step of `module-table-splices`. Its consumer is\n`annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_fill_main","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {main p' q' : Effect4.Program.Eff Op}\n  {layers : Effect4.Program.LayerTerms Op} {T : Effect4.Program.EffTy} {r : List Nat}\n  {f : Effect4.Program.Focus Op},\n  Eq (Effect4.Program.Checker.checkModule s (Effect4.Program.Eff.defs decls bodies main layers))\n      (Except.ok T) →\n    Eq (Effect4.Program.focusAt (s.withDefs decls) List.nil main r) (Option.some f) →\n      Conform.Effect4.Typing.HasTy (s.withDefs decls) f.env q' f.ty →\n        Eq\n            ((Effect4.Program.Node.eff\n                  (Effect4.Program.Eff.defs decls bodies main layers)).replaceAt\n              (List.cons 1 r) (Effect4.Program.Node.eff q'))\n            (Option.some (Effect4.Program.Node.eff p')) →\n          Eq (Effect4.Program.annotateModule s (Except.ok T) p')\n            (Effect4.Program.Table.splice\n              (Effect4.Program.annotateModule s (Except.ok T)\n                (Effect4.Program.Eff.defs decls bodies main layers))\n              (List.cons 1 r)\n              (Effect4.Program.tableAt (s.withDefs decls)\n                (Option.some (Effect4.Program.NodeEnv.env f.env)) (Effect4.Program.Node.eff q')\n                (List.cons 1 r)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":329,"lemmas":54,"nearest":["Effect4.Program.Eff.ne_defs_of_isBlock","Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_sound","Effect4.Program.table_splice","Effect4.Program.annotate_eq_table","Effect4.Program.annotateModule_plain","Effect4.Program.Node.replaceAt_cons_isBlock","Effect4.Program.HasTy.isBlock"]},"doc":"**An edit inside a program with no block splices its table.** The splice law, through\n`annotate`. A step of `module-table-splices`. Its consumer is `annotateModule_fill`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_fill_plain","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p p' q' : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {f : Effect4.Program.Focus Op},\n  Eq p.isBlock Bool.false →\n    Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n      Eq (Effect4.Program.focusAt s List.nil p path) (Option.some f) →\n        Conform.Effect4.Typing.HasTy s f.env q' f.ty →\n          Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n              (Option.some (Effect4.Program.Node.eff p')) →\n            Eq (Effect4.Program.annotateModule s (Except.ok T) p')\n              (Effect4.Program.Table.splice (Effect4.Program.annotateModule s (Except.ok T) p) path\n                (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env f.env))\n                  (Effect4.Program.Node.eff q') path))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":54,"nearest":[]},"doc":"A program that is no block has `annotate`'s table. A step of `module-annotate-table` and of\n`module-table-splices`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.PartsTable","name":"Effect4.Program.annotateModule_plain","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op}\n  {root : Except Effect4.Program.TypeRefusal Effect4.Program.EffTy} {p : Effect4.Program.Eff Op},\n  Eq p.isBlock Bool.false →\n    Eq (Effect4.Program.annotateModule s root p) (Effect4.Program.annotate s List.nil p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":380,"lemmas":68,"nearest":["Effect4.Program.Table.moduleLayers_restrict","Effect4.Program.Table.bodies_restrict","Effect4.Program.Annotate.check_restrict"]},"doc":"**A whole program's table answers the same at an extension**, part by part, on a whole\nprogram that reads only the smaller signature. A step of `omit-splices-table`. Its consumer is\n`Sketch.table_more_holes`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.annotateModule_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ (root : Except Effect4.Program.TypeRefusal Effect4.Program.EffTy)\n      {e : Effect4.Program.Eff Op},\n      Effect4.Program.ModuleSigProgram s e →\n        Eq (Effect4.Program.annotateModule s' root e) (Effect4.Program.annotateModule s root e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":41,"nearest":["Effect4.Program.Tuple.closed_typeAt","Effect4.Program.Record.closed_setType","Effect4.Program.Record.closed_fieldType","Effect4.Program.Formation.closed_of_formed","Effect4.Program.Record.closed_check","Effect4.Program.closed_litArgTy"]},"doc":"**A term's type is closed**, at a closed signature and environment, when the types the term\nstates are. A variable has the environment's type, an atom's answer is the signature's, and a\nrecord's declaration is checked by the term typer itself. A list fold's type is its accumulator's:\nthe stated one, or the initial value's. A step of `hasTy_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.argTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      Effect4.Program.ClosedEnv env →\n        ∀ (const : Bool) (t : Effect4.Program.Term) {ty : Effect4.Program.Ty},\n          Effect4.Program.Formation.TermAll (fun t => Eq t.closed Bool.true) t →\n            Eq (Effect4.Program.argTy sig env const t) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":41,"nearest":["Effect4.Program.Tuple.closed_typeAt","Effect4.Program.Record.closed_setType","Effect4.Program.Record.closed_fieldType","Effect4.Program.Formation.closed_of_formed","Effect4.Program.Record.closed_check","Effect4.Program.closed_litArgTy"]},"doc":"`argTy_closed` at an argument list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.argsTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      Effect4.Program.ClosedEnv env →\n        ∀ (const : Bool) (ts : Effect4.Program.Terms) {tys : List Effect4.Program.Ty},\n          Effect4.Program.Formation.TermsAll (fun t => Eq t.closed Bool.true) ts →\n            Eq (Effect4.Program.argsTy sig env const ts) (Option.some tys) →\n              ∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → Eq t.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":196,"lemmas":52,"nearest":["Effect4.Program.hasTy_sigProgram"]},"doc":"Typed bodies read only their signature. A step of `omit-splices-table`. Its consumer is\n`moduleHasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.bodiesHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {decls : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op},\n  Effect4.Program.BodiesHasTy s decls bodies → Effect4.Program.BodiesSigProgram s decls bodies","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"**`causeInputError?` at a cause type**: today's answer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.causeInputError_causeOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (e : Effect4.Program.Ty), Eq (Effect4.Program.causeInputError? e.causeOf) (Option.some e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"**`causeInputError?` at an exit type**: today's answer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.causeInputError_exitOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (a e : Effect4.Program.Ty), Eq (Effect4.Program.causeInputError? (a.exitOf e)) (Option.some e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":130,"nearest":["Effect4.Program.Member.cause_upper","Effect4.Program.cause_mono","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.lift_upper","Effect4.Program.subN_causeOf_causeUpper","Effect4.Program.subN_exitOf_causeUpper","Effect4.Program.UnionRule.extendAll_eq_some_iff"]},"doc":"**The upper form of `causeInputError?`.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.causeInputError_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t error : Effect4.Program.Ty},\n  Eq (Effect4.Program.causeInputError? t) (Option.some error) →\n    Eq (t.subN (Effect4.Program.causeUpper error)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":125,"lemmas":38,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.termTy_closed"]},"doc":"A cause's error type is closed. A step of `hasTy_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.causeTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      Effect4.Program.ClosedEnv env →\n        ∀ (c : Effect4.Program.CauseTerm) {ty : Effect4.Program.Ty},\n          Effect4.Program.Formation.CauseAll (fun t => Eq t.closed Bool.true) c →\n            Eq (Effect4.Program.causeTy sig env c) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":126,"nearest":["Effect4.Program.Ty.subN_exitOf_iff","Effect4.Program.subN_causeOf_causeUpper","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_causeOf_iff"]},"doc":"`causeUpper` is monotonic in the error type. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.cause_mono","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a b : Effect4.Program.Ty},\n  Eq (a.subN b) Bool.true →\n    Eq ((Effect4.Program.causeUpper a).subN (Effect4.Program.causeUpper b)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":356,"lemmas":64,"nearest":["Effect4.Program.check_restrict"]},"doc":"The bodies' check is unchanged under an extension of the signature, when each body performs\nonly the smaller signature's operations. A step of `module-holes-conservative`. Its consumer is\n`checkModule_restrict`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.checkBodies_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ (p : List Nat) (decls : List Effect4.Program.DefDecl) (bodies : Effect4.Program.Effs Op),\n      Effect4.Program.BodiesSigProgram s decls bodies →\n        Eq (Effect4.Program.Checker.checkBodies s' p decls bodies)\n          (Effect4.Program.Checker.checkBodies s p decls bodies)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":298,"lemmas":73,"nearest":["Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_complete"]},"doc":"**G2's completeness, the claim `module-check`**: what the module judgment derives, the module\ncheck accepts. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.checkModule_complete","placement":{"concept":"initial-algebras-folds","requirement":"R1"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (t : Effect4.Program.EffTy),\n  Effect4.Program.ModuleHasTy sig e t → Eq (Effect4.Program.Checker.checkModule sig e) (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":355,"lemmas":54,"nearest":["Effect4.Program.defs_conservative"]},"doc":"**G1 at the root**: a module whose bodies and module layers the checker admits, and whose\nmain program invokes no definition, has its main program's own verdict at the main program's\npath, refusals included. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.checkModule_conservative","placement":{"concept":"initial-algebras-folds","requirement":"R2"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  (bodies : Effect4.Program.Effs Op) {main : Effect4.Program.Eff Op}\n  {layers : Effect4.Program.LayerTerms Op},\n  Eq decls.length bodies.toList.length →\n    Eq\n        (Effect4.Program.Checker.checkBodies (sig.withDefs decls) (List.cons 0 List.nil) decls\n          bodies)\n        (Except.ok Unit.unit) →\n      (Exists fun ls =>\n          Eq\n            (Effect4.Program.Checker.checkLayers (sig.withDefs decls) (List.cons 2 List.nil) layers)\n            (Except.ok ls)) →\n        Effect4.Program.NoInvocation sig main →\n          Eq\n            (Effect4.Program.Checker.checkModule sig\n              (Effect4.Program.Eff.defs decls bodies main layers))\n            (Effect4.Program.Checker.check sig List.nil (List.cons 1 List.nil) main)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":284,"lemmas":54,"nearest":[]},"doc":"A program with no block is checked as the checker checks it, at the root. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.checkModule_eq_check","placement":{"concept":"initial-algebras-folds","requirement":"R2"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) {e : Effect4.Program.Eff Op},\n  (∀ (decls : List Effect4.Program.DefDecl) (bodies : Effect4.Program.Effs Op)\n      (main : Effect4.Program.Eff Op) (layers : Effect4.Program.LayerTerms Op),\n      Ne e (Effect4.Program.Eff.defs decls bodies main layers)) →\n    Eq (Effect4.Program.Checker.checkModule sig e)\n      (Effect4.Program.Checker.check sig List.nil List.nil e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":284,"lemmas":54,"nearest":["Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_ext","Effect4.Program.checkModule_complete"]},"doc":"**The module check along an extension**: what it admits under a signature, it admits under\nevery extension, at the same type. A step of `Sketch.check_more_holes`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.checkModule_ext","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n      Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n        Eq (Effect4.Program.Checker.checkModule s' p) (Except.ok T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":286,"lemmas":54,"nearest":["Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_programCallAt"]},"doc":"**The claim `block-call-instance`.** On a program that the module check admits, the call\ninstance answers at every call, with the call's operation: inside a definition's body, in the\nmain program of a block, and in a program with no block. Before this law the session's call\ntable missed every call of a program with a block (seat HOST's probe, part B). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.checkModule_programCallAt","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {op : Op} {request : Effect4.Program.Term},\n  Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op request))) →\n      Exists fun c =>\n        And (Eq (Effect4.Program.programCallAt s List.nil p path) (Option.some c)) (Eq c.op op)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":286,"lemmas":54,"nearest":["Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_programFocusAt"]},"doc":"**At the module check: the focus answers at every address of a program inside a part.** ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.checkModule_programFocusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p q : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {i : Nat} {r : List Nat},\n  Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff p).at_ (List.cons i r))\n        (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          Eq (Effect4.Program.programFocusAt s List.nil p (List.cons i r))\n            (Option.some { program := q, env := env, ty := t })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":303,"lemmas":54,"nearest":["Effect4.Program.checkModule_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_replace_programFocusAt"]},"doc":"**At the module check: the replacement law over the parts.** The filling is checked at its\npart's signature, and not the program again. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.checkModule_replace_programFocusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op} {p q' : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {f : Effect4.Program.Focus Op}\n  {part' : Effect4.Program.Part Op} {rest' pq : List Nat},\n  Eq (Effect4.Program.Checker.checkModule s p) (Except.ok T) →\n    Eq (Effect4.Program.programFocusAt s List.nil p path) (Option.some f) →\n      Effect4.Program.SigExtends s s' →\n        Eq (Effect4.Program.Eff.partAt s' List.nil p path)\n            (Option.some { fst := part', snd := rest' }) →\n          Eq (Effect4.Program.Checker.check part'.sig f.env pq q') (Except.ok f.ty) →\n            Exists fun p' =>\n              And\n                (Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                  (Option.some (Effect4.Program.Node.eff p')))\n                (Eq (Effect4.Program.Checker.checkModule s' p') (Except.ok T))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":389,"lemmas":237,"nearest":["Effect4.Program.checkBodies_restrict","Effect4.Program.check_restrict"]},"doc":"**The module check is unchanged under an extension of the signature**, for a whole program\nthat performs only the smaller signature's operations: C3's restriction half (`check_restrict`)\nat the module check, definition blocks included. A step of `module-holes-conservative`. Its\nconsumer is `Sketch.check_filled_module`. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.checkModule_restrict","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {e : Effect4.Program.Eff Op},\n      Effect4.Program.ModuleSigProgram s e →\n        Eq (Effect4.Program.Checker.checkModule s' e) (Effect4.Program.Checker.checkModule s e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":294,"lemmas":143,"nearest":["Conform.Effect4.Typing.check_sound"]},"doc":"**G2's soundness, the claim `module-check`**: what the module check accepts, the module\njudgment derives. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.checkModule_sound","placement":{"concept":"initial-algebras-folds","requirement":"R1"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (e : Effect4.Program.Eff Op)\n  (t : Effect4.Program.EffTy),\n  Eq (Effect4.Program.Checker.checkModule sig e) (Except.ok t) → Effect4.Program.ModuleHasTy sig e t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":119,"lemmas":53,"nearest":[]},"doc":"**Where the row check answers, `rowBindings` answers its bindings**: the substitution that\ninstantiates the answer's two columns. A step of `call-instance-address`. Its consumer is the\ntyped print (slice PRINT, step P2), with `callAt_rowTy`.\n\nIt does not say that the bindings are unique, or what they bind where the row check refuses. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Call","name":"Effect4.Program.checkRow_rowBindings","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {row : Effect4.Program.Row} {r : Effect4.Program.Ty} {use : Option Effect4.Program.TermUse}\n  {t : Effect4.Program.EffTy},\n  Eq (Effect4.Program.checkRow row r use) (Except.ok t) →\n    Exists fun σ =>\n      And (Eq (Effect4.Program.rowBindings row r use) (Option.some σ))\n        (And (Eq t.answer (Effect4.Program.Ty.instantiate σ row.answer).normalize)\n          (Eq t.error (Effect4.Program.Ty.instantiate σ row.error).normalize))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":272,"lemmas":54,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.hasTy_focusAt"]},"doc":"**At the checker: the focus function answers at every address of a program** that the\nchecker admits. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.check_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv} {p0 : List Nat}\n  {p q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat},\n  Eq (Effect4.Program.Checker.check s env0 p0 p) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff p).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          Eq (Effect4.Program.focusAt s env0 p path)\n            (Option.some { program := q, env := env, ty := t })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":274,"lemmas":54,"nearest":["Effect4.Program.Node.replaceAt_eff","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.hasTy_replace"]},"doc":"**The law at the checker: the focus is checked, and not the program again.** A program that\nthe checker admits splits at an address into an environment and a type of the focus. For every\nprogram that the checker admits at that type in that environment, under every extension of the\nsignature, the replaced program exists, and the checker admits it at the whole's type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.check_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv} {p0 : List Nat}\n  {p q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat},\n  Eq (Effect4.Program.Checker.check s env0 p0 p) (Except.ok T) →\n    Eq ((Effect4.Program.Node.eff p).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (∀ (pq : List Nat), Eq (Effect4.Program.Checker.check s env pq q) (Except.ok t))\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op} {pq : List Nat},\n              Effect4.Program.SigExtends s s' →\n                Eq (Effect4.Program.Checker.check s' env pq q') (Except.ok t) →\n                  Exists fun p' =>\n                    And\n                      (Eq\n                        ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                        (Option.some (Effect4.Program.Node.eff p')))\n                      (∀ (p1 : List Nat),\n                        Eq (Effect4.Program.Checker.check s' env0 p1 p') (Except.ok T)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":283,"lemmas":54,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.hasTy_replace_focusAt","Conform.Effect4.Typing.check_complete","Effect4.Program.focusAt_typed","Effect4.Program.Node.replaceAt_eff"]},"doc":"**At the checker: the replacement law at the focus function's answer.** In a program that\nthe checker admits, take the focus that the function answers. For every program that the\nchecker admits at the focus's type in the focus's environment, under an extension of the\nsignature, the replaced program exists, and the checker admits it at the whole's type. The\nfocus is checked, and not the program again. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.check_replace_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv} {p0 : List Nat}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat}\n  {f : Effect4.Program.Focus Op},\n  Eq (Effect4.Program.Checker.check s env0 p0 p) (Except.ok T) →\n    Eq (Effect4.Program.focusAt s env0 p path) (Option.some f) →\n      ∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op} {pq : List Nat},\n        Effect4.Program.SigExtends s s' →\n          Eq (Effect4.Program.Checker.check s' f.env pq q') (Except.ok f.ty) →\n            Exists fun p' =>\n              And\n                (Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                  (Option.some (Effect4.Program.Node.eff p')))\n                (∀ (p1 : List Nat), Eq (Effect4.Program.Checker.check s' env0 p1 p') (Except.ok T))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":289,"lemmas":54,"nearest":[]},"doc":"The entries below a child are the child's table: the address, the environment and the node\neach take one step. A step of `annotate-table`. Its consumer is `tableAt_eq_cons`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.childAddresses_map_tableEntryAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ctx : Option Effect4.Program.NodeEnv)\n  (n : Effect4.Program.Node Op) (a : List Nat) (i : Nat),\n  Eq (List.map (Effect4.Program.tableEntryAt s ctx n a) (n.childAddresses i))\n    (Effect4.Program.childTableAt s ctx n a i)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":177,"lemmas":38,"nearest":["Effect4.Program.Formation.services_closed","Effect4.Program.closed_serviceTy","Effect4.Program.closed_nativeAtomTy"]},"doc":"**An application's signature has closed atoms and closed carriers when its declared\ncarriers are formed.** The atoms are the native ones. A step of `AdmittedProgram.closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closedSig_app","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp),\n  Effect4.Program.Formation.Formed (Effect4.Program.Formation.serviceSites app.services) →\n    Effect4.Program.ClosedSig app.signature","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":143,"lemmas":38,"nearest":["Effect4.Program.closed_nativeServiceTy","Effect4.Program.closed_nativeAtomTy"]},"doc":"**The native signature has closed atoms and closed service carriers**, at every row table.\nSo `check_closed` asks nothing of a native program but its formed annotations. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closedSig_native","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable),\n  Effect4.Program.ClosedSig (Effect4.Program.nativeSignature table)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":38,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"The error column of `catchIf` is closed when the body's and the handler's are. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_catchIfError","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (test : Effect4.Program.Term) (caught : Nat) {b h : Effect4.Program.Ty},\n  Eq b.closed Bool.true →\n    Eq h.closed Bool.true → Eq (Effect4.Program.catchIfError test caught b h).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.Member.cause_closed","Effect4.Program.UnionRule.extendAll_closed"]},"doc":"The error column of a cause or of an exit is closed when the type is. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_causeInputError","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {input error : Effect4.Program.Ty},\n  Eq input.closed Bool.true →\n    Eq (Effect4.Program.causeInputError? input) (Option.some error) → Eq error.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":37,"nearest":["Effect4.Program.Member.exit_closed","Effect4.Program.UnionRule.extendAll_closed_pair"]},"doc":"The value and error types of `Checker.exitOf?` are closed when the target is. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_exitOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {pair : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.Checker.exitOf? t) (Option.some pair) →\n      And (Eq pair.fst.closed Bool.true) (Eq pair.snd.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":37,"nearest":["Effect4.Program.Member.fiber_closed","Effect4.Program.UnionRule.extendAll_closed_pair"]},"doc":"A fiber handle's two columns are closed when the handle's type is. The fiber rule is the\nextended rule of its member rule (`UnionRule.extendAll`, `src/Effect4/Program/UnionRule.lean`), so\nthe fact is `UnionRule.extendAll_closed_pair` at the member fact `Member.fiber_closed`\n(`src/Effect4/Laws/Program/Eliminators.lean`): the member rule's own answer is closed at a closed\nfiber type, and `UnionRule.lift_closed_pair` covers the full lift's answer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_fiberTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t value error : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.fiberTy t) (Option.some { fst := value, snd := error }) →\n      And (Eq value.closed Bool.true) (Eq error.closed Bool.true)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":7,"lemmas":0,"nearest":[]},"doc":"A stated type, or the type it stands in for, is closed when both are. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_getD","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {stated : Option Effect4.Program.Ty} {inferred : Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty), Option.instMembership.mem stated t → Eq t.closed Bool.true) →\n    Eq inferred.closed Bool.true → Eq (stated.getD inferred).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.closed_join"]},"doc":"The joined answer of two closed answers is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_joinAnswer","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a b answer : Effect4.Program.Ty},\n  Eq (Effect4.Program.EffTy.joinAnswer a b) (Option.some answer) →\n    Eq a.closed Bool.true → Eq b.closed Bool.true → Eq answer.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.Member.list_closed","Effect4.Program.UnionRule.extendAll_closed"]},"doc":"The element type of `Checker.listOf?` is closed when the target is. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_listOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t item : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.Checker.listOf? t) (Option.some item) → Eq item.closed Bool.true","status":"proved"},{"axioms":[],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"The literal rule answers a closed type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_litArgTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (const : Bool) (value : Effect4.Program.Lit),\n  Eq (Effect4.Program.litArgTy const value).closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":99,"lemmas":38,"nearest":["Effect4.Program.NativeAtom.closed_typeOf"]},"doc":"A native atom answers a closed type at closed arguments. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_nativeAtomTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {name : String} {tys : List Effect4.Program.Ty} {ty : Effect4.Program.Ty},\n  (∀ (t : Effect4.Program.Ty), List.instMembership.mem tys t → Eq t.closed Bool.true) →\n    Eq (Effect4.Program.nativeAtomTy name tys) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":24,"lemmas":0,"nearest":[]},"doc":"A built-in service carrier is closed: read off the two tables. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_nativeServiceTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {key : Effect4.ServiceKey} {ty : Effect4.Program.Ty},\n  Eq (Effect4.Program.nativeServiceTy key) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":37,"nearest":["Effect4.Program.Member.option_closed","Effect4.Program.UnionRule.lift_closed"]},"doc":"The element type that the option rule answers is closed when the target is\n(`UnionRule.lift_closed`). A step of\n`Decision.closed_arms`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_optionTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t item : Effect4.Program.Ty},\n  Eq t.closed Bool.true →\n    Eq (Effect4.Program.optionTy t) (Option.some item) → Eq item.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":126,"lemmas":77,"nearest":["Effect4.Program.Formation.closed_of_formed"]},"doc":"**The row rule answers closed types, with no premise.** A checked row use has checked strict\nformation of each instantiated column, and strict formation gives a closed type\n(`Formation.closed_of_formed`). So nothing is asked of the row, of the request or of the\noperation's binder term. A step of `hasTy_closed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_rowTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {row : Effect4.Program.Row} {request : Effect4.Program.Ty} {use : Option Effect4.Program.TermUse}\n  {t : Effect4.Program.EffTy}, Eq (Effect4.Program.rowTy row request use) (Option.some t) → t.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":27,"lemmas":0,"nearest":[]},"doc":"A carrier that an application's signature answers is closed, when its declared carriers\nare: the reserved carrier and the built-in ones are read off their tables. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.closed_serviceTy","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {app : Effect4.Program.SigApp},\n  (∀ (entry : Prod Effect4.ServiceKey Effect4.Program.Ty),\n      List.instMembership.mem app.services entry → Eq entry.snd.closed Bool.true) →\n    ∀ {key : Effect4.ServiceKey} {ty : Effect4.Program.Ty},\n      Eq (app.serviceTy key) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":902,"lemmas":355,"nearest":["Effect4.Program.Moves.evaluateNative_maskChain","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.Lift.driveState_lift"]},"doc":"**Each live fiber of a run of a compiled program holds the saved mask's chain at its start\nflag** (the proposed registry claim `saved-mask-chain-runs`; concept\n`scope-lifetime-finalization`, requirement R11). It is the placed statement of the claim: the\nlift of `saved_mask_pop_discipline` to runs, at the compiled program's interpreter\n`interpOf root table` and under the native evaluator `evaluatorFor root table`. A printed form\nof the statement hides that instance.\n\nIts general form is `Machine.saved_mask_chain_runs`, at the frame evaluator. This statement is\n`Machine.replayEval_maskRuns` at the native evaluator's premise `evaluateNative_keepsMask`.\n\nReach: every program, row table, decision tape and fuel, from each machine that holds the\ninvariant. It asks for no typing, no admission and no premise on the table.\n\nIt does not establish the bracket of a region, a flag or a stack of an exited fiber as a state\ninvariant, a cleanup's multiplicity, a delivery, a budget or liveness. An invariant is not\nprogress.\n\nIts consumers are the bracket's law, then the waiting wrapper under a masked caller,\nSemaphore's protected permit and Pool's `use`. ","kind":"theorem","module":"Effect4.Laws.Program.MaskRuns","name":"Effect4.Program.compiled_mask_chain_runs","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) (fuel : Nat)\n  (tape :\n    List\n      (Effect4.Machine.RunDecision Effect4.Program.EffName Effect4.Program.EffThunk\n        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n        Effect4.Machine.Ann))\n  (bases : List Bool)\n  (m :\n    Effect4.Machine.RunMachine Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann\n      Effect4.Machine.Ctx Effect4.Machine.Stores),\n  Effect4.Machine.MaskRuns bases m →\n    Exists fun bases' =>\n      And (bases.IsPrefix bases')\n        (Effect4.Machine.MaskRuns bases'\n          (Effect4.Machine.replayEval (Effect4.Program.interpOf root table) fuel tape m).machine)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":84,"lemmas":59,"nearest":["Effect4.Program.stepped_live"]},"doc":"**A region of a compiled program ends at its entry's stack and at its entry flag**, for an\narbitrary body (the proposed registry claim `saved-mask-region-bracket`; concept\n`scope-lifetime-finalization`, requirement R11). It is the run-level half of\n`saved-mask-restoration`, at the compiled program's interpreter `interpOf p table` and under\nthe native evaluator.\n\nThe two cuts are cuts of one command loop's run (`LoopCut`, at tables in the prefix order), and\nat each a pending command steps the fiber. The first is the region's entry: its stack is the\nentry's stack, and its flag is the entry flag. At the second the fiber is inside the region: its\nstack is the own frames `above` over the entry's stack. Where the pop of the own frames answers\nnothing, the body's exit has passed each own frame. Then the region's end has the entry's stack\nand the entry flag, and the pop of the fiber goes on as the pop of the region's end\n(`RegionEnds`).\n\nIts two facts are its steps. The stack at the region's end is the entry's stack\n(`FrameFiber.regionEnd_stack`). The fiber is live at both cuts (`stepped_live`), so the\nstatement takes no premise on an exit. Its general form is\n`Machine.saved_mask_region_bracket`, which takes that premise.\n\nReach: every program, row table, demand, skip flag and carried cause. It asks for no typing and\nno admission. A region that changes its flag and a region that changes no flag are one case: the\nstatement reads the entry's stack and the entry flag alone.\n\nThe later cut's stack shape `above ++ below` is a premise, and it is the region's only mark on\nthe machine. The theorem then gives the entry's stack and the entry flag at the region's end. It\ndoes not give that a body's run keeps that shape.\n\nIt gives no cleanup, no release count, no delivery, no budget and no liveness, and nothing of a\nregion whose fiber exits inside it. The client premise of the mask's derived form stays with the\nclient: nothing is acquired or registered before the body begins (decisions rows 227 and 244 to\n246).\n\nIts consumers are the waiting wrapper under a masked caller, then Semaphore's protected permit\nand Pool's `use`. ","kind":"theorem","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.compiled_region_bracket","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable) {bases bases' : List Bool}\n  {m m' : Effect4.Program.NativeMachine} {cmds cmds' : List Effect4.Program.Guard.NCmd},\n  Effect4.Program.LoopCut p table bases m cmds →\n    Effect4.Program.LoopCut p table bases' m' cmds' →\n      bases.IsPrefix bases' →\n        ∀ {c c' : Effect4.Program.Guard.NCmd},\n          List.instMembership.mem cmds c →\n            List.instMembership.mem cmds' c' →\n              ∀ {id : Effect4.FiberId},\n                Effect4.Machine.Steps id c →\n                  Effect4.Machine.Steps id c' →\n                    ∀ {f g : Effect4.Program.Guard.NFiber},\n                      Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n                        Eq (Effect4.Machine.RunMachine.fiber? m' id) (Option.some g) →\n                          ∀ {above : List Effect4.Program.NCode},\n                            Eq\n                                (g.frame\n                                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                      Effect4.FiberId Effect4.Machine.Ann)\n                                    (Effect4.FrameFiber Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann)).stack\n                                (instHAppendOfAppend.hAppend above\n                                  (f.frame\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)).stack) →\n                              ∀ (demand : Effect4.Arm) (skip : Bool)\n                                (cause : Option Effect4.Machine.CauseV),\n                                Eq\n                                    (((g.frame\n                                                (Effect4.Prim Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)\n                                                (Effect4.FrameFiber Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)).own\n                                            above).getCont\n                                        demand skip cause).answer\n                                    Effect4.ContAnswer.empty →\n                                  (f.frame\n                                        (Effect4.Prim Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)\n                                        (Effect4.FrameFiber Effect4.Program.EffName\n                                          Effect4.Program.EffThunk Effect4.Machine.Val\n                                          Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                          Effect4.Machine.Ann)).RegionEnds\n                                    (g.frame\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann))\n                                    above demand skip cause","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":357,"lemmas":75,"nearest":["Effect4.Program.cata_eff_congr_on","Effect4.Program.hom_eq_cata_eff"]},"doc":"**G1, the claim `defs-conservative`** (decisions row 328, point 5): a program that invokes no\ndefinition is checked the same at any block's signature, refusals included, at every\nenvironment and path. No service key is assumed typed: the block's signature changes only an\ninvocation's domain bit and row. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.defs_conservative","placement":{"concept":"initial-algebras-folds","requirement":"R2"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl)\n  {e : Effect4.Program.Eff Op},\n  Effect4.Program.NoInvocation sig e →\n    ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n      Eq (Effect4.Program.Checker.check (sig.withDefs decls) env p e)\n        (Effect4.Program.Checker.check sig env p e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":271,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"A typed sibling's type is the checker's answer, under the map that a step applies to it. A\nstep of `focus-function`: the cases of `NodeHasTy.child_step` whose child reads the type of an\nearlier sibling. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.effTy_map_of_hasTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op α : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env e t →\n    ∀ (g : Effect4.Program.EffTy → α),\n      Eq (Option.map g (Effect4.Program.effTy s env e)) (Option.some (g t))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":271,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete"]},"doc":"**The checker's answer at any path gives `effTy`'s**: the success projection does not read\nthe path. A step of `annotate-table`. Its consumers are the cases of `Annotate.check_eq` where\na child reads an earlier sibling's type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.effTy_of_check","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv} {q : List Nat}\n  {e : Effect4.Program.Eff Op} {x : Except Effect4.Program.TypeRefusal Effect4.Program.EffTy},\n  Eq (Effect4.Program.Checker.check s env q e) x → Eq (Effect4.Program.effTy s env e) x.toOption","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"A race's entrants have closed types: the spine with no slot (decisions row 340). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.effsHasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv} {es : Effect4.Program.Effs Op} {t : Effect4.Program.EffTy},\n      Conform.Effect4.Typing.EffsHasTy sig env List.nil es t →\n        Effect4.Program.ClosedEnv env →\n          Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.effs es → t.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"The replacement law, at the entrants of a race. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.effsHasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {es : Effect4.Program.Effs Op} {q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy}\n  {path : List Nat},\n  Conform.Effect4.Typing.EffsHasTy s env0 List.nil es T →\n    Eq ((Effect4.Program.Node.effs es).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {es' : Effect4.Program.Effs Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.effs es).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.effs es')) →\n                    Conform.Effect4.Typing.EffsHasTy s' env0 List.nil es' T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"Typed race entrants read only their signature. A step of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.effsHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {qs : List Effect4.Program.ParamDecl} {es : Effect4.Program.Effs Op} {t : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.EffsHasTy s env qs es t →\n    Effect4.Program.cata_effs\n      (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n        (Effect4.Program.SigOkDef s))\n      es","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":243,"lemmas":239,"nearest":["Effect4.Program.hom_eq_cata_ty","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record"]},"doc":"Row DI-62. The admitted error language excludes the payload-discarding `boom` case, record\npayloads included (decisions row 120). Concept `residual-program-typing`, R3; consumers the\nchecker's failure rule (`errAdmits_errOf`) and `FitsCause`'s failure arm. It does not establish\nthat the admitted error types are complete against rc.112. ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.errOf_ne_boom_of_supported","placement":{"concept":"residual-program-typing","requirement":"R3"},"restsOn":[],"statement":"∀ (ty : Effect4.Program.Ty) (v : Effect4.Machine.Val) (allocated : List String),\n  Eq (Effect4.Program.supportedErrTy ty) Bool.true →\n    Eq (Effect4.Program.Val.hasTy v ty allocated) Bool.true →\n      Ne (Effect4.Program.errOf v) Effect4.Machine.Err.boom","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":15,"lemmas":8,"nearest":[]},"doc":"**A payload's value reads back as the payload** (decisions row 120): its frame matches none\nof `errOf`'s first three arms, and the last reads it through `Payload.image`. Concept\n`exact-codecs`, claim `error-payload-exact` (R3); consumer `errOf_valOfErr`. ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.errOf_payload","placement":{"concept":"exact-codecs","requirement":"R3"},"restsOn":[],"statement":"∀ (p : Effect4.Machine.Payload), Eq (Effect4.Program.errOf p.val) (Effect4.Machine.Err.payload p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"**The exit rule at a raw exit type**: today's answer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.exitOf_exitOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (v e : Effect4.Program.Ty),\n  Eq (Effect4.Program.Checker.exitOf? (v.exitOf e)) (Option.some { fst := v, snd := e })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":85,"lemmas":136,"nearest":["Effect4.Program.Member.exit_eliminator","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.Eliminator.extendAll_upper"]},"doc":"**The upper form of the exit rule.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.exitOf_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {pair : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq (Effect4.Program.Checker.exitOf? t) (Option.some pair) →\n    Eq (t.subN (pair.fst.exitOf pair.snd)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":122,"lemmas":25,"nearest":[]},"doc":"**A well-formed program expands to a program with no reference site**, at the bound that\n`Eff.expandRefs` uses: one more round than the program has reference sites. The case of no\nreference site is the same statement, at one round. ","kind":"theorem","module":"Effect4.Laws.Program.ReferenceExpansion","name":"Effect4.Program.expanded_refs_nil_of_wf","placement":{"concept":"initial-algebras-folds","requirement":"R5"},"restsOn":[],"statement":"∀ {Op : Type} (root : Effect4.Program.Eff Op),\n  Eq root.layerRefsWF Bool.true →\n    Eq (Effect4.Program.Eff.refSites List.nil root.expandRefs) List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"**The fiber rule at a raw fiber type**: the two columns as they are spelled, as before the\nconversion. It is `extend_agrees` at the fiber rule: no program that the by-shape rule admitted\nmoves at this rule, and its type keeps its spelling. A step of the claim\n`union-rule-extend`. Its consumers are the differential of the conversion, and a typing\nderivation of a join of a forked fiber. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.fiberTy_fiberOf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (value error : Effect4.Program.Ty),\n  Eq (Effect4.Program.fiberTy (value.fiberOf error)) (Option.some { fst := value, snd := error })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":85,"lemmas":136,"nearest":["Effect4.Program.Member.fiber_eliminator","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.Eliminator.extendAll_upper"]},"doc":"**The upper form of the fiber rule.** A handle type that the fiber rule answers at a pair of\ncolumns is below the fiber type of that pair, in the checker's order. It takes the place of the\nequation `fiberTy_eq_some`, which is false of the converted rule: at `never` the rule answers\nand the type is no fiber type. A use site moves a value of the handle type up by `fits_subN`.\nA step of the claim `denote-typed` (R3). Its consumer is the fiber arms of\n`src/Effect4/Laws/Program/Typed/Denotation.lean`. The inequality is false in raw `Ty.sub`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.fiberTy_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty} {pair : Prod Effect4.Program.Ty Effect4.Program.Ty},\n  Eq (Effect4.Program.fiberTy t) (Option.some pair) →\n    Eq (t.subN (pair.fst.fiberOf pair.snd)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":282,"lemmas":54,"nearest":[]},"doc":"**The focus function, unfolded.** It answers `f` exactly when three facts hold: the node at\nthe address is the program `f.program`; the environment at the address is `f.env`; the checker\ngives `f.program` the type `f.ty` there. A step of `focus-function`: each law below reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.focusAt_eq_some","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {f : Effect4.Program.Focus Op},\n  Iff (Eq (Effect4.Program.focusAt s env0 p path) (Option.some f))\n    (And\n      (Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff f.program)))\n      (And\n        (Eq\n          (Effect4.Program.Node.envAt s (Effect4.Program.NodeEnv.env env0)\n            (Effect4.Program.Node.eff p) path)\n          (Option.some (Effect4.Program.NodeEnv.env f.env)))\n        (Eq (Effect4.Program.effTy s f.env f.program) (Option.some f.ty))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":54,"nearest":[]},"doc":"**At the root the focus is the checker's answer.** The focus at the empty path is the\nprogram itself, in the root's environment, at the type that `effTy` answers. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.focusAt_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.focusAt s env0 p List.nil)\n    (Option.map (fun t => { program := p, env := env0, ty := t }) (Effect4.Program.effTy s env0 p))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":281,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.focusAt_eq_some"]},"doc":"**The answer is typed.** Whatever the focus function answers is the sub-program at the\naddress, and that sub-program has the answered type in the answered environment. It holds for\nevery program: the program around the focus need not have a type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.focusAt_typed","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {f : Effect4.Program.Focus Op},\n  Eq (Effect4.Program.focusAt s env0 p path) (Option.some f) →\n    And\n      (Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff f.program)))\n      (Conform.Effect4.Typing.HasTy s f.env f.program f.ty)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_action_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.ActionTerm Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_action unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_action unit op r e\n      (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_action_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.ActionTerm Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_action unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_action unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_action_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.ActionTerm Op) (p : List Nat)\n      (f1 : Effect4.Program.Eff Op → List Nat → M) (f2 : Effect4.Program.Stmt Op → List Nat → M)\n      (f3 : Effect4.Program.Stmts Op → List Nat → M) (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_action unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_action unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_action_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_action_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.ActionTerm Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_action List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_action List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_action_hom","Effect4.Program.foldMapAt_action_base"]},"doc":"`foldMapAt_eff_paths_shift` at a fiber action. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_action_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.ActionTerm Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_action List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_action List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r\n        e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"**A path fold from `q ++ r` is the fold from `r`, each yield read below `q`.** At a program.\nThe pointer of `path-fold-natural`. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_eff_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.Eff Op) (q r : List Nat)\n  (f1 : Effect4.Program.Eff Op → List Nat → M) (f2 : Effect4.Program.Stmt Op → List Nat → M)\n  (f3 : Effect4.Program.Stmts Op → List Nat → M) (f4 : Effect4.Program.Effs Op → List Nat → M)\n  (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_eff unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6 f7)\n    (Effect4.Program.foldMapAt_eff unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"**A path fold, through a homomorphism that reads no path, is the fold with no path**, at a\nprogram. It is `foldMapAt_term_fuse` for the program's family: one statement for each sort, each\nproved by the sort's own case list. The node functions of the seven sorts are one function of\nthe family (`EffSelfCarrier`), so the statement has one hypothesis on them. Its consumer is\n`Formation.programAnnotations_all` (`Laws/Program/Typing/Closed.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_eff_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.Eff Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_eff unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_eff unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"**A map that keeps the operation commutes with a path fold.** At a program. A step of\n`path-fold-natural`: with `foldMapAt_eff_base`, it shifts the address list\n(`foldMapAt_eff_paths_shift`). ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_eff_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.Eff Op) (p : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n      (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n      (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_eff unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_eff unit' op' p e (fun x q => φ (f1 x q)) (fun x q => φ (f2 x q))\n          (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q)) (fun x q => φ (f5 x q))\n          (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_eff_paths_shift"]},"doc":"**The address fold from a child's base path is the fold from the root's, under that base.**\nAt a program. A step of `annotate-table`. Its consumer is `Node.addresses_eq_cons`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_eff_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Eff Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_eff List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_eff List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_eff_hom","Effect4.Program.foldMapAt_eff_base"]},"doc":"**The address fold from a base path is the fold from a shorter one, under the rest of the\nbase.** At a program. The address yield's instance of the path fold's naturality\n(`foldMapAt_eff_base`, `foldMapAt_eff_hom`, `Laws/Program/Address.lean`). A step of\n`annotate-table`. Its consumer is `foldMapAt_eff_paths_cons`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_eff_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Eff Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_eff List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_eff List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r e\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_effs_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.Effs Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_effs unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_effs unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_effs_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.Effs Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_effs unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_effs unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_effs_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.Effs Op) (p : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n      (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n      (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_effs unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_effs unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_effs_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_effs_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Effs Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_effs List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_effs List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_effs_hom","Effect4.Program.foldMapAt_effs_base"]},"doc":"`foldMapAt_eff_paths_shift` at a race's entrants. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_effs_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Effs Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_effs List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_effs List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r e\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_layer_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.LayerTerm Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_layer unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_layer unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_layer_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.LayerTerm Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_layer unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_layer unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_layer_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.LayerTerm Op) (p : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n      (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n      (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_layer unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_layer unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_layer_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_layer_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.LayerTerm Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_layer List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_layer List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_layer_hom","Effect4.Program.foldMapAt_layer_base"]},"doc":"`foldMapAt_eff_paths_shift` at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_layer_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.LayerTerm Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_layer List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_layer List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r e\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_layers_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.LayerTerms Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_layers unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_layers unit op r e\n      (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_layers_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.LayerTerms Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_layers unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_layers unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_layers_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.LayerTerms Op) (p : List Nat)\n      (f1 : Effect4.Program.Eff Op → List Nat → M) (f2 : Effect4.Program.Stmt Op → List Nat → M)\n      (f3 : Effect4.Program.Stmts Op → List Nat → M) (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_layers unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_layers unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_layers_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_layers_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.LayerTerms Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_layers List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_layers List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_layers_hom","Effect4.Program.foldMapAt_layers_base"]},"doc":"`foldMapAt_eff_paths_shift` at a layer list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_layers_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.LayerTerms Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_layers List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_layers List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r\n        e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_stmt_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.Stmt Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_stmt unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_stmt unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_stmt_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.Stmt Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_stmt unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_stmt unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_stmt_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.Stmt Op) (p : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n      (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n      (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_stmt unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_stmt unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_stmt_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_stmt_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Stmt Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_stmt List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_stmt List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_stmt_hom","Effect4.Program.foldMapAt_stmt_base"]},"doc":"`foldMapAt_eff_paths_shift` at a statement. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_stmt_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Stmt Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_stmt List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_stmt List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r e\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_base` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_stmts_base","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} (unit : M) (op : M → M → M) (e : Effect4.Program.Stmts Op)\n  (q r : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n  (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n  (f4 : Effect4.Program.Effs Op → List Nat → M) (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n  (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n  (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n  Eq\n    (Effect4.Program.foldMapAt_stmts unit op (instHAppendOfAppend.hAppend q r) e f1 f2 f3 f4 f5 f6\n      f7)\n    (Effect4.Program.foldMapAt_stmts unit op r e (fun x p => f1 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f2 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f3 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f4 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f5 x (instHAppendOfAppend.hAppend q p))\n      (fun x p => f6 x (instHAppendOfAppend.hAppend q p)) fun x p =>\n      f7 x (instHAppendOfAppend.hAppend q p))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_fuse` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_stmts_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → List Nat → M}\n      {g : (fam : Effect4.Program.EffFam) → Effect4.Program.EffSelfCarrier Op fam → N},\n      (∀ (fam : Effect4.Program.EffFam) (n : Effect4.Program.EffSelfCarrier Op fam) (q : List Nat),\n          Eq (φ (f fam n q)) (g fam n)) →\n        ∀ (e : Effect4.Program.Stmts Op) (p : List Nat),\n          Eq\n            (φ\n              (Effect4.Program.foldMapAt_stmts unit op p e (f Effect4.Program.EffFam.eff)\n                (f Effect4.Program.EffFam.stmt) (f Effect4.Program.EffFam.stmts)\n                (f Effect4.Program.EffFam.effs) (f Effect4.Program.EffFam.action)\n                (f Effect4.Program.EffFam.layer) (f Effect4.Program.EffFam.layers)))\n            (Effect4.Program.foldMap_stmts unit' op' e (g Effect4.Program.EffFam.eff)\n              (g Effect4.Program.EffFam.stmt) (g Effect4.Program.EffFam.stmts)\n              (g Effect4.Program.EffFam.effs) (g Effect4.Program.EffFam.action)\n              (g Effect4.Program.EffFam.layer) (g Effect4.Program.EffFam.layers))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_eff_hom` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Address","name":"Effect4.Program.foldMapAt_stmts_hom","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N}\n  {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ (e : Effect4.Program.Stmts Op) (p : List Nat) (f1 : Effect4.Program.Eff Op → List Nat → M)\n      (f2 : Effect4.Program.Stmt Op → List Nat → M) (f3 : Effect4.Program.Stmts Op → List Nat → M)\n      (f4 : Effect4.Program.Effs Op → List Nat → M)\n      (f5 : Effect4.Program.ActionTerm Op → List Nat → M)\n      (f6 : Effect4.Program.LayerTerm Op → List Nat → M)\n      (f7 : Effect4.Program.LayerTerms Op → List Nat → M),\n      Eq (φ (Effect4.Program.foldMapAt_stmts unit op p e f1 f2 f3 f4 f5 f6 f7))\n        (Effect4.Program.foldMapAt_stmts unit' op' p e (fun x q => φ (f1 x q))\n          (fun x q => φ (f2 x q)) (fun x q => φ (f3 x q)) (fun x q => φ (f4 x q))\n          (fun x q => φ (f5 x q)) (fun x q => φ (f6 x q)) fun x q => φ (f7 x q))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_stmts_paths_shift"]},"doc":"`foldMapAt_eff_paths_cons` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_stmts_paths_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Stmts Op) (i : Nat) (q : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_stmts List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (List.cons i q) e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n      List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend (List.cons i q) x)\n      (Effect4.Program.foldMapAt_stmts List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n        List.nil e (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.Program.foldMapAt_stmts_hom","Effect4.Program.foldMapAt_stmts_base"]},"doc":"`foldMapAt_eff_paths_shift` at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.foldMapAt_stmts_paths_shift","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (e : Effect4.Program.Stmts Op) (q r : List Nat),\n  Eq\n    (Effect4.Program.foldMapAt_stmts List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2)\n      (instHAppendOfAppend.hAppend q r) e (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n      (fun x p => List.cons p List.nil) fun x p => List.cons p List.nil)\n    (List.map (fun x => instHAppendOfAppend.hAppend q x)\n      (Effect4.Program.foldMapAt_stmts List.nil (fun x1 x2 => instHAppendOfAppend.hAppend x1 x2) r e\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil)\n        (fun x p => List.cons p List.nil) (fun x p => List.cons p List.nil) fun x p =>\n        List.cons p List.nil))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":[]},"doc":"**A path fold, through a homomorphism that reads no path, is the fold with no path**, at a\nterm. `φ` carries the fold's operation to `op'`, and the image of each node's value does not\ndepend on the node's path. With `φ` the identity it says that a path fold whose node function\nreads no path is the fold with no path. It is a law of the generated folds\n(`Program/Fold.lean`). A term has two sorts, and each has its own hypothesis. Its consumer is\n`Formation.termAnnotations_all` (`Laws/Program/Typing/Closed.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_term_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N} {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f_term : Effect4.Program.Term → List Nat → M}\n      {f_terms : Effect4.Program.Terms → List Nat → M} {g_term : Effect4.Program.Term → N}\n      {g_terms : Effect4.Program.Terms → N},\n      (∀ (n : Effect4.Program.Term) (q : List Nat), Eq (φ (f_term n q)) (g_term n)) →\n        (∀ (n : Effect4.Program.Terms) (q : List Nat), Eq (φ (f_terms n q)) (g_terms n)) →\n          ∀ (t : Effect4.Program.Term) (p : List Nat),\n            Eq (φ (Effect4.Program.foldMapAt_term unit op p t f_term f_terms))\n              (Effect4.Program.foldMap_term unit' op' t g_term g_terms)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":[]},"doc":"`foldMapAt_term_fuse` at an argument list. ","kind":"theorem","module":"Effect4.Laws.Program.PathFold","name":"Effect4.Program.foldMapAt_terms_fuse","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {M : Type u} {N : Type v} (φ : M → N) {unit : M} {op : M → M → M} {unit' : N} {op' : N → N → N},\n  (∀ (a b : M), Eq (φ (op a b)) (op' (φ a) (φ b))) →\n    ∀ {f_term : Effect4.Program.Term → List Nat → M}\n      {f_terms : Effect4.Program.Terms → List Nat → M} {g_term : Effect4.Program.Term → N}\n      {g_terms : Effect4.Program.Terms → N},\n      (∀ (n : Effect4.Program.Term) (q : List Nat), Eq (φ (f_term n q)) (g_term n)) →\n        (∀ (n : Effect4.Program.Terms) (q : List Nat), Eq (φ (f_terms n q)) (g_terms n)) →\n          ∀ (ts : Effect4.Program.Terms) (p : List Nat),\n            Eq (φ (Effect4.Program.foldMapAt_terms unit op p ts f_term f_terms))\n              (Effect4.Program.foldMap_terms unit' op' ts g_term g_terms)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":869,"lemmas":214,"nearest":["Effect4.Program.Moves.evaluatePrim_producer"]},"doc":"The existing command authority discharges the live transport boundary.\nConsumer: run stack locality before the region bracket's entry stack is reached.\nThis gives no progress and does not by itself discharge the bracket's `inside` premise. ","kind":"theorem","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.guarded_driveStep_liveTransports","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (m : Effect4.Program.NativeMachine) (c : Effect4.Program.Guard.NCmd)\n  (rest : List Effect4.Program.Guard.NCmd),\n  Effect4.Program.Guard.GuardQueue p table m (List.cons c rest) →\n    Effect4.Program.Moves.Transports False m\n      (Effect4.Machine.driveStep (Effect4.Program.interpOf p table) m c rest).fst","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":142,"lemmas":44,"nearest":[]},"doc":"**A value of a payload-admissible type holds no handle** (decisions row 120): the type is\nfirst-order and names no handle, fiber, cell, deferred or nominal reference at any node, and\nexcludes `unknown`, whose members may hold any. Concept `store-typing`, the host boundary\n(`docs/core/host-boundary.md` §5). The carrier holds handle-free frames only, which keeps the six\nhandle-freeness lemmas unconditional; this lemma makes every admitted record error such a frame.\nConsumer: `isPayload_of_hasTy_record`. ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.handles_of_payloadFieldTy","placement":{"concept":"store-typing","requirement":"R6"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq (Effect4.Program.payloadFieldTy t) Bool.true →\n    ∀ (v : Effect4.Machine.Val),\n      Eq (Effect4.Program.Val.hasTy v t) Bool.true → Eq (Effect4.Store.Val.handles v) List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":54,"nearest":["Effect4.Program.checkRow_rowBindings","Effect4.Program.focusAt_typed","Effect4.Program.hasTy_focusAt"]},"doc":"**On a typed program `callAt` answers at every call**, with the call's operation. The focus\nanswers there (`hasTy_focusAt`), and the rule of `perform` gives the request's type and the row\ncheck's answer, whose bindings `rowBindings` answers (`checkRow_rowBindings`). A step of\n`block-call-instance`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.hasTy_callAt","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat} {op : Op}\n  {request : Effect4.Program.Term},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op request))) →\n      Exists fun c => And (Eq (Effect4.Program.callAt s env0 p path) (Option.some c)) (Eq c.op op)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"**A typed program has closed types**, at a closed signature and environment, when its\nannotations state closed types. One line per rule of `HasTy`: each rule builds its type from its\nchildren's types by operations that keep closed types closed. The annotation premise is read at\na loop's cursor type and inside a term, and nowhere else. The claim `checked-types-closed`, at\nthe judgment. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.hasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv} {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n      Conform.Effect4.Typing.HasTy sig env e t →\n        Effect4.Program.ClosedEnv env →\n          Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.eff e → t.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":285,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.focusAt_eq_some","Effect4.Program.NodeHasTy.replace_envAt"]},"doc":"**On a typed program the focus function answers at every address of a program.** The\nanswered program is the one at the address. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.hasTy_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq ((Effect4.Program.Node.eff p).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          Eq (Effect4.Program.focusAt s env0 p path)\n            (Option.some { program := q, env := env, ty := t })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"**The replacement law, at a program.** A typed program splits at an address into an\nenvironment and a type of the focus, and every program of that type in that environment stands\nin the focus's place: the whole keeps its type, under every extension of the signature. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.hasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p q : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq ((Effect4.Program.Node.eff p).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' p' : Effect4.Program.Eff Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.eff p')) →\n                    Conform.Effect4.Typing.HasTy s' env0 p' T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":58,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.NodeHasTy.replace_envAt","Effect4.Program.focusAt_eq_some"]},"doc":"**The replacement law at the focus function's answer.** In a typed program, a program that\nhas the answered type in the answered environment, under an extension of the signature, stands\nin the focus's place, and the whole keeps its type. No environment and no type is existential:\nthe function names both. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Focus","name":"Effect4.Program.hasTy_replace_focusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat}\n  {f : Effect4.Program.Focus Op},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq (Effect4.Program.focusAt s env0 p path) (Option.some f) →\n      ∀ {s' : Effect4.Program.Signature Op} {q' p' : Effect4.Program.Eff Op},\n        Effect4.Program.SigExtends s s' →\n          Conform.Effect4.Typing.HasTy s' f.env q' f.ty →\n            Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                (Option.some (Effect4.Program.Node.eff p')) →\n              Conform.Effect4.Typing.HasTy s' env0 p' T","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"**A typed program reads only its signature**: every operation it performs is in the\nsignature's domain, and every service key it reads has a carrier. One case for each typing rule,\njudgment by judgment, as `hasTy_ext` is. A step of `omit-splices-table`. Its consumer is\n`moduleHasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.hasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv}\n  {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env e t → Effect4.Program.SigProgram s e","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":245,"lemmas":65,"nearest":[]},"doc":"**G2, the claim `invocation-rule`** (decisions row 328): at a block's signature, the\ninvocation of definition `k` has the type of the row that definition `k` declares, in normal\nform, at its request's type. It is `HasTy.perform` read at the block's signature: no rule is\nadded to `HasTy`. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.invoke_hasTy","placement":{"concept":"initial-algebras-folds","requirement":"R1"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (decls : List Effect4.Program.DefDecl) {op : Op}\n  {k : Nat} {d : Effect4.Program.DefDecl},\n  Eq (sig.callOf op) (Option.some k) →\n    Eq (List.instGetElem?NatLtLength.getElem? decls k) (Option.some d) →\n      Eq d.params List.nil →\n        ∀ (env : Effect4.Program.TyEnv) (request : Effect4.Program.Term)\n          (t : Effect4.Program.EffTy),\n          Iff\n            (Conform.Effect4.Typing.HasTy (sig.withDefs decls) env\n              (Effect4.Program.Eff.perform op request) t)\n            (Exists fun requestTy =>\n              And (Eq (Effect4.Program.termTy sig env request) (Option.some requestTy))\n                (Eq (Effect4.Program.rowTy d.row.normalizeTypes requestTy (sig.termUse env op))\n                  (Option.some t)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":139,"lemmas":45,"nearest":["Effect4.Program.handles_of_payloadFieldTy"]},"doc":"**A value of an admitted record error type is a payload** (decisions row 120): a record\nframe (`RecordChecks.entries`) that holds no handle (`handles_of_payloadFieldTy`), at any\nallocation table. Concept `residual-program-typing`, R3; consumer\n`valOfErr_errOf_rawSupported`'s record arm, hence `errOf_ne_boom_of_supported`. ","kind":"theorem","module":"Effect4.Laws.Program.Admit","name":"Effect4.Program.isPayload_of_hasTy_record","placement":{"concept":"residual-program-typing","requirement":"R3"},"restsOn":[],"statement":"∀ {fs : List (Prod String (Prod Bool Effect4.Program.Ty))} {v : Effect4.Machine.Val}\n  {allocated : List String},\n  Eq (Effect4.Program.payloadFieldTys fs) Bool.true →\n    Eq (Effect4.Program.Val.hasTy v (Effect4.Program.Ty.record fs) allocated) Bool.true →\n      Eq (Effect4.Machine.isPayload v) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"A layer's error type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.layerHasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {l : Effect4.Program.LayerTerm Op} {t : Effect4.Program.LayerTy},\n      Conform.Effect4.Typing.LayerHasTy sig l t →\n        Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.layer l →\n          Eq t.error.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"The replacement law, at a layer. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.layerHasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {l : Effect4.Program.LayerTerm Op}\n  {q : Effect4.Program.Eff Op} {L : Effect4.Program.LayerTy} {path : List Nat},\n  Conform.Effect4.Typing.LayerHasTy s l L →\n    Eq ((Effect4.Program.Node.layer l).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {l' : Effect4.Program.LayerTerm Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.layer l).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.layer l')) →\n                    Conform.Effect4.Typing.LayerHasTy s' l' L)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"A typed layer reads only its signature. A step of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.layerHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {l : Effect4.Program.LayerTerm Op}\n  {t : Effect4.Program.LayerTy},\n  Conform.Effect4.Typing.LayerHasTy s l t →\n    Effect4.Program.cata_layer\n      (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n        (Effect4.Program.SigOkDef s))\n      l","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"A layer list's merged error type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.layersHasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {ls : Effect4.Program.LayerTerms Op} {t : Effect4.Program.LayerTy},\n      Conform.Effect4.Typing.LayersHasTy sig ls t →\n        Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.layers ls →\n          Eq t.error.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":236,"lemmas":54,"nearest":[]},"doc":"A typed spine after a typed head is a typed spine: the rule `LayersHasTy.cons` with a tail\nthat is not written as a `cons`. A typed spine is never empty. A step of `typed-replacement`:\nthe tail of a spine in `NodeHasTy.child_step`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.layersHasTy_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {head : Effect4.Program.LayerTerm Op}\n  {ls : Effect4.Program.LayerTerms Op} {h t : Effect4.Program.LayerTy},\n  Conform.Effect4.Typing.LayerHasTy s head h →\n    Conform.Effect4.Typing.LayersHasTy s ls t →\n      Conform.Effect4.Typing.LayersHasTy s (Effect4.Program.LayerTerms.cons head ls) (h.merge t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"The replacement law, at a layer spine. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.layersHasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {ls : Effect4.Program.LayerTerms Op}\n  {q : Effect4.Program.Eff Op} {L : Effect4.Program.LayerTy} {path : List Nat},\n  Conform.Effect4.Typing.LayersHasTy s ls L →\n    Eq ((Effect4.Program.Node.layers ls).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {ls' : Effect4.Program.LayerTerms Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.layers ls).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.layers ls')) →\n                    Conform.Effect4.Typing.LayersHasTy s' ls' L)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"A typed layer spine reads only its signature. A step of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.layersHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {ls : Effect4.Program.LayerTerms Op}\n  {t : Effect4.Program.LayerTy},\n  Conform.Effect4.Typing.LayersHasTy s ls t →\n    Effect4.Program.cata_layers\n      (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n        (Effect4.Program.SigOkDef s))\n      ls","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":65,"lemmas":37,"nearest":["Effect4.Program.UnionRule.extendAll_agrees"]},"doc":"**The list rule at a raw list type**: today's answer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.listOf_list","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty), Eq (Effect4.Program.Checker.listOf? t.list) (Option.some t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":82,"lemmas":130,"nearest":["Effect4.Program.Member.list_eliminator","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.Eliminator.extendAll_upper"]},"doc":"**The upper form of the list rule.** ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.listOf_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t item : Effect4.Program.Ty},\n  Eq (Effect4.Program.Checker.listOf? t) (Option.some item) → Eq (t.subN item.list) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":313,"lemmas":55,"nearest":["Effect4.Program.mem_addresses_iff","Effect4.Program.programCallAt_rowTy"]},"doc":"**The call table answers at an address exactly what `programCallAt` answers there**: a\ncall's address is an address of the program (`mem_addresses_iff`), so the table misses none. A\nstep of `reply-at-call-instance`; consumer: `Api.HostSession.start_callInstance`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.lookup_programCalls","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op) (o : List Nat),\n  Eq (List.lookup o (Effect4.Program.programCalls s env0 p))\n    (Effect4.Program.programCallAt s env0 p o)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":26,"lemmas":0,"nearest":["Effect4.Program.yieldAt_addressYield","Effect4.Program.Node.mem_foldList_iff","Effect4.Program.addresses_eq_foldList"]},"doc":"**The address list holds exactly the addresses of a node's nodes**: a path is in\n`Node.addresses` exactly when a node stands at it. It is `Node.mem_foldList_iff` at the address\nyield. It says nothing of the order of the list. A step of `address-table`. Its consumers are\nthe table's entries, each of which stands at an address, and the query driver (slice QUERY). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.mem_addresses_iff","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (n : Effect4.Program.Node Op) (a : List Nat),\n  Iff (List.instMembership.mem n.addresses a) (Eq (n.at_ a).isSome Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":249,"lemmas":80,"nearest":[]},"doc":"**The module judgment along an extension** (C3's monotone half for a module): a module the\njudgment types under `s` it types under every extension `s'`, at the same type. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.moduleHasTy_ext","placement":{"concept":"initial-algebras-folds","requirement":"R2"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n      Effect4.Program.ModuleHasTy s e t → Effect4.Program.ModuleHasTy s' e t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":173,"lemmas":55,"nearest":["Effect4.Program.Eff.partAt_of_hasTy","Effect4.Program.BodiesHasTy.bodyAt_typed"]},"doc":"**Every part of a typed whole program is typed**, at its signature and its environment. A\nstep of `Sketch.table_result_refusal_none`, toward the proposed claim `module-address-table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.moduleHasTy_partAt_typed","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {a : List Nat} {part : Effect4.Program.Part Op} {rest : List Nat},\n  Effect4.Program.ModuleHasTy s p T →\n    Eq (Effect4.Program.Eff.partAt s List.nil p a) (Option.some { fst := part, snd := rest }) →\n      Exists fun t => Conform.Effect4.Typing.HasTy part.sig part.env part.program t","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":300,"lemmas":57,"nearest":["Effect4.Program.Eff.partAt_of_hasTy","Effect4.Program.hasTy_callAt","Effect4.Program.BodiesHasTy.bodyAt"]},"doc":"**On a typed whole program `programCallAt` answers at every call**, with the call's\noperation: in a definition's body at the block's signature and its request, in the main program\nat the block's signature, and in a program with no block. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.moduleHasTy_programCallAt","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {op : Op} {request : Effect4.Program.Term},\n  Effect4.Program.ModuleHasTy s p T →\n    Eq ((Effect4.Program.Node.eff p).at_ path)\n        (Option.some (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op request))) →\n      Exists fun c =>\n        And (Eq (Effect4.Program.programCallAt s List.nil p path) (Option.some c)) (Eq c.op op)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":293,"lemmas":57,"nearest":["Effect4.Program.Eff.partAt_of_hasTy","Effect4.Program.hasTy_focusAt","Effect4.Program.BodiesHasTy.bodyAt"]},"doc":"**On a typed whole program the focus answers at every address of a program inside a part**:\nin a definition's body, in the main program, and in a program with no block. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.moduleHasTy_programFocusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {p q : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {i : Nat} {r : List Nat},\n  Effect4.Program.ModuleHasTy s p T →\n    Eq ((Effect4.Program.Node.eff p).at_ (List.cons i r))\n        (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          Eq (Effect4.Program.programFocusAt s List.nil p (List.cons i r))\n            (Option.some { program := q, env := env, ty := t })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":309,"lemmas":85,"nearest":["Effect4.Program.Eff.partAt_of_hasTy","Effect4.Program.hasTy_replace_focusAt","Effect4.Program.focusAt_typed","Effect4.Program.Node.replaceAt_eff","Effect4.Program.BodiesHasTy.replace"]},"doc":"**The replacement law over the parts**: in a typed whole program, take the focus that\n`programFocusAt` answers. A filling typed at the focus's type in the focus's environment, at the\nsignature of its part under an extension, replaces the sub-program, and the whole program keeps\nits type under the extension. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.moduleHasTy_replace_programFocusAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op} {p q' : Effect4.Program.Eff Op}\n  {T : Effect4.Program.EffTy} {path : List Nat} {f : Effect4.Program.Focus Op}\n  {part' : Effect4.Program.Part Op} {rest' : List Nat},\n  Effect4.Program.ModuleHasTy s p T →\n    Eq (Effect4.Program.programFocusAt s List.nil p path) (Option.some f) →\n      Effect4.Program.SigExtends s s' →\n        Eq (Effect4.Program.Eff.partAt s' List.nil p path)\n            (Option.some { fst := part', snd := rest' }) →\n          Conform.Effect4.Typing.HasTy part'.sig f.env q' f.ty →\n            Exists fun p' =>\n              And\n                (Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n                  (Option.some (Effect4.Program.Node.eff p')))\n                (Effect4.Program.ModuleHasTy s' p' T)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":323,"lemmas":55,"nearest":["Effect4.Program.layerHasTy_sigProgram","Effect4.Program.hasTy_sigProgram","Effect4.Program.bodiesHasTy_sigProgram"]},"doc":"**A typed whole program reads only its signature**, part by part. A step of\n`omit-splices-table`. Its consumer is `Sketch.table_more_holes`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.moduleHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {e : Effect4.Program.Eff Op}\n  {t : Effect4.Program.EffTy},\n  Effect4.Program.ModuleHasTy s e t → Effect4.Program.ModuleSigProgram s e","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":287,"lemmas":59,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.NodeHasTy.replace_envAt"]},"doc":"**The node's own entry is kept**: the edited node has the node's type, so the checker's\nanswer there is the same. A step of `tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.nodeAnswer_replace_kept","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {n n' : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {path pre : List Nat} {q q' : Effect4.Program.Eff Op}\n  {env : Effect4.Program.TyEnv} {t : Effect4.Program.EffTy},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Eq (Effect4.Program.Node.envAt s τ.env n path)\n          (Option.some (Effect4.Program.NodeEnv.env env)) →\n        Conform.Effect4.Typing.HasTy s env q t →\n          Conform.Effect4.Typing.HasTy s env q' t →\n            Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n              Eq (Effect4.Program.nodeAnswer s (Option.some τ.env) n' pre)\n                (Effect4.Program.nodeAnswer s (Option.some τ.env) n pre)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":77,"lemmas":83,"nearest":["Effect4.Program.UnionRule.liftOne_eq"]},"doc":"The option rule agrees with the former normalized-head rule where a normal form has one member.\nProper option unions now answer, so the one-member premise bounds this connector.\nConsumer: the single-member `Decision.arms` reader in `Test/Program/Eliminators.lean`. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.optionTy_eq_normal","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t : Effect4.Program.Ty},\n  Ne t.normalize Effect4.Program.Ty.never →\n    instLENat.le t.normalize.members.length 1 →\n      Eq (Effect4.Program.optionTy t)\n        (Effect4.Program.optionTy_eq_normal.match_1 (fun x => Option Effect4.Program.Ty) t.normalize\n          (fun a => Option.some a) fun x => Option.none)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":76,"lemmas":69,"nearest":["Effect4.Program.UnionRule.lift_member"]},"doc":"**The option rule at an option type whose element is its own normal form**: the element.\nThe full lift at one normal union member is the member rule (`lift_member`). A step of the\nclaim `union-rule-extend`, at a rule that reads the normal form. Its consumer is\n`answers_selectOptionWith_kept` (`src/Effect4/Laws/Step/Waiting.lean`). At an element that is\nnot its own normal form the answer is the normal form, as it was before the conversion. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.optionTy_option","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {a : Effect4.Program.Ty},\n  Eq a.normalize a → Eq (Effect4.Program.optionTy a.option) (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":81,"lemmas":130,"nearest":["Effect4.Program.Member.option_eliminator","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.Eliminator.lift_upper"]},"doc":"**The upper form of the option rule.** A target that the rule answers is below the option\ntype of the answer, in the checker's order.\nIts consumers are `Decision.decide_typed` (`src/Effect4/Laws/Program/Decision.lean`) and the\nmembership laws of a selection. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.optionTy_upper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {t a : Effect4.Program.Ty},\n  Eq (Effect4.Program.optionTy t) (Option.some a) → Eq (t.subN a.option) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":54,"nearest":["Effect4.Program.Eff.partAt_at","Effect4.Program.callAt_rowTy"]},"doc":"**Where `programCallAt` answers, the node is a call typed at its part.** The node at the\naddress is a `perform` of the instance's operation. In the part that holds the address, the\nrequest has the instance's request type, and the row check at the part's signature answers the\ninstance's columns and bindings. It is `callAt_rowTy` at the part. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Parts","name":"Effect4.Program.programCallAt_rowTy","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {path : List Nat} {c : Effect4.Program.CallInstance Op},\n  Eq (Effect4.Program.programCallAt s env0 p path) (Option.some c) →\n    Exists fun part =>\n      Exists fun rest =>\n        Exists fun request =>\n          Exists fun env =>\n            Exists fun t =>\n              And\n                (Eq (Effect4.Program.Eff.partAt s env0 p path)\n                  (Option.some { fst := part, snd := rest }))\n                (And\n                  (Eq ((Effect4.Program.Node.eff p).at_ path)\n                    (Option.some\n                      (Effect4.Program.Node.eff (Effect4.Program.Eff.perform c.op request))))\n                  (And\n                    (Eq\n                      (Effect4.Program.Node.envAt part.sig (Effect4.Program.NodeEnv.env part.env)\n                        (Effect4.Program.Node.eff part.program) rest)\n                      (Option.some (Effect4.Program.NodeEnv.env env)))\n                    (And (Eq (Effect4.Program.termTy part.sig env request) (Option.some c.request))\n                      (And\n                        (Eq\n                          (Effect4.Program.rowTy (part.sig.rowOf c.op) c.request\n                            (part.sig.termUse env c.op))\n                          (Option.some t))\n                        (And (Eq t.answer c.answer)\n                          (And (Eq t.error c.error)\n                            (Eq\n                              (Effect4.Program.rowBindings (part.sig.rowOf c.op) c.request\n                                (part.sig.termUse env c.op))\n                              (Option.some c.bindings))))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":638,"lemmas":211,"nearest":["Effect4.Program.Node.replaceAt_spec"]},"doc":"**G6: the round trip of a module with a definition block** (decisions rows 328 and 341). The\nmodule printer prints a block's definitions as constants, each body's own hoisted layers as\nconstants at the top of its suspension (decisions row 341, step 3), then the block's services'\nkeys and layers (decisions rows 338 and 339), then its module layers, each named by its path\n(step 2), before the hoisted layers no body took and the main declaration (`printModule`). When\neach declaration is readable (`DefDecl.readable`: readable columns, an empty requirement row, a\nname with no layer path); each body and each of its own layers read back from their printing at\nthe signature its parameters extend (`bodyDeclOf`); the main program, each module layer and each\nother hoisted layer read back at the block's signature through the block's spelling map\n(`defsSpell`); and the layers' names decode, the module reads back to the program, with each\ndefinition's role given back by the services' layers (`roleOf`, `restoreRoles`) and the module's\nlayers by their paths (`moduleLayersOf`). No hoisted layer stands in the module\n(`Eff.hoistAll_outside`). The premises concern the pieces, as `readModule_printModule`'s do, and\nthey are stated of any reader.\n\nRestated for step 3: each body reads back itself (it was its suspension), and the hoisted layers'\npremise is split by the scope that prints them (`localsReadable`, `layersReadable`).\n\nPlacement: concept `exact-codecs`, claim `module-defs-round-trip`, requirement R8. Consumers: the\nmodule round trip of the readable domain (`readModule_printModule_readable`) and, through it,\n`ModuleEmission.readModule`. It is a structural equation: it does not say that tsgo accepts the\nmodule or how rc.112 runs it. ","kind":"theorem","module":"Effect4.Laws.Codegen.Module","name":"Effect4.Program.readModule_printModule_defs","placement":{"concept":"exact-codecs","requirement":"R8"},"restsOn":[],"statement":"∀ {Op : Type} {classes : Effect4.Codegen.Classes.Classes} {sig : Effect4.Program.Signature Op}\n  {spell : String → List Effect4.Program.RowArg → Option Op} {call param : Nat → Op}\n  {root main body : Effect4.Program.Eff Op} {defs : List Effect4.Program.DefDecl}\n  {bodies : Effect4.Program.Effs Op} {layers : Effect4.Program.LayerTerms Op}\n  {history : List (Prod (List Nat) (Effect4.Program.LayerTerm Op))},\n  Eq root.hoistAll (Except.ok { fst := main, snd := history }) →\n    Eq main.block?\n        (Option.some\n          { fst := defs, snd := { fst := bodies, snd := { fst := body, snd := layers } } }) →\n      ∀ {classDecls : List TypeScript.ClassDecl},\n        Eq (Effect4.Codegen.Classes.readClassDecls classDecls) (Option.some classes) →\n          (∀ (d : Effect4.Program.DefDecl),\n              List.instMembership.mem defs d → Eq d.readable Bool.true) →\n            (∀ (p : Prod Effect4.Program.DefDecl (Effect4.Program.Eff Op)),\n                List.instMembership.mem (defs.zip bodies.toList) p →\n                  Effect4.Program.ReadsBack classes ((sig.withDefs defs).withParams p.fst.params)\n                    (Effect4.Program.paramsSpell param p.fst.params\n                      (Effect4.Program.defsSpell call defs spell))\n                    1 p.snd) →\n              Effect4.Program.ReadsBack classes (sig.withDefs defs)\n                  (Effect4.Program.defsSpell call defs spell) 0 body →\n                (∀ (l : Effect4.Program.LayerTerm Op),\n                    List.instMembership.mem layers.toList l →\n                      Effect4.Program.LayerTerm.ReadsBack classes (sig.withDefs defs)\n                        (Effect4.Program.defsSpell call defs spell) l) →\n                  (∀ (k : Nat),\n                      instLTNat.lt k layers.toList.length →\n                        Eq\n                          (Effect4.Program.LayerTerm.readRefName\n                            (Effect4.Program.LayerTerm.refName (Effect4.Program.Path.layerPath k)))\n                          (Option.some (Effect4.Program.Path.layerPath k))) →\n                    (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                        List.instMembership.mem history entry →\n                          ∀ (d : Effect4.Program.DefDecl),\n                            Eq (Effect4.Program.bodyDeclOf defs entry.fst) (Option.some d) →\n                              Effect4.Program.LayerTerm.ReadsBack classes\n                                ((sig.withDefs defs).withParams d.params)\n                                (Effect4.Program.paramsSpell param d.params\n                                  (Effect4.Program.defsSpell call defs spell))\n                                entry.snd) →\n                      (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                          List.instMembership.mem history entry →\n                            Eq (Effect4.Program.bodyDeclOf defs entry.fst) Option.none →\n                              Effect4.Program.LayerTerm.ReadsBack classes (sig.withDefs defs)\n                                (Effect4.Program.defsSpell call defs spell) entry.snd) →\n                        (∀ (entry : Prod (List Nat) (Effect4.Program.LayerTerm Op)),\n                            List.instMembership.mem history entry →\n                              Eq\n                                (Effect4.Program.LayerTerm.readRefName\n                                  (Effect4.Program.LayerTerm.refName entry.fst))\n                                (Option.some entry.fst)) →\n                          ∀ {name : String} {ty : Effect4.Program.EffTy}\n                            {decls : List TypeScript.ConstDecl},\n                            Eq (Effect4.Program.printModule sig name ty root) (Except.ok decls) →\n                              Eq\n                                (Effect4.Program.readModule sig spell call param\n                                  (instHAppendOfAppend.hAppend\n                                    (List.map TypeScript.Decl.classDecl classDecls)\n                                    (List.map TypeScript.Decl.const decls)))\n                                (Except.ok root)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":330,"lemmas":59,"nearest":["Effect4.Program.table_head","Conform.Effect4.Typing.check_sound","Effect4.Program.refusals_of_hasTy"]},"doc":"**The head of the list of refusals is the located refusal of `explain`.** The root's entry\nis first in the table, and its answer is the checker's on the whole program. It says nothing\nof the order after the head. A step of `address-table`. Its consumers are `refusals_nil_iff`\nand the query driver's refusals (slice QUERY). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.refusals_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.refusals s env0 p).head? (Effect4.Program.explain s env0 p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":329,"lemmas":55,"nearest":["Effect4.Program.table_result_refusal_none_of_hasTy"]},"doc":"On a typed program the list of refusals is empty. A step of `address-table`. Its consumers\nare `refusals_head` and `refusals_nil_iff`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.refusals_of_hasTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env0 p T → Eq (Effect4.Program.refusals s env0 p) List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":12,"lemmas":1,"nearest":[]},"doc":"**Below a program node that is no block, every path has the node's scope.** A step of\n`denote-typed`; its consumer is `argSites_typed` (`Typed/Denotation.lean`): the sites of an\ninvocation's programs stand below it. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.scopeParams_below","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} {root : Effect4.Program.Eff Op} {path : List Nat} {e : Effect4.Program.Eff Op},\n  Eq ((Effect4.Program.Node.eff root).at_ path) (Option.some (Effect4.Program.Node.eff e)) →\n    (∀ (d : List Effect4.Program.DefDecl) (b : Effect4.Program.Effs Op) (m : Effect4.Program.Eff Op)\n        (l : Effect4.Program.LayerTerms Op), Ne e (Effect4.Program.Eff.defs d b m l)) →\n      ∀ (q : List Nat),\n        Eq (Effect4.Program.scopeParams root (instHAppendOfAppend.hAppend path q))\n          (Effect4.Program.scopeParams root path)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":13,"lemmas":1,"nearest":[]},"doc":"**The body of definition `k` has definition `k`'s parameters.** A step of `denote-typed`;\nits consumers are `call_arm` and `invoke_arm` (`Typed/Denotation.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.scopeParams_body","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {root : Effect4.Program.NativeEff} {k : Nat} {path : List Nat} {d : Effect4.Program.DefDecl},\n  Eq (Effect4.Program.defBodyPath root k) (Option.some path) →\n    Eq (List.instGetElem?NatLtLength.getElem? (Effect4.Program.Eff.defsOf root) k) (Option.some d) →\n      Eq (Effect4.Program.scopeParams root path) d.params","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":11,"lemmas":1,"nearest":[]},"doc":"**A child of a program node has the node's scope.** A step of `denote-typed`; its consumer is\n`pointTyped_child` (`Typed/Denotation.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.scopeParams_child","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} {root : Effect4.Program.Eff Op} {path : List Nat} {e : Effect4.Program.Eff Op},\n  Eq ((Effect4.Program.Node.eff root).at_ path) (Option.some (Effect4.Program.Node.eff e)) →\n    ∀ (i : Nat),\n      Eq\n        (Effect4.Program.scopeParams root (instHAppendOfAppend.hAppend path (List.cons i List.nil)))\n        (Effect4.Program.scopeParams root path)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":1,"nearest":[]},"doc":"**The scope is empty or some declaration's parameters.** A step of `denote-typed`; its\nconsumer is `param_arm` (`Typed/Denotation.lean`), which reads the parameter's formation from its\ndeclaration's (`BodiesTyped`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.scopeParams_decl","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (root : Effect4.Program.Eff Op) (path : List Nat),\n  Or (Eq (Effect4.Program.scopeParams root path) List.nil)\n    (Exists fun k =>\n      Exists fun d =>\n        And (Eq (List.instGetElem?NatLtLength.getElem? root.defsOf k) (Option.some d))\n          (Eq (Effect4.Program.scopeParams root path) d.params))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":11,"lemmas":1,"nearest":[]},"doc":"**Below a layer node every path has the node's scope**: a layer is no spine and stands below\nthe root. A step of `denote-typed`; its consumers are the layer arms (`layerPointTyped_scope`,\n`Typed/LayerArm.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Scope","name":"Effect4.Program.scopeParams_layer_below","placement":{"concept":"residual-program-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} {root : Effect4.Program.Eff Op} {path : List Nat} {l : Effect4.Program.LayerTerm Op},\n  Eq ((Effect4.Program.Node.eff root).at_ path) (Option.some (Effect4.Program.Node.layer l)) →\n    ∀ (q : List Nat),\n      Eq (Effect4.Program.scopeParams root (instHAppendOfAppend.hAppend path q))\n        (Effect4.Program.scopeParams root path)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A key that a signature types has a carrier there. A step of `omit-splices-table`. Its\nconsumers are the service rules of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.sigOkKey_of_serviceTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {key : Effect4.ServiceKey}\n  {ty : Effect4.Program.Ty}, Eq (s.serviceTy key) (Option.some ty) → Effect4.Program.SigOkKey s key","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":327,"lemmas":54,"nearest":["Effect4.Program.SigApp.withHoles_extends","Effect4.Program.check_ext","Effect4.Program.SigApp.withHoles_withHoles"]},"doc":"**H2**: a sketch that the checker admits stays admitted, at the same type, when more holes\nare declared after its own. It is C3's monotone half (`check_ext`) at the longer hole table. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.sketch_more_holes","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes more : Effect4.Program.RowTable)\n  {e : Effect4.Program.NativeEff} {env : Effect4.Program.TyEnv} {p : List Nat}\n  {t : Effect4.Program.EffTy},\n  Eq (Effect4.Program.Checker.check (app.withHoles holes).signature env p e) (Except.ok t) →\n    Eq\n      (Effect4.Program.Checker.check\n        (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n      (Except.ok t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":401,"lemmas":54,"nearest":["Effect4.Program.SigApp.withHoles_extends","Effect4.Program.check_restrict","Effect4.Program.SigApp.withHoles_withHoles"]},"doc":"**H3**: the checker reads the rows of the holes that the sketch performs, and no later row.\nA program that performs only the application's operations and the holes of `holes` is checked\nthe same when more holes are declared, refusals included. So a filled hole's row can stay in\nthe table: the checker no longer reads it. ","kind":"theorem","module":"Effect4.Laws.Program.Sketch","name":"Effect4.Program.sketch_reads_its_holes","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) (holes more : Effect4.Program.RowTable)\n  {e : Effect4.Program.NativeEff},\n  Effect4.Program.SigProgram (app.withHoles holes).signature e →\n    ∀ (env : Effect4.Program.TyEnv) (p : List Nat),\n      Eq\n        (Effect4.Program.Checker.check\n          (app.withHoles (instHAppendOfAppend.hAppend holes more)).signature env p e)\n        (Effect4.Program.Checker.check (app.withHoles holes).signature env p e)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":596,"lemmas":66,"nearest":[]},"doc":"**At each cut of a compiled command loop, a fiber that a pending command steps has not\nexited** (the proposed registry claim `stepped-fiber-live`; concept\n`scope-lifetime-finalization`, requirement R11). The guard's queue gives the fiber of each\npending `Cmd.loop` and `Cmd.deliver` as running and not parked, and the guard's state gives each\nexited fiber as not running. It is the second fact of the bracket, and its own source.\n\nSo no compiled program reaches a machine where the command loop steps an exited fiber. The\ninvariant `MaskRuns` ranges over the live fibers for that machine's sake\n(`Laws/Machine/MaskRuns.lean`).\n\nReach: every program and row table, and each machine and pending commands that hold the guard's\nstate and the guard's queue. `Guard.driveStep_invariants` keeps both along a command loop, and\n`Guard.guardState_reachable` gives the state at each reachable machine.\n\nIt does not establish that a fiber is stepped, and it gives nothing of a fiber that no pending\ncommand steps. The statement is false at a hand-written interpreter: there the command loop\nsteps an exited fiber, and `Test/Machine/MaskBracket.lean` holds two such cuts.\n\nIts consumers are `compiled_region_bracket`, and each law that reads a fiber at its own step. ","kind":"theorem","module":"Effect4.Laws.Program.MaskBracket","name":"Effect4.Program.stepped_live","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (p : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  {m : Effect4.Program.NativeMachine} {cmds : List Effect4.Program.Guard.NCmd},\n  Effect4.Program.Guard.GuardState m →\n    Effect4.Program.Guard.GuardQueue p table m cmds →\n      ∀ {c : Effect4.Program.Guard.NCmd},\n        List.instMembership.mem cmds c →\n          ∀ {id : Effect4.FiberId},\n            Effect4.Machine.Steps id c →\n              ∀ {f : Effect4.Program.Guard.NFiber},\n                Eq (Effect4.Machine.RunMachine.fiber? m id) (Option.some f) →\n                  Eq\n                    (f.exit\n                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann)\n                      (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                        Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                        Effect4.FiberId Effect4.Machine.Ann))\n                    Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":55,"nearest":["Effect4.Program.UnionRule.closed_join","Effect4.Program.ClosedEnv.nil","Effect4.Program.closed_fiberTy","Effect4.Program.closed_listOf","Effect4.Program.termTy_closed","Effect4.Program.closed_joinAnswer","Effect4.Program.GenTy.closed_merge","Effect4.Program.GenTy.closed_seq","Effect4.Program.ClosedEnv.push","Effect4.Program.closed_getD","Effect4.Program.ClosedEnv.append","Effect4.Program.Decision.closed_arms","Effect4.Program.closed_catchIfError","Effect4.Program.GenTy.closed_genAnswer","Effect4.Program.closed_rowTy","Effect4.Program.causeTy_closed"]},"doc":"A generator body leaves a closed state. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.stmtsHasTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv} {inLoop : Bool} {b : Effect4.Program.Stmts Op}\n      {g : Effect4.Program.GenTy},\n      Conform.Effect4.Typing.StmtsHasTy sig env inLoop b g →\n        Effect4.Program.ClosedEnv env →\n          Effect4.Program.Formation.AnnotationsClosed Effect4.Program.EffFam.stmts b → g.Closed","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.Program.NodeHasTy.replace"]},"doc":"The replacement law, at a statement list. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Replace","name":"Effect4.Program.stmtsHasTy_replace","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv} {inLoop : Bool}\n  {b : Effect4.Program.Stmts Op} {q : Effect4.Program.Eff Op} {g : Effect4.Program.GenTy}\n  {path : List Nat},\n  Conform.Effect4.Typing.StmtsHasTy s env0 inLoop b g →\n    Eq ((Effect4.Program.Node.stmts b).at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Exists fun env =>\n        Exists fun t =>\n          And (Conform.Effect4.Typing.HasTy s env q t)\n            (∀ {s' : Effect4.Program.Signature Op} {q' : Effect4.Program.Eff Op}\n              {b' : Effect4.Program.Stmts Op},\n              Effect4.Program.SigExtends s s' →\n                Conform.Effect4.Typing.HasTy s' env q' t →\n                  Eq ((Effect4.Program.Node.stmts b).replaceAt path (Effect4.Program.Node.eff q'))\n                      (Option.some (Effect4.Program.Node.stmts b')) →\n                    Conform.Effect4.Typing.StmtsHasTy s' env0 inLoop b' g)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":54,"nearest":["Effect4.Program.sigOkKey_of_serviceTy"]},"doc":"A typed generator body reads only its signature. A step of `hasTy_sigProgram`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Restrict","name":"Effect4.Program.stmtsHasTy_sigProgram","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv} {inLoop : Bool}\n  {b : Effect4.Program.Stmts Op} {g : Effect4.Program.GenTy},\n  Conform.Effect4.Typing.StmtsHasTy s env inLoop b g →\n    Effect4.Program.cata_stmts\n      (Effect4.Program.readsAlg (Effect4.Program.SigOkOp s) (Effect4.Program.SigOkKey s)\n        (Effect4.Program.SigOkDef s))\n      b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":125,"nearest":[]},"doc":"A cause type is below the upper type of its error type. A step of `Member.cause_upper`, its\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.subN_causeOf_causeUpper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (e : Effect4.Program.Ty), Eq (e.causeOf.subN (Effect4.Program.causeUpper e)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":125,"nearest":["Effect4.Program.Ty.subN_trans","Effect4.Program.Ty.subN_refl","Effect4.Program.Ty.subN_exitOf_iff"]},"doc":"An exit type is below the upper type of its error type, whatever its value type is. A step\nof `Member.cause_upper`, its consumer. ","kind":"theorem","module":"Effect4.Laws.Program.Eliminators","name":"Effect4.Program.subN_exitOf_causeUpper","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (v e : Effect4.Program.Ty), Eq ((v.exitOf e).subN (Effect4.Program.causeUpper e)) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":290,"lemmas":54,"nearest":["Effect4.Program.tableEntryAt_nil","Effect4.Program.childAddresses_map_tableEntryAt","Effect4.Program.Node.addresses_eq_cons"]},"doc":"**The table at a node, one step down**: the node's own entry, then the table of each child\nat the child's address, from the environment that the step function gives the child. A step of\n`annotate-table`. Its consumers are the cases of `Annotate.check_eq` and its siblings. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.tableAt_eq_cons","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ctx : Option Effect4.Program.NodeEnv)\n  (n : Effect4.Program.Node Op) (a : List Nat),\n  Eq (Effect4.Program.tableAt s ctx n a)\n    (List.cons { path := a, env := ctx, result := Effect4.Program.nodeAnswer s ctx n a }\n      (instHAppendOfAppend.hAppend (Effect4.Program.childTableAt s ctx n a 0)\n        (instHAppendOfAppend.hAppend (Effect4.Program.childTableAt s ctx n a 1)\n          (Effect4.Program.childTableAt s ctx n a 2))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":54,"nearest":["Effect4.Program.mem_addresses_iff"]},"doc":"The table at a node holds an entry at every address of its subtree. A step of\n`tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.tableAt_mem_path","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {ctx : Option Effect4.Program.NodeEnv}\n  {n x : Effect4.Program.Node Op} {pre b : List Nat},\n  Eq (n.at_ b) (Option.some x) →\n    Exists fun e =>\n      And (List.instMembership.mem (Effect4.Program.tableAt s ctx n pre) e)\n        (Eq e.path (instHAppendOfAppend.hAppend pre b))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":289,"lemmas":54,"nearest":[]},"doc":"**A subtree that is not reached**: its table holds no environment and no answer at any\naddress, which is the traversal's record of it. A step of `annotate-table`. Its consumers are\nthe cases of `Annotate.check_eq` and its siblings where a read is refused. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.tableAt_none","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (n : Effect4.Program.Node Op) (a : List Nat),\n  Eq (Effect4.Program.tableAt s Option.none n a) (Effect4.Program.Annotate.unreached a n)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":54,"nearest":[]},"doc":"Every entry of the table at a node stands at an extension of the node's address. A step of\n`tableAt_splice`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.tableAt_path","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {ctx : Option Effect4.Program.NodeEnv}\n  {n : Effect4.Program.Node Op} {pre : List Nat} {e : Effect4.Program.Table.Entry},\n  List.instMembership.mem (Effect4.Program.tableAt s ctx n pre) e →\n    Exists fun b => Eq e.path (instHAppendOfAppend.hAppend pre b)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":289,"lemmas":54,"nearest":["Effect4.Program.tableAt_eq_cons"]},"doc":"A call's table is its one entry. A step of `omit-splices-table`. Its consumer is\n`Sketch.table_omit`. ","kind":"theorem","module":"Effect4.Laws.Program.Edit","name":"Effect4.Program.tableAt_perform","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv} {op : Op}\n  {request : Effect4.Program.Term} (a : List Nat),\n  Eq\n    (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env env))\n      (Effect4.Program.Node.eff (Effect4.Program.Eff.perform op request)) a)\n    (List.cons\n      { path := a, env := Option.some (Effect4.Program.NodeEnv.env env),\n        result :=\n          Option.some\n            (Effect4.Program.Checker.check s env a (Effect4.Program.Eff.perform op request)) }\n      List.nil)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":294,"lemmas":54,"nearest":["Effect4.Program.Checker.check_rebase"]},"doc":"**A subtree's table at `q ++ a` is its table at `a`, each entry moved below `q`.** So a\ntable computed once for a subtree stands at any address. A step of `checker-base-natural`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Rebase","name":"Effect4.Program.tableAt_rebase","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ctx : Option Effect4.Program.NodeEnv)\n  (n : Effect4.Program.Node Op) (q a : List Nat),\n  Eq (Effect4.Program.tableAt s ctx n (instHAppendOfAppend.hAppend q a))\n    (List.map (Effect4.Program.Table.Entry.rebase q) (Effect4.Program.tableAt s ctx n a))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":301,"lemmas":56,"nearest":["Effect4.Program.Node.child_add_three","Effect4.Program.Table.splice_three","Effect4.Program.tableAt_eq_cons","Effect4.Program.Table.under_prefix_false","Effect4.Program.tableAt_mem_path","Effect4.Program.Table.under_sibling_false","Effect4.Program.nodeAnswer_replace_kept","Effect4.Program.Node.childEnv_replace_kept","Effect4.Program.NodeHasTy.child_step","Effect4.Program.Table.under_append","Effect4.Program.tableAt_path","Effect4.Program.Table.splice_all_under"]},"doc":"**The splice at a node**, by induction along the path: the table of the edited node is the\nold table with the subtree at the path replaced by the new sub-program's table. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.tableAt_splice","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} (path : List Nat) {n n' : Effect4.Program.Node Op}\n  {τ : Effect4.Program.NodeTy Op} {pre : List Nat} {q q' : Effect4.Program.Eff Op}\n  {env : Effect4.Program.TyEnv} {t : Effect4.Program.EffTy},\n  Effect4.Program.NodeHasTy s n τ →\n    Eq (n.at_ path) (Option.some (Effect4.Program.Node.eff q)) →\n      Eq (Effect4.Program.Node.envAt s τ.env n path)\n          (Option.some (Effect4.Program.NodeEnv.env env)) →\n        Conform.Effect4.Typing.HasTy s env q t →\n          Conform.Effect4.Typing.HasTy s env q' t →\n            Eq (n.replaceAt path (Effect4.Program.Node.eff q')) (Option.some n') →\n              Eq (Effect4.Program.tableAt s (Option.some τ.env) n' pre)\n                (Effect4.Program.Table.splice (Effect4.Program.tableAt s (Option.some τ.env) n pre)\n                  (instHAppendOfAppend.hAppend pre path)\n                  (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env env))\n                    (Effect4.Program.Node.eff q') (instHAppendOfAppend.hAppend pre path)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":279,"lemmas":54,"nearest":[]},"doc":"The entry at a node itself holds the node's environment and its answer. A step of\n`annotate-table`. Its consumer is `tableAt_eq_cons`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.tableEntryAt_nil","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (ctx : Option Effect4.Program.NodeEnv)\n  (n : Effect4.Program.Node Op) (a : List Nat),\n  Eq (Effect4.Program.tableEntryAt s ctx n a List.nil)\n    { path := a, env := ctx, result := Effect4.Program.nodeAnswer s ctx n a }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":286,"lemmas":54,"nearest":[]},"doc":"**The address table is the table at the root**, by definition. A step of `annotate-table`.\nIts consumer is `annotate_eq_table`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.table_eq_tableAt","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Eq (Effect4.Program.table s env0 p)\n    (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env env0))\n      (Effect4.Program.Node.eff p) List.nil)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":286,"lemmas":54,"nearest":["Effect4.Program.addresses_eff_head"]},"doc":"The table of a program starts with the root's entry: the root's environment, and the\nchecker's answer on the whole program. A step of `address-table`. Its consumer is\n`refusals_head`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.table_head","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (s : Effect4.Program.Signature Op) (env0 : Effect4.Program.TyEnv)\n  (p : Effect4.Program.Eff Op),\n  Exists fun rest =>\n    Eq (Effect4.Program.table s env0 p)\n      (List.cons\n        { path := List.nil, env := Option.some (Effect4.Program.NodeEnv.env env0),\n          result := Option.some (Effect4.Program.Checker.check s env0 List.nil p) }\n        rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":294,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.focusAt_eq_some","Effect4.Program.hasTy_focusAt"]},"doc":"On a typed program no entry of the table holds a refusal: the checker answers a type at\nevery address of a program (`hasTy_focusAt`). A step of `address-table`. Its consumer is\n`refusals_of_hasTy`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.table_result_refusal_none_of_hasTy","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    ∀ {e : Effect4.Program.Table.Entry},\n      List.instMembership.mem (Effect4.Program.table s env0 p) e →\n        Eq (e.result.bind Effect4.Program.Checker.refusal) Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":299,"lemmas":56,"nearest":["Conform.Effect4.Typing.check_sound","Effect4.Program.tableAt_splice","Effect4.Program.table_eq_tableAt","Effect4.Program.focusAt_eq_some"]},"doc":"**An edit that keeps its focus's type splices the address table** (the claim\n`edit-splices-table`). In a program that the checker types, take the focus that `focusAt`\nanswers at an address. Replace the sub-program there by a program of the focus's type in the\nfocus's environment. The edited program's table is the old table with the subtree at the address\nreplaced by the new sub-program's table, at the focus's environment and at the subtree's own\naddresses. Nothing outside the subtree is checked again. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Splice","name":"Effect4.Program.table_splice","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env0 : Effect4.Program.TyEnv}\n  {p p' q' : Effect4.Program.Eff Op} {T : Effect4.Program.EffTy} {path : List Nat}\n  {f : Effect4.Program.Focus Op},\n  Conform.Effect4.Typing.HasTy s env0 p T →\n    Eq (Effect4.Program.focusAt s env0 p path) (Option.some f) →\n      Conform.Effect4.Typing.HasTy s f.env q' f.ty →\n        Eq ((Effect4.Program.Node.eff p).replaceAt path (Effect4.Program.Node.eff q'))\n            (Option.some (Effect4.Program.Node.eff p')) →\n          Eq (Effect4.Program.table s env0 p')\n            (Effect4.Program.Table.splice (Effect4.Program.table s env0 p) path\n              (Effect4.Program.tableAt s (Option.some (Effect4.Program.NodeEnv.env f.env))\n                (Effect4.Program.Node.eff q') path))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":118,"lemmas":38,"nearest":["Effect4.Program.argTy_closed"]},"doc":"A term's type is closed. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.termTy_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {sig : Effect4.Program.Signature Op},\n  Effect4.Program.ClosedSig sig →\n    ∀ {env : Effect4.Program.TyEnv},\n      Effect4.Program.ClosedEnv env →\n        ∀ {t : Effect4.Program.Term} {ty : Effect4.Program.Ty},\n          Effect4.Program.Formation.TermAll (fun t => Eq t.closed Bool.true) t →\n            Eq (Effect4.Program.termTy sig env t) (Option.some ty) → Eq ty.closed Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":132,"lemmas":39,"nearest":[]},"doc":"**A term's check at any path gives `termTy`'s answer.** A step of `annotate-table`. Its\nconsumers are the cases of `select` and `iterate` in `Annotate.check_eq`, whose children read a\nterm's type. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"Effect4.Program.termTy_of_term?","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} {s : Effect4.Program.Signature Op} {env : Effect4.Program.TyEnv} {q : List Nat}\n  {t : Effect4.Program.Term} {x : Except Effect4.Program.TypeRefusal Effect4.Program.Ty},\n  Eq (Effect4.Program.Checker.term? s env q t) x → Eq (Effect4.Program.termTy s env t) x.toOption","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":417,"lemmas":57,"nearest":["Effect4.Program.ClosedEnv.nil","Effect4.Program.hasTy_closed","Effect4.Program.checkModule_sound","Effect4.Program.Formation.annotationsClosed_of_formed","Effect4.Program.Formation.annotationsAll_expandRefs"]},"doc":"**A formed program that the whole-program checker admits has closed types.** The checker\ntypes the program's expansion, and the expansion states what the program states\n(`Formation.annotationsAll_expandRefs`). So the formation premise is the stored program's, with\nits layer references as they are written. It is `check_closed` at the checker that admission\nand the API run (`typeOfProgram`). ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.typeOfProgram_closed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} [inst : Effect4.Program.ScopedOp Op] (sig : Effect4.Program.Signature Op),\n  Effect4.Program.ClosedSig sig →\n    ∀ {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n      Effect4.Program.Formation.Formed (Effect4.Program.Formation.programSites e) →\n        Eq (Effect4.Program.typeOfProgram sig e) (Option.some t) →\n          And (Eq t.answer.closed Bool.true) (Eq t.error.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":452,"lemmas":54,"nearest":["Effect4.Program.Formation.inputFormed_program","Effect4.Program.Formation.inputFormed_services","Effect4.Program.closedSig_app","Effect4.Program.typeOfProgram_closed"]},"doc":"`typeOfProgram_closed` at an application's signature: formation of the input is its one\npremise. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Closed","name":"Effect4.Program.typeOfProgram_closed_app","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ (app : Effect4.Program.SigApp) {e : Effect4.Program.NativeEff} {t : Effect4.Program.EffTy},\n  Effect4.Program.Formation.InputFormed e app.rows app.services →\n    Eq (Effect4.Program.typeOfProgram app.signature e) (Option.some t) →\n      And (Eq t.answer.closed Bool.true) (Eq t.error.closed Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":389,"lemmas":58,"nearest":["Effect4.Program.expanded_refs_nil_of_wf"]},"doc":"C4 typing equation with its one premise, well-formed original layer references: the\nchecker's answer on the expanded program is its answer on the program. The expansion has no\nreference site (`expanded_refs_nil_of_wf`), so it is well formed and its own expansion. The\ntheorem does not say that either answer is a type. The premise stays: the checker refuses a\nprogram with a forward reference, and it types that program's expansion\n(`Test/Program/ReferenceExpansion.lean`, `forward_needs_wellFormed`). ","kind":"theorem","module":"Effect4.Laws.Program.ReferenceTyping","name":"Effect4.Program.typeOfProgram_expandRefs","placement":{"concept":"initial-algebras-folds","requirement":"R5"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op) (p : Effect4.Program.Eff Op),\n  Eq p.layerRefsWF Bool.true →\n    Eq (Effect4.Program.typeOfProgram sig p.expandRefs) (Effect4.Program.typeOfProgram sig p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":376,"lemmas":55,"nearest":["Effect4.Program.checkModule_sound","Effect4.Program.moduleHasTy_ext","Effect4.Program.checkModule_complete"]},"doc":"**The whole program's typing along an extension**: a program `typeOfProgram` admits under\n`s` it admits under every extension `s'`, at the same type. ","kind":"theorem","module":"Effect4.Laws.Program.Definitions","name":"Effect4.Program.typeOfProgram_ext","placement":{"concept":"initial-algebras-folds","requirement":"R2"},"restsOn":[],"statement":"∀ {Op : Type} {s s' : Effect4.Program.Signature Op},\n  Effect4.Program.SigExtends s s' →\n    ∀ {e : Effect4.Program.Eff Op} {t : Effect4.Program.EffTy},\n      Eq (Effect4.Program.typeOfProgram s e) (Option.some t) →\n        Eq (Effect4.Program.typeOfProgram s' e) (Option.some t)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":9,"lemmas":0,"nearest":[]},"doc":"The address yield at a node is the node's path alone. A step of `address-table`. Its\nconsumer is `mem_addresses_iff`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Table","name":"Effect4.Program.yieldAt_addressYield","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {Op : Type} (m : Effect4.Program.Node Op) (p : List Nat),\n  Eq (Effect4.Program.Node.yieldAt Effect4.Program.addressYield m p) (List.cons p List.nil)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":165,"lemmas":21,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; initial_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.initial_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Eq\n  (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused Unit.unit\n    Effect4.PubSub.Data.initial)\n  (Effect4.PubSub.encoded Effect4.PubSub.Model.initial)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":306,"lemmas":25,"nearest":["Effect4.PubSub.Model.initial_eval","Effect4.Modules.Step.sound"]},"doc":"The empty source reads the independent model's initial image. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.initial_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val},\n  Effect4.Modules.Reads Effect4.PubSub.initialStep env path vals\n    ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal Effect4.PubSub.Model.initial)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":200,"lemmas":31,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; poll_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.poll_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PubSub.Model.State) (id : Nat),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused (Effect4.PubSub.named s id)\n      Effect4.PubSub.Data.poll)\n    { fst := (Effect4.PubSub.Model.poll s id).fst,\n      snd := Effect4.PubSub.encoded (Effect4.PubSub.Model.poll s id).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":342,"lemmas":31,"nearest":["Effect4.PubSub.Model.poll_eval","Effect4.Modules.Step.sound"]},"doc":"Helper of pubsub-single-steps-agree: observe the poll reply and next state. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.poll_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PubSub.Model.State) (id : Nat) {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n      Effect4.Modules.Reads cellSrc env path vals\n          ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n        Effect4.Modules.Reads (Effect4.PubSub.pollStep idSrc cellSrc) env path vals\n          ((Effect4.Store.Image.nat.option.tuple2\n                (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n            (Effect4.PubSub.Model.poll s id))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":339,"lemmas":28,"nearest":["Effect4.PubSub.Model.slide_reads","Effect4.PubSub.Model.unsubscribe_reads","Effect4.PubSub.Model.poll_reads","Effect4.PubSub.Model.tryPublish_reads","Effect4.PubSub.Model.subscribe_reads","Effect4.PubSub.Model.initial_reads"]},"doc":"The six pure source observations agree with the independent model images.\nThis claim retains fresh subscribe names and aligned fold scopes.\nModel.Live bounds its source interpretation; the formal equations do not require it. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.single_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"And\n  (∀ (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n    Effect4.Modules.Reads Effect4.PubSub.initialStep env path vals\n      ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal\n        Effect4.PubSub.Model.initial))\n  (And\n    (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n      (idSrc cellSrc : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n      (path : List Nat) (vals : List Effect4.Store.Val),\n      Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n        Effect4.Modules.Reads cellSrc env path vals\n            ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n          Effect4.PubSub.Model.Fresh s id →\n            Effect4.Modules.Reads (Effect4.PubSub.subscribeStep idSrc cellSrc) env path vals\n              ((Effect4.Store.Image.unit.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                (Effect4.PubSub.Model.subscribe s id)))\n    (And\n      (∀ (s : Effect4.PubSub.Model.State) (message : Nat)\n        (messageSrc cellSrc : Effect4.Program.Authoring.TermSrc)\n        (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n        Effect4.Modules.Reads messageSrc env path vals (Effect4.Store.Val.nat message) →\n          Effect4.Modules.Reads cellSrc env path vals\n              ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n            Effect4.Modules.Reads (Effect4.PubSub.tryPublishStep messageSrc cellSrc) env path vals\n              ((Effect4.Store.Image.bool.tuple2\n                    (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                (Effect4.PubSub.Model.tryPublish s message)))\n      (And\n        (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n          (idSrc cellSrc : Effect4.Program.Authoring.TermSrc) (env : Effect4.Program.Authoring.Env)\n          (path : List Nat) (vals : List Effect4.Store.Val),\n          Eq vals.length (List.length env.names) →\n            Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n              Effect4.Modules.Reads cellSrc env path vals\n                  ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n                Effect4.Modules.Reads (Effect4.PubSub.pollStep idSrc cellSrc) env path vals\n                  ((Effect4.Store.Image.nat.option.tuple2\n                        (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                    (Effect4.PubSub.Model.poll s id)))\n        (And\n          (∀ (s : Effect4.PubSub.Model.State) (id : Nat)\n            (idSrc cellSrc : Effect4.Program.Authoring.TermSrc)\n            (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n            Eq vals.length (List.length env.names) →\n              Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n                Effect4.Modules.Reads cellSrc env path vals\n                    ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n                  Effect4.Modules.Reads (Effect4.PubSub.unsubscribeStep idSrc cellSrc) env path vals\n                    ((Effect4.Store.Image.unit.tuple2\n                          (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                      (Effect4.PubSub.Model.unsubscribe s id)))\n          (∀ (s : Effect4.PubSub.Model.State) (cellSrc : Effect4.Program.Authoring.TermSrc)\n            (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Store.Val),\n            Effect4.Modules.Reads cellSrc env path vals\n                ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n              Effect4.Modules.Reads (Effect4.PubSub.slideStep cellSrc) env path vals\n                ((Effect4.Store.Image.unit.tuple2\n                      (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n                  (Effect4.PubSub.Model.slide s)))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":178,"lemmas":21,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; slide_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.slide_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PubSub.Model.State),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n      { fst := Effect4.PubSub.encoded s, snd := Unit.unit } Effect4.PubSub.Data.slide)\n    { fst := Unit.unit, snd := Effect4.PubSub.encoded (Effect4.PubSub.Model.slide s).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":318,"lemmas":30,"nearest":["Effect4.PubSub.Model.slide_eval","Effect4.Modules.Step.sound"]},"doc":"Helper of pubsub-single-steps-agree: observe the slide reply and next state. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.slide_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PubSub.Model.State) {cellSrc : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads cellSrc env path vals\n      ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n    Effect4.Modules.Reads (Effect4.PubSub.slideStep cellSrc) env path vals\n      ((Effect4.Store.Image.unit.tuple2\n            (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n        (Effect4.PubSub.Model.slide s))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":181,"lemmas":21,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; subscribe_reads retains the fresh-name premise. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.subscribe_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PubSub.Model.State) (id : Nat),\n  Effect4.PubSub.Model.Fresh s id →\n    Eq\n      (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused (Effect4.PubSub.named s id)\n        Effect4.PubSub.Data.subscribe)\n      { fst := Unit.unit, snd := Effect4.PubSub.encoded (Effect4.PubSub.Model.subscribe s id).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":321,"lemmas":30,"nearest":["Effect4.PubSub.Model.subscribe_eval","Effect4.Modules.Step.sound"]},"doc":"Helper of pubsub-single-steps-agree: observe the subscribe reply and next state. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.subscribe_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PubSub.Model.State) (id : Nat) {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n    Effect4.Modules.Reads cellSrc env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n      Effect4.PubSub.Model.Fresh s id →\n        Effect4.Modules.Reads (Effect4.PubSub.subscribeStep idSrc cellSrc) env path vals\n          ((Effect4.Store.Image.unit.tuple2\n                (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n            (Effect4.PubSub.Model.subscribe s id))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":182,"lemmas":21,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; tryPublish_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.tryPublish_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PubSub.Model.State) (message : Nat),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused\n      (Effect4.PubSub.publishing s message) Effect4.PubSub.Data.tryPublish)\n    { fst := (Effect4.PubSub.Model.tryPublish s message).fst,\n      snd := Effect4.PubSub.encoded (Effect4.PubSub.Model.tryPublish s message).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":322,"lemmas":30,"nearest":["Effect4.PubSub.Model.tryPublish_eval","Effect4.Modules.Step.sound"]},"doc":"Helper of pubsub-single-steps-agree: observe the tryPublish reply and next state. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.tryPublish_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PubSub.Model.State) (message : Nat)\n  {messageSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n  Effect4.Modules.Reads messageSrc env path vals (Effect4.Store.Val.nat message) →\n    Effect4.Modules.Reads cellSrc env path vals\n        ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n      Effect4.Modules.Reads (Effect4.PubSub.tryPublishStep messageSrc cellSrc) env path vals\n        ((Effect4.Store.Image.bool.tuple2\n              (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n          (Effect4.PubSub.Model.tryPublish s message))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":201,"lemmas":31,"nearest":[]},"doc":"Helper of pubsub-single-steps-agree; unsubscribe_reads consumes this equation. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Data","name":"Effect4.PubSub.Model.unsubscribe_eval","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.PubSub.Model.State) (id : Nat),\n  Eq\n    (Effect4.Modules.Step.eval Effect4.Schema.Model.Leaves.refused (Effect4.PubSub.named s id)\n      Effect4.PubSub.Data.unsubscribe)\n    { fst := Unit.unit, snd := Effect4.PubSub.encoded (Effect4.PubSub.Model.unsubscribe s id).snd }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":343,"lemmas":31,"nearest":["Effect4.PubSub.Model.unsubscribe_eval","Effect4.Modules.Step.sound"]},"doc":"Helper of pubsub-single-steps-agree: observe the unsubscribe reply and next state. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.Model.unsubscribe_reads","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Store.Val}\n  (s : Effect4.PubSub.Model.State) (id : Nat) {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Reads idSrc env path vals (Effect4.Store.Val.nat id) →\n      Effect4.Modules.Reads cellSrc env path vals\n          ((Effect4.Schema.Modeled.image Effect4.PubSub.Model.State).toVal s) →\n        Effect4.Modules.Reads (Effect4.PubSub.unsubscribeStep idSrc cellSrc) env path vals\n          ((Effect4.Store.Image.unit.tuple2\n                (Effect4.Schema.Modeled.image Effect4.PubSub.Model.State)).toVal\n            (Effect4.PubSub.Model.unsubscribe s id))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":350,"lemmas":114,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the empty construction. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.initial_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig Effect4.PubSub.initialStep env path types Effect4.PubSub.cellTy","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":374,"lemmas":116,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the poll source. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.poll_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Eq types.length (List.length env.names) →\n        Effect4.Modules.TypesEach sig idSrc env path types Effect4.Program.Ty.nat →\n          Effect4.Modules.TypesEach sig cellSrc env path types Effect4.PubSub.cellTy →\n            Effect4.Modules.TypesEach sig (Effect4.PubSub.pollStep idSrc cellSrc) env path types\n              (Effect4.Program.Ty.nat.option.prod Effect4.PubSub.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":356,"lemmas":115,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the slide source. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.slide_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {cellSrc : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig cellSrc env path types Effect4.PubSub.cellTy →\n        Effect4.Modules.TypesEach sig (Effect4.PubSub.slideStep cellSrc) env path types\n          (Effect4.Program.Ty.unit.prod Effect4.PubSub.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":357,"lemmas":115,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the subscribe source. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.subscribe_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig idSrc env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig cellSrc env path types Effect4.PubSub.cellTy →\n          Effect4.Modules.TypesEach sig (Effect4.PubSub.subscribeStep idSrc cellSrc) env path types\n            (Effect4.Program.Ty.unit.prod Effect4.PubSub.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":359,"lemmas":115,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the tryPublish source. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.tryPublish_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {messageSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Effect4.Modules.TypesEach sig messageSrc env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig cellSrc env path types Effect4.PubSub.cellTy →\n          Effect4.Modules.TypesEach sig (Effect4.PubSub.tryPublishStep messageSrc cellSrc) env path\n            types (Effect4.Program.Ty.bool.prod Effect4.PubSub.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":375,"lemmas":116,"nearest":["Effect4.Modules.Step.typed"]},"doc":"Consumer of step-language-typed, R4, at the unsubscribe source. ","kind":"theorem","module":"Effect4.Laws.Library.PubSub.Steps","name":"Effect4.PubSub.unsubscribe_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty}\n      {idSrc cellSrc : Effect4.Program.Authoring.TermSrc},\n      Eq types.length (List.length env.names) →\n        Effect4.Modules.TypesEach sig idSrc env path types Effect4.Program.Ty.nat →\n          Effect4.Modules.TypesEach sig cellSrc env path types Effect4.PubSub.cellTy →\n            Effect4.Modules.TypesEach sig (Effect4.PubSub.unsubscribeStep idSrc cellSrc) env path\n              types (Effect4.Program.Ty.unit.prod Effect4.PubSub.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":287,"lemmas":11,"nearest":[]},"doc":"Completion recovery passes an input failure through with all stores left by the input.\nFor a success it uses the already compiled answer handler, including its failure result. ","kind":"theorem","module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.catchDone_meaning","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {onDone :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body rest : Effect4.Program.NativeEff} (stores : Effect4.Machine.Stores),\n  Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n    Eq\n        (Effect4.Pull.matchAnswer (Effect4.Program.Authoring.minted (env.mint \"answer\"))\n          (fun chunk => Effect4.Program.Authoring.succeed chunk) onDone\n          (env.push (List.cons (env.mint \"answer\") List.nil))\n          (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)))\n        (Except.ok rest) →\n      Exists fun tree =>\n        And (Eq (Effect4.Pull.catchDone self onDone env path) (Except.ok tree))\n          (Eq (Effect4.Program.Denote.meaning tree vals stores)\n            (Effect4.Pull.catchDone_meaning.match_1\n              (fun x => Prod Effect4.Machine.ExitV Effect4.Machine.Stores)\n              (Effect4.Program.Denote.meaning body vals stores)\n              (fun value after =>\n                Effect4.Program.Denote.meaning rest\n                  (instHAppendOfAppend.hAppend vals (List.cons value List.nil)) after)\n              fun cause after => { fst := Effect4.Exit.failure cause, snd := after }))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":286,"lemmas":12,"nearest":[]},"doc":"Exact protocol answers choose their stated handler and keep the incoming stores.\nThe end handler receives the leftover; the batch handler's reader projects its tagged list.\nThe selected handler's complete meaning, including a failure and changed stores, is retained. ","kind":"theorem","module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.matchAnswer_meaning","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {answer : Effect4.Program.Authoring.TermSrc}\n  {onSuccess onDone :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {success done : Effect4.Program.NativeEff}\n  (reply : Except Effect4.Machine.Val (List Effect4.Machine.Val)) (stores : Effect4.Machine.Stores),\n  Effect4.Modules.Reads answer env path vals\n      (Effect4.Pull.matchAnswer_meaning.match_1 (fun reply => Effect4.Machine.Val) reply\n        (fun leftover => Effect4.Program.Stream.endVal leftover) fun items =>\n        Effect4.Program.Stream.chunkVal items) →\n    Eq\n        (onDone (Effect4.Program.Authoring.minted (env.mint \"payload\"))\n          (env.push (List.cons (env.mint \"payload\") List.nil))\n          (instHAppendOfAppend.hAppend path (List.cons 0 List.nil)))\n        (Except.ok done) →\n      Eq\n          (onSuccess\n            (Effect4.Program.Authoring.app \"snd\"\n              (List.cons (Effect4.Program.Authoring.minted (env.mint \"rest\")) List.nil))\n            (env.push (List.cons (env.mint \"rest\") List.nil))\n            (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)))\n          (Except.ok success) →\n        Exists fun tree =>\n          And (Eq (Effect4.Pull.matchAnswer answer onSuccess onDone env path) (Except.ok tree))\n            (Eq (Effect4.Program.Denote.meaning tree vals stores)\n              (Effect4.Pull.matchAnswer_meaning.match_1\n                (fun reply => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) reply\n                (fun leftover =>\n                  Effect4.Program.Denote.meaning done\n                    (instHAppendOfAppend.hAppend vals (List.cons leftover List.nil)) stores)\n                fun items =>\n                Effect4.Program.Denote.meaning success\n                  (instHAppendOfAppend.hAppend vals\n                    (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                  stores))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":11,"nearest":[]},"doc":"Cause matching chooses once, on the input's exit, with the input's resulting stores.\nNo result of the success, completion or failure handler re-enters another handler. ","kind":"theorem","module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.matchEffect_meaning","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp} {options : Effect4.Pull.Handlers}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success failure : Effect4.Program.NativeEff} (stores : Effect4.Machine.Stores),\n  Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n    Eq\n        (Effect4.Pull.matchAnswer (Effect4.Program.Authoring.minted (env.mint \"value\"))\n          options.onSuccess options.onDone (env.push (List.cons (env.mint \"value\") List.nil))\n          (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)))\n        (Except.ok success) →\n      Eq\n          (options.onFailure (Effect4.Program.Authoring.minted (env.mint \"cause\"))\n            (env.push (List.cons (env.mint \"cause\") List.nil))\n            (instHAppendOfAppend.hAppend path (List.cons 2 List.nil)))\n          (Except.ok failure) →\n        Exists fun tree =>\n          And (Eq (Effect4.Pull.matchEffect self options env path) (Except.ok tree))\n            (Eq (Effect4.Program.Denote.meaning tree vals stores)\n              (Effect4.Pull.catchDone_meaning.match_1\n                (fun x => Prod Effect4.Machine.ExitV Effect4.Machine.Stores)\n                (Effect4.Program.Denote.meaning body vals stores)\n                (fun value after =>\n                  Effect4.Program.Denote.meaning success\n                    (instHAppendOfAppend.hAppend vals (List.cons value List.nil)) after)\n                fun cause after =>\n                Effect4.Program.Denote.meaning failure\n                  (instHAppendOfAppend.hAppend vals\n                    (List.cons (Effect4.Machine.Val.exitErr cause) List.nil))\n                  after))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":291,"lemmas":14,"nearest":["Effect4.Pull.matchEffect_meaning","Effect4.Pull.matchAnswer_meaning"]},"doc":"Under an exact input observation, Pull chooses its one protocol handler.\nAll handlers elaborate at their actual scopes. The selected handler receives the input's\nresulting stores; its complete exit and final stores are the result. This is a law of the\nexisting denotation, not a scheduling or host correspondence theorem. ","kind":"theorem","module":"Effect4.Laws.Library.Pull.Protocol","name":"Effect4.Pull.matchEffect_protocol","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {self : Effect4.Program.Authoring.Src Effect4.Program.NativeOp} {options : Effect4.Pull.Handlers}\n  {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val}\n  {body success done failure : Effect4.Program.NativeEff},\n  Eq vals.length (List.length env.names) →\n    ∀\n      (outcome :\n        Effect4.Exit (Except Effect4.Machine.Val (List Effect4.Machine.Val)) Effect4.Machine.Err\n          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n      (stores after : Effect4.Machine.Stores),\n      Eq (self env (instHAppendOfAppend.hAppend path (List.cons 0 List.nil))) (Except.ok body) →\n        Eq (Effect4.Program.Denote.meaning body vals stores)\n            (Effect4.Pull.matchEffect_protocol.match_1\n              (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n              (fun leftover =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.endVal leftover),\n                  snd := after })\n              (fun items =>\n                { fst := Effect4.Exit.success (Effect4.Program.Stream.chunkVal items),\n                  snd := after })\n              fun cause => { fst := Effect4.Exit.failure cause, snd := after }) →\n          Eq\n              (options.onDone\n                (Effect4.Program.Authoring.minted\n                  ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"payload\"))\n                ((env.push (List.cons (env.mint \"value\") List.nil)).push\n                  (List.cons ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"payload\")\n                    List.nil))\n                (instHAppendOfAppend.hAppend\n                  (instHAppendOfAppend.hAppend path (List.cons 1 List.nil)) (List.cons 0 List.nil)))\n              (Except.ok done) →\n            Eq\n                (options.onSuccess\n                  (Effect4.Program.Authoring.app \"snd\"\n                    (List.cons\n                      (Effect4.Program.Authoring.minted\n                        ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"rest\"))\n                      List.nil))\n                  ((env.push (List.cons (env.mint \"value\") List.nil)).push\n                    (List.cons ((env.push (List.cons (env.mint \"value\") List.nil)).mint \"rest\")\n                      List.nil))\n                  (instHAppendOfAppend.hAppend\n                    (instHAppendOfAppend.hAppend path (List.cons 1 List.nil))\n                    (List.cons 1 List.nil)))\n                (Except.ok success) →\n              Eq\n                  (options.onFailure (Effect4.Program.Authoring.minted (env.mint \"cause\"))\n                    (env.push (List.cons (env.mint \"cause\") List.nil))\n                    (instHAppendOfAppend.hAppend path (List.cons 2 List.nil)))\n                  (Except.ok failure) →\n                Exists fun tree =>\n                  And (Eq (Effect4.Pull.matchEffect self options env path) (Except.ok tree))\n                    (Eq (Effect4.Program.Denote.meaning tree vals stores)\n                      (Effect4.Pull.matchEffect_protocol.match_1\n                        (fun outcome => Prod Effect4.Machine.ExitV Effect4.Machine.Stores) outcome\n                        (fun leftover =>\n                          Effect4.Program.Denote.meaning done\n                            (instHAppendOfAppend.hAppend\n                              (instHAppendOfAppend.hAppend vals\n                                (List.cons (Effect4.Program.Stream.endVal leftover) List.nil))\n                              (List.cons leftover List.nil))\n                            after)\n                        (fun items =>\n                          Effect4.Program.Denote.meaning success\n                            (instHAppendOfAppend.hAppend\n                              (instHAppendOfAppend.hAppend vals\n                                (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                              (List.cons (Effect4.Program.Stream.chunkVal items) List.nil))\n                            after)\n                        fun cause =>\n                        Effect4.Program.Denote.meaning failure\n                          (instHAppendOfAppend.hAppend vals\n                            (List.cons (Effect4.Machine.Val.exitErr cause) List.nil))\n                          after))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1095,"lemmas":67,"nearest":["Effect4.Queue.Model.offer_jobs","Effect4.Program.StoreExecution.modify_loop","Effect4.Queue.offer_attempt"]},"doc":"The compiled offer attempt commits the model's cell and job transition, retaining all pending commands. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Execution","name":"Effect4.Queue.Execution.offer_loop","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id a : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.offer id a) →\n              (∀ (o : Effect4.Queue.Model.Offer), List.instMembership.mem s.offers o → Ne o.id id) →\n                ∀ {idSrc hintSrc messageSrc : Effect4.Program.Authoring.TermSrc}\n                  {env : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Effect4.Modules.Reads idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend captured\n                              (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                            (Effect4.Machine.Val.promise (tb.handle id)) →\n                          Effect4.Modules.Reads hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend captured\n                                (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                              (Effect4.Machine.Val.promise hint) →\n                            Effect4.Modules.Reads messageSrc\n                                (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                (instHAppendOfAppend.hAppend captured\n                                  (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                                (msg a) →\n                              Effect4.Modules.TypesEach sig idSrc\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                  (instHAppendOfAppend.hAppend tys\n                                    (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                  Effect4.Modules.idTy →\n                                Effect4.Modules.TypesEach sig hintSrc\n                                    (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                    (instHAppendOfAppend.hAppend tys\n                                      (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                    Effect4.Queue.answerTy →\n                                  Effect4.Modules.TypesEach sig messageSrc\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                      (instHAppendOfAppend.hAppend tys\n                                        (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                      A →\n                                    ∀ (m : Effect4.Api.Machine) {q : Effect4.Machine.RefKey},\n                                      Eq\n                                          (Effect4.Machine.refPeek\n                                            (m.state\n                                                (Effect4.Prim Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)\n                                                (Effect4.FrameFiber Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)\n                                                (Effect4.FrameEvent Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)).refs\n                                            q)\n                                          (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                        Effect4.Program.Typed.Fits w\n                                            (Effect4.Queue.Model.cellVal tb msg s)\n                                            (Effect4.Queue.cellTy A) →\n                                          ∀ (root : Effect4.Program.NativeEff)\n                                            (table : Effect4.Program.RowTable)\n                                            (fiber : Effect4.FiberId)\n                                            (f :\n                                              Effect4.Machine.RunFiber Effect4.Program.EffName\n                                                Effect4.Program.EffThunk Effect4.Machine.Val\n                                                Effect4.Machine.Err Effect4.Machine.Defect\n                                                Effect4.FiberId Effect4.Machine.Ann\n                                                Effect4.Machine.Ctx)\n                                            (term request : Effect4.Program.Term)\n                                            (p : Effect4.Program.Point) (compileFuel : Nat)\n                                            (yielding : Bool)\n                                            (rest :\n                                              List\n                                                (Effect4.Machine.Cmd Effect4.Program.EffName\n                                                  Effect4.Program.EffThunk Effect4.Machine.Val\n                                                  Effect4.Machine.Err Effect4.Machine.Defect\n                                                  Effect4.FiberId Effect4.Machine.Ann)),\n                                            Eq\n                                                (Effect4.Queue.offerStep A idSrc hintSrc messageSrc\n                                                  (Effect4.Program.Authoring.minted\n                                                    (env.mint \"current\"))\n                                                  (env.push\n                                                    (List.cons (env.mint \"current\") List.nil))\n                                                  path)\n                                                (Except.ok term) →\n                                              Eq p.env captured →\n                                                Eq p.fuel (instHAdd.hAdd compileFuel 1) →\n                                                  Eq (Effect4.Program.evalTerm p.env request)\n                                                      (Option.some (Effect4.Machine.Val.cell q)) →\n                                                    Eq (Effect4.Machine.RunMachine.fiber? m fiber)\n                                                        (Option.some f) →\n                                                      Eq\n                                                          ((Effect4.Program.Node.eff root).at_\n                                                            p.path)\n                                                          (Option.some\n                                                            (Effect4.Program.Node.eff\n                                                              (Effect4.Program.Eff.perform\n                                                                (Effect4.Program.NativeOp.refModifyWith\n                                                                  term)\n                                                                request))) →\n                                                        Eq\n                                                            (f.frame\n                                                                (Effect4.Prim\n                                                                  Effect4.Program.EffName\n                                                                  Effect4.Program.EffThunk\n                                                                  Effect4.Machine.Val\n                                                                  Effect4.Machine.Err\n                                                                  Effect4.Machine.Defect\n                                                                  Effect4.FiberId\n                                                                  Effect4.Machine.Ann)\n                                                                (Effect4.FrameFiber\n                                                                  Effect4.Program.EffName\n                                                                  Effect4.Program.EffThunk\n                                                                  Effect4.Machine.Val\n                                                                  Effect4.Machine.Err\n                                                                  Effect4.Machine.Defect\n                                                                  Effect4.FiberId\n                                                                  Effect4.Machine.Ann)).current\n                                                            (Effect4.Program.resolve root p) →\n                                                          Eq\n                                                              (f.frame\n                                                                  (Effect4.Prim\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann)\n                                                                  (Effect4.FrameFiber\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann)).deferredInterrupt\n                                                              Bool.false →\n                                                            Eq\n                                                                (f.yieldOverride\n                                                                  (Effect4.Prim\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann)\n                                                                  (Effect4.FrameFiber\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann))\n                                                                Option.none →\n                                                              instLTNat.lt ⋯\n                                                                  (f.maxOpsBeforeYield\n                                                                    (Effect4.Prim\n                                                                      Effect4.Program.EffName\n                                                                      Effect4.Program.EffThunk\n                                                                      Effect4.Machine.Val\n                                                                      Effect4.Machine.Err\n                                                                      Effect4.Machine.Defect\n                                                                      Effect4.FiberId\n                                                                      Effect4.Machine.Ann)\n                                                                    (Effect4.FrameFiber\n                                                                      Effect4.Program.EffName\n                                                                      Effect4.Program.EffThunk\n                                                                      Effect4.Machine.Val\n                                                                      Effect4.Machine.Err\n                                                                      Effect4.Machine.Defect\n                                                                      Effect4.FiberId\n                                                                      Effect4.Machine.Ann)) →\n                                                                Exists ⋯","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1083,"lemmas":66,"nearest":["Effect4.Queue.Model.take_jobs","Effect4.Program.StoreExecution.modify_loop","Effect4.Queue.take_attempt"]},"doc":"The compiled take attempt commits the model's cell and job transition, retaining all pending commands. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Execution","name":"Effect4.Queue.Execution.take_loop","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.take id 1 1) →\n              tb.Injective →\n                ∀ {idSrc hintSrc : Effect4.Program.Authoring.TermSrc}\n                  {env : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Effect4.Modules.Captured idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend captured\n                              (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                            (Effect4.Machine.Val.promise (tb.handle id)) →\n                          Effect4.Modules.Captured hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend captured\n                                (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                              (Effect4.Machine.Val.promise hint) →\n                            Effect4.Modules.CapturedTy sig idSrc\n                                (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                (instHAppendOfAppend.hAppend tys\n                                  (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                Effect4.Modules.idTy →\n                              Effect4.Modules.CapturedTy sig hintSrc\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                  (instHAppendOfAppend.hAppend tys\n                                    (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                  Effect4.Modules.idTy →\n                                ∀ (m : Effect4.Api.Machine) {q : Effect4.Machine.RefKey},\n                                  Eq\n                                      (Effect4.Machine.refPeek\n                                        (m.state\n                                            (Effect4.Prim Effect4.Program.EffName\n                                              Effect4.Program.EffThunk Effect4.Machine.Val\n                                              Effect4.Machine.Err Effect4.Machine.Defect\n                                              Effect4.FiberId Effect4.Machine.Ann)\n                                            (Effect4.FrameFiber Effect4.Program.EffName\n                                              Effect4.Program.EffThunk Effect4.Machine.Val\n                                              Effect4.Machine.Err Effect4.Machine.Defect\n                                              Effect4.FiberId Effect4.Machine.Ann)\n                                            (Effect4.FrameEvent Effect4.Program.EffName\n                                              Effect4.Program.EffThunk Effect4.Machine.Val\n                                              Effect4.Machine.Err Effect4.Machine.Defect\n                                              Effect4.FiberId Effect4.Machine.Ann)).refs\n                                        q)\n                                      (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                    Effect4.Program.Typed.Fits w\n                                        (Effect4.Queue.Model.cellVal tb msg s)\n                                        (Effect4.Queue.cellTy A) →\n                                      ∀ (root : Effect4.Program.NativeEff)\n                                        (table : Effect4.Program.RowTable) (fiber : Effect4.FiberId)\n                                        (f :\n                                          Effect4.Machine.RunFiber Effect4.Program.EffName\n                                            Effect4.Program.EffThunk Effect4.Machine.Val\n                                            Effect4.Machine.Err Effect4.Machine.Defect\n                                            Effect4.FiberId Effect4.Machine.Ann Effect4.Machine.Ctx)\n                                        (term request : Effect4.Program.Term)\n                                        (p : Effect4.Program.Point) (compileFuel : Nat)\n                                        (yielding : Bool)\n                                        (rest :\n                                          List\n                                            (Effect4.Machine.Cmd Effect4.Program.EffName\n                                              Effect4.Program.EffThunk Effect4.Machine.Val\n                                              Effect4.Machine.Err Effect4.Machine.Defect\n                                              Effect4.FiberId Effect4.Machine.Ann)),\n                                        Eq\n                                            (Effect4.Queue.takeStep A idSrc hintSrc\n                                              (Effect4.Program.Authoring.minted\n                                                (env.mint \"current\"))\n                                              (env.push (List.cons (env.mint \"current\") List.nil))\n                                              path)\n                                            (Except.ok term) →\n                                          Eq p.env captured →\n                                            Eq p.fuel (instHAdd.hAdd compileFuel 1) →\n                                              Eq (Effect4.Program.evalTerm p.env request)\n                                                  (Option.some (Effect4.Machine.Val.cell q)) →\n                                                Eq (Effect4.Machine.RunMachine.fiber? m fiber)\n                                                    (Option.some f) →\n                                                  Eq ((Effect4.Program.Node.eff root).at_ p.path)\n                                                      (Option.some\n                                                        (Effect4.Program.Node.eff\n                                                          (Effect4.Program.Eff.perform\n                                                            (Effect4.Program.NativeOp.refModifyWith\n                                                              term)\n                                                            request))) →\n                                                    Eq\n                                                        (f.frame\n                                                            (Effect4.Prim Effect4.Program.EffName\n                                                              Effect4.Program.EffThunk\n                                                              Effect4.Machine.Val\n                                                              Effect4.Machine.Err\n                                                              Effect4.Machine.Defect Effect4.FiberId\n                                                              Effect4.Machine.Ann)\n                                                            (Effect4.FrameFiber\n                                                              Effect4.Program.EffName\n                                                              Effect4.Program.EffThunk\n                                                              Effect4.Machine.Val\n                                                              Effect4.Machine.Err\n                                                              Effect4.Machine.Defect Effect4.FiberId\n                                                              Effect4.Machine.Ann)).current\n                                                        (Effect4.Program.resolve root p) →\n                                                      Eq\n                                                          (f.frame\n                                                              (Effect4.Prim Effect4.Program.EffName\n                                                                Effect4.Program.EffThunk\n                                                                Effect4.Machine.Val\n                                                                Effect4.Machine.Err\n                                                                Effect4.Machine.Defect\n                                                                Effect4.FiberId Effect4.Machine.Ann)\n                                                              (Effect4.FrameFiber\n                                                                Effect4.Program.EffName\n                                                                Effect4.Program.EffThunk\n                                                                Effect4.Machine.Val\n                                                                Effect4.Machine.Err\n                                                                Effect4.Machine.Defect\n                                                                Effect4.FiberId\n                                                                Effect4.Machine.Ann)).deferredInterrupt\n                                                          Bool.false →\n                                                        Eq\n                                                            (f.yieldOverride\n                                                              (Effect4.Prim Effect4.Program.EffName\n                                                                Effect4.Program.EffThunk\n                                                                Effect4.Machine.Val\n                                                                Effect4.Machine.Err\n                                                                Effect4.Machine.Defect\n                                                                Effect4.FiberId Effect4.Machine.Ann)\n                                                              (Effect4.FrameFiber\n                                                                Effect4.Program.EffName\n                                                                Effect4.Program.EffThunk\n                                                                Effect4.Machine.Val\n                                                                Effect4.Machine.Err\n                                                                Effect4.Machine.Defect\n                                                                Effect4.FiberId\n                                                                Effect4.Machine.Ann))\n                                                            Option.none →\n                                                          instLTNat.lt\n                                                              (instHAdd.hAdd\n                                                                (f.currentOpCount\n                                                                  (Effect4.Prim\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann)\n                                                                  (Effect4.FrameFiber\n                                                                    Effect4.Program.EffName\n                                                                    Effect4.Program.EffThunk\n                                                                    Effect4.Machine.Val\n                                                                    Effect4.Machine.Err\n                                                                    Effect4.Machine.Defect\n                                                                    Effect4.FiberId\n                                                                    Effect4.Machine.Ann))\n                                                                1)\n                                                              (f.maxOpsBeforeYield\n                                                                (Effect4.Prim\n                                                                  Effect4.Program.EffName\n                                                                  Effect4.Program.EffThunk\n                                                                  Effect4.Machine.Val\n                                                                  Effect4.Machine.Err\n                                                                  Effect4.Machine.Defect\n                                                                  Effect4.FiberId\n                                                                  Effect4.Machine.Ann)\n                                                                (Effect4.FrameFiber\n                                                                  Effect4.Program.EffName\n                                                                  Effect4.Program.EffThunk\n                                                                  Effect4.Machine.Val\n                                                                  Effect4.Machine.Err\n                                                                  Effect4.Machine.Defect\n                                                                  Effect4.FiberId\n                                                                  Effect4.Machine.Ann)) →\n                                                            Exists fun reply => Exists ⋯","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"Pending offers add at most the finite room to the buffer.\nA helper of `positive_suspend_step_capacity`, through `accept` and `afterConsume`.\nThe statement concerns lengths, not request identities, signal delivery or store membership. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.acceptLoop_length_le","placement":{"concept":"reactive-scheduling","requirement":"R10"},"restsOn":[],"statement":"∀ (r : Nat) (ms : List Nat) (os : List Effect4.Queue.Model.Offer),\n  instLENat.le (Effect4.Queue.Model.acceptLoop (Option.some r) ms os).fst.length\n    (instHAdd.hAdd ms.length r)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":89,"lemmas":39,"nearest":[]},"doc":"Formation of a one-field annotation, consumed by the R4 Queue step typing laws. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.ascribe_formed_for_steps","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (T : Effect4.Program.Ty),\n  Effect4.Modules.NodesFormed T →\n    Eq\n      (Effect4.Program.Formation.check\n        (Effect4.Program.Formation.sites Bool.false List.nil\n          (Effect4.Program.Ty.record (Effect4.Program.Authoring.ascribeFields T))))\n      Option.none","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":170,"lemmas":56,"nearest":[]},"doc":"**The initial value has the cell's type**, at every capacity and in every scope. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.empty_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (capacity : Nat) (names : List String) (types : List Effect4.Program.Ty),\n          Eq (Effect4.Modules.typeAt sig names types (Effect4.Queue.empty A capacity))\n            (Option.some (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":29,"nearest":[]},"doc":"**The first profile is closed.** Each first operation of the model leaves a state of the\nprofile, when its request keeps the premise. Consumer: each step goal of the Queue's\nterm-to-model refinement, along a run. No wrapper or host claim. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Profile","name":"Effect4.Queue.Model.first_profile_closed","placement":{"concept":"reactive-scheduling","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.Queue.Model.State) (op : Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstProfile s →\n    Eq (Effect4.Queue.Model.firstOp op) Bool.true →\n      Effect4.Queue.Model.Requested s op →\n        Effect4.Queue.Model.FirstProfile\n          (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none { s := s } op).s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":6,"nearest":["Effect4.Queue.Model.first_run_inv"]},"doc":"**From the empty queue both flags hold after every list of first operations.** The model's\nbounded exploration holds both flags to a fixed depth, over more operations. This statement\nholds them at every length, on the first profile. Consumer: the run-level law of the Queue's\nwrapper. It says nothing of `close` or `shutdown`, and nothing of a delivery. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_run_flags","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ (c : Nat) (ops : List Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstOps { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops →\n    And\n      (Eq\n        (List.foldl (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none)\n            { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops).ok\n        Bool.true)\n      (Eq\n        (List.foldl (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none)\n            { s := { capacity := Option.some (instHAdd.hAdd c 1) } } ops).named\n        Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":2,"nearest":["Effect4.Queue.Model.first_step_inv"]},"doc":"**A list of first operations keeps the run invariant.** By induction over the list, with\n`first_step_inv` at each step. It establishes what `first_step_inv` does, and no more. Consumer:\n`first_run_flags`, and then the run-level law of the Queue's wrapper. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_run_inv","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ (r : Effect4.Queue.Model.Run) (ops : List Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstRunInv r →\n    Effect4.Queue.Model.FirstOps r ops →\n      Effect4.Queue.Model.FirstRunInv\n        (List.foldl (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none) r ops)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":74,"lemmas":57,"nearest":["Effect4.Queue.Model.positive_suspend_step_capacity","Effect4.Queue.Model.first_profile_closed"]},"doc":"**One step of a first operation keeps the run invariant.** From every run of the invariant,\nthe model's step by a first operation whose request keeps `Requested` leaves a run of the\ninvariant. So the step keeps both flags. After it no taker stands ready without a signal. Each\nrequest that waited still waits, is the step's own, or is named by a signal.\n\nIt is the model's half of `wait-registration-no-gap` and of\n`waiting-request-obligation-preserved`. Consumer: `first_run_inv`, and then the run-level law of\nthe Queue's wrapper. The statement is of the model alone: no program, no delivery of a signal, no\nliveness and no fairness. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Invariant","name":"Effect4.Queue.Model.first_step_inv","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ (r : Effect4.Queue.Model.Run) (op : Effect4.Queue.Model.Op),\n  Effect4.Queue.Model.FirstRunInv r →\n    Eq (Effect4.Queue.Model.firstOp op) Bool.true →\n      Effect4.Queue.Model.Requested r.s op →\n        Effect4.Queue.Model.FirstRunInv\n          (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none r op)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"The jobs of a list of offers, split by a test. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.flatMap_split","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (p : Effect4.Queue.Model.Offer → Bool) (l : List Effect4.Queue.Model.Offer),\n  (List.flatMap (fun x => x.rest) l).Perm\n    (instHAppendOfAppend.hAppend (List.flatMap (fun x => x.rest) (List.filter p l))\n      (List.flatMap (fun x => x.rest) (List.filter (fun o => (p o).not) l)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":96,"lemmas":40,"nearest":[]},"doc":"Formation helpers for the R4 Queue step typing laws below. These discharge record and\nascription checks from the existing MessageTy premise; they establish no program admission. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.message_nodes_for_steps","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {A : Effect4.Program.Ty}, Effect4.Queue.Model.MessageTy A → Effect4.Modules.NodesFormed A","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":372,"lemmas":59,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The offer step agrees with the model's `offer`.** The request `id` is fresh: it names no\nwaiting taker and no pending offer. The message term reads the value of the model's message\n`a`. The step's reply is the model's, it accepts no pending offer, and its list is the takers\nthat the model wakes. The stored value is the model's next state, through the table that holds\n`hint` at `id` where the offer waits. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.offerStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State) (id a : Nat) (hint : Effect4.Machine.DeferredKey),\n  Effect4.Queue.Model.FirstProfile s →\n    Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.offer id a) →\n      (∀ (o : Effect4.Queue.Model.Offer), List.instMembership.mem s.offers o → Ne o.id id) →\n        ∀ {idSrc hintSrc messageSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n          Effect4.Modules.Reads idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n            Effect4.Modules.Reads hintSrc env path vals (Effect4.Machine.Val.promise hint) →\n              Effect4.Modules.Reads messageSrc env path vals (msg a) →\n                Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n                  Exists fun woken =>\n                    And\n                      (Effect4.Queue.Model.Notified s (Effect4.Queue.Model.offer s id a).fst\n                        (Effect4.Queue.Model.offer s id a).snd.snd List.nil woken)\n                      (Effect4.Modules.Reads\n                        (Effect4.Queue.offerStep A idSrc hintSrc messageSrc cellSrc) env path vals\n                        (Effect4.Program.Val.tuple\n                          (List.cons\n                            (Effect4.Program.Val.tuple\n                              (List.cons\n                                (Effect4.Queue.Model.offerReplyVal\n                                  (Effect4.Queue.Model.offer s id a).snd.fst)\n                                (List.cons\n                                  (Effect4.Store.Val.list\n                                    (List.map\n                                      (Effect4.Queue.Model.takerVal\n                                        (Effect4.Queue.Model.Table.afterOffer tb id hint\n                                          (Effect4.Queue.Model.offer s id a).snd.fst))\n                                      woken))\n                                  List.nil)))\n                            (List.cons\n                              (Effect4.Queue.Model.cellVal\n                                (Effect4.Queue.Model.Table.afterOffer tb id hint\n                                  (Effect4.Queue.Model.offer s id a).snd.fst)\n                                msg (Effect4.Queue.Model.offer s id a).fst)\n                              List.nil))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":256,"lemmas":43,"nearest":["Effect4.Queue.Model.offerStep_types"]},"doc":"**The offer step is typed at the cell's type**: under the request's identity, its hint at\nthe answer's type, the message and the cell's value. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerStep_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig\n            (List.cons \"id\" (List.cons \"hint\" (List.cons \"a\" (List.cons \"s\" List.nil))))\n            (List.cons Effect4.Modules.idTy\n              (List.cons Effect4.Queue.answerTy\n                (List.cons A (List.cons (Effect4.Queue.cellTy A) List.nil))))\n            (Effect4.Queue.offerStep A (Effect4.Program.Authoring.var \"id\")\n              (Effect4.Program.Authoring.var \"hint\") (Effect4.Program.Authoring.var \"a\")\n              (Effect4.Program.Authoring.var \"s\")))\n          (Option.some (Effect4.Queue.Model.offerReplyTy.prod (Effect4.Queue.cellTy A)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":224,"lemmas":102,"nearest":["Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Queue.Model.ascribe_formed_for_steps","Effect4.Modules.Step.typed"]},"doc":"**The offer step is typed at every scope.** No fold of the step holds a caller's term, so\neach argument is typed at the scope alone. The message has the cell's message type itself. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offerStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ {idSrc hintSrc messageSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Effect4.Modules.TypesEach sig idSrc env path types Effect4.Modules.idTy →\n            Effect4.Modules.TypesEach sig hintSrc env path types Effect4.Queue.answerTy →\n              Effect4.Modules.TypesEach sig messageSrc env path types A →\n                Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Queue.cellTy A) →\n                  Effect4.Modules.TypesEach sig\n                    (Effect4.Queue.offerStep A idSrc hintSrc messageSrc cellSrc) env path types\n                    (Effect4.Queue.Model.offerReplyTy.prod (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":25,"lemmas":8,"nearest":[]},"doc":"**An offer of one job adds that job**, accepted or pending. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.offer_jobs","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ (id a : Nat),\n      Eq (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.offer s id a).fst)\n        (instHAppendOfAppend.hAppend (Effect4.Queue.Model.stateJobs s) (List.cons a List.nil))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":92,"lemmas":40,"nearest":["Effect4.Queue.Model.message_nodes_for_steps"]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.offer_nodes_for_steps","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {A : Effect4.Program.Ty},\n  Effect4.Queue.Model.MessageTy A → Effect4.Modules.NodesFormed (Effect4.Queue.offerTy A)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":381,"lemmas":67,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The poll step agrees with the model's `poll`.** The reply is the model's, the list is the\noffers that entered, and the model wakes no taker. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.pollStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State),\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n          Exists fun entered =>\n            And\n              (Effect4.Queue.Model.Notified s (Effect4.Queue.Model.poll s).fst\n                (Effect4.Queue.Model.poll s).snd.snd entered List.nil)\n              (Effect4.Modules.Reads (Effect4.Queue.pollStep A cellSrc) env path vals\n                (Effect4.Program.Val.tuple\n                  (List.cons\n                    (Effect4.Program.Val.tuple\n                      (List.cons\n                        (Effect4.Queue.Model.pollReplyVal msg (Effect4.Queue.Model.poll s).snd.fst)\n                        (List.cons\n                          (Effect4.Store.Val.list\n                            (List.map (Effect4.Queue.Model.offerVal tb msg) entered))\n                          List.nil)))\n                    (List.cons (Effect4.Queue.Model.cellVal tb msg (Effect4.Queue.Model.poll s).fst)\n                      List.nil))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":255,"lemmas":43,"nearest":["Effect4.Queue.Model.pollStep_types"]},"doc":"**The poll step is typed at the cell's type.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.pollStep_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig (List.cons \"s\" List.nil)\n            (List.cons (Effect4.Queue.cellTy A) List.nil)\n            (Effect4.Queue.pollStep A (Effect4.Program.Authoring.var \"s\")))\n          (Option.some ((Effect4.Queue.Model.pollReplyTy A).prod (Effect4.Queue.cellTy A)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":225,"lemmas":102,"nearest":["Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Queue.Model.ascribe_formed_for_steps","Effect4.Modules.Step.typed"]},"doc":"**The poll step is typed at every scope.** The arm that consumes answers a message, and the\narm that does not answers none: the step has the first arm's type. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.pollStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Queue.cellTy A) →\n              Effect4.Modules.TypesEach sig (Effect4.Queue.pollStep A cellSrc) env path types\n                ((Effect4.Queue.Model.pollReplyTy A).prod (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":35,"lemmas":25,"nearest":["Effect4.Queue.Model.stateJobs_afterAccept"]},"doc":"**A poll consumes one job, or it changes nothing.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.poll_jobs","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    Or\n      (And (Eq (Effect4.Queue.Model.poll s).snd.fst Option.none)\n        (Eq (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.poll s).fst)\n          (Effect4.Queue.Model.stateJobs s)))\n      (Exists fun m =>\n        And (Eq (Effect4.Queue.Model.poll s).snd.fst (Option.some m))\n          (Eq (Effect4.Queue.Model.stateJobs s)\n            (List.cons m (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.poll s).fst))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":70,"lemmas":17,"nearest":["Effect4.Queue.Model.acceptLoop_length_le"]},"doc":"Abstract positive-capacity suspend steps keep the configuration and buffer bound.\nConsumer: the later Queue term-to-model refinement. No wrapper or host claim. The proof does not\nuse `_hpos`. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Capacity","name":"Effect4.Queue.Model.positive_suspend_step_capacity","placement":{"concept":"reactive-scheduling","requirement":"R10"},"restsOn":[],"statement":"∀ (c : Nat) (s : Effect4.Queue.Model.State) (op : Effect4.Queue.Model.Op),\n  instLTNat.lt 0 c →\n    Eq s.capacity (Option.some c) →\n      Eq s.strategy Effect4.Queue.Model.Strategy.suspend →\n        instLENat.le s.messages.length c →\n          have next := (Effect4.Queue.Model.step Effect4.Queue.Model.Fault.none { s := s } op).s;\n          And (Eq next.capacity (Option.some c))\n            (And (Eq next.strategy Effect4.Queue.Model.Strategy.suspend)\n              (instLENat.le next.messages.length c))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":314,"lemmas":10,"nearest":["Effect4.Queue.Model.withdrawOffer_agrees","Effect4.Queue.Model.withdrawTake_agrees","Effect4.Queue.Model.sizeStep_agrees","Effect4.Queue.Model.pollStep_agrees","Effect4.Queue.Model.offerStep_agrees","Effect4.Queue.Model.takeStep_agrees"]},"doc":"**The six step statements hold** (the proposed claim `queue-steps-agree`, a part of\n`queue-expansion-agrees`). Each field is one theorem of this file. It establishes no delivery,\nno cancellation law, no liveness and nothing of a wrapper. Its consumer is the wrapper's law,\nin the public path's slice. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.queue_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Queue.Model.StepsAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":318,"lemmas":20,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The size step agrees with the model's `size`.** The reply is the buffer's length. The\nstep is a term over the cell's value: it stores nothing and names no notification, as the\nmodel's `size` answers no state and no signal (`cell_read`). ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.sizeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State),\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ {cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {vals : List Effect4.Machine.Val},\n      Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n        Effect4.Modules.Reads (Effect4.Queue.sizeStep A cellSrc) env path vals\n          (Effect4.Store.Val.nat (Effect4.Queue.Model.size s))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":256,"lemmas":53,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The size step is a number**, over the cell's value. It is no term of a `Ref.modify`. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.sizeStep_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig (List.cons \"s\" List.nil)\n            (List.cons (Effect4.Queue.cellTy A) List.nil)\n            (Effect4.Queue.sizeStep A (Effect4.Program.Authoring.var \"s\")))\n          (Option.some Effect4.Program.Ty.nat)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":12,"lemmas":0,"nearest":[]},"doc":"The accept pass keeps the jobs: the offers that fit move from pending to buffered. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.stateJobs_afterAccept","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (c : Nat) (s : Effect4.Queue.Model.State),\n  Eq (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.afterAccept c s))\n    (Effect4.Queue.Model.stateJobs s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":411,"lemmas":105,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The take step agrees with the model's `take` at the bounds one and one.** The cell holds\nthe state `s` of the first profile, through the table and the message map. The request `id` is\nfresh or its own waiting taker, and `hint` is the hint that the step receives. The step's reply\nis the model's. Its two lists are the model's signals: the offers that entered, then the takers\nto wake. The stored value is the model's next state, through the table that holds `hint` at\n`id` where the request waits. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.takeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n  Effect4.Queue.Model.FirstProfile s →\n    Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.take id 1 1) →\n      tb.Injective →\n        ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n          Eq vals.length (List.length env.names) →\n            Effect4.Modules.Captured idSrc env path vals\n                (Effect4.Machine.Val.promise (tb.handle id)) →\n              Effect4.Modules.Captured hintSrc env path vals (Effect4.Machine.Val.promise hint) →\n                Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n                  Exists fun reply =>\n                    Exists fun entered =>\n                      Exists fun woken =>\n                        And\n                          (Eq\n                            (Effect4.Queue.Model.takeReplyVal msg\n                              (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).snd.fst)\n                            (Option.some reply))\n                          (And\n                            (Effect4.Queue.Model.Notified s\n                              (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).fst\n                              (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).snd.snd\n                              entered woken)\n                            (Effect4.Modules.Reads (Effect4.Queue.takeStep A idSrc hintSrc cellSrc)\n                              env path vals\n                              (Effect4.Program.Val.tuple\n                                (List.cons\n                                  (Effect4.Program.Val.tuple\n                                    (List.cons reply\n                                      (List.cons\n                                        (Effect4.Store.Val.list\n                                          (List.map (Effect4.Queue.Model.offerVal tb msg) entered))\n                                        (List.cons\n                                          (Effect4.Store.Val.list\n                                            (List.map\n                                              (Effect4.Queue.Model.takerVal\n                                                (Effect4.Queue.Model.Table.afterTake tb id hint\n                                                  (Effect4.Queue.Model.take s\n                                                        { id := id, min := 1, max := 1 }).snd.fst))\n                                              woken))\n                                          List.nil))))\n                                  (List.cons\n                                    (Effect4.Queue.Model.cellVal\n                                      (Effect4.Queue.Model.Table.afterTake tb id hint\n                                        (Effect4.Queue.Model.take s\n                                              { id := id, min := 1, max := 1 }).snd.fst)\n                                      msg\n                                      (Effect4.Queue.Model.take s\n                                          { id := id, min := 1, max := 1 }).fst)\n                                    List.nil)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":278,"lemmas":50,"nearest":["Effect4.Queue.Model.takeStep_types"]},"doc":"**The take step is typed at the cell's type**: under the request's identity, its hint and\nthe cell's value, it answers the pair of a take's reply and the cell's next value. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takeStep_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig (List.cons \"id\" (List.cons \"hint\" (List.cons \"s\" List.nil)))\n            (List.cons Effect4.Modules.idTy\n              (List.cons Effect4.Modules.idTy (List.cons (Effect4.Queue.cellTy A) List.nil)))\n            (Effect4.Queue.takeStep A (Effect4.Program.Authoring.var \"id\")\n              (Effect4.Program.Authoring.var \"hint\") (Effect4.Program.Authoring.var \"s\")))\n          (Option.some ((Effect4.Queue.Model.takeReplyTy A).prod (Effect4.Queue.cellTy A)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":248,"lemmas":103,"nearest":["Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Queue.Model.ascribe_formed_for_steps","Effect4.Modules.Step.typed"]},"doc":"**The take step is typed at every scope.** The request's identity and its hint stand in a\nfold's body, so each is taken with its typed capture. The arm that consumes answers a message,\nand the arm that waits answers none: the step has the first arm's type. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.takeStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ {idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.CapturedTy sig hintSrc env path types Effect4.Modules.idTy →\n                Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Queue.cellTy A) →\n                  Effect4.Modules.TypesEach sig (Effect4.Queue.takeStep A idSrc hintSrc cellSrc) env\n                    path types ((Effect4.Queue.Model.takeReplyTy A).prod (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":37,"lemmas":25,"nearest":["Effect4.Queue.Model.stateJobs_afterAccept"]},"doc":"**A take at the bounds one and one consumes its job, or it waits and keeps every job.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.take_jobs","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ (id : Nat),\n      Or\n        (Exists fun m =>\n          And\n            (Eq (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).snd.fst\n              (Effect4.Queue.Model.TakeReply.got (List.cons m List.nil)))\n            (Eq (Effect4.Queue.Model.stateJobs s)\n              (List.cons m\n                (Effect4.Queue.Model.stateJobs\n                  (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).fst))))\n        (And\n          (Eq (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).snd.fst\n            Effect4.Queue.Model.TakeReply.wait)\n          (Eq\n            (Effect4.Queue.Model.stateJobs\n              (Effect4.Queue.Model.take s { id := id, min := 1, max := 1 }).fst)\n            (Effect4.Queue.Model.stateJobs s)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":380,"lemmas":67,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The withdrawal of an offer agrees with the model's `withdrawOffer`.** The step accepts no\noffer, its list is the takers that the model wakes, and the stored value is the model's next\nstate. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.withdrawOffer_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State) (id : Nat),\n  Effect4.Queue.Model.FirstProfile s →\n    tb.Injective →\n      ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n        {path : List Nat} {vals : List Effect4.Machine.Val},\n        Eq vals.length (List.length env.names) →\n          Effect4.Modules.Captured idSrc env path vals\n              (Effect4.Machine.Val.promise (tb.handle id)) →\n            Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n              Exists fun woken =>\n                And\n                  (Effect4.Queue.Model.Notified s (Effect4.Queue.Model.withdrawOffer s id).fst\n                    (Effect4.Queue.Model.withdrawOffer s id).snd List.nil woken)\n                  (Effect4.Modules.Reads (Effect4.Queue.withdrawOffer A idSrc cellSrc) env path vals\n                    (Effect4.Program.Val.tuple\n                      (List.cons\n                        (Effect4.Store.Val.list (List.map (Effect4.Queue.Model.takerVal tb) woken))\n                        (List.cons\n                          (Effect4.Queue.Model.cellVal tb msg\n                            (Effect4.Queue.Model.withdrawOffer s id).fst)\n                          List.nil))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":22,"lemmas":4,"nearest":["Effect4.Queue.Model.flatMap_split"]},"doc":"**An offer's withdrawal removes the jobs of the withdrawn offer, and no other.** In the\ncrew the withdrawn offer is the feeder's, with one job, or nothing where a step accepted it. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.withdrawOffer_jobs","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ (id : Nat),\n      (Effect4.Queue.Model.stateJobs s).Perm\n        (instHAppendOfAppend.hAppend\n          (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.withdrawOffer s id).fst)\n          (List.flatMap (fun x => x.rest) (List.filter (fun o => (bne o.id id).not) s.offers)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":264,"lemmas":50,"nearest":["Effect4.Queue.Model.withdrawOffer_types"]},"doc":"**The withdrawal of an offer is typed at the cell's type.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawOffer_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig (List.cons \"id\" (List.cons \"s\" List.nil))\n            (List.cons Effect4.Modules.idTy (List.cons (Effect4.Queue.cellTy A) List.nil))\n            (Effect4.Queue.withdrawOffer A (Effect4.Program.Authoring.var \"id\")\n              (Effect4.Program.Authoring.var \"s\")))\n          (Option.some (Effect4.Queue.Model.wakeReplyTy.prod (Effect4.Queue.cellTy A)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":227,"lemmas":51,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The withdrawal of an offer is typed at every scope.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawOffer_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Queue.cellTy A) →\n                Effect4.Modules.TypesEach sig (Effect4.Queue.withdrawOffer A idSrc cellSrc) env path\n                  types (Effect4.Queue.Model.wakeReplyTy.prod (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":379,"lemmas":65,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The withdrawal of a take agrees with the model's `withdrawTake`.** The step accepts no\noffer, its list is the takers that the model wakes, and the stored value is the model's next\nstate. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Steps","name":"Effect4.Queue.Model.withdrawTake_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State) (id : Nat),\n  Effect4.Queue.Model.FirstProfile s →\n    tb.Injective →\n      ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n        {path : List Nat} {vals : List Effect4.Machine.Val},\n        Eq vals.length (List.length env.names) →\n          Effect4.Modules.Captured idSrc env path vals\n              (Effect4.Machine.Val.promise (tb.handle id)) →\n            Effect4.Modules.Reads cellSrc env path vals (Effect4.Queue.Model.cellVal tb msg s) →\n              Exists fun woken =>\n                And\n                  (Effect4.Queue.Model.Notified s (Effect4.Queue.Model.withdrawTake s id).fst\n                    (Effect4.Queue.Model.withdrawTake s id).snd List.nil woken)\n                  (Effect4.Modules.Reads (Effect4.Queue.withdrawTake A idSrc cellSrc) env path vals\n                    (Effect4.Program.Val.tuple\n                      (List.cons\n                        (Effect4.Store.Val.list (List.map (Effect4.Queue.Model.takerVal tb) woken))\n                        (List.cons\n                          (Effect4.Queue.Model.cellVal tb msg\n                            (Effect4.Queue.Model.withdrawTake s id).fst)\n                          List.nil))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"**A take's withdrawal keeps every job.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Conservation","name":"Effect4.Queue.Model.withdrawTake_jobs","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.Queue.Model.State) (id : Nat),\n  Eq (Effect4.Queue.Model.stateJobs (Effect4.Queue.Model.withdrawTake s id).fst)\n    (Effect4.Queue.Model.stateJobs s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":263,"lemmas":50,"nearest":["Effect4.Queue.Model.withdrawTake_types"]},"doc":"**The withdrawal of a take is typed at the cell's type.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawTake_typed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        Eq\n          (Effect4.Modules.typeAt sig (List.cons \"id\" (List.cons \"s\" List.nil))\n            (List.cons Effect4.Modules.idTy (List.cons (Effect4.Queue.cellTy A) List.nil))\n            (Effect4.Queue.withdrawTake A (Effect4.Program.Authoring.var \"id\")\n              (Effect4.Program.Authoring.var \"s\")))\n          (Option.some (Effect4.Queue.Model.wakeReplyTy.prod (Effect4.Queue.cellTy A)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":226,"lemmas":50,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The withdrawal of a take is typed at every scope.** ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Typing","name":"Effect4.Queue.Model.withdrawTake_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {types : List Effect4.Program.Ty},\n          Eq types.length (List.length env.names) →\n            Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig cellSrc env path types (Effect4.Queue.cellTy A) →\n                Effect4.Modules.TypesEach sig (Effect4.Queue.withdrawTake A idSrc cellSrc) env path\n                  types (Effect4.Queue.Model.wakeReplyTy.prod (Effect4.Queue.cellTy A))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":248,"lemmas":23,"nearest":[]},"doc":"**`Queue.bounded` makes the cell of the empty state of the first profile.** A positive\ncapacity gives a state of the profile (`empty_profile`). The initial value reads that state's\ncell, and the store step of `Ref.make` appends it and answers the new cell's handle. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.bounded_makes","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (capacity : Nat),\n  instLTNat.lt 0 capacity →\n    ∀ (env : Effect4.Program.Authoring.Env) (path : List Nat) (vals : List Effect4.Machine.Val)\n      (stores : Effect4.Machine.Stores),\n      And (Effect4.Queue.Model.FirstProfile { capacity := Option.some capacity })\n        (And\n          (Effect4.Modules.Reads (Effect4.Queue.empty A capacity) env path vals\n            (Effect4.Queue.Model.cellVal tb msg { capacity := Option.some capacity }))\n          (Eq\n            (Effect4.Machine.syncOpStep\n              (Effect4.Machine.SyncOp.refMake\n                (Effect4.Queue.Model.cellVal tb msg { capacity := Option.some capacity }))\n              stores)\n            (Option.some\n              {\n                fst :=\n                  {\n                    refs :=\n                      instHAppendOfAppend.hAppend stores.refs\n                        (List.cons\n                          (Effect4.Queue.Model.cellVal tb msg { capacity := Option.some capacity })\n                          List.nil),\n                    deferreds := stores.deferreds, scopes := stores.scopes, memo := stores.memo,\n                    timers := stores.timers, nextName := stores.nextName,\n                    externals := stores.externals },\n                snd := Effect4.Machine.Val.cell { index := List.length stores.refs } })))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":349,"lemmas":82,"nearest":["Effect4.Queue.Model.empty_typed","Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Program.Bounds.matchB_one_var","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"**The construction is typed at every scope**: it answers the handle of a cell at the\nqueue's cell type. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.bounded_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty),\n  Effect4.Queue.Model.MessageTy A →\n    ∀ (capacity : Nat) (positive : instLTNat.lt 0 capacity) (s : Effect4.Modules.TypedScope),\n      Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n        (Effect4.Queue.bounded A capacity positive) s (Effect4.Queue.cellTy A).refOf","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":567,"lemmas":65,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Queue.Model.offerStep_types","Effect4.Modules.step_updates","Effect4.Queue.Model.offerStep_agrees"]},"doc":"**The attempt of `offer` is the model's `offer`**, by a fresh request. No fold of the offer\nstep holds a caller's term, so the identity, the hint and the message are read at the row's\nscope alone. The store step answers the model's reply and the takers that the model wakes, and\nit writes the model's next state. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id a : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.offer id a) →\n              (∀ (o : Effect4.Queue.Model.Offer), List.instMembership.mem s.offers o → Ne o.id id) →\n                ∀ {idSrc hintSrc messageSrc : Effect4.Program.Authoring.TermSrc}\n                  {env : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Effect4.Modules.Reads idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend captured\n                              (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                            (Effect4.Machine.Val.promise (tb.handle id)) →\n                          Effect4.Modules.Reads hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend captured\n                                (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                              (Effect4.Machine.Val.promise hint) →\n                            Effect4.Modules.Reads messageSrc\n                                (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                (instHAppendOfAppend.hAppend captured\n                                  (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                                (msg a) →\n                              Effect4.Modules.TypesEach sig idSrc\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                  (instHAppendOfAppend.hAppend tys\n                                    (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                  Effect4.Modules.idTy →\n                                Effect4.Modules.TypesEach sig hintSrc\n                                    (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                    (instHAppendOfAppend.hAppend tys\n                                      (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                    Effect4.Queue.answerTy →\n                                  Effect4.Modules.TypesEach sig messageSrc\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                      (instHAppendOfAppend.hAppend tys\n                                        (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                      A →\n                                    ∀ {stores : Effect4.Machine.Stores}\n                                      {q : Effect4.Machine.RefKey},\n                                      Eq (Effect4.Machine.refPeek stores.refs q)\n                                          (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                        Effect4.Program.Typed.Fits w\n                                            (Effect4.Queue.Model.cellVal tb msg s)\n                                            (Effect4.Queue.cellTy A) →\n                                          Exists fun f =>\n                                            Exists fun woken =>\n                                              And\n                                                (Eq\n                                                  (Effect4.Queue.offerStep A idSrc hintSrc\n                                                    messageSrc\n                                                    (Effect4.Program.Authoring.minted\n                                                      (env.mint \"current\"))\n                                                    (env.push\n                                                      (List.cons (env.mint \"current\") List.nil))\n                                                    path)\n                                                  (Except.ok f))\n                                                (And\n                                                  (Effect4.Queue.Model.Notified s\n                                                    (Effect4.Queue.Model.offer s id a).fst\n                                                    (Effect4.Queue.Model.offer s id a).snd.snd\n                                                    List.nil woken)\n                                                  (And\n                                                    (Eq\n                                                      (Effect4.Machine.syncOpStep\n                                                        (Effect4.Machine.SyncOp.refModify q f\n                                                          captured)\n                                                        stores)\n                                                      (Option.some\n                                                        {\n                                                          fst :=\n                                                            {\n                                                              refs :=\n                                                                Effect4.Machine.refPoke stores.refs\n                                                                  q\n                                                                  (Effect4.Queue.Model.cellVal\n                                                                    (Effect4.Queue.Model.Table.afterOffer\n                                                                      tb id hint\n                                                                      (Effect4.Queue.Model.offer s\n                                                                            id a).snd.fst)\n                                                                    msg\n                                                                    (Effect4.Queue.Model.offer s id\n                                                                        a).fst),\n                                                              deferreds := stores.deferreds,\n                                                              scopes := stores.scopes,\n                                                              memo := stores.memo,\n                                                              timers := stores.timers,\n                                                              nextName := stores.nextName,\n                                                              externals := stores.externals },\n                                                          snd :=\n                                                            Effect4.Program.Val.tuple\n                                                              (List.cons\n                                                                (Effect4.Queue.Model.offerReplyVal\n                                                                  (Effect4.Queue.Model.offer s id\n                                                                        a).snd.fst)\n                                                                (List.cons\n                                                                  (Effect4.Store.Val.list\n                                                                    (List.map\n                                                                      (Effect4.Queue.Model.takerVal\n                                                                        (Effect4.Queue.Model.Table.afterOffer\n                                                                          tb id hint\n                                                                          (Effect4.Queue.Model.offer\n                                                                                s id a).snd.fst))\n                                                                      woken))\n                                                                  List.nil)) }))\n                                                    (And\n                                                      (Effect4.Program.Typed.Fits w\n                                                        (Effect4.Program.Val.tuple\n                                                          (List.cons\n                                                            (Effect4.Queue.Model.offerReplyVal\n                                                              (Effect4.Queue.Model.offer s id\n                                                                    a).snd.fst)\n                                                            (List.cons\n                                                              (Effect4.Store.Val.list\n                                                                (List.map\n                                                                  (Effect4.Queue.Model.takerVal\n                                                                    (Effect4.Queue.Model.Table.afterOffer\n                                                                      tb id hint\n                                                                      (Effect4.Queue.Model.offer s\n                                                                            id a).snd.fst))\n                                                                  woken))\n                                                              List.nil)))\n                                                        Effect4.Queue.Model.offerReplyTy)\n                                                      (Effect4.Program.Typed.Fits w\n                                                        (Effect4.Queue.Model.cellVal\n                                                          (Effect4.Queue.Model.Table.afterOffer tb\n                                                            id hint\n                                                            (Effect4.Queue.Model.offer s id\n                                                                  a).snd.fst)\n                                                          msg\n                                                          (Effect4.Queue.Model.offer s id a).fst)\n                                                        (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":78,"nearest":["Effect4.Queue.offer_attempt"]},"doc":"**The attempt of `offer` at the operation's own binders.** The identity and the hint are\nnames that `bindWith` mints. The scope binds each, and no later binder shadows either. The\nmessage stays a caller's term, with its reading and its type at the row's scope. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id a : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.offer id a) →\n              (∀ (o : Effect4.Queue.Model.Offer), List.instMembership.mem s.offers o → Ne o.id id) →\n                ∀ {messageSrc : Effect4.Program.Authoring.TermSrc}\n                  {env outerId outerHint : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val}\n                  {beforeId afterId beforeHint afterHint : Effect4.Program.Authoring.Names},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Eq env.names\n                            (instHAppendOfAppend.hAppend beforeId\n                              (List.cons (outerId.mint \"answer\") afterId)) →\n                          (∀ (name : String),\n                              List.instMembership.mem afterId name →\n                                Ne name (outerId.mint \"answer\")) →\n                            Eq\n                                (List.instGetElem?NatLtLength.getElem? captured\n                                  (List.length beforeId))\n                                (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                              Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                                  (Option.some Effect4.Modules.idTy) →\n                                Eq env.names\n                                    (instHAppendOfAppend.hAppend beforeHint\n                                      (List.cons (outerHint.mint \"answer\") afterHint)) →\n                                  (∀ (name : String),\n                                      List.instMembership.mem afterHint name →\n                                        Ne name (outerHint.mint \"answer\")) →\n                                    Eq\n                                        (List.instGetElem?NatLtLength.getElem? captured\n                                          (List.length beforeHint))\n                                        (Option.some (Effect4.Machine.Val.promise hint)) →\n                                      Eq\n                                          (List.instGetElem?NatLtLength.getElem? tys\n                                            (List.length beforeHint))\n                                          (Option.some Effect4.Queue.answerTy) →\n                                        Effect4.Modules.Reads messageSrc\n                                            (env.push (List.cons (env.mint \"current\") List.nil))\n                                            path\n                                            (instHAppendOfAppend.hAppend captured\n                                              (List.cons (Effect4.Queue.Model.cellVal tb msg s)\n                                                List.nil))\n                                            (msg a) →\n                                          Effect4.Modules.TypesEach sig messageSrc\n                                              (env.push (List.cons (env.mint \"current\") List.nil))\n                                              path\n                                              (instHAppendOfAppend.hAppend tys\n                                                (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                              A →\n                                            ∀ {stores : Effect4.Machine.Stores}\n                                              {q : Effect4.Machine.RefKey},\n                                              Eq (Effect4.Machine.refPeek stores.refs q)\n                                                  (Option.some\n                                                    (Effect4.Queue.Model.cellVal tb msg s)) →\n                                                Effect4.Program.Typed.Fits w\n                                                    (Effect4.Queue.Model.cellVal tb msg s)\n                                                    (Effect4.Queue.cellTy A) →\n                                                  Exists fun f =>\n                                                    Exists fun woken =>\n                                                      And\n                                                        (Eq\n                                                          (Effect4.Queue.offerStep A\n                                                            (Effect4.Program.Authoring.minted\n                                                              (outerId.mint \"answer\"))\n                                                            (Effect4.Program.Authoring.minted\n                                                              (outerHint.mint \"answer\"))\n                                                            messageSrc\n                                                            (Effect4.Program.Authoring.minted\n                                                              (env.mint \"current\"))\n                                                            (env.push\n                                                              (List.cons (env.mint \"current\")\n                                                                List.nil))\n                                                            path)\n                                                          (Except.ok f))\n                                                        (And\n                                                          (Effect4.Queue.Model.Notified s\n                                                            (Effect4.Queue.Model.offer s id a).fst\n                                                            (Effect4.Queue.Model.offer s id\n                                                                  a).snd.snd\n                                                            List.nil woken)\n                                                          (And\n                                                            (Eq\n                                                              (Effect4.Machine.syncOpStep\n                                                                (Effect4.Machine.SyncOp.refModify q\n                                                                  f captured)\n                                                                stores)\n                                                              (Option.some\n                                                                {\n                                                                  fst :=\n                                                                    {\n                                                                      refs :=\n                                                                        Effect4.Machine.refPoke\n                                                                          stores.refs q\n                                                                          (Effect4.Queue.Model.cellVal\n                                                                            (Effect4.Queue.Model.Table.afterOffer\n                                                                              tb id hint\n                                                                              (Effect4.Queue.Model.offer\n                                                                                    s id a).snd.fst)\n                                                                            msg\n                                                                            (Effect4.Queue.Model.offer\n                                                                                s id a).fst),\n                                                                      deferreds := stores.deferreds,\n                                                                      scopes := stores.scopes,\n                                                                      memo := stores.memo,\n                                                                      timers := stores.timers,\n                                                                      nextName := stores.nextName,\n                                                                      externals :=\n                                                                        stores.externals },\n                                                                  snd :=\n                                                                    Effect4.Program.Val.tuple\n                                                                      (List.cons\n                                                                        (Effect4.Queue.Model.offerReplyVal\n                                                                          (Effect4.Queue.Model.offer\n                                                                                s id a).snd.fst)\n                                                                        (List.cons\n                                                                          (Effect4.Store.Val.list\n                                                                            (List.map\n                                                                              (Effect4.Queue.Model.takerVal\n                                                                                (Effect4.Queue.Model.Table.afterOffer\n                                                                                  tb id hint\n                                                                                  (Effect4.Queue.Model.offer\n                                                                                        s id\n                                                                                        a).snd.fst))\n                                                                              woken))\n                                                                          List.nil)) }))\n                                                            (And\n                                                              (Effect4.Program.Typed.Fits w\n                                                                (Effect4.Program.Val.tuple\n                                                                  (List.cons\n                                                                    (Effect4.Queue.Model.offerReplyVal\n                                                                      (Effect4.Queue.Model.offer s\n                                                                            id a).snd.fst)\n                                                                    (List.cons\n                                                                      (Effect4.Store.Val.list\n                                                                        (List.map\n                                                                          (Effect4.Queue.Model.takerVal\n                                                                            (Effect4.Queue.Model.Table.afterOffer\n                                                                              tb id hint\n                                                                              (Effect4.Queue.Model.offer\n                                                                                    s id\n                                                                                    a).snd.fst))\n                                                                          woken))\n                                                                      List.nil)))\n                                                                Effect4.Queue.Model.offerReplyTy)\n                                                              (Effect4.Program.Typed.Fits w\n                                                                (Effect4.Queue.Model.cellVal\n                                                                  (Effect4.Queue.Model.Table.afterOffer\n                                                                    tb id hint\n                                                                    (Effect4.Queue.Model.offer s id\n                                                                          a).snd.fst)\n                                                                  msg\n                                                                  (Effect4.Queue.Model.offer s id\n                                                                      a).fst)\n                                                                (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":514,"lemmas":252,"nearest":["Effect4.Queue.Model.withdrawOffer_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.optionTy_option","Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Queue.Model.offerStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Program.rowTy_instantiated_formed","Effect4.Program.mask_printed_form_profile","Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps"]},"doc":"**`offer` is typed at every scope**: it answers a Boolean. The handle and the message are\nkept terms: the operation reads each under its own binders. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty),\n  Effect4.Queue.Model.MessageTy A →\n    ∀ {q m : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s\n          (Effect4.Queue.cellTy A).refOf →\n        Effect4.Modules.Kept (Effect4.Program.nativeSignature table) m s A →\n          Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n            (Effect4.Queue.offer A q m) s Effect4.Program.Ty.bool","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":568,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Queue.Model.withdrawOffer_types","Effect4.Modules.step_updates","Effect4.Queue.Model.withdrawOffer_agrees"]},"doc":"**The withdrawal of an offer is the model's `withdrawOffer`.** The store step answers the\ntakers that the model wakes, and it writes the model's next state: an offer that a step already\naccepted is not pending, so its message stays accepted (decisions row 222). ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_withdrawal","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat),\n          Effect4.Queue.Model.FirstProfile s →\n            tb.Injective →\n              ∀ {idSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n                {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                {captured : List Effect4.Machine.Val},\n                Eq captured.length (List.length env.names) →\n                  Eq tys.length (List.length env.names) →\n                    Effect4.Program.Typed.EnvTyped w tys captured →\n                      Effect4.Modules.Captured idSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend captured\n                            (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                          (Effect4.Machine.Val.promise (tb.handle id)) →\n                        Effect4.Modules.CapturedTy sig idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend tys\n                              (List.cons (Effect4.Queue.cellTy A) List.nil))\n                            Effect4.Modules.idTy →\n                          ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                            Eq (Effect4.Machine.refPeek stores.refs q)\n                                (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                              Effect4.Program.Typed.Fits w (Effect4.Queue.Model.cellVal tb msg s)\n                                  (Effect4.Queue.cellTy A) →\n                                Exists fun f =>\n                                  Exists fun woken =>\n                                    And\n                                      (Eq\n                                        (Effect4.Queue.withdrawOffer A idSrc\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Effect4.Queue.Model.Notified s\n                                          (Effect4.Queue.Model.withdrawOffer s id).fst\n                                          (Effect4.Queue.Model.withdrawOffer s id).snd List.nil\n                                          woken)\n                                        (And\n                                          (Eq\n                                            (Effect4.Machine.syncOpStep\n                                              (Effect4.Machine.SyncOp.refModify q f captured)\n                                              stores)\n                                            (Option.some\n                                              {\n                                                fst :=\n                                                  {\n                                                    refs :=\n                                                      Effect4.Machine.refPoke stores.refs q\n                                                        (Effect4.Queue.Model.cellVal tb msg\n                                                          (Effect4.Queue.Model.withdrawOffer s\n                                                              id).fst),\n                                                    deferreds := stores.deferreds,\n                                                    scopes := stores.scopes, memo := stores.memo,\n                                                    timers := stores.timers,\n                                                    nextName := stores.nextName,\n                                                    externals := stores.externals },\n                                                snd :=\n                                                  Effect4.Store.Val.list\n                                                    (List.map (Effect4.Queue.Model.takerVal tb)\n                                                      woken) }))\n                                          (And\n                                            (Effect4.Program.Typed.Fits w\n                                              (Effect4.Store.Val.list\n                                                (List.map (Effect4.Queue.Model.takerVal tb) woken))\n                                              Effect4.Queue.Model.wakeReplyTy)\n                                            (Effect4.Program.Typed.Fits w\n                                              (Effect4.Queue.Model.cellVal tb msg\n                                                (Effect4.Queue.Model.withdrawOffer s id).fst)\n                                              (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":76,"nearest":["Effect4.Queue.offer_withdrawal"]},"doc":"**The withdrawal of an offer at the operation's own binders.** The identity is a name that\n`bindWith` mints. The scope binds it, and no later binder shadows it. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.offer_withdrawal_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat),\n          Effect4.Queue.Model.FirstProfile s →\n            tb.Injective →\n              ∀ {env outerId : Effect4.Program.Authoring.Env} {path : List Nat}\n                {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                {captured : List Effect4.Machine.Val}\n                {beforeId afterId : Effect4.Program.Authoring.Names},\n                Eq captured.length (List.length env.names) →\n                  Eq tys.length (List.length env.names) →\n                    Effect4.Program.Typed.EnvTyped w tys captured →\n                      Eq env.names\n                          (instHAppendOfAppend.hAppend beforeId\n                            (List.cons (outerId.mint \"answer\") afterId)) →\n                        (∀ (name : String),\n                            List.instMembership.mem afterId name →\n                              Ne name (outerId.mint \"answer\")) →\n                          Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                              (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                            Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                                (Option.some Effect4.Modules.idTy) →\n                              ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                                Eq (Effect4.Machine.refPeek stores.refs q)\n                                    (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                  Effect4.Program.Typed.Fits w\n                                      (Effect4.Queue.Model.cellVal tb msg s)\n                                      (Effect4.Queue.cellTy A) →\n                                    Exists fun f =>\n                                      Exists fun woken =>\n                                        And\n                                          (Eq\n                                            (Effect4.Queue.withdrawOffer A\n                                              (Effect4.Program.Authoring.minted\n                                                (outerId.mint \"answer\"))\n                                              (Effect4.Program.Authoring.minted\n                                                (env.mint \"current\"))\n                                              (env.push (List.cons (env.mint \"current\") List.nil))\n                                              path)\n                                            (Except.ok f))\n                                          (And\n                                            (Effect4.Queue.Model.Notified s\n                                              (Effect4.Queue.Model.withdrawOffer s id).fst\n                                              (Effect4.Queue.Model.withdrawOffer s id).snd List.nil\n                                              woken)\n                                            (And\n                                              (Eq\n                                                (Effect4.Machine.syncOpStep\n                                                  (Effect4.Machine.SyncOp.refModify q f captured)\n                                                  stores)\n                                                (Option.some\n                                                  {\n                                                    fst :=\n                                                      {\n                                                        refs :=\n                                                          Effect4.Machine.refPoke stores.refs q\n                                                            (Effect4.Queue.Model.cellVal tb msg\n                                                              (Effect4.Queue.Model.withdrawOffer s\n                                                                  id).fst),\n                                                        deferreds := stores.deferreds,\n                                                        scopes := stores.scopes,\n                                                        memo := stores.memo,\n                                                        timers := stores.timers,\n                                                        nextName := stores.nextName,\n                                                        externals := stores.externals },\n                                                    snd :=\n                                                      Effect4.Store.Val.list\n                                                        (List.map (Effect4.Queue.Model.takerVal tb)\n                                                          woken) }))\n                                              (And\n                                                (Effect4.Program.Typed.Fits w\n                                                  (Effect4.Store.Val.list\n                                                    (List.map (Effect4.Queue.Model.takerVal tb)\n                                                      woken))\n                                                  Effect4.Queue.Model.wakeReplyTy)\n                                                (Effect4.Program.Typed.Fits w\n                                                  (Effect4.Queue.Model.cellVal tb msg\n                                                    (Effect4.Queue.Model.withdrawOffer s id).fst)\n                                                  (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":566,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Queue.Model.pollStep_types","Effect4.Modules.step_updates","Effect4.Queue.Model.pollStep_agrees"]},"doc":"**The step of `poll` is the model's `poll`.** It takes no request. The store step answers\nthe model's reply and the offers that entered, and it writes the model's next state. The model\nwakes no taker. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.poll_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State),\n          Effect4.Queue.Model.FirstProfile s →\n            ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat}\n              {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n              {captured : List Effect4.Machine.Val},\n              Eq captured.length (List.length env.names) →\n                Eq tys.length (List.length env.names) →\n                  Effect4.Program.Typed.EnvTyped w tys captured →\n                    ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                      Eq (Effect4.Machine.refPeek stores.refs q)\n                          (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                        Effect4.Program.Typed.Fits w (Effect4.Queue.Model.cellVal tb msg s)\n                            (Effect4.Queue.cellTy A) →\n                          Exists fun f =>\n                            Exists fun entered =>\n                              And\n                                (Eq\n                                  (Effect4.Queue.pollStep A\n                                    (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                    (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                  (Except.ok f))\n                                (And\n                                  (Effect4.Queue.Model.Notified s (Effect4.Queue.Model.poll s).fst\n                                    (Effect4.Queue.Model.poll s).snd.snd entered List.nil)\n                                  (And\n                                    (Eq\n                                      (Effect4.Machine.syncOpStep\n                                        (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                      (Option.some\n                                        {\n                                          fst :=\n                                            {\n                                              refs :=\n                                                Effect4.Machine.refPoke stores.refs q\n                                                  (Effect4.Queue.Model.cellVal tb msg\n                                                    (Effect4.Queue.Model.poll s).fst),\n                                              deferreds := stores.deferreds,\n                                              scopes := stores.scopes, memo := stores.memo,\n                                              timers := stores.timers, nextName := stores.nextName,\n                                              externals := stores.externals },\n                                          snd :=\n                                            Effect4.Program.Val.tuple\n                                              (List.cons\n                                                (Effect4.Queue.Model.pollReplyVal msg\n                                                  (Effect4.Queue.Model.poll s).snd.fst)\n                                                (List.cons\n                                                  (Effect4.Store.Val.list\n                                                    (List.map (Effect4.Queue.Model.offerVal tb msg)\n                                                      entered))\n                                                  List.nil)) }))\n                                    (And\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Program.Val.tuple\n                                          (List.cons\n                                            (Effect4.Queue.Model.pollReplyVal msg\n                                              (Effect4.Queue.Model.poll s).snd.fst)\n                                            (List.cons\n                                              (Effect4.Store.Val.list\n                                                (List.map (Effect4.Queue.Model.offerVal tb msg)\n                                                  entered))\n                                              List.nil)))\n                                        (Effect4.Queue.Model.pollReplyTy A))\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Queue.Model.cellVal tb msg\n                                          (Effect4.Queue.Model.poll s).fst)\n                                        (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":479,"lemmas":243,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Program.optionTy_option","Effect4.Queue.Model.pollStep_types","Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var"]},"doc":"**`poll` is typed at every scope**: it answers an option of a message. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.poll_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty),\n  Effect4.Queue.Model.MessageTy A →\n    ∀ {q : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Typed (Effect4.Program.nativeSignature table) q s\n          (Effect4.Queue.cellTy A).refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (Effect4.Queue.poll A q) s\n          A.option","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":328,"lemmas":13,"nearest":["Effect4.Queue.Model.sizeStep_agrees","Effect4.Modules.cell_read"]},"doc":"**The read law of `size`.** The operation's `Ref.get` answers the cell's value and leaves\nthe stores (`cell_read`). Under the name that `bindWith` mints for that value, the size step\nreads the model's `size`. Nothing is written, and no signal is named. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.size_read","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n  (s : Effect4.Queue.Model.State),\n  Effect4.Queue.Model.FirstProfile s →\n    ∀ {env : Effect4.Program.Authoring.Env} {path : List Nat} {captured : List Effect4.Machine.Val},\n      Eq captured.length (List.length env.names) →\n        ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n          Eq (Effect4.Machine.refPeek stores.refs q)\n              (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n            And\n              (Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGet q) stores)\n                (Option.some { fst := stores, snd := Effect4.Queue.Model.cellVal tb msg s }))\n              (Effect4.Modules.Reads\n                (Effect4.Queue.sizeStep A (Effect4.Program.Authoring.minted (env.mint \"answer\")))\n                (env.push (List.cons (env.mint \"answer\") List.nil)) path\n                (instHAppendOfAppend.hAppend captured\n                  (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                (Effect4.Store.Val.nat (Effect4.Queue.Model.size s)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":448,"lemmas":176,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Program.Bounds.matchB_refOf_var"]},"doc":"**`size` is typed at every scope**: it answers a number. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.size_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty),\n  Effect4.Queue.Model.MessageTy A →\n    ∀ {q : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Typed (Effect4.Program.nativeSignature table) q s\n          (Effect4.Queue.cellTy A).refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (Effect4.Queue.size A q) s\n          Effect4.Program.Ty.nat","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":596,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Queue.Model.takeStep_types","Effect4.Modules.step_updates","Effect4.Queue.Model.takeStep_agrees"]},"doc":"**The attempt of `take` is the model's `take` at the bounds one and one.** The cell holds\nthe state `s` of the first profile. The identity and the hint are caller's terms of the step,\neach with its capture. The step term under the row's own binder is one atomic update: the store\nstep answers the model's reply with the model's signals as two lists, and it writes the model's\nnext state. The reply and the stored value are members of their types. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.take id 1 1) →\n              tb.Injective →\n                ∀ {idSrc hintSrc : Effect4.Program.Authoring.TermSrc}\n                  {env : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Effect4.Modules.Captured idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend captured\n                              (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                            (Effect4.Machine.Val.promise (tb.handle id)) →\n                          Effect4.Modules.Captured hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend captured\n                                (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                              (Effect4.Machine.Val.promise hint) →\n                            Effect4.Modules.CapturedTy sig idSrc\n                                (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                (instHAppendOfAppend.hAppend tys\n                                  (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                Effect4.Modules.idTy →\n                              Effect4.Modules.CapturedTy sig hintSrc\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                  (instHAppendOfAppend.hAppend tys\n                                    (List.cons (Effect4.Queue.cellTy A) List.nil))\n                                  Effect4.Modules.idTy →\n                                ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                                  Eq (Effect4.Machine.refPeek stores.refs q)\n                                      (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                    Effect4.Program.Typed.Fits w\n                                        (Effect4.Queue.Model.cellVal tb msg s)\n                                        (Effect4.Queue.cellTy A) →\n                                      Exists fun f =>\n                                        Exists fun reply =>\n                                          Exists fun entered =>\n                                            Exists fun woken =>\n                                              And\n                                                (Eq\n                                                  (Effect4.Queue.takeStep A idSrc hintSrc\n                                                    (Effect4.Program.Authoring.minted\n                                                      (env.mint \"current\"))\n                                                    (env.push\n                                                      (List.cons (env.mint \"current\") List.nil))\n                                                    path)\n                                                  (Except.ok f))\n                                                (And\n                                                  (Eq\n                                                    (Effect4.Queue.Model.takeReplyVal msg\n                                                      (Effect4.Queue.Model.take s\n                                                            { id := id, min := 1,\n                                                              max := 1 }).snd.fst)\n                                                    (Option.some reply))\n                                                  (And\n                                                    (Effect4.Queue.Model.Notified s\n                                                      (Effect4.Queue.Model.take s\n                                                          { id := id, min := 1, max := 1 }).fst\n                                                      (Effect4.Queue.Model.take s\n                                                            { id := id, min := 1,\n                                                              max := 1 }).snd.snd\n                                                      entered woken)\n                                                    (And\n                                                      (Eq\n                                                        (Effect4.Machine.syncOpStep\n                                                          (Effect4.Machine.SyncOp.refModify q f\n                                                            captured)\n                                                          stores)\n                                                        (Option.some\n                                                          {\n                                                            fst :=\n                                                              {\n                                                                refs :=\n                                                                  Effect4.Machine.refPoke\n                                                                    stores.refs q\n                                                                    (Effect4.Queue.Model.cellVal\n                                                                      (Effect4.Queue.Model.Table.afterTake\n                                                                        tb id hint\n                                                                        (Effect4.Queue.Model.take s\n                                                                              { id := id, min := 1,\n                                                                                max := 1 }).snd.fst)\n                                                                      msg\n                                                                      (Effect4.Queue.Model.take s\n                                                                          { id := id, min := 1,\n                                                                            max := 1 }).fst),\n                                                                deferreds := stores.deferreds,\n                                                                scopes := stores.scopes,\n                                                                memo := stores.memo,\n                                                                timers := stores.timers,\n                                                                nextName := stores.nextName,\n                                                                externals := stores.externals },\n                                                            snd :=\n                                                              Effect4.Program.Val.tuple\n                                                                (List.cons reply\n                                                                  (List.cons\n                                                                    (Effect4.Store.Val.list\n                                                                      (List.map\n                                                                        (Effect4.Queue.Model.offerVal\n                                                                          tb msg)\n                                                                        entered))\n                                                                    (List.cons\n                                                                      (Effect4.Store.Val.list\n                                                                        (List.map\n                                                                          (Effect4.Queue.Model.takerVal\n                                                                            (Effect4.Queue.Model.Table.afterTake\n                                                                              tb id hint\n                                                                              (Effect4.Queue.Model.take\n                                                                                    s\n                                                                                    { id := id,\n                                                                                      min := 1,\n                                                                                      max :=\n                                                                                        1 }).snd.fst))\n                                                                          woken))\n                                                                      List.nil))) }))\n                                                      (And\n                                                        (Effect4.Program.Typed.Fits w\n                                                          (Effect4.Program.Val.tuple\n                                                            (List.cons reply\n                                                              (List.cons\n                                                                (Effect4.Store.Val.list\n                                                                  (List.map\n                                                                    (Effect4.Queue.Model.offerVal tb\n                                                                      msg)\n                                                                    entered))\n                                                                (List.cons\n                                                                  (Effect4.Store.Val.list\n                                                                    (List.map\n                                                                      (Effect4.Queue.Model.takerVal\n                                                                        (Effect4.Queue.Model.Table.afterTake\n                                                                          tb id hint\n                                                                          (Effect4.Queue.Model.take\n                                                                                s\n                                                                                { id := id,\n                                                                                  min := 1,\n                                                                                  max :=\n                                                                                    1 }).snd.fst))\n                                                                      woken))\n                                                                  List.nil))))\n                                                          (Effect4.Queue.Model.takeReplyTy A))\n                                                        (Effect4.Program.Typed.Fits w\n                                                          (Effect4.Queue.Model.cellVal\n                                                            (Effect4.Queue.Model.Table.afterTake tb\n                                                              id hint\n                                                              (Effect4.Queue.Model.take s\n                                                                    { id := id, min := 1,\n                                                                      max := 1 }).snd.fst)\n                                                            msg\n                                                            (Effect4.Queue.Model.take s\n                                                                { id := id, min := 1,\n                                                                  max := 1 }).fst)\n                                                          (Effect4.Queue.cellTy A))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":378,"lemmas":76,"nearest":["Effect4.Queue.take_attempt"]},"doc":"**The attempt of `take` at the operation's own binders.** The identity and the hint are\nnames that `bindWith` mints. The scope binds each, and no later binder shadows either. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat) (hint : Effect4.Machine.DeferredKey),\n          Effect4.Queue.Model.FirstProfile s →\n            Effect4.Queue.Model.Requested s (Effect4.Queue.Model.Op.take id 1 1) →\n              tb.Injective →\n                ∀ {env outerId outerHint : Effect4.Program.Authoring.Env} {path : List Nat}\n                  {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                  {captured : List Effect4.Machine.Val}\n                  {beforeId afterId beforeHint afterHint : Effect4.Program.Authoring.Names},\n                  Eq captured.length (List.length env.names) →\n                    Eq tys.length (List.length env.names) →\n                      Effect4.Program.Typed.EnvTyped w tys captured →\n                        Eq env.names\n                            (instHAppendOfAppend.hAppend beforeId\n                              (List.cons (outerId.mint \"answer\") afterId)) →\n                          (∀ (name : String),\n                              List.instMembership.mem afterId name →\n                                Ne name (outerId.mint \"answer\")) →\n                            Eq\n                                (List.instGetElem?NatLtLength.getElem? captured\n                                  (List.length beforeId))\n                                (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                              Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                                  (Option.some Effect4.Modules.idTy) →\n                                Eq env.names\n                                    (instHAppendOfAppend.hAppend beforeHint\n                                      (List.cons (outerHint.mint \"answer\") afterHint)) →\n                                  (∀ (name : String),\n                                      List.instMembership.mem afterHint name →\n                                        Ne name (outerHint.mint \"answer\")) →\n                                    Eq\n                                        (List.instGetElem?NatLtLength.getElem? captured\n                                          (List.length beforeHint))\n                                        (Option.some (Effect4.Machine.Val.promise hint)) →\n                                      Eq\n                                          (List.instGetElem?NatLtLength.getElem? tys\n                                            (List.length beforeHint))\n                                          (Option.some Effect4.Modules.idTy) →\n                                        ∀ {stores : Effect4.Machine.Stores}\n                                          {q : Effect4.Machine.RefKey},\n                                          Eq (Effect4.Machine.refPeek stores.refs q)\n                                              (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                            Effect4.Program.Typed.Fits w\n                                                (Effect4.Queue.Model.cellVal tb msg s)\n                                                (Effect4.Queue.cellTy A) →\n                                              Exists fun f =>\n                                                Exists fun reply =>\n                                                  Exists fun entered =>\n                                                    Exists fun woken =>\n                                                      And\n                                                        (Eq\n                                                          (Effect4.Queue.takeStep A\n                                                            (Effect4.Program.Authoring.minted\n                                                              (outerId.mint \"answer\"))\n                                                            (Effect4.Program.Authoring.minted\n                                                              (outerHint.mint \"answer\"))\n                                                            (Effect4.Program.Authoring.minted\n                                                              (env.mint \"current\"))\n                                                            (env.push\n                                                              (List.cons (env.mint \"current\")\n                                                                List.nil))\n                                                            path)\n                                                          (Except.ok f))\n                                                        (And\n                                                          (Eq\n                                                            (Effect4.Queue.Model.takeReplyVal msg\n                                                              (Effect4.Queue.Model.take s\n                                                                    { id := id, min := 1,\n                                                                      max := 1 }).snd.fst)\n                                                            (Option.some reply))\n                                                          (And\n                                                            (Effect4.Queue.Model.Notified s\n                                                              (Effect4.Queue.Model.take s\n                                                                  { id := id, min := 1,\n                                                                    max := 1 }).fst\n                                                              (Effect4.Queue.Model.take s\n                                                                    { id := id, min := 1,\n                                                                      max := 1 }).snd.snd\n                                                              entered woken)\n                                                            (And\n                                                              (Eq\n                                                                (Effect4.Machine.syncOpStep\n                                                                  (Effect4.Machine.SyncOp.refModify\n                                                                    q f captured)\n                                                                  stores)\n                                                                (Option.some\n                                                                  {\n                                                                    fst :=\n                                                                      {\n                                                                        refs :=\n                                                                          Effect4.Machine.refPoke\n                                                                            stores.refs q\n                                                                            (Effect4.Queue.Model.cellVal\n                                                                              (Effect4.Queue.Model.Table.afterTake\n                                                                                tb id hint\n                                                                                (Effect4.Queue.Model.take\n                                                                                      s\n                                                                                      { id := id,\n                                                                                        min := 1,\n                                                                                        max :=\n                                                                                          1 }).snd.fst)\n                                                                              msg\n                                                                              (Effect4.Queue.Model.take\n                                                                                  s\n                                                                                  { id := id,\n                                                                                    min := 1,\n                                                                                    max :=\n                                                                                      1 }).fst),\n                                                                        deferreds :=\n                                                                          stores.deferreds,\n                                                                        scopes := stores.scopes,\n                                                                        memo := stores.memo,\n                                                                        timers := stores.timers,\n                                                                        nextName := stores.nextName,\n                                                                        externals :=\n                                                                          stores.externals },\n                                                                    snd :=\n                                                                      Effect4.Program.Val.tuple\n                                                                        (List.cons reply\n                                                                          (List.cons\n                                                                            (Effect4.Store.Val.list\n                                                                              (List.map\n                                                                                (Effect4.Queue.Model.offerVal\n                                                                                  tb msg)\n                                                                                entered))\n                                                                            ⋯)) }))\n                                                              (And\n                                                                (Effect4.Program.Typed.Fits w\n                                                                  (Effect4.Program.Val.tuple\n                                                                    (List.cons reply\n                                                                      (List.cons\n                                                                        (Effect4.Store.Val.list\n                                                                          (List.map\n                                                                            (Effect4.Queue.Model.offerVal\n                                                                              tb msg)\n                                                                            entered))\n                                                                        (List.cons ⋯ List.nil))))\n                                                                  (Effect4.Queue.Model.takeReplyTy\n                                                                    A))\n                                                                (Effect4.Program.Typed.Fits w\n                                                                  (Effect4.Queue.Model.cellVal\n                                                                    (Effect4.Queue.Model.Table.afterTake\n                                                                      tb id hint\n                                                                      (Effect4.Queue.Model.take s\n                                                                            { id := id, min := 1,\n                                                                              max := 1 }).snd.fst)\n                                                                    msg\n                                                                    (Effect4.Queue.Model.take s\n                                                                        { id := id, min := 1,\n                                                                          max := 1 }).fst)\n                                                                  (Effect4.Queue.cellTy A))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":530,"lemmas":244,"nearest":["Effect4.Queue.Model.withdrawTake_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.optionTy_option","Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.Bounds.matchArgsB_list_var_nat","Effect4.Queue.Model.takeStep_types","Effect4.Queue.Model.offer_nodes_for_steps","Effect4.Queue.Model.message_nodes_for_steps","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Modules.waitRetryAt_answers","Effect4.Program.mask_printed_form_profile"]},"doc":"**`take` is typed at every scope**: it answers a message. The handle is a kept term: the\noperation reads it under its own binders. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty),\n  Effect4.Queue.Model.MessageTy A →\n    ∀ {q : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s\n          (Effect4.Queue.cellTy A).refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (Effect4.Queue.take A q) s A","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":567,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Queue.Model.withdrawTake_types","Effect4.Modules.step_updates","Effect4.Queue.Model.withdrawTake_agrees"]},"doc":"**The withdrawal of a take is the model's `withdrawTake`.** The same statement as an\nattempt's: the store step answers the takers that the model wakes, and it writes the model's\nnext state. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_withdrawal","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat),\n          Effect4.Queue.Model.FirstProfile s →\n            tb.Injective →\n              ∀ {idSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n                {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                {captured : List Effect4.Machine.Val},\n                Eq captured.length (List.length env.names) →\n                  Eq tys.length (List.length env.names) →\n                    Effect4.Program.Typed.EnvTyped w tys captured →\n                      Effect4.Modules.Captured idSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend captured\n                            (List.cons (Effect4.Queue.Model.cellVal tb msg s) List.nil))\n                          (Effect4.Machine.Val.promise (tb.handle id)) →\n                        Effect4.Modules.CapturedTy sig idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend tys\n                              (List.cons (Effect4.Queue.cellTy A) List.nil))\n                            Effect4.Modules.idTy →\n                          ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                            Eq (Effect4.Machine.refPeek stores.refs q)\n                                (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                              Effect4.Program.Typed.Fits w (Effect4.Queue.Model.cellVal tb msg s)\n                                  (Effect4.Queue.cellTy A) →\n                                Exists fun f =>\n                                  Exists fun woken =>\n                                    And\n                                      (Eq\n                                        (Effect4.Queue.withdrawTake A idSrc\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Effect4.Queue.Model.Notified s\n                                          (Effect4.Queue.Model.withdrawTake s id).fst\n                                          (Effect4.Queue.Model.withdrawTake s id).snd List.nil\n                                          woken)\n                                        (And\n                                          (Eq\n                                            (Effect4.Machine.syncOpStep\n                                              (Effect4.Machine.SyncOp.refModify q f captured)\n                                              stores)\n                                            (Option.some\n                                              {\n                                                fst :=\n                                                  {\n                                                    refs :=\n                                                      Effect4.Machine.refPoke stores.refs q\n                                                        (Effect4.Queue.Model.cellVal tb msg\n                                                          (Effect4.Queue.Model.withdrawTake s\n                                                              id).fst),\n                                                    deferreds := stores.deferreds,\n                                                    scopes := stores.scopes, memo := stores.memo,\n                                                    timers := stores.timers,\n                                                    nextName := stores.nextName,\n                                                    externals := stores.externals },\n                                                snd :=\n                                                  Effect4.Store.Val.list\n                                                    (List.map (Effect4.Queue.Model.takerVal tb)\n                                                      woken) }))\n                                          (And\n                                            (Effect4.Program.Typed.Fits w\n                                              (Effect4.Store.Val.list\n                                                (List.map (Effect4.Queue.Model.takerVal tb) woken))\n                                              Effect4.Queue.Model.wakeReplyTy)\n                                            (Effect4.Program.Typed.Fits w\n                                              (Effect4.Queue.Model.cellVal tb msg\n                                                (Effect4.Queue.Model.withdrawTake s id).fst)\n                                              (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":377,"lemmas":76,"nearest":["Effect4.Queue.take_withdrawal"]},"doc":"**The withdrawal of a take at the operation's own binders.** The identity is a name that\n`bindWith` mints. The scope binds it, and no later binder shadows it. ","kind":"theorem","module":"Effect4.Laws.Library.Queue.Ops","name":"Effect4.Queue.take_withdrawal_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (A : Effect4.Program.Ty),\n      Effect4.Queue.Model.MessageTy A →\n        ∀ (tb : Effect4.Modules.Table) (msg : Nat → Effect4.Machine.Val)\n          (s : Effect4.Queue.Model.State) (id : Nat),\n          Effect4.Queue.Model.FirstProfile s →\n            tb.Injective →\n              ∀ {env outerId : Effect4.Program.Authoring.Env} {path : List Nat}\n                {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n                {captured : List Effect4.Machine.Val}\n                {beforeId afterId : Effect4.Program.Authoring.Names},\n                Eq captured.length (List.length env.names) →\n                  Eq tys.length (List.length env.names) →\n                    Effect4.Program.Typed.EnvTyped w tys captured →\n                      Eq env.names\n                          (instHAppendOfAppend.hAppend beforeId\n                            (List.cons (outerId.mint \"answer\") afterId)) →\n                        (∀ (name : String),\n                            List.instMembership.mem afterId name →\n                              Ne name (outerId.mint \"answer\")) →\n                          Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                              (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                            Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                                (Option.some Effect4.Modules.idTy) →\n                              ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                                Eq (Effect4.Machine.refPeek stores.refs q)\n                                    (Option.some (Effect4.Queue.Model.cellVal tb msg s)) →\n                                  Effect4.Program.Typed.Fits w\n                                      (Effect4.Queue.Model.cellVal tb msg s)\n                                      (Effect4.Queue.cellTy A) →\n                                    Exists fun f =>\n                                      Exists fun woken =>\n                                        And\n                                          (Eq\n                                            (Effect4.Queue.withdrawTake A\n                                              (Effect4.Program.Authoring.minted\n                                                (outerId.mint \"answer\"))\n                                              (Effect4.Program.Authoring.minted\n                                                (env.mint \"current\"))\n                                              (env.push (List.cons (env.mint \"current\") List.nil))\n                                              path)\n                                            (Except.ok f))\n                                          (And\n                                            (Effect4.Queue.Model.Notified s\n                                              (Effect4.Queue.Model.withdrawTake s id).fst\n                                              (Effect4.Queue.Model.withdrawTake s id).snd List.nil\n                                              woken)\n                                            (And\n                                              (Eq\n                                                (Effect4.Machine.syncOpStep\n                                                  (Effect4.Machine.SyncOp.refModify q f captured)\n                                                  stores)\n                                                (Option.some\n                                                  {\n                                                    fst :=\n                                                      {\n                                                        refs :=\n                                                          Effect4.Machine.refPoke stores.refs q\n                                                            (Effect4.Queue.Model.cellVal tb msg\n                                                              (Effect4.Queue.Model.withdrawTake s\n                                                                  id).fst),\n                                                        deferreds := stores.deferreds,\n                                                        scopes := stores.scopes,\n                                                        memo := stores.memo,\n                                                        timers := stores.timers,\n                                                        nextName := stores.nextName,\n                                                        externals := stores.externals },\n                                                    snd :=\n                                                      Effect4.Store.Val.list\n                                                        (List.map (Effect4.Queue.Model.takerVal tb)\n                                                          woken) }))\n                                              (And\n                                                (Effect4.Program.Typed.Fits w\n                                                  (Effect4.Store.Val.list\n                                                    (List.map (Effect4.Queue.Model.takerVal tb)\n                                                      woken))\n                                                  Effect4.Queue.Model.wakeReplyTy)\n                                                (Effect4.Program.Typed.Fits w\n                                                  (Effect4.Queue.Model.cellVal tb msg\n                                                    (Effect4.Queue.Model.withdrawTake s id).fst)\n                                                  (Effect4.Queue.cellTy A)))))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":3,"nearest":[]},"doc":"Helper of ref-steps-agree; modifySome consumes the callback pair's option decoding. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.decode_modifySome","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A B : Type} (I : Effect4.Store.Image A) (J : Effect4.Store.Image B) (p : Prod B (Option A)),\n  Eq\n    (Effect4.Store.Image.ident.ofTuple2 Effect4.Store.Image.ident.option\n      ((J.tuple2 I.option).toVal p))\n    (Option.some { fst := J.toVal p.fst, snd := Option.map I.toVal p.snd })","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"Helper of ref-steps-agree; optional callback laws consume its exact option decoding. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.decode_option","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (o : Option A),\n  Eq (Effect4.Store.Image.ident.ofOption (I.toOption o)) (Option.some (Option.map I.toVal o))","status":"proved"},{"axioms":[],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"Helper of ref-steps-agree; the optional reply laws consume this value equation. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.encode_getD","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (o : Option A) (a : A),\n  Eq ((Option.map I.toVal o).getD (I.toVal a)) (I.toVal (o.getD a))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.getAndSet answers the old value and stores the replacement. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.getAndSet_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (value : A),\n      Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGetAndSet q (I.toVal value)) stores)\n        (Option.some\n          { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.getAndSet a value) q stores,\n            snd := I.toVal (Effect4.Ref.Model.getAndSet a value).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":123,"lemmas":9,"nearest":["Effect4.Ref.decode_option","Effect4.Ref.kernel_agrees"]},"doc":"Ref.getAndUpdateSome agrees with both optional branches, retaining the optional write. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.getAndUpdateSome_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → Option A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toOption (fn a))) →\n        Eq\n          (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGetAndUpdateSome q f captured)\n            stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.getAndUpdateSome fn a) q stores,\n              snd := I.toVal (Effect4.Ref.Model.getAndUpdateSome fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":123,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.getAndUpdate agrees when its callback evaluates to the model's next value. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.getAndUpdate_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toVal (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGetAndUpdate q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.getAndUpdate fn a) q stores,\n              snd := I.toVal (Effect4.Ref.Model.getAndUpdate fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.get observes the model's reply and performs no write. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.get_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refGet q) stores)\n      (Option.some\n        { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.get a) q stores,\n          snd := I.toVal (Effect4.Ref.Model.get a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":216,"lemmas":12,"nearest":[]},"doc":"Helper of ref-steps-agree; the nonallocating agreement laws consume this connector. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.kernel_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A B : Type} (I : Effect4.Store.Image A) (reply : B → Effect4.Machine.Val) (a : A)\n  (r : Effect4.Ref.Model.Result A B) {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey}\n  {op : Effect4.Machine.SyncOp} {kernel : Effect4.Machine.RefKernel},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    Eq op.refKernel (Option.some { fst := q, snd := kernel }) →\n      Eq (kernel (I.toVal a))\n          (Option.some { fst := reply r.reply, snd := Option.map I.toVal r.write }) →\n        Eq (Effect4.Machine.syncOpStep op stores)\n          (Option.some { fst := Effect4.Ref.resultStores I r q stores, snd := reply r.reply })","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":208,"lemmas":9,"nearest":[]},"doc":"Ref.make allocates the model's initial value and answers its fresh cell identity. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.make_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) (stores : Effect4.Machine.Stores),\n  Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refMake (I.toVal a)) stores)\n    (Option.some\n      {\n        fst :=\n          {\n            refs :=\n              instHAppendOfAppend.hAppend stores.refs\n                (List.cons (I.toVal (Effect4.Ref.Model.make a)) List.nil),\n            deferreds := stores.deferreds, scopes := stores.scopes, memo := stores.memo,\n            timers := stores.timers, nextName := stores.nextName, externals := stores.externals },\n        snd := Effect4.Machine.Val.cell { index := List.length stores.refs } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":124,"lemmas":9,"nearest":["Effect4.Ref.encode_getD","Effect4.Ref.decode_modifySome","Effect4.Ref.kernel_agrees"]},"doc":"Ref.modifySome writes the old value on None, through latest's call to modify. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.modifySome_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A B : Type} (I : Effect4.Store.Image A) (J : Effect4.Store.Image B) (a : A)\n  {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → Prod B (Option A)) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some ((J.tuple2 I.option).toVal (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModifySome q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.modifySome fn a) q stores,\n              snd := J.toVal (Effect4.Ref.Model.modifySome fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":124,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.modify returns the callback's first value and stores its second value. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.modify_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A B : Type} (I : Effect4.Store.Image A) (J : Effect4.Store.Image B) (a : A)\n  {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → Prod B A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some ((J.tuple2 I).toVal (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.modify fn a) q stores,\n              snd := J.toVal (Effect4.Ref.Model.modify fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":398,"lemmas":23,"nearest":["Effect4.Ref.modify_agrees","Effect4.Modules.Step.sound"]},"doc":"A step that computes an independent transition implements one native Ref.modify.\nThis consumes the shared callback reading law and the independent Ref operation law. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Callback","name":"Effect4.Ref.modify_callback_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {L : Effect4.Schema.Model.Leaves} {C B : Effect4.Program.Ty} {Γ : List Effect4.Program.Ty}\n  (body : Effect4.Modules.Step (List.cons C Γ) (B.prod C))\n  (captures :\n    {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc)\n  (vs : Effect4.Modules.Inputs L Γ)\n  (transition :\n    Effect4.Schema.Model.CarrierAt L C →\n      Prod (Effect4.Schema.Model.CarrierAt L B) (Effect4.Schema.Model.CarrierAt L C))\n  (cell : Effect4.Schema.Model.CarrierAt L C) {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val} {receiver : Effect4.Program.Authoring.TermSrc}\n  {q : Effect4.Machine.RefKey} {stores : Effect4.Machine.Stores},\n  Eq vals.length (List.length env.names) →\n    (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n        Effect4.Modules.Reads (captures x) env path vals\n          ((Effect4.Schema.Model.imageAt L t).toVal (x.get vs))) →\n      Effect4.Modules.Reads receiver env path vals (Effect4.Machine.Val.cell q) →\n        Eq (Effect4.Machine.refPeek stores.refs q)\n            (Option.some ((Effect4.Schema.Model.imageAt L C).toVal cell)) →\n          Eq body.canonical Bool.true →\n            Eq (Effect4.Modules.Step.eval L { fst := cell, snd := vs } body) (transition cell) →\n              autoParam (Effect4.Modules.Step.IdentityFacts L body)\n                  Effect4.Ref.modify_callback_agrees._auto_1 →\n                Exists fun term =>\n                  Exists fun request =>\n                    And\n                      (Eq\n                        (body.callback (fun {t} => captures)\n                          (Effect4.Program.Authoring.Ref.modifyWith receiver) env path)\n                        (Except.ok\n                          (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.refModifyWith term)\n                            request)))\n                      (And\n                        (Eq (Effect4.Program.evalTerm vals request)\n                          (Option.some (Effect4.Machine.Val.cell q)))\n                        (Eq\n                          (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q term vals)\n                            stores)\n                          (Option.some\n                            {\n                              fst :=\n                                Effect4.Ref.resultStores (Effect4.Schema.Model.imageAt L C)\n                                  (Effect4.Ref.Model.modify transition cell) q stores,\n                              snd :=\n                                (Effect4.Schema.Model.imageAt L B).toVal\n                                  (Effect4.Ref.Model.modify transition cell).reply })))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":429,"lemmas":89,"nearest":["Effect4.Modules.Step.typed","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var"]},"doc":"Typed captures at the caller's scope suffice for a typed Ref.modify callback.\nThe source connector supplies stability by freezing and relocation. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Callback","name":"Effect4.Ref.modify_callback_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {C B : Effect4.Program.Ty} {Γ : List Effect4.Program.Ty}\n  (body : Effect4.Modules.Step (List.cons C Γ) (B.prod C))\n  (captures :\n    {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc)\n  {receiver : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n  Eq C.normalize C →\n    Effect4.Modules.NodesFormed C →\n      Eq B.normalize B →\n        Effect4.Modules.NodesFormed B →\n          Effect4.Modules.Typed (Effect4.Program.nativeSignature table) receiver s C.refOf →\n            (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n                Effect4.Modules.Typed (Effect4.Program.nativeSignature table) (captures x) s t) →\n              body.Facts →\n                Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n                  (body.callback (fun {t} => captures)\n                    (Effect4.Program.Authoring.Ref.modifyWith receiver))\n                  s B","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":226,"lemmas":9,"nearest":["Effect4.Ref.modifySome_agrees","Effect4.Ref.modify_agrees","Effect4.Ref.updateSomeAndGet_agrees","Effect4.Ref.getAndUpdateSome_agrees","Effect4.Ref.updateSome_agrees","Effect4.Ref.updateAndGet_agrees","Effect4.Ref.getAndUpdate_agrees","Effect4.Ref.update_agrees","Effect4.Ref.setAndGet_agrees","Effect4.Ref.getAndSet_agrees","Effect4.Ref.set_agrees","Effect4.Ref.get_agrees","Effect4.Ref.make_agrees"]},"doc":"**The thirteen operation laws hold** (the claim `ref-steps-agree`, role simulation).\nPlacement: concept `translation-simulation`, requirement R10. Reach: allocation for any exact\nimage; every other operation on one allocated cell holding the encoded value, with a callback\nthat evaluates to the encoded next value. Each law observes the reply and the final stores. Not\nestablished: the laws compare replies and final stores, not write events; no scheduling,\nwhole run, host object identity, callback exception or reentrant mutation. Consumers: the typed\ncallback connector (`src/Effect4/Laws/Library/Ref/Callback.lean`), then SynchronizedRef and the\nkeyed cells (decisions row 335). ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.ref_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Ref.StepsAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.setAndGet answers and stores the replacement. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.setAndGet_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (value : A),\n      Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refSetAndGet q (I.toVal value)) stores)\n        (Option.some\n          { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.setAndGet a value) q stores,\n            snd := I.toVal (Effect4.Ref.Model.setAndGet a value).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.set answers the backing-cell identity, retaining the declaration's signed exception. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.set_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (value : A),\n      Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refSet q (I.toVal value)) stores)\n        (Option.some\n          { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.set q a value) q stores,\n            snd := Effect4.Machine.Val.cell (Effect4.Ref.Model.set q a value).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":123,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.updateAndGet agrees when its callback evaluates to the model's next value. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.updateAndGet_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toVal (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refUpdateAndGet q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.updateAndGet fn a) q stores,\n              snd := I.toVal (Effect4.Ref.Model.updateAndGet fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":123,"lemmas":9,"nearest":["Effect4.Ref.encode_getD","Effect4.Ref.decode_option","Effect4.Ref.kernel_agrees"]},"doc":"Ref.updateSomeAndGet agrees with both optional branches, retaining the optional write. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.updateSomeAndGet_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → Option A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toOption (fn a))) →\n        Eq\n          (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refUpdateSomeAndGet q f captured)\n            stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.updateSomeAndGet fn a) q stores,\n              snd := I.toVal (Effect4.Ref.Model.updateSomeAndGet fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":122,"lemmas":9,"nearest":["Effect4.Ref.decode_option","Effect4.Ref.kernel_agrees"]},"doc":"Ref.updateSome agrees with both optional branches, retaining the optional write. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.updateSome_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → Option A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toOption (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refUpdateSome q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.updateSome fn a) q stores,\n              snd := (fun x => Effect4.Store.Val.unit) (Effect4.Ref.Model.updateSome fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":122,"lemmas":9,"nearest":["Effect4.Ref.kernel_agrees"]},"doc":"Ref.update agrees when its callback evaluates to the model's next value. ","kind":"theorem","module":"Effect4.Laws.Library.Ref.Operations","name":"Effect4.Ref.update_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {A : Type} (I : Effect4.Store.Image A) (a : A) {stores : Effect4.Machine.Stores}\n  {q : Effect4.Machine.RefKey},\n  Eq (Effect4.Machine.refPeek stores.refs q) (Option.some (I.toVal a)) →\n    ∀ (fn : A → A) (f : Effect4.Program.Term) (captured : List Effect4.Machine.Val),\n      Eq\n          (Effect4.Program.evalTerm\n            (instHAppendOfAppend.hAppend captured (List.cons (I.toVal a) List.nil)) f)\n          (Option.some (I.toVal (fn a))) →\n        Eq (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refUpdate q f captured) stores)\n          (Option.some\n            { fst := Effect4.Ref.resultStores I (Effect4.Ref.Model.update fn a) q stores,\n              snd := (fun x => Effect4.Store.Val.unit) (Effect4.Ref.Model.update fn a).reply })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1562,"lemmas":1245,"nearest":["Effect4.Program.Denote.denoteRowsB_straight","Effect4.Program.Agreement.localWaitC_to_rowsB","Effect4.Run.CallTree.request_leads","Effect4.Machine.Lift.driveState_lift","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Run.Keeps.reached"]},"doc":"Every accepted call binding names a wait in the admitted call tree.\nThe tape contains only exits carried by submitted replies in this run.\nThis is the command-prefix connection consumed by the original routing clause. ","kind":"theorem","module":"Effect4.Laws.Run.CallTree","name":"Effect4.Run.CallTree.bound_in_tree","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":["Effect4.Run.CallTree.request_leads"],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq (Effect4.Program.Denote.StraightRows s.built.table s.built.program) Bool.true →\n      Eq (Effect4.Run.CallTree.NoCauseHandler s.built.program) Bool.true →\n        Effect4.Program.SourceScope.ExternalOnly s.built.program →\n          Effect4.Program.SourceScope.ConcreteReplies s.built.table →\n            ∀ (call : Effect4.Api.HostSession.Call) (token : Nat),\n              List.instMembership.mem (s.journal.zip s.phases)\n                  { fst := Effect4.Api.Runner.Command.bind call token,\n                    snd := Effect4.Api.HostSession.Phase.bound } →\n                Exists fun i =>\n                  Exists fun row =>\n                    Exists fun T =>\n                      And (Eq call.op (Effect4.Program.NativeOp.external i))\n                        (And (Eq (Effect4.Program.externalRow s.built.table i) (Option.some row))\n                          (And\n                            (∀ (ex : Effect4.Machine.ExitV),\n                              List.instMembership.mem T ex →\n                                Exists fun reply =>\n                                  And\n                                    (List.instMembership.mem s.journal\n                                      (Effect4.Api.Runner.Command.submit reply))\n                                    (Eq reply.completion (Effect4.Machine.Completion.ofExit ex)))\n                            (Eq (Effect4.Run.CallTree.treeWaits s.built.table s.built.program T)\n                              (Effect4.Program.Denote.RowsStop.waiting i call.request))))","status":"modulo"},{"axioms":[],"broughtIn":{"definitions":743,"lemmas":65,"nearest":[]},"doc":"A live native request retains a local call position reached under submitted exits.\nConsumer: `request_in_tree`, then the original routing clause.\nThe unresolved obligation includes arbitrary budget cuts and every permitted control decision.\nThe existing local agreement theorem supplies the subsequent call-tree observation. ","kind":"goal","module":"Effect4.Laws.Run.CallTree","name":"Effect4.Run.CallTree.request_leads","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":["Effect4.Run.CallTree.request_leads"],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq (Effect4.Program.Denote.StraightRows s.built.table s.built.program) Bool.true →\n      Eq (Effect4.Run.CallTree.NoCauseHandler s.built.program) Bool.true →\n        Effect4.Program.SourceScope.ExternalOnly s.built.program →\n          Effect4.Program.SourceScope.ConcreteReplies s.built.table →\n            ∀ (call : Effect4.Api.HostSession.Call) (token : Nat),\n              Eq (Effect4.Program.requestOf s.machine call.fiber token)\n                  (Option.some { fst := call.op, snd := call.request }) →\n                Exists fun i =>\n                  Exists fun row =>\n                    Exists fun tape =>\n                      Exists fun frame =>\n                        Exists fun stores =>\n                          And (Eq call.op (Effect4.Program.NativeOp.external i))\n                            (And\n                              (Eq (Effect4.Program.externalRow s.built.table i) (Option.some row))\n                              (And\n                                (∀ (ex : Effect4.Machine.ExitV),\n                                  List.instMembership.mem tape ex →\n                                    Exists fun reply =>\n                                      And\n                                        (List.instMembership.mem s.journal\n                                          (Effect4.Api.Runner.Command.submit reply))\n                                        (Eq reply.completion\n                                          (Effect4.Machine.Completion.ofExit ex)))\n                                (And\n                                  (Effect4.Program.Agreement.Leads\n                                    (Effect4.Run.CallTree.admittedTapeHost s.built.table)\n                                    s.built.program\n                                    (Effect4.Program.Agreement.Pos.live\n                                      (Effect4.Program.Agreement.fiberOf\n                                        (Effect4.Program.compile s.built.program\n                                          s.budget.compileFuel)\n                                        List.nil)\n                                      Effect4.Machine.Stores.empty)\n                                    tape (Effect4.Program.Agreement.Pos.live frame stores) List.nil)\n                                  (And\n                                    (Eq (Effect4.Program.Agreement.IsCall frame.current) Bool.true)\n                                    (Eq (Effect4.Program.Agreement.callOf frame.current)\n                                      (Option.some { fst := i, snd := call.request }))))))","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1326,"lemmas":85,"nearest":[]},"doc":"Universal row preservation lifts to every recorded run. ","kind":"theorem","module":"Effect4.Laws.Run.Frame","name":"Effect4.Run.Keeps.reached","placement":{"concept":"host-session-protocol","requirement":"R13"},"restsOn":[],"statement":"∀ {I : Effect4.Run → Prop},\n  Effect4.Run.Keeps (fun x x_1 => True) I →\n    (∀ (b : Effect4.Api.Built) (id : String) (budget : Effect4.Api.Budget) (profile : String),\n        I (Effect4.Run.open b id budget profile)) →\n      ∀ (s : Effect4.Run), s.Reached → I s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":948,"lemmas":69,"nearest":[]},"doc":"**A reply application consumes the selected call, and no other.** When the session applies\nthe reply stored at a key, that key has a live binding. The consumed calls gain that binding's\ncall and nothing else, and the count of applied replies grows by one. Reach: any session, key and\nbudget. It does not establish reply admission at the application, which is open R6 work\n(`docs/core/host-boundary.md` §4.5), and it does not order two reply applications. Consumer: the\nworkers scenario's clause \"selection\". A refused reply application leaves the session as it was\n(`applyReply_refused`, `src/Effect4/Laws/Api/Runner.lean`). A budget of zero leaves the reply\nstored (`applyReply_zero`, `src/Effect4/Laws/Api/HostSession.lean`). ","kind":"theorem","module":"Effect4.Laws.Run.Rows","name":"Effect4.Run.applied_selects","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.AppliedSelects","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":896,"lemmas":69,"nearest":[]},"doc":"**A control retires exactly the held calls whose guard it removed.** After an accepted\ncontrol, a call the host holds whose guard the machine still has stays active. A held call whose\nguard is gone is retired, with the reply that waited for it. Reach: any session, budget and\ncontrol decision that the session does not refuse. It does not establish which guards a decision\nremoves: one interruption may remove the guards of several fibers, and that is the machine's\nstep. The retirement edge of the host protocol stays open R6 work\n(`docs/core/host-boundary.md` §4.2). Consumer: the workers scenario's clause \"retirement\", whose\nfinite runs show the machine's part. ","kind":"theorem","module":"Effect4.Laws.Run.Rows","name":"Effect4.Run.control_retires","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.ControlRetires","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1564,"lemmas":395,"nearest":["Effect4.Program.Denote.denoteRowsB_straight","Effect4.Program.Agreement.localRunC_compileB","Effect4.Run.funded_replays"]},"doc":"**The meaning under a run's reply tape is the run's observation** (DI-69). For a recorded\nrun of a program of the fragment, the meaning of the program under the run's reply tape is the\nroot's exit with the stores, and the reply tape is read to its end. Where the root has no exit,\nthe meaning is the frontier. Reach: `StraightRows`, one fiber, every compile budget; a run that\nis funded, at rest and driven by a host: its controls evaluate the root or flush, and each reply\nholds an exit. It does not establish the same for a run with an interruption, a clock step, a\ndelayed cell read or a handle row: each has a red control. It says nothing of a fiber, a scope or\na loop. Concept `translation-simulation`, claim `rows-denotation-session`, role simulation;\nrequirement R6. Consumer: a fact of a program's call tree, read on a run.\n\nThe proof (slice H8): the session's tape is answered (`tapeFrom_answered`); each decision keeps\nthe machine in a settled form whose position the local run with calls reaches (`tape_holds`); a\nmachine at rest is exited or waits on a call; and there the meaning is what the local run says\n(`meaning_settled`), the compile's frontier being a divergence that rest excludes. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaning","name":"Effect4.Run.denoteRows_eq_session","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"Effect4.Run.DenoteRowsEqSession Effect4.Program.Denote.StraightRows","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1383,"lemmas":86,"nearest":["Effect4.Run.funded_replays"]},"doc":"**The root's ending is a function of the tape** (proved). Two funded recorded runs of one\nbuilt program, at one budget, with one tape, end the same way. A reply that the session never\napplied, a stale one among them, is on neither tape. Placement: concept `host-session-protocol`,\nR6; the candidate restatement of `stale_never_applies`'s clause four. It reads\n`funded_replays` (`src/Effect4/Laws/Run/Tape.lean`). It says nothing of a run that a budget cut,\nand nothing of which body the root answers. ","kind":"theorem","module":"Effect4.Laws.Run.Journal","name":"Effect4.Run.ending_of_tape","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ (s₁ s₂ : Effect4.Run),\n  s₁.Reached →\n    s₂.Reached →\n      Eq s₁.built s₂.built →\n        Eq s₁.budget s₂.budget →\n          Eq s₁.funded Bool.true →\n            Eq s₂.funded Bool.true → Eq s₁.tapeOf s₂.tapeOf → Eq s₁.exit s₂.exit","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1369,"lemmas":87,"nearest":["Effect4.Run.journal_replays","Effect4.Run.tape_replays"]},"doc":"**The machine of a funded run is the raw replay of its tape's decisions.** For a recorded\nrun whose journal holds no stopped row, the machine is the machine that the raw frame replay\nleaves on the decisions of the run's tape, from the program's own load, at the run's table and\nbudgets. Reach: any run that was opened and then played (`Run.Reached`), under `funded`. It is\none application of `tape_replays` at the run's fresh open, with `Run.journal_replays`. It does\nnot establish that a run is funded: that is the open claim `embedded-budget-sufficient`. It does\nnot establish equal session ledgers, and it says nothing of a run with a stopped row. Concept\n`translation-simulation`, R8. Consumer: each statement over runs that takes `funded` as its\nbudget premise, the planned goals of `Test/Dogfood/Scenario/QueueWorkers.lean` first. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.funded_replays","placement":{"concept":"translation-simulation","requirement":"R8"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.funded Bool.true →\n      Eq s.machine\n        (Effect4.Run.machineOf\n          (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel s.tapeOf\n            (Effect4.Api.load s.built.program s.budget.compileFuel)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1332,"lemmas":98,"nearest":[]},"doc":"**Every reached run's machine is a history of its program.** Reach: every built program,\nname, budget and profile, every row. ","kind":"theorem","module":"Effect4.Laws.Run.Frame","name":"Effect4.Run.reached_history","placement":{"concept":"host-session-protocol","requirement":"R13"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    And (Eq s.session.calls (Effect4.Api.HostSession.callTable s.built.program s.built.table))\n      (Effect4.Run.HistoryOf s.built s.budget.compileFuel s.machine)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1457,"lemmas":147,"nearest":["Effect4.Program.hom_eq_cata_ty","Effect4.Run.runWith_denotes"]},"doc":"**H9 at the driver, for any reactor behind its rows' types.** Guard a reactor by its rows'\ncolumns and drive a `StraightRows` program with it. When the run is funded, at rest and its root\nexited, the guarded reactor, read as a host, runs the program's call tree to the root's exit\nwith the run's stores, and ends at the drive's state. It is `runWith_denotes` with the envelope\nsupplied by the guard. Reach and limits as there; a row whose answer column allocates an\nexternal handle answers nothing through the guard. Concept `translation-simulation`, role\nsimulation; requirement R6. Consumer: the battery's repository runs\n(`Test/Api/SessionMeaning.lean`). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_guarded_denotes","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  Eq (Effect4.Program.Denote.StraightRows b.table b.program) Bool.true →\n    Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.funded Bool.true →\n      Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.atRest Bool.true →\n        ∀ (ex : Effect4.Machine.ExitV),\n          Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.exit (Option.some ex) →\n            Eq\n              (Effect4.Program.Denote.hostRun (Effect4.Run.reactorHost b.table r.guardRows)\n                b.program List.nil Effect4.Machine.Stores.empty st)\n              (Option.some\n                { fst := ex,\n                  snd :=\n                    {\n                      fst :=\n                        (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.machine.state\n                          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann)\n                          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                            Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                            Effect4.FiberId Effect4.Machine.Ann),\n                      snd := (Effect4.Run.runWith b r.guardRows st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1459,"lemmas":147,"nearest":["Effect4.Program.hom_eq_cata_ty","Effect4.Run.runWith_denotesB"]},"doc":"**H9 at the driver on loops, for any reactor behind its rows' types**: `runWith_denotesB` with\nthe envelope supplied by the guard (`runWith_guarded_denotes` on loops). ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.runWith_guarded_denotesB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built) (r : Effect4.Run.Reactor σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  Eq (Effect4.Program.Denote.LoopedRows b.program) Bool.true →\n    Eq (Effect4.Program.Denote.LoopedDataRows b.table b.program) Bool.true →\n      Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.funded Bool.true →\n        Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.atRest Bool.true →\n          ∀ (ex : Effect4.Machine.ExitV),\n            Eq (Effect4.Run.runWith b r.guardRows st id budget rounds).fst.exit (Option.some ex) →\n              Exists fun lower =>\n                ∀ (k : Nat),\n                  instLENat.le lower k →\n                    Eq\n                      (Effect4.Program.Denote.hostRunB (Effect4.Run.reactorHost b.table r.guardRows)\n                        k b.program List.nil Effect4.Machine.Stores.empty st)\n                      (Option.some\n                        { fst := Option.some ex,\n                          snd :=\n                            {\n                              fst :=\n                                (Effect4.Run.runWith b r.guardRows st id budget\n                                          rounds).fst.machine.state\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann),\n                              snd :=\n                                (Effect4.Run.runWith b r.guardRows st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1431,"lemmas":91,"nearest":["Effect4.Run.runWith_guarded_denotes"]},"doc":"**H9 at the driver, for any host.** Read a host of the row signature as a reactor, behind\nits rows' types, and drive a `StraightRows` program with it, at a table with distinct keys. When\nthe run is funded, at rest and its root exited, the host behind its rows' types runs the\nprogram's call tree to the root's exit with the run's stores, and ends at the drive's state. A\nhost whose answers the rows admit is its own guard (`hostGuard_of_meets`). Reach and limits as\n`runWith_denotes`. Concept `translation-simulation`, role simulation; requirement R6. Consumer:\nthe battery's recorded and replayed sessions (`Test/Api/SessionMeaning.lean`). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_host_denotes","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built)\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig b.table) σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  (List.map Effect4.Program.rowKey b.table).Nodup →\n    Eq (Effect4.Program.Denote.StraightRows b.table b.program) Bool.true →\n      Eq\n          (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id budget\n                rounds).fst.funded\n          Bool.true →\n        Eq\n            (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id budget\n                  rounds).fst.atRest\n            Bool.true →\n          ∀ (ex : Effect4.Machine.ExitV),\n            Eq\n                (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id\n                      budget rounds).fst.exit\n                (Option.some ex) →\n              Eq\n                (Effect4.Program.Denote.hostRun (Effect4.Run.hostGuard b.table host) b.program\n                  List.nil Effect4.Machine.Stores.empty st)\n                (Option.some\n                  { fst := ex,\n                    snd :=\n                      {\n                        fst :=\n                          (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows\n                                    st id budget rounds).fst.machine.state\n                            (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann)\n                            (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                              Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                              Effect4.FiberId Effect4.Machine.Ann),\n                        snd :=\n                          (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows\n                              st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1438,"lemmas":91,"nearest":["Effect4.Run.runWith_guarded_denotesB"]},"doc":"**H9 at the driver on loops, for any host**: a host of the row signature read as a reactor\nbehind its rows' types, at a table with distinct keys (`runWith_host_denotes` on loops). The\nhost behind its rows' types runs the budgeted call tree, past a budget bound, to the root's\nexit with the run's stores, and ends at the drive's state. ","kind":"theorem","module":"Effect4.Laws.Api.SessionMeaningLoop","name":"Effect4.Run.runWith_host_denotesB","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} (b : Effect4.Api.Built)\n  (host : Effects.Comodel (Effect4.Program.Denote.RowSig b.table) σ) (st : σ) (id : String)\n  (budget : Effect4.Api.Budget) (rounds : Nat),\n  (List.map Effect4.Program.rowKey b.table).Nodup →\n    Eq (Effect4.Program.Denote.LoopedRows b.program) Bool.true →\n      Eq (Effect4.Program.Denote.LoopedDataRows b.table b.program) Bool.true →\n        Eq\n            (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id budget\n                  rounds).fst.funded\n            Bool.true →\n          Eq\n              (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id\n                    budget rounds).fst.atRest\n              Bool.true →\n            ∀ (ex : Effect4.Machine.ExitV),\n              Eq\n                  (Effect4.Run.runWith b (Effect4.Run.Reactor.ofHost b.table host).guardRows st id\n                        budget rounds).fst.exit\n                  (Option.some ex) →\n                Exists fun lower =>\n                  ∀ (k : Nat),\n                    instLENat.le lower k →\n                      Eq\n                        (Effect4.Program.Denote.hostRunB (Effect4.Run.hostGuard b.table host) k\n                          b.program List.nil Effect4.Machine.Stores.empty st)\n                        (Option.some\n                          { fst := Option.some ex,\n                            snd :=\n                              {\n                                fst :=\n                                  (Effect4.Run.runWith b\n                                            (Effect4.Run.Reactor.ofHost b.table host).guardRows st\n                                            id budget rounds).fst.machine.state\n                                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                      Effect4.FiberId Effect4.Machine.Ann)\n                                    (Effect4.FrameFiber Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann)\n                                    (Effect4.FrameEvent Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann),\n                                snd :=\n                                  (Effect4.Run.runWith b\n                                      (Effect4.Run.Reactor.ofHost b.table host).guardRows st id\n                                      budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1431,"lemmas":88,"nearest":["Effect4.Run.runWith_host_denotes"]},"doc":"**H9 at the driver, for a typed layer.** Implement the rows by a layer typed from the rows'\nprotocol to a lower one, over a host that meets the lower protocol, and drive a `StraightRows`\nprogram with the layered host read as a reactor. When the run is funded, at rest and its root\nexited, the layered host itself runs the program's call tree to the root's exit with the run's\nstores, and ends at the drive's state. Reach and limits as `runWith_denotes`; the layer's typing\nand the host's protocol are premises. Concept `translation-simulation`, role simulation;\nrequirement R6. Consumer: typed host utilities (the battery's retry), and the printed services\nof slice CO-6b, shape (c). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.runWith_layer_denotes","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ {σ : Type} {T : Effects.Signature} {PT : Effects.Protocol T} (b : Effect4.Api.Built)\n  (impl : Effects.Handler (Effect4.Program.Denote.RowSig b.table) (Effects.Program T)),\n  Effects.Handler.Typed (Effect4.Run.externalProtocol b.table) PT impl →\n    ∀ (host : Effects.Comodel T σ),\n      host.Meets PT →\n        ∀ (st : σ) (id : String) (budget : Effect4.Api.Budget) (rounds : Nat),\n          (List.map Effect4.Program.rowKey b.table).Nodup →\n            Eq (Effect4.Program.Denote.StraightRows b.table b.program) Bool.true →\n              Eq\n                  (Effect4.Run.runWith b\n                        (Effect4.Run.Reactor.ofHost b.table\n                            (Effects.Comodel.through impl host)).guardRows\n                        st id budget rounds).fst.funded\n                  Bool.true →\n                Eq\n                    (Effect4.Run.runWith b\n                          (Effect4.Run.Reactor.ofHost b.table\n                              (Effects.Comodel.through impl host)).guardRows\n                          st id budget rounds).fst.atRest\n                    Bool.true →\n                  ∀ (ex : Effect4.Machine.ExitV),\n                    Eq\n                        (Effect4.Run.runWith b\n                              (Effect4.Run.Reactor.ofHost b.table\n                                  (Effects.Comodel.through impl host)).guardRows\n                              st id budget rounds).fst.exit\n                        (Option.some ex) →\n                      Eq\n                        (Effect4.Program.Denote.hostRun (Effects.Comodel.through impl host)\n                          b.program List.nil Effect4.Machine.Stores.empty st)\n                        (Option.some\n                          { fst := ex,\n                            snd :=\n                              {\n                                fst :=\n                                  (Effect4.Run.runWith b\n                                            (Effect4.Run.Reactor.ofHost b.table\n                                                (Effects.Comodel.through impl host)).guardRows\n                                            st id budget rounds).fst.machine.state\n                                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                      Effect4.FiberId Effect4.Machine.Ann)\n                                    (Effect4.FrameFiber Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann)\n                                    (Effect4.FrameEvent Effect4.Program.EffName\n                                      Effect4.Program.EffThunk Effect4.Machine.Val\n                                      Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                      Effect4.Machine.Ann),\n                                snd :=\n                                  (Effect4.Run.runWith b\n                                      (Effect4.Run.Reactor.ofHost b.table\n                                          (Effects.Comodel.through impl host)).guardRows\n                                      st id budget rounds).snd } })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1478,"lemmas":90,"nearest":["Effect4.Run.denoteRows_eq_session_host"]},"doc":"**A finished unfolding is the session's observation.** For a recorded `StraightRows` run that\nis funded, at rest, driven by a host and finished, and a host whose answers are the run's\n(`HostAnswered`): wherever the session's system finishes against that host, at any depth, it\nends with the root's exit and the run's stores, and the host ends where the answers left it. A\ndepth too small is a cut, never an error. Reach and limits as H9 (`denoteRows_eq_session_host`).\nConcept `translation-simulation`, role simulation; requirement R6. Consumer: the picture of a\nsession as its system's unfolding (the coalgebra note, sections 5.2 and 5.3). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.sessionSystem_finished","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.funded Bool.true →\n      Eq s.atRest Bool.true →\n        Eq s.hostDriven Bool.true →\n          Eq (Effect4.Program.Denote.StraightRows s.built.table s.built.program) Bool.true →\n            ∀ {σ : Type} (host : Effects.Comodel (Effect4.Program.Denote.RowSig s.built.table) σ)\n              (st st' : σ),\n              Effect4.Run.HostAnswered s.built.table host s.built.program s.budget.fuel s.tapeOf\n                  (Effect4.Api.load s.built.program s.budget.compileFuel) st st' →\n                ∀ (ex : Effect4.Machine.ExitV),\n                  Eq s.exit (Option.some ex) →\n                    ∀ (depth : Nat) (result : Prod Effect4.Machine.ExitV Effect4.Machine.Stores)\n                      (finish : σ),\n                      Eq\n                          ((Effect4.Run.sessionSystem s.built.table).run host depth\n                            {\n                              fst :=\n                                Effect4.Program.Denote.denoteRows s.built.table s.built.program\n                                  List.nil,\n                              snd := Effect4.Machine.Stores.empty }\n                            st)\n                          (Option.some { fst := Option.some result, snd := finish }) →\n                        And\n                          (Eq result\n                            { fst := ex,\n                              snd :=\n                                s.machine.state\n                                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n                                    Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameFiber Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                  (Effect4.FrameEvent Effect4.Program.EffName\n                                    Effect4.Program.EffThunk Effect4.Machine.Val Effect4.Machine.Err\n                                    Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann) })\n                          (Eq finish st')","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1475,"lemmas":90,"nearest":["Effect4.Run.denoteRows_eq_session_host"]},"doc":"**The session's system finishes, at the session's observation.** Under H9's premises, the\nsession's system, run against the host, finishes at some depth with the root's exit and the\nrun's stores, the host ending where the answers left it. With `sessionSystem_finished`, the\nsystem's finished runs are exactly the session's observation: the unfolding is the session.\nReach and limits as H9. Concept `translation-simulation`, role simulation; requirement R6.\nConsumer: the picture of a session as its system's unfolding (the coalgebra note, section 5.3). ","kind":"theorem","module":"Effect4.Laws.Api.HostDrive","name":"Effect4.Run.sessionSystem_finishes","placement":{"concept":"translation-simulation","requirement":"R6"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    Eq s.funded Bool.true →\n      Eq s.atRest Bool.true →\n        Eq s.hostDriven Bool.true →\n          Eq (Effect4.Program.Denote.StraightRows s.built.table s.built.program) Bool.true →\n            ∀ {σ : Type} (host : Effects.Comodel (Effect4.Program.Denote.RowSig s.built.table) σ)\n              (st st' : σ),\n              Effect4.Run.HostAnswered s.built.table host s.built.program s.budget.fuel s.tapeOf\n                  (Effect4.Api.load s.built.program s.budget.compileFuel) st st' →\n                ∀ (ex : Effect4.Machine.ExitV),\n                  Eq s.exit (Option.some ex) →\n                    Exists fun depth =>\n                      Eq\n                        ((Effect4.Run.sessionSystem s.built.table).run host depth\n                          {\n                            fst :=\n                              Effect4.Program.Denote.denoteRows s.built.table s.built.program\n                                List.nil,\n                            snd := Effect4.Machine.Stores.empty }\n                          st)\n                        (Option.some\n                          {\n                            fst :=\n                              Option.some\n                                { fst := ex,\n                                  snd :=\n                                    s.machine.state\n                                      (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                                        Effect4.Machine.Val Effect4.Machine.Err\n                                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                                      (Effect4.FrameFiber Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann)\n                                      (Effect4.FrameEvent Effect4.Program.EffName\n                                        Effect4.Program.EffThunk Effect4.Machine.Val\n                                        Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                                        Effect4.Machine.Ann) },\n                            snd := st' })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1508,"lemmas":1237,"nearest":["Effect4.Machine.Lift.driveState_lift","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Run.Keeps.reached"]},"doc":"**Each key is bound once, received once and applied once, and a retired call is never\napplied.** In every recorded run of every program: the session binds a key at most once, accepts\nat most one reply receipt and applies at most one reply at a key, and no key that a control or an\napplication retired is ever applied. Concept `host-session-protocol`, R6; the proposed claim\n`keys-once` (role preservation). The machine's part is that a guard the machine dropped never\nholds a request again (`reservedKeys_steppedBy`): a later park takes a fresh token. Consumer:\n`stale_never_applies`, clauses one to three. Reach: every program, table, budget and journal of\nthe four row kinds, with its raw rows. It does not establish reply admission at the application,\nthe retirement edge of the host protocol, the order of two applications, or which reply a host\nsends: a host may answer a call with any body it chooses. ","kind":"theorem","module":"Effect4.Laws.Run.Journal","name":"Effect4.Run.session_keys_once","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  s.Reached →\n    And s.boundKeys.Nodup\n      (And s.submittedKeys.Nodup\n        (And s.appliedKeys.Nodup\n          (∀ (k : Effect4.Api.HostSession.Key),\n            List.instMembership.mem s.retiredKeys k →\n              Not (List.instMembership.mem s.appliedKeys k))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1005,"lemmas":75,"nearest":[]},"doc":"**The tape of a journal in two parts.** When the tape of the first part reads every row,\nthe tape of `a ++ b` is the positions of `a`, then the tape of `b` from the run after `a`. When\nthe tape of `a` stops, the tape of `a ++ b` holds the same positions, and the rows of `b` join\nthe unread rows: no row of `b` is read. Reach: any run and any two lists of rows. It does not\nestablish what the machine is after a stopped row, and it reads no row after one. Concept\n`translation-simulation`, R13: a journal's tape splits where `Run.play_append` splits its run.\nConsumer: no theorem of this module uses it. It is the law of a driver that plays a script in\nparts, and the record `cuts` (`Test/Dogfood/Scenario/Tape.lean`) holds its controls. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tapeFrom_append","placement":{"concept":"translation-simulation","requirement":"R13"},"restsOn":[],"statement":"∀ (s : Effect4.Run) (a b : List Effect4.Api.Runner.Command),\n  Eq (s.tapeFrom (instHAppendOfAppend.hAppend a b))\n    (ite (Eq (s.tapeFrom a).snd List.nil)\n      { fst := instHAppendOfAppend.hAppend (s.tapeFrom a).fst ((s.play a).tapeFrom b).fst,\n        snd := ((s.play a).tapeFrom b).snd }\n      { fst := (s.tapeFrom a).fst, snd := instHAppendOfAppend.hAppend (s.tapeFrom a).snd b })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1004,"lemmas":74,"nearest":[]},"doc":"**The journal's cut.** A journal is a completed prefix, then the rows that its tape leaves\nunread. The tape of the prefix alone holds the same positions, and it leaves no row unread. So\nthe positions of a journal are read from the completed prefix, and a stopped row is the first\nrow after it. Reach: any run and any rows. A journal whose tape reads every row is its own\ncompleted prefix. It does not establish the machine after the prefix: `tapeFrom_cut_replays`\nadds that clause. Concept `translation-simulation`, R13. Consumer: `tapeFrom_cut_replays`. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tapeFrom_cut","placement":{"concept":"translation-simulation","requirement":"R13"},"restsOn":[],"statement":"∀ (s : Effect4.Run) (rows : List Effect4.Api.Runner.Command),\n  Exists fun done =>\n    And (Eq rows (instHAppendOfAppend.hAppend done (s.tapeFrom rows).snd))\n      (Eq (s.tapeFrom done) { fst := (s.tapeFrom rows).fst, snd := List.nil })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1011,"lemmas":70,"nearest":["Effect4.Run.tape_replays","Effect4.Run.tapeFrom_cut"]},"doc":"**The machine after the completed prefix is the raw replay of its tape.** A journal is a\ncompleted prefix, then its unread rows (`tapeFrom_cut`). The machine that the prefix leaves is\nthe machine that the raw frame replay leaves on the decisions of the journal's positions, from\nthe run's own machine, at the same table and budgets. Reach: any run and any rows: the tape may\nstop. It does not establish the machine after a stopped row. That row may change the machine\nbefore it reports its frontier, and the completed prefix ends before it. It does not establish\nequal session ledgers, since the raw replay has none. It says nothing of resumable ownership\n(R12, decisions row 226) or of a generated engine. Concept `translation-simulation`, R13: it is\n`tape_replays` on the completed prefix. Consumer: the controls of the record `cuts`\n(`Test/Dogfood/Scenario/Tape.lean`), and later the laws of the scenario driver. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tapeFrom_cut_replays","placement":{"concept":"translation-simulation","requirement":"R13"},"restsOn":[],"statement":"∀ (s : Effect4.Run) (rows : List Effect4.Api.Runner.Command),\n  Exists fun done =>\n    And (Eq rows (instHAppendOfAppend.hAppend done (s.tapeFrom rows).snd))\n      (And (Eq (s.tapeFrom done) { fst := (s.tapeFrom rows).fst, snd := List.nil })\n        (Eq (s.play done).machine\n          (Effect4.Run.machineOf\n            (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel\n              (List.map (fun x => x.decision) (s.tapeFrom rows).fst) s.machine))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1012,"lemmas":76,"nearest":["Effect4.Run.tape_replays"]},"doc":"**The machine after a position is the raw replay of the decisions up to it.** At position\n`i` of a journal's tape, the machine of the run after the position's row is the machine that the\nraw frame replay leaves on the first `i + 1` decisions. The replay starts at the machine of the\nrun that the tape was read from, at the same table and budgets. Reach: any run, any rows and any\nposition of the tape. The tape need not read every row: a later stopped row adds no position.\nIt does not establish the machine after a stopped row, equal session ledgers, or anything of a\ngenerated engine. It replays from the run's own machine: a replay from a new load needs a fresh\nopen, which the consumer states. Concept `translation-simulation`, R13: it is `tape_replays` on\nthe prefix that ends at the position's row. Consumer: `shown_views_opened`\n(`Test/Dogfood/Scenario/Tape.lean`), the views of a lowered run. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tapeFrom_position_replays","placement":{"concept":"translation-simulation","requirement":"R13"},"restsOn":[],"statement":"∀ (s : Effect4.Run) (rows : List Effect4.Api.Runner.Command) (i : Nat)\n  (position : Effect4.Run.Position),\n  Eq (List.instGetElem?NatLtLength.getElem? (s.tapeFrom rows).fst i) (Option.some position) →\n    Eq position.after.machine\n      (Effect4.Run.machineOf\n        (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel\n          (List.map (fun x => x.decision) (List.take (instHAdd.hAdd i 1) (s.tapeFrom rows).fst))\n          s.machine))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1014,"lemmas":98,"nearest":[]},"doc":"**A journal's machine is the raw replay of its tape.** When the tape reads every row, the\nmachine that the journal leaves is the machine that the raw frame replay leaves on the tape's\ndecisions, at the same table and budgets. It is the machine clause of a lowered run: a replay of\nthe machine alone needs the tape, not the session. Reach: any run, any rows whose tape reads to\nthe end: no row at a frontier, and every decision taken at a live machine with enough fuel. It\nneeds no premise on the session, because the tape holds the decision that the session hands the\nmachine: a reply's own answer decision (`replyDecision`). It does not establish equal session\nledgers: the raw replay has none. It does not reach a journal that stops at a frontier, and it\nsays nothing of a lowered engine: that link is the finite comparison of\n`ocaml/engine/test/scenarios/test_scenarios.ml`. It extends `play_controls_eq_replay`\n(`src/Effect4/Laws/Run.lean`) from control rows to reply applications. Concept\n`translation-simulation`, R8. Consumer: the lowered runs of `Test/Dogfood/Scenario/Lowered.lean`,\nwhose finite runs check it at every position of every fixture. ","kind":"theorem","module":"Effect4.Laws.Run.Tape","name":"Effect4.Run.tape_replays","placement":{"concept":"translation-simulation","requirement":"R8"},"restsOn":[],"statement":"Effect4.Run.TapeReplays","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":100,"lemmas":42,"nearest":[]},"doc":"**The record frame's field laws** (claim `record-field-laws`): for a record with ascending\nnames, the machine's read at a reference's name reads the field's encoding, and its overwrite at\nthat name writes the record that the reference's write gives. ","kind":"theorem","module":"Effect4.Laws.Schema.FieldRef","name":"Effect4.Schema.FieldRef.frame_laws","placement":{"concept":"exact-codecs","requirement":"R3"},"restsOn":[],"statement":"∀ {L : Effect4.Schema.Model.Leaves} {fs : List (Prod String (Prod Bool Effect4.Program.Ty))}\n  {t : Effect4.Program.Ty},\n  Effect4.Field.Ascending Effect4.Field.bytesKey fs →\n    ∀ (f : Effect4.Schema.FieldRef fs t)\n      (x : Effect4.Schema.Model.CarrierAt L (Effect4.Program.Ty.record fs))\n      (v : Effect4.Schema.Model.CarrierAt L t),\n      And\n        (Eq\n          (Effect4.Machine.Record.read Bool.false\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal x) f.name)\n          (Option.some ((Effect4.Schema.Model.imageAt L t).toVal (f.get x))))\n        (Eq\n          (Effect4.Machine.Record.set\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal x) f.name\n            ((Effect4.Schema.Model.imageAt L t).toVal v))\n          (Option.some\n            ((Effect4.Schema.Model.imageAt L (Effect4.Program.Ty.record fs)).toVal (f.set x v))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":197,"lemmas":31,"nearest":[]},"doc":"**Membership on the checked domain** (claim `modeled-membership`): every carrier value's\nencoding inhabits its type, at every allocation table. ","kind":"theorem","module":"Effect4.Laws.Schema.Modeled","name":"Effect4.Schema.Model.member","placement":{"concept":"store-typing","requirement":"R3"},"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq (Effect4.Schema.Model.refusal t) Option.none →\n    ∀ (x : Effect4.Schema.Model.Carrier t) (alloc : List String),\n      Eq (Effect4.Program.Val.hasTy ((Effect4.Schema.Model.image t).toVal x) t alloc) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":379,"lemmas":255,"nearest":["Effect4.Schema.decode_encode","Effect4.Schema.Model.member","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Ty.normalize_idem"]},"doc":"**The JSON round trip of a modeled value** (claim `modeled-codec`), at the normal form of its\ntype. Membership comes from `Modeled.member` and `hasTy_normalize`. Codec admission stays a\npremise: it is value-specific, and a natural above 2^53 has no exact JSON image. ","kind":"theorem","module":"Effect4.Laws.Schema.Modeled","name":"Effect4.Schema.Modeled.codec_roundtrip","placement":{"concept":"exact-codecs","requirement":"R3"},"restsOn":[],"statement":"∀ (α : Type) [m : Effect4.Schema.Modeled α] (a : α),\n  Eq\n      ((Effect4.Program.CTy.ofRaw (m.ty α)).toRaw.isCodecValue\n        ((Effect4.Schema.Modeled.image α).toVal a))\n      Bool.true →\n    Eq\n      (((Effect4.Schema.encode (Effect4.Program.CTy.ofRaw (m.ty α)).toRaw\n                ((Effect4.Schema.Modeled.image α).toVal a)).bind\n            (Effect4.Schema.decode (Effect4.Program.CTy.ofRaw (m.ty α)).toRaw)).bind\n        (Effect4.Schema.Modeled.image α).ofVal)\n      (Option.some a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":162,"lemmas":66,"nearest":[]},"doc":"**The initial value has the cell's type**, at every total and in every scope. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.empty_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (permits : Nat) {env : Effect4.Program.Authoring.Env} {path : List Nat}\n      {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig (Effect4.Semaphore.empty permits) env path types\n        Effect4.Semaphore.cellTy","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":18,"lemmas":13,"nearest":[]},"doc":"**The first profile is closed.** Each transition of the model leaves a state of the\nprofile. No premise names the request: a take removes its own entry first, and a release is\ntotal. Consumer: the public law, along a run. It establishes nothing about a program, and no\nprogress of a waiter. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.profile_closed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ (s : Effect4.Semaphore.Model.State) (op : Effect4.Semaphore.Model.Op),\n  Effect4.Semaphore.Model.Profile s →\n    Effect4.Semaphore.Model.Profile (Effect4.Semaphore.Model.step s op)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":318,"lemmas":18,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The release step agrees with the model's `release`.** The reply is the free count after\nthe release and whether a waiter is enrolled. The stored value is the model's next state. No\npremise names the count: the model's release is total too (decisions row 261). The table does\nnot change. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.releaseStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (n : Nat)\n  {countSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads countSrc env path vals (Effect4.Store.Val.nat n) →\n    Effect4.Modules.Reads cellSrc env path vals (Effect4.Semaphore.Model.cellVal tb s) →\n      Effect4.Modules.Reads (Effect4.Semaphore.releaseStep countSrc cellSrc) env path vals\n        (Effect4.Program.Val.tuple\n          (List.cons\n            (Effect4.Semaphore.Model.releaseReplyVal (Effect4.Semaphore.Model.release s n).snd)\n            (List.cons\n              (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.release s n).fst)\n              List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":300,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The release step is typed at every scope.** No fold. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.releaseStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {countSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig countSrc env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Semaphore.cellTy →\n          Effect4.Modules.TypesEach sig (Effect4.Semaphore.releaseStep countSrc cellSrc) env path\n            types (Effect4.Semaphore.Model.releaseReplyTy.prod Effect4.Semaphore.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":264,"lemmas":9,"nearest":["Effect4.Semaphore.Model.withdrawStep_agrees","Effect4.Semaphore.Model.visitStep_agrees","Effect4.Semaphore.Model.releaseStep_agrees","Effect4.Semaphore.Model.takeIfAvailableStep_agrees","Effect4.Semaphore.Model.takeStep_agrees"]},"doc":"**The five step statements hold** (the proposed claim `semaphore-steps-agree`, a part of\n`semaphore-expansion-agrees`). Each field is one statement of this file. It establishes no\norder of the wake across visits, no cancellation law, no liveness and nothing of a wrapper. Its\nconsumer is the public law, in the slice of the operations that wait. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.semaphore_steps_agree","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Effect4.Semaphore.Model.StepsAgree","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":316,"lemmas":19,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The take-if-available step agrees with the model's `takeIfAvailable`.** The reply is\nwhether the request took, and the stored value is the model's next state. The table does not\nchange. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeIfAvailableStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (n : Nat)\n  {needSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Effect4.Modules.Reads needSrc env path vals (Effect4.Store.Val.nat n) →\n    Effect4.Modules.Reads cellSrc env path vals (Effect4.Semaphore.Model.cellVal tb s) →\n      Effect4.Modules.Reads (Effect4.Semaphore.takeIfAvailableStep needSrc cellSrc) env path vals\n        (Effect4.Program.Val.tuple\n          (List.cons (Effect4.Store.Val.bool (Effect4.Semaphore.Model.takeIfAvailable s n).snd)\n            (List.cons\n              (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.takeIfAvailable s n).fst)\n              List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":298,"lemmas":97,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The take-if-available step is typed at every scope.** No fold: each argument is typed at\nthe scope alone. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.takeIfAvailableStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {needSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Effect4.Modules.TypesEach sig needSrc env path types Effect4.Program.Ty.nat →\n        Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Semaphore.cellTy →\n          Effect4.Modules.TypesEach sig (Effect4.Semaphore.takeIfAvailableStep needSrc cellSrc) env\n            path types (Effect4.Program.Ty.bool.prod Effect4.Semaphore.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":342,"lemmas":30,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The take step agrees with the model's `take`.** The reply is whether the request took.\nThe stored value is the model's next state, through the table that holds `hint` at `id`: where\nthe request enrols, its entry holds the step's hint. No premise names the request: the step\nremoves the request's own entry first, as the model does. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.takeStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id n : Nat)\n  (hint : Effect4.Machine.DeferredKey),\n  tb.Injective →\n    ∀ {needSrc idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Reads needSrc env path vals (Effect4.Store.Val.nat n) →\n          Effect4.Modules.Captured idSrc env path vals\n              (Effect4.Machine.Val.promise (tb.handle id)) →\n            Effect4.Modules.Reads hintSrc env path vals (Effect4.Machine.Val.promise hint) →\n              Effect4.Modules.Reads cellSrc env path vals (Effect4.Semaphore.Model.cellVal tb s) →\n                Effect4.Modules.Reads (Effect4.Semaphore.takeStep needSrc idSrc hintSrc cellSrc) env\n                  path vals\n                  (Effect4.Program.Val.tuple\n                    (List.cons (Effect4.Store.Val.bool (Effect4.Semaphore.Model.take s id n).snd)\n                      (List.cons\n                        (Effect4.Semaphore.Model.cellVal (tb.renew id hint)\n                          (Effect4.Semaphore.Model.take s id n).fst)\n                        List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":308,"lemmas":98,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The take step is typed at every scope.** The request's identity stands in the removal's\nfold, so it is taken with its typed capture. The count and the hint stand outside every\nfold. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.takeStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {needSrc idSrc hintSrc cellSrc : Effect4.Program.Authoring.TermSrc}\n      {env : Effect4.Program.Authoring.Env} {path : List Nat} {types : List Effect4.Program.Ty},\n      Eq types.length (List.length env.names) →\n        Effect4.Modules.TypesEach sig needSrc env path types Effect4.Program.Ty.nat →\n          Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n            Effect4.Modules.TypesEach sig hintSrc env path types Effect4.Modules.idTy →\n              Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Semaphore.cellTy →\n                Effect4.Modules.TypesEach sig\n                  (Effect4.Semaphore.takeStep needSrc idSrc hintSrc cellSrc) env path types\n                  (Effect4.Program.Ty.bool.prod Effect4.Semaphore.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":330,"lemmas":29,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The visit step agrees with the model's `visit`.** The reply is the selected waiter's\nrecord through the table, or nothing. The stored value is the model's next state. The cursor\nand the cell's own source stand in the fold's body, so each is a caller's term under a fold.\nThe table does not change.\n\nThe term compares two numbers of each entry, and no record and no handle. It removes the\nselected entry by its position. The model removes it by `erase`. The two agree with no premise\non the identities: an earlier entry equal to the selected one would fit too, at or after the\ncursor, so it would have been selected first (`visit_fromFirst`). ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.visitStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (cursor : Nat)\n  {cursorSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Captured cursorSrc env path vals (Effect4.Store.Val.nat cursor) →\n      Effect4.Modules.Captured cellSrc env path vals (Effect4.Semaphore.Model.cellVal tb s) →\n        Effect4.Modules.Reads (Effect4.Semaphore.visitStep cursorSrc cellSrc) env path vals\n          (Effect4.Program.Val.tuple\n            (List.cons\n              (Effect4.Semaphore.Model.visitReplyVal tb\n                (Effect4.Semaphore.Model.visit s cursor).snd)\n              (List.cons\n                (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.visit s cursor).fst)\n                List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":304,"lemmas":98,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The visit step is typed at every scope.** The cursor and the cell's own source stand in\nthe fold's body, so each is taken with its typed capture. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.visitStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {cursorSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Eq types.length (List.length env.names) →\n        Effect4.Modules.CapturedTy sig cursorSrc env path types Effect4.Program.Ty.nat →\n          Effect4.Modules.CapturedTy sig cellSrc env path types Effect4.Semaphore.cellTy →\n            Effect4.Modules.TypesEach sig (Effect4.Semaphore.visitStep cursorSrc cellSrc) env path\n              types (Effect4.Semaphore.Model.visitReplyTy.prod Effect4.Semaphore.cellTy)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":5,"nearest":[]},"doc":"**A visit resumes the earliest fitting waiter at or after its cursor.** On a profile\nstate, the selected waiter is enrolled, its stamp is at or after the cursor, and its count fits\nthe free count. Its stamp is the least among the waiters that are at or after the cursor and\nfit. The selected waiter leaves the list, and nothing else changes. Consumer: the waiting\nclauses of the proposed claim `semaphore-expansion-agrees`. It states one visit, and nothing\nabout a whole walk. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_selects_earliest","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {s : Effect4.Semaphore.Model.State},\n  Effect4.Semaphore.Model.Profile s →\n    ∀ {cursor : Nat} {w : Effect4.Semaphore.Model.Waiter},\n      Eq (Effect4.Semaphore.Model.visit s cursor).snd (Option.some w) →\n        And (List.instMembership.mem s.waiters w)\n          (And (instLENat.le cursor w.stamp)\n            (And (instLENat.le w.need (Effect4.Semaphore.Model.free s))\n              (And\n                (∀ (u : Effect4.Semaphore.Model.Waiter),\n                  List.instMembership.mem s.waiters u →\n                    instLENat.le cursor u.stamp →\n                      instLENat.le u.need (Effect4.Semaphore.Model.free s) →\n                        instLENat.le w.stamp u.stamp)\n                (Eq (Effect4.Semaphore.Model.visit s cursor).fst\n                  { permits := s.permits, taken := s.taken, waiters := s.waiters.erase w,\n                    next := s.next }))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":4,"nearest":[]},"doc":"**A visit stops only when no permit is free or no such waiter fits.** A visit selects\nnobody exactly when the free count is zero, or each waiter at or after the cursor needs more\nthan the free count. It then changes nothing. Consumer: the waiting clauses of the proposed\nclaim `semaphore-expansion-agrees`. It states one visit, and no liveness. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Profile","name":"Effect4.Semaphore.Model.visit_stops_iff","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ (s : Effect4.Semaphore.Model.State) (cursor : Nat),\n  And\n    (Iff (Eq (Effect4.Semaphore.Model.visit s cursor).snd Option.none)\n      (Or (Eq (Effect4.Semaphore.Model.free s) 0)\n        (∀ (u : Effect4.Semaphore.Model.Waiter),\n          List.instMembership.mem s.waiters u →\n            instLENat.le cursor u.stamp → instLTNat.lt (Effect4.Semaphore.Model.free s) u.need)))\n    (Eq (Effect4.Semaphore.Model.visit s cursor).snd Option.none →\n      Eq (Effect4.Semaphore.Model.visit s cursor).fst s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":333,"lemmas":26,"nearest":["Effect4.Modules.Step.sound"]},"doc":"**The withdrawal agrees with the model's `withdraw`.** The reply is nothing, and the stored\nvalue is the model's next state. The table does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Steps","name":"Effect4.Semaphore.Model.withdrawStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id : Nat),\n  tb.Injective →\n    ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {vals : List Effect4.Machine.Val},\n      Eq vals.length (List.length env.names) →\n        Effect4.Modules.Captured idSrc env path vals (Effect4.Machine.Val.promise (tb.handle id)) →\n          Effect4.Modules.Reads cellSrc env path vals (Effect4.Semaphore.Model.cellVal tb s) →\n            Effect4.Modules.Reads (Effect4.Semaphore.withdrawStep idSrc cellSrc) env path vals\n              (Effect4.Program.Val.tuple\n                (List.cons Effect4.Store.Val.unit\n                  (List.cons\n                    (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.withdraw s id))\n                    List.nil)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":303,"lemmas":98,"nearest":["Effect4.Modules.Step.typed"]},"doc":"**The withdrawal is typed at every scope.** The request's identity stands in the removal's\nfold. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Typing","name":"Effect4.Semaphore.Model.withdrawStep_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {Op : Type} (sig : Effect4.Program.Signature Op),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ {idSrc cellSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {types : List Effect4.Program.Ty},\n      Eq types.length (List.length env.names) →\n        Effect4.Modules.CapturedTy sig idSrc env path types Effect4.Modules.idTy →\n          Effect4.Modules.TypesEach sig cellSrc env path types Effect4.Semaphore.cellTy →\n            Effect4.Modules.TypesEach sig (Effect4.Semaphore.withdrawStep idSrc cellSrc) env path\n              types (Effect4.Program.Ty.unit.prod Effect4.Semaphore.cellTy)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":237,"lemmas":23,"nearest":[]},"doc":"**`Semaphore.make` makes the cell of the initial state.** The initial state is a state of\nthe profile's predicate (`initial_profile`). The initial value reads that state's cell, and the\nstore step of `Ref.make` appends it and answers the new cell's handle. The statement holds at\nevery total: the profile's predicate has no clause on the total, and `make` refuses zero where\nan author writes it. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.make_makes","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (tb : Effect4.Modules.Table) (permits : Nat) (env : Effect4.Program.Authoring.Env)\n  (path : List Nat) (vals : List Effect4.Machine.Val) (stores : Effect4.Machine.Stores),\n  And (Effect4.Semaphore.Model.Profile (Effect4.Semaphore.Model.initial permits))\n    (And\n      (Effect4.Modules.Reads (Effect4.Semaphore.empty permits) env path vals\n        (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.initial permits)))\n      (Eq\n        (Effect4.Machine.syncOpStep\n          (Effect4.Machine.SyncOp.refMake\n            (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.initial permits)))\n          stores)\n        (Option.some\n          {\n            fst :=\n              {\n                refs :=\n                  instHAppendOfAppend.hAppend stores.refs\n                    (List.cons\n                      (Effect4.Semaphore.Model.cellVal tb (Effect4.Semaphore.Model.initial permits))\n                      List.nil),\n                deferreds := stores.deferreds, scopes := stores.scopes, memo := stores.memo,\n                timers := stores.timers, nextName := stores.nextName,\n                externals := stores.externals },\n            snd := Effect4.Machine.Val.cell { index := List.length stores.refs } })))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":338,"lemmas":71,"nearest":["Effect4.Semaphore.Model.empty_types","Effect4.Program.Bounds.matchB_one_var","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"**The construction is typed at every scope**: it answers the handle of a cell at\nSemaphore's cell type. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.make_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (permits : Nat) (positive : instLTNat.lt 0 permits)\n  (s : Effect4.Modules.TypedScope),\n  Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n    (Effect4.Semaphore.make permits positive) s Effect4.Semaphore.cellTy.refOf","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":540,"lemmas":64,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Semaphore.Model.releaseStep_types","Effect4.Modules.step_updates","Effect4.Semaphore.Model.releaseStep_agrees"]},"doc":"**The step of `release` is the model's `release`.** The store step answers the free count\nafter the release and whether a waiter is enrolled, and it writes the model's next state. No\npremise names the count: the step releases at most what is taken, as the model's does\n(decisions row 261). No fold of the step holds a caller's term, so the count is read at the\nrow's scope alone. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.release_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (n : Nat)\n      {countSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n      {captured : List Effect4.Machine.Val},\n      Eq captured.length (List.length env.names) →\n        Eq tys.length (List.length env.names) →\n          Effect4.Program.Typed.EnvTyped w tys captured →\n            Effect4.Modules.Reads countSrc (env.push (List.cons (env.mint \"current\") List.nil)) path\n                (instHAppendOfAppend.hAppend captured\n                  (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                (Effect4.Store.Val.nat n) →\n              Effect4.Modules.TypesEach sig countSrc\n                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                  (instHAppendOfAppend.hAppend tys (List.cons Effect4.Semaphore.cellTy List.nil))\n                  Effect4.Program.Ty.nat →\n                ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                  Eq (Effect4.Machine.refPeek stores.refs q)\n                      (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                    Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                        Effect4.Semaphore.cellTy →\n                      Exists fun f =>\n                        And\n                          (Eq\n                            (Effect4.Semaphore.releaseStep countSrc\n                              (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                            (Except.ok f))\n                          (And\n                            (Eq\n                              (Effect4.Machine.syncOpStep\n                                (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                              (Option.some\n                                {\n                                  fst :=\n                                    {\n                                      refs :=\n                                        Effect4.Machine.refPoke stores.refs q\n                                          (Effect4.Semaphore.Model.cellVal tb\n                                            (Effect4.Semaphore.Model.release s n).fst),\n                                      deferreds := stores.deferreds, scopes := stores.scopes,\n                                      memo := stores.memo, timers := stores.timers,\n                                      nextName := stores.nextName, externals := stores.externals },\n                                  snd :=\n                                    Effect4.Semaphore.Model.releaseReplyVal\n                                      (Effect4.Semaphore.Model.release s n).snd }))\n                            (And\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Semaphore.Model.releaseReplyVal\n                                  (Effect4.Semaphore.Model.release s n).snd)\n                                Effect4.Semaphore.Model.releaseReplyTy)\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Semaphore.Model.cellVal tb\n                                  (Effect4.Semaphore.Model.release s n).fst)\n                                Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":501,"lemmas":292,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.Ty.normalize_idem","Effect4.Program.Ty.subN_refl","Effect4.Program.UnionRule.lift_member","Effect4.Program.Bounds.matchArgsB_two_vars","Effect4.Program.optionTy_option","Effect4.Semaphore.Model.visitStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Program.Bounds.matchArgsB_one_var","Effect4.Semaphore.Model.releaseStep_types"]},"doc":"**`release` is typed at every scope**: it answers a number, the free count. The handle and\nthe count are kept terms: the operation reads each under its own binders. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.release_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {q count : Effect4.Program.Authoring.TermSrc}\n  {s : Effect4.Modules.TypedScope},\n  Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s Effect4.Semaphore.cellTy.refOf →\n    Effect4.Modules.Kept (Effect4.Program.nativeSignature table) count s Effect4.Program.Ty.nat →\n      Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n        (Effect4.Semaphore.release q count) s Effect4.Program.Ty.nat","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":536,"lemmas":64,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Semaphore.Model.takeIfAvailableStep_types","Effect4.Modules.step_updates","Effect4.Semaphore.Model.takeIfAvailableStep_agrees"]},"doc":"**The step of `takeIfAvailable` is the model's `takeIfAvailable`.** The store step answers\nwhether the request took, and it writes the model's next state. It enrols nobody. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailable_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (n : Nat)\n      {countSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n      {captured : List Effect4.Machine.Val},\n      Eq captured.length (List.length env.names) →\n        Eq tys.length (List.length env.names) →\n          Effect4.Program.Typed.EnvTyped w tys captured →\n            Effect4.Modules.Reads countSrc (env.push (List.cons (env.mint \"current\") List.nil)) path\n                (instHAppendOfAppend.hAppend captured\n                  (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                (Effect4.Store.Val.nat n) →\n              Effect4.Modules.TypesEach sig countSrc\n                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                  (instHAppendOfAppend.hAppend tys (List.cons Effect4.Semaphore.cellTy List.nil))\n                  Effect4.Program.Ty.nat →\n                ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                  Eq (Effect4.Machine.refPeek stores.refs q)\n                      (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                    Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                        Effect4.Semaphore.cellTy →\n                      Exists fun f =>\n                        And\n                          (Eq\n                            (Effect4.Semaphore.takeIfAvailableStep countSrc\n                              (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                            (Except.ok f))\n                          (And\n                            (Eq\n                              (Effect4.Machine.syncOpStep\n                                (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                              (Option.some\n                                {\n                                  fst :=\n                                    {\n                                      refs :=\n                                        Effect4.Machine.refPoke stores.refs q\n                                          (Effect4.Semaphore.Model.cellVal tb\n                                            (Effect4.Semaphore.Model.takeIfAvailable s n).fst),\n                                      deferreds := stores.deferreds, scopes := stores.scopes,\n                                      memo := stores.memo, timers := stores.timers,\n                                      nextName := stores.nextName, externals := stores.externals },\n                                  snd :=\n                                    Effect4.Store.Val.bool\n                                      (Effect4.Semaphore.Model.takeIfAvailable s n).snd }))\n                            (And\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Store.Val.bool\n                                  (Effect4.Semaphore.Model.takeIfAvailable s n).snd)\n                                Effect4.Program.Ty.bool)\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Semaphore.Model.cellVal tb\n                                  (Effect4.Semaphore.Model.takeIfAvailable s n).fst)\n                                Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":432,"lemmas":89,"nearest":["Effect4.Semaphore.Model.takeIfAvailableStep_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var"]},"doc":"**`takeIfAvailable` is typed at every scope**: it answers a Boolean. The count is a kept\nterm: the step reads it under the row's own binder. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.takeIfAvailable_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {q count : Effect4.Program.Authoring.TermSrc}\n  {s : Effect4.Modules.TypedScope},\n  Effect4.Modules.Typed (Effect4.Program.nativeSignature table) q s Effect4.Semaphore.cellTy.refOf →\n    Effect4.Modules.Kept (Effect4.Program.nativeSignature table) count s Effect4.Program.Ty.nat →\n      Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n        (Effect4.Semaphore.takeIfAvailable q count) s Effect4.Program.Ty.bool","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":549,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Semaphore.Model.takeStep_types","Effect4.Modules.step_updates","Effect4.Semaphore.Model.takeStep_agrees"]},"doc":"**The attempt of `take` is the model's `take`.** The cell holds the model state `s`. The\ncount is a caller's term of the step. The identity is one too, with its capture: it stands in\nthe removal's fold. The hint is the round's. The step term under the row's own binder is one\natomic update: the store step answers whether the request took, and it writes the model's next\nstate through the table that holds the hint at the request. The reply and the stored value are\nmembers of their types. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id n : Nat)\n      (hint : Effect4.Machine.DeferredKey),\n      tb.Injective →\n        ∀ {countSrc idSrc hintSrc : Effect4.Program.Authoring.TermSrc}\n          {env : Effect4.Program.Authoring.Env} {path : List Nat} {tys : List Effect4.Program.Ty}\n          {w : Effect4.Program.Typed.World} {captured : List Effect4.Machine.Val},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Effect4.Modules.Reads countSrc (env.push (List.cons (env.mint \"current\") List.nil))\n                    path\n                    (instHAppendOfAppend.hAppend captured\n                      (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                    (Effect4.Store.Val.nat n) →\n                  Effect4.Modules.Captured idSrc\n                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                      (instHAppendOfAppend.hAppend captured\n                        (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                      (Effect4.Machine.Val.promise (tb.handle id)) →\n                    Effect4.Modules.Reads hintSrc\n                        (env.push (List.cons (env.mint \"current\") List.nil)) path\n                        (instHAppendOfAppend.hAppend captured\n                          (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                        (Effect4.Machine.Val.promise hint) →\n                      Effect4.Modules.TypesEach sig countSrc\n                          (env.push (List.cons (env.mint \"current\") List.nil)) path\n                          (instHAppendOfAppend.hAppend tys\n                            (List.cons Effect4.Semaphore.cellTy List.nil))\n                          Effect4.Program.Ty.nat →\n                        Effect4.Modules.CapturedTy sig idSrc\n                            (env.push (List.cons (env.mint \"current\") List.nil)) path\n                            (instHAppendOfAppend.hAppend tys\n                              (List.cons Effect4.Semaphore.cellTy List.nil))\n                            Effect4.Modules.idTy →\n                          Effect4.Modules.TypesEach sig hintSrc\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path\n                              (instHAppendOfAppend.hAppend tys\n                                (List.cons Effect4.Semaphore.cellTy List.nil))\n                              Effect4.Modules.idTy →\n                            ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                              Eq (Effect4.Machine.refPeek stores.refs q)\n                                  (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                                Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                                    Effect4.Semaphore.cellTy →\n                                  Exists fun f =>\n                                    And\n                                      (Eq\n                                        (Effect4.Semaphore.takeStep countSrc idSrc hintSrc\n                                          (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                          (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                        (Except.ok f))\n                                      (And\n                                        (Eq\n                                          (Effect4.Machine.syncOpStep\n                                            (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                          (Option.some\n                                            {\n                                              fst :=\n                                                {\n                                                  refs :=\n                                                    Effect4.Machine.refPoke stores.refs q\n                                                      (Effect4.Semaphore.Model.cellVal\n                                                        (tb.renew id hint)\n                                                        (Effect4.Semaphore.Model.take s id n).fst),\n                                                  deferreds := stores.deferreds,\n                                                  scopes := stores.scopes, memo := stores.memo,\n                                                  timers := stores.timers,\n                                                  nextName := stores.nextName,\n                                                  externals := stores.externals },\n                                              snd :=\n                                                Effect4.Store.Val.bool\n                                                  (Effect4.Semaphore.Model.take s id n).snd }))\n                                        (And\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Store.Val.bool\n                                              (Effect4.Semaphore.Model.take s id n).snd)\n                                            Effect4.Program.Ty.bool)\n                                          (Effect4.Program.Typed.Fits w\n                                            (Effect4.Semaphore.Model.cellVal (tb.renew id hint)\n                                              (Effect4.Semaphore.Model.take s id n).fst)\n                                            Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":371,"lemmas":78,"nearest":["Effect4.Semaphore.take_attempt"]},"doc":"**The attempt of `take` at the operation's own binders.** The identity and the hint are\nnames that `bindWith` mints. The scope binds each, and no later binder shadows either. The count\nstays a caller's term, with its reading and its type at the row's scope. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id n : Nat)\n      (hint : Effect4.Machine.DeferredKey),\n      tb.Injective →\n        ∀ {countSrc : Effect4.Program.Authoring.TermSrc}\n          {env outerId outerHint : Effect4.Program.Authoring.Env} {path : List Nat}\n          {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val}\n          {beforeId afterId beforeHint afterHint : Effect4.Program.Authoring.Names},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Eq env.names\n                    (instHAppendOfAppend.hAppend beforeId\n                      (List.cons (outerId.mint \"answer\") afterId)) →\n                  (∀ (name : String),\n                      List.instMembership.mem afterId name → Ne name (outerId.mint \"answer\")) →\n                    Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                        (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                      Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                          (Option.some Effect4.Modules.idTy) →\n                        Eq env.names\n                            (instHAppendOfAppend.hAppend beforeHint\n                              (List.cons (outerHint.mint \"answer\") afterHint)) →\n                          (∀ (name : String),\n                              List.instMembership.mem afterHint name →\n                                Ne name (outerHint.mint \"answer\")) →\n                            Eq\n                                (List.instGetElem?NatLtLength.getElem? captured\n                                  (List.length beforeHint))\n                                (Option.some (Effect4.Machine.Val.promise hint)) →\n                              Eq\n                                  (List.instGetElem?NatLtLength.getElem? tys\n                                    (List.length beforeHint))\n                                  (Option.some Effect4.Modules.idTy) →\n                                Effect4.Modules.Reads countSrc\n                                    (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                    (instHAppendOfAppend.hAppend captured\n                                      (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                                    (Effect4.Store.Val.nat n) →\n                                  Effect4.Modules.TypesEach sig countSrc\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                                      (instHAppendOfAppend.hAppend tys\n                                        (List.cons Effect4.Semaphore.cellTy List.nil))\n                                      Effect4.Program.Ty.nat →\n                                    ∀ {stores : Effect4.Machine.Stores}\n                                      {q : Effect4.Machine.RefKey},\n                                      Eq (Effect4.Machine.refPeek stores.refs q)\n                                          (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                                        Effect4.Program.Typed.Fits w\n                                            (Effect4.Semaphore.Model.cellVal tb s)\n                                            Effect4.Semaphore.cellTy →\n                                          Exists fun f =>\n                                            And\n                                              (Eq\n                                                (Effect4.Semaphore.takeStep countSrc\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerId.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (outerHint.mint \"answer\"))\n                                                  (Effect4.Program.Authoring.minted\n                                                    (env.mint \"current\"))\n                                                  (env.push\n                                                    (List.cons (env.mint \"current\") List.nil))\n                                                  path)\n                                                (Except.ok f))\n                                              (And\n                                                (Eq\n                                                  (Effect4.Machine.syncOpStep\n                                                    (Effect4.Machine.SyncOp.refModify q f captured)\n                                                    stores)\n                                                  (Option.some\n                                                    {\n                                                      fst :=\n                                                        {\n                                                          refs :=\n                                                            Effect4.Machine.refPoke stores.refs q\n                                                              (Effect4.Semaphore.Model.cellVal\n                                                                (tb.renew id hint)\n                                                                (Effect4.Semaphore.Model.take s id\n                                                                    n).fst),\n                                                          deferreds := stores.deferreds,\n                                                          scopes := stores.scopes,\n                                                          memo := stores.memo,\n                                                          timers := stores.timers,\n                                                          nextName := stores.nextName,\n                                                          externals := stores.externals },\n                                                      snd :=\n                                                        Effect4.Store.Val.bool\n                                                          (Effect4.Semaphore.Model.take s id\n                                                              n).snd }))\n                                                (And\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Store.Val.bool\n                                                      (Effect4.Semaphore.Model.take s id n).snd)\n                                                    Effect4.Program.Ty.bool)\n                                                  (Effect4.Program.Typed.Fits w\n                                                    (Effect4.Semaphore.Model.cellVal\n                                                      (tb.renew id hint)\n                                                      (Effect4.Semaphore.Model.take s id n).fst)\n                                                    Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":492,"lemmas":140,"nearest":["Effect4.Semaphore.Model.withdrawStep_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Semaphore.Model.takeStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Modules.waitRetryAt_answers","Effect4.Program.mask_printed_form_profile"]},"doc":"**`take` is typed at every scope**: it answers a number, the count. The handle and the count\nare kept terms: the operation reads each under its own binders. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {q count : Effect4.Program.Authoring.TermSrc}\n  {s : Effect4.Modules.TypedScope},\n  Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s Effect4.Semaphore.cellTy.refOf →\n    Effect4.Modules.Kept (Effect4.Program.nativeSignature table) count s Effect4.Program.Ty.nat →\n      Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n        (Effect4.Semaphore.take q count) s Effect4.Program.Ty.nat","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":542,"lemmas":66,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Semaphore.Model.withdrawStep_types","Effect4.Modules.step_updates","Effect4.Semaphore.Model.withdrawStep_agrees"]},"doc":"**The withdrawal of a take is the model's `withdraw`.** The store step answers nothing, and\nit writes the model's next state: the request's entry leaves, and no other field changes. The\ntable does not change. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_withdrawal","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id : Nat),\n      tb.Injective →\n        ∀ {idSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n          {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Effect4.Modules.Captured idSrc (env.push (List.cons (env.mint \"current\") List.nil))\n                    path\n                    (instHAppendOfAppend.hAppend captured\n                      (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                    (Effect4.Machine.Val.promise (tb.handle id)) →\n                  Effect4.Modules.CapturedTy sig idSrc\n                      (env.push (List.cons (env.mint \"current\") List.nil)) path\n                      (instHAppendOfAppend.hAppend tys\n                        (List.cons Effect4.Semaphore.cellTy List.nil))\n                      Effect4.Modules.idTy →\n                    ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                      Eq (Effect4.Machine.refPeek stores.refs q)\n                          (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                        Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                            Effect4.Semaphore.cellTy →\n                          Exists fun f =>\n                            And\n                              (Eq\n                                (Effect4.Semaphore.withdrawStep idSrc\n                                  (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                (Except.ok f))\n                              (And\n                                (Eq\n                                  (Effect4.Machine.syncOpStep\n                                    (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                  (Option.some\n                                    {\n                                      fst :=\n                                        {\n                                          refs :=\n                                            Effect4.Machine.refPoke stores.refs q\n                                              (Effect4.Semaphore.Model.cellVal tb\n                                                (Effect4.Semaphore.Model.withdraw s id)),\n                                          deferreds := stores.deferreds, scopes := stores.scopes,\n                                          memo := stores.memo, timers := stores.timers,\n                                          nextName := stores.nextName,\n                                          externals := stores.externals },\n                                      snd := Effect4.Store.Val.unit }))\n                                (And\n                                  (Effect4.Program.Typed.Fits w Effect4.Store.Val.unit\n                                    Effect4.Program.Ty.unit)\n                                  (Effect4.Program.Typed.Fits w\n                                    (Effect4.Semaphore.Model.cellVal tb\n                                      (Effect4.Semaphore.Model.withdraw s id))\n                                    Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":371,"lemmas":76,"nearest":["Effect4.Semaphore.take_withdrawal"]},"doc":"**The withdrawal of a take at the operation's own binders.** The identity is a name that\n`bindWith` mints. The scope binds it, and no later binder shadows it. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.take_withdrawal_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (id : Nat),\n      tb.Injective →\n        ∀ {env outerId : Effect4.Program.Authoring.Env} {path : List Nat}\n          {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n          {captured : List Effect4.Machine.Val}\n          {beforeId afterId : Effect4.Program.Authoring.Names},\n          Eq captured.length (List.length env.names) →\n            Eq tys.length (List.length env.names) →\n              Effect4.Program.Typed.EnvTyped w tys captured →\n                Eq env.names\n                    (instHAppendOfAppend.hAppend beforeId\n                      (List.cons (outerId.mint \"answer\") afterId)) →\n                  (∀ (name : String),\n                      List.instMembership.mem afterId name → Ne name (outerId.mint \"answer\")) →\n                    Eq (List.instGetElem?NatLtLength.getElem? captured (List.length beforeId))\n                        (Option.some (Effect4.Machine.Val.promise (tb.handle id))) →\n                      Eq (List.instGetElem?NatLtLength.getElem? tys (List.length beforeId))\n                          (Option.some Effect4.Modules.idTy) →\n                        ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                          Eq (Effect4.Machine.refPeek stores.refs q)\n                              (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                            Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                                Effect4.Semaphore.cellTy →\n                              Exists fun f =>\n                                And\n                                  (Eq\n                                    (Effect4.Semaphore.withdrawStep\n                                      (Effect4.Program.Authoring.minted (outerId.mint \"answer\"))\n                                      (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                      (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                    (Except.ok f))\n                                  (And\n                                    (Eq\n                                      (Effect4.Machine.syncOpStep\n                                        (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                      (Option.some\n                                        {\n                                          fst :=\n                                            {\n                                              refs :=\n                                                Effect4.Machine.refPoke stores.refs q\n                                                  (Effect4.Semaphore.Model.cellVal tb\n                                                    (Effect4.Semaphore.Model.withdraw s id)),\n                                              deferreds := stores.deferreds,\n                                              scopes := stores.scopes, memo := stores.memo,\n                                              timers := stores.timers, nextName := stores.nextName,\n                                              externals := stores.externals },\n                                          snd := Effect4.Store.Val.unit }))\n                                    (And\n                                      (Effect4.Program.Typed.Fits w Effect4.Store.Val.unit\n                                        Effect4.Program.Ty.unit)\n                                      (Effect4.Program.Typed.Fits w\n                                        (Effect4.Semaphore.Model.cellVal tb\n                                          (Effect4.Semaphore.Model.withdraw s id))\n                                        Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":547,"lemmas":72,"nearest":["Effect4.Modules.step_keeps_cell","Effect4.Semaphore.Model.visitStep_types","Effect4.Modules.step_updates","Effect4.Semaphore.Model.visitStep_agrees"]},"doc":"**One visit of the walk is the model's `visit`.** The cursor is a caller's term of the step,\nwith its capture: it stands in the visit's fold. So does the cell's own source, and the row's\nown name has that capture (`captured_current`). The store step answers the selected waiter's\nrecord through the table, or nothing, and it writes the model's next state. A visit reserves\nnothing: `taken` stays (`visit_reserves_nothing`). ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visit_attempt","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (cursor : Nat)\n      {cursorSrc : Effect4.Program.Authoring.TermSrc} {env : Effect4.Program.Authoring.Env}\n      {path : List Nat} {tys : List Effect4.Program.Ty} {w : Effect4.Program.Typed.World}\n      {captured : List Effect4.Machine.Val},\n      Eq captured.length (List.length env.names) →\n        Eq tys.length (List.length env.names) →\n          Effect4.Program.Typed.EnvTyped w tys captured →\n            Effect4.Modules.Captured cursorSrc (env.push (List.cons (env.mint \"current\") List.nil))\n                path\n                (instHAppendOfAppend.hAppend captured\n                  (List.cons (Effect4.Semaphore.Model.cellVal tb s) List.nil))\n                (Effect4.Store.Val.nat cursor) →\n              Effect4.Modules.CapturedTy sig cursorSrc\n                  (env.push (List.cons (env.mint \"current\") List.nil)) path\n                  (instHAppendOfAppend.hAppend tys (List.cons Effect4.Semaphore.cellTy List.nil))\n                  Effect4.Program.Ty.nat →\n                ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                  Eq (Effect4.Machine.refPeek stores.refs q)\n                      (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                    Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                        Effect4.Semaphore.cellTy →\n                      Exists fun f =>\n                        And\n                          (Eq\n                            (Effect4.Semaphore.visitStep cursorSrc\n                              (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                              (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                            (Except.ok f))\n                          (And\n                            (Eq\n                              (Effect4.Machine.syncOpStep\n                                (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                              (Option.some\n                                {\n                                  fst :=\n                                    {\n                                      refs :=\n                                        Effect4.Machine.refPoke stores.refs q\n                                          (Effect4.Semaphore.Model.cellVal tb\n                                            (Effect4.Semaphore.Model.visit s cursor).fst),\n                                      deferreds := stores.deferreds, scopes := stores.scopes,\n                                      memo := stores.memo, timers := stores.timers,\n                                      nextName := stores.nextName, externals := stores.externals },\n                                  snd :=\n                                    Effect4.Semaphore.Model.visitReplyVal tb\n                                      (Effect4.Semaphore.Model.visit s cursor).snd }))\n                            (And\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Semaphore.Model.visitReplyVal tb\n                                  (Effect4.Semaphore.Model.visit s cursor).snd)\n                                Effect4.Semaphore.Model.visitReplyTy)\n                              (Effect4.Program.Typed.Fits w\n                                (Effect4.Semaphore.Model.cellVal tb\n                                  (Effect4.Semaphore.Model.visit s cursor).fst)\n                                Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":378,"lemmas":97,"nearest":["Effect4.Semaphore.visit_attempt"]},"doc":"**One visit of the walk at the walk's own binder.** The cursor is the name that the walk's\nloop mints, and it holds an option of a stamp: the visit reads it through `getOrElse`. The\nscope binds the name, and no later binder shadows it. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.visit_attempt_minted","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (sig : Effect4.Program.Signature Effect4.Program.NativeOp),\n  Eq sig.atomOf Effect4.Program.nativeAtomTy →\n    ∀ (tb : Effect4.Modules.Table) (s : Effect4.Semaphore.Model.State) (cursor : Nat)\n      {env outer : Effect4.Program.Authoring.Env} {path : List Nat} {tys : List Effect4.Program.Ty}\n      {w : Effect4.Program.Typed.World} {captured : List Effect4.Machine.Val}\n      {before later : Effect4.Program.Authoring.Names},\n      Eq captured.length (List.length env.names) →\n        Eq tys.length (List.length env.names) →\n          Effect4.Program.Typed.EnvTyped w tys captured →\n            Eq env.names\n                (instHAppendOfAppend.hAppend before (List.cons (outer.mint \"cursor\") later)) →\n              (∀ (name : String),\n                  List.instMembership.mem later name → Ne name (outer.mint \"cursor\")) →\n                Eq (List.instGetElem?NatLtLength.getElem? captured (List.length before))\n                    (Option.some (Effect4.Store.Val.nat cursor).some) →\n                  Eq (List.instGetElem?NatLtLength.getElem? tys (List.length before))\n                      (Option.some Effect4.Program.Ty.nat.option) →\n                    ∀ {stores : Effect4.Machine.Stores} {q : Effect4.Machine.RefKey},\n                      Eq (Effect4.Machine.refPeek stores.refs q)\n                          (Option.some (Effect4.Semaphore.Model.cellVal tb s)) →\n                        Effect4.Program.Typed.Fits w (Effect4.Semaphore.Model.cellVal tb s)\n                            Effect4.Semaphore.cellTy →\n                          Exists fun f =>\n                            And\n                              (Eq\n                                (Effect4.Semaphore.visitStep\n                                  (Effect4.Program.Authoring.app \"getOrElse\"\n                                    (List.cons\n                                      (Effect4.Program.Authoring.minted (outer.mint \"cursor\"))\n                                      (List.cons (Effect4.Program.Authoring.nat 0) List.nil)))\n                                  (Effect4.Program.Authoring.minted (env.mint \"current\"))\n                                  (env.push (List.cons (env.mint \"current\") List.nil)) path)\n                                (Except.ok f))\n                              (And\n                                (Eq\n                                  (Effect4.Machine.syncOpStep\n                                    (Effect4.Machine.SyncOp.refModify q f captured) stores)\n                                  (Option.some\n                                    {\n                                      fst :=\n                                        {\n                                          refs :=\n                                            Effect4.Machine.refPoke stores.refs q\n                                              (Effect4.Semaphore.Model.cellVal tb\n                                                (Effect4.Semaphore.Model.visit s cursor).fst),\n                                          deferreds := stores.deferreds, scopes := stores.scopes,\n                                          memo := stores.memo, timers := stores.timers,\n                                          nextName := stores.nextName,\n                                          externals := stores.externals },\n                                      snd :=\n                                        Effect4.Semaphore.Model.visitReplyVal tb\n                                          (Effect4.Semaphore.Model.visit s cursor).snd }))\n                                (And\n                                  (Effect4.Program.Typed.Fits w\n                                    (Effect4.Semaphore.Model.visitReplyVal tb\n                                      (Effect4.Semaphore.Model.visit s cursor).snd)\n                                    Effect4.Semaphore.Model.visitReplyTy)\n                                  (Effect4.Program.Typed.Fits w\n                                    (Effect4.Semaphore.Model.cellVal tb\n                                      (Effect4.Semaphore.Model.visit s cursor).fst)\n                                    Effect4.Semaphore.cellTy)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":505,"lemmas":239,"nearest":["Effect4.Semaphore.release_types","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.matchArgsB_one_var","Effect4.Semaphore.takeIfAvailable_types","Effect4.Modules.protectedBy_has","Effect4.Program.Ty.sub_antisymm_canonical"]},"doc":"**`withPermitsIfAvailable` is typed at every scope**, for a body of any effect type whose\nanswer type is its own normal form. It answers an option of the body's answer, with the body's\nfailure type in normal form and its requirement. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermitsIfAvailable_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {q count : Effect4.Program.Authoring.TermSrc}\n  {body : Effect4.Program.Authoring.Src Effect4.Program.NativeOp} {s : Effect4.Modules.TypedScope}\n  {b : Effect4.Program.EffTy},\n  Eq b.answer.normalize b.answer →\n    Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s\n        Effect4.Semaphore.cellTy.refOf →\n      Effect4.Modules.Kept (Effect4.Program.nativeSignature table) count s Effect4.Program.Ty.nat →\n        (∀ (t : Effect4.Modules.TypedScope),\n            s.Reaches t → Effect4.Modules.Has (Effect4.Program.nativeSignature table) body t b) →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n            (Effect4.Semaphore.withPermitsIfAvailable q count body) s\n            { answer := b.answer.option, error := b.error.normalize, requires := b.requires }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":506,"lemmas":134,"nearest":["Effect4.Semaphore.release_types","Effect4.Semaphore.Model.withdrawStep_types","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Semaphore.Model.takeStep_types","Effect4.Program.Bounds.matchB_modify_use","Effect4.Program.Bounds.matchB_refOf_var","Effect4.Modules.waitRetryAt_answers","Effect4.Modules.protectedBy_has"]},"doc":"**`withPermits` is typed at every scope**, for a body of any effect type at every scope that\nthe surface's binders reach. It keeps the body's answer, its failure type in normal form and\nits requirement: the take's loop and the release add no failure and no requirement. ","kind":"theorem","module":"Effect4.Laws.Library.Semaphore.Ops","name":"Effect4.Semaphore.withPermits_types","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {q count : Effect4.Program.Authoring.TermSrc}\n  {body : Effect4.Program.Authoring.Src Effect4.Program.NativeOp} {s : Effect4.Modules.TypedScope}\n  {b : Effect4.Program.EffTy},\n  Effect4.Modules.Kept (Effect4.Program.nativeSignature table) q s Effect4.Semaphore.cellTy.refOf →\n    Effect4.Modules.Kept (Effect4.Program.nativeSignature table) count s Effect4.Program.Ty.nat →\n      (∀ (t : Effect4.Modules.TypedScope),\n          s.Reaches t → Effect4.Modules.Has (Effect4.Program.nativeSignature table) body t b) →\n        Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n          (Effect4.Semaphore.withPermits q count body) s\n          { answer := b.answer, error := b.error.normalize, requires := b.requires }","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The type slice without a site is below the slice. A step of `SliceView.minimal_iff_drop`,\nits one consumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.drop_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (s : Effect4.Slice α) (x : α),\n  Effect4.Slice.instLE.le (s.drop x) s","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A type slice within `done ++ x :: rest`, without `x`, is below the slice that the pass asked\nabout at `x`. A step of `sweep_kept_needed` and of `sweepFree_eq_sweep`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.drop_le_of_subset","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] {r done rest : List α} {x : α},\n  List.instHasSubset.Subset r (instHAppendOfAppend.hAppend done (List.cons x rest)) →\n    Effect4.Slice.instLE.le ({ kept := r }.drop x) { kept := instHAppendOfAppend.hAppend done rest }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":["Effect4.Slice.filter_mem_sublists"]},"doc":"**The type slices below one slice are finitely many**, up to their kept sites: each slice\nbelow `s` keeps the same sites as a listed one. It is the paper's Theorem 3.3 (p. 7), for this\ncarrier. A step of `SliceView.contribution_lub`, through `SliceView.minimals_complete`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.exists_mem_subslices","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [DecidableEq α] {j s : Effect4.Slice α},\n  Effect4.Slice.instLE.le j s →\n    Exists fun j' =>\n      And (List.instMembership.mem s.subslices j')\n        (And (Effect4.Slice.instLE.le j' j) (Effect4.Slice.instLE.le j j'))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":13,"lemmas":12,"nearest":[]},"doc":"Under an upward closed `valid`, the invariant stays when the pass drops a site: a site that\nfailed fails at the smaller type slice too. This is the one place where the agreement uses\nmonotonicity. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.failed_rest","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    ∀ (pre mid rest : List α) (x : α),\n      Effect4.Slice.Failed valid pre mid (List.cons x rest) →\n        Effect4.Slice.Failed valid pre mid rest","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"The invariant grows by a site that the pass tried and kept. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.failed_snoc","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (pre mid rest : List α) (x : α),\n  Effect4.Slice.Failed valid pre mid (List.cons x rest) →\n    Eq (valid { kept := instHAppendOfAppend.hAppend (instHAppendOfAppend.hAppend pre mid) rest })\n        Bool.false →\n      Effect4.Slice.Failed valid pre (instHAppendOfAppend.hAppend mid (List.cons x List.nil)) rest","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"Each selection of a list's elements is a listed sub-list. A step of `exists_mem_subslices`,\nits one consumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.filter_mem_sublists","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (p : α → Bool) (l : List α),\n  List.instMembership.mem (Effect4.Slice.sublists l) (List.filter p l)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The search for the first valid type slice passes over sites that fail. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.firstDrop_append","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (pre mid rest : List α),\n  Effect4.Slice.Failed valid pre mid rest →\n    Eq (Effect4.Slice.firstDrop valid pre (instHAppendOfAppend.hAppend mid rest))\n      (Effect4.Slice.firstDrop valid (instHAppendOfAppend.hAppend pre mid) rest)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A found type slice has one site fewer. A step of the termination of `restart`, its one\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.firstDrop_length","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (done todo l' : List α),\n  Eq (Effect4.Slice.firstDrop valid done todo) (Option.some l') →\n    Eq (instHAdd.hAdd l'.length 1) (instHAdd.hAdd done.length todo.length)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The order is a preorder. It is not antisymmetric: two lists can keep the same sites. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.instIsPreorder","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u}, Std.IsPreorder (Effect4.Slice α)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"The meet is the greatest lower bound. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.instLawfulOrderInf","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α], Std.LawfulOrderInf (Effect4.Slice α)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"The join is the least upper bound. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.instLawfulOrderSup","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u}, Std.LawfulOrderSup (Effect4.Slice α)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A type slice below `s` that does not keep `x` is below `s` without `x`: each slice strictly\nbelow is below a slice one site below. A step of `SliceView.minimal_iff_drop`, its one\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.le_drop","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] {j s : Effect4.Slice α} {x : α},\n  Effect4.Slice.instLE.le j s →\n    Not (List.instMembership.mem j.kept x) → Effect4.Slice.instLE.le j (s.drop x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":["Effect4.Slice.sublists_subset"]},"doc":"A listed type slice is below the slice. A step of `SliceView.contribution_lub`, through\n`SliceView.minimals_sound`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.le_of_mem_subslices","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {j s : Effect4.Slice α},\n  List.instMembership.mem s.subslices j → Effect4.Slice.instLE.le j s","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The type slice without a site does not keep it. A step of `SliceView.minimal_iff_drop`, its\none consumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.not_mem_drop","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (s : Effect4.Slice α) (x : α),\n  Not (List.instMembership.mem (s.drop x).kept x)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"A smaller type slice omits more. A step of `SliceView.ofOmitted`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.omitted_anti","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (sites : List α) {a b : Effect4.Slice α},\n  Effect4.Slice.instLE.le a b →\n    List.instHasSubset.Subset (Effect4.Slice.omitted sites b) (Effect4.Slice.omitted sites a)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The type slice of every site omits nothing. A step of `SliceView.ofOmitted_full`, its one\nconsumer. The proof is by a `match`: `List.filter_eq_nil_iff` reaches `Classical.choice` on this\ntoolchain. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.omitted_full","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (sites : List α),\n  Eq (Effect4.Slice.omitted sites { kept := sites }) List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A type slice omits sites of the given list only. A step of `SliceView.ofOmitted`, its one\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.omitted_subset","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (sites : List α) (s : Effect4.Slice α),\n  List.instHasSubset.Subset (Effect4.Slice.omitted sites s) sites","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.Slice.failed_snoc","Effect4.Slice.failed_rest","Effect4.Slice.restart_of_some","Effect4.Slice.firstDrop_append","Effect4.Slice.restart_of_none","Effect4.Slice.firstDrop_length"]},"doc":"The agreement at every state of the pass: with the kept sites failing, the restart from\nthe pass's type slice gives the pass's result. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.restart_append","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    ∀ (done todo : List α),\n      Effect4.Slice.Failed valid List.nil done todo →\n        Eq (Effect4.Slice.restart valid (instHAppendOfAppend.hAppend done todo))\n          (Effect4.Slice.sweep valid done todo)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Slice.restart_append"]},"doc":"**The paper's descent and the one pass give one list**, for every upward closed `valid`.\nThe restart asks again about each site that failed, and the pass does not. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.restart_eq_sweep","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    ∀ (l : List α), Eq (Effect4.Slice.restart valid l) (Effect4.Slice.sweep valid List.nil l)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Slice.firstDrop_length"]},"doc":"A restart that finds no valid type slice one site below stops at its list. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.restart_of_none","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {valid : Effect4.Slice α → Bool} {l : List α},\n  Eq (Effect4.Slice.firstDrop valid List.nil l) Option.none → Eq (Effect4.Slice.restart valid l) l","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Slice.firstDrop_length"]},"doc":"A restart that finds a valid type slice one site below starts again from it. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.restart_of_some","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {valid : Effect4.Slice α → Bool} {l l' : List α},\n  Eq (Effect4.Slice.firstDrop valid List.nil l) (Option.some l') →\n    Eq (Effect4.Slice.restart valid l) (Effect4.Slice.restart valid l')","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"A listed sub-list holds elements of the list only. A step of `le_of_mem_subslices`, its one\nconsumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sublists_subset","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (l l' : List α),\n  List.instMembership.mem (Effect4.Slice.sublists l) l' → List.instHasSubset.Subset l' l","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The pass asks one question for each site not yet tried. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweepAsked_length","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (done todo : List α),\n  Eq (Effect4.Slice.sweepAsked valid done todo).length todo.length","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.Slice.drop_le_of_subset"]},"doc":"Under the same premises, the questions of the pass with free drops are a sub-list of the\npass's questions: the same questions, without the ones at free sites. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweepFreeAsked_sublist","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (valid : Effect4.Slice α → Bool)\n  (free : Effect4.Slice α → α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    (∀ (c : Effect4.Slice α) (x : α),\n        Eq (free c x) Bool.true → Eq (valid c) Bool.true → Eq (valid (c.drop x)) Bool.true) →\n      ∀ (done todo : List α),\n        Eq (valid { kept := instHAppendOfAppend.hAppend done todo }) Bool.true →\n          (Effect4.Slice.sweepFreeAsked valid free done todo).Sublist\n            (Effect4.Slice.sweepAsked valid done todo)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The pass with free drops reads `valid` at its asked type slices and nowhere else. It needs\nno premise. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweepFree_congr","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid valid' : Effect4.Slice α → Bool) (free : Effect4.Slice α → α → Bool)\n  (done todo : List α),\n  (∀ (c : Effect4.Slice α),\n      List.instMembership.mem (Effect4.Slice.sweepFreeAsked valid free done todo) c →\n        Eq (valid' c) (valid c)) →\n    Eq (Effect4.Slice.sweepFree valid' free done todo)\n      (Effect4.Slice.sweepFree valid free done todo)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":["Effect4.Slice.drop_le_of_subset"]},"doc":"From a valid start, the pass with free drops gives the pass's list. The test must be sound\nagainst `valid`: a valid type slice stays valid without a site that the test calls free. Then the\npass drops each free site too, after one question. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweepFree_eq_sweep","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (valid : Effect4.Slice α → Bool)\n  (free : Effect4.Slice α → α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    (∀ (c : Effect4.Slice α) (x : α),\n        Eq (free c x) Bool.true → Eq (valid c) Bool.true → Eq (valid (c.drop x)) Bool.true) →\n      ∀ (done todo : List α),\n        Eq (valid { kept := instHAppendOfAppend.hAppend done todo }) Bool.true →\n          Eq (Effect4.Slice.sweepFree valid free done todo) (Effect4.Slice.sweep valid done todo)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The pass reads `valid` at the asked type slices and nowhere else: a `valid'` that agrees\nwith `valid` there gives the same result. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweep_congr","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid valid' : Effect4.Slice α → Bool) (done todo : List α),\n  (∀ (c : Effect4.Slice α),\n      List.instMembership.mem (Effect4.Slice.sweepAsked valid done todo) c →\n        Eq (valid' c) (valid c)) →\n    Eq (Effect4.Slice.sweep valid' done todo) (Effect4.Slice.sweep valid done todo)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":14,"nearest":["Effect4.Slice.sweep_sublist","Effect4.Slice.drop_le_of_subset"]},"doc":"Under an upward closed `valid`, the pass needs each site that it tried and kept: its result\nwithout the site is not valid. The pass refused the type slice without the site when it tried\nit, and the result without the site is below that slice. A step of\n`SliceView.descend_minimal`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweep_kept_needed","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} [inst : DecidableEq α] (valid : Effect4.Slice α → Bool),\n  (∀ {a b : Effect4.Slice α},\n      Effect4.Slice.instLE.le a b → Eq (valid a) Bool.true → Eq (valid b) Bool.true) →\n    ∀ (done todo : List α) (y : α),\n      List.instMembership.mem (Effect4.Slice.sweep valid done todo) y →\n        Or (List.instMembership.mem done y)\n          (Eq (valid ({ kept := Effect4.Slice.sweep valid done todo }.drop y)) Bool.false)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"The pass keeps a sub-list of its sites: the sites of `done`, then some of the others, in\ntheir order. A step of `SliceView.descend_sublist`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweep_sublist","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (done todo : List α),\n  (Effect4.Slice.sweep valid done todo).Sublist (instHAppendOfAppend.hAppend done todo)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":1,"lemmas":0,"nearest":[]},"doc":"The pass keeps validity: it moves to a type slice only after `valid` accepted it. It needs no\nupward closure. A step of `SliceView.descend_minimal`, through `SliceView.descend_valid`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.Slice.sweep_valid","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} (valid : Effect4.Slice α → Bool) (done todo : List α),\n  Eq (valid { kept := instHAppendOfAppend.hAppend done todo }) Bool.true →\n    Eq (valid { kept := Effect4.Slice.sweep valid done todo }) Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.SliceView.Minimal.needs"]},"doc":"**A minimal type slice is a highlighted tree**: it keeps each site above a site that it\nkeeps. `above y x` says that the site `y` is above the site `x`: for the addresses of a tree, an\nancestor. The premise is the instance's: omitting a site changes nothing when a site above it\nis omitted already. A type map that omits a whole sub-tree at an address has it. The premise is\nasked at the slice `m` only. The statement gives no such closure for a slice that is not\nminimal. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.Minimal.keeps_above","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  {v : Effect4.SliceView α T} {q : T} {m : Effect4.Slice α},\n  v.Minimal q m →\n    ∀ {above : α → α → Prop},\n      (∀ {x y : α},\n          above y x →\n            Not (List.instMembership.mem m.kept y) → inst.le (v.typeOf m) (v.typeOf (m.drop x))) →\n        ∀ {x y : α}, List.instMembership.mem m.kept x → above y x → List.instMembership.mem m.kept y","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.SliceView.minimal_iff_drop"]},"doc":"**A minimal type slice needs each site that it keeps**: its type without the site is not at\nor above its type. A step of `Minimal.keeps_above`, and a test that one kept site is no dead\nweight. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.Minimal.needs","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  {v : Effect4.SliceView α T} {q : T} {m : Effect4.Slice α},\n  v.Minimal q m →\n    ∀ {x : α}, List.instMembership.mem m.kept x → Not (inst.le (v.typeOf m) (v.typeOf (m.drop x)))","status":"proved"},{"axioms":[],"broughtIn":{"definitions":5,"lemmas":0,"nearest":["Effect4.Slice.instIsPreorder","Effect4.SliceView.valid_up"]},"doc":"A type slice that keeps the same sites as a minimal slice is minimal. A step of\n`minimals_complete`, its one consumer. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.Minimal.of_same_sites","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] {v : Effect4.SliceView α T} {q : T}\n  {m m' : Effect4.Slice α},\n  v.Minimal q m → Effect4.Slice.instLE.le m m' → Effect4.Slice.instLE.le m' m → v.Minimal q m'","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":10,"lemmas":0,"nearest":[]},"doc":"The contribution slice is a type slice below its start: it keeps sites of the start only, in\nthe start's order. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.contribution_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [inst_2 : DecidableLE T]\n  (v : Effect4.SliceView α T) (q : T) (s : Effect4.Slice α),\n  Effect4.Slice.instLE.le (v.contribution q s) s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":0,"nearest":["Effect4.SliceView.minimals_sound","Effect4.SliceView.minimals_complete"]},"doc":"**The contribution slice is the join of the minimal type slices**: it is below a slice\nexactly when each minimal slice below `s` is. The paper calls it \"a least upper bound of actual\nminimal slices\" (p. 12). ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.contribution_lub","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (q : T) (s u : Effect4.Slice α),\n  Iff (Effect4.Slice.instLE.le (v.contribution q s) u)\n    (∀ (m : Effect4.Slice α),\n      Effect4.Slice.instLE.le m s → v.Minimal q m → Effect4.Slice.instLE.le m u)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":14,"lemmas":0,"nearest":["Effect4.SliceView.descend_minimal","Effect4.SliceView.descend_le","Effect4.Slice.instIsPreorder","Effect4.SliceView.contribution_lub","Effect4.SliceView.descend_valid","Effect4.SliceView.valid_up"]},"doc":"**The contribution slice is valid** when its start is: the join of all minimal type slices\nis a slice for the query (the paper's section 4.6, p. 12). ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.contribution_valid","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) {q : T} {s : Effect4.Slice α},\n  v.Valid q s → v.Valid q (v.contribution q s)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":5,"lemmas":0,"nearest":["Effect4.SliceView.valid_up"]},"doc":"The Boolean that the descent asks is upward closed: `valid_up`, read on the decision. A\nstep of `descend_minimal` and of `descend_eq_restart`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.decide_valid_up","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] [inst_2 : DecidableLE T]\n  (v : Effect4.SliceView α T) (q : T) {a b : Effect4.Slice α},\n  Effect4.Slice.instLE.le a b →\n    Eq (Decidable.decide (v.Valid q a)) Bool.true → Eq (Decidable.decide (v.Valid q b)) Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":12,"lemmas":0,"nearest":["Effect4.Slice.sweepFree_congr","Effect4.SliceView.parentOmitted_sound","Effect4.SliceView.decide_valid_up","Effect4.Slice.sweepFreeAsked_sublist"]},"doc":"**The descent over a tree asks no more.** Its questions are a sub-list of the descent's\nquestions: the same ones, without those at a site under an omitted parent. And its result\ndepends on the validity at its own questions only. A finite probe on the toy: 8 questions against\n10 on the page 18 program, and 1 against 4 where the root is omitted\n(`Test/Program/SliceLattice.lean`). It states no count below the sub-list. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descendTree_asks","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (parent : α → Option α),\n  (∀ (c : Effect4.Slice α) {x y : α},\n      Eq (parent x) (Option.some y) →\n        Not (List.instMembership.mem c.kept y) → inst.le (v.typeOf c) (v.typeOf (c.drop x))) →\n    ∀ {q : T} {s : Effect4.Slice α},\n      v.Valid q s →\n        And ((v.askedTree parent q s).Sublist (v.asked q s))\n          (∀ (valid' : Effect4.Slice α → Bool),\n            (∀ (c : Effect4.Slice α),\n                List.instMembership.mem (v.askedTree parent q s) c →\n                  Eq (valid' c) (Decidable.decide (v.Valid q c))) →\n              Eq\n                (Effect4.Slice.sweepFree valid' (Effect4.Slice.parentOmitted parent) List.nil\n                  s.kept)\n                (v.descendTree parent q s).kept)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":["Effect4.SliceView.parentOmitted_sound","Effect4.SliceView.decide_valid_up","Effect4.Slice.sweepFree_eq_sweep"]},"doc":"**The descent over a tree gives the descent's type slice.** The premise is the instance's\nno-op, the one of `Minimal.keeps_above`, asked at every slice: omitting a site changes nothing\nwhen its parent is omitted already. A type map that omits a whole sub-tree at an address has it.\nFrom a\nvalid start the two descents give one slice. The statement says nothing for a start that is not\nvalid, and it gives no order of the sites: with a child before its parent the descent asks about\nthe child. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descendTree_eq_descend","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (parent : α → Option α),\n  (∀ (c : Effect4.Slice α) {x y : α},\n      Eq (parent x) (Option.some y) →\n        Not (List.instMembership.mem c.kept y) → inst.le (v.typeOf c) (v.typeOf (c.drop x))) →\n    ∀ {q : T} {s : Effect4.Slice α}, v.Valid q s → Eq (v.descendTree parent q s) (v.descend q s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":12,"lemmas":0,"nearest":["Effect4.SliceView.descendTree_eq_descend","Effect4.SliceView.descend_minimal"]},"doc":"The descent over a tree ends at a minimal type slice: `descend_minimal`, through\n`descendTree_eq_descend`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descendTree_minimal","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (parent : α → Option α),\n  (∀ (c : Effect4.Slice α) {x y : α},\n      Eq (parent x) (Option.some y) →\n        Not (List.instMembership.mem c.kept y) → inst.le (v.typeOf c) (v.typeOf (c.drop x))) →\n    ∀ {q : T} {s : Effect4.Slice α}, v.Valid q s → v.Minimal q (v.descendTree parent q s)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":8,"lemmas":0,"nearest":["Effect4.Slice.sweep_congr","Effect4.Slice.sweepAsked_length"]},"doc":"**The descent's cost: one question for each site of its start.** The first part counts the\ntype slices that the descent asked about. The second part says that the descent read the validity at\nthose slices and nowhere else: a pass over any `valid'` that agrees with the view there returns\nthe same sites. So the count is of the function's questions, with no counter beside it. Each\nquestion is one call of the type map and one comparison. It is the paper's bound `O(n × T)`\n(p. 10), for `n` sites and a type map of cost `T`. It states no bound below `n`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_asks","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableLE T] (v : Effect4.SliceView α T)\n  (q : T) (s : Effect4.Slice α),\n  And (Eq (v.asked q s).length s.kept.length)\n    (∀ (valid' : Effect4.Slice α → Bool),\n      (∀ (c : Effect4.Slice α),\n          List.instMembership.mem (v.asked q s) c →\n            Eq (valid' c) (Decidable.decide (v.Valid q c))) →\n        Eq (Effect4.Slice.sweep valid' List.nil s.kept) (v.descend q s).kept)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":0,"nearest":["Effect4.SliceView.decide_valid_up","Effect4.Slice.restart_eq_sweep","Effect4.Slice.firstDrop_length"]},"doc":"**The one pass is the paper's descent.** The paper's brute force takes the first valid type\nslice one site below and starts again (pp. 9 and 10): `Slice.restart`. Monotonicity is what\nmakes one pass enough: a site that failed once fails at each later slice, so no start needs to\nask about it again. A finite probe counts the questions on one input of `n` sites: the restart\nasks 120 at `n = 20` and 255 at `n = 30`, and the pass 20 and 30\n(`Test/Program/SliceLattice.lean`). The equality rests on monotonicity, and where a type map is\nnot monotone the two descents differ (the same file). On programs of the tree, under an\nomission that is not monotone, a finite probe of seat CENSUS on 2026-10-06 found the pass in\nprogram order at a slice that is not minimal in 3 of 50 cases, and the restart at a minimal slice\nin all 50. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_eq_restart","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] [inst_2 : DecidableLE T]\n  (v : Effect4.SliceView α T) (q : T) (s : Effect4.Slice α),\n  Eq (v.descend q s)\n    { kept := Effect4.Slice.restart (fun c => Decidable.decide (v.Valid q c)) s.kept }","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.SliceView.descend_sublist"]},"doc":"The descent's type slice is below its start: it keeps no more. A corollary of\n`descend_sublist`, and a step of `exists_minimal_below`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_le","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableLE T] (v : Effect4.SliceView α T)\n  (q : T) (s : Effect4.Slice α), Effect4.Slice.instLE.le (v.descend q s) s","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":9,"lemmas":0,"nearest":["Effect4.SliceView.decide_valid_up","Effect4.Slice.sweep_kept_needed","Effect4.SliceView.descend_valid","Effect4.SliceView.minimal_iff_drop"]},"doc":"**The descent ends at a minimal type slice** (the paper's brute-force algorithm, pp. 9 and\n10).\nFrom a valid slice it returns a minimal slice, and `descend_sublist` puts that slice below the\nstart. It returns one minimal slice, and not a least or a smallest one. Without the premise the\nstart is not valid, and then no slice below it is (`valid_up`). ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_minimal","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) {q : T} {s : Effect4.Slice α},\n  v.Valid q s → v.Minimal q (v.descend q s)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":["Effect4.Slice.sweep_sublist"]},"doc":"The descent keeps sites of its start only, in the start's order, each as often as the start\ndoes. It holds for every start, valid or not. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_sublist","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableLE T] (v : Effect4.SliceView α T)\n  (q : T) (s : Effect4.Slice α), (v.descend q s).kept.Sublist s.kept","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.Slice.sweep_valid"]},"doc":"The descent of a valid type slice is valid. It needs no monotonicity: the pass moves to\naccepted slices only. A step of `descend_minimal`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.descend_valid","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableLE T] (v : Effect4.SliceView α T)\n  {q : T} {s : Effect4.Slice α}, v.Valid q s → v.Valid q (v.descend q s)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":["Effect4.SliceView.descend_minimal","Effect4.SliceView.descend_le"]},"doc":"**A minimal valid type slice exists below each valid slice**: the paper's Theorem 4.5\n(p. 9).\nThe paper's proof enumerates the slices below and does not use monotonicity. This proof is the\ndescent, which uses it. The statement names two decisions, of the order on the types and of\nequal sites, because the gate admits no classical axiom. It leaves out a map that is not\nmonotone. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.exists_minimal_below","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [DecidableEq α] [Std.IsPreorder T] [DecidableLE T]\n  (v : Effect4.SliceView α T) {q : T} {s : Effect4.Slice α},\n  v.Valid q s → Exists fun m => And (Effect4.Slice.instLE.le m s) (v.Minimal q m)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":["Effect4.SliceView.minimal_iff_drop"]},"doc":"The one-step test decides minimality: the executable form of `minimal_iff_drop`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.isMinimal_iff","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (q : T) (m : Effect4.Slice α),\n  Iff (Eq (v.isMinimal q m) Bool.true) (v.Minimal q m)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":["Effect4.Slice.le_drop","Effect4.SliceView.valid_up","Effect4.Slice.drop_le","Effect4.Slice.not_mem_drop"]},"doc":"**Minimality is decided one site below.** A valid type slice is minimal exactly when no slice\none site below it is valid. It is the last step of the paper's brute-force algorithm: \"if none\nof the slices satisfy the query, then a minimal slice has been found, by graduality\" (pp. 9\nand 10). It uses the view's monotonicity. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.minimal_iff_drop","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  (v : Effect4.SliceView α T) (q : T) (m : Effect4.Slice α),\n  Iff (v.Minimal q m)\n    (And (v.Valid q m) (∀ (x : α), List.instMembership.mem m.kept x → Not (v.Valid q (m.drop x))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":["Effect4.SliceView.valid_refine","Effect4.SliceView.exists_minimal_below"]},"doc":"**A refined query has a minimal type slice below a minimal slice of the wider query**: the\npaper's Theorem 4.6 (p. 10). The witness is the descent from `m₂` for the query `q₁`. Nothing\nholds upwards: a minimal slice of `q₁` need not lie below a minimal slice of `q₂` (the paper,\np. 11; `Test/Program/SliceLattice.lean`). ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.minimal_refine","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [DecidableEq α] [Std.IsPreorder T] [DecidableLE T]\n  (v : Effect4.SliceView α T) {q₁ q₂ : T} {m₂ : Effect4.Slice α},\n  inst.le q₁ q₂ →\n    v.Minimal q₂ m₂ → Exists fun m₁ => And (Effect4.Slice.instLE.le m₁ m₂) (v.Minimal q₁ m₁)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":0,"nearest":["Effect4.SliceView.Minimal.of_same_sites","Effect4.SliceView.isMinimal_iff","Effect4.Slice.exists_mem_subslices"]},"doc":"The search misses no minimal type slice below the start: each one keeps the same sites as a\nlisted one. A step of `contribution_lub`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.minimals_complete","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) {q : T} {s m : Effect4.Slice α},\n  Effect4.Slice.instLE.le m s →\n    v.Minimal q m →\n      Exists fun m' =>\n        And (List.instMembership.mem (v.minimals q s) m')\n          (And (Effect4.Slice.instLE.le m' m) (Effect4.Slice.instLE.le m m'))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":0,"nearest":["Effect4.SliceView.isMinimal_iff","Effect4.Slice.le_of_mem_subslices"]},"doc":"Each type slice that the search lists is minimal and below the start. A step of\n`contribution_lub`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.minimals_sound","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) {q : T} {s m : Effect4.Slice α},\n  List.instMembership.mem (v.minimals q s) m → And (Effect4.Slice.instLE.le m s) (v.Minimal q m)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":["Effect4.Slice.omitted_full"]},"doc":"**At the full type slice nothing is omitted**: the slice view of a mask gives the type map\nat the empty mask. It is the generic half of the plan's `slice-conservative`. It does not say\nthat `f []` is the checker's answer: that is the instance's. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.ofOmitted_full","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] (sites : List α) (f : List α → T)\n  (anti :\n    ∀ {F G : List α},\n      List.instHasSubset.Subset F G → List.instHasSubset.Subset G sites → inst.le (f G) (f F)),\n  Eq ((Effect4.SliceView.ofOmitted sites f ⋯).typeOf { kept := sites }) (f List.nil)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"The tree's test is sound against a view's validity, under the no-op premise: where the\nparent is omitted, a valid type slice stays valid without the site. A step of\n`descendTree_eq_descend` and of `descendTree_asks`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.parentOmitted_sound","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [inst_1 : DecidableEq α] [Std.IsPreorder T]\n  [inst_3 : DecidableLE T] (v : Effect4.SliceView α T) (parent : α → Option α),\n  (∀ (c : Effect4.Slice α) {x y : α},\n      Eq (parent x) (Option.some y) →\n        Not (List.instMembership.mem c.kept y) → inst.le (v.typeOf c) (v.typeOf (c.drop x))) →\n    ∀ (q : T) (c : Effect4.Slice α) (x : α),\n      Eq (Effect4.Slice.parentOmitted parent c x) Bool.true →\n        Eq (Decidable.decide (v.Valid q c)) Bool.true →\n          Eq (Decidable.decide (v.Valid q (c.drop x))) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":5,"lemmas":0,"nearest":["Effect4.Slice.instLawfulOrderSup","Effect4.Slice.instIsPreorder","Effect4.SliceView.valid_up"]},"doc":"**The join of two valid type slices is valid for the join of their queries**: the paper's\nTheorem 4.7 (p. 12). The type side needs a join here, and in no other statement: `max` with\n`Std.LawfulOrderSup`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.valid_max","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] [inst_2 : Max T] [Std.LawfulOrderSup T]\n  (v : Effect4.SliceView α T) {q₁ q₂ : T} {a b : Effect4.Slice α},\n  v.Valid q₁ a → v.Valid q₂ b → v.Valid (inst_2.max q₁ q₂) (Effect4.Slice.instMax.max a b)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A type slice that is valid for a query is valid for each query at or below it: a refined\nquery keeps the valid slices of the wider one. A step of `minimal_refine`. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.valid_refine","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] (v : Effect4.SliceView α T) {q q' : T}\n  {s : Effect4.Slice α}, inst.le q' q → v.Valid q s → v.Valid q' s","status":"proved"},{"axioms":[],"broughtIn":{"definitions":4,"lemmas":1,"nearest":[]},"doc":"**Validity is upward closed**: a type slice that keeps more is valid for the same query. The\npaper has it by graduality (Theorem 3.5, p. 8) for its calculus. Here it holds for every\nmonotone view. It establishes no slice that is valid. ","kind":"theorem","module":"Effect4.Laws.Slice.Lattice","name":"Effect4.SliceView.valid_up","placement":{"concept":"subtyping-algebra","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type u} {T : Type v} [inst : LE T] [Std.IsPreorder T] (v : Effect4.SliceView α T) {q : T}\n  {a b : Effect4.Slice α}, v.Valid q a → Effect4.Slice.instLE.le a b → v.Valid q b","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":47,"lemmas":1,"nearest":["Effect4.Store.ShapeDoc.read_exact"]},"doc":"**A carrier read from JSON is the carrier whose canonical print that JSON is.** The pointer\nof `json-read-exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.Canonical.ofJson_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {α : Type} [inst : Effect4.Store.Canonical α] {j : Effect4.Json} {a : α},\n  Eq (Effect4.Store.Canonical.ofJson j) (Option.some a) → Eq (Effect4.Store.Canonical.print a) j","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":37,"lemmas":0,"nearest":["Effect4.Store.readIn_exact"]},"doc":"**A document's reading is exact.** A step of `json-read-exact`. Its consumer is\n`Canonical.ofJson_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.ShapeDoc.read_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {doc : Effect4.Store.ShapeDoc} {j : Effect4.Json} {v : Effect4.Store.Val},\n  Eq (doc.read j) (Option.some v) → Eq (doc.print v) j","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":8,"lemmas":0,"nearest":[]},"doc":"Bytes read from hex are spelled by that hex. A step of `json-read-exact`. Its consumer is\n`readIn_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.canonicalHex?_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {h : String} {d : Effect4.Store.Bytes},\n  Eq (Effect4.Store.canonicalHex? h) (Option.some d) → Eq (Effect4.Store.hexString d) h","status":"proved"},{"axioms":[],"broughtIn":{"definitions":6,"lemmas":0,"nearest":[]},"doc":"A natural read from a binary64 datum spells that datum. A step of `json-read-exact`. Its\nconsumer is `readIn_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.natOfBinary64_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {bits : UInt64} {n : Nat},\n  Eq (Effect4.Store.natOfBinary64 bits) (Option.some n) → Eq (Effect4.Arch.binary64OfNat n) bits","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":6,"lemmas":1,"nearest":[]},"doc":"**A natural reads only from a non-negative finite binary64**, and it is below 2^1024. So the\ndatum the read accepts is a number a binary64 host reads as that natural, never `+Infinity` or a\nnegative number whose bits the write happens to give back (2^2048 and `-1.0`). A step of\n`json-read-exact`. Its consumer is `Tools.JsonBridge.ofLeanJson_num`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.natOfBinary64_finite","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {bits : UInt64} {n : Nat},\n  Eq (Effect4.Store.natOfBinary64 bits) (Option.some n) →\n    And (instLTNat.lt bits.toNat Effect4.Arch.binary64Infinity)\n      (instLTNat.lt n (instHPow.hPow 2 1024))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":41,"lemmas":0,"nearest":["Effect4.Store.tagOfName_exact","Effect4.Store.canonicalHex?_exact","Effect4.Store.natOfBinary64_exact"]},"doc":"The fields read are printed as the entries read. A step of `readIn_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.readFields_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {defs : List (Prod String Effect4.Store.Shape)} {n : Nat}\n  {fields : List (Prod String Effect4.Store.Shape)} {entries : List (Prod String Effect4.Json)}\n  {args : List Effect4.Store.Val},\n  Eq (Effect4.Store.readFields defs n fields entries) (Option.some args) →\n    Eq (Effect4.Store.printFields defs fields args) entries","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":41,"lemmas":0,"nearest":["Effect4.Store.tagOfName_exact","Effect4.Store.canonicalHex?_exact","Effect4.Store.natOfBinary64_exact"]},"doc":"**Whatever reads is the value's print**, under the same shape, at every budget. The pointer's\nstep of `json-read-exact`. Its consumer is `ShapeDoc.read_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.readIn_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {defs : List (Prod String Effect4.Store.Shape)} {n : Nat} {s : Effect4.Store.Shape}\n  {j : Effect4.Json} {v : Effect4.Store.Val},\n  Eq (Effect4.Store.readIn defs n s j) (Option.some v) → Eq (Effect4.Store.printIn defs s v) j","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":41,"lemmas":0,"nearest":["Effect4.Store.tagOfName_exact","Effect4.Store.canonicalHex?_exact","Effect4.Store.natOfBinary64_exact"]},"doc":"The elements read are printed as the list read. A step of `readIn_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.readList_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {defs : List (Prod String Effect4.Store.Shape)} {n : Nat} {item : Effect4.Store.Shape}\n  {js : List Effect4.Json} {xs : List Effect4.Store.Val},\n  Eq (Effect4.Store.readList defs n item js) (Option.some xs) →\n    Eq (Effect4.Store.printList defs item xs) js","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"A tag read from a case name prints as that name. A step of `json-read-exact`. Its consumer\nis `readIn_exact`. ","kind":"theorem","module":"Effect4.Laws.Store.ShapeRead","name":"Effect4.Store.tagOfName_exact","placement":{"concept":"exact-codecs","requirement":"R14"},"restsOn":[],"statement":"∀ {name : String} {cases : List (Prod String (Prod Nat (List (Prod String Effect4.Store.Shape))))}\n  {tag : Nat} {fields : List (Prod String Effect4.Store.Shape)},\n  Eq (Effect4.Store.tagOfName name cases) (Option.some { fst := tag, snd := fields }) →\n    Eq (Effect4.Store.caseAt tag cases) (Option.some { fst := name, snd := fields })","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":90,"lemmas":37,"nearest":[]},"doc":"An accepted adapter derives its metadata and invocations from the same declarations.\nEquality of normalized columns does not establish admission of any definition body. ","kind":"theorem","module":"Effect4.Laws.Library.Stream.Definitions","name":"Effect4.Stream.Source.fromDefinitions_declarations","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {opened pull close : Effect4.Program.Authoring.DefSrc Effect4.Program.NativeOp}\n  {arguments : List Effect4.Program.Authoring.TermSrc} {source : Effect4.Stream.Source},\n  Eq (Effect4.Stream.Source.fromDefinitions opened pull close arguments) (Except.ok source) →\n    And\n      (Eq pull.answer.normalize (Effect4.Program.Stream.pulledTy source.elem source.done).normalize)\n      (And (Eq opened.answer.normalize pull.decl.request.normalize)\n        (And (Eq close.decl.request.normalize pull.decl.request.normalize)\n          (And (Eq close.answer.normalize Effect4.Program.Ty.unit)\n            (And (Eq source.opened (Effect4.Program.Authoring.Def.invoke opened.name arguments))\n              (And\n                (∀ (state : Effect4.Program.Authoring.TermSrc),\n                  Eq (source.pull state)\n                    (Effect4.Program.Authoring.Def.invoke pull.name (List.cons state List.nil)))\n                (∀ (state : Effect4.Program.Authoring.TermSrc),\n                  Eq (source.close state)\n                    (Effect4.Program.Authoring.Def.invoke close.name\n                      (List.cons state List.nil))))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":238,"lemmas":39,"nearest":["Effect4.Ref.modify_callback_answers"]},"doc":"A typed array cell supplies the extracted batch's declared type. ","kind":"theorem","module":"Effect4.Laws.Library.Stream.Array","name":"Effect4.Stream.arrayBatch_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} (A : Effect4.Program.Ty)\n  {receiver : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n  Eq A.list.normalize A.list →\n    Effect4.Modules.NodesFormed A.list →\n      Effect4.Modules.Typed (Effect4.Program.nativeSignature table) receiver s A.list.refOf →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n          (Effect4.Stream.arrayBatch A receiver) s A.list","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":246,"lemmas":13,"nearest":["Effect4.Ref.modify_callback_agrees"]},"doc":"One allocated cell step agrees with the independent batch extraction transition. ","kind":"theorem","module":"Effect4.Laws.Library.Stream.Array","name":"Effect4.Stream.arrayStep_agrees","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (A : Effect4.Program.Ty) (L : Effect4.Schema.Model.Leaves)\n  (pending : List (Effect4.Schema.Model.CarrierAt L A)) {env : Effect4.Program.Authoring.Env}\n  {path : List Nat} {vals : List Effect4.Machine.Val} {receiver : Effect4.Program.Authoring.TermSrc}\n  {q : Effect4.Machine.RefKey} {stores : Effect4.Machine.Stores},\n  Eq vals.length (List.length env.names) →\n    Effect4.Modules.Reads receiver env path vals (Effect4.Machine.Val.cell q) →\n      Eq (Effect4.Machine.refPeek stores.refs q)\n          (Option.some ((Effect4.Schema.Model.imageAt L A.list).toVal pending)) →\n        Exists fun term =>\n          Exists fun request =>\n            And\n              (Eq (Effect4.Stream.arrayBatch A receiver env path)\n                (Except.ok\n                  (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.refModifyWith term)\n                    request)))\n              (And\n                (Eq (Effect4.Program.evalTerm vals request)\n                  (Option.some (Effect4.Machine.Val.cell q)))\n                (Eq\n                  (Effect4.Machine.syncOpStep (Effect4.Machine.SyncOp.refModify q term vals) stores)\n                  (Option.some\n                    {\n                      fst :=\n                        Effect4.Ref.resultStores (Effect4.Schema.Model.imageAt L A.list)\n                          (Effect4.Ref.Model.modify Effect4.Stream.ArrayModel.pull pending) q\n                          stores,\n                      snd :=\n                        (Effect4.Schema.Model.imageAt L A.list).toVal\n                          (Effect4.Ref.Model.modify Effect4.Stream.ArrayModel.pull\n                              pending).reply })))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":21,"lemmas":0,"nearest":[]},"doc":"First-exit selection keeps the complete exit, including arbitrary cause data. ","kind":"theorem","module":"Effect4.Laws.Machine.RaceFirst","name":"Effect4.Supervision.raceCompleteFirst_accepts","placement":{"concept":"reactive-scheduling","requirement":"R4"},"restsOn":[],"statement":"∀ {β : Type v} {ε δ ι α : Type u} (s : Effect4.Supervision.RaceAllState β ε δ ι α)\n  (child : Effect4.FiberId) (exit : Effect4.Exit β ε δ ι α),\n  List.instMembership.mem s.live child →\n    Eq s.accepted Option.none →\n      Eq (Effect4.Supervision.raceCompleteFirst s child exit).accepted (Option.some exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":21,"lemmas":2,"nearest":[]},"doc":"Once an exit is selected, later callbacks retain that exit. ","kind":"theorem","module":"Effect4.Laws.Machine.RaceFirst","name":"Effect4.Supervision.raceCompleteFirst_keeps","placement":{"concept":"reactive-scheduling","requirement":"R4"},"restsOn":[],"statement":"∀ {β : Type v} {ε δ ι α : Type u} (s : Effect4.Supervision.RaceAllState β ε δ ι α)\n  (child : Effect4.FiberId) (exit accepted : Effect4.Exit β ε δ ι α),\n  Eq s.accepted (Option.some accepted) →\n    Eq (Effect4.Supervision.raceCompleteFirst s child exit).accepted (Option.some accepted)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":342,"lemmas":114,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.matchB_refOf_var","Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound"]},"doc":"Reading checks only the backing field and the existing Ref read.\nCompatibility reader of native Ref typing under R4. ","kind":"theorem","module":"Effect4.Laws.Library.SynchronizedRef.Ops","name":"Effect4.SynchronizedRef.get_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty}\n  {self : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n  Eq A.normalize A →\n    Effect4.Modules.NodesFormed A →\n      Effect4.Modules.Typed (Effect4.Program.nativeSignature table) self s\n          (Effect4.SynchronizedRef.handleTy A) →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n          (Effect4.SynchronizedRef.get self) s A","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":373,"lemmas":132,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Semaphore.make_types","Effect4.Program.Bounds.matchB_one_var"]},"doc":"Construction checks its declared backing type and the existing Semaphore constructor.\nCompatibility reader of waiting-wrapper-typed and native Ref typing under R4. ","kind":"theorem","module":"Effect4.Laws.Library.SynchronizedRef.Ops","name":"Effect4.SynchronizedRef.make_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A : Effect4.Program.Ty}\n  {initial : Effect4.Program.Authoring.TermSrc} {s : Effect4.Modules.TypedScope},\n  Eq A.normalize A →\n    Effect4.Modules.NodesFormed A →\n      (∀ (path : List Nat),\n          Effect4.Modules.Types (Effect4.Program.nativeSignature table) initial s.env path s.types\n            Bool.false A) →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n          (Effect4.SynchronizedRef.make A initial) s (Effect4.SynchronizedRef.handleTy A)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":524,"lemmas":115,"nearest":["Effect4.Program.UnionRule.lift_member","Effect4.Program.Ty.normalize_idem","Effect4.Ref.modify_callback_answers","Effect4.Semaphore.withPermits_types"]},"doc":"A pure modify checks at the original caller scope, including all captured sources.\nCompatibility reader of waiting-wrapper-typed, step-language-typed, and fold-typed-atomic-update.\nThe one-cell meaning remains the existing Ref.modify_callback_agrees claim. ","kind":"theorem","module":"Effect4.Laws.Library.SynchronizedRef.Ops","name":"Effect4.SynchronizedRef.modify_answers","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable} {A B : Effect4.Program.Ty} {Γ : List Effect4.Program.Ty}\n  {self : Effect4.Program.Authoring.TermSrc}\n  (body : Effect4.Modules.Step (List.cons A Γ) (B.prod A))\n  (captures :\n    {t : Effect4.Program.Ty} → Effect4.Modules.Input Γ t → Effect4.Program.Authoring.TermSrc)\n  {s : Effect4.Modules.TypedScope},\n  Eq A.normalize A →\n    Effect4.Modules.NodesFormed A →\n      Eq B.normalize B →\n        Effect4.Modules.NodesFormed B →\n          Effect4.Modules.Typed (Effect4.Program.nativeSignature table) self s\n              (Effect4.SynchronizedRef.handleTy A) →\n            (∀ {t : Effect4.Program.Ty} (x : Effect4.Modules.Input Γ t),\n                Effect4.Modules.Typed (Effect4.Program.nativeSignature table) (captures x) s t) →\n              body.Facts →\n                Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n                  (Effect4.SynchronizedRef.modify self body fun {t} => captures) s B","status":"proved"},{"axioms":[],"broughtIn":{"definitions":1497,"lemmas":84,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Cleanup-log provenance obligation of the original claim.\nEvery logged identity comes from its request's finalizer, with at most one write per start.\nReach: actual admitted histories, including interruption and incomplete commands.\nConsumer: `cleaned`; the static placement proof alone does not establish this property. ","kind":"goal","module":"Test.Dogfood.Scenario.Atomic.Cleanup","name":"Test.Dogfood.Scenario.Atomic.Cleanup.log_debits","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.Atomic.Cleanup.log_debits"],"statement":"∀ (b : Effect4.Api.Built) (m : Effect4.Program.NativeMachine),\n  Eq\n      (Effect4.Api.Author.build\n        (Test.Dogfood.Scenario.Atomic.shop Test.Dogfood.Scenario.Atomic.Fault.none))\n      (Except.ok b) →\n    Effect4.Run.HistoryOf b Test.Dogfood.Scenario.Atomic.budget.compileFuel m →\n      And\n        (∀ (i : Nat),\n          List.instMembership.mem (Test.Dogfood.Scenario.Atomic.Store.observeM m).cleaned i →\n            List.instMembership.mem Test.Dogfood.Scenario.Atomic.requests i)\n        (∀ (i : Nat),\n          List.instMembership.mem Test.Dogfood.Scenario.Atomic.requests i →\n            instLENat.le (List.count i (Test.Dogfood.Scenario.Atomic.Store.observeM m).cleaned)\n              (List.countP\n                (Effect4.Program.FinalizerRun.startedAt\n                  (Test.Dogfood.Scenario.Atomic.Cleanup.requestPath i))\n                (m.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))))","status":"goal"},{"axioms":[],"broughtIn":{"definitions":1427,"lemmas":83,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The stages exist** (program-specific; new). Every machine of every history of the shop\nadmits a stage assignment that fits its observation.\n\nPlacement. Concept `store-typing`, requirement R4. Question: the scenario clauses `counted` and\n`committed`, whose step this is. Consumers: `Atomic.counted`, `Atomic.committed`; with a\n`cleaned` stage per request it also serves `cleans_once` (R11, another seat's). Reach: the\nbuilt shop, every compile budget, every control history. Not established: that a request\ndecides (progress), anything of a lowered run. Route (`README.md`, section S2): the shop's\nper-fiber positions, by the fiber-local residual law (G2), and one check per write site and per\ninterruption. ","kind":"goal","module":"Test.Dogfood.Scenario.Atomic.Store","name":"Test.Dogfood.Scenario.Atomic.Store.shop_stages","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":["Test.Dogfood.Scenario.Atomic.Store.shop_stages"],"statement":"∀ (b : Effect4.Api.Built),\n  Eq\n      (Effect4.Api.Author.build\n        (Test.Dogfood.Scenario.Atomic.shop Test.Dogfood.Scenario.Atomic.Fault.none))\n      (Except.ok b) →\n    ∀ (compileFuel : Nat) (m : Effect4.Program.NativeMachine),\n      Effect4.Run.ControlHistory b compileFuel m →\n        Exists fun g =>\n          Test.Dogfood.Scenario.Atomic.Store.StagesFit g\n            (Test.Dogfood.Scenario.Atomic.Store.observeM m)","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1634,"lemmas":86,"nearest":["Test.Dogfood.Scenario.Atomic.unsuspended_runs","Test.Dogfood.Scenario.Atomic.cleans_once","Test.Dogfood.Scenario.Atomic.committed","Test.Dogfood.Scenario.Atomic.counted","Test.Dogfood.Scenario.Atomic.bounded","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The atomic scenario's claim.** Between refills the used capacity stays bounded. The stores\ncount each request's outcome once. A request that fails behind its commits leaves them in the\nstores. The cleanup log holds each request once. Removing a straight program's suspensions keeps\nits exit and its stores. The proof graph records the unfinished dependencies of each clause. It does not establish a scheduler guarantee without a bound, a host\ntransaction or a whole-run resource theorem. ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.atomic","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":["Test.Dogfood.Scenario.Atomic.Cleanup.log_debits","Test.Dogfood.Scenario.Atomic.Store.shop_stages"],"statement":"And Test.Dogfood.Scenario.Atomic.Bounded\n  (And Test.Dogfood.Scenario.Atomic.Counted\n    (And Test.Dogfood.Scenario.Atomic.Committed\n      (And Test.Dogfood.Scenario.Atomic.CleansOnce Test.Dogfood.Scenario.Atomic.Unsuspended)))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1635,"lemmas":145,"nearest":["Test.Dogfood.Scenario.history","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Program.mem_addresses_iff","Effect4.Program.HeapSites.heap_sites_keep"]},"doc":"**Between refills the used capacity stays bounded.** Under every script the window's `used`\nfield is at most 3. Reach: the program `shop`, every script of the driver's alphabet, the\nbattery's budgets, natural-valued fields. A field that is not there reads as `0`, so the\nstatement does not say that the store is formed. It is an application invariant over p4's real\n`Window` transition: one atomic update a request, and a refill that writes zero. It does not\nestablish a scheduler guarantee, a host transaction or a whole-run resource theorem. It does not\nhold of a request that reads and writes in two steps: a red control. Concept `store-typing`, R4.\nConsumer: the atomic scenario. Its controls are finite runs, and the seat's receipt records a\nbounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.bounded","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":[],"statement":"Test.Dogfood.Scenario.Atomic.Bounded","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1829,"lemmas":794,"nearest":["Test.Dogfood.Scenario.history","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.mem_addresses_iff","Effect4.Program.Node.at_append","Effect4.Scope.closeOrder_eq","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.ControlWeights.replace_sum_le_omitted","Effect4.Machine.Lift.driveState_lift","Effect4.Program.FinalizerRun.starts_le_pushes","Test.Dogfood.Scenario.Atomic.Cleanup.log_debits"]},"doc":"**The cleanup log holds each request once.** Under every script no request's number stands\ntwice in the cleanup log. Reach: the program `shop`, every script of the driver's alphabet, the\nbattery's budgets. It is a statement about the log: it counts writes by identity. It does not\ncount a finalizer's invocations, and it shows no registration that ran twice. Its red control is\na finalizer that writes its entry twice in one invocation. It does not establish that a\nfinalizer runs. Concept `scope-lifetime-finalization`, R11. Consumer: the atomic scenario. Its\ncontrols are finite runs, and the seat's receipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.cleans_once","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.Atomic.Cleanup.log_debits"],"statement":"Test.Dogfood.Scenario.Atomic.CleansOnce","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1614,"lemmas":101,"nearest":["Test.Dogfood.Scenario.history","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff","Test.Dogfood.Scenario.Atomic.Store.shop_stages"]},"doc":"**A request that fails behind its commits leaves them in the stores.** Under every script,\nonce request 2 has exited with the planted failure, the observation satisfies\n`Observation.committed`. Its deposit stands once in the account, the window counts an admitted\nrequest, and its finalizer saw a decided request. Reach: the program `shop`, every script of the\ndriver's alphabet, the battery's budgets. The supporting law is\n`Effect4.Program.Denote.meaning_onExit` (`src/Effect4/Laws/Program/Denote.lean`): a finalizer\nruns on the stores its body left, and its own stores stay. That law holds of a finalizer that\ntakes the deposit back, and this statement does not: a red control. That law has no placement,\nso the record does not list it. This statement does not establish a host transaction, that\nrequest 2 fails, a whole-run resource theorem, or anything of a lowered run. Concept\n`store-typing`, R4. Consumer: the atomic scenario. Its controls are finite runs, and the seat's\nreceipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.committed","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":["Test.Dogfood.Scenario.Atomic.Store.shop_stages"],"statement":"Test.Dogfood.Scenario.Atomic.Committed","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1614,"lemmas":113,"nearest":["Test.Dogfood.Scenario.history","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff","Test.Dogfood.Scenario.Atomic.Store.shop_stages"]},"doc":"**The stores count each request's outcome once.** Under every script the observation\nsatisfies `Observation.counted`. An admitted request's deposit stands once in the account, and a\nrejected request has none. The window's counts hold every completed request. When all six are\ncompleted, the counts are exactly the requests' outcomes. The deposit is per request: its amount\nis the request's number. The window's part is by outcome: the record keeps two counts, and no\nidentity. Reach: the program `shop`, every script of the driver's alphabet, the battery's\nbudgets. A request that the script interrupts is not completed, and the statement leaves its\ncounts open. It does not establish that a request completes. Concept `store-typing`, R4.\nConsumer: the atomic scenario. Its controls are finite runs, and the seat's receipt records a\nbounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.counted","placement":{"concept":"store-typing","requirement":"R4"},"restsOn":["Test.Dogfood.Scenario.Atomic.Store.shop_stages"],"statement":"Test.Dogfood.Scenario.Atomic.Counted","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":901,"lemmas":87,"nearest":["Effect4.Program.Denote.StraightEq.run_agrees"]},"doc":"**Removing a program's suspensions keeps its exit and its complete stores.** A straight\nprogram and the program without its suspensions both finish, each at its own bound, with one\nexit and the same stores. The stores are complete: they hold what a failure left and what a\nfinalizer wrote. Reach: the straight fragment (`Straight`), one fiber, the bound `fuelFor` of\neach program. It consumes `StraightEq.run_agrees_at_bound`, so it is a consumer of the registry\nclaim `straight-composition-agreement`. It does not reach a program that forks, yields or\nsleeps, as `shop` does. It does not compare traces, a budget below the bound, a host table or a\nlowered run. Concept `translation-simulation`, R8. Consumer: the atomic scenario, on the failing\nrequest alone (`alone`). ","kind":"theorem","module":"Test.Dogfood.Scenario.Atomic","name":"Test.Dogfood.Scenario.Atomic.unsuspended_runs","placement":{"concept":"translation-simulation","requirement":"R8"},"restsOn":[],"statement":"Test.Dogfood.Scenario.Atomic.Unsuspended","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1417,"lemmas":90,"nearest":["Effect4.Run.tapeFrom_position_replays"]},"doc":"**The raw replay shows the session machine at every position of a lowered run.** When a\nlowered run opens its program fresh (`Run.open`), the views of the raw frame replay are the\nsession machine's views: the opened machine first, then the machine after each position of the\ntape. The tape may leave rows unread: a stopped row adds a position to neither list. Reach: any\nbuilt program, name, budgets, profile and script. The fresh open is a premise, because\n`Lowered.shown` replays each prefix from a new load (`Api.replay`). The proof uses the premise\nonce, for the opened machine (`Run.open_machine`). It does not establish `Shown.agrees`, which\nalso asks for a tape that reads every row. It says nothing of the replay's outcome words, of\n`observedTableDifference`, of a session ledger or of a lowered engine: the engine's link stays\nthe finite comparison of `ocaml/engine/test/scenarios/test_scenarios.ml`. Concept\n`translation-simulation`, R8: the replay view of `tape_replays`, at every position, for a tape\nthat may stop. It is `tapeFrom_position_replays` (`src/Effect4/Laws/Run/Tape.lean`) at each\nposition. Consumer: the lowered runs of `fixtures`, each of which opens its program fresh, and\nthe record `cuts` below. ","kind":"theorem","module":"Test.Dogfood.Scenario.Tape","name":"Test.Dogfood.Scenario.Lowered.shown_views_opened","placement":{"concept":"translation-simulation","requirement":"R8"},"restsOn":[],"statement":"∀ (l : Test.Dogfood.Scenario.Lowered.Lowered) (b : Effect4.Api.Built) (id : String)\n  (budget : Effect4.Api.Budget) (profile : String),\n  Eq l.opened (Effect4.Run.open b id budget profile) →\n    Eq (List.map (fun x => x.snd) l.shown.raw) l.shown.views","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":648,"lemmas":57,"nearest":["Test.Dogfood.Scenario.Programs.workers_placement","Test.Dogfood.Scenario.Programs.workers_built_program","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"The first crew's static acquisition fact at every job count and successful build.\nStep of `Workers.releases_once`. Consumer: its control-linearity assembly. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.crew_acquire_once_placed","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.Workers.crew total)) (Except.ok b) →\n    ∀ (i : Nat),\n      List.instMembership.mem (List.cons 1 (List.cons 2 List.nil)) i →\n        Eq\n          (Effect4.Program.OncePlaced (Effect4.Program.Node.eff b.program)\n            (Test.Dogfood.Scenario.Programs.crewAcquire i))\n          Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":814,"lemmas":58,"nearest":["Test.Dogfood.Scenario.Programs.queue_placement","Test.Dogfood.Scenario.Programs.queue_built_program","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"The queue crew's static acquisition fact at every job count and successful build.\nStep of `QueueWorkers.releases_once`. Consumer: its control-linearity assembly. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    ∀ (i : Nat),\n      List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n        Eq\n          (Effect4.Program.OncePlaced (Effect4.Program.Node.eff b.program)\n            (Test.Dogfood.Scenario.Programs.queueAcquire i))\n          Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":251,"lemmas":1,"nearest":[]},"doc":"The queue crew's paths address acquisition nodes.\nStep of its release bridge. Consumer: `queueCrew_released_by_releases`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_acquisition_sites","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total i : Nat),\n  List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n    Eq\n      (Test.Dogfood.Scenario.Programs.acquisitionAt\n        (Test.Dogfood.Scenario.Programs.queueProgram total)\n        (Test.Dogfood.Scenario.Programs.queueAcquire i))\n      Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":813,"lemmas":58,"nearest":["Test.Dogfood.Scenario.Programs.queue_elaborates","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"A successful queue-crew build stores its elaborated tree. Consumer: its acquisition fact. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_built_program","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    Eq b.program (Test.Dogfood.Scenario.Programs.queueProgram total)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":287,"lemmas":1,"nearest":["Test.Dogfood.Scenario.Programs.queue_refs_nil","Test.Dogfood.Scenario.Programs.queue_main_eq","Effect4.Api.Author.elaborateModule_no_declarations"]},"doc":"The queue crew's module equation. Consumer: `queue_built_program`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_elaborates","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq (Effect4.Program.Authoring.elaborateModule (Test.Dogfood.Scenario.QueueWorkers.crew total))\n    (Except.ok (Test.Dogfood.Scenario.Programs.queueProgram total))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":239,"lemmas":1,"nearest":["Test.Dogfood.Scenario.Programs.queue_main_some","Effect4.Api.Author.elaboration_eq_getD"]},"doc":"The queue crew's main equation. Consumer: `queue_elaborates`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_main_eq","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq\n    ((Test.Dogfood.Scenario.QueueWorkers.crew total).main Test.Dogfood.Scenario.Programs.crewScope\n      List.nil)\n    (Except.ok (Test.Dogfood.Scenario.Programs.queueProgram total))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":239,"lemmas":1,"nearest":[]},"doc":"The queue crew's main elaborates at the closed declaration scope. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_main_some","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq\n    ((Test.Dogfood.Scenario.QueueWorkers.crew total).main Test.Dogfood.Scenario.Programs.crewScope\n          List.nil).toOption.isSome\n    Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":251,"lemmas":1,"nearest":[]},"doc":"All three queue-crew acquisition paths satisfy the static placement predicate.\nStep of `QueueWorkers.releases_once`. Consumer: `queueCrew_acquire_once_placed`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_placement","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total i : Nat),\n  List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n    Eq\n      (Effect4.Program.OncePlaced\n        (Effect4.Program.Node.eff (Test.Dogfood.Scenario.Programs.queueProgram total))\n        (Test.Dogfood.Scenario.Programs.queueAcquire i))\n      Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":250,"lemmas":1,"nearest":[]},"doc":"The queue crew contains no layer reference. Consumer: `queue_elaborates`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.queue_refs_nil","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq (Effect4.Program.Eff.refSites List.nil (Test.Dogfood.Scenario.Programs.queueProgram total))\n    List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":85,"lemmas":0,"nearest":[]},"doc":"The first crew's paths address acquisition nodes.\nStep of its release bridge. Consumer: `crew_released_by_releases`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_acquisition_sites","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total i : Nat),\n  List.instMembership.mem (List.cons 1 (List.cons 2 List.nil)) i →\n    Eq\n      (Test.Dogfood.Scenario.Programs.acquisitionAt\n        (Test.Dogfood.Scenario.Programs.workersProgram total)\n        (Test.Dogfood.Scenario.Programs.crewAcquire i))\n      Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":647,"lemmas":57,"nearest":["Test.Dogfood.Scenario.Programs.workers_elaborates","Effect4.Api.Author.build_retains","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"A successful first-crew build stores its elaborated tree. Consumer: its acquisition fact. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_built_program","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.Workers.crew total)) (Except.ok b) →\n    Eq b.program (Test.Dogfood.Scenario.Programs.workersProgram total)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":121,"lemmas":0,"nearest":["Test.Dogfood.Scenario.Programs.workers_refs_nil","Test.Dogfood.Scenario.Programs.workers_main_eq","Effect4.Api.Author.elaborateModule_no_declarations"]},"doc":"The first crew's module equation. Consumer: `workers_built_program`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_elaborates","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq (Effect4.Program.Authoring.elaborateModule (Test.Dogfood.Scenario.Workers.crew total))\n    (Except.ok (Test.Dogfood.Scenario.Programs.workersProgram total))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":73,"lemmas":0,"nearest":["Test.Dogfood.Scenario.Programs.workers_main_some","Effect4.Api.Author.elaboration_eq_getD"]},"doc":"The first crew's main equation. Consumer: `workers_elaborates`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_main_eq","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq\n    ((Test.Dogfood.Scenario.Workers.crew total).main Test.Dogfood.Scenario.Programs.crewScope\n      List.nil)\n    (Except.ok (Test.Dogfood.Scenario.Programs.workersProgram total))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":73,"lemmas":0,"nearest":[]},"doc":"The first crew's main elaborates at the closed declaration scope. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_main_some","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq\n    ((Test.Dogfood.Scenario.Workers.crew total).main Test.Dogfood.Scenario.Programs.crewScope\n          List.nil).toOption.isSome\n    Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":85,"lemmas":0,"nearest":[]},"doc":"Both first-crew acquisition paths satisfy the static placement predicate.\nStep of `Workers.releases_once`. Consumer: `crew_acquire_once_placed`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_placement","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total i : Nat),\n  List.instMembership.mem (List.cons 1 (List.cons 2 List.nil)) i →\n    Eq\n      (Effect4.Program.OncePlaced\n        (Effect4.Program.Node.eff (Test.Dogfood.Scenario.Programs.workersProgram total))\n        (Test.Dogfood.Scenario.Programs.crewAcquire i))\n      Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":84,"lemmas":0,"nearest":[]},"doc":"The first crew contains no layer reference. Consumer: `workers_elaborates`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Programs","name":"Test.Dogfood.Scenario.Programs.workers_refs_nil","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (total : Nat),\n  Eq (Effect4.Program.Eff.refSites List.nil (Test.Dogfood.Scenario.Programs.workersProgram total))\n    List.nil","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":38,"lemmas":2,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.held_of_shows"]},"doc":"**The fed jobs are no more than the held ones, but for the lost ones**, on a ledger with no\ncustody. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.accounted_of_ledger","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {a : Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger}\n  {o : Test.Dogfood.Scenario.QueueWorkers.Observation},\n  a.Shows o →\n    a.Conserved →\n      Eq a.custody List.nil →\n        instLENat.le a.lost.length (ite (Eq (o.live 3) Bool.true) 0 1) → Eq o.accounted Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":876,"lemmas":65,"nearest":[]},"doc":null,"kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (s : Effect4.Run),\n  Eq s.exit\n    ((Effect4.Machine.RunMachine.fiber? s.machine Effect4.Api.root).bind\n      Effect4.Machine.RunFiber.exit)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":15,"lemmas":0,"nearest":[]},"doc":"A conserving ledger's fed jobs are its held ones, then the rest. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.fed_perm","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {a : Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger},\n  a.Conserved →\n    (List.map Effect4.Store.Val.nat a.fed).Perm\n      (instHAppendOfAppend.hAppend (List.map Effect4.Store.Val.nat a.heldJobs)\n        (List.map Effect4.Store.Val.nat (instHAppendOfAppend.hAppend a.custody a.lost)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":4,"lemmas":0,"nearest":[]},"doc":"The assigned jobs, read back. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.filterMap_gave","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (l : List (Prod Nat Nat)),\n  Eq\n    (List.filterMap Test.Dogfood.Scenario.QueueWorkers.jobOf\n      (List.map (fun e => Test.Dogfood.Scenario.QueueWorkers.gave e.fst e.snd) l))\n    (List.map Effect4.Store.Val.nat (List.map Prod.fst l))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":2,"lemmas":0,"nearest":[]},"doc":"The pending jobs of a view, read back. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.flatMap_offers","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (os : List Effect4.Queue.Model.Offer),\n  Eq\n    (List.flatMap (fun x => x.snd)\n      (List.map (fun o => { fst := o.batch, snd := List.map Effect4.Store.Val.nat o.rest }) os))\n    (List.map Effect4.Store.Val.nat (List.flatMap (fun x => x.rest) os))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":35,"lemmas":2,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.fed_perm","Test.Dogfood.Scenario.QueueWorkers.Accounting.held_of_shows"]},"doc":"**No job is held more often than it was fed**, on a ledger that the observation shows and\nthat conserves. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.heldWithin_of_ledger","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {a : Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger}\n  {o : Test.Dogfood.Scenario.QueueWorkers.Observation},\n  a.Shows o → a.Conserved → Eq o.heldWithin Bool.true","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":31,"lemmas":3,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.flatMap_offers","Test.Dogfood.Scenario.QueueWorkers.Accounting.filterMap_gave"]},"doc":"**The held jobs of an observation are the ledger's.** ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.held_of_shows","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ {a : Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger}\n  {o : Test.Dogfood.Scenario.QueueWorkers.Observation},\n  a.Shows o → Eq o.held (List.map Effect4.Store.Val.nat a.heldJobs)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1312,"lemmas":81,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.opened_exit"]},"doc":"**The ledger at the opened run**: nothing made, nothing fed, nothing held. It is the ledger's\npart of the frame's start. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (fuel : Nat) (b : Effect4.Api.Built),\n  And\n    (Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger.empty.Shows\n      (Test.Dogfood.Scenario.QueueWorkers.observe\n        (Test.Dogfood.Scenario.QueueWorkers.openedAt fuel b)))\n    Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger.empty.Conserved","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1241,"lemmas":81,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq"]},"doc":"The opened run's root has not exited. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.opened_exit","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"∀ (fuel : Nat) (b : Effect4.Api.Built),\n  Eq (Test.Dogfood.Scenario.QueueWorkers.openedAt fuel b).exit Option.none","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":17,"lemmas":4,"nearest":[]},"doc":"A quiet profile state with no signalled request has no waiting taker beside a message. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.quiet_nil","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    Eq (Effect4.Queue.Model.quiet s List.nil) Bool.true →\n      Or (Eq s.messages List.nil) (Eq s.takers List.nil)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":51,"lemmas":12,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.within_one","Test.Dogfood.Scenario.QueueWorkers.Accounting.spent_one","Test.Dogfood.Scenario.QueueWorkers.Accounting.quiet_nil","Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_view"]},"doc":"**At rest the queue is settled**, on a ledger that the observation shows, with the queue's\nfacts at rest. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_ledger","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {a : Test.Dogfood.Scenario.QueueWorkers.Accounting.Ledger}\n  {o : Test.Dogfood.Scenario.QueueWorkers.Observation},\n  a.Shows o → a.RestQueue o → Eq o.settled Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":24,"lemmas":1,"nearest":[]},"doc":"**The queue is settled**, read from a view's seven parts. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_view","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {o : Test.Dogfood.Scenario.QueueWorkers.Observation}\n  {q : Test.Dogfood.Scenario.QueueWorkers.QueueView},\n  Eq o.queue.view (Option.some q) →\n    Eq q.capacity Test.Dogfood.Scenario.QueueWorkers.capacity →\n      (∀ (offer : Prod Bool (List Effect4.Machine.Val)),\n          List.instMembership.mem q.offers offer →\n            And (Eq offer.fst Bool.false) (Eq offer.snd.length 1)) →\n        Eq q.takers (List.filter o.idle (List.cons 1 (List.cons 2 List.nil))).length →\n          Eq q.offers.length (ite (Eq (o.idle 3) Bool.true) 1 0) →\n            Or (Eq q.buffered List.nil) (Eq q.takers 0) →\n              Or (Eq q.offers List.nil) (Eq q.buffered.length q.capacity) →\n                instLENat.le q.buffered.length q.capacity → Eq o.settled Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":11,"lemmas":3,"nearest":[]},"doc":"A tidy profile state within capacity one is spent: no offer pends, or the buffer is full. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.spent_one","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Effect4.Queue.Model.FirstProfile s →\n    Eq s.capacity (Option.some 1) →\n      Eq (Effect4.Queue.Model.tidy s) Bool.true →\n        Eq (Effect4.Queue.Model.within s) Bool.true →\n          Or (Eq s.offers List.nil) (Eq s.messages.length 1)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":3,"lemmas":0,"nearest":[]},"doc":"A model state's buffer within capacity one. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Ledger","name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.within_one","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":[],"statement":"∀ {s : Effect4.Queue.Model.State},\n  Eq s.capacity (Option.some 1) →\n    Eq (Effect4.Queue.Model.within s) Bool.true → instLENat.le s.messages.length 1","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1751,"lemmas":90,"nearest":["Test.Dogfood.Scenario.QueueWorkers.CleanupSource.releases","Test.Dogfood.Scenario.QueueWorkers.CleanupSource.registrations","Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","Effect4.Run.reached_history","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Cleanup preservation now uses proved source uniqueness and actual release custody.\nOnly the concrete log-writer history remains open.\nConsumer: `cleanup_boundary`, then the unchanged cleanup clause; no progress or order follows. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.Assertions","name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.cleanup_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history"],"statement":"∀ (total : Nat) (b : Effect4.Api.Built) (s : Effect4.Run) (c : Effect4.Api.Runner.Command),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.QueueWorkers.Assertions.Basis b s →\n      Test.Dogfood.Scenario.QueueWorkers.Assertions.Cleanup s.machine →\n        Eq (s.rowReads c) Bool.true →\n          Test.Dogfood.Scenario.QueueWorkers.Assertions.Cleanup (s.step c).machine","status":"modulo"},{"axioms":[],"broughtIn":{"definitions":1762,"lemmas":87,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Machine-to-model preservation for `held_within_fed` at an actual funded command boundary.\nIt needs the queue-cell writer census, admitted take replies and once-entered continuations.\nConsumer: `jobs_boundary`, then the first clause. It establishes no rest or progress claim. ","kind":"goal","module":"Test.Dogfood.Scenario.QueueWorkers.Assertions","name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step"],"statement":"∀ (total : Nat) (b : Effect4.Api.Built) (s : Effect4.Run) (c : Effect4.Api.Runner.Command),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.QueueWorkers.Assertions.Basis b s →\n      Test.Dogfood.Scenario.QueueWorkers.Assertions.Jobs s →\n        Eq (s.rowReads c) Bool.true → Test.Dogfood.Scenario.QueueWorkers.Assertions.Jobs (s.step c)","status":"goal"},{"axioms":[],"broughtIn":{"definitions":1643,"lemmas":84,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"The remaining cleanup writer obligation on the original actual history.\nEach observed identity spends a release start at its own source acquisition.\nConsumer: `cleanup_step`, then the unchanged `releases_once`; no progress or release order follows. ","kind":"goal","module":"Test.Dogfood.Scenario.QueueWorkers.Assertions","name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history"],"statement":"∀ (total compileFuel : Nat) (b : Effect4.Api.Built) (machine : Effect4.Program.NativeMachine),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    Effect4.Run.HistoryOf b compileFuel machine →\n      And\n        (∀ (value : Effect4.Machine.Val),\n          List.instMembership.mem (Test.Dogfood.Scenario.QueueWorkers.Assertions.log machine)\n              value →\n            Exists fun i =>\n              And (List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i)\n                (Eq value (Effect4.Store.Val.nat i)))\n        (∀ (i : Nat),\n          List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n            instLENat.le\n              (List.count (Effect4.Store.Val.nat i)\n                (Test.Dogfood.Scenario.QueueWorkers.Assertions.log machine))\n              (List.countP\n                (Effect4.Program.ReleaseTrace.releaseAt\n                  (Test.Dogfood.Scenario.QueueWorkers.Assertions.acquirePath i))\n                (machine.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann))))","status":"goal"},{"axioms":[],"broughtIn":{"definitions":1776,"lemmas":87,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Rest preservation for `fed_accounted` and `queue_settled` at an actual command boundary.\nIt needs committed delivery custody, interrupted withdrawal and queue wake-to-wait correspondence.\nConsumer: `rest_script`, then the two rest clauses. It establishes no fairness or liveness claim. ","kind":"goal","module":"Test.Dogfood.Scenario.QueueWorkers.Assertions","name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step"],"statement":"∀ (total : Nat) (b : Effect4.Api.Built) (s : Effect4.Run) (c : Effect4.Api.Runner.Command),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.QueueWorkers.Assertions.Basis b s →\n      Test.Dogfood.Scenario.QueueWorkers.Assertions.Jobs s →\n        Test.Dogfood.Scenario.QueueWorkers.Assertions.Rest s →\n          Eq (s.rowReads c) Bool.true →\n            Test.Dogfood.Scenario.QueueWorkers.Assertions.Rest (s.step c)","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1855,"lemmas":782,"nearest":["Test.Dogfood.Scenario.Programs.queue_built_program","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.mem_addresses_iff","Effect4.Program.Node.at_append","Effect4.Scope.closeOrder_eq","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.ControlWeights.replace_sum_le_omitted","Effect4.Machine.Lift.driveState_lift"]},"doc":"The original queue history spends each actual source opportunity at most once. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource","name":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource.registrations","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total compileFuel : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    ∀ (machine : Effect4.Program.NativeMachine),\n      Effect4.Run.HistoryOf b compileFuel machine →\n        ∀ (i : Nat),\n          List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n            instLENat.le\n              (List.countP\n                (Effect4.Program.ReleaseTrace.registeredAt\n                  (Test.Dogfood.Scenario.Programs.queueAcquire i))\n                (machine.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)))\n              1","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1681,"lemmas":88,"nearest":["Test.Dogfood.Scenario.Programs.queue_built_program","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Program.ReleaseCustody.Execution.history","Effect4.Program.ReleaseCustody.Control.Funded.read"]},"doc":"Every actual release start spends its acquisition's retained registration credit. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource","name":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource.releases","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total compileFuel : Nat) (b : Effect4.Api.Built),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.QueueWorkers.crew total)) (Except.ok b) →\n    ∀ (machine : Effect4.Program.NativeMachine),\n      Effect4.Run.HistoryOf b compileFuel machine →\n        ∀ (i : Nat),\n          List.instMembership.mem (List.cons 1 (List.cons 2 (List.cons 3 List.nil))) i →\n            instLENat.le\n              (List.countP\n                (Effect4.Program.ReleaseTrace.releaseAt\n                  (Test.Dogfood.Scenario.Programs.queueAcquire i))\n                (machine.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)))\n              (List.countP\n                (Effect4.Program.ReleaseTrace.registeredAt\n                  (Test.Dogfood.Scenario.Programs.queueAcquire i))\n                (machine.trace\n                  (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n                    Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n                  (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)\n                  (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                    Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                    Effect4.Machine.Ann)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1875,"lemmas":148,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.accounted_of_ledger","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq","Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Run.reached_history","Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","Test.Dogfood.Scenario.Programs.queue_acquisition_sites","Test.Dogfood.Scenario.Programs.queue_built_program"]},"doc":"**Each fed job is held, but for one job of a feeder that is gone.** Under every script of\nhost acts, where the run is funded and at rest, the fed jobs are no more than the held ones. They\nmay be one more where the feeder's connection is released. With `held_within_fed` that is the\nexact account. A take that commits keeps its job when its worker is cancelled. A request that is\nwithdrawn consumes nothing. An accepted offer stays accepted. The one job that may be missing is\nthe job of a pending offer that an interruption withdrew.\n\nIt is an instance of the proposed claims `waiting-request-obligation-preserved` (R10 to R12) and\n`queue-expansion-agrees` (R10) on the program `crew`. It would follow from the three things of\n`held_within_fed` and from two more.\n\n4. A request's end is one of two. A take commits in its own step, or its interrupted wait runs\n   its withdrawal step before its fiber exits, and the withdrawal consumes nothing. An offer is\n   accepted by a step, or its interrupted wait withdraws what is still pending (decisions row\n   222).\n5. At rest no worker stands between its take's commit and its note. The commit and the note run\n   in one task, and no interruption is taken between them, because the caller holds no mask.\n\nReach: the program `crew`, whose callers hold no mask. Scripts of host acts, every command\nbudget, under `funded` and `atRest`. It does not establish that a fed job is ever assigned or\nfinished, and it says nothing of a state that is not at rest. Under a masked take it fails: a red\ncontrol. Consumer: `queueWorkers`. Its controls are finite runs, and the seat's receipt records a\nbounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers","name":"Test.Dogfood.Scenario.QueueWorkers.fed_accounted","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step"],"statement":"Test.Dogfood.Scenario.QueueWorkers.FedAccounted","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1874,"lemmas":144,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.heldWithin_of_ledger","Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq","Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Run.reached_history","Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","Test.Dogfood.Scenario.Programs.queue_acquisition_sites","Test.Dogfood.Scenario.Programs.queue_built_program"]},"doc":"**No job is held more often than the host fed it.** Under every script of a funded run, each\njob stands among the held jobs at most as often as among the fed ones. The held jobs are the\nbuffered ones, the jobs of the pending offers, the assigned ones, and the job that the root's\npoll took. So the queue and the workers duplicate no job and invent none: a take delivers its\njob to one worker, once.\n\nIt is an instance of the proposed claims `queue-expansion-agrees` (R10) and\n`waiting-request-obligation-preserved` (R10 to R12) on the program `crew`. It would follow from\nthree things.\n\n1. In a funded run each step of the queue's cell starts at a cell that encodes a state of the\n   first profile, for a request that keeps `Requested`. The attempt laws then give the model's\n   reply and the model's next state (`take_attempt`, `offer_attempt`, `poll_attempt` and the\n   two withdrawals, `src/Effect4/Laws/Library/Queue/Ops.lean`).\n2. No other step writes the queue's cell, and only a worker's note writes `assigned`.\n3. A take that exits with a job enters its caller's continuation once with that job.\n\nReach: the program `crew`, every script of the driver's alphabet with its raw rows, every command\nbudget at the battery's compile budget, under `funded`. It is safety. It does not establish that\na fed job is ever assigned, the order of two deliveries, fairness, or anything of another client.\nConsumer: the scenario's claim `queueWorkers`. Its controls are finite runs, and the seat's\nreceipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers","name":"Test.Dogfood.Scenario.QueueWorkers.held_within_fed","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step"],"statement":"Test.Dogfood.Scenario.QueueWorkers.HeldWithinFed","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1840,"lemmas":87,"nearest":["Test.Dogfood.Scenario.QueueWorkers.releases_once","Test.Dogfood.Scenario.QueueWorkers.queue_settled","Test.Dogfood.Scenario.QueueWorkers.fed_accounted","Test.Dogfood.Scenario.QueueWorkers.held_within_fed","Effect4.Run.control_retires","Effect4.Run.applied_selects","Test.Dogfood.Scenario.receipt_inert","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The queue-workers scenario's claim.** A reply receipt does not advance the machine. A\nreply application consumes the selected call only. A control retires the held calls whose guard\nit removed. No job is held more often than the host fed it. Each fed job is held, but for one\njob of a feeder that is gone. At rest the queue is settled. No connection is released twice. The\nfirst three are proved for every run and every session. The other four are planned goals, so\nthis theorem is proved modulo them. It does not establish the Queue's law of a whole run,\nfairness, starvation freedom or liveness. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers","name":"Test.Dogfood.Scenario.QueueWorkers.queueWorkers","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step"],"statement":"And Test.Dogfood.Scenario.ReceiptInert\n  (And Effect4.Run.AppliedSelects\n    (And Effect4.Run.ControlRetires\n      (And Test.Dogfood.Scenario.QueueWorkers.HeldWithinFed\n        (And Test.Dogfood.Scenario.QueueWorkers.FedAccounted\n          (And Test.Dogfood.Scenario.QueueWorkers.QueueSettled\n            Test.Dogfood.Scenario.QueueWorkers.ReleasesOnce)))))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1875,"lemmas":148,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_ledger","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq","Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Run.reached_history","Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","Test.Dogfood.Scenario.Programs.queue_acquisition_sites","Test.Dogfood.Scenario.Programs.queue_built_program"]},"doc":"**At rest the queue is settled.** Under every script of host acts, where the run is funded\nand at rest, the observation satisfies `Observation.settled`. The cell has the first profile's\nshape. The waiting takers are the idle workers, and an offer pends exactly where the feeder is\nidle. No job is buffered while a taker waits, and an offer pends only at a full buffer.\n\nIt is an instance of the proposed claim `wait-registration-no-gap` (R12) with the Queue's\nprofile, and of the delivery clause of `waiting-request-obligation-preserved`, on the program\n`crew`. It would follow from the first, second and fourth things of the goals above, and from\ntwo more.\n\n6. Each posted helper runs once. It resolves its hint, and the request that awaits the hint\n   runs its next attempt inside the helper's task (decisions rows 238 and 240). So at rest no\n   posted signal is outstanding.\n7. The model's run invariant holds along the run's steps: the first profile, the buffer's\n   bound, and `quiet` at the requests that were signalled (`first_run_inv`,\n   `src/Effect4/Laws/Library/Queue/Invariant.lean`, proved for the model alone).\n\nReach: as `fed_accounted`. Its first part is the premise of the attempt laws, read at the run's\nend. It is an invariant at rest, and an invariant is not progress. It does not establish that a\nwaiting worker ever takes, the order of two takers, fairness or starvation freedom. The cell is\nread up to its handles: the statement does not say which taker is the earliest. Consumer:\n`queueWorkers`. Its controls are finite runs, and the seat's receipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers","name":"Test.Dogfood.Scenario.QueueWorkers.queue_settled","placement":{"concept":"reactive-scheduling","requirement":"R12"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step"],"statement":"Test.Dogfood.Scenario.QueueWorkers.QueueSettled","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1855,"lemmas":136,"nearest":["Test.Dogfood.Scenario.QueueWorkers.Assertions.cleanup_step","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Run.reached_history","Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","Test.Dogfood.Scenario.Programs.queue_acquisition_sites","Test.Dogfood.Scenario.Programs.queue_built_program"]},"doc":"**Each registration cleans up at most once**, on the crew over the queue. Under every script\nof a funded run, the `released` cell holds no connection twice. It is the first scenario's\nclause on this program (`Test/Dogfood/Scenario/Workers.lean`). Here an interrupted worker runs\nits take's withdrawal before its scope's release, and the feeder its offer's.\n\nIt is an instance of R11's first whole-run clause, \"at most once per registration, counted by\nidentity\", on the program `crew`. It would follow from that clause for the crew's three scopes\n(`Effect4.Scope.close_twice`, `src/Effect4/Machine/Scope.lean`, is the scope's own law). It\nneeds nothing of the Queue beyond a frame fact: a withdrawal writes the queue's cell and no\nscope.\n\nReach: the program `crew`, every script of the driver's alphabet, every command budget, under\n`funded`. It does not establish the order of the releases, that a release runs, or the clause\nfor another program. Consumer: `queueWorkers`. Its controls are finite runs, and the seat's\nreceipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.QueueWorkers","name":"Test.Dogfood.Scenario.QueueWorkers.releases_once","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history"],"statement":"Test.Dogfood.Scenario.QueueWorkers.ReleasesOnce","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":467,"lemmas":77,"nearest":[]},"doc":"**The routing tree reaches the repository only past the token** (proved). In\nthe request's call tree, under any tape that the row columns admit, a wait at the repository row\nfollows a first answer that is the configuration with the request's token. Placement: concept\n`context-requirements`, R5; consumer `Routing.unauthorized_calls_nothing`. It reads the tree, not\na run: `held_in_tree` carries a run to it. ","kind":"theorem","module":"Test.Dogfood.Scenario.Routing.Calls","name":"Test.Dogfood.Scenario.Routing.Calls.tree_needs_token","placement":{"concept":"context-requirements","requirement":"R5"},"restsOn":[],"statement":"Test.Dogfood.Scenario.Routing.Calls.TreeNeedsToken","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1592,"lemmas":96,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**An infrastructure failure escapes the business handlers.** On the authorized path, a\nrepository failure whose tag is neither business tag reaches the root unchanged. Reach: p2's\nhandler, the script `failing`, every user id, every tag but `NotFound` and `Unauthorized`, every\nmessage, the default budgets. It does not establish the same for another script. It does not\nhold for a failure that wears a business tag: the row's error column admits one, and the handler\nthen routes it as the business failure (a red control). Concept `translation-simulation`: the\nstatement is the handler form's behaviour, R10's \"one behaviour law\" for `catchTag`, on one\nprogram. Consumer: the routing scenario. Its controls are finite runs. ","kind":"theorem","module":"Test.Dogfood.Scenario.Routing","name":"Test.Dogfood.Scenario.Routing.infrastructure_escapes","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":[],"statement":"Test.Dogfood.Scenario.Routing.InfrastructureEscapes","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1584,"lemmas":85,"nearest":["Test.Dogfood.Scenario.Routing.unauthorized_calls_nothing","Test.Dogfood.Scenario.Routing.infrastructure_escapes","Test.Dogfood.Scenario.Routing.tagIs_pair","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The routing scenario's claim.** The handler's test is exact on the pair spelling. An\ninfrastructure failure escapes the business handlers. An unauthorized request makes no call of\nthe repository. The first is proved, and the other two are planned goals, so this theorem is\nproved modulo them. The record's associated law is a theorem of the law graph: a stored\nsuccessful reply fits its row (`Effect4.Api.HostSession.submit_success_prepared_fits`). This\ntheorem does not use that law. It does not establish a code-valued service, a layer's lowering,\nor reply admission beyond that law. ","kind":"theorem","module":"Test.Dogfood.Scenario.Routing","name":"Test.Dogfood.Scenario.Routing.routing","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":["Effect4.Run.CallTree.request_leads"],"statement":"And\n  (∀ (tag other : String) (message : Effect4.Machine.Val),\n    Eq\n      (Effect4.Program.NativeAtom.tagIs.eval\n        (List.cons (Effect4.Store.Val.str tag)\n          (List.cons\n            (Effect4.Store.Val.list\n              (List.cons (Effect4.Store.Val.str other) (List.cons message List.nil)))\n            List.nil)))\n      (Option.some (Effect4.Store.Val.bool (instBEqOfDecidableEq.beq other tag))))\n  (And Test.Dogfood.Scenario.Routing.InfrastructureEscapes\n    Test.Dogfood.Scenario.Routing.UnauthorizedCallsNothing)","status":"modulo"},{"axioms":["propext"],"broughtIn":{"definitions":93,"lemmas":8,"nearest":[]},"doc":"**The handler's test is exact on the pair spelling.** `tagIs` answers true on a failure\n`[tag', message]` exactly when `tag'` is the handler's tag. Reach: every tag and every pair value\n(DB-15's spelling of a tagged failure). It does not establish what `catchIf` does with the\nanswer: the handler's routing on the machine is shown by the finite runs. A record payload is\n`NativeAtom.tagHit_record`'s (`src/Effect4/Laws/Program/RecordTag.lean`). Consumer: the routing\nscenario's clause \"exact\". ","kind":"theorem","module":"Test.Dogfood.Scenario.Routing","name":"Test.Dogfood.Scenario.Routing.tagIs_pair","placement":{"concept":"residual-program-typing","requirement":"R10"},"restsOn":[],"statement":"∀ (tag other : String) (message : Effect4.Machine.Val),\n  Eq\n    (Effect4.Program.NativeAtom.tagIs.eval\n      (List.cons (Effect4.Store.Val.str tag)\n        (List.cons\n          (Effect4.Store.Val.list\n            (List.cons (Effect4.Store.Val.str other) (List.cons message List.nil)))\n          List.nil)))\n    (Option.some (Effect4.Store.Val.bool (instBEqOfDecidableEq.beq other tag)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1603,"lemmas":103,"nearest":["Test.Dogfood.Scenario.Routing.Calls.tree_needs_token","Effect4.Run.CallTree.bound_in_tree","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**An unauthorized request makes no call of the repository.** Under every script, if no reply\nin the journal carries a configuration whose token is the request's, the host holds no\nrepository call. Reach: p2's handler, every request, every script of the driver's alphabet, the\ndefault budgets. It does not establish what an authorized request calls, and it says nothing of\na handler that looks the caller up first (a red control). Concept `context-requirements`: the\nrepository is the service the handler may use only after the check, R5. Consumer: the routing\nscenario. Its controls are finite runs, and a bounded search over every script of 14 moves up to\nlength 5 found no repository call without the token: a finite probe, in the seat's receipt. ","kind":"theorem","module":"Test.Dogfood.Scenario.Routing","name":"Test.Dogfood.Scenario.Routing.unauthorized_calls_nothing","placement":{"concept":"context-requirements","requirement":"R5"},"restsOn":["Effect4.Run.CallTree.request_leads"],"statement":"Test.Dogfood.Scenario.Routing.UnauthorizedCallsNothing","status":"modulo"},{"axioms":[],"broughtIn":{"definitions":1599,"lemmas":86,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**Cleanup keeps the committed count.** Under every script the observation satisfies\n`Observation.cleanupKeeps`. Each attempt that ended stands once in the cleanup log, with the\ncount its finalizer saw: its own number. So an interruption by the timer takes no committed\ncount back. Reach: the program `fetch`, every script of the driver's alphabet, the battery's\nbudgets. It is a statement about the log and the count cell: it counts writes by identity. It\ndoes not count a finalizer's invocations, and it does not establish that a finalizer runs. It\nstates no cut inside a masked region: the attempt has none. Concept\n`scope-lifetime-finalization`, R11. Consumer: the timeout scenario. Its controls are finite\nruns, and the seat's receipt records a bounded search. ","kind":"goal","module":"Test.Dogfood.Scenario.Timeout","name":"Test.Dogfood.Scenario.Timeout.cleanup_keeps","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.Timeout.cleanup_keeps"],"statement":"Test.Dogfood.Scenario.Timeout.CleanupKeeps","status":"goal"},{"axioms":[],"broughtIn":{"definitions":1601,"lemmas":86,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**Only returned declared failures retry.** Each later attempt follows a completed timeout\nform that returns a declared typed failure. The client starts at most four attempts.\nReach: `fetch`, the battery's budgets, and every plain script.\nThe observation keeps host reply application separate from the form's complete returned exit.\nThe selected entrant identifies its attempt or timer role at the actual exit observer.\nThe statement establishes no fairness, physical deadline, or general law of either form.\nConcept: translation-simulation, R10. Consumer: the timeout scenario. ","kind":"goal","module":"Test.Dogfood.Scenario.Timeout","name":"Test.Dogfood.Scenario.Timeout.retries_declared","placement":{"concept":"translation-simulation","requirement":"R10"},"restsOn":["Test.Dogfood.Scenario.Timeout.retries_declared"],"statement":"Test.Dogfood.Scenario.Timeout.RetriesDeclared","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1603,"lemmas":86,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**A reply of a timed-out attempt never applies to a later attempt.** Under every script the\nobservation satisfies `Observation.staleNeverApplies`. A retired call has no reply application,\nno key has two receipts or two applications, and the root answers only the body of a reply that\nwas applied at its own call. Reach: the program `fetch`, every script of the driver's alphabet\nwith its raw rows, the battery's budgets. The key's identity carries it: a later attempt parks\nunder another fiber and another guard token. It does not establish reply admission at the\napplication, or the retirement edge of the host protocol: both are open parts of R6. It says\nnothing of a host that answers the second call with the first call's body by its own choice.\nConcept `host-session-protocol`, R6. Consumer: the timeout scenario. Its controls are finite\nruns, and the seat's receipt records a bounded search. ","kind":"theorem","module":"Test.Dogfood.Scenario.Timeout","name":"Test.Dogfood.Scenario.Timeout.stale_never_applies","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"Test.Dogfood.Scenario.Timeout.StaleNeverApplies","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1615,"lemmas":86,"nearest":["Test.Dogfood.Scenario.Timeout.cleanup_keeps","Test.Dogfood.Scenario.Timeout.stale_never_applies","Test.Dogfood.Scenario.Timeout.retries_declared","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The timeout scenario's claim.** Only the declared failures retry. A reply of a timed-out\nattempt never applies to a later attempt. Cleanup keeps the committed count. The retry and cleanup clauses remain\nplanned goals, so this theorem is proved modulo them. It does not establish a Cache contract,\ndeadline fairness or a physical clock. ","kind":"theorem","module":"Test.Dogfood.Scenario.Timeout","name":"Test.Dogfood.Scenario.Timeout.timeout","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":["Test.Dogfood.Scenario.Timeout.cleanup_keeps","Test.Dogfood.Scenario.Timeout.retries_declared"],"statement":"And Test.Dogfood.Scenario.Timeout.RetriesDeclared\n  (And Test.Dogfood.Scenario.Timeout.StaleNeverApplies Test.Dogfood.Scenario.Timeout.CleanupKeeps)","status":"modulo"},{"axioms":[],"broughtIn":{"definitions":1465,"lemmas":83,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Store preservation obligation of `releases_once`.\nReach: the second allocated reference in actual crew histories at every command boundary.\nIt needs the cell's writer census and the value captured at each acquisition source.\nIt proves no host behavior; consumer: `step` and then `history`. ","kind":"goal","module":"Test.Dogfood.Scenario.Workers.Assertions","name":"Test.Dogfood.Scenario.Workers.Assertions.logs_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.Workers.Assertions.logs_step"],"statement":"∀ (total cf : Nat) (b : Effect4.Api.Built) (m : Effect4.Program.NativeMachine)\n  (x : Prod Nat Effect4.Program.NativeDecision),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.Workers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.Workers.Assertions.Holds b cf m →\n      Effect4.Run.Accepted b.table (Effect4.Api.HostSession.callTable b.program b.table) m x.snd →\n        Test.Dogfood.Scenario.Workers.Assertions.LogDebits (Effect4.Run.stepBy b m x)","status":"goal"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1689,"lemmas":787,"nearest":["Test.Dogfood.Scenario.Programs.workers_built_program","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Machine.ControlWeights.replace_sum","Effect4.Program.mem_addresses_iff","Effect4.Program.Node.at_append","Effect4.Scope.closeOrder_eq","Effect4.Program.Moves.evaluatePrim_producer","Effect4.Machine.ControlWeights.replace_sum_le_omitted","Effect4.Machine.Lift.driveState_lift"]},"doc":"Registration preservation obligation of `releases_once`.\nReach: actual crew histories, all budgets, controls and admitted host answers.\nIt needs the static acquisition placement and the control-source provenance invariant.\nIt proves no release progress; consumer: `step` and then `history`. ","kind":"theorem","module":"Test.Dogfood.Scenario.Workers.Assertions","name":"Test.Dogfood.Scenario.Workers.Assertions.registrations_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total cf : Nat) (b : Effect4.Api.Built) (m : Effect4.Program.NativeMachine)\n  (x : Prod Nat Effect4.Program.NativeDecision),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.Workers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.Workers.Assertions.Holds b cf m →\n      Effect4.Run.Accepted b.table (Effect4.Api.HostSession.callTable b.program b.table) m x.snd →\n        Test.Dogfood.Scenario.Workers.Assertions.Registrations (Effect4.Run.stepBy b m x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1516,"lemmas":93,"nearest":["Test.Dogfood.Scenario.Programs.workers_built_program","Effect4.Program.Formation.checkInput_eq_none_iff","Effect4.Program.ReleaseCustody.Execution.history","Effect4.Program.ReleaseCustody.Control.Funded.read"]},"doc":"Release preservation obligation of `releases_once`.\nReach: actual crew histories, including incomplete release commands and interruption.\nThe concrete custody history supplies its command and outside-loop obligations.\nIt proves no release order; consumer: `step` and then `history`.\nThe custody assertion is proved on actual sequential, race-free source histories. ","kind":"theorem","module":"Test.Dogfood.Scenario.Workers.Assertions","name":"Test.Dogfood.Scenario.Workers.Assertions.releases_step","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":[],"statement":"∀ (total cf : Nat) (b : Effect4.Api.Built) (m : Effect4.Program.NativeMachine)\n  (x : Prod Nat Effect4.Program.NativeDecision),\n  Eq (Effect4.Api.Author.build (Test.Dogfood.Scenario.Workers.crew total)) (Except.ok b) →\n    Test.Dogfood.Scenario.Workers.Assertions.Holds b cf m →\n      Effect4.Run.Accepted b.table (Effect4.Api.HostSession.callTable b.program b.table) m x.snd →\n        Test.Dogfood.Scenario.Workers.Assertions.ReleaseDebits (Effect4.Run.stepBy b m x)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1662,"lemmas":107,"nearest":["Test.Dogfood.Scenario.Workers.Assertions.logs_step","Test.Dogfood.Scenario.Workers.Assertions.releases_step","Test.Dogfood.Scenario.Workers.Assertions.registrations_step","Effect4.Program.Formation.checkInput_eq_none_iff","Test.Dogfood.Scenario.Programs.crew_acquire_once_placed","Test.Dogfood.Scenario.Programs.workers_acquisition_sites","Test.Dogfood.Scenario.Programs.workers_built_program","Test.Dogfood.Scenario.history"]},"doc":"**Each registration cleans up at most once**, on the crew. Reach: the program `crew`, every\nscript of the driver's alphabet (every control decision, reply receipt, reply application and\nraw row) and every budget. It is R11's whole-run clause \"at most once per registration, counted\nby identity\", stated on one program and one observation. It does not establish the clause for\nanother program, the order of the releases, or that a release runs at all. The scope's own law is\nproved (`Effect4.Scope.close_twice`, `src/Effect4/Machine/Scope.lean`). Its lift to a whole run\nis open (`docs/core/system-map.md` §8, R11). Consumer: the workers scenario. Its controls are\nfinite runs. A bounded search over every script of 23 moves up to length 4, from three states,\nfound no repeated identity: a finite probe, recorded in the seat's receipt. ","kind":"theorem","module":"Test.Dogfood.Scenario.Workers","name":"Test.Dogfood.Scenario.Workers.releases_once","placement":{"concept":"scope-lifetime-finalization","requirement":"R11"},"restsOn":["Test.Dogfood.Scenario.Workers.Assertions.logs_step"],"statement":"Test.Dogfood.Scenario.Workers.ReleasesOnce","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1606,"lemmas":85,"nearest":["Test.Dogfood.Scenario.Workers.releases_once","Effect4.Run.control_retires","Effect4.Run.applied_selects","Test.Dogfood.Scenario.receipt_inert","Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"**The workers scenario's claim.** A reply receipt does not advance the machine. A reply\napplication consumes the selected call only. A control retires the held calls whose guard it\nremoved. The crew releases no connection twice. The first three are proved for every run and\nevery session. The fourth is the planned goal `releases_once`, so this theorem is proved modulo\nit. It does not establish Queue backpressure or fairness, reply admission at the application, or\nthe retirement edge of the host protocol (R6). ","kind":"theorem","module":"Test.Dogfood.Scenario.Workers","name":"Test.Dogfood.Scenario.Workers.workers","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":["Test.Dogfood.Scenario.Workers.Assertions.logs_step"],"statement":"And Test.Dogfood.Scenario.ReceiptInert\n  (And Effect4.Run.AppliedSelects\n    (And Effect4.Run.ControlRetires Test.Dogfood.Scenario.Workers.ReleasesOnce))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1360,"lemmas":98,"nearest":["Effect4.Run.reached_history"]},"doc":"A script from an opened program has an admitted machine history. ","kind":"theorem","module":"Test.Dogfood.Scenario.Frame","name":"Test.Dogfood.Scenario.history","placement":{"concept":"host-session-protocol","requirement":"R13"},"restsOn":[],"statement":"∀ (b : Effect4.Api.Built) (id : String) (budget : Effect4.Api.Budget) (profile : String)\n  (moves : List Test.Dogfood.Scenario.Move),\n  Effect4.Run.HistoryOf b budget.compileFuel\n    (Test.Dogfood.Scenario.play (Effect4.Run.open b id budget profile) moves).machine","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1003,"lemmas":74,"nearest":[]},"doc":"Every script carries an invariant that all session rows keep. ","kind":"theorem","module":"Test.Dogfood.Scenario.Frame","name":"Test.Dogfood.Scenario.keeps","placement":{"concept":"host-session-protocol","requirement":"R13"},"restsOn":[],"statement":"∀ {I : Effect4.Run → Prop},\n  Effect4.Run.Keeps (fun x x_1 => True) I →\n    ∀ (s : Effect4.Run) (moves : List Test.Dogfood.Scenario.Move),\n      I s → I (Test.Dogfood.Scenario.play s moves)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1002,"lemmas":77,"nearest":[]},"doc":"**A reply receipt does not advance the machine.** When the host holds a call (`hold`) or the\nsession receives a reply (`receive`), four readings stay as they were: the machine, the count of\napplied replies, the consumed calls and the retired calls. The session may accept the rows or\nrefuse them. Reach: any run and any selector, live or not. It does not establish that the session\naccepts a reply receipt, and it says nothing of the reply application, a separate ordered step.\nConsumer: the workers scenario's clause \"receipt\". It lifts `submit_machine`\n(`src/Effect4/Laws/Api/HostSession.lean`) to the driver. ","kind":"theorem","module":"Test.Dogfood.Scenario","name":"Test.Dogfood.Scenario.receipt_inert","placement":{"concept":"host-session-protocol","requirement":"R6"},"restsOn":[],"statement":"Test.Dogfood.Scenario.ReceiptInert","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1356,"lemmas":98,"nearest":["Effect4.Run.journal_replays"]},"doc":"**A script's run replays from its journal.** The run that a script reaches from an opened\nprogram is reached again by playing the journal it recorded. The journal holds rows only, so the\nreplay resolves no selector and calls no fixture. Reach: any built program, name, budget and\nscript. It does not establish that two hosts choose the same rows, and it says nothing of a\nlowered run. Consumer: every scenario of `Test/Dogfood/Scenario/`. It is `journal_replays`\n(`src/Effect4/Laws/Run.lean`, R13's node) on the driver's scripts. ","kind":"theorem","module":"Test.Dogfood.Scenario","name":"Test.Dogfood.Scenario.replays","placement":{"concept":"host-session-protocol","requirement":"R13"},"restsOn":[],"statement":"∀ (b : Effect4.Api.Built) (id : String) (budget : Effect4.Api.Budget) (profile : String)\n  (moves : List Test.Dogfood.Scenario.Move),\n  Eq\n    ((Effect4.Run.open b id budget profile).play\n      (Test.Dogfood.Scenario.play (Effect4.Run.open b id budget profile) moves).journal)\n    (Test.Dogfood.Scenario.play (Effect4.Run.open b id budget profile) moves)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A bind on a refusal is the refusal. A step of `annotate-table`. Its consumer is the case of\na statement list in `Annotate.checkStmts_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_error_bind","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {ε α β : Type} (e : ε) (f : α → Except ε β),\n  Eq (Except.instMonad.bind (Except.error e) f) (Except.error e)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"A bind on an answer is the continuation at it. A step of `annotate-table`. Its consumers are\nthe cases of `select` and of a statement list in `Annotate.check_eq` and its siblings. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_ok_bind","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {ε α β : Type} (a : α) (f : α → Except ε β), Eq (Except.instMonad.bind (Except.ok a) f) (f a)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"`pure` is an answer. A step of `annotate-table`. Its consumer is the case of a statement\nlist in `Annotate.checkStmts_eq`. ","kind":"theorem","module":"Effect4.Laws.Program.Typing.Annotate","name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_pure","placement":{"concept":"initial-algebras-folds","requirement":"R14"},"restsOn":[],"statement":"∀ {ε α : Type} (a : α), Eq (Except.instMonad.pure a) (Except.ok a)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":118,"lemmas":55,"nearest":[]},"doc":"`instantiated-formation`: a successful row use retains the actual bindings, the request's\nand then the binder term's (`bindTerm`), and strict formation of every substituted column.\nTyping consumes this through `rowTy`. This is a static property; it makes no host reply or\nexecution claim. ","kind":"theorem","module":"Effect4.Laws.Program.Template","name":"Effect4.Program.rowTy_instantiated_formed","placement":null,"restsOn":[],"statement":"∀ {row : Effect4.Program.Row} {request : Effect4.Program.Ty} {use : Option Effect4.Program.TermUse}\n  {ty : Effect4.Program.EffTy},\n  Eq (Effect4.Program.rowTy row request use) (Option.some ty) →\n    Exists fun σ =>\n      Exists fun bindings =>\n        And\n          (Eq (Effect4.Program.Bounds.matchB List.nil row.request.normalize request.normalize)\n            (Option.some σ))\n          (And (Eq (Effect4.Program.bindTerm σ use) (Except.ok bindings))\n            (Effect4.Program.Formation.Formed\n              (Effect4.Program.Formation.instantiatedSites row bindings)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":245,"lemmas":79,"nearest":[]},"doc":"Membership is monotone under the host world order. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_mono","placement":null,"restsOn":[],"statement":"∀ {w w' : Effect4.Program.Typed.World},\n  w.leHost w' →\n    ∀ {ty : Effect4.Program.Ty} {v : Effect4.Machine.Val},\n      Effect4.Program.Typed.Fits w v ty → Effect4.Program.Typed.Fits w' v ty","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":210,"lemmas":54,"nearest":[]},"doc":"**A member of `Ty.scope` is a present scope's handle** (row 156): the handle former's scope arm\nreads the scope store, and no other arm accepts the scope target. The posts that answer a scope\nhandle state `Fits w' ans Ty.scope`; their consumers read the scope back here. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Membership","name":"Effect4.Program.Typed.fits_scope_inv","placement":null,"restsOn":[],"statement":"∀ {w : Effect4.Program.Typed.World} {v : Effect4.Machine.Val},\n  Effect4.Program.Typed.Fits w v Effect4.Program.Ty.scope →\n    Exists fun sc =>\n      And (Eq v (Effect4.Machine.Val.scopeHandle sc)) (Effect4.Program.Typed.ScopeLive w sc)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":695,"lemmas":76,"nearest":["Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.guardBind_typed"]},"doc":"**The `seqR` compatibility lemma.** A first program typed at `mid`, a value continuation\ntyped at `ty` at every later world on every value that fits `mid`'s answer column, and equal\nerror columns: the sequence `denoteR` builds is typed at `ty`. A failure of the first program\nskips the continuation and must fit `ty`'s error column, which the equal columns give. The\ninstance of `seqGuard_typed` at `seqR`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.seq_typed","placement":{"concept":"residual-program-typing","requirement":null},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram}\n  {k : Effect4.Machine.Val → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    (∀ (w' : Effect4.Program.Typed.World),\n        w.leHost w' →\n          ∀ (v : Effect4.Machine.Val),\n            Effect4.Program.Typed.Fits w' v mid.answer →\n              Effect4.Program.Typed.TypedProg root w' ty (k v)) →\n      Eq mid.error ty.error →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind\n            (Effect4.Program.Sched.guardR Effect4.Program.Sched.GuardKind.onSuccess a)\n            (Effect4.Program.Sched.seqR k))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":693,"lemmas":74,"nearest":[]},"doc":"**Closing keeps the type.** Closing a typed program with `unguard` is typed at the same\ntype: every leaf becomes a closing marker carrying the leaf's exit. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.close_typed","placement":{"concept":"residual-program-typing","requirement":null},"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {T : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w T a →\n    ∀ (g : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram),\n      Effect4.Program.Typed.TypedProg root w T\n        (Effects.Program.bind a fun ex =>\n          Effects.Program.vis (Sum.inr (Effect4.Program.Sched.FiberOp.unguard ex)) g)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":988,"lemmas":818,"nearest":["Effect4.Program.Typed.order_refl","Effect4.Program.Typed.fits_mono","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.deferredMake_extension","Effect4.Program.Typed.refMake_extension","Effect4.Program.Typed.syncRow_typed","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.Ty.subN_refl","Effect4.Program.optionTy_upper","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Program.Typed.order_trans"]},"doc":"**A typed straight program's meaning has its type.** From the empty stores, the exit is a\nvalid value of the answer type or a cause inside the error type. ","kind":"theorem","module":"Effect4.Laws.Program.MeaningSound","name":"Effect4.Program.Denote.meaning_typed","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (t : Effect4.Program.EffTy),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    Eq (Effect4.Program.effTy Effect4.Program.nativeSignature List.nil e) (Option.some t) →\n      Effect4.Program.Denote.ExitHasTy t.answer t.error\n        (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).snd\n        (Effect4.Program.Denote.meaning e List.nil Effect4.Machine.Stores.empty).fst","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1014,"lemmas":905,"nearest":["Effect4.Program.Typed.provideLayerArm","Effect4.Program.Node.at_child","Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.fiberTy_upper","Effect4.Program.scopeParams_child","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Ty.subN_trans","Effect4.Program.Bounds.matchB_sound","Effect4.Program.Typed.syncRow_typed","Effect4.Program.Signature.withParams_of_none","Effect4.Program.listOf_upper","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.invoke_arm","Effect4.Program.optionTy_upper","Effect4.Program.Signature.withParams_serviceTy","Effect4.Program.scopeParams_below","Effect4.Program.exitOf_upper","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.param_arm","Effect4.Program.Typed.call_arm"]},"doc":"**M5's fundamental property** (decisions rows 148 and 349, `denotesTyped`): at every source\nwhose layer references are well formed, a checked point denotes a program typed by the ambient\njudgment at every world whose service table is the source's and every row holding its requirement\nrow. The arms by induction on fuel (`childDenotes_upto`), the layer family's by\n`provideLayerArm`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.denotesTyped","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource), Effect4.Program.Typed.DenotesTyped root","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":976,"lemmas":549,"nearest":["Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.fits_subN","Effect4.Program.Ty.normalize_idem","Effect4.Program.Typed.order_trans","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.hom_eq_cata_ty","Effect4.Program.scopeParams_body","Effect4.Program.Signature.withParams_of_none"]},"doc":"**An invocation** (decisions row 328, goal G3; the arm of `denote-typed`): the counted step,\nthen the definition's body at its path, its one variable the request's value. The checker types\nthe invocation by the definition's declared row (`invoke_hasTy`), which the declaration's\nformation keeps closed: the request's value fits the declared request and the node's type is the\ndeclared columns (`rowTy_closed_some`). The body is typed at its point by the block's typing\n(`BodiesTyped`), one unit of fuel lighter (`Point.redirect`), and its type widens to the declared\ncolumns (`DefDecl.admits`). Its consumer is `perform_arm`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Denotation","name":"Effect4.Program.Typed.call_arm","placement":null,"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {p : Effect4.Program.Point} {ty : Effect4.Program.EffTy}\n  {available : Effect4.Machine.Env.Requirement} {k : Nat} {r : Effect4.Program.Term} {f : Nat},\n  Eq p.fuel (instHAdd.hAdd f 1) →\n    Eq ((Effect4.Program.Node.eff root.program).at_ p.path)\n        (Option.some\n          (Effect4.Program.Node.eff\n            (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.call k) r))) →\n      Effect4.Program.Typed.PointTyped root w p ty →\n        Eq w.serviceTy root.sig.serviceTy →\n          Effect4.Program.Typed.BodiesTyped root →\n            (∀ (c : Effect4.Program.NativeEff) (path : List Nat),\n                Eq ((Effect4.Program.Node.eff root.program).at_ path)\n                    (Option.some (Effect4.Program.Node.eff c)) →\n                  Effect4.Program.Typed.ChildDenotes root f c path) →\n              Effect4.Row.Subset ty.requires available →\n                Effect4.Program.Typed.AmbientProg root w available\n                  (Effect4.Program.Typed.AmbientPosition.result\n                    { fst := ty, snd := { fst := available, snd := available } }.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.fst\n                    { fst := ty, snd := { fst := available, snd := available } }.snd.snd)\n                  (Effect4.Program.Sched.denoteR root.program\n                    (Effect4.Program.Eff.perform (Effect4.Program.NativeOp.call k) r) p)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":534,"lemmas":58,"nearest":["Effect4.Program.Formation.checkInput_eq_none_iff"]},"doc":"Successful rebuilding retains the host setup and checks exactly the candidate. The\nreturned `Built.admitted` certificate is indexed by those program and table fields. ","kind":"theorem","module":"Effect4.Laws.Program.Author","name":"Effect4.Program.Authoring.rebuild_spec","placement":null,"restsOn":[],"statement":"∀ {before after : Effect4.Api.Built} {candidate : Effect4.Api.Program},\n  Eq (before.rebuild candidate) (Except.ok after) →\n    And (Eq after.program candidate)\n      (And (Eq after.table before.table) (Eq after.rowNames before.rowNames))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1015,"lemmas":906,"nearest":["Effect4.Program.Node.at_child","Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_normalize","Effect4.Program.fiberTy_upper","Effect4.Program.scopeParams_child","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Ty.subN_trans","Effect4.Program.Bounds.matchB_sound","Effect4.Program.Typed.syncRow_typed","Effect4.Program.Signature.withParams_of_none","Effect4.Program.listOf_upper","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.invoke_arm","Effect4.Program.optionTy_upper","Effect4.Program.Signature.withParams_serviceTy","Effect4.Program.scopeParams_below","Effect4.Program.exitOf_upper","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.param_arm","Effect4.Program.Typed.call_arm"]},"doc":"**M5 on the layer-free fragment**: a program none of whose nodes is a `provideLayer` satisfies\nthe fundamental property; the layer family's arm cannot be reached there\n(`provideLayerArm_of_layerFree`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.denotesTyped_of_layerFree","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource),\n  Effect4.Program.Typed.LayerFree root.program → Effect4.Program.Typed.DenotesTyped root","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1201,"lemmas":149,"nearest":["Effect4.Program.Typed.denotesTyped_of_layerFree","Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_complete","Effect4.Program.checkModule_sound","Effect4.Machine.Env.Context.satisfies_empty"]},"doc":"**The typed load on the layer-free fragment**: a checked program none of whose nodes is a\n`provideLayer` loads into `J` (`denotesTyped_of_layerFree`, then the load connector). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Finish","name":"Effect4.Program.Typed.loadsTyped_of_layerFree","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat),\n  Effect4.Program.Typed.LayerFree root.program →\n    Effect4.Program.Typed.LoadsTyped root rootTy fuel compileFuel","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":992,"lemmas":694,"nearest":["Effect4.Program.Typed.fits_subN","Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.fits_normalize","Effect4.Program.fiberTy_upper","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Ty.subN_trans","Effect4.Program.Bounds.matchB_sound","Effect4.Program.Typed.syncRow_typed","Effect4.Program.Signature.withParams_of_none","Effect4.Program.listOf_upper","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.fits_scope_inv"]},"doc":"**`ProvideLayerArm` holds at every source**: the hypothesis the assembly was conditional on. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.provideLayerArm","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource), Effect4.Program.Typed.ProvideLayerArm root","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1200,"lemmas":149,"nearest":["Effect4.Program.Typed.denotesTyped","Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_complete","Effect4.Program.checkModule_sound","Effect4.Machine.Env.Context.satisfies_empty"]},"doc":"**M5** (`loadsTyped`): a lawful, checked, closed source whose requirement row is\nempty loads into `J` at the initial world, at every fuel and compile budget. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.loadsTyped","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat), Effect4.Program.Typed.LoadsTyped root rootTy fuel compileFuel","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1198,"lemmas":148,"nearest":["Effect4.Program.Typed.denotesTyped","Effect4.Program.checkModule_eq_check","Conform.Effect4.Typing.check_complete","Effect4.Program.checkModule_sound","Effect4.Machine.Env.Context.satisfies_empty"]},"doc":"**The typed load for a checked closed program**: row 117's empty requirement row applies\nat the load. The source's lawful-signature premise is not read here. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.LayerArm","name":"Effect4.Program.Typed.load_typed","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (fuel compileFuel : Nat),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Exists fun w =>\n        Effect4.Program.Typed.MachineTyped root rootTy w\n          (Effect4.Program.Sched.loadR root.program fuel compileFuel)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":694,"lemmas":75,"nearest":[]},"doc":"**The guard compatibility lemma** (the general form of `seq_typed`, decisions row 148): a\nfirst program typed at `mid`, a continuation typed at `ty` at every later world on every exit the\nguard's arm takes and `mid` admits, and every exit the arm does not take admitted at `ty`: the\nguarded sequence is typed at `ty`. Every guard `denoteR` builds has this shape\n(`guardR kind a`, bound to a continuation); the body closes by `close_typed`. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.guardBind_typed","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {kind : Effect4.Program.Sched.GuardKind}\n  {a : Effect4.Program.Sched.RProgram} {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    (∀ (w' : Effect4.Program.Typed.World),\n        w.leHost w' →\n          ∀ (ex : Effect4.Machine.ExitV),\n            Eq (kind.hasExitArm ex) Bool.true →\n              Effect4.Program.Typed.ExitOk w' mid ex →\n                Effect4.Program.Typed.TypedProg root w' ty (K ex)) →\n      (∀ (w' : Effect4.Program.Typed.World),\n          w.leHost w' →\n            ∀ (ex : Effect4.Machine.ExitV),\n              Effect4.Program.Typed.ExitOk w' mid ex →\n                Eq (kind.hasExitArm ex) Bool.false → Effect4.Program.Typed.ExitOk w' ty ex) →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind (Effect4.Program.Sched.guardR kind a) K)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":692,"lemmas":74,"nearest":["Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.guardBind_typed"]},"doc":"**The `onFailure` shape** (`catchCause`, `catchIf`, `orDie`, a finalizer's cleanup): the\ncontinuation at every failure `mid` admits; a success skips it and must fit `ty`'s answer\ncolumn, below which `mid`'s is. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.catchGuard_typed","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {a : Effect4.Program.Sched.RProgram}\n  {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n  Effect4.Program.Typed.TypedProg root w mid a →\n    Eq (mid.answer.subN ty.answer) Bool.true →\n      (∀ (w' : Effect4.Program.Typed.World),\n          w.leHost w' →\n            ∀\n              (c :\n                Effect4.Cause Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                  Effect4.Machine.Ann),\n              Effect4.Program.Typed.ExitOk w' mid (Effect4.Exit.failure c) →\n                Effect4.Program.Typed.TypedProg root w' ty (K (Effect4.Exit.failure c))) →\n        Effect4.Program.Typed.TypedProg root w ty\n          (Effects.Program.bind\n            (Effect4.Program.Sched.guardR Effect4.Program.Sched.GuardKind.onFailure a) K)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":692,"lemmas":72,"nearest":["Effect4.Program.Typed.guardBind_typed"]},"doc":"**The `all` and `onExit` shapes** (`exit`, `matchCause`, a finalizer's boundary): a guard\nwhose arm takes every exit runs the continuation on every exit `mid` admits; nothing skips. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.allGuard_typed","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {mid ty : Effect4.Program.EffTy} {kind : Effect4.Program.Sched.GuardKind},\n  (∀ (ex : Effect4.Machine.ExitV), Eq (kind.hasExitArm ex) Bool.true) →\n    ∀ {a : Effect4.Program.Sched.RProgram}\n      {K : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram},\n      Effect4.Program.Typed.TypedProg root w mid a →\n        (∀ (w' : Effect4.Program.Typed.World),\n            w.leHost w' →\n              ∀ (ex : Effect4.Machine.ExitV),\n                Effect4.Program.Typed.ExitOk w' mid ex →\n                  Effect4.Program.Typed.TypedProg root w' ty (K ex)) →\n          Effect4.Program.Typed.TypedProg root w ty\n            (Effects.Program.bind (Effect4.Program.Sched.guardR kind a) K)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":722,"lemmas":91,"nearest":["Effect4.Program.Typed.fits_subN","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.catchGuard_typed","Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.guardBind_typed","Effect4.Program.Typed.allGuard_typed"]},"doc":"**The `onExit` shape** (`onExitR`, `DenoteR.lean`): the body typed at `b`, below the result\nin both columns, and the finalizer typed at `f` on every exit `b` admits, its error column below\nthe result's: the region is typed at the result. The guard's arm takes every exit\n(`allGuard_typed`); each runs the finalizer's boundary (`finalizer_typed`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Seq","name":"Effect4.Program.Typed.onExit_typed","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) {w : Effect4.Program.Typed.World}\n  {b f ty : Effect4.Program.EffTy} {body : Effect4.Program.Sched.RProgram}\n  {fin : Effect4.Machine.ExitV → Effect4.Program.Sched.RProgram} {flag : Bool},\n  Eq (b.answer.subN ty.answer) Bool.true →\n    Eq (b.error.subN ty.error) Bool.true →\n      Eq (f.error.subN ty.error) Bool.true →\n        Effect4.Program.Typed.TypedProg root w b body →\n          (∀ (w' : Effect4.Program.Typed.World),\n              w.leHost w' →\n                ∀ (ex : Effect4.Machine.ExitV),\n                  Effect4.Program.Typed.ExitOk w' b ex →\n                    Effect4.Program.Typed.TypedProg root w' f (fin ex)) →\n            Effect4.Program.Typed.TypedProg root w ty (Effect4.Program.Sched.onExitR body fin flag)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":15,"lemmas":1,"nearest":[]},"doc":"Closing an already-closed scope returns it without running a finalizer.\ncensus: scope.close-state-first ","kind":"theorem","module":"Effect4.Machine.Scope","name":"Effect4.Scope.close_idempotent","placement":null,"restsOn":[],"statement":"∀ {κ φ : Type u} {β : Type v} {ε δ ι α : Type u}\n  (run : φ → Effect4.Exit β ε δ ι α → Effect4.Exit Unit ε δ ι α)\n  (self : Effect4.Scope κ φ β ε δ ι α) (exit : Effect4.Exit β ε δ ι α),\n  Eq self.isClosed Bool.true →\n    Eq (Effect4.Scope.close run self exit) { fst := self, snd := Effect4.Exit.void }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1170,"lemmas":101,"nearest":["Effect4.Program.Typed.order_trans","Effect4.Program.Typed.fits_mono"]},"doc":"**A typed walk frame has its protocol**: coinduction from the invariant. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.Close","name":"Effect4.Program.Typed.closeSeqProtocol","placement":null,"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {w : Effect4.Program.Typed.World}\n  {row : Effect4.Machine.Env.Requirement} {tin tout : Effect4.Program.EffTy}\n  {name : Effect4.Program.EffName},\n  Effect4.Program.Typed.CloseSeqTyped root\n      { fst := w,\n        snd :=\n          { fst := row,\n            snd := { fst := row, snd := { fst := tin, snd := { fst := tout, snd := name } } } } } →\n    Effect4.Program.Typed.AmbientIteratorProtocol root w row row tin tout name","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":21,"lemmas":2,"nearest":[]},"doc":"A halted machine is outside `J` (row 139; probe C's `typedState_halt`, read at `J`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.machineTyped_not_halted","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (w : Effect4.Program.Typed.World) (m : Effect4.Program.Sched.RState)\n  (why : Effect4.Machine.Stuck),\n  Not (Effect4.Program.Typed.MachineTyped root rootTy w (Effect4.Machine.RunMachine.halt m why))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":288,"lemmas":43,"nearest":[]},"doc":"LIVE/fair: under enough command fuel for the initial queue, every initially\narmed owner is entered within its length in rounds, even if callbacks rearm. ","kind":"theorem","module":"Effect4.Laws.Machine.Scheduling","name":"Effect4.Machine.Scheduling.flush_fair","placement":null,"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St) (fuel rounds : Nat)\n  (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St),\n  (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n        (Effect4.FrameEvent ν σ β ε δ ι α)).Nodup →\n    Eq\n        (Effect4.Machine.Scheduling.FlushReady interp fuel\n          (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n              (Effect4.FrameEvent ν σ β ε δ ι α)).length\n          m)\n        Bool.true →\n      instLENat.le\n          (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n              (Effect4.FrameEvent ν σ β ε δ ι α)).length\n          rounds →\n        ∀ (owner : Effect4.FiberId),\n          List.instMembership.mem\n              (m.armed (Effect4.Prim ν σ β ε δ ι α) (Effect4.FrameFiber ν σ β ε δ ι α)\n                (Effect4.FrameEvent ν σ β ε δ ι α))\n              owner →\n            Eq (Effect4.Machine.Scheduling.FiredWithin interp fuel rounds m owner) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1736,"lemmas":2055,"nearest":["Effect4.Program.Typed.order_refl","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Program.Typed.Evaluating.settle_callback","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.completionStrong_await","Effect4.Program.Typed.memoBuild_extension","Effect4.Program.Typed.deferredMake_extension","Effect4.Program.Typed.refMake_extension","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_subN","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.denotesTyped","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.Ty.subN_refl","Effect4.Program.Node.at_append","Effect4.Program.scopeParams_below","Effect4.Program.fiberTy_upper","Effect4.Program.Bounds.matchB_sound","Effect4.Program.Typed.syncRow_typed","Effect4.Program.Signature.withParams_of_none","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Program.Typed.foreignFinalizer_ambient","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.seq_typed","Effect4.Program.Typed.closeSeqProtocol","Effect4.Program.Typed.configTyped_frame","Effect4.Program.Typed.close_typed","Effect4.Program.Typed.clause_scoped","Effect4.Program.Typed.clause_closeScope","Effect4.Program.Typed.scopeParams_ref","Effect4.Program.scopeParams_layer_below","Effect4.Machine.Env.Context.satisfies_union","Effect4.Program.Signature.withParams_serviceTy","Effect4.Program.Typed.guardBind_typed","Effect4.Program.Typed.Evaluating.countdown_parks_positional"]},"doc":"**`loop` keeps `I`** (`loop_preserves`): every clause, the walk. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.loop_preserves","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (id : Effect4.FiberId) (y : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.loop id y)","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1736,"lemmas":2048,"nearest":["Effect4.Program.Typed.order_refl","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Machine.Env.Context.satisfies_weaken","Effect4.Program.Typed.Evaluating.settle_callback","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.completionStrong_await","Effect4.Program.Typed.memoBuild_extension","Effect4.Program.Typed.deferredMake_extension","Effect4.Program.Typed.refMake_extension","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.fits_subN","Effect4.Program.scopeParams_child","Effect4.Program.Node.at_child","Effect4.Program.Typed.denotesTyped","Effect4.Program.listOf_upper","Effect4.Program.Typed.fits_normalize","Effect4.Program.Ty.normalize_idem","Effect4.Program.UnionRule.ReadsUnion.lift_sound","Effect4.Program.Ty.subN_trans","Effect4.Program.causeInputError_upper","Effect4.Program.Bounds.matchArgsB_sound","Effect4.Program.Ty.subN_refl","Effect4.Program.Node.at_append","Effect4.Program.scopeParams_below","Effect4.Program.fiberTy_upper","Effect4.Program.Bounds.matchB_sound","Effect4.Program.Typed.syncRow_typed","Effect4.Program.Signature.withParams_of_none","Effect4.Program.errOf_payload","Effect4.Program.isPayload_of_hasTy_record","Effect4.Program.Typed.foreignFinalizer_ambient","Effect4.Program.Typed.fits_scope_inv","Effect4.Program.Typed.seq_typed","Effect4.Program.Typed.closeSeqProtocol","Effect4.Program.Typed.configTyped_frame","Effect4.Program.Typed.close_typed","Effect4.Program.Typed.clause_scoped","Effect4.Program.Typed.clause_closeScope","Effect4.Program.Typed.scopeParams_ref","Effect4.Program.scopeParams_layer_below","Effect4.Machine.Env.Context.satisfies_union","Effect4.Program.Signature.withParams_serviceTy","Effect4.Program.Typed.guardBind_typed","Effect4.Program.Typed.Evaluating.countdown_parks_positional"]},"doc":"**`deliver` keeps `I`** (`deliver_preserves`): every clause, the walk. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.deliver_preserves","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (id : Effect4.FiberId) (y : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.deliver id y)","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1328,"lemmas":355,"nearest":["Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Program.Typed.order_refl","Effect4.Program.hom_eq_cata_ty"]},"doc":"**A store edit keeps `I`** at the world over the edited store (`note.md` §4): the views\n`J` reads move as the frame says, and the new store states its own clauses (well-formedness, the\ngenerated store typing, no new internal key, owners for its scheduled due entries). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.configTyped_frame","placement":null,"restsOn":[],"statement":"∀ {root : Effect4.Program.Typed.ProgramSource} {rootTy : Effect4.Program.EffTy}\n  {w : Effect4.Program.Typed.World} {m : Effect4.Program.Sched.RState}\n  {q : List Effect4.Program.Sched.RCmd},\n  Effect4.Program.Typed.ConfigTyped root rootTy w m q →\n    ∀ {s : Effect4.Machine.Stores},\n      Effect4.Program.Typed.StoreFrame m.state s →\n        s.WF →\n          Effect4.Program.Typed.StoresOk (Effect4.Program.Typed.preds root)\n              { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                serviceTy := w.serviceTy }\n              Effect4.Program.Typed.Expect.root s →\n            List.instHasSubset.Subset\n                (Effect4.Program.Guard.internalKeys\n                  { fibers := m.fibers, races := m.races, nextId := m.nextId,\n                    nextToken := m.nextToken, nextRace := m.nextRace,\n                    middlewareInstalled := m.middlewareInstalled, armed := m.armed, state := s,\n                    trace := m.trace, stuck := m.stuck, forks := m.forks })\n                (Effect4.Program.Guard.internalKeys m) →\n              (∀\n                  (o :\n                    Effect4.Machine.Owed\n                      (Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err\n                        Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)),\n                  List.instMembership.mem\n                      (s.deferreds.due\n                        (Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err\n                          Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n                      o →\n                    ∀ (owner : Effect4.FiberId) (priority : Nat),\n                      Eq o.mode (Effect4.Machine.WakeMode.scheduled owner priority) →\n                        Eq (Effect4.Machine.RunMachine.fiber? m owner).isSome Bool.true) →\n                And\n                  (w.leHost\n                    { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                      serviceTy := w.serviceTy })\n                  (Effect4.Program.Typed.ConfigTyped root rootTy\n                    { ids := w.ids, state := s, Γ := w.Γ, «Π» := w.«Π», Ρ := w.Ρ, Θ := w.Θ,\n                      serviceTy := w.serviceTy }\n                    { fibers := m.fibers, races := m.races, nextId := m.nextId,\n                      nextToken := m.nextToken, nextRace := m.nextRace,\n                      middlewareInstalled := m.middlewareInstalled, armed := m.armed, state := s,\n                      trace := m.trace, stuck := m.stuck, forks := m.forks }\n                    q)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":245,"lemmas":260,"nearest":["Effect4.Program.Ty.subN_trans"]},"doc":"**The waiter → due transfer** (`note.md` §3): a waiter declared at a type that accepts its\ncell's columns accepts any completion the cell holds, the cell's completion moving along both\ncolumns (`fitsExit_sub`; a delayed read along the checker's order, `Ty.sub_le_subN`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.completionStrong_await","placement":null,"restsOn":[],"statement":"∀ {w : Effect4.Program.Typed.World} {a e : Effect4.Program.Ty} {ty : Effect4.Program.EffTy}\n  {c :\n    Effect4.Machine.Completion Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect\n      Effect4.FiberId Effect4.Machine.Ann},\n  Effect4.Program.Typed.AwaitDemand a e ty →\n    Effect4.Program.Typed.CompletionStrong w\n        { answer := a, error := e, requires := Effect4.Machine.Env.Requirement.empty } c →\n      Effect4.Program.Typed.CompletionStrong w ty c","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1522,"lemmas":289,"nearest":["Effect4.Program.Typed.order_refl","Effect4.Program.Typed.configTyped_frame","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.completionStrong_await","Effect4.Program.hom_eq_cata_ty"]},"doc":"**`wake` keeps `I`** at the world over the woken store. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Bookkeeping","name":"Effect4.Program.Typed.wake_preserves","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy)\n  (list : Effect4.Machine.WakeKey) (phase : Effect4.Machine.WakePhase),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.wake list phase)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1503,"lemmas":385,"nearest":["Effect4.Program.Ty.subN_refl","Effect4.Program.Typed.fits_subN","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.order_refl","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Machine.Env.Context.satisfies_weaken"]},"doc":"**`launch` keeps `I`** (`Machine/Fibers.lean:1879-1896`, rc.112 `:1520-1528`): the entrant is\nallocated at the old `nextId` and declared at the race's result type (its program, typed at a\ntype whose columns are below it, widened there; closed because the race token's declaration is),\nthe race loses that program, and the entrant's evaluation and enrollment are queued ahead of the\nnext launch. Every other arm leaves the machine and drops the head. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Launch","name":"Effect4.Program.Typed.launch_preserves","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (raceId : Nat),\n  Effect4.Program.Typed.StepPreserves root rootTy (Effect4.Machine.Cmd.launch raceId)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1497,"lemmas":384,"nearest":["Effect4.Program.Typed.order_refl","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.close_typed","Effect4.Program.Typed.fits_subN"]},"doc":"**`registrationDone` keeps `I`** at the same world (Concept 4, scheduler step preservation;\n`Machine/Fibers.lean:1912-1931`). The head's authority names the race and its running, unparked\nhost on the race's marker; `RegistrationState` gives the race token's declared type `resultTy`\nand a host stack accepting it (`StackReply`); `RaceOk` gives the race column at that type\n(`RacePayload`), which does not read `registering`. An accepted exit is typed by the column and\ninstalled as `raceSettle` (`raceSettle_typed`) under the queued `loop`. With no answer the cancel\nframe is pushed (`stackAccepts_raceFinalizer`): a deferred interrupt clears the park and the\nqueued `loop` reads the marker, which `ReadCode` leaves to `RegistrationState`; otherwise the host\nparks idle at the race key with a `void` record, which no observer reads (decisions row 134 (d);\n`configTyped_rupdate_park`), and the race retains its declared token. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Registration","name":"Effect4.Program.Typed.registrationDone_preserves","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (raceId : Nat)\n  (yielding : Bool),\n  Effect4.Program.Typed.StepPreserves root rootTy\n    (Effect4.Machine.Cmd.registrationDone raceId yielding)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":184,"lemmas":7,"nearest":[]},"doc":"**Lift 1, the command loop.** One fact per command gives the fact for `driveState` at every\nfuel, machine and pending list, at some later world. ","kind":"theorem","module":"Effect4.Laws.Machine.Lift","name":"Effect4.Machine.Lift.driveState_lift","placement":null,"restsOn":[],"statement":"∀ {ν σ : Type u} {β : Type v} {ε δ ι α χ : Type u} {St : Type (max u v)} [inst : DecidableEq ε]\n  [inst_1 : DecidableEq δ] [inst_2 : DecidableEq ι] [inst_3 : DecidableEq α]\n  {κ φ η : Type (max u v)} [inst_4 : Effect4.Machine.FiberCore ν β ε δ ι α κ φ]\n  [inst_5 : Effect4.Machine.FiberEvaluator ν σ β ε δ ι α χ St κ φ η] {W : Type w}\n  (o : Effect4.Laws.Effects.WorldOrder W) (interp : Effect4.Machine.RunInterp ν σ β ε δ ι α χ St κ)\n  (I :\n    W →\n      Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η →\n        List (Effect4.Machine.Cmd ν σ β ε δ ι α κ) → Prop),\n  Effect4.Machine.Lift.StepKeeps o interp I →\n    ∀ (fuel : Nat) (w : W) (m : Effect4.Machine.RunMachine ν σ β ε δ ι α χ St κ φ η)\n      (cmds : List (Effect4.Machine.Cmd ν σ β ε δ ι α κ)),\n      I w m cmds →\n        Exists fun w' =>\n          And (o.le w w')\n            (I w' (Effect4.Machine.driveState interp fuel m cmds).fst\n              (Effect4.Machine.driveState interp fuel m cmds).snd)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":54,"lemmas":2,"nearest":[]},"doc":"The selected control belongs to the declared two-choice policy. ","kind":"theorem","module":"Effect4.Laws.Run","name":"Effect4.Run.nextControl_spec","placement":null,"restsOn":[],"statement":"∀ (s : Effect4.Run) (decision : Effect4.Api.Decision),\n  Iff (Eq s.nextControl (Option.some decision))\n    (And\n      (Eq\n        (s.machine.stuck\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann))\n        Option.none)\n      (Or (And (Eq decision Effect4.Api.flush) (Ne s.work.queued List.nil))\n        (Exists fun fiber =>\n          And (Eq decision (Effect4.Machine.RunDecision.evaluate fiber))\n            (And (Eq s.work.queued List.nil) (Eq s.work.runnable.head? (Option.some fiber))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1702,"lemmas":1160,"nearest":["Effect4.Program.Typed.fits_subN","Effect4.Machine.Env.Context.satisfies_empty","Effect4.Program.Typed.order_refl","Effect4.Program.Typed.fits_mono","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.TermMaps.mono","Effect4.Program.Ty.subN_trans","Effect4.Program.Typed.configTyped_frame","Effect4.Program.hom_eq_cata_ty","Effect4.Program.Typed.wake_preserves","Effect4.Program.Typed.close_typed","Effect4.Program.Typed.seq_typed","Effect4.Program.Typed.registrationDone_preserves","Effect4.Program.Typed.launch_preserves","Effect4.Program.Bounds.subN_never","Effect4.Program.Typed.guardBind_typed","Effect4.Program.Typed.deliver_preserves","Effect4.Program.Typed.loop_preserves","Effect4.Machine.Lift.driveState_lift"]},"doc":"**A tape decision keeps `J`** (`decision_preserves`): the command facts and the six\nedits through the decision lift (`decisionKeeps_of_ledger`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.decision_preserves","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (d : Effect4.Api.Decision), Effect4.Program.Typed.DecisionKeeps root rootTy fuel d","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":407,"lemmas":258,"nearest":["Conform.Effect4.Typing.check_complete","Conform.Effect4.Typing.check_sound","Effect4.Program.optionTy_option","Effect4.Program.Ty.normalize_idem","Effect4.Program.Bounds.matchArgsB_one_var"]},"doc":"**The loop at a caller's restore answers the result**, where the module's part is typed and\nthe caller's restore keeps what its argument answers, at every scope that the surface's binders\nreach. The result type is its own normal form. ","kind":"theorem","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.waitRetryAt_answers","placement":null,"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable}\n  {restore :\n    Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n      Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {result : Effect4.Program.Ty} {ended : String} {w : Effect4.Modules.Waiter}\n  {s : Effect4.Modules.TypedScope} {F : Effect4.Program.Ty},\n  Eq result.normalize result →\n    (∀ (t : Effect4.Modules.TypedScope)\n        (inner : Effect4.Program.Authoring.Src Effect4.Program.NativeOp) (Y : Effect4.Program.Ty),\n        s.Reaches t →\n          Effect4.Modules.Answers (Effect4.Program.nativeSignature table) inner t Y →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (restore inner) t Y) →\n      Effect4.Modules.Waiter.Typed table w s result F →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table)\n          (Effect4.Modules.waitRetryAt restore result ended w) s result","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":365,"lemmas":140,"nearest":["Effect4.Program.Ty.normalize_idem","Conform.Effect4.Typing.check_sound","Conform.Effect4.Typing.check_complete","Effect4.Program.mask_printed_form_profile"]},"doc":"**The protected body has its body's effect type**, with the failure type in normal form.\nThe acquisition answers a type with no failure, for every restore function that keeps what its\nargument answers. The body has one effect type for every kept reader of the acquired value: it\nmay fail, and it may require a service. The release answers a type with no failure, under the\nbody's exit. ","kind":"theorem","module":"Effect4.Laws.Step.Waiting","name":"Effect4.Modules.protectedBy_has","placement":null,"restsOn":[],"statement":"∀ {table : Effect4.Program.RowTable}\n  {acquire :\n    (Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n        Effect4.Program.Authoring.Src Effect4.Program.NativeOp) →\n      Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {release body :\n    Effect4.Program.Authoring.TermSrc → Effect4.Program.Authoring.Src Effect4.Program.NativeOp}\n  {s : Effect4.Modules.TypedScope} {G F : Effect4.Program.Ty} {b : Effect4.Program.EffTy},\n  (∀\n      (restore :\n        Effect4.Program.Authoring.Src Effect4.Program.NativeOp →\n          Effect4.Program.Authoring.Src Effect4.Program.NativeOp),\n      (∀ (t : Effect4.Modules.TypedScope)\n          (inner : Effect4.Program.Authoring.Src Effect4.Program.NativeOp) (Y : Effect4.Program.Ty),\n          (s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).Reaches t →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) inner t Y →\n              Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (restore inner) t Y) →\n        Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (acquire restore)\n          (s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore) G) →\n    (∀ (got : Effect4.Program.Authoring.TermSrc),\n        Effect4.Modules.Kept (Effect4.Program.nativeSignature table) got\n            ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n              Effect4.Modules.Stem.answer G)\n            G →\n          Effect4.Modules.Has (Effect4.Program.nativeSignature table) (body got)\n            ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n              Effect4.Modules.Stem.answer G)\n            b) →\n      (∀ (got : Effect4.Program.Authoring.TermSrc),\n          Effect4.Modules.Kept (Effect4.Program.nativeSignature table) got\n              ((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n                Effect4.Modules.Stem.answer G)\n              G →\n            Effect4.Modules.Answers (Effect4.Program.nativeSignature table) (release got)\n              (((s.push Effect4.Modules.Stem.restore Effect4.Program.Ty.maskRestore).push\n                    Effect4.Modules.Stem.answer G).push\n                Effect4.Modules.Stem.exit (b.answer.exitOf b.error))\n              F) →\n        Effect4.Modules.Has (Effect4.Program.nativeSignature table)\n          (Effect4.Modules.protectedBy acquire release body) s\n          { answer := b.answer, error := b.error.normalize, requires := b.requires }","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":318,"lemmas":75,"nearest":[]},"doc":"S-3 round trip without an arbitrary default JSON inhabitant or a failing `get!`. ","kind":"theorem","module":"Effect4.Laws.Schema.Codec","name":"Effect4.Schema.decode_encode","placement":null,"restsOn":[],"statement":"∀ {t : Effect4.Program.CTy} {v : Effect4.Machine.Val},\n  Eq (Effect4.Program.Val.hasTy v t.toRaw) Bool.true →\n    Eq (t.toRaw.isCodecValue v) Bool.true →\n      Eq ((Effect4.Schema.encode t.toRaw v).bind (Effect4.Schema.decode t.toRaw)) (Option.some v)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":157,"lemmas":23,"nearest":[]},"doc":"Raw Schema retraction on the closed exact profile.\nThe profile excludes unsupported forms, nonstring map keys, two-item tuples, and the reserved handle id. ","kind":"theorem","module":"Effect4.Schema.Bridge","name":"Effect4.Schema.Bridge.ofSchema_schema","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty),\n  Eq t.closed Bool.true →\n    Eq (Effect4.Schema.Bridge.reservedFree t) Bool.true →\n      Eq (Effect4.Schema.Bridge.ofSchema (Effect4.Schema.Bridge.schema t)) (Option.some t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":16,"lemmas":10,"nearest":[]},"doc":"At one fixed signature's scope identity, different keys have different target\nIdentifier syntax, independently of their carriers. This is a syntax theorem; the\npinned TypeScript assignment controls separately test the target interpretation. ","kind":"theorem","module":"Effect4.Laws.Codegen.ReadLeaf","name":"Effect4.Program.keyIdentifier_injective","placement":null,"restsOn":[],"statement":"∀ (scopeKey : Effect4.ServiceKey), Function.Injective (Effect4.Program.keyIdentifier scopeKey)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":62,"lemmas":38,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_refl","placement":null,"restsOn":[],"statement":"∀ (a : Effect4.Program.Ty), Eq (a.subN a) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":72,"lemmas":104,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_trans","placement":null,"restsOn":[],"statement":"∀ {a b c : Effect4.Program.Ty},\n  Eq (a.subN b) Bool.true → Eq (b.subN c) Bool.true → Eq (a.subN c) Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":66,"lemmas":38,"nearest":["Effect4.Program.Ty.sub_antisymm_canonical","Effect4.Program.Ty.normalize_idem"]},"doc":"**The kernel of the checker's order is equality of normal forms.** ","kind":"theorem","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.subN_equiv_iff","placement":null,"restsOn":[],"statement":"∀ (a b : Effect4.Program.Ty),\n  Iff (And (Eq (a.subN b) Bool.true) (Eq (b.subN a) Bool.true)) (Eq a.normalize b.normalize)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":68,"lemmas":77,"nearest":[]},"doc":"Construction is total; no checked partial constructor is needed. ","kind":"theorem","module":"Effect4.Program.Ty","name":"Effect4.Program.Ty.normalize_idem","placement":null,"restsOn":[],"statement":"∀ (t : Effect4.Program.Ty), Eq t.normalize.normalize t.normalize","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":81,"lemmas":169,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Program.TypeAlgebra","name":"Effect4.Program.Ty.sub_antisymm_canonical","placement":null,"restsOn":[],"statement":"∀ (a b : Effect4.Program.CTy),\n  Eq (a.toRaw.sub b.toRaw) Bool.true → Eq (b.toRaw.sub a.toRaw) Bool.true → Eq a b","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":88,"lemmas":68,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Program.Fold","name":"Effect4.Program.hom_eq_cata_eff","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {R : Effect4.Program.EffFam → Type u} {alg : Effect4.Program.EffAlgebra Op R}\n  (hom : Effect4.Program.EffHom alg) (node : Effect4.Program.Eff Op),\n  Eq (hom.f_eff node) (Effect4.Program.cata_eff alg node)","status":"proved"},{"axioms":[],"broughtIn":{"definitions":83,"lemmas":68,"nearest":[]},"doc":"Fold congruence at `Eff`. ","kind":"theorem","module":"Effect4.Laws.Program.Signature","name":"Effect4.Program.cata_eff_congr_on","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {R : Effect4.Program.EffFam → Type u} {alg₁ alg₂ : Effect4.Program.EffAlgebra Op R}\n  {okOp : Op → Prop} {okKey : Effect4.ServiceKey → Prop} {okDef : Nat → Prop},\n  alg₁.AgreeOn alg₂ okOp okKey okDef →\n    ∀ (e : Effect4.Program.Eff Op),\n      Effect4.Program.cata_eff (Effect4.Program.readsAlg okOp okKey okDef) e →\n        Eq (Effect4.Program.cata_eff alg₁ e) (Effect4.Program.cata_eff alg₂ e)","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":15,"lemmas":1,"nearest":[]},"doc":"A successful addressed edit exposes its replacement, preserves the root sort,\nand is reversed by restoring the original node. This is the structural witness for\nConcept 7's proposed `addressed-replacement` claim, consumed by the layer laws below. ","kind":"theorem","module":"Effect4.Laws.Program.References","name":"Effect4.Program.Node.replaceAt_spec","placement":null,"restsOn":[],"statement":"∀ {Op : Type} {node result replacement : Effect4.Program.Node Op} {path : List Nat},\n  Eq (node.replaceAt path replacement) (Option.some result) →\n    And (Eq (result.at_ path) (Option.some replacement))\n      (And (Eq result.ctorIdx node.ctorIdx)\n        (∀ (old : Effect4.Program.Node Op),\n          Eq (node.at_ path) (Option.some old) → Eq (result.replaceAt path old) (Option.some node)))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":26,"lemmas":2,"nearest":[]},"doc":"Law 7 (satisfaction, empty): every environment satisfies the empty row. ","kind":"theorem","module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_empty","placement":null,"restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U),\n  self.Satisfies Effect4.Machine.Env.Requirement.empty","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":27,"lemmas":2,"nearest":[]},"doc":"Law 8 (satisfaction, singleton): iff the key is bound. ","kind":"theorem","module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_single","placement":null,"restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U) (key : Effect4.ServiceKey),\n  Iff (self.Satisfies (Effect4.Machine.Env.Requirement.single key))\n    (Eq (self.get? key).isSome Bool.true)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":33,"lemmas":20,"nearest":[]},"doc":"Law 9 (satisfaction, union): iff both rows are satisfied. ","kind":"theorem","module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_union","placement":null,"restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U)\n  (r s : Effect4.Machine.Env.Requirement),\n  Iff (self.Satisfies (r.union s)) (And (self.Satisfies r) (self.Satisfies s))","status":"proved"},{"axioms":[],"broughtIn":{"definitions":25,"lemmas":0,"nearest":[]},"doc":"Law 10 (weakening): satisfying a row satisfies every subrow. ","kind":"theorem","module":"Effect4.Machine.Context","name":"Effect4.Machine.Env.Context.satisfies_weaken","placement":null,"restsOn":[],"statement":"∀ {U : Effect4.ServiceUniverse} (self : Effect4.Machine.Env.Context U)\n  {r s : Effect4.Machine.Env.Requirement},\n  self.Satisfies s → Effect4.Row.Subset r s → self.Satisfies r","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":637,"lemmas":146,"nearest":[]},"doc":"R5/R8: a checked emission retains an explicit answer, error and complete\nrequirement annotation on its main declaration. This certifies generated syntax,\nnot TypeScript execution. ","kind":"theorem","module":"Effect4.Laws.Codegen.Checked","name":"Effect4.Codegen.ModuleEmission.annotation_complete","placement":null,"restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff} {table : Effect4.Program.RowTable} {name : String}\n  (emission : Effect4.Codegen.ModuleEmission program table name),\n  Exists fun layers =>\n    Exists fun main =>\n      Exists fun body =>\n        Exists fun answer =>\n          Exists fun error =>\n            And\n              (Eq emission.declarations\n                (instHAppendOfAppend.hAppend layers (List.cons main List.nil)))\n              (And\n                (Eq\n                  (Effect4.Program.printDecl name emission.typing.ty body\n                    Effect4.Program.nativeScopeKey)\n                  (Except.ok main))\n                (Eq main.type\n                  (Option.some\n                    (TypeScript.TypeRef.name (List.cons \"Effect\" (List.cons \"Effect\" List.nil))\n                      (List.cons answer\n                        (List.cons error\n                          (List.cons\n                            (Effect4.Program.requirementType Effect4.Program.nativeScopeKey\n                              emission.typing.ty.requires)\n                            List.nil)))))))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":73,"lemmas":57,"nearest":[]},"doc":"A requirement of the dependent that the dependency provides is discharged. ","kind":"theorem","module":"Effect4.Program.Provision","name":"Effect4.Program.Provision.LayerTy.provide_discharges","placement":null,"restsOn":[],"statement":"∀ (s t : Effect4.Program.LayerTy) (key : Effect4.ServiceKey),\n  Effect4.Row.instMembership.mem t.out key →\n    Not (Effect4.Row.instMembership.mem t.requires key) →\n      Not (Effect4.Row.instMembership.mem (s.provide t).requires key)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":75,"lemmas":61,"nearest":[]},"doc":"**The closure theorem.** A dependency that is itself closed and provides everything the\ndependent needs closes the dependent: `Layer<ROut, E, never>`. This is the sentence\n`Effect.provide(program, layer)` type-checks by, and the sentence a deployment is checked by. ","kind":"theorem","module":"Effect4.Program.Provision","name":"Effect4.Program.Provision.LayerTy.provide_closed","placement":null,"restsOn":[],"statement":"∀ (s t : Effect4.Program.LayerTy),\n  t.Closed → Effect4.Row.Subset s.requires t.out → (s.provide t).Closed","status":"proved"},{"axioms":[],"broughtIn":{"definitions":10,"lemmas":2,"nearest":[]},"doc":"An answer is an edge from `awaitingAsync` to every state, so the machine it leaves is\nnever a protocol refusal. ","kind":"theorem","module":"Effect4.Laws.Run","name":"Effect4.Run.allows_answer","placement":null,"restsOn":[],"statement":"∀ (key : Effect4.Api.HostSession.Key) (target : Effect4.Api.HostProtocol.State),\n  Eq\n    (Effect4.Api.HostProtocol.allows Effect4.Api.HostProtocol.State.awaitingAsync\n      (Effect4.Api.HostProtocol.Label.answer key) target)\n    Bool.true","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":332,"lemmas":67,"nearest":[]},"doc":"Two accepted receipts for distinct keys commute as whole sessions. The machine,\nactive calls, call IDs, consumed ledger, and retired ownership are unchanged in either\norder. This is receipt/storage only, not `answerAsync` continuation execution. ","kind":"theorem","module":"Effect4.Laws.Api.HostSession","name":"Effect4.Api.HostSession.reply_commute","placement":null,"restsOn":[],"statement":"∀ {program : Effect4.Api.Program} {table : Effect4.Program.RowTable}\n  (s : Effect4.Api.HostSession.Session program table) (a b : Effect4.Api.HostSession.Reply),\n  Ne a.key b.key →\n    Eq (Effect4.Api.HostSession.submit s a).phase Effect4.Api.HostSession.Phase.preflight →\n      Eq (Effect4.Api.HostSession.submit s b).phase Effect4.Api.HostSession.Phase.preflight →\n        Eq (Effect4.Api.HostSession.submit (Effect4.Api.HostSession.submit s a).session b).session\n          (Effect4.Api.HostSession.submit (Effect4.Api.HostSession.submit s b).session a).session","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":42,"lemmas":2,"nearest":[]},"doc":null,"kind":"theorem","module":"Effect4.Laws.Api.Frontier","name":"Effect4.Api.observe_awaitingAsync_iff","placement":null,"restsOn":[],"statement":"∀ (why : Effect4.Machine.Exhaustion) (m : Effect4.Program.NativeMachine),\n  Iff (Eq (Effect4.Api.HostProtocol.observe m) Effect4.Api.HostProtocol.State.awaitingAsync)\n    (Exists fun key =>\n      List.instMembership.mem (Effect4.Api.frontierReasons why m)\n        (Effect4.Api.FrontierReason.awaitHost key))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":7,"lemmas":1,"nearest":[]},"doc":"**The checked row answers exactly when the reference row answers inside the profile.**\nPremise: both arguments are inside it. ","kind":"theorem","module":"Effect4.Laws.Machine.IntegerProfile","name":"Effect4.Program.intAddIn_eq_some_iff","placement":null,"restsOn":[],"statement":"∀ (bound : Nat) (x y v : Effect4.Machine.Val),\n  Eq (Effect4.Program.Within bound x) Bool.true →\n    Eq (Effect4.Program.Within bound y) Bool.true →\n      Iff (Eq (Effect4.Program.intAddIn bound x y) (Option.some v))\n        (And (Eq (Effect4.Program.intAdd x y) (Option.some v))\n          (Eq (Effect4.Program.Within bound v) Bool.true))","status":"proved"},{"axioms":["propext"],"broughtIn":{"definitions":95,"lemmas":9,"nearest":[]},"doc":"The represented natural multiplication uses exactly the checked product judgment.\nClaim: profile-mul-exact, translation-simulation R8. Target execution remains a separate control. ","kind":"theorem","module":"Effect4.Laws.Machine.IntegerProfile","name":"Effect4.Program.mulIn_eq_some_iff","placement":null,"restsOn":[],"statement":"∀ (bound a b n : Nat),\n  Iff (Eq (Effect4.Program.scaleIn bound a b) (Option.some n))\n    (And\n      (Eq\n        (Effect4.Program.NativeAtom.mul.eval\n          (List.cons (Effect4.Store.Val.nat a) (List.cons (Effect4.Store.Val.nat b) List.nil)))\n        (Option.some (Effect4.Store.Val.nat n)))\n      (Eq (Effect4.Program.Within bound (Effect4.Store.Val.nat n)) Bool.true))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":244,"lemmas":56,"nearest":[]},"doc":"**On `Straight` the tree is `denote`'s tree, injected on the left.** The connector of the\ntwo denotations: `denote` is `denoteRows` at no host call. ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRows","name":"Effect4.Program.Denote.denoteRows_straight","placement":null,"restsOn":[],"statement":"∀ (table : Effect4.Program.RowTable) (e : Effect4.Program.NativeEff)\n  (env : List Effect4.Machine.Val),\n  Eq (Effect4.Program.Denote.Straight e) Bool.true →\n    Eq (Effect4.Program.Denote.denoteRows table e env) (Effect4.Program.Denote.denote e env).inl","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":432,"lemmas":87,"nearest":[]},"doc":"**The reference's term of a program of the fragment, with its control markers erased, is\nthe program's tree over the stores and the rows**, when the compile budget covers its depth.\nIt extends `denoteR_straight` by the one arm of a host call. ","kind":"theorem","module":"Effect4.Laws.Program.DenoteRowsR","name":"Effect4.Program.Sched.denoteR_straightRows","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.NativeEff) (table : Effect4.Program.RowTable)\n  (e : Effect4.Program.NativeEff) (p : Effect4.Program.Point),\n  Eq (Effect4.Program.Denote.StraightRows table e) Bool.true →\n    instLENat.le (Effect4.Program.Sched.depthRows e) p.fuel →\n      Eq (Effect4.Program.Sched.eraseControl (Effect4.Program.Sched.denoteR root e p))\n        (Effects.interpret (Effect4.Program.Sched.toRef table)\n          (Effect4.Program.Denote.denoteRows table e p.env))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1620,"lemmas":958,"nearest":["Effect4.Program.Node.at_append","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.order_refl"]},"doc":"**M7 from the ledger** (decisions row 138's route): `loadsTyped` and\n`decision_preserves` at one source and budget give M7a–c at every answer-free tape. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Assembly","name":"Effect4.Program.Typed.m7_of_ledger","placement":null,"restsOn":[],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Effect4.Program.Typed.LoadsTyped root rootTy fuel fuel →\n    (∀ (d : Effect4.Api.Decision), Effect4.Program.Typed.DecisionKeeps root rootTy fuel d) →\n      And (Effect4.Program.Typed.M7Exits root rootTy fuel tape)\n        (And (Effect4.Program.Typed.M7Stores root rootTy fuel tape)\n          (Effect4.Program.Typed.M7NoHalt root rootTy fuel tape))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":160,"lemmas":41,"nearest":["Effect4.Program.admitSig_ok_iff"]},"doc":"**The bridge** (proved; claim `admitted-source-lawful`). An admitted program's signature is\nlawful: admission ran `admitSig` (decisions row 21), and `admitSig_ok_iff` reads its `ok` as\n`LawfulSig`. `E4-TYPED-CE-041`'s three witnesses, which the table-indexed admission admitted, are\nrefused now (`Test/Counterexamples/Program/AdmissionUnserved.lean`). ","kind":"theorem","module":"Effect4.Laws.Program.Typed.AdmittedSource","name":"Effect4.Program.Typed.lawfulSig_of_admitted","placement":null,"restsOn":[],"statement":"∀ {program : Effect4.Program.NativeEff} {app : Effect4.Program.SigApp}\n  (a : Effect4.Program.AdmittedProgram program app), Effect4.Program.LawfulSig app","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1498,"lemmas":208,"nearest":["Effect4.Program.Typed.reachable_typed"]},"doc":"**Recorded successes name only live handles** (`exitHandles_valid`, organization M4, row\n139): on every reachable machine of a checked program, a fiber's successful exit value is valid in\nthe machine's stores. `J` holds there (`reachable_typed`, with a closed root row), the exit\nfits its fiber's declared type, and a member of any type is valid in a typed store\n(`fits_validIn`, the F-WF repair). The exit connector's validity premise. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.exitHandles_valid","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (m : Effect4.Program.Sched.RState), Effect4.Program.Typed.ExitHandlesValid root rootTy fuel m","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1614,"lemmas":952,"nearest":["Effect4.Program.Typed.decision_preserves","Effect4.Program.Typed.load_typed","Effect4.Program.Node.at_append","Effect4.Program.Typed.order_trans","Effect4.Program.Typed.order_refl"]},"doc":"**The frame machine's observation on every admitted tape is typed** and its run has not\nhalted: `reachable_typed` across `run_eq_ref`'s relation (`obsTyped_admitted`). M7a–c without the\nfragment's lawful and answer-free premises; row 117's closed row remains; the frame machine at its empty row table\nonly. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Commands.Clauses.All","name":"Effect4.Program.Typed.obs_typed","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n        Exists fun w =>\n          And\n            (Effect4.Program.Typed.MachineTyped root rootTy w\n              (Effect4.Machine.ReplayResult.machine\n                (Effect4.Program.Sched.replayR root.program fuel tape)))\n            (And\n              (Effect4.Program.Typed.ExitsFit rootTy w\n                (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine))\n              (And\n                (Effect4.Program.Typed.StoresFit root w\n                  (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine).stores)\n                (Eq\n                  ((Effect4.Api.replay root.program fuel tape).machine.stuck\n                    (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann)\n                    (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk\n                      Effect4.Machine.Val Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n                      Effect4.Machine.Ann))\n                  Option.none)))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1574,"lemmas":219,"nearest":["Effect4.Program.Sched.replay_externals","Effect4.Program.Typed.obs_typed"]},"doc":"**T1. Recorded exits have their declared type, in the meaning layer's judgment.** On every\nadmitted tape of a checked program, there is a declaration of the fibers, the root at the program's\ntype, under which every exit the frame machine's observation records satisfies\n`Denote.ExitHasTy` at its fiber's type over the observed stores. ","kind":"theorem","module":"Effect4.Laws.Program.Typed.Results","name":"Effect4.Program.Typed.exits_hasTy","placement":null,"restsOn":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"statement":"∀ (root : Effect4.Program.Typed.ProgramSource) (rootTy : Effect4.Program.EffTy) (fuel : Nat)\n  (tape : List Effect4.Api.Decision),\n  Eq (Effect4.Program.typeOfProgram root.sig.signature root.program) (Option.some rootTy) →\n    Eq rootTy.requires Effect4.Machine.Env.Requirement.empty →\n      Effect4.Program.Typed.AdmittedTape root rootTy fuel tape →\n        Exists fun Γ =>\n          And (Eq (Γ Effect4.Api.root) (Option.some rootTy))\n            (∀ (id : Effect4.FiberId) (ex : Effect4.Machine.ExitV),\n              List.instMembership.mem\n                  (Effect4.Machine.obs (Effect4.Api.replay root.program fuel tape).machine).exits\n                  { fst := id, snd := Option.some ex } →\n                Exists fun ty =>\n                  And (Eq (Γ id) (Option.some ty))\n                    (Effect4.Program.Denote.ExitHasTy ty.answer ty.error\n                      (Effect4.Machine.obs\n                          (Effect4.Api.replay root.program fuel tape).machine).stores\n                      ex))","status":"modulo"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":1105,"lemmas":909,"nearest":["Effect4.Program.Node.at_append"]},"doc":"**No replay allocates an external handle**, on every tape, host answers included: the frame\nmachine runs at the empty row table, where the external registration and the prepared answer\nfall back without minting (`StoresOk.externals`). The exit connector's allocation premise\n(`exitHasTy_of_fitsExit`). ","kind":"theorem","module":"Effect4.Laws.Program.RuntimeR","name":"Effect4.Program.Sched.replay_externals","placement":null,"restsOn":[],"statement":"∀ (e : Effect4.Program.NativeEff) (fuel : Nat) (tape : List Effect4.Api.Decision),\n  Eq\n    ((Effect4.Api.replay e fuel tape).machine.state\n          (Effect4.Prim Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameFiber Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId Effect4.Machine.Ann)\n          (Effect4.FrameEvent Effect4.Program.EffName Effect4.Program.EffThunk Effect4.Machine.Val\n            Effect4.Machine.Err Effect4.Machine.Defect Effect4.FiberId\n            Effect4.Machine.Ann)).externals.allocated\n    List.nil","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":983,"lemmas":81,"nearest":[]},"doc":"Journaled control execution agrees with raw frame replay at the same machine, table\nand command budget when every added row progressed. The initial machine already fixes the\ncompile budget. Earlier phases may include host answers, refusals or fuel frontiers.\n\nThis is machine equality, not equality of session metadata or an assertion that the program\nhas finished. A refused row or an insufficient-budget row cannot satisfy the premise. ","kind":"theorem","module":"Effect4.Laws.Run","name":"Effect4.Run.play_controls_eq_replay","placement":null,"restsOn":[],"statement":"∀ (s : Effect4.Run) (tape : List Effect4.Api.Decision),\n  Eq (s.play (Effect4.Rows.tape tape)).phases\n      (instHAppendOfAppend.hAppend s.phases\n        (List.replicate tape.length Effect4.Api.HostSession.Phase.progressed)) →\n    Eq (s.play (Effect4.Rows.tape tape)).machine\n      (Effect4.Run.machineOf\n        (Effect4.Run.replayFrom s.built.program s.built.table s.budget.fuel tape s.machine))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":899,"lemmas":68,"nearest":["Effect4.Program.Agreement.run_eq_meaning"]},"doc":"Runtime consumer of straight-fragment composition. Budgets may differ: a rewrite can\nchange its step bound. The observation includes state retained after failure/finalization;\ntrace equality and insufficient-budget executions are outside this statement. ","kind":"theorem","module":"Effect4.Laws.Program.MeaningEq","name":"Effect4.Program.Denote.StraightEq.run_agrees","placement":null,"restsOn":[],"statement":"∀ {a b : Effect4.Program.NativeEff},\n  Effect4.Program.Denote.StraightEq a b →\n    ∀ (fa fb : Nat),\n      instLENat.le (Effect4.Program.Agreement.depth a) fa →\n        instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps a)) 6) fa →\n          instLENat.le (Effect4.Program.Agreement.depth b) fb →\n            instLENat.le (instHAdd.hAdd (instHMul.hMul 2 (Effect4.Program.Agreement.steps b)) 6)\n                fb →\n              And (Eq (Effect4.Api.run a fa).outcome Effect4.Api.Outcome.finished)\n                (And (Eq (Effect4.Api.run b fb).outcome Effect4.Api.Outcome.finished)\n                  (And (Eq (Effect4.Api.run a fa).exit (Effect4.Api.run b fb).exit)\n                    (Eq (Effect4.Api.run a fa).stores (Effect4.Api.run b fb).stores)))","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":63,"lemmas":14,"nearest":[]},"doc":"**Local agreement**: every answer that accepted entries hold is `cata_ty` of the same layer at\nits own source. The pointer of the claim `fold-cache-local-agreement`. Its consumers are\n`CheckedCache.query_agrees`, `answer_agrees` and slice D6's memoized folds. It says nothing of a\ntype that no entry holds, and nothing of speed. ","kind":"theorem","module":"Effect4.Laws.Program.Folds.TyCache","name":"Effect4.Program.TyCache.check_agreement","placement":{"concept":"initial-algebras-folds","requirement":null},"restsOn":[],"statement":"∀ {R : Type u} [inst : DecidableEq R]\n  (layer : Effect4.Program.TyCtor → List (Effect4.Program.TyArgF R) → R)\n  (entries : Effect4.Program.TyCache.Entries R),\n  Eq (Effect4.Program.TyCache.check layer entries) Bool.true →\n    ∀ (t : Effect4.Program.Ty) (r : R),\n      Eq (Effect4.Program.TyCache.lookup entries t) (Option.some r) →\n        Eq r (Effect4.Program.cata_ty (Effect4.Program.TyAlgebra.ofLayer layer) t)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"**An accepted summary**: a table that `check` accepts holds an entry at a node and a label if\nand only if a path from the node reaches a seed of the label. The pointer of the claim\n`dependency-summary-exact`. Its consumers are `Checked.reports_iff`, the axiom walk's checked\nsummaries and the flow's directed queries. It certifies the supplied graph, not its extraction. ","kind":"theorem","module":"Tools.Graph.Summary","name":"Tools.Graph.Summary.check_summary_exact","placement":null,"restsOn":[],"statement":"∀ {n m : Nat} {g : Tools.Graph.Summary.Graph n m} {d : Tools.Graph.Summary.Distances n m},\n  Eq (Tools.Graph.Summary.check g d) Bool.true →\n    ∀ (u : Fin n) (l : Fin m),\n      Iff (Tools.Graph.Summary.Present d u l) (Tools.Graph.Summary.Reaches g u l)","status":"proved"},{"axioms":["Quot.sound","propext"],"broughtIn":{"definitions":0,"lemmas":0,"nearest":[]},"doc":"**A checked flow summary**: when `checkReach` accepts a distance table, the table reports a\ntarget at a source if and only if `Reach` leads from the source to the target. The pointer of\nthe claim `view-reachability-summary-exact`. Its consumers are directed queries of the\napplication graph, explanations and impact reports. It establishes no schedule. ","kind":"theorem","module":"Tools.View.FlowReach","name":"Tools.View.Flow.checkReach_exact","placement":null,"restsOn":[],"statement":"∀ {n : Nat} {es : List Tools.View.Flow.Edge} {d : Tools.Graph.Summary.Distances n n},\n  Eq (Tools.View.Flow.checkReach n es d) Bool.true →\n    ∀ (source target : Fin n),\n      Iff (Tools.Graph.Summary.Present d source target)\n        (Tools.View.Flow.Reach es source.val target.val)","status":"proved"}],"requirements":[{"id":"R1","next":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"openParts":[{"on":"","state":"untriaged","text":"program admission at declared services is reached by tests only: authoring, Built, the session and Run.open admit at the table's own signature ⟨table, []⟩, and code generation's admission check is at nativeSignature table (decisions row 21; the slice plan's steps 3 and 4, docs/research/2026-10-04-claude-lead/sigapp-slice-plan.md)"},{"on":"","state":"untriaged","text":"the faces (22 lines) pinned to the built-in signature: Laws/Codegen/Admit, Laws/Codegen/Checked and Laws/Api/ModuleReadable take nativeSignature table (the Σ_app slice; C7, conditional on decisions row 115)"},{"on":"","state":"untriaged","text":"meaning, loop and run soundness at service declarations that rebind a code: restored 2026-10-04 at fresh codes only (SoundAnySignature.lean)"},{"on":"decisions row 118: waits on a program that needs one","state":"ruling","text":"structured service carriers: LawfulSig admits flat carriers only (decisions row 118, open: waits on a program that needs one)"}],"placed":[{"name":"Effect4.Program.checkModule_complete","status":"proved"},{"name":"Effect4.Program.checkModule_sound","status":"proved"},{"name":"Effect4.Program.invoke_hasTy","status":"proved"}],"status":"open","title":"The signature is a parameter: one located refusal admits Σ_app, and every milestone statement takes it","top":[{"name":"Conform.Effect4.Typing.check_sound","status":"proved"},{"name":"Conform.Effect4.Typing.check_complete","status":"proved"},{"name":"Effect4.Program.admitSig_ok_iff","status":"proved"},{"name":"Effect4.Program.Denote.meaning_typed_app","status":"proved"},{"name":"Effect4.Program.Denote.run_typed_app","status":"proved"},{"name":"Effect4.Program.Denote.meaningB_typed_app","status":"proved"},{"name":"Effect4.Program.Typed.reachable_typed_admitted","status":"modulo"}]},{"id":"R2","next":[],"openParts":[{"on":"","state":"untriaged","text":"C2 for host rows outside the fragment StraightRows: operational; on the fragment it is meaningUnder_append (decisions row 313)"},{"on":"","state":"untriaged","text":"C4 for TypedProg (the generic judgment is proved both ways)"},{"on":"","state":"untriaged","text":"C5: the world projection with its back condition (its red controls are proved)"},{"on":"","state":"untriaged","text":"C7: conditional on decisions row 115"},{"on":"","state":"untriaged","text":"C8: per form"}],"placed":[{"name":"Effect4.Program.Denote.denoteRowsB_looped","status":"proved"},{"name":"Effect4.Program.Denote.denoteRowsB_straight","status":"proved"},{"name":"Effect4.Program.checkModule_conservative","status":"proved"},{"name":"Effect4.Program.checkModule_eq_check","status":"proved"},{"name":"Effect4.Program.defs_conservative","status":"proved"},{"name":"Effect4.Program.moduleHasTy_ext","status":"proved"},{"name":"Effect4.Program.typeOfProgram_ext","status":"proved"}],"status":"open","title":"Extension is conservative: C1–C8 over DI-47's relation on Σ_app","top":[{"name":"Effect4.Program.check_ext","status":"proved"},{"name":"Effect4.Program.check_restrict","status":"proved"},{"name":"Effect4.Program.lawful_append","status":"proved"},{"name":"Effect4.Program.Denote.meaningUnder_append","status":"proved"}]},{"id":"R3","next":[],"openParts":[{"on":"","state":"untriaged","text":"variants: the tag select over records landed (decisions row 195 (d)); catchTag's residual, the caught tag subtracted from the error column, waits on decisions row 130"},{"on":"decisions row 124: recursive types as declarations of the application","state":"ruling","text":"recursive types are row 124 (open): nominal Σ_app declarations through Ty.app"},{"on":"","state":"untriaged","text":"error payloads: the carrier (decisions row 120, part E1) and the face (part E2: one Data.TaggedError class per tag, printed and read back) landed; open: catchTag's residual over records (decisions row 130), int and number fields (row 121; a number field is refused by name as unreadable), a field typed by another class (refused by name), a record update of a class instance (it answers a structural object), and a host row answering a payload (R6, parked)"},{"on":"decisions row 108: the owner places the numbers slice; row 121 is ruled","state":"ruling","text":"int inhabited inside row 108's profile: ruled 2026-10-02 (decisions row 121); carried since decisions row 317, which removes the admission's int scan; the JSON wires since row 316; the computing rows (plus, minus, and lt and eq at int) since row 319; the Lean judgment and OCaml profile bound landed in row 321, and the TypeScript prelude refusal landed in row 322; the host truth record and comparison of an outside-profile result remain open (slice 7)"},{"on":"","state":"untriaged","text":"the Schema and JSON images of app, null, undefined, number and bytes: unlowered or refused by name (decisions rows 121, 158, 160, 161)"},{"on":"a program that compares records (decisions row 126)","state":"work","text":"equality at records: eq stays refused at records until a program compares them (decisions row 126)"}],"placed":[{"name":"Effect4.Codegen.admitModule_classDecls","status":"proved"},{"name":"Effect4.Program.errOf_ne_boom_of_supported","status":"proved"},{"name":"Effect4.Program.errOf_payload","status":"proved"},{"name":"Effect4.Program.isPayload_of_hasTy_record","status":"proved"},{"name":"Effect4.Schema.FieldRef.frame_laws","status":"proved"},{"name":"Effect4.Schema.Model.member","status":"proved"},{"name":"Effect4.Schema.Modeled.codec_roundtrip","status":"proved"}],"status":"open","title":"Data: the type language closed under records and variants as Ty growth","top":[{"name":"Effect4.Program.Formation.checkInput_eq_none_iff","status":"proved"},{"name":"Effect4.Program.Typed.fits_normalize","status":"proved"},{"name":"Effect4.Program.Typed.fits_subN","status":"proved"},{"name":"Effect4.Program.Typed.inhabited_iff_fits","status":"proved"},{"name":"Effect4.Program.hom_eq_cata_ty","status":"proved"},{"name":"Effect4.Schema.decode_iff","status":"proved"},{"name":"Effect4.Schema.Bridge.ofSchema_exact","status":"proved"},{"name":"Effect4.Program.readTerm_printTerm","status":"proved"},{"name":"Effect4.Codegen.Metadata.type_metadata_exact","status":"proved"},{"name":"Effect4.Program.errOf_valOfErr","status":"proved"}]},{"id":"R4","next":["Test.Dogfood.Scenario.Atomic.Store.shop_stages","Test.Dogfood.Scenario.Atomic.Cleanup.log_debits"],"openParts":[{"on":"","state":"proposed","text":"pool-profile-preserved (proposed claim; store-typing): along a run of the public operations the cell stays a member of its type and its state stays in the first profile; the model's half is profile_closed on six transitions; the cell's half is the seven typing statements of the cell and of the steps with step_keeps_cell, and each attempt statement of the operations gives the membership of the reply and of the stored value from the membership of the cell before the step; the operations are typed at every scope (use_types, make_types, close_answers), and make's type requires the scope; no statement says that a client writes the cell by the operations alone, none keeps the table injective along a run, and no goal states the run-level claim (decisions rows 267 to 269, 276)"},{"on":"","state":"untriaged","text":"the faces of Ref<A> and Deferred<A, E>, the type arguments' part: landed in the state plan's T5 for a binder term and for Deferred.make: a read-modify-write row's binder term is printed as a function of the cell's current value and read back (part A: printPerform, readPerform); Deferred.make<A, E>() is printed from the operation's own type arguments and read back at every instance whose types are readable (part B: Signature.typeArgsOf and withTypeArgs, printCall, readCall, LawfulTypeArgs; Classes.readTyChecked on Classes.ReadableTy), a bare Deferred.make() is refused by its spelling and never typed at a default, the native row declares no type argument of its own, and an operation's type arguments are program annotations (ScopedOp.typeArgs: raw formation, the integer scan and the module's class table read them; decisions row 212); read_print and read_exact keep their statements; open: Ref.make<A>, which needs an appended constructor (decisions rows 210 and 212); a type argument outside the readable types (a handle type, unknown, a class name: printed where it has a printed form, and refused at reading; int and number: read at nat); a list fold's stated accumulator type, which is printed and not read; and the instance's row in the other estates: the TypeScript profile and the OCaml metadata list Deferred.make once, at the face's instance, so a consumer that needs an instance's answer column derives it from the operation"},{"on":"","state":"untriaged","text":"the target half of handle-identity-laws (decisions row 229): the identity correspondence in each target's relation, in both directions: two handles have equal keys exactly when their host objects are one object; no goal states it, and the laws over Fits and the world's order are handle_identity_laws"},{"on":"","state":"proposed","text":"semaphore-accounting-preserved (proposed claim; store-typing): along a run of the public operations the cell stays a member of its type and its state stays in the first profile; the model's half is profile_closed; the cell's half is the six typing statements of the steps with step_keeps_cell, and each attempt statement of the operations gives the membership of the reply and of the stored value from the membership of the cell before the step; no statement gives that first membership from the handles that the table names, and no goal states the run-level claim (decisions rows 260, 261, 265, 276)"},{"on":"","state":"proposed","text":"atomic-attempt-isolation (proposed claim; store-typing and reactive-scheduling): an admitted atomic body's ordered dynamic reads and writes, the exact state that a failure or a retry restores, and no step of another fiber between its first access and its commit (decisions rows 80, 223; waits on the body profile's grammar and on row 226's budget or suspension)"},{"on":"","state":"untriaged","text":"the second half of scoped-body-substitution-boundary (residual-program-typing): for a later constructor that does bind a scope, the code after the scope runs only after it, and substitution neither captures it nor copies it into a child body (decisions rows 225, 227); no goal states it: the mask adds no scoped constructor, and its restore node's half is scoped_body_substitution_boundary"}],"placed":[{"name":"Effect4.Latch.Model.awaitStep_types","status":"proved"},{"name":"Effect4.Latch.Model.closeStep_types","status":"proved"},{"name":"Effect4.Latch.Model.flushStep_types","status":"proved"},{"name":"Effect4.Latch.Model.initialStep_types","status":"proved"},{"name":"Effect4.Latch.Model.isOpenStep_types","status":"proved"},{"name":"Effect4.Latch.Model.wakeStep_types","status":"proved"},{"name":"Effect4.Latch.Model.withdrawStep_types","status":"proved"},{"name":"Effect4.Machine.FnName.image_agrees","status":"proved"},{"name":"Effect4.Machine.Race.afterExit_first","status":"proved"},{"name":"Effect4.Modules.Step.typed","status":"proved"},{"name":"Effect4.Modules.ascribe_untyped","status":"proved"},{"name":"Effect4.Modules.step_keeps_cell","status":"proved"},{"name":"Effect4.Modules.types_ascribe","status":"proved"},{"name":"Effect4.PartitionedSemaphore.available_types","status":"proved"},{"name":"Effect4.PartitionedSemaphore.initial_types","status":"proved"},{"name":"Effect4.PartitionedSemaphore.reserve_types","status":"proved"},{"name":"Effect4.PartitionedSemaphore.tryTake_types","status":"proved"},{"name":"Effect4.Pool.Model.closeStep_types","status":"proved"},{"name":"Effect4.Pool.Model.drainStep_types","status":"proved"},{"name":"Effect4.Pool.Model.initial_types","status":"proved"},{"name":"Effect4.Pool.Model.leaseStep_types","status":"proved"},{"name":"Effect4.Pool.Model.lease_enrols_iff","status":"proved"},{"name":"Effect4.Pool.Model.profile_closed","status":"proved"},{"name":"Effect4.Pool.Model.returnStep_types","status":"proved"},{"name":"Effect4.Pool.Model.selectStep_types","status":"proved"},{"name":"Effect4.Pool.Model.withdrawStep_types","status":"proved"},{"name":"Effect4.Pool.close_answers","status":"proved"},{"name":"Effect4.Pool.make_types","status":"proved"},{"name":"Effect4.Pool.use_types","status":"proved"},{"name":"Effect4.Program.Authoring.ascribe_scoped","status":"proved"},{"name":"Effect4.Program.Bounds.TemplateOK.args","status":"proved"},{"name":"Effect4.Program.Bounds.TemplateOK.head","status":"proved"},{"name":"Effect4.Program.Bounds.above_args","status":"proved"},{"name":"Effect4.Program.Bounds.above_prod","status":"proved"},{"name":"Effect4.Program.Bounds.admits_normalize","status":"proved"},{"name":"Effect4.Program.Bounds.below_args","status":"proved"},{"name":"Effect4.Program.Bounds.candsFields_eq","status":"proved"},{"name":"Effect4.Program.Bounds.candsItems_eq","status":"proved"},{"name":"Effect4.Program.Bounds.candsList_below","status":"proved"},{"name":"Effect4.Program.Bounds.candsList_cons","status":"proved"},{"name":"Effect4.Program.Bounds.candsList_nil","status":"proved"},{"name":"Effect4.Program.Bounds.cands_args","status":"proved"},{"name":"Effect4.Program.Bounds.cands_below","status":"proved"},{"name":"Effect4.Program.Bounds.cands_mem_members","status":"proved"},{"name":"Effect4.Program.Bounds.cands_union_right","status":"proved"},{"name":"Effect4.Program.Bounds.cands_var","status":"proved"},{"name":"Effect4.Program.Bounds.comp_co","status":"proved"},{"name":"Effect4.Program.Bounds.comp_inv","status":"proved"},{"name":"Effect4.Program.Bounds.comp_ne_contra","status":"proved"},{"name":"Effect4.Program.Bounds.covers","status":"proved"},{"name":"Effect4.Program.Bounds.instance_shape","status":"proved"},{"name":"Effect4.Program.Bounds.instantiate_solve","status":"proved"},{"name":"Effect4.Program.Bounds.joinCands_least","status":"proved"},{"name":"Effect4.Program.Bounds.joinCands_upper","status":"proved"},{"name":"Effect4.Program.Bounds.join_eq_left_of_subN","status":"proved"},{"name":"Effect4.Program.Bounds.join_eq_right_of_subN","status":"proved"},{"name":"Effect4.Program.Bounds.lookup_added","status":"proved"},{"name":"Effect4.Program.Bounds.lookup_solve_seed","status":"proved"},{"name":"Effect4.Program.Bounds.lowers_cons","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_append","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_complete","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_cons_nil","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_ite","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_least","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_list_var_nat","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_one_var","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_sound","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_two_vars","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsN_complete","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsN_least","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_cell_fixed","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_complete","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_least","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_modify_use","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_one_var","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_refOf_var","status":"proved"},{"name":"Effect4.Program.Bounds.matchB_sound","status":"proved"},{"name":"Effect4.Program.Bounds.matchN_congr","status":"proved"},{"name":"Effect4.Program.Bounds.mem_lowers","status":"proved"},{"name":"Effect4.Program.Bounds.mem_varsOf_args","status":"proved"},{"name":"Effect4.Program.Bounds.mem_zip_map_right","status":"proved"},{"name":"Effect4.Program.Bounds.mem_zip_self_map","status":"proved"},{"name":"Effect4.Program.Bounds.noAppFields_eq_all","status":"proved"},{"name":"Effect4.Program.Bounds.noAppItems_eq_all","status":"proved"},{"name":"Effect4.Program.Bounds.noApp_args","status":"proved"},{"name":"Effect4.Program.Bounds.prod_left_cands","status":"proved"},{"name":"Effect4.Program.Bounds.prod_member_left","status":"proved"},{"name":"Effect4.Program.Bounds.prod_member_right","status":"proved"},{"name":"Effect4.Program.Bounds.prod_or_not","status":"proved"},{"name":"Effect4.Program.Bounds.prod_right_cands","status":"proved"},{"name":"Effect4.Program.Bounds.recovers","status":"proved"},{"name":"Effect4.Program.Bounds.solve_between","status":"proved"},{"name":"Effect4.Program.Bounds.subN_join_least","status":"proved"},{"name":"Effect4.Program.Bounds.subN_never","status":"proved"},{"name":"Effect4.Program.Bounds.templateOK_of","status":"proved"},{"name":"Effect4.Program.ControlSteps.loop_sync_op","status":"proved"},{"name":"Effect4.Program.ControlSteps.native_sync_answer","status":"proved"},{"name":"Effect4.Program.ControlSteps.native_sync_op","status":"proved"},{"name":"Effect4.Program.Eff.perform_scoped_iff","status":"proved"},{"name":"Effect4.Program.HeapSites.heap_sites_keep","status":"proved"},{"name":"Effect4.Program.Signature.withParams_defOf","status":"proved"},{"name":"Effect4.Program.Signature.withParams_of_none","status":"proved"},{"name":"Effect4.Program.Signature.withParams_param","status":"proved"},{"name":"Effect4.Program.Signature.withParams_serviceTy","status":"proved"},{"name":"Effect4.Program.SourceScope.admitted_heap_history","status":"proved"},{"name":"Effect4.Program.Typed.TermMaps.mono","status":"proved"},{"name":"Effect4.Program.Typed.fold_typed_atomic_update","status":"proved"},{"name":"Effect4.Program.Typed.handle_identity_laws","status":"proved"},{"name":"Effect4.Program.Typed.invoke_arm","status":"proved"},{"name":"Effect4.Program.Typed.param_arm","status":"proved"},{"name":"Effect4.Program.Typed.saved_mask_image_membership","status":"proved"},{"name":"Effect4.Program.Typed.scopeParams_ref","status":"proved"},{"name":"Effect4.Program.Typed.scoped_body_substitution_boundary","status":"proved"},{"name":"Effect4.Program.Typed.syncRow_typed","status":"proved"},{"name":"Effect4.Program.Typed.termMaps_of_typed","status":"proved"},{"name":"Effect4.Program.scopeParams_below","status":"proved"},{"name":"Effect4.Program.scopeParams_body","status":"proved"},{"name":"Effect4.Program.scopeParams_child","status":"proved"},{"name":"Effect4.Program.scopeParams_decl","status":"proved"},{"name":"Effect4.Program.scopeParams_layer_below","status":"proved"},{"name":"Effect4.PubSub.initial_types","status":"proved"},{"name":"Effect4.PubSub.poll_types","status":"proved"},{"name":"Effect4.PubSub.slide_types","status":"proved"},{"name":"Effect4.PubSub.subscribe_types","status":"proved"},{"name":"Effect4.PubSub.tryPublish_types","status":"proved"},{"name":"Effect4.PubSub.unsubscribe_types","status":"proved"},{"name":"Effect4.Queue.Model.ascribe_formed_for_steps","status":"proved"},{"name":"Effect4.Queue.Model.empty_typed","status":"proved"},{"name":"Effect4.Queue.Model.message_nodes_for_steps","status":"proved"},{"name":"Effect4.Queue.Model.offerStep_typed","status":"proved"},{"name":"Effect4.Queue.Model.offerStep_types","status":"proved"},{"name":"Effect4.Queue.Model.offer_nodes_for_steps","status":"proved"},{"name":"Effect4.Queue.Model.pollStep_typed","status":"proved"},{"name":"Effect4.Queue.Model.pollStep_types","status":"proved"},{"name":"Effect4.Queue.Model.sizeStep_typed","status":"proved"},{"name":"Effect4.Queue.Model.takeStep_typed","status":"proved"},{"name":"Effect4.Queue.Model.takeStep_types","status":"proved"},{"name":"Effect4.Queue.Model.withdrawOffer_typed","status":"proved"},{"name":"Effect4.Queue.Model.withdrawOffer_types","status":"proved"},{"name":"Effect4.Queue.Model.withdrawTake_typed","status":"proved"},{"name":"Effect4.Queue.Model.withdrawTake_types","status":"proved"},{"name":"Effect4.Queue.bounded_types","status":"proved"},{"name":"Effect4.Queue.offer_types","status":"proved"},{"name":"Effect4.Queue.poll_types","status":"proved"},{"name":"Effect4.Queue.size_types","status":"proved"},{"name":"Effect4.Queue.take_types","status":"proved"},{"name":"Effect4.Ref.modify_callback_answers","status":"proved"},{"name":"Effect4.Semaphore.Model.empty_types","status":"proved"},{"name":"Effect4.Semaphore.Model.profile_closed","status":"proved"},{"name":"Effect4.Semaphore.Model.releaseStep_types","status":"proved"},{"name":"Effect4.Semaphore.Model.takeIfAvailableStep_types","status":"proved"},{"name":"Effect4.Semaphore.Model.takeStep_types","status":"proved"},{"name":"Effect4.Semaphore.Model.visitStep_types","status":"proved"},{"name":"Effect4.Semaphore.Model.withdrawStep_types","status":"proved"},{"name":"Effect4.Semaphore.make_types","status":"proved"},{"name":"Effect4.Semaphore.release_types","status":"proved"},{"name":"Effect4.Semaphore.takeIfAvailable_types","status":"proved"},{"name":"Effect4.Semaphore.take_types","status":"proved"},{"name":"Effect4.Semaphore.withPermitsIfAvailable_types","status":"proved"},{"name":"Effect4.Semaphore.withPermits_types","status":"proved"},{"name":"Effect4.Stream.Source.fromDefinitions_declarations","status":"proved"},{"name":"Effect4.Stream.arrayBatch_answers","status":"proved"},{"name":"Effect4.Supervision.raceCompleteFirst_accepts","status":"proved"},{"name":"Effect4.Supervision.raceCompleteFirst_keeps","status":"proved"},{"name":"Effect4.SynchronizedRef.get_answers","status":"proved"},{"name":"Effect4.SynchronizedRef.make_answers","status":"proved"},{"name":"Effect4.SynchronizedRef.modify_answers","status":"proved"},{"name":"Test.Dogfood.Scenario.Atomic.Store.shop_stages","status":"goal"},{"name":"Test.Dogfood.Scenario.Atomic.atomic","status":"modulo"},{"name":"Test.Dogfood.Scenario.Atomic.bounded","status":"proved"},{"name":"Test.Dogfood.Scenario.Atomic.committed","status":"modulo"},{"name":"Test.Dogfood.Scenario.Atomic.counted","status":"modulo"}],"status":"open","title":"State: the world types every cell at any type, with rows as templates","top":[{"name":"Effect4.Program.Typed.order_refl","status":"proved"},{"name":"Effect4.Program.Typed.order_trans","status":"proved"},{"name":"Effect4.Program.Typed.refMake_extension","status":"proved"},{"name":"Effect4.Program.Typed.deferredMake_extension","status":"proved"},{"name":"Effect4.Program.Typed.memoBuild_extension","status":"proved"},{"name":"Effect4.Program.Typed.fold_typed_atomic_update","status":"proved"},{"name":"Effect4.Program.Typed.handle_identity_laws","status":"proved"},{"name":"Effect4.Program.Typed.saved_mask_image_membership","status":"proved"},{"name":"Effect4.Program.Typed.scoped_body_substitution_boundary","status":"proved"}]},{"id":"R5","next":["Effect4.Run.CallTree.request_leads"],"openParts":[{"on":"","state":"untriaged","text":"lower_refines_build: the machine's build of a layer refines `build` (decisions row 147)"},{"on":"","state":"untriaged","text":"reference keys, Config, minted keys, and context validation at any runtime bridge (system map §8, R5)"}],"placed":[{"name":"Effect4.Program.expanded_refs_nil_of_wf","status":"proved"},{"name":"Effect4.Program.typeOfProgram_expandRefs","status":"proved"},{"name":"Test.Dogfood.Scenario.Routing.Calls.tree_needs_token","status":"proved"},{"name":"Test.Dogfood.Scenario.Routing.unauthorized_calls_nothing","status":"modulo"}],"status":"open","title":"Services: the service table, layers and provision","top":[{"name":"Effect4.Program.Provision.build_total","status":"proved"}]},{"id":"R6","next":["Effect4.Program.Typed.Evaluating.countdown_parks_positional","Effect4.Run.CallTree.request_leads","Test.Dogfood.Scenario.Timeout.cleanup_keeps","Test.Dogfood.Scenario.Timeout.retries_declared","Test.Dogfood.Scenario.Workers.Assertions.logs_step"],"openParts":[{"on":"decisions row 97: the handle declarations, parked by the owner on 2026-09-30","state":"ruling","text":"admit_sound's value half: executable admission implies the ghost AnswerOk on success values (waits on decisions row 97's handle declarations)"},{"on":"the host as a relation between the machine's calls and its answers (`HostSpec`), in place of a predicate on tapes","state":"definition","text":"H related to the machine: M6's premise is a predicate on tapes (decisions row 95), not a host relation"},{"on":"decisions rows 98 to 100: the typed replay route, when the guarantee is claimed, host resources","state":"ruling","text":"receipt and application on the keyed lifecycle, and their converse (host-boundary §4.5; decisions rows 98–100, parked by the owner, 2026-09-30)"},{"on":"","state":"untriaged","text":"a world extension meeting C5, a retirement edge, per-row cancellation, one root (DI-58, DI-65)"},{"on":"the table-aware reference and the reply correspondence above; decisions row 99 says when it is claimed","state":"work","text":"the public typed guarantee for programs using host services (decisions row 99)"},{"on":"","state":"proposed","text":"expansion-keeps-call (proposed claim; host-session-protocol): the expansion of a program's layer references keeps a call at its address, so the instance that the session reads on the expanded program is the checker's answer at the call that ran; origin_addresses_call proves the address on the program itself, and a finite evaluation reads the instance (Test/Api/TypedReplies.lean) (decisions row 323)"},{"on":"","state":"proposed","text":"replay-at-call-instance (proposed claim; host-session-protocol): the checked replay of a tape (replayCheckedFrom, Api.replay) and the OCaml engine still admit a reply at the row's own columns alone, so a tape that a session recorded with an answer admitted at its call's instance is refused there (decisions row 323)"}],"placed":[{"name":"Effect4.Program.Agreement.compilesBO_bind","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_catchCause","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_catchIf","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_exit","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_iterate","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_matchCause","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_onExit","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_select","status":"proved"},{"name":"Effect4.Program.Agreement.compilesBO_suspend","status":"proved"},{"name":"Effect4.Program.Agreement.localRunC_compileB","status":"proved"},{"name":"Effect4.Program.Agreement.localRunC_compileBO","status":"proved"},{"name":"Effect4.Program.Agreement.localRunC_to_rowsB","status":"proved"},{"name":"Effect4.Program.Agreement.localWaitC_to_rowsB","status":"proved"},{"name":"Effect4.Program.BodiesHasTy.bodyAt","status":"proved"},{"name":"Effect4.Program.Denote.hostRunB_stable","status":"proved"},{"name":"Effect4.Program.Denote.observeRows_project","status":"proved"},{"name":"Effect4.Program.Eff.partAt_at","status":"proved"},{"name":"Effect4.Program.Eff.partAt_of_hasTy","status":"proved"},{"name":"Effect4.Program.Part.bodyAt_at","status":"proved"},{"name":"Effect4.Program.Sched.run_eq_ref_table","status":"proved"},{"name":"Effect4.Program.checkModule_programCallAt","status":"proved"},{"name":"Effect4.Program.handles_of_payloadFieldTy","status":"proved"},{"name":"Effect4.Program.hasTy_callAt","status":"proved"},{"name":"Effect4.Program.lookup_programCalls","status":"proved"},{"name":"Effect4.Program.moduleHasTy_programCallAt","status":"proved"},{"name":"Effect4.Program.programCallAt_rowTy","status":"proved"},{"name":"Effect4.Run.CallTree.bound_in_tree","status":"modulo"},{"name":"Effect4.Run.CallTree.request_leads","status":"goal"},{"name":"Effect4.Run.applied_selects","status":"proved"},{"name":"Effect4.Run.control_retires","status":"proved"},{"name":"Effect4.Run.denoteRowsB_eq_session_host","status":"proved"},{"name":"Effect4.Run.denoteRows_eq_session","status":"proved"},{"name":"Effect4.Run.denoteRows_eq_session_host","status":"proved"},{"name":"Effect4.Run.ending_of_tape","status":"proved"},{"name":"Effect4.Run.h8_loopedRows","status":"proved"},{"name":"Effect4.Run.runWith_denotes","status":"proved"},{"name":"Effect4.Run.runWith_denotesB","status":"proved"},{"name":"Effect4.Run.runWith_guarded_denotes","status":"proved"},{"name":"Effect4.Run.runWith_guarded_denotesB","status":"proved"},{"name":"Effect4.Run.runWith_host_denotes","status":"proved"},{"name":"Effect4.Run.runWith_host_denotesB","status":"proved"},{"name":"Effect4.Run.runWith_layer_denotes","status":"proved"},{"name":"Effect4.Run.sessionSystem_finished","status":"proved"},{"name":"Effect4.Run.sessionSystem_finishes","status":"proved"},{"name":"Effect4.Run.session_eq_ref","status":"proved"},{"name":"Effect4.Run.session_keys_once","status":"proved"},{"name":"Test.Dogfood.Scenario.Timeout.stale_never_applies","status":"proved"},{"name":"Test.Dogfood.Scenario.Timeout.timeout","status":"modulo"},{"name":"Test.Dogfood.Scenario.Workers.workers","status":"modulo"},{"name":"Test.Dogfood.Scenario.receipt_inert","status":"proved"}],"status":"open","title":"The host: a lawful HostSpec, receipt and application, DI-57's table-aware reference","top":[{"name":"Effect4.Program.Typed.reachable_typed","status":"modulo"},{"name":"Effect4.Api.HostSession.preflight_success_prepared_fits","status":"proved"},{"name":"Effect4.Api.HostSession.preflight_failure_noShapeDefect","status":"proved"},{"name":"Effect4.Program.instance_prepared_success","status":"proved"},{"name":"Effect4.Run.origin_addresses_call","status":"proved"},{"name":"Effect4.Run.reached_callInstance","status":"proved"},{"name":"Effect4.Run.session_eq_ref","status":"proved"},{"name":"Effect4.Run.denoteRows_eq_session_host","status":"proved"},{"name":"Effect4.Run.runWith_denotes","status":"proved"},{"name":"Effect4.Run.h8_loopedRows","status":"proved"},{"name":"Effect4.Run.denoteRowsB_eq_session_host","status":"proved"},{"name":"Effect4.Run.runWith_denotesB","status":"proved"}]},{"id":"R7","next":[],"openParts":[{"on":"decisions row 82: typed behaviour values","state":"ruling","text":"resolve_typed: a resolved code entry is typed at its reference's type, with capture layout fixed at resolution and identity by allocation or structure (decisions row 82, open)"},{"on":"decisions row 82: typed behaviour values","state":"ruling","text":"code-valued services with a capture law, R5's through R7 (decisions row 82)"},{"on":"","state":"untriaged","text":"the reserved contract of a retained behaviour: its entry, captures, invocation context and lifetime, designed now for the planned Cache, Pool and callback modules; the value form and its evaluator wait for the first of them (decisions row 234)"},{"on":"","state":"proposed","text":"posted-body-entry-typed (proposed claim; residual-program-typing): a checked Eff body supplied at a posting site, with its resolved entry, typed lexical environment and selected service policy, stays typed under world extension (decisions rows 82, 225)"}],"placed":[],"status":"open","title":"Retained behaviour: a resolved code entry is typed at its reference's type","top":[]},{"id":"R8","next":[],"openParts":[{"on":"decisions row 28: what verified lowering means","state":"ruling","text":"typed lowering open: what verified lowering means (decisions row 28); the OCaml engine is outside M7 until it is ruled"},{"on":"decisions row 108: the owner places the numbers slice","state":"ruling","text":"numbers open (decisions row 108): each face equal to the reference inside its bounded profile and refusing outside it, intermediates included (DI-56)"},{"on":"","state":"untriaged","text":"K2 holds on the readable domain; since the state plan's T5, part B, a loop's stated cursor type and an operation's type arguments read back through one checked type reader (Classes.readTyChecked, DI-91's fallback (a) in a checked form), and the domain excludes a stated type outside the readable types (Classes.ReadableTy: a collision such as int, a spelling with no reading such as a handle type) and every list fold that states its accumulator's type, which is printed and not read"},{"on":"the fiber identity carrier of DI-81, ruled and not landed","state":"work","text":"one identity bijection across faces: the fiber identity carrier is ruled, not landed (DI-81)"},{"on":"","state":"untriaged","text":"the TypeScript face against rc.112: finite checks only, by the truth harness and by the keyed lane's runs of the scenarios' scripts on their printed modules (DI-49; decisions row 254); the truth harness compares each entry's exit with the same entry's, the fork run's and the sync run's apart; two Semaphore programs settle on two exits under their two entries, and the two faces give one exit on each; three Pool programs settle on two exits too, and their sync runs are pinned apart from the allocation order on the Lean face (lateSightsSync, harness/truth/Truth.lean) (Test/contracts/faces.contract.md, the amendments of 2026-10-06; decisions row 279)"},{"on":"","state":"untriaged","text":"the profile as data, named by each face's law (decisions row 79, R79.5)"}],"placed":[{"name":"Effect4.Codegen.Templates.printTypedAt_none","status":"proved"},{"name":"Effect4.Codegen.eraseJoinArgs_printTyped","status":"proved"},{"name":"Effect4.Codegen.eraseJoinArgs_printTypedAt","status":"proved"},{"name":"Effect4.Codegen.eraseJoinArgs_printTypedSitesAt","status":"proved"},{"name":"Effect4.Codegen.readTyped_exact","status":"proved"},{"name":"Effect4.Codegen.readTyped_printTyped","status":"proved"},{"name":"Effect4.Codegen.readTyped_printTypedAt","status":"proved"},{"name":"Effect4.Program.mask_rows_table_premises","status":"proved"},{"name":"Effect4.Program.printTyped_eq_print","status":"proved"},{"name":"Effect4.Program.readModule_printModule_defs","status":"proved"},{"name":"Effect4.Run.funded_replays","status":"proved"},{"name":"Effect4.Run.tape_replays","status":"proved"},{"name":"Test.Dogfood.Scenario.Atomic.unsuspended_runs","status":"proved"},{"name":"Test.Dogfood.Scenario.Lowered.shown_views_opened","status":"proved"}],"status":"open","title":"Runs and faces as named connections: equal to the reference inside a profile, refused outside it","top":[{"name":"Effect4.Program.read_print","status":"proved"},{"name":"Effect4.Program.read_exact","status":"proved"},{"name":"Effect4.Program.Agreement.run_eq_meaning","status":"proved"},{"name":"Effect4.Program.Agreement.loopAgreement","status":"proved"},{"name":"Effect4.Program.Sched.run_eq_ref","status":"proved"},{"name":"Effect4.Program.mask_rows_table_premises","status":"proved"},{"name":"Effect4.Program.printTyped_eq_print","status":"proved"}]},{"id":"R9","next":["Effect4.Program.Typed.Evaluating.countdown_parks_positional"],"openParts":[{"on":"decisions row 117: the frame contract, designed first","state":"ruling","text":"part two: a saved frame transports missingService across a change in the requirement row (decisions row 117)"}],"placed":[{"name":"Effect4.Program.Typed.Evaluating.countdown_parks_positional","status":"goal"}],"status":"open","title":"Never goes wrong: M7a–c on M7Fragment (the empty host table, answer-free tapes)","top":[{"name":"Effect4.Program.Typed.m7_proved","status":"modulo"},{"name":"Effect4.Program.Typed.m7_admitted","status":"modulo"}]},{"id":"R10","next":["Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","Effect4.Run.CallTree.request_leads","Test.Dogfood.Scenario.Timeout.retries_declared"],"openParts":[{"on":"","state":"proposed","text":"pool-expansion-agrees (proposed claim; translation-simulation): Pool's expansion agrees with the first profile's public observation, under its premises on the callers, interruption, the close and the work budget; its parts on one atomic step are pool_steps_agree and the eleven attempt statements of the operations, each on every model state (lease_attempt, withdraw_attempt, return_attempt, select_attempt, close_attempt, drain_attempt, make_makes, and four at the names that the operation mints; the lease, the withdrawal and the closer's step take an injective table); the operations, the wake, the close and the refusal at a closed pool are library programs (src/Effect4/Library/Pool/Ops.lean); the wrapper's run for the borrower and for the closer, the wake across helpers and the protected lease's run are not stated; finite controls: ten cases on the Lean machine, on the generated engine and on rc.112, one schedule each (Test/Program/PoolPublic.lean) (decisions rows 79, 226, 267 to 269, 276, 279)"},{"on":"","state":"untriaged","text":"a composed module's law, Agrees profile module expansion (decisions row 79, R79.5; DI-89)"},{"on":"","state":"untriaged","text":"no form has a behaviour law (DI-89)"},{"on":"","state":"untriaged","text":"the agreement half of mask-printed-form-profile (translation-simulation, serving R10 and R11): the compiled derived form against the named release's printed form, equal observation on a named observation under compatible decisions; the three operations more than the native mask are measured on the machine and on the target, not proved, and the cuts at the two checkpoints on the pin rest on Codex's runs; the expansion, the typing, the readability and the two checkpoints on the machine are mask_printed_form_profile (decisions rows 245, 246); no goal states the agreement"},{"on":"","state":"untriaged","text":"none of DI-89's named forms exists: retry, catchTag, forEach, all, Schedule over iterate, the option and result eliminators"},{"on":"the model probe's D9, not ruled (DI-89)","state":"ruling","text":"per form: reader admission, a readable expansion (C8) and a stable identity (DI-89; the model probe's D9, unruled)"},{"on":"","state":"untriaged","text":"DI-39's six rows not landed"},{"on":"","state":"untriaged","text":"a composite's contract by a stuttering route (post-Phase C §11.4)"},{"on":"","state":"proposed","text":"queue-expansion-agrees (proposed claim; translation-simulation): the Queue's expansion agrees with its application-signature clients on the Queue's profile, which defines the public requests, commits, replies, interruptions and terminations before it hides a private cell or a helper identity (decisions rows 79, 219 to 222, 230); its first application on one program is two planned goals, held_within_fed and fed_accounted (Test/Dogfood/Scenario/QueueWorkers.lean), with finite controls on the Lean machine, three engine runs and 25 host runs; no law of a whole run"},{"on":"","state":"proposed","text":"semaphore-expansion-agrees (proposed claim; translation-simulation): Semaphore's expansion agrees with the first profile's public observation; it keeps the selected identities and the permit commits, with its premises on the wake's policy, the admitted callers, interruption and the work budget; its parts on one atomic step are semaphore-steps-agree and the nine attempt statements of the operations, each on every model state; the operations, the walk and the protected form are library programs (src/Effect4/Library/Semaphore/Ops.lean); the wrapper's run, the walk across visits and the protected form's run are not stated (decisions rows 79, 226, 259 to 261, 276)"},{"on":"","state":"proposed","text":"partitioned-semaphore-expansion-agrees (proposed claim; translation-simulation): latest's finite natural-count profile observes registration, partial reservation, ordered partition selection, cancellation settlement, inline client execution and the final reply under admitted client tapes; partitioned-semaphore-bookkeeping proves only four scalar source readings, including explicit premises for reservation; the waiter model, contextual identity correspondence, delivery and protected acquisition connection remain unstated; no whole-run or progress claim (decisions rows 330, 331, 333 and 335)"},{"on":"","state":"proposed","text":"stream-array-run-agrees (proposed claim; translation-simulation): the array source's public pulls return its initial finite sequence once and then End, under the admitted caller and observation profile; stream-array-step-agreement proves the allocated cell's batch transition; whole pulls, repeated opens, finalization and the signed Done/End correspondence remain open (decisions rows 331 and 335)"},{"on":"","state":"proposed","text":"synchronized-ref-expansion-agrees (proposed claim; translation-simulation): pure callback modification observes Ref's reply and stored value under Semaphore's protected permit protocol; make_answers, get_answers and modify_answers prove typing under their stated premises; protected acquisition, cancellation, cleanup and composed run agreement remain open; effectful callbacks stay outside this slice (decisions rows 330, 331 and 335)"},{"on":"","state":"proposed","text":"pubsub-single-expansion-agrees (proposed claim; translation-simulation): the capacity-one, replay-zero profile observes natural messages and live logical subscriptions; pubsub-single-steps-agree proves six source readings under fresh subscription and scope premises; contextual source-object correspondence, exact numeric host admission, waiting, delivery, cancellation, lifetime and backpressure execution remain open (decisions rows 330, 331 and 335)"},{"on":"","state":"proposed","text":"posted-wake-profile-agrees (proposed claim; translation-simulation): one producer's posted delivery, with its dispatch owner, priority, receiver and token, capture time, coalescing and cancellation, agrees with its module expansion; the Queue's producer is first (decisions rows 81, 220, 225; DB-13)"},{"on":"","state":"proposed","text":"atomic-attempt-agreement (proposed claim; translation-simulation): the restricted transaction profile against the named release, with flat nesting, immutable payloads and explicit retry; then tx-choice-rollback-union for the retry-only alternative (decisions rows 80, 84, 223, 224)"},{"on":"","state":"untriaged","text":"fair composition of tickets that are enrolled apart is outside the first profile: the opposing-ticket cycle stays a refused case until an enrolment protocol resolves it (decisions row 223)"}],"placed":[{"name":"Effect4.Api.Author.build_retains","status":"proved"},{"name":"Effect4.Api.Author.elaborateModule_no_declarations","status":"proved"},{"name":"Effect4.Api.Author.elaboration_eq_getD","status":"proved"},{"name":"Effect4.Api.Author.finishBuild_retains","status":"proved"},{"name":"Effect4.Channel.Internal.mapDoneEffectOf_protocol","status":"proved"},{"name":"Effect4.Channel.Internal.mapEffectOf_protocol","status":"proved"},{"name":"Effect4.Latch.Model.awaitStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.closeStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.flushStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.initialStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.isOpenStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.latch_registration_agrees","status":"proved"},{"name":"Effect4.Latch.Model.latch_steps_agree","status":"proved"},{"name":"Effect4.Latch.Model.wakeStep_agrees","status":"proved"},{"name":"Effect4.Latch.Model.withdrawStep_agrees","status":"proved"},{"name":"Effect4.Modules.Step.frame","status":"proved"},{"name":"Effect4.Modules.Step.sound","status":"proved"},{"name":"Effect4.Modules.cell_read","status":"proved"},{"name":"Effect4.Modules.reads_ascribe","status":"proved"},{"name":"Effect4.Modules.step_updates","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.available_eval","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.available_reads","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.bookkeeping_agrees","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.initial_eval","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.initial_reads","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.reserve_eval","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.reserve_reads","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.tryTake_eval","status":"proved"},{"name":"Effect4.PartitionedSemaphore.Model.tryTake_reads","status":"proved"},{"name":"Effect4.Pool.Model.closeStep_agrees","status":"proved"},{"name":"Effect4.Pool.Model.drainStep_agrees","status":"proved"},{"name":"Effect4.Pool.Model.leaseStep_agrees","status":"proved"},{"name":"Effect4.Pool.Model.pool_steps_agree","status":"proved"},{"name":"Effect4.Pool.Model.returnStep_agrees","status":"proved"},{"name":"Effect4.Pool.Model.selectStep_agrees","status":"proved"},{"name":"Effect4.Pool.Model.withdrawStep_agrees","status":"proved"},{"name":"Effect4.Pool.close_attempt","status":"proved"},{"name":"Effect4.Pool.drain_attempt","status":"proved"},{"name":"Effect4.Pool.drain_attempt_minted","status":"proved"},{"name":"Effect4.Pool.lease_attempt","status":"proved"},{"name":"Effect4.Pool.lease_attempt_minted","status":"proved"},{"name":"Effect4.Pool.make_makes","status":"proved"},{"name":"Effect4.Pool.return_attempt","status":"proved"},{"name":"Effect4.Pool.return_attempt_minted","status":"proved"},{"name":"Effect4.Pool.select_attempt","status":"proved"},{"name":"Effect4.Pool.withdraw_attempt","status":"proved"},{"name":"Effect4.Pool.withdraw_attempt_minted","status":"proved"},{"name":"Effect4.Program.NativeAtom.tagHit_record","status":"proved"},{"name":"Effect4.Program.StoreExecution.modify_loop","status":"proved"},{"name":"Effect4.Program.Ty.sub_instantiate_polarity","status":"proved"},{"name":"Effect4.Program.Var4.semiring_laws","status":"proved"},{"name":"Effect4.Program.mask_printed_form_profile","status":"proved"},{"name":"Effect4.PubSub.Model.initial_eval","status":"proved"},{"name":"Effect4.PubSub.Model.initial_reads","status":"proved"},{"name":"Effect4.PubSub.Model.poll_eval","status":"proved"},{"name":"Effect4.PubSub.Model.poll_reads","status":"proved"},{"name":"Effect4.PubSub.Model.single_steps_agree","status":"proved"},{"name":"Effect4.PubSub.Model.slide_eval","status":"proved"},{"name":"Effect4.PubSub.Model.slide_reads","status":"proved"},{"name":"Effect4.PubSub.Model.subscribe_eval","status":"proved"},{"name":"Effect4.PubSub.Model.subscribe_reads","status":"proved"},{"name":"Effect4.PubSub.Model.tryPublish_eval","status":"proved"},{"name":"Effect4.PubSub.Model.tryPublish_reads","status":"proved"},{"name":"Effect4.PubSub.Model.unsubscribe_eval","status":"proved"},{"name":"Effect4.PubSub.Model.unsubscribe_reads","status":"proved"},{"name":"Effect4.Pull.catchDone_meaning","status":"proved"},{"name":"Effect4.Pull.matchAnswer_meaning","status":"proved"},{"name":"Effect4.Pull.matchEffect_meaning","status":"proved"},{"name":"Effect4.Pull.matchEffect_protocol","status":"proved"},{"name":"Effect4.Queue.Execution.offer_loop","status":"proved"},{"name":"Effect4.Queue.Execution.take_loop","status":"proved"},{"name":"Effect4.Queue.Model.acceptLoop_length_le","status":"proved"},{"name":"Effect4.Queue.Model.first_profile_closed","status":"proved"},{"name":"Effect4.Queue.Model.flatMap_split","status":"proved"},{"name":"Effect4.Queue.Model.offerStep_agrees","status":"proved"},{"name":"Effect4.Queue.Model.offer_jobs","status":"proved"},{"name":"Effect4.Queue.Model.pollStep_agrees","status":"proved"},{"name":"Effect4.Queue.Model.poll_jobs","status":"proved"},{"name":"Effect4.Queue.Model.positive_suspend_step_capacity","status":"proved"},{"name":"Effect4.Queue.Model.queue_steps_agree","status":"proved"},{"name":"Effect4.Queue.Model.sizeStep_agrees","status":"proved"},{"name":"Effect4.Queue.Model.stateJobs_afterAccept","status":"proved"},{"name":"Effect4.Queue.Model.takeStep_agrees","status":"proved"},{"name":"Effect4.Queue.Model.take_jobs","status":"proved"},{"name":"Effect4.Queue.Model.withdrawOffer_agrees","status":"proved"},{"name":"Effect4.Queue.Model.withdrawOffer_jobs","status":"proved"},{"name":"Effect4.Queue.Model.withdrawTake_agrees","status":"proved"},{"name":"Effect4.Queue.Model.withdrawTake_jobs","status":"proved"},{"name":"Effect4.Queue.bounded_makes","status":"proved"},{"name":"Effect4.Queue.offer_attempt","status":"proved"},{"name":"Effect4.Queue.offer_attempt_minted","status":"proved"},{"name":"Effect4.Queue.offer_withdrawal","status":"proved"},{"name":"Effect4.Queue.offer_withdrawal_minted","status":"proved"},{"name":"Effect4.Queue.poll_attempt","status":"proved"},{"name":"Effect4.Queue.size_read","status":"proved"},{"name":"Effect4.Queue.take_attempt","status":"proved"},{"name":"Effect4.Queue.take_attempt_minted","status":"proved"},{"name":"Effect4.Queue.take_withdrawal","status":"proved"},{"name":"Effect4.Queue.take_withdrawal_minted","status":"proved"},{"name":"Effect4.Ref.decode_modifySome","status":"proved"},{"name":"Effect4.Ref.decode_option","status":"proved"},{"name":"Effect4.Ref.encode_getD","status":"proved"},{"name":"Effect4.Ref.getAndSet_agrees","status":"proved"},{"name":"Effect4.Ref.getAndUpdateSome_agrees","status":"proved"},{"name":"Effect4.Ref.getAndUpdate_agrees","status":"proved"},{"name":"Effect4.Ref.get_agrees","status":"proved"},{"name":"Effect4.Ref.kernel_agrees","status":"proved"},{"name":"Effect4.Ref.make_agrees","status":"proved"},{"name":"Effect4.Ref.modifySome_agrees","status":"proved"},{"name":"Effect4.Ref.modify_agrees","status":"proved"},{"name":"Effect4.Ref.modify_callback_agrees","status":"proved"},{"name":"Effect4.Ref.ref_steps_agree","status":"proved"},{"name":"Effect4.Ref.setAndGet_agrees","status":"proved"},{"name":"Effect4.Ref.set_agrees","status":"proved"},{"name":"Effect4.Ref.updateAndGet_agrees","status":"proved"},{"name":"Effect4.Ref.updateSomeAndGet_agrees","status":"proved"},{"name":"Effect4.Ref.updateSome_agrees","status":"proved"},{"name":"Effect4.Ref.update_agrees","status":"proved"},{"name":"Effect4.Semaphore.Model.releaseStep_agrees","status":"proved"},{"name":"Effect4.Semaphore.Model.semaphore_steps_agree","status":"proved"},{"name":"Effect4.Semaphore.Model.takeIfAvailableStep_agrees","status":"proved"},{"name":"Effect4.Semaphore.Model.takeStep_agrees","status":"proved"},{"name":"Effect4.Semaphore.Model.visitStep_agrees","status":"proved"},{"name":"Effect4.Semaphore.Model.withdrawStep_agrees","status":"proved"},{"name":"Effect4.Semaphore.make_makes","status":"proved"},{"name":"Effect4.Semaphore.release_attempt","status":"proved"},{"name":"Effect4.Semaphore.takeIfAvailable_attempt","status":"proved"},{"name":"Effect4.Semaphore.take_attempt","status":"proved"},{"name":"Effect4.Semaphore.take_attempt_minted","status":"proved"},{"name":"Effect4.Semaphore.take_withdrawal","status":"proved"},{"name":"Effect4.Semaphore.take_withdrawal_minted","status":"proved"},{"name":"Effect4.Semaphore.visit_attempt","status":"proved"},{"name":"Effect4.Semaphore.visit_attempt_minted","status":"proved"},{"name":"Effect4.Stream.arrayStep_agrees","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_built_program","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_elaborates","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_main_eq","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_main_some","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_refs_nil","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_built_program","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_elaborates","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_main_eq","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_main_some","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_refs_nil","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.accounted_of_ledger","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.exit_eq","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.fed_perm","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.filterMap_gave","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.flatMap_offers","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.heldWithin_of_ledger","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.held_of_shows","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.ledger_opened","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.opened_exit","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step","status":"goal"},{"name":"Test.Dogfood.Scenario.QueueWorkers.held_within_fed","status":"modulo"},{"name":"Test.Dogfood.Scenario.QueueWorkers.queueWorkers","status":"modulo"},{"name":"Test.Dogfood.Scenario.Routing.infrastructure_escapes","status":"proved"},{"name":"Test.Dogfood.Scenario.Routing.routing","status":"modulo"},{"name":"Test.Dogfood.Scenario.Routing.tagIs_pair","status":"proved"},{"name":"Test.Dogfood.Scenario.Timeout.retries_declared","status":"goal"}],"status":"open","title":"Library code inherits theorems: a composed module's law is Agrees profile module expansion","top":[{"name":"Effect4.Codegen.Forms.andThenEffect_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.andThenContinuation_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.andThenThunk_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.as_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.asVoid_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.tapContinuation_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.tapEffect_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.ensuring_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.void_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.die_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.yieldKey_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.matchCause_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.matchCauseEffect_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.yieldNow_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.forkChildDefault_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.forkDetachDefault_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.forkInDefault_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.forkScopedDefault_typed","status":"proved"},{"name":"Effect4.Codegen.Forms.releaseOne_typed","status":"proved"},{"name":"Effect4.Program.mask_printed_form_profile","status":"proved"}]},{"id":"R11","next":["Effect4.Program.FinalizerRun.once_placed_pushes_once","Test.Dogfood.Scenario.Atomic.Cleanup.log_debits","Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","Test.Dogfood.Scenario.Timeout.cleanup_keeps","Test.Dogfood.Scenario.Workers.Assertions.logs_step"],"openParts":[{"on":"","state":"proposed","text":"pool-lease-return and pool-close-waits (proposed claims; scope-lifetime-finalization): a committed lease returns its item at most once, and exactly once where its exit ended; a lease that is refused at a closing pool commits nothing; the close ends only after every lease returned, and each item is then finalized once; the model's facts are giveBack_front, giveBack_once, close_refuses and drain_waits; the forms are stated, scoped and typed: use is the protected form over the lease's loop and the return, and the close is the wrapper over the closer's step, registered by make after the acquisitions (use_types, close_answers, make_types); their steps are return_attempt, close_attempt and drain_attempt; no goal states a clause, and each waits for the carrying fact of a region and for a finalizer's law of a run; finite controls: a lease in its own mask is lost under an interruption, a wait inside a mask of the form's making cannot be interrupted, the stand-in for the mask fails under a masked caller, and a close that does not wait finalizes an item that a borrower still holds (Test/Program/PoolTraces.lean, traces 4, 5 and 8; Test/Program/PoolPublic.lean, PP7) (decisions rows 222, 267, 268, 276, 279)"},{"on":"","state":"untriaged","text":"the whole run open: release at most once per registration, counted by identity (DB-07); its planned goals are three, one program each: Workers.releases_once, cleans_once and QueueWorkers.releases_once"},{"on":"","state":"untriaged","text":"the whole run open: exactly once in close order over closed scopes and structured regions, with a completed-cleanup receipt (DB-07, DI-65)"},{"on":"","state":"untriaged","text":"state retained at a frontier, open scopes closed only by an explicit abandon (the owner's ruling of 2026-09-07)"},{"on":"the model probe's D8, not ruled (DB-07)","state":"ruling","text":"a scope a finished run leaves open is an observation, as in rc.112 (the model probe's D8, unruled per DB-07)"},{"on":"","state":"untriaged","text":"the carrying fact of a region (scope-lifetime-finalization, serving saved-mask-region-bracket): the stack shape above ++ below is kept along the fiber machine's evaluator arms and commands while the fiber is inside the region, until the command that ends it; the bracket takes the shape as a premise at the later cut; its statement elaborates and a finite probe on eight runs finds no counterexample (docs/research/2026-10-06-seat-BRACKET-carry.lean.txt); the frame machine's own step keeps the shape (step_under); no goal states it"},{"on":"","state":"proposed","text":"semaphore-protected-permit (proposed claim; scope-lifetime-finalization): across every prefix of a run a committed activation of Semaphore's protected form releases at most once; an activation whose exit has completed through its cleanup has released exactly once, with enough work for the cleanup or a retained frontier; while the cleanup has not completed, the release obligation stays in the observation, and a frontier is no completed exit; the form is one mask over the take's loop, the hook and the body at the restore site (protectedBy), scoped and typed (protectedBy_has, withPermits_types); no goal states a clause, and each waits for the carrying fact of a region; finite controls: a take in its own mask loses its permit under an interruption, a wait inside a mask of the form's making cannot be interrupted, and the stand-in for the mask fails under a masked caller (Test/Program/SemaphoreTraces.lean, traces 4, 5 and 8); Pool's lease is the second user (decisions rows 222, 259, 276)"},{"on":"","state":"proposed","text":"waiting-request-obligation-preserved (proposed claim; reactive-scheduling, serving R10 to R12): a selected request's notification stays in store debt, queued commands, dispatcher work or the receiver's accepted continuation until it is discharged; when cancellation wins and withdraws the request before consumption, the operation consumes nothing; a completed commit stays committed, even when the caller is interrupted before its continuation; an interruption that is only requested, and stays pending under a mask, withdraws nothing; an old token is inert after rearming (decisions rows 221, 222); the Queue model's half of its first clause is proved on the first profile (queue-first-step-invariant), and the wrapper's run stays open"}],"placed":[{"name":"Effect4.Machine.ControlWeights.replace_sum","status":"proved"},{"name":"Effect4.Machine.ControlWeights.replace_sum_le_omitted","status":"proved"},{"name":"Effect4.Machine.FinalizerCredits.finalizerOr_debit","status":"proved"},{"name":"Effect4.Machine.FinalizerCredits.getCont_le","status":"proved"},{"name":"Effect4.Machine.FinalizerCredits.step_debit","status":"proved"},{"name":"Effect4.Machine.PopTrace.getCont_spec","status":"proved"},{"name":"Effect4.Machine.StackLedger.funded_reachable","status":"proved"},{"name":"Effect4.Machine.saved_mask_chain_runs","status":"proved"},{"name":"Effect4.Machine.saved_mask_pop_discipline","status":"proved"},{"name":"Effect4.Machine.saved_mask_region_bracket","status":"proved"},{"name":"Effect4.Pool.Model.close_refuses","status":"proved"},{"name":"Effect4.Pool.Model.drain_waits","status":"proved"},{"name":"Effect4.Pool.Model.giveBack_front","status":"proved"},{"name":"Effect4.Pool.Model.giveBack_once","status":"proved"},{"name":"Effect4.Program.FinalizerRun.funded_reachable","status":"proved"},{"name":"Effect4.Program.FinalizerRun.once_placed_pushes_once","status":"goal"},{"name":"Effect4.Program.FinalizerRun.starts_le_pushes","status":"proved"},{"name":"Effect4.Program.LedgerFinalizer.funded_reachable","status":"proved"},{"name":"Effect4.Program.Moves.evaluateNative_maskChain","status":"proved"},{"name":"Effect4.Program.Moves.evaluateNative_under","status":"proved"},{"name":"Effect4.Program.Moves.evaluatePrim_producer","status":"proved"},{"name":"Effect4.Program.Moves.evaluatePrim_under","status":"proved"},{"name":"Effect4.Program.Moves.iteration_currentOpCount","status":"proved"},{"name":"Effect4.Program.Moves.iteration_under","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.AdministrativeKept.non_evaluator","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.AdministrativeQueue.non_evaluator","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CausePop.armE","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CausePop.failure_stack_eq","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CausePop.getCont_cause","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CausePop.popFrom_cause","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CausePop.resumeCause","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CommandClosure.command","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.CommandClosure.joined","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.Funded.read","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.after_add_code_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.async_route_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.close_program_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.compile_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.emit_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.fin_program_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.load_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.load_funded","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.prog_of_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.registration_template","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.response_credits_bounded","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.source_op_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.stack_before_action","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.stack_before_iterator","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.stack_before_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.stack_before_suspend","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.stack_credits_bounded","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Control.update_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.add_memo_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.bind_service_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.build_scope_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.combine_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.constant_push_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.constant_stack_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.constant_start","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.contA_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.contE_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.context_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.exit_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.failure_fiber_le","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.failure_stack_le","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.forced_yield_iteration","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.forced_yield_loop_funded","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_compile_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_construction_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_inner_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_resolve_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_with_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.layer_zero_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.loop_top_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.merge_context_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.provide_body_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.provide_layer_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.provide_then_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.region_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.resolve_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.service_lookup_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.store_contA_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.store_contE_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.store_exit_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.suspend_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.update_body_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Evaluation.yield_wrapper_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Execution.history","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Execution.load","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Execution.outer_custody","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Execution.ready_emit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Execution.ready_update","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.armA_counts","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.armE_counts","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.finalizerEvents_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.frame_failure_le","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.getCont_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.interp_loopEnter","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.interp_suspend","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.joinPushed_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.noPush_append","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.noPush_counts","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.passEvents_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.passPushed_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.popFrom_no_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.push_onSuccess","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.registrations_append","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.resumeCause_counts","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.resumeValue_counts","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.stack_full","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.starts_append","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.step","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.sync_stack_le","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameDebit.withFiber_suspend_le","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.FrameSequencing.step","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.HistoryLift.decision","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.HistoryLift.fold_lift","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.LoopCommand.deliver","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.LoopCommand.loop","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeDebit.sync_op","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeIterationDebit.iteration","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeMachineShape.iteration","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeMachineShape.native","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeParkDebit.primitive","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeScopeDebit.native","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_not_finished","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.action_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.countdown_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.exit_pop_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.finalizer_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.frame_step","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.iteration_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.loop_top","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.loop_top_source","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.native_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.primitive_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.returned_clean","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.scoped_exit_returned","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.NativeSequencing.step_frame","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Pop.armA","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Pop.getCont_value","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Pop.resumeValue","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Pop.value_cap","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.answerOf_clean","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.armA_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.armE_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.constant_push_kept","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.ensure_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.forced_unwrap","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_cause_kept","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.getCont_value_finalizer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_append","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_cons","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.noAdd_tail","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.passPushed_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_cause_kept","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.popFrom_value_finalizer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeCause_clean","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeCause_kept","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_clean","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.PopSequencing.resumeValue_kept_clear","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.cancel","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.closeSeq_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.interp_contA","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.interp_contE","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.interp_iter","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.interp_loopResume","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.iterator_future","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.loopFinish_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.loopNext_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.loopResume_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.runStmts_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.store_cancel","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Producers.yieldOf_credits","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.ReplySequencing.terminal","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.RuntimeShape.load","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.ScopeTransfer.close","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.ScopeTransfer.link","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.ScopeTransfer.syncOp","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.acquired_registration","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.async_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.async_producer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.forced_push","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.forced_wrapper","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.interrupt","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.load","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_asyncFinalizer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_empty","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_full","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.noAdd_mask","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.opaque_noAdd","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.raw_yield_excluded","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.registration_step","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.resume_command","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.resume_frame_debit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.saved_resume","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.stable_cause","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.stable_full","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.stable_refGet","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.stable_value","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.value_response","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.yield_producer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.yield_response_full","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.Sequencing.yield_stable","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.add_open","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.after_add_exit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.after_add_exit_credit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.after_add_unit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.after_add_unit_credit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.close_chain_transfer","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.close_scope","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.close_seq_command","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.close_seq_start","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.foreign_suspension","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.release_loop_debit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.release_start","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.release_start_count","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.release_start_debit","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.release_start_registered","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.scope_add_closed","status":"proved"},{"name":"Effect4.Program.ReleaseCustody.scope_add_open","status":"proved"},{"name":"Effect4.Program.StackRegion.command","status":"proved"},{"name":"Effect4.Program.StackRegion.compiled_region_bracket_of_prefix","status":"proved"},{"name":"Effect4.Program.StackRegion.drive","status":"proved"},{"name":"Effect4.Program.Typed.Evaluating.settle_callback","status":"proved"},{"name":"Effect4.Program.Typed.clause_closeScope","status":"proved"},{"name":"Effect4.Program.Typed.clause_scoped","status":"proved"},{"name":"Effect4.Program.Typed.foreignFinalizer_ambient","status":"proved"},{"name":"Effect4.Program.Typed.saved_mask_restoration","status":"proved"},{"name":"Effect4.Program.compiled_mask_chain_runs","status":"proved"},{"name":"Effect4.Program.compiled_region_bracket","status":"proved"},{"name":"Effect4.Program.guarded_driveStep_liveTransports","status":"proved"},{"name":"Effect4.Program.stepped_live","status":"proved"},{"name":"Test.Dogfood.Scenario.Atomic.Cleanup.log_debits","status":"goal"},{"name":"Test.Dogfood.Scenario.Atomic.cleans_once","status":"modulo"},{"name":"Test.Dogfood.Scenario.Programs.crew_acquire_once_placed","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queueCrew_acquire_once_placed","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_acquisition_sites","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.queue_placement","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_acquisition_sites","status":"proved"},{"name":"Test.Dogfood.Scenario.Programs.workers_placement","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.cleanup_step","status":"modulo"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.logs_history","status":"goal"},{"name":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource.registrations","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.CleanupSource.releases","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.releases_once","status":"modulo"},{"name":"Test.Dogfood.Scenario.Timeout.cleanup_keeps","status":"goal"},{"name":"Test.Dogfood.Scenario.Workers.Assertions.logs_step","status":"goal"},{"name":"Test.Dogfood.Scenario.Workers.Assertions.registrations_step","status":"proved"},{"name":"Test.Dogfood.Scenario.Workers.Assertions.releases_step","status":"proved"},{"name":"Test.Dogfood.Scenario.Workers.releases_once","status":"modulo"}],"status":"open","title":"Resources are released: at most once per registration, exactly once in close order","top":[{"name":"Effect4.ScopeMachine.runState_complete","status":"proved"},{"name":"Effect4.ScopeMachine.runState_restore","status":"proved"},{"name":"Effect4.ScopeMachine.runState_prefix","status":"proved"},{"name":"Effect4.Scope.close_twice","status":"proved"},{"name":"Effect4.Scope.close_reentrant_add","status":"proved"},{"name":"Effect4.Scope.closeOrder_eq","status":"proved"},{"name":"Effect4.Program.Typed.saved_mask_restoration","status":"proved"}]},{"id":"R12","next":["Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","Test.Dogfood.Scenario.QueueWorkers.Assertions.jobs_step"],"openParts":[{"on":"","state":"proposed","text":"pool-wake-selection (proposed claim; reactive-scheduling): the helper selects the first count waiters of the state that it finds, and it notifies exactly those, in order; the model's fact is select_takes_first, and one selection is one store step (select_attempt); the helper is a library program, one selection step and then each selected hint in order; the selection is by count, so the law takes the withdrawal as a premise: every entry of the waiters belongs to a request that still waits; finite controls: a selection at the post serves a waiter that left, and with no withdrawal the wake is lost (Test/Program/PoolPublic.lean, PP4; Test/Program/PoolTraces.lean, trace 2) (decisions rows 221, 267)"},{"on":"a ruling on infinite tapes","state":"ruling","text":"R12-c: liveness on infinite tapes under FairTape (waits on a ruling on infinite tapes)"},{"on":"","state":"untriaged","text":"stability over the allowed internal decisions, with a named progress observation (not stated)"},{"on":"","state":"untriaged","text":"divergence by compatible prefixes (DB-03; not stated)"},{"on":"","state":"proposed","text":"driver-continuation-split and driver-suspension-keeps-typed (proposed claims; reactive-scheduling, extending drivestate-lift): a retained driver suspension keeps the commands, the remaining dispatcher tasks, the enclosing flush or clock phase and any atomic owner, and continuing it with budgets n and k equals one run with n + k; until then an owned operation runs under a proved embedded budget (decisions rows 84, 226); a finite control: at a reply application the command loop's leftover commands are not kept, and one run then stands at rest with no exit of the root (the run dropped of Test/Dogfood/Scenario/QueueWorkers.lean; one script at seven budgets)"},{"on":"","state":"proposed","text":"embedded-budget-sufficient (proposed claim; reactive-scheduling, serving R10 and R12): the embedded budget of an owned operation covers its registration, its cleanup and its selected delivery, so no cut falls inside the operation; a cut inside is excluded and is no resumption (decisions rows 84, 226); no theorem states a sufficient budget; a finite control measures the least fuel of one helper's task at eight lengths of the receiver's continuation, and at one unit less the remaining work is lost and five later flushes do not end the root (Test/Program/QueueTraces.lean, Test/Program/SemaphoreTraces.lean and Test/Program/PoolTraces.lean, trace 7 of each; Pool's measures seven lengths); no bound is claimed; at a run the premise has one name, funded (src/Effect4/Run/Tape.lean), and funded_replays says what it gives; a journal's verdicts do not decide it"},{"on":"","state":"proposed","text":"wait-registration-no-gap (proposed claim; reactive-scheduling): the decision to wait and the registration are one transition, so each eligible waiter is retrying or owns a notification (decisions rows 221, 223; finite controls in docs/research/2026-10-05-claude-lead/tx-probes/TxModel.lean); the Queue model's half is proved on the first profile (queue-first-step-invariant, queue-first-run-flags), and the wrapper's run stays open; an instance at rest on one program is the planned goal queue_settled (Test/Dogfood/Scenario/QueueWorkers.lean)"},{"on":"","state":"proposed","text":"posted-task-decision-preserves (proposed claim; reactive-scheduling): a posted task keeps the typed state, with its execution identity, its owner, its receiver's token and a stale delivery (decisions row 225)"},{"on":"","state":"untriaged","text":"posted-wake-debt-progress and a module's request progress: separate claims under named fairness, body-progress and budget premises; dispatcher service (flush_fair) does not give them (decisions rows 220, 225, 230)"}],"placed":[{"name":"Effect4.Machine.ControlSteps.driveState_loop","status":"proved"},{"name":"Effect4.Machine.ControlSteps.iteration_below_budget","status":"proved"},{"name":"Effect4.Machine.ControlSteps.loop_of_iteration","status":"proved"},{"name":"Effect4.Machine.Descent.bounded","status":"proved"},{"name":"Effect4.Machine.Descent.complete_unique","status":"proved"},{"name":"Effect4.Pool.Model.select_takes_first","status":"proved"},{"name":"Effect4.Queue.Model.first_run_flags","status":"proved"},{"name":"Effect4.Queue.Model.first_run_inv","status":"proved"},{"name":"Effect4.Queue.Model.first_step_inv","status":"proved"},{"name":"Effect4.Run.rows_loop_frontier","status":"proved"},{"name":"Effect4.Run.rows_loop_frontier_host","status":"proved"},{"name":"Effect4.Semaphore.Model.visit_selects_earliest","status":"proved"},{"name":"Effect4.Semaphore.Model.visit_stops_iff","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.quiet_nil","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_ledger","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.settled_of_view","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.spent_one","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Accounting.within_one","status":"proved"},{"name":"Test.Dogfood.Scenario.QueueWorkers.Assertions.rest_step","status":"goal"},{"name":"Test.Dogfood.Scenario.QueueWorkers.fed_accounted","status":"modulo"},{"name":"Test.Dogfood.Scenario.QueueWorkers.queue_settled","status":"modulo"}],"status":"open","title":"Frontiers name what they await","top":[{"name":"Effect4.Machine.Scheduling.fairTape_unarmed","status":"proved"},{"name":"Effect4.Api.frontier_empty_iff_deadlocked","status":"proved"},{"name":"Effect4.Run.rows_loop_frontier","status":"proved"},{"name":"Effect4.Run.rows_loop_frontier_host","status":"proved"}]},{"id":"R13","next":[],"openParts":[{"on":"Config, route B: designed and not implemented (decisions rows 51 and 83)","state":"work","text":"load inputs, the environment snapshot and the seed: designed (the 2026-09-10 Config route B), not implemented (decisions rows 51, 83)"},{"on":"Config, route B: it restates the typed load when Config lands","state":"work","text":"supplied values fit the admitted load requirements: restates M5 (loadsTyped, the retired ledger's typedState_load) when Config lands"},{"on":"","state":"untriaged","text":"the service half of the signature as a recorded input: Built carries the row table only (decisions row 21)"},{"on":"","state":"proposed","text":"clock-unit-compatibility (proposed claim; translation-simulation): exact nanoseconds inside, with every recorded millisecond input kept in meaning by an explicit conversion; public nanosecond readings wait for the target's bigint contract (decisions rows 83, 231)"}],"placed":[{"name":"Effect4.Run.Keeps.reached","status":"proved"},{"name":"Effect4.Run.reached_history","status":"proved"},{"name":"Effect4.Run.tapeFrom_append","status":"proved"},{"name":"Effect4.Run.tapeFrom_cut","status":"proved"},{"name":"Effect4.Run.tapeFrom_cut_replays","status":"proved"},{"name":"Effect4.Run.tapeFrom_position_replays","status":"proved"},{"name":"Test.Dogfood.Scenario.history","status":"proved"},{"name":"Test.Dogfood.Scenario.keeps","status":"proved"},{"name":"Test.Dogfood.Scenario.replays","status":"proved"}],"status":"open","title":"A run's inputs are data: equal recorded inputs give equal replay observations","top":[{"name":"Effect4.Run.journal_replays","status":"proved"}]},{"id":"R14","next":[],"openParts":[{"on":"the map of positions of a stored sketch","state":"definition","text":"sketch-renumbering (proposed claim; initial-algebras-folds): a stored sketch is pinned to the row count of its application; when the application gains a row before the hole table, a map of positions renames the program's operations, each operation keeps its row, and the sketch keeps its type; no theorem states it, and Eff has no map on its operations today; a stale hole is not refused as such, since it reads the row that now stands at its position (two red controls, Test/Program/SketchControls.lean); at the authoring surface a hole is its row's spelling, and no position is stale; the consumer is an author who adds a host row while a sketch is open (docs/research/2026-10-06-seat-SKETCH-receipt.md, open obligation 1; decisions row 291)"},{"on":"the admission of a sketch with its hole table, with a located refusal","state":"definition","text":"sketch-admission (proposed claim; residual-program-typing): a located refusal for a sketch with its hole table: signature admission at the extended application, raw formation of each hole row, and closed columns; Sketch.check is the checker's answer and admits no sketch to a later stage; the checker types a hole whose declared answer repeats a record field, which raw formation refuses; the consumer is the first tool that stores a sketch (the receipt, open obligation 2); since the variable rule, strict formation of a hole row's raw column gives its closed column too (Formation.closed_of_formed)"},{"on":"","state":"proposed","text":"column-graduality (proposed claim; context-requirements): under a hole row that declares the answer alone, omitting more gives the same answer, a smaller error and a smaller requirement, where each omitted address has no closed edge above it or its node's error is never; a closed edge is a place where a child's error enters a value type: the body of catchCause, catchIf, matchCause, onExit or exit, and the program of a fork; it is the one fact that a slice view of the error or of the requirement column owes (docs/research/2026-10-06-seat-LATTICE-receipt.md, section 7); read upward it is the completion of a type slice; with three declared columns an omission keeps the whole type where the focus's columns are closed, formed and in normal form (Sketch.check_omit); elsewhere the hole row is read in normal form, and an omission can change the type of the whole or be refused (the controls on a pair and on mapFromEntries, Test/Program/ReplaceControls.lean); a filling has no such premise; a finite census holds it at 4833 single omissions and 1033 whole masks of 201 programs, with none refused, and outside the premise 4 of 49 omissions are refused (docs/research/2026-10-06-seat-CENSUS-receipt.md, section 5.3); no goal states it; slice COLUMN"},{"on":"","state":"proposed","text":"marking-agrees (proposed claim; initial-algebras-folds): a checker that marks each local failure answers on every program, its first mark is the located refusal of explain, it has no mark exactly where the program is admitted, and a marked program is admitted modulo its holes when each mark is read as a hole; the first three clauses are proved for the list of refusals of the address table (the claim address-table), which is slow; open: a mark after a refused sibling, where the table's entry is not reached, and the fourth clause; the natural form of the pass is the checker over a monad, which rewrites the 65 fields of the checker's algebra and each proof that unfolds one, so it gets its own design; the one pass that answers every address is landed (annotate, the claim annotate-table), with the table as its specification; a marking pass is that traversal with a mark where it refuses (docs/research/2026-10-06-seat-TRACE-receipt.md, the section on the printer; decisions rows 302, 324); slice PASS"},{"on":"the expected type that an analysing rule passes to a part, as a function","state":"definition","text":"expected-type-slice (proposed claim; subtyping-algebra): each analysing rule of the checker has a minimal slice of its context that still expects the queried type: the row's declaration, the declared field, the cursor type; not stated"},{"on":"","state":"proposed","text":"checker-monotone (proposed claim; subtyping-algebra): with every eliminator and every test by equality reading a union member by member and total at never, and with no loop that binds one parameter at two covariant places, a typed term stays typed at a smaller type under a pointwise smaller environment, and a program stays admitted at a smaller type when a child is replaced by a program of a smaller type; false today at the tests by equality and at a loop with no cursor annotation (seat GAP's probes); the term guard and the guards of the converted rules are gone (slice UNGUARD, slice P2b); the match by bounds is landed, so the clauses on schemes and rows are gone, and its share at a template is proved (Bounds.matchArgsB_monotone; decisions row 303); the list rule, the exit rule, the option rule and the cause rule are converted (decisions row 304); it is the law of filling a hole at a smaller type and of the answer-only column slices, and the guarantee for an omission does not need it; its union groundwork is proved (union-rule-lift): each converted rule owes the three facts of UnionRule.Eliminator, a rule that reads two heads owes four member facts of an upper map, and the record rules owe UnionRule.Below; the fiber rule is converted (union-rule-extend), and a converted rule's full fallback is monotone at every smaller type (Eliminator.extendAll_mono); the TypeScript printer writes the type arguments at a join (typed-print-connector); at a row it needs the row's answer to read each parameter at co or bi (row-answer-polarity, by instantiate-respects-polarity), which every built-in row and atom scheme meets except Ref.make and Ref.set, whose answer reads the parameter invariantly, so the environment half fails there at nat below number (Test/Program/RowPolarity.lean, E4-POL-CE-001, decisions row 342); open: the proof over the whole checker (candidate N, decisions rows 282, 285, 292, 293, 298)"},{"on":"the gap as a leaf of `Ty` (slice GAPLEAF)","state":"definition","text":"gap-conservative, gap-necessary, gap-graduality and gap-exact-off-cells (proposed claims; subtyping-algebra, with R2 and R3 for the appended leaf): with one gap per hole, the gap check on a program with no gap is the checker; a program with holes that some hole table admits passes the gap check; an omission passes the gap check at a gap type that has the original's type as an instance; off invariant positions a program that passes the gap check is admitted by some hole table; at a cell the content converts by the rule with bounds, since the member-by-member rule accepts pairs with no witness; tested on finite models and not compiled (the study, sections 5.2, 5.5 and 5.6); the leaf Ty.gap is stage 6 of the study's plan, and the coordinator tells the owner before the append lands (decisions rows 282, 288); they replace the part gradual-checker"},{"on":"a data hole that waits at a frontier and takes a reply","state":"definition","text":"fill-by-term (proposed claim; translation-simulation): a reply of a term's value at a hole's frontier and the filled program have one observation; a data hole waits at a frontier as a host row does today, and a handler for a hole's operation waits for a consumer; designed and not compiled (the study, section 7)"}],"placed":[{"name":"Effect4.Order.max_assoc","status":"proved"},{"name":"Effect4.Order.max_comm","status":"proved"},{"name":"Effect4.Order.max_idem","status":"proved"},{"name":"Effect4.Order.max_le","status":"proved"},{"name":"Effect4.Order.max_mono","status":"proved"},{"name":"Effect4.Program.AdmittedProgram.closed","status":"proved"},{"name":"Effect4.Program.Annotate.checkAction_eq","status":"proved"},{"name":"Effect4.Program.Annotate.checkEffs_eq","status":"proved"},{"name":"Effect4.Program.Annotate.checkLayer_eq","status":"proved"},{"name":"Effect4.Program.Annotate.checkLayers_eq","status":"proved"},{"name":"Effect4.Program.Annotate.checkStmt_eq","status":"proved"},{"name":"Effect4.Program.Annotate.checkStmts_eq","status":"proved"},{"name":"Effect4.Program.Annotate.check_alg_agreeOn","status":"proved"},{"name":"Effect4.Program.Annotate.check_eq","status":"proved"},{"name":"Effect4.Program.Annotate.check_restrict","status":"proved"},{"name":"Effect4.Program.BodiesHasTy.bodyAt_typed","status":"proved"},{"name":"Effect4.Program.BodiesHasTy.replace","status":"proved"},{"name":"Effect4.Program.Bounds.matchArgsB_monotone","status":"proved"},{"name":"Effect4.Program.Checker.checkAction_rebase","status":"proved"},{"name":"Effect4.Program.Checker.checkEffs_rebase","status":"proved"},{"name":"Effect4.Program.Checker.checkLayer_rebase","status":"proved"},{"name":"Effect4.Program.Checker.checkLayers_rebase","status":"proved"},{"name":"Effect4.Program.Checker.checkStmt_rebase","status":"proved"},{"name":"Effect4.Program.Checker.checkStmt_step_binds","status":"proved"},{"name":"Effect4.Program.Checker.checkStmts_rebase","status":"proved"},{"name":"Effect4.Program.Checker.check_rebase","status":"proved"},{"name":"Effect4.Program.ClosedEnv.append","status":"proved"},{"name":"Effect4.Program.ClosedEnv.nil","status":"proved"},{"name":"Effect4.Program.ClosedEnv.push","status":"proved"},{"name":"Effect4.Program.Decision.closed_arms","status":"proved"},{"name":"Effect4.Program.EditSession.Coherent.ext","status":"proved"},{"name":"Effect4.Program.EditSession.feed_coherent","status":"proved"},{"name":"Effect4.Program.EditSession.feed_keeps","status":"proved"},{"name":"Effect4.Program.EditSession.feed_repaint","status":"proved"},{"name":"Effect4.Program.EditSession.feed_shown","status":"proved"},{"name":"Effect4.Program.EditSession.feed_spliced","status":"proved"},{"name":"Effect4.Program.EditSession.feed_undo","status":"proved"},{"name":"Effect4.Program.EditSession.open_coherent","status":"proved"},{"name":"Effect4.Program.EditSession.reached_coherent","status":"proved"},{"name":"Effect4.Program.EditSession.reached_view","status":"proved"},{"name":"Effect4.Program.EditSession.run_coherent","status":"proved"},{"name":"Effect4.Program.EditSession.run_keeps","status":"proved"},{"name":"Effect4.Program.EditSession.view_refusals","status":"proved"},{"name":"Effect4.Program.EditSession.view_type","status":"proved"},{"name":"Effect4.Program.Eff.eq_defs_of_isBlock","status":"proved"},{"name":"Effect4.Program.Eff.ne_defs_of_isBlock","status":"proved"},{"name":"Effect4.Program.Eff.partAt_plain","status":"proved"},{"name":"Effect4.Program.Eff.partAt_resig","status":"proved"},{"name":"Effect4.Program.Formation.actionAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.allTypes_append","status":"proved"},{"name":"Effect4.Program.Formation.allTypes_nil","status":"proved"},{"name":"Effect4.Program.Formation.allTypes_singleton","status":"proved"},{"name":"Effect4.Program.Formation.allTypes_zipIdx_map","status":"proved"},{"name":"Effect4.Program.Formation.annotationsAll_expandRefs","status":"proved"},{"name":"Effect4.Program.Formation.annotationsClosed_of_formed","status":"proved"},{"name":"Effect4.Program.Formation.annotations_closed","status":"proved"},{"name":"Effect4.Program.Formation.argsAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.argumentAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.causeAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.closed_of_formed","status":"proved"},{"name":"Effect4.Program.Formation.closed_of_nodes","status":"proved"},{"name":"Effect4.Program.Formation.declAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.effAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.effsAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.forall_mem_none","status":"proved"},{"name":"Effect4.Program.Formation.forall_mem_some","status":"proved"},{"name":"Effect4.Program.Formation.formed_sites_iff","status":"proved"},{"name":"Effect4.Program.Formation.inputFormed_program","status":"proved"},{"name":"Effect4.Program.Formation.inputFormed_services","status":"proved"},{"name":"Effect4.Program.Formation.layerAll_of_layerAt","status":"proved"},{"name":"Effect4.Program.Formation.layerAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.layersAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.mem_nodes_field","status":"proved"},{"name":"Effect4.Program.Formation.mem_nodes_item","status":"proved"},{"name":"Effect4.Program.Formation.nodeAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.optionTerm_all","status":"proved"},{"name":"Effect4.Program.Formation.programAnnotations_all","status":"proved"},{"name":"Effect4.Program.Formation.services_closed","status":"proved"},{"name":"Effect4.Program.Formation.stmtAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.stmtsAll_onRef","status":"proved"},{"name":"Effect4.Program.Formation.termAnnotations_all","status":"proved"},{"name":"Effect4.Program.GenTy.closed_genAnswer","status":"proved"},{"name":"Effect4.Program.GenTy.closed_joinAnswerT","status":"proved"},{"name":"Effect4.Program.GenTy.closed_merge","status":"proved"},{"name":"Effect4.Program.GenTy.closed_seq","status":"proved"},{"name":"Effect4.Program.HasTy.isBlock","status":"proved"},{"name":"Effect4.Program.List.all_of_dropWhile_nil","status":"proved"},{"name":"Effect4.Program.List.all_of_takeWhile_length","status":"proved"},{"name":"Effect4.Program.List.dropWhile_eq_nil_of_all","status":"proved"},{"name":"Effect4.Program.Member.cause_cases_of_below","status":"proved"},{"name":"Effect4.Program.Member.cause_closed","status":"proved"},{"name":"Effect4.Program.Member.cause_least","status":"proved"},{"name":"Effect4.Program.Member.cause_monotone","status":"proved"},{"name":"Effect4.Program.Member.cause_reads","status":"proved"},{"name":"Effect4.Program.Member.cause_upper","status":"proved"},{"name":"Effect4.Program.Member.exit_closed","status":"proved"},{"name":"Effect4.Program.Member.exit_eliminator","status":"proved"},{"name":"Effect4.Program.Member.exit_one","status":"proved"},{"name":"Effect4.Program.Member.fiber_closed","status":"proved"},{"name":"Effect4.Program.Member.fiber_eliminator","status":"proved"},{"name":"Effect4.Program.Member.fiber_one","status":"proved"},{"name":"Effect4.Program.Member.list_closed","status":"proved"},{"name":"Effect4.Program.Member.list_eliminator","status":"proved"},{"name":"Effect4.Program.Member.list_one","status":"proved"},{"name":"Effect4.Program.Member.option_closed","status":"proved"},{"name":"Effect4.Program.Member.option_eliminator","status":"proved"},{"name":"Effect4.Program.NativeAtom.CustomScheme.closed_apply","status":"proved"},{"name":"Effect4.Program.NativeAtom.Scheme.closed_apply","status":"proved"},{"name":"Effect4.Program.NativeAtom.closed_monoApply","status":"proved"},{"name":"Effect4.Program.NativeAtom.closed_projectProduct","status":"proved"},{"name":"Effect4.Program.NativeAtom.closed_typeOf","status":"proved"},{"name":"Effect4.Program.NativeAtom.spec_answersClosed","status":"proved"},{"name":"Effect4.Program.Node.addresses_eq_cons","status":"proved"},{"name":"Effect4.Program.Node.at_append","status":"proved"},{"name":"Effect4.Program.Node.at_child","status":"proved"},{"name":"Effect4.Program.Node.at_layers_nil","status":"proved"},{"name":"Effect4.Program.Node.at_replaceAt_below","status":"proved"},{"name":"Effect4.Program.Node.at_stmts_nil","status":"proved"},{"name":"Effect4.Program.Node.childEnv_replace_kept","status":"proved"},{"name":"Effect4.Program.Node.child_add_three","status":"proved"},{"name":"Effect4.Program.Node.envAt_append","status":"proved"},{"name":"Effect4.Program.Node.envAt_child","status":"proved"},{"name":"Effect4.Program.Node.exists_at_of_mem_foldList","status":"proved"},{"name":"Effect4.Program.Node.foldList_cases","status":"proved"},{"name":"Effect4.Program.Node.mem_foldList_iff","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_append","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_cons_isBlock","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_defs_body","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_defs_main","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_eff","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_effs_head","status":"proved"},{"name":"Effect4.Program.Node.replaceAt_effs_tail","status":"proved"},{"name":"Effect4.Program.Node.setChild_isBlock","status":"proved"},{"name":"Effect4.Program.Node.sizeOf_child_lt","status":"proved"},{"name":"Effect4.Program.Node.stmtsHead_replace_kept","status":"proved"},{"name":"Effect4.Program.NodeHasTy.child_step","status":"proved"},{"name":"Effect4.Program.NodeHasTy.replace","status":"proved"},{"name":"Effect4.Program.NodeHasTy.replace_envAt","status":"proved"},{"name":"Effect4.Program.Part.bodyAt_resig","status":"proved"},{"name":"Effect4.Program.Part.bodyAt_sig","status":"proved"},{"name":"Effect4.Program.Record.closed_check","status":"proved"},{"name":"Effect4.Program.Record.closed_fieldOf","status":"proved"},{"name":"Effect4.Program.Record.closed_fieldType","status":"proved"},{"name":"Effect4.Program.Record.closed_setOf","status":"proved"},{"name":"Effect4.Program.Record.closed_setType","status":"proved"},{"name":"Effect4.Program.Record.closed_tagArms","status":"proved"},{"name":"Effect4.Program.SigApp.withHoles_extends","status":"proved"},{"name":"Effect4.Program.SigApp.withHoles_nil","status":"proved"},{"name":"Effect4.Program.SigApp.withHoles_rowOf","status":"proved"},{"name":"Effect4.Program.SigApp.withHoles_withHoles","status":"proved"},{"name":"Effect4.Program.Signature.extends_withDefs","status":"proved"},{"name":"Effect4.Program.Sketch.annotate_eq_table","status":"proved"},{"name":"Effect4.Program.Sketch.check_fill","status":"proved"},{"name":"Effect4.Program.Sketch.check_fill_focusAt","status":"proved"},{"name":"Effect4.Program.Sketch.check_fill_kept","status":"proved"},{"name":"Effect4.Program.Sketch.check_filled","status":"proved"},{"name":"Effect4.Program.Sketch.check_filled_module","status":"proved"},{"name":"Effect4.Program.Sketch.check_focusAt","status":"proved"},{"name":"Effect4.Program.Sketch.check_more_holes","status":"proved"},{"name":"Effect4.Program.Sketch.check_omit","status":"proved"},{"name":"Effect4.Program.Sketch.check_omit_focusAt","status":"proved"},{"name":"Effect4.Program.Sketch.check_program","status":"proved"},{"name":"Effect4.Program.Sketch.decode_encode","status":"proved"},{"name":"Effect4.Program.Sketch.decode_exact","status":"proved"},{"name":"Effect4.Program.Sketch.fillAt_of_replaceAt","status":"proved"},{"name":"Effect4.Program.Sketch.fillAt_some","status":"proved"},{"name":"Effect4.Program.Sketch.focusAt_at","status":"proved"},{"name":"Effect4.Program.Sketch.focusAt_more_holes","status":"proved"},{"name":"Effect4.Program.Sketch.focusAt_nil","status":"proved"},{"name":"Effect4.Program.Sketch.hole_hasTy","status":"proved"},{"name":"Effect4.Program.Sketch.hole_hasTy_focus","status":"proved"},{"name":"Effect4.Program.Sketch.refusals_head","status":"proved"},{"name":"Effect4.Program.Sketch.refusals_nil_iff","status":"proved"},{"name":"Effect4.Program.Sketch.refusals_of_check","status":"proved"},{"name":"Effect4.Program.Sketch.sigAt_extends","status":"proved"},{"name":"Effect4.Program.Sketch.sigAt_nil","status":"proved"},{"name":"Effect4.Program.Sketch.sigAt_part","status":"proved"},{"name":"Effect4.Program.Sketch.tableEntry_path","status":"proved"},{"name":"Effect4.Program.Sketch.table_fill","status":"proved"},{"name":"Effect4.Program.Sketch.table_head","status":"proved"},{"name":"Effect4.Program.Sketch.table_more_holes","status":"proved"},{"name":"Effect4.Program.Sketch.table_omit","status":"proved"},{"name":"Effect4.Program.Sketch.table_result_refusal_none","status":"proved"},{"name":"Effect4.Program.Table.bodies_eq","status":"proved"},{"name":"Effect4.Program.Table.bodies_mem_under","status":"proved"},{"name":"Effect4.Program.Table.bodies_restrict","status":"proved"},{"name":"Effect4.Program.Table.bodies_splice","status":"proved"},{"name":"Effect4.Program.Table.bodies_under","status":"proved"},{"name":"Effect4.Program.Table.bodyEntry_head","status":"proved"},{"name":"Effect4.Program.Table.bodyEntry_nil","status":"proved"},{"name":"Effect4.Program.Table.bodyEntry_nodecl","status":"proved"},{"name":"Effect4.Program.Table.bodyEntry_tail","status":"proved"},{"name":"Effect4.Program.Table.mem_splice","status":"proved"},{"name":"Effect4.Program.Table.moduleLayers_restrict","status":"proved"},{"name":"Effect4.Program.Table.splice_all_under","status":"proved"},{"name":"Effect4.Program.Table.splice_append_out_left","status":"proved"},{"name":"Effect4.Program.Table.splice_append_out_right","status":"proved"},{"name":"Effect4.Program.Table.splice_three","status":"proved"},{"name":"Effect4.Program.Table.typedAt_table","status":"proved"},{"name":"Effect4.Program.Table.typedAt_table_nil","status":"proved"},{"name":"Effect4.Program.Table.typedAt_table_of_focusAt","status":"proved"},{"name":"Effect4.Program.Table.under_append","status":"proved"},{"name":"Effect4.Program.Table.under_prefix_false","status":"proved"},{"name":"Effect4.Program.Table.under_self","status":"proved"},{"name":"Effect4.Program.Table.under_sibling_false","status":"proved"},{"name":"Effect4.Program.Tuple.closed_project","status":"proved"},{"name":"Effect4.Program.Tuple.closed_typeAt","status":"proved"},{"name":"Effect4.Program.Ty.closedSubst_matchArgsB","status":"proved"},{"name":"Effect4.Program.Ty.closed_cands","status":"proved"},{"name":"Effect4.Program.Ty.closed_diffTag","status":"proved"},{"name":"Effect4.Program.Ty.closed_instantiate","status":"proved"},{"name":"Effect4.Program.Ty.closed_joinCands","status":"proved"},{"name":"Effect4.Program.Ty.closed_payloadOf","status":"proved"},{"name":"Effect4.Program.Ty.closed_payloadTy","status":"proved"},{"name":"Effect4.Program.Ty.mem_of_lookup","status":"proved"},{"name":"Effect4.Program.Ty.subN_causeOf_iff","status":"proved"},{"name":"Effect4.Program.Ty.subN_exitOf_iff","status":"proved"},{"name":"Effect4.Program.Ty.subN_fiberOf_iff","status":"proved"},{"name":"Effect4.Program.Ty.subN_list_iff","status":"proved"},{"name":"Effect4.Program.Ty.subN_option_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.adjoint","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.adjoint_le","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_adjoint","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_bot","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_isSome_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_laws","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_least","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_lift","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_mono","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extendAll_upper","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_adjoint","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_bot","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_isSome_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_laws","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_least","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_liftOne","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_mono","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.extend_upper","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.liftOne_answers","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.liftOne_isSome_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.liftOne_mono","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.lift_least","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.lift_mono","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.lift_upper","status":"proved"},{"name":"Effect4.Program.UnionRule.Eliminator.monotone","status":"proved"},{"name":"Effect4.Program.UnionRule.ReadsUnion.lift_sound","status":"proved"},{"name":"Effect4.Program.UnionRule.below_of_upper","status":"proved"},{"name":"Effect4.Program.UnionRule.closed_join","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_agrees","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_closed","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_closed_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_eq_some_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_never","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_of_extend","status":"proved"},{"name":"Effect4.Program.UnionRule.extendAll_refused","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_agrees","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_closed","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_closed_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_eq_some_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_never","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_refused","status":"proved"},{"name":"Effect4.Program.UnionRule.extend_two","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_all","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_join_normalize","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_join_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_join_pair_start","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_join_start","status":"proved"},{"name":"Effect4.Program.UnionRule.foldl_keeps","status":"proved"},{"name":"Effect4.Program.UnionRule.joinAll_all","status":"proved"},{"name":"Effect4.Program.UnionRule.joinAll_keeps","status":"proved"},{"name":"Effect4.Program.UnionRule.joinAll_le","status":"proved"},{"name":"Effect4.Program.UnionRule.joinAll_normalize","status":"proved"},{"name":"Effect4.Program.UnionRule.join_normalize_right","status":"proved"},{"name":"Effect4.Program.UnionRule.le_joinAll","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_congr","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_eq","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_eq_some_iff","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_member","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_never","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_some","status":"proved"},{"name":"Effect4.Program.UnionRule.liftOne_two","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_all","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_closed","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_closed_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_congr","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_laws","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_least","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_member","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_mono","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_never","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_transfer","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_union","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_union_eq","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_union_eq_of","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_union_eq_of_antisymm","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_union_eq_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_unique","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_unique_pair","status":"proved"},{"name":"Effect4.Program.UnionRule.lift_upper","status":"proved"},{"name":"Effect4.Program.UnionRule.mapM_answer","status":"proved"},{"name":"Effect4.Program.UnionRule.mapM_cons_eq_some","status":"proved"},{"name":"Effect4.Program.UnionRule.mapM_source","status":"proved"},{"name":"Effect4.Program.UnionRule.mapM_total","status":"proved"},{"name":"Effect4.Program.UnionRule.members_union","status":"proved"},{"name":"Effect4.Program.UnionRule.normal_ofMembers","status":"proved"},{"name":"Effect4.Program.UnionRule.prod_antisymm","status":"proved"},{"name":"Effect4.Program.UnionRule.subN_iff_le","status":"proved"},{"name":"Effect4.Program.actionHasTy_closed","status":"proved"},{"name":"Effect4.Program.actionHasTy_replace","status":"proved"},{"name":"Effect4.Program.actionHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.addresses_eff_head","status":"proved"},{"name":"Effect4.Program.addresses_eq_foldList","status":"proved"},{"name":"Effect4.Program.annotateModule_fill","status":"proved"},{"name":"Effect4.Program.annotateModule_fill_body","status":"proved"},{"name":"Effect4.Program.annotateModule_fill_layers","status":"proved"},{"name":"Effect4.Program.annotateModule_fill_main","status":"proved"},{"name":"Effect4.Program.annotateModule_fill_plain","status":"proved"},{"name":"Effect4.Program.annotateModule_plain","status":"proved"},{"name":"Effect4.Program.annotateModule_restrict","status":"proved"},{"name":"Effect4.Program.annotate_eq_table","status":"proved"},{"name":"Effect4.Program.argTy_closed","status":"proved"},{"name":"Effect4.Program.argsTy_closed","status":"proved"},{"name":"Effect4.Program.bodiesHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.callAt_rowTy","status":"proved"},{"name":"Effect4.Program.causeInputError_causeOf","status":"proved"},{"name":"Effect4.Program.causeInputError_exitOf","status":"proved"},{"name":"Effect4.Program.causeInputError_upper","status":"proved"},{"name":"Effect4.Program.causeTy_closed","status":"proved"},{"name":"Effect4.Program.cause_mono","status":"proved"},{"name":"Effect4.Program.checkBodies_restrict","status":"proved"},{"name":"Effect4.Program.checkModule_ext","status":"proved"},{"name":"Effect4.Program.checkModule_programFocusAt","status":"proved"},{"name":"Effect4.Program.checkModule_replace_programFocusAt","status":"proved"},{"name":"Effect4.Program.checkModule_restrict","status":"proved"},{"name":"Effect4.Program.checkRow_rowBindings","status":"proved"},{"name":"Effect4.Program.check_closed","status":"proved"},{"name":"Effect4.Program.check_focusAt","status":"proved"},{"name":"Effect4.Program.check_replace","status":"proved"},{"name":"Effect4.Program.check_replace_focusAt","status":"proved"},{"name":"Effect4.Program.childAddresses_map_tableEntryAt","status":"proved"},{"name":"Effect4.Program.closedSig_app","status":"proved"},{"name":"Effect4.Program.closedSig_native","status":"proved"},{"name":"Effect4.Program.closed_catchIfError","status":"proved"},{"name":"Effect4.Program.closed_causeInputError","status":"proved"},{"name":"Effect4.Program.closed_exitOf","status":"proved"},{"name":"Effect4.Program.closed_fiberTy","status":"proved"},{"name":"Effect4.Program.closed_getD","status":"proved"},{"name":"Effect4.Program.closed_joinAnswer","status":"proved"},{"name":"Effect4.Program.closed_listOf","status":"proved"},{"name":"Effect4.Program.closed_litArgTy","status":"proved"},{"name":"Effect4.Program.closed_nativeAtomTy","status":"proved"},{"name":"Effect4.Program.closed_nativeServiceTy","status":"proved"},{"name":"Effect4.Program.closed_optionTy","status":"proved"},{"name":"Effect4.Program.closed_rowTy","status":"proved"},{"name":"Effect4.Program.closed_serviceTy","status":"proved"},{"name":"Effect4.Program.effTy_map_of_hasTy","status":"proved"},{"name":"Effect4.Program.effTy_of_check","status":"proved"},{"name":"Effect4.Program.effsHasTy_closed","status":"proved"},{"name":"Effect4.Program.effsHasTy_replace","status":"proved"},{"name":"Effect4.Program.effsHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.exitOf_exitOf","status":"proved"},{"name":"Effect4.Program.exitOf_upper","status":"proved"},{"name":"Effect4.Program.fiberTy_fiberOf","status":"proved"},{"name":"Effect4.Program.fiberTy_upper","status":"proved"},{"name":"Effect4.Program.focusAt_eq_some","status":"proved"},{"name":"Effect4.Program.focusAt_nil","status":"proved"},{"name":"Effect4.Program.focusAt_typed","status":"proved"},{"name":"Effect4.Program.foldMapAt_action_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_action_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_action_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_action_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_action_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_eff_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_eff_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_eff_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_eff_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_eff_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_effs_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_effs_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_effs_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_effs_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_effs_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_layer_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_layer_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_layer_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_layer_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_layer_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_layers_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_layers_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_layers_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_layers_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_layers_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmt_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmt_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmt_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmt_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmt_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmts_base","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmts_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmts_hom","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmts_paths_cons","status":"proved"},{"name":"Effect4.Program.foldMapAt_stmts_paths_shift","status":"proved"},{"name":"Effect4.Program.foldMapAt_term_fuse","status":"proved"},{"name":"Effect4.Program.foldMapAt_terms_fuse","status":"proved"},{"name":"Effect4.Program.hasTy_closed","status":"proved"},{"name":"Effect4.Program.hasTy_extSlotEnv","status":"proved"},{"name":"Effect4.Program.hasTy_focusAt","status":"proved"},{"name":"Effect4.Program.hasTy_replace","status":"proved"},{"name":"Effect4.Program.hasTy_replace_focusAt","status":"proved"},{"name":"Effect4.Program.hasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.holes_conservative","status":"proved"},{"name":"Effect4.Program.layerHasTy_closed","status":"proved"},{"name":"Effect4.Program.layerHasTy_replace","status":"proved"},{"name":"Effect4.Program.layerHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.layersHasTy_closed","status":"proved"},{"name":"Effect4.Program.layersHasTy_cons","status":"proved"},{"name":"Effect4.Program.layersHasTy_replace","status":"proved"},{"name":"Effect4.Program.layersHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.listOf_list","status":"proved"},{"name":"Effect4.Program.listOf_upper","status":"proved"},{"name":"Effect4.Program.mem_addresses_iff","status":"proved"},{"name":"Effect4.Program.moduleHasTy_partAt_typed","status":"proved"},{"name":"Effect4.Program.moduleHasTy_programFocusAt","status":"proved"},{"name":"Effect4.Program.moduleHasTy_replace_programFocusAt","status":"proved"},{"name":"Effect4.Program.moduleHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.nodeAnswer_replace_kept","status":"proved"},{"name":"Effect4.Program.optionTy_eq_normal","status":"proved"},{"name":"Effect4.Program.optionTy_option","status":"proved"},{"name":"Effect4.Program.optionTy_upper","status":"proved"},{"name":"Effect4.Program.refusals_head","status":"proved"},{"name":"Effect4.Program.refusals_nil_iff","status":"proved"},{"name":"Effect4.Program.refusals_of_hasTy","status":"proved"},{"name":"Effect4.Program.sigOkKey_of_serviceTy","status":"proved"},{"name":"Effect4.Program.sketch_more_holes","status":"proved"},{"name":"Effect4.Program.sketch_reads_its_holes","status":"proved"},{"name":"Effect4.Program.sketch_weakening","status":"proved"},{"name":"Effect4.Program.stmtsHasTy_closed","status":"proved"},{"name":"Effect4.Program.stmtsHasTy_replace","status":"proved"},{"name":"Effect4.Program.stmtsHasTy_sigProgram","status":"proved"},{"name":"Effect4.Program.subN_causeOf_causeUpper","status":"proved"},{"name":"Effect4.Program.subN_exitOf_causeUpper","status":"proved"},{"name":"Effect4.Program.tableAt_eq_cons","status":"proved"},{"name":"Effect4.Program.tableAt_mem_path","status":"proved"},{"name":"Effect4.Program.tableAt_none","status":"proved"},{"name":"Effect4.Program.tableAt_path","status":"proved"},{"name":"Effect4.Program.tableAt_perform","status":"proved"},{"name":"Effect4.Program.tableAt_rebase","status":"proved"},{"name":"Effect4.Program.tableAt_splice","status":"proved"},{"name":"Effect4.Program.tableEntryAt_nil","status":"proved"},{"name":"Effect4.Program.table_eq_tableAt","status":"proved"},{"name":"Effect4.Program.table_head","status":"proved"},{"name":"Effect4.Program.table_result_refusal_none_of_hasTy","status":"proved"},{"name":"Effect4.Program.table_splice","status":"proved"},{"name":"Effect4.Program.termTy_closed","status":"proved"},{"name":"Effect4.Program.termTy_of_term?","status":"proved"},{"name":"Effect4.Program.typeOfProgram_closed","status":"proved"},{"name":"Effect4.Program.typeOfProgram_closed_app","status":"proved"},{"name":"Effect4.Program.yieldAt_addressYield","status":"proved"},{"name":"Effect4.Slice.drop_le","status":"proved"},{"name":"Effect4.Slice.drop_le_of_subset","status":"proved"},{"name":"Effect4.Slice.exists_mem_subslices","status":"proved"},{"name":"Effect4.Slice.failed_rest","status":"proved"},{"name":"Effect4.Slice.failed_snoc","status":"proved"},{"name":"Effect4.Slice.filter_mem_sublists","status":"proved"},{"name":"Effect4.Slice.firstDrop_append","status":"proved"},{"name":"Effect4.Slice.firstDrop_length","status":"proved"},{"name":"Effect4.Slice.instIsPreorder","status":"proved"},{"name":"Effect4.Slice.instLawfulOrderInf","status":"proved"},{"name":"Effect4.Slice.instLawfulOrderSup","status":"proved"},{"name":"Effect4.Slice.le_drop","status":"proved"},{"name":"Effect4.Slice.le_of_mem_subslices","status":"proved"},{"name":"Effect4.Slice.not_mem_drop","status":"proved"},{"name":"Effect4.Slice.omitted_anti","status":"proved"},{"name":"Effect4.Slice.omitted_full","status":"proved"},{"name":"Effect4.Slice.omitted_subset","status":"proved"},{"name":"Effect4.Slice.restart_append","status":"proved"},{"name":"Effect4.Slice.restart_eq_sweep","status":"proved"},{"name":"Effect4.Slice.restart_of_none","status":"proved"},{"name":"Effect4.Slice.restart_of_some","status":"proved"},{"name":"Effect4.Slice.sublists_subset","status":"proved"},{"name":"Effect4.Slice.sweepAsked_length","status":"proved"},{"name":"Effect4.Slice.sweepFreeAsked_sublist","status":"proved"},{"name":"Effect4.Slice.sweepFree_congr","status":"proved"},{"name":"Effect4.Slice.sweepFree_eq_sweep","status":"proved"},{"name":"Effect4.Slice.sweep_congr","status":"proved"},{"name":"Effect4.Slice.sweep_kept_needed","status":"proved"},{"name":"Effect4.Slice.sweep_sublist","status":"proved"},{"name":"Effect4.Slice.sweep_valid","status":"proved"},{"name":"Effect4.SliceView.Minimal.keeps_above","status":"proved"},{"name":"Effect4.SliceView.Minimal.needs","status":"proved"},{"name":"Effect4.SliceView.Minimal.of_same_sites","status":"proved"},{"name":"Effect4.SliceView.contribution_le","status":"proved"},{"name":"Effect4.SliceView.contribution_lub","status":"proved"},{"name":"Effect4.SliceView.contribution_valid","status":"proved"},{"name":"Effect4.SliceView.decide_valid_up","status":"proved"},{"name":"Effect4.SliceView.descendTree_asks","status":"proved"},{"name":"Effect4.SliceView.descendTree_eq_descend","status":"proved"},{"name":"Effect4.SliceView.descendTree_minimal","status":"proved"},{"name":"Effect4.SliceView.descend_asks","status":"proved"},{"name":"Effect4.SliceView.descend_eq_restart","status":"proved"},{"name":"Effect4.SliceView.descend_le","status":"proved"},{"name":"Effect4.SliceView.descend_minimal","status":"proved"},{"name":"Effect4.SliceView.descend_sublist","status":"proved"},{"name":"Effect4.SliceView.descend_valid","status":"proved"},{"name":"Effect4.SliceView.exists_minimal_below","status":"proved"},{"name":"Effect4.SliceView.isMinimal_iff","status":"proved"},{"name":"Effect4.SliceView.lattice_minimal","status":"proved"},{"name":"Effect4.SliceView.minimal_iff_drop","status":"proved"},{"name":"Effect4.SliceView.minimal_refine","status":"proved"},{"name":"Effect4.SliceView.minimals_complete","status":"proved"},{"name":"Effect4.SliceView.minimals_sound","status":"proved"},{"name":"Effect4.SliceView.ofOmitted_full","status":"proved"},{"name":"Effect4.SliceView.parentOmitted_sound","status":"proved"},{"name":"Effect4.SliceView.valid_max","status":"proved"},{"name":"Effect4.SliceView.valid_refine","status":"proved"},{"name":"Effect4.SliceView.valid_up","status":"proved"},{"name":"Effect4.Store.Canonical.ofJson_exact","status":"proved"},{"name":"Effect4.Store.ShapeDoc.read_exact","status":"proved"},{"name":"Effect4.Store.canonicalHex?_exact","status":"proved"},{"name":"Effect4.Store.natOfBinary64_exact","status":"proved"},{"name":"Effect4.Store.natOfBinary64_finite","status":"proved"},{"name":"Effect4.Store.readFields_exact","status":"proved"},{"name":"Effect4.Store.readIn_exact","status":"proved"},{"name":"Effect4.Store.readList_exact","status":"proved"},{"name":"Effect4.Store.tagOfName_exact","status":"proved"},{"name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_error_bind","status":"proved"},{"name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_ok_bind","status":"proved"},{"name":"_private.Effect4.Laws.Program.Typing.Annotate.0.Effect4.Program.except_pure","status":"proved"}],"status":"open","title":"A sketch checks and explains its types: holes and the gap, graduality, the focus, minimal type slices and total marking","top":[{"name":"Effect4.SliceView.lattice_minimal","status":"proved"},{"name":"Effect4.Program.holes_conservative","status":"proved"},{"name":"Effect4.Program.sketch_weakening","status":"proved"},{"name":"Effect4.Program.Sketch.hole_hasTy","status":"proved"},{"name":"Effect4.Program.NodeHasTy.replace","status":"proved"},{"name":"Effect4.Program.NodeHasTy.replace_envAt","status":"proved"},{"name":"Effect4.Program.check_closed","status":"proved"},{"name":"Effect4.Program.refusals_nil_iff","status":"proved"},{"name":"Effect4.Program.hasTy_extSlotEnv","status":"proved"},{"name":"Effect4.Program.callAt_rowTy","status":"proved"},{"name":"Effect4.Program.annotate_eq_table","status":"proved"},{"name":"Effect4.Program.Sketch.annotate_eq_table","status":"proved"},{"name":"Effect4.Program.Sketch.table_fill","status":"proved"},{"name":"Effect4.Program.EditSession.reached_view","status":"proved"},{"name":"Effect4.Program.Sketch.check_filled_module","status":"proved"}]}],"unplacedGoals":[]},"producer":"GENERATED by tools/Drivers/Semantics.lean (make gen-semantics); do not edit","provenance":{"policy":{"ceiling":["propext","Quot.sound"],"gate":"Test/Audit/AxiomGate.lean"},"roots":["Effect4.Laws","Test.Program.TypedProgBindRed","Test.Dogfood.P1HttpCache","Test.Dogfood.P2HandlerLayers","Test.Dogfood.P3WorkerQueue","Test.Dogfood.P4RateLimiter","Test.Dogfood.P5LedgerService","Test.Dogfood.Scenario","Test.Dogfood.Scenario.Workers","Test.Dogfood.Scenario.Routing","Test.Dogfood.Scenario.Atomic","Test.Dogfood.Scenario.Timeout","Test.Dogfood.Scenario.Tape","Test.Dogfood.Scenario.QueueWorkers","Tools.View.FlowReach"],"toolchain":"leanprover/lean4:v4.33.1"},"schemaVersion":8}
