The Setting
A data argument can pass through two contravariant data paths while formulas continue to observe it. The two choices of sign belong to the embedding of that argument; the observations are formulas interpreted in an ambient logical calculus.
Fix a pure type specification , with arbitrary axiom and product-rule relations. Terms are variables, sorts, applications, annotated abstractions and dependent products .β¦ Contexts are newest-first. Named binders below stand for de Bruijn syntax, with index zero at the nearest binder. A valid context starts empty and extends by whenever for some sort .β¦ Typing uses the axiom, variable, weakening, product, abstraction, application and conversion rules determined by .
Full reduction contracts to and reduces in every annotation and binder body.β¦ Beta convertibility is the equivalence relation generated by full reduction.β¦ A term is normal if it admits no full reduction step; a term is weakly normalizing if it reaches a normal term in finitely many full reduction steps. Write for its chosen full normal form when one exists, with a fixed fallback otherwise.β¦ For a term in a context , sets of sorts and a sort , the normal form sort profile, product output profile and axiom successor set are given in (1). (1) A feasible profile is a nonempty set for a normal term in a valid context .β¦ A feasible product profile triple consists of feasible profiles with .β¦ The axiom profile of a sort is denoted by .
The primary signed graph has positive edges from a feasible profile to a proper feasible subset. A feasible triple also gives a negative edge and a positive edge . A profile is positively reachable from a profile if there is a finite path of positive edges from to , with the empty path allowed.β¦ Fix a collection of profiles. An observation layer relative to is a feasible profile positively reachable from for some with nonempty .β¦ An observation layer relative to is direct if some feasible triple has that layer as domain and has .β¦ A terminal profile relative to is a feasible profile occurring in a feasible triple with .β¦
Labelled terms attach , or to every application, abstraction and product.β¦ These labels have argument and result modes data/data, data/proof and proof/proof, respectively. The erasure of a labelled term is the unlabelled term obtained by deleting its labels. Labelled typing uses the same typing rules, with matching labels on an abstraction and its dependent product type, and on a functionβs product type and its application.β¦ Labelled contraction requires matching application and abstraction labels; its closure under term components and its convertibility are defined as above. A data-only term has label at every labelled constructor.β¦
A mode assignment assigns data or proof to each variable. The mode discipline gives variables their assigned modes and sorts data mode. An application requires its function and argument to have the result and argument modes of its label. An abstraction requires a data annotation and a body of the result mode under the argument-mode extension of . A product requires data domain and codomain under that same extension and has data mode. Write for the nondependent labelled product.β¦ Renaming and simultaneous capture-avoiding substitution preserve labels; under a binder their lifts fix the bound variable and shift the renamed variables or substituted terms. Instantiation replaces the newest variable by and lowers older indices.β¦
Sorting at a profile requires every indicated sort, as in (2); other sorts may also type the same term.β¦ (2)β¦ A fixed feasible witness family chooses a type and value for every profile. At each feasible , the type is data-only with normal erasure and satisfies ; moreover , and both and have data mode under .β¦
Logical Interpretation
A proof wrapper is a finite sequence of positive and negative extensions of the identity, each retaining a fixed labelled term.β¦ Its application is defined by (3). (3)β¦ A formed proof wrapper from to starts with the identity at , allows target restriction to a subset, and extends along feasible triples. A positive extension along retains and preserves parity. A negative extension along retains , requires , and reverses parity. The parity of a proof wrapper is its number of negative extensions modulo two; contains a negative step if at least one of its extensions is negative.
Write when a proof-mode term satisfies .β¦ A typed open proof transformer from to is a proof-mode term in the context extended by a proof variable , with expected type weakened into that context.β¦ Formula equivalence means a uniform typed open proof transformer in each direction.β¦
An ambient logical calculus consists of a witness family , typed open proof transformers between its witness types at any two terminal profiles, and the following profile, proof-wrapper and quantifier-route choices. It chooses profiles forming a feasible triple , together with even proof wrappers from to and from to . For every direct observation layer , it also chooses a quantifier route: a feasible triple with an even input proof wrapper from to and an even output proof wrapper from to . The logical base is and falsity is . These choices determine the logical operations in (4). (4) The operations in (4) are logical implication, logical negation, logical truth, logical conjunction, logical disjunction, the logical conditional and polarity selection. A logical operation code consists of a labelled falsity term and incoming and outgoing proof wrappers. The code associated with consists of , and .
A mode-preserving context embedding is a variable renaming into a valid context that preserves variable types and modes.β¦ Context lookup shifts a declarationβs type across each newer declaration.β¦ Write for renaming by , and for its lift under a binder. A witness continuation for a term relative to is the condition that, after every mode-preserving context embedding into and for every terminal , the existence of a typed open proof transformer from to entails .β¦ Stable witness extraction for a term is the property that, after every mode-preserving context embedding into , a witness continuation for relative to the transported witness family entails .β¦ Renaming a proof wrapper preserves its identity and its sequence of positive and negative steps, and renames the fixed annotation at every step. Renaming a logical operation code renames its falsity term and its incoming and outgoing proof wrappers by the same variable renaming.
An interpretable formula for is a data-mode term sorted at that admits stable witness extraction.β¦ A stable formula family over is a term with a distinguished input such that, under every mode-preserving context embedding and for every data-mode argument with , the instance is an interpretable formula for the transported calculus .β¦
Retained Data Paths
A positive data path is a finite sequence of positive extensions retaining an annotation and dummy value at each step.β¦ Formation starts at the identity, permits target restriction, and extends from to along a feasible triple using .β¦ A data path tail is a positive data path equipped with a sort and encoding and decoding proof wrappers.β¦ A data path tail with chosen sort is formed at when , is nonempty, and its positive part is formed from to . Its encoding wrapper is even from to ; its decoding wrapper is even from to and contains a negative step.
A retained data path is an identity followed by positive extensions retaining a type and dummy value, or negative extensions retaining a data path tail.β¦ A formed retained path from to permits target restriction as before. A positive extension along retains . A negative extension along requires a formed tail at . Positive extensions preserve parity and negative extensions reverse it.
The wrapped type is at the identity. A positive extension with annotation changes it to ; a negative extension with tail changes it to , where is the tail carrier. The builder returns at the identity and adds a constant data abstraction at a positive extension. At a negative extension it abstracts over , observes the bound input against along the inner path, and sends the resulting formula through the tailβs encoding operation. Ambient variables are shifted under the binder, while any distinguished input of is retained.
The observation is at the identity. At a positive extension it applies to the retained dummy value and continues along the inner path. At a negative extension it applies to the inner builder and reads the result through the tailβs decoding operation. For odd , the contravariant term associated to is the body in the context extended by , with all ambient terms and path annotations weakened into that context.β¦
Double Channels
A double data channel consists of two odd retained data paths.β¦ It is formed from through to when is formed from to and from to .β¦ For a bit , the signed embeddings and observations of are defined in (5), where denotes a double channel value and a formula callback with a distinguished input. Expressions displayed as denote bodies with a distinguished input, with ambient terms and logical operations weakened under that input. (5) The operations , and in (5) are encoded bit observation, double channel evaluation and signed payload recovery, respectively.
The Claim
Theorem 1 (Canonical signed embeddings). Let be an ambient logical calculus in and let be a formed double data channel from through to . Suppose , , and both and have data mode under . For either , (6)β¦ For every stable formula family over , (7)β¦
What Is Checked
The assertions (6) and (7) are stated over labelled typing and the data/proof mode discipline, a fixed logical calculus and two formed odd data paths; recovery also assumes a stable formula family. Transport along a mode-preserving context embedding retains the witness familyβs data-only types with normal erasures, profile sorting and typed data values. Transport of the logical calculus retains its profiles and proof transformers between terminal witness types, renames its fixed proof wrappers, and transports each quantifier route with the same feasible triple. Renaming a retained data path preserves its extension sequence and renames its annotations and tails.β¦