OctoInformBeta

OpenAI preprint, September 2026 · §7. Typed data channels

Lemma 43: Logical observations with a parameter separated from the dummy by a proof guard

Access laws for typed data bundles.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Setting

Typed data channels package a dummy value with a parameter and a payload. An access observation combines a formula guard on parameters with a data callback into the inner channel. Its result is a formula in an ambient logical calculus.

Fix a pure type specification P=(S,𝒜,ℛ)P=(S,\mathcal A,\mathcal R), with arbitrary axiom and product-rule relations. Terms have variables and sorts, application, annotated abstraction λx:A.M\lambda x:A.M, and dependent products Πx:A.B\Pi x:A.B.✦ Labelled terms attach one of dddd, dpdp, or pppp to each application or binder, specifying data to data, data to proof, or proof to proof.✦ Erasure deletes these labels.✦ Named binders are used below; variable indices are de Bruijn indices, and contexts list the newest declaration first.

The typing judgment is Γ⊢M:A\Gamma\vdash M:A. Contexts are valid when they arise from the empty context by adjoining types having a sort in the preceding context.✦ Full β\beta reduction contracts applications of annotated abstractions and acts in every annotation and binder body; labelled head contraction requires matching labels. Convertibility is the equivalence relation generated by this reduction.✦ A term MM is in normal form when it has no reduction step, and is weakly normalizing when a normal form is reachable from it. Write T#T^\# for the chosen normal form when it exists. For sets I,J⊆SI,J\subseteq S, the normal form sort profile, axiom profile, and product output profile are given by (1). πΓ(T)={s∈S∣Γ⊢T#:s},Ax⁡(s)={t∈S∣(s,t)∈𝒜},Out⁡(I,J)={c∈S∣∃a∈I∃b∈J(a,b,c)∈ℛ}.\begin{aligned} \pi_\Gamma(T)&=\{s\in S\mid\Gamma\vdash T^\#:s\},\\ \operatorname{Ax}(s)&=\{t\in S\mid(s,t)\in\mathcal A\},\\ \operatorname{Out}(I,J)&=\{c\in S\mid \exists a\in I\;\exists b\in J\;(a,b,c)\in\mathcal R\}. \end{aligned}(1)

A feasible profile is a nonempty profile πΔ(T)\pi_\Delta(T) of a normal term in a valid context.✦ A feasible product profile triple (I,J,K)(I,J,K) consists of feasible profiles with K=Out⁡(I,J)K=\operatorname{Out}(I,J).✦ A labelled type AA is sorted at II when Γ⊢A:s\Gamma\vdash A:s for every s∈Is\in I.✦

The primary signed graph has positive edges from a feasible profile to a strict feasible subprofile and from JJ to KK in each feasible triple (I,J,K)(I,J,K); its negative edges go from II to KK in such triples.✦ Positive reachability allows a finite, possibly empty path of positive edges.✦ For a collection CC of profiles, an observation layer II is a profile positively reachable from a nonempty Ax⁡(s)\operatorname{Ax}(s) with {s}∈C\{s\}\in C.✦ A direct observation layer II for a collection CC of profiles is an observation layer for CC admitting a feasible product profile triple (I,J,K)(I,J,K) with J,K∈CJ,K\in C.✦ A logical terminal profile JJ for a collection CC is a profile admitting a triple (I,J,K)(I,J,K) with I,K∈CI,K\in C.✦

Let γ\gamma assign data or proof mode to variables. The mode discipline assigns each variable its mode in γ\gamma and gives sorts data mode. An application has its labelled result mode when its function has that mode and its argument has the labelled argument mode. An annotated abstraction or dependent product has a data-mode domain; under its binder, the variable has the labelled argument mode. The abstraction and its body have the labelled result mode, while the product and its codomain have data mode. Write γ⊢M:𝖽\gamma\vdash M:\mathsf d or γ⊢M:𝗉\gamma\vdash M:\mathsf p for these mode judgments. A data-only term MM is a labelled term with label dddd at every application and binder.✦

Proof mode inhabitation, typed open proof transformation, and typed logical equivalence are the relations in (2). The temporary variable uu has proof mode. Equivalence concerns uniform typed proof-term transformers. Γ;γ⊨Q⇔∃p(Γ⊢p:Q∧γ⊢p:𝗉),A⤳B⇔∃t(u:A,Γ⊢t:B∧u:𝗉,γ⊢t:𝗉),A≃B⇔(A⤳B)∧(B⤳A).\begin{aligned} \Gamma;\gamma\models Q &\iff \exists p\;(\Gamma\vdash p:Q\ \land\ \gamma\vdash p:\mathsf p),\\ A\leadsto B &\iff \exists t\;(u:A,\Gamma\vdash t:B\ \land\ u:\mathsf p,\gamma\vdash t:\mathsf p),\\ A\simeq B&\iff(A\leadsto B)\land(B\leadsto A). \end{aligned}(2)

A raw data callback ff from TT to UU is an open term satisfying x:T,Γ⊢f:Ux:T,\Gamma\vdash f:U and x:𝖽,γ⊢f:𝖽x:\mathsf d,\gamma\vdash f:\mathsf d; UU belongs to the ambient context.✦ Its instance f[a]f[a] substitutes aa for the distinguished variable without capture.✦ Open composition f∘gf\circ g substitutes gg for that variable while preserving the common ambient context.✦

The nondependent labelled arrow A→lBA\to_l B is the dependent product with label ll, domain AA, and codomain BB independent of the bound variable.✦

The Logical Calculus and Paths

A fixed feasible witness family WW is a family of pairs of terms (DH,vH)(D_H,v_H) indexed by sets H⊆SH\subseteq S. At every feasible HH, the type DHD_H is data-only with normal erasure and is sorted at HH, while Γ⊢vH:DH\Gamma\vdash v_H:D_H and both terms have data mode.✦ A proof wrapper QQ is a finite sequence of positive extensions by types DD and negative extensions by types FF, acting on types as in (3). id[T]=T,(QD+)[T]=D→dpQ[T],(QF−)[T]=Q[T]→ppF.\mathrm{id}[T]=T,\qquad (Q^+_D)[T]=D\to_{dp}Q[T],\qquad (Q^-_F)[T]=Q[T]\to_{pp}F.(3) The proof wrapper application Q[T]Q[T] to a labelled type TT is the type specified recursively by (3).

A formed proof path QQ is a sequence of steps beginning with the identity at its source profile and permitting restriction of its target to any subset. A triple (A,J,K)(A,J,K) permits a positive extension from JJ to KK using DAD_A. A triple (J,B,K)(J,B,K) permits a negative extension using DBD_B when J,K∈CJ,K\in C. Its parity counts negative steps modulo two; the negative-step presence test records whether there is any such step.

A logical setup LL for CC consists of WW and typed open proof transformers between the witness types of any two terminal profiles, together with a feasible triple (d,b,k)(d,b,k) with d,b,k∈Cd,b,k\in C and even proof paths Qin:b→dQ_{\mathrm{in}}:b\to d and Qout:k→bQ_{\mathrm{out}}:k\to b. At each direct observation layer II, its quantifier route chooses a triple (I,J,K)(I,J,K) and even proof paths from bb to JJ and from KK to bb.✦ The logical operation code consists of the falsity type DbD_b and the two fixed proof wrappers.✦ Its connectives are those of (4); all connectives below belong to this code. ⊥=Db,A→LB=Qout[Qin[A]→ppB],¬A=A→L⊥,⊤=⊥→L⊥,A∧B=¬(A→L¬B),A∨B=¬(¬A∧¬B),cond⁡(G,A,B)=(G∧A)∨(¬G∧B).\begin{aligned} \bot&=D_b,& A\to_L B&=Q_{\mathrm{out}}[Q_{\mathrm{in}}[A]\to_{pp}B],\\ \neg A&=A\to_L\bot,&\top&=\bot\to_L\bot,\\ A\land B&=\neg(A\to_L\neg B),& A\lor B&=\neg(\neg A\land\neg B),\\ \operatorname{cond}(G,A,B)&=(G\land A)\lor(\neg G\land B). \end{aligned}(4) Logical implication A→LBA\to_L B between labelled formulas is the outgoing proof wrapper applied to the proof-to-proof arrow from the incoming wrapper applied to AA to BB. Logical negation ¬A\neg A is implication from the labelled formula AA to the falsity type of LL. Implication from the falsity type of LL to itself gives logical truth ⊤\top. Logical conjunction A∧BA\land B of labelled formulas is the negation of implication from AA to the negation of BB, with all operations taken in LL. Negating the conjunction of the negations of labelled formulas gives their logical disjunction A∨BA\lor B, with all operations taken in LL. The logical conditional cond⁡(G,A,B)\operatorname{cond}(G,A,B) with guard GG and branches A,BA,B is the disjunction of G∧AG\land A and ¬G∧B\neg G\land B, with all operations taken in LL.

A mode-preserving context embedding is a renaming of variables into a valid context that preserves their types and modes.✦ Such embeddings transport witness families and logical setups, including the fixed proof paths and quantifier routes. A witness continuation for a term QQ is the condition that, after every mode-preserving context embedding and at every terminal profile HH, a typed open proof transformer from the renamed QQ to the renamed DHD_H entails proof mode inhabitation of that DHD_H.✦ A term QQ has stable witness extraction when, after every mode-preserving context embedding, a witness continuation for its image entails proof mode inhabitation of that image.✦ An interpretable formula QQ in Γ\Gamma is a data-mode term sorted at bb with stable witness extraction.✦ A stable formula family GG over AA is a raw callback whose instances are interpretable formulas after every mode-preserving embedding and every data-mode input of the renamed type AA.✦

A positive data path is a finite sequence of positive extensions retaining an annotation and dummy value at each step.✦ Its formation starts with the identity, permits target restriction, and extends from JJ to KK along (A,J,K)(A,J,K) using (DA,vA)(D_A,v_A).✦ A data tail VV is a sort ss with a positive data path and encoding and decoding proof wrappers.✦ It is formed with endpoint BB when {s}∈C\{s\}\in C, the profile Ax⁡(s)\operatorname{Ax}(s) is nonempty, its positive path is formed from Ax⁡(s)\operatorname{Ax}(s) to BB, and its encoding and decoding proof paths go from bb to {s}\{s\} and back with even parity, with a negative step in the decoding path.✦ Write DVD_V for its carrier, with formula transport operations send⁡V\operatorname{send}_V and read⁡V\operatorname{read}_V.

A retained data path VV is a finite sequence generated by the identity, positive extensions retaining a domain and its dummy value, and negative extensions retaining a data tail.✦ Formation permits target restriction; a positive extension along (A,J,K)(A,J,K) retains (DA,vA)(D_A,v_A), and a negative extension along (J,B,K)(J,B,K) uses a formed tail ending at BB. Positive extensions preserve parity and negative extensions reverse it. The wrapped type V[T]V[T], builder 𝖡VT\mathsf B_V^T, and observation 𝖮VT\mathsf O_V^T have the recursive forms in (5), where DD is a retained domain, ee its dummy value, and HH a retained data tail, with capture avoided under the displayed binders. id[T]=T,𝖡idT(a)=a,𝖮idT(w,a)=a[w],(VD,e+)[T]=D→ddV[T],𝖡VD,e+T(a)=λddx:D.𝖡VT(a),𝖮VD,e+T(w,a)=𝖮VT(we,a),(VH−)[T]=V[T]→ddDH,𝖡VH−T(a)=λddz:V[T].send⁡H(𝖮VT(z,a)),𝖮VH−T(w,a)=read⁡H(w(𝖡VT(a))).\begin{aligned} \mathrm{id}[T]&=T,\qquad \mathsf B_{\mathrm{id}}^T(a)=a,\qquad \mathsf O_{\mathrm{id}}^T(w,a)=a[w],\\ (V^+_{D,e})[T]&=D\to_{dd}V[T],\\ \mathsf B_{V^+_{D,e}}^T(a)&=\lambda_{dd}x:D.\mathsf B_V^T(a),\\ \mathsf O_{V^+_{D,e}}^T(w,a)&=\mathsf O_V^T(w\,e,a),\\ (V^-_H)[T]&=V[T]\to_{dd}D_H,\\ \mathsf B_{V^-_H}^T(a)&=\lambda_{dd}z:V[T]. \operatorname{send}_H(\mathsf O_V^T(z,a)),\\ \mathsf O_{V^-_H}^T(w,a)&=\operatorname{read}_H (w\,(\mathsf B_V^T(a))). \end{aligned}(5)

For an odd path VV, its observation and contravariant observation callbacks are the open terms in (6). 𝖤VT(w)(x)=𝖮VT(w,x),𝖢VT(a)(x)=𝖮VT(x,a).\mathsf E_V^T(w)(x)=\mathsf O_V^T(w,x),\qquad \mathsf C_V^T(a)(x)=\mathsf O_V^T(x,a).(6)

Renaming a retained path or proof wrapper renames its fixed annotations and values, preserving the sequence of steps and its parity.

Bundles and Access Observations

A double data channel R=(R1,R2)R=(R_1,R_2) is a pair of odd retained data paths.✦ It is formed from II through JJ to KK when R1R_1 is formed from II to JJ and R2R_2 from JJ to KK.✦ Subscripts 11 and 22 on builders and observations refer to these paths. For a type AA, a dummy value dd, a parameter mm, and a payload yy of type AA, the bundle branch predicate HH and source data bundle bun\operatorname{bun} are defined by (7). HA,d,m,y(z)=cond⁡(𝖮1A(z,d),𝖮1A(z,m),𝖮1A(z,y)),bun⁡A(d,m,y)=𝖡2R1[A](HA,d,m,y).\begin{aligned} H_{A,d,m,y}(z)&=\operatorname{cond} (\mathsf O_1^A(z,d),\mathsf O_1^A(z,m),\mathsf O_1^A(z,y)),\\ \operatorname{bun}_A(d,m,y)&= \mathsf B_2^{R_1[A]}(H_{A,d,m,y}). \end{aligned}(7)

For a type AA, a guard callback GG, a channel value ww, and a raw data callback ff, the outer access predicate KK, access probe, and bundle access observation are given by (8). KA,G,w,f(x)=cond⁡(G[x],⊤,𝖮2R1[A](w,f[x])),probe⁡A,G(w,f)=𝖡1A(KA,G,w,f),acc⁡A,G(w,f)=𝖮2R1[A](w,probe⁡A,G(w,f)).\begin{aligned} K_{A,G,w,f}(x)&=\operatorname{cond} (G[x],\top,\mathsf O_2^{R_1[A]}(w,f[x])),\\ \operatorname{probe}_{A,G}(w,f)&=\mathsf B_1^A(K_{A,G,w,f}),\\ \operatorname{acc}_{A,G}(w,f)&=\mathsf O_2^{R_1[A]} (w,\operatorname{probe}_{A,G}(w,f)). \end{aligned}(8)

Write 𝒞(T)\mathcal C(T) for the channel carrier. For a nonnegative integer nn, its iterated carrier and fourfold carrier, together with the predicate code type BTB_T and parameter type PTP_T, are specified in (9). 𝒞0(T)=T,𝒞n+1(T)=𝒞(𝒞n(T)),big⁡(T)=𝒞4(T),BT=R1[big⁡(T)],PT=R2[BT].\begin{aligned} \mathcal C^0(T)&=T,&\mathcal C^{n+1}(T)&=\mathcal C(\mathcal C^n(T)),\\ \operatorname{big}(T)&=\mathcal C^4(T),&B_T&=R_1[\operatorname{big}(T)],\\ P_T&=R_2[B_T]. \end{aligned}(9)

The bottom predicate code bT⊥b_T^\bot, dummy parameter dTd_T, and dummy predicate δT\delta_T are the terms in (10). The open dummy parameter test is x↦δT(x)x\mapsto\delta_T(x).✦ bT⊥=𝖡1big⁡(T)(x↦⊥),dT=𝖡2BT(x↦⊤),δT(o)=𝖮2BT(o,bT⊥).\begin{aligned} b_T^\bot&=\mathsf B_1^{\operatorname{big}(T)}(x\mapsto\bot),\\ d_T&=\mathsf B_2^{B_T}(x\mapsto\top),\\ \delta_T(o)&=\mathsf O_2^{B_T}(o,b_T^\bot). \end{aligned}(10)

For q∈{0,…,8}q\in\{0,\ldots,8\}, let bits⁡(q)\operatorname{bits}(q) list binary digits zero through three, in that order.✦ A tag t∈{0,…,7}t\in\{0,\ldots,7\} has nonzero query index t+1t+1.✦ Write ebTe_b^T for the one-stage signed embedding, rTr_T for the one-stage recovery predicate, and bit⁡T\operatorname{bit}_T for the bit predicate. The iterated signed embedding, indexed by a finite list bsbs of binary digits, and query-tagged embedding EqTE_q^T are specified by (11), where ⌀\varnothing denotes the empty list, |bs||bs| denotes the length of bsbs, and b::bsb::bs prefixes the digit bb to the list bsbs; the tagged variable embedding is x↦EqT(x)x\mapsto E_q^T(x). E⌀T(a)=a,Eb::bsT(a)=eb𝒞|bs|(T)(EbsT(a)),EqT(a)=Ebits⁡(q)T(a).\begin{aligned} E_\varnothing^T(a)&=a,\\ E_{b::bs}^T(a)&=e_b^{\mathcal C^{|bs|}(T)}(E_{bs}^T(a)),\\ E_q^T(a)&=E_{\operatorname{bits}(q)}^T(a). \end{aligned}(11)

The iterated recovery predicate ρnT\rho_n^T and tag predicate τbsT\tau_{bs}^T satisfy (12), where sign⁡1(F)=F\operatorname{sign}_1(F)=F and sign⁡0(F)=¬F\operatorname{sign}_0(F)=\neg F; write τqT\tau_q^T for τbits⁡(q)T\tau_{\operatorname{bits}(q)}^T. ρ0T(Q)=Q,ρn+1T(Q)=r𝒞n(T)(ρnT(Q)),τ⌀T=⊤,τb::bsT=sign⁡b(bit⁡𝒞|bs|(T))∧r𝒞|bs|(T)(τbsT).\begin{aligned} \rho_0^T(Q)&=Q,\\ \rho_{n+1}^T(Q)&=r_{\mathcal C^n(T)}(\rho_n^T(Q)),\\ \tau_\varnothing^T&=\top,\\ \tau_{b::bs}^T&=\operatorname{sign}_b (\operatorname{bit}_{\mathcal C^{|bs|}(T)})\land r_{\mathcal C^{|bs|}(T)}(\tau_{bs}^T). \end{aligned}(12)

Let UU be an odd retained data path. For a type TT, a payload pp of type U[T]U[T], and a predicate code bpbp of type BTB_T, the tagged payload encoder for UU uses the encoding predicate in (13), and its payload decoder uses the decoding callback in the same display. The decoding map is the open callback x↦dec⁡UT(x)x\mapsto\operatorname{dec}_U^T(x).✦ FU,t,T,p=(τ0T∧ρ4T(𝖤UT(p)))∨τt+1T,enc⁡U,tT(p)=𝖡1big⁡(T)(FU,t,T,p),DT,bp=𝖤1big⁡(T)(bp)∘(x↦E0T(x)),dec⁡UT(bp)=𝖡UT(DT,bp).\begin{aligned} F_{U,t,T,p}&=(\tau_0^T\land\rho_4^T(\mathsf E_U^T(p)))\lor\tau_{t+1}^T,\\ \operatorname{enc}_{U,t}^T(p)&= \mathsf B_1^{\operatorname{big}(T)}(F_{U,t,T,p}),\\ D_{T,bp}&=\mathsf E_1^{\operatorname{big}(T)}(bp)\circ(x\mapsto E_0^T(x)),\\ \operatorname{dec}_U^T(bp)&=\mathsf B_U^T(D_{T,bp}). \end{aligned}(13)

For a tag tt and data-mode terms c0,cc_0,c of type TT, the marking predicate μtT(c0)\mu_t^T(c_0) and data point predicate QQ define the encoded data point in (14). μtT(c0)(bp)=𝖮1big⁡(T)(bp,Et+1T(c0)),QU,T,c0,c(bp)=μ7T(c0)(bp)∧𝖮UT(dec⁡UT(bp),c),pt⁡UT(c0,c)=𝖡2BT(QU,T,c0,c).\begin{aligned} \mu_t^T(c_0)(bp)&=\mathsf O_1^{\operatorname{big}(T)} (bp,E_{t+1}^T(c_0)),\\ Q_{U,T,c_0,c}(bp)&=\mu_7^T(c_0)(bp)\land \mathsf O_U^T(\operatorname{dec}_U^T(bp),c),\\ \operatorname{pt}_U^T(c_0,c)&=\mathsf B_2^{B_T}(Q_{U,T,c_0,c}). \end{aligned}(14)

The query predicate η\eta, inner probe predicate jj, and inner observation probe ii are defined by (15). ηU,T,p(o)=𝖮2BT(o,enc⁡U,7T(p)),jU,T,p(o)=cond⁡(δT(o),⊥,ηU,T,p(o)),iUT(p)=𝖡1PT(jU,T,p).\begin{aligned} \eta_{U,T,p}(o)&=\mathsf O_2^{B_T}(o,\operatorname{enc}_{U,7}^T(p)),\\ j_{U,T,p}(o)&=\operatorname{cond}(\delta_T(o),\bot,\eta_{U,T,p}(o)),\\ i_U^T(p)&=\mathsf B_1^{P_T}(j_{U,T,p}). \end{aligned}(15)

The inner probe callback is x↦iUT(x)x\mapsto i_U^T(x).✦ For a raw data callback pp from PTP_T to U[T]U[T], its composition with the inner probe callback is the parameter access callback aU,pTa_{U,p}^T; recovery access is the observation in (16). aU,pT=(x↦iUT(x))∘p,racc⁡U,T(w,p)=acc⁡PT,δT(w,aU,pT).a_{U,p}^T=(x\mapsto i_U^T(x))\circ p,\qquad \operatorname{racc}_{U,T}(w,p)= \operatorname{acc}_{P_T,\delta_T}(w,a_{U,p}^T).(16)

The Claim

Theorem 1. Fix a logical setup LL and a formed double channel RR with initial profile II. Let AA have data mode, be sorted at II, and satisfy Γ⊢A:s\Gamma\vdash A:s for some sort ss. Let d,m,yd,m,y be data-mode terms of type AA, let GG be a stable formula family over AA, and let ff be a raw data callback from AA to R1[A]R_1[A]. Suppose Γ;γ⊨G[d]\Gamma;\gamma\models G[d], Γ;γ⊨¬G[m]\Gamma;\gamma\models\neg G[m], and Γ;γ⊨¬𝖮1A(f[m],d)\Gamma;\gamma\models\neg\mathsf O_1^A(f[m],d). The bundle access law is (17). acc⁡A,G(bun⁡A(d,m,y),f)≃𝖮1A(f[m],y).\operatorname{acc}_{A,G}(\operatorname{bun}_A(d,m,y),f) \simeq \mathsf O_1^A(f[m],y).(17)✦

Let TT have data mode and be sorted at II, let UU be an odd retained data path, and let pp be a raw data callback from PTP_T to U[T]U[T]. Let mm be a data-mode term of type PTP_T, and c0,cc_0,c data-mode terms of type TT. Suppose Γ⊢T:s\Gamma\vdash T:s and Γ⊢BT:r\Gamma\vdash B_T:r for some sorts s,rs,r, and suppose Γ;γ⊨¬δT(m)\Gamma;\gamma\models\neg\delta_T(m). The recovered access law is (18). racc⁡U,T(bun⁡PT(dT,m,pt⁡UT(c0,c)),p)≃𝖮UT(p[m],c).\operatorname{racc}_{U,T} \bigl(\operatorname{bun}_{P_T}(d_T,m,\operatorname{pt}_U^T(c_0,c)),p\bigr) \simeq \mathsf O_U^T(p[m],c).(18)✦

What Is Checked

The two laws are stated over labelled typing and the data and proof mode discipline, with formed retained paths under a logical setup; their hypotheses concern stable formula families, raw data callbacks, and proof mode inhabitation of the displayed guards.