The Setting
The observations of a double data channel are data terms, while their tests are formulas inhabited in proof mode. A dummy test asks about an observation; a marker test asks about its predicate payload. Point queries also take a supplied data predicate.
Fix a pure type specification with arbitrary axiom and product-rule relations. Terms are built from variables and sorts by application, annotated abstraction , and dependent product .✦ Labelled terms attach one of the argument and result labels , and to these constructors, for data to data, data to proof, and proof to proof respectively. Erasure deletes the labels.✦ Named variables are used below; the underlying indices are de Bruijn indices, with zero denoting the newest variable, and contexts are newest-first.
In a context , typing is written for the subject and expected type . It uses the axiom and product-rule relations, variable introduction and weakening, annotated abstraction, application, and conversion. Full reduction contracts a labelled application of an abstraction with the same label and allows reduction in every annotation and binder body.✦ Convertibility is the least equivalence relation containing this reduction.✦ Substitution is capture-avoiding; under a binder, renaming fixes the newest variable and shifts the renamed older variables. Instantiation substitutes for the newest variable and lowers the older indices.✦ The open composition of open terms and in a common ambient context is the open term obtained by substituting for the distinguished input of , preserving that context.✦ Renaming acts uniformly on the fixed annotations of all paths and logical codes.
A normal term has no reduct.✦ For a weakly normalizing unlabelled term , write for its chosen reachable normal form.✦ For a sort and sets of sorts, the normal form sort profile of , the axiom successors of , and the product output profile of are (1) A feasible profile is a nonempty set for some normal term in a valid context .✦ A valid context starts empty and extends by a type having a sort in the preceding context.✦ A feasible product profile triple consists of feasible profiles satisfying in (1).✦ For labelled terms, sorting at means (2)✦
Let assign data or proof mode to each variable. Write when has data mode under , and when it has proof mode. Variables take their assigned modes and sorts have data mode. Applications use the argument and result modes of their label. Abstraction annotations have data mode, and bodies have the result mode under extension by the argument mode. Product domains and codomains have data mode under the corresponding binder extension. A data-only term has label at every constructor.✦
Proof-mode inhabitation means that some satisfies and .✦ A typed open proof transformer from to is a proof-mode term of expected type in the context extended by a temporary proof input of type .✦ Typed logical equivalence means that uniform such transformers exist in both directions.✦
Logical Paths and Data Payloads
Fix a collection of profiles. The primary signed profile graph has positive edges from a feasible profile to each proper feasible subprofile. A feasible triple gives a negative edge and a positive edge . Positive reachability permits a finite, possibly empty path of positive edges.✦ An observation layer is a feasible profile positively reachable from a nonempty with .✦ A direct observation layer is an observation layer admitting a feasible triple with .✦ A logical terminal profile is a feasible profile admitting a feasible triple with .✦
A fixed feasible witness family chooses a type and value at each profile. At every feasible , the type is data-only, its erasure is normal, and it is sorted at ; moreover , and both chosen terms have data mode under .
A proof wrapper is a finite path with fixed annotations. Its identity leaves a formula unchanged. The nondependent labelled arrow is a dependent product whose codomain omits the new variable; a positive extension with annotation replaces a wrapped formula by , and a negative extension with annotation replaces it by . Formation starts at the identity, permits restriction of the target profile, and extends along feasible product triples. A positive step along retains and preserves parity. A negative step along retains , requires , and reverses parity. Parity counts negative steps modulo two; containing a negative step is a separate condition.
A logical setup consists of a feasible witness family and typed open proof converters between the witness types at any two logical terminal profiles. It has a feasible triple with , an even input proof path from to , and an even output proof path from to . For each direct observation layer , its quantifier route chooses a feasible triple and even proof paths from to and from to .✦ The logical falsity is the witness type ; together with the input wrapper and output wrapper it determines the logical operation code. Its operations are (3)
A positive data path starts at the identity and has only positive extensions, each retaining a witness annotation and its original dummy value.✦ A formed positive path starts at a specified profile, permits target restriction, and extends along feasible triples using .✦
A data path tail ending at consists of a sort with and nonempty , a formed positive data path from to , an even encoding proof path from to , and an even decoding proof path back to . The decoding path contains a negative step. A retained data path is a path generated by identity, positive extensions with a fixed annotation and dummy value, and negative extensions with a fixed data path tail.✦ Identity has even parity, and positive extensions preserve parity. Its formation permits target restriction; positive extensions use and the witnesses at , whereas negative extensions use and a formed tail ending at .
For a retained path , write for its wrapped data type, for its builder, and for observation. Identity gives , , and substitution of into the distinguished input of , respectively. A positive extension with annotation and dummy gives the arrow ; its builder is a constant annotated data abstraction, and its observation applies to before continuing along . A negative extension gives the data arrow from to its tail’s carrier. Its builder abstracts a wrapped input, observes it along against , and sends the resulting formula through the tail. Its observation applies to the recursively built argument and reads the result through that tail. Negative extensions reverse parity.
For an odd path , a wrapped input , and a data point of type , the evaluation and contravariant observation callbacks are the one-input open terms (4) The ambient variables are shifted beneath the fresh input in (4).
A double channel consists of two odd retained data paths.✦ Formation from through to means that is formed from to and from to .✦ The carrier operation of the double channel wraps a data type first along and then along . Its iterated and fourfold carriers, and its predicate payload type, are (5)
Queries at the fourfold carrier of (5) have indices , whose bit strings list the binary digits in positions zero through three in that order.✦ A marker tag has nonzero query index .✦ The tagged embedding is a data term obtained from by successively applying the one-stage embedding of the double channel for bit zero or bit one, as prescribed by that four-bit string. The empty signed embedding leaves its input unchanged; each preceding bit adds the corresponding one-stage signed embedding at the carrier depth of the remaining string. The tagged variable embedding is as an open term in .✦
Write for the tag predicate of the query bit string. The empty tag predicate is . Each preceding bit conjoins the predicate that distinguishes that bit, or its logical negation for a false bit, with the predicate recovered from the remaining tag after one stage at the appropriate carrier depth. The iterated recovery predicate starts at and adds one recovery stage at each successor depth.✦
Fix the odd retained data path used for supplied predicates. For a predicate payload of type , the decoding callback , payload decoder, and decoding map are (6) For a supplied data predicate of type , the encoding predicate and tagged payload encoder are (7)
The bottom predicate payload and dummy observation are constant-formula builds along the two paths: (8) For an observation and a reference data point of type , the dummy predicate, marker test, and tagged query are the observations (9) The marking predicate body is the open term from (9).✦
An encoded data point uses marker tag seven and the decoding map (6). Its predicate body and point observation are (10)
The Claim
Theorem 1. Let be the logical setup and the formed double channel used above. Let be sorted at as in (2), with . The dummy law is (11): (11)✦
Let satisfy and . For every marker tag , the bottom payload law is (12): (12)✦
Let also satisfy and . Choose sorts with and . For the point defined in (10), the non-dummy law is (13): (13)✦
Under these same assumptions, let satisfy and . The point query law is (14): (14)✦
What Is Checked
The statements are over labelled typing and the data and proof mode discipline, the logical setup and formed double channel, and the displayed constructions of payloads and observations, with the explicit sorting witnesses for and and the typing assumptions on the supplied data terms.