Prerequisites. Direct starred prerequisites: Chapter 66. No later core chapter depends on this route.
A finite product can resolve every continuation before it returns. Countable choice does not come with a last question. A counterexample functional may inspect one more proposed choice than any bound fixed before the functional is run. The required recursion must therefore discover its stopping point from the counterexample while remaining total.
The selected solution has three parts. Finite products of selection functions perform the backward calculation. Their explicitly controlled infinite product satisfies Spector’s equations. Restricted Spector bar recursion implements the same equations in the total continuous functionals, where continuity and bar induction justify totality. No later core chapter depends on this route.
The higher-type arithmetic used here
The finite types are generated by 𝜌,𝜏::=ℕ∣𝜌→𝜏. Finite products and finite sequences are conservative codings. Put deg(ℕ)=0,deg(𝜌→𝜏)=max{deg(𝜌)+1,deg(𝜏)}. The phrase finite type means a member of this hierarchy; it does not mean a type with finitely many elements. The Boolean set used in examples is finite and discrete, while ℕ →ℕ is a finite type with infinitely many inhabitants.
The theory WE-𝖧𝖠𝜔 has variables and quantifiers at every finite type, the System T constants and equations, equality at type ℕ, and induction on ℕ for every formula of the language. Higher-type equality is defined extensionally from equality at ℕ. Full extensionality is replaced by the quantifier-free rule 𝐴0→𝑠=𝜌𝑡𝐴0→𝑟[𝑠]=𝜏𝑟[𝑡](𝖰𝖥-𝖤𝖱), where 𝐴0 is quantifier-free, 𝑠,𝑡 :𝜌, and 𝑟[𝑥] :𝜏. The classical theory WE-𝖯𝖠𝜔 adds excluded middle. Quantifier-free choice is the scheme 𝖰𝖥-𝖠𝖢:(∀𝑥𝜌∃𝑦𝜏.𝐴0(𝑥,𝑦))→∃𝐹𝜌→𝜏∀𝑥.𝐴0(𝑥,𝐹𝑥).
Referenced from 2 locations
The shared rule schema in chapter 66 explains the Dialectica clauses, but that chapter proves its direct soundness theorem only for first-order 𝖧𝖠. It does not prove the higher-type theorem used here. The weakly extensional base and its functional-interpretation soundness are therefore an explicit imported boundary [Koh98].
Fix a formula 𝐴(𝑛,𝑥), and write 𝐴𝖭 for its chosen negative translation. Countable choice and its negative form are different formulas: 𝖠𝖢ℕ: (∀𝑛∃𝑥.𝐴(𝑛,𝑥))→∃𝑓∀𝑛.𝐴(𝑛,𝑓𝑛),𝖼𝖠𝖢ℕ: (∀𝑛¬¬∃𝑥.𝐴𝖭(𝑛,𝑥))→¬¬∃𝑓∀𝑛.𝐴𝖭(𝑛,𝑓𝑛). For a quantifier-free matrix, 𝐴𝖭 =𝐴. The remaining logical principle is double-negation shift 𝖣𝖭𝖲ℕ:(∀𝑛.¬¬𝐵(𝑛))→¬¬∀𝑛.𝐵(𝑛). Work in WE-𝖧𝖠𝜔 +𝖠𝖢ℕ. Then 𝖣𝖭𝖲ℕ derives 𝖼𝖠𝖢ℕ: apply 𝖣𝖭𝖲ℕ to 𝐵(𝑛) ≡∃𝑥.𝐴𝖭(𝑛,𝑥), then use intuitionistic countable choice inside the final double negation. This is the exact logical reduction realized below [Pow13].
Finite choice as backward calculation
Fix types 𝑋,𝑅. The selection type is 𝐽𝑅𝑋:=(𝑋→𝑅)→𝑋. A selection function 𝜀 :𝐽𝑅𝑋 receives a continuation 𝑝 :𝑋 →𝑅 and returns an element of 𝑋. In a Dialectica argument, 𝑝 is a proposed counterexample response, not necessarily a numerical score.
Let 𝜀 :𝐽𝑅𝑋, 𝛿 :𝐽𝑅𝑌, and 𝑞 :𝑋 ×𝑌 →𝑅. Define the applied binary product by 𝑏𝑞(𝑥):=𝛿(𝜆𝑦.𝑞(𝑥,𝑦)),𝑎𝑞:=𝜀(𝜆𝑥.𝑞(𝑥,𝑏𝑞(𝑥))),(𝜀⊗𝛿)(𝑞):=(𝑎𝑞,𝑏𝑞(𝑎𝑞)). For each 𝑖 <𝑚, let 𝜀𝑖 :𝐽𝑅𝑋𝑖. Define the right-associated finite product 𝑃𝑚 by 𝑃0(𝑞)=⋆,𝑃𝑚+1(𝜀0,⃗𝜀)(𝑞)=(𝑎𝑞,𝑃𝑚(⃗𝜀)(𝑞𝑎𝑞)), where 𝑞𝑥(⃗𝑦):=𝑞(𝑥,⃗𝑦),𝑎𝑞:=𝜀0(𝜆𝑥.𝑞(𝑥,𝑃𝑚(⃗𝜀)(𝑞𝑥))).
Referenced from 2 locations
The continuation for the first choice contains the entire later product. Replacing it by 𝑥 ↦𝑞(𝑥,0,…,0) changes the choice problem.
Let every 𝑋𝑖 be {0,1}. Put 𝑞(𝑥0,𝑥1,𝑥2)=4𝑥0+2𝑥1+𝑥2, and resolve ties in favor of zero. Selectors 𝜀0,𝜀2 maximize their continuations, whereas 𝜀1 minimizes. Backward evaluation gives 𝑏𝑥0,𝑥1𝑙𝑎𝑠𝑡𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑖𝑛𝑔𝑠𝑒𝑙𝑒𝑐𝑡𝑜𝑟=1,𝑐𝑥0(𝑥1):=𝑞(𝑥0,𝑥1,𝑏𝑥0,𝑥1),𝜀1(𝑐𝑥0)𝑠𝑡𝑎𝑔𝑒−𝑜𝑛𝑒𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛=0,𝑑(𝑥0):=𝑞(𝑥0,0,1)=4𝑥0+1,𝜀0(𝑑)𝑠𝑡𝑎𝑔𝑒−𝑧𝑒𝑟𝑜𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛=1. Consequently 𝑃3(𝜀0,𝜀1,𝜀2)(𝑞)𝑡ℎ𝑒𝑡ℎ𝑟𝑒𝑒𝑠𝑒𝑙𝑒𝑐𝑡𝑒𝑑𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠=(1,0,1),𝑞(1,0,1)=5. The calculation examines two alternatives at each continuation. It does not enumerate the eight triples simultaneously.
Referenced from 4 locations
Let 𝛼 =𝑃𝑚(⃗𝜀)(𝑞). For each 𝑖 <𝑚, define 𝑝𝑖(𝑥):=𝑞(𝛼(0),…,𝛼(𝑖−1),𝑥,𝑃𝑚−𝑖−1(𝜀𝑖+1,…,𝜀𝑚−1)(𝑞𝑖,𝑥)), where 𝑞𝑖,𝑥 fixes the displayed prefix and 𝑥. Then 𝛼(𝑖)=𝜀𝑖(𝑝𝑖),𝑝𝑖(𝛼(𝑖))=𝑞(𝛼).
Referenced from 4 locations
Proof of Lemma 67.4 — Finite product equations
Proof. Induct on 𝑚. At 𝑚 =0 there is no coordinate. At 𝑚 +1, the definition gives 𝛼(0) =𝜀0(𝑝0), and substitution into the same definition gives 𝑝0(𝛼(0)) =𝑞(𝛼). Fix 𝑖 +1 <𝑚 +1. The tail of 𝛼 is the product of 𝜀1,…,𝜀𝑚 against 𝑞𝛼(0). The induction hypothesis at tail coordinate 𝑖 gives both required equations, and restoring the fixed first coordinate changes 𝑞𝛼(0) back to 𝑞. ◻
For each 𝑖 <𝑚, suppose 𝐴𝖣𝑖=∃𝑥𝑋𝑖∀𝑦𝑅.𝐴𝑖(𝑥,𝑦). The Dialectica obligation for finite DNS has the form (∃⃗𝜀∀⃗𝑝∀𝑖<𝑚.𝐴𝑖(𝜀𝑖(𝑝𝑖),𝑝𝑖(𝜀𝑖(𝑝𝑖))))→(∀𝑞∃𝛼∀𝑖<𝑚.𝐴𝑖(𝛼(𝑖),𝑞(𝛼))). The witness is 𝛼 =𝑃𝑚(⃗𝜀)(𝑞), with the continuations from lemma 67.4. Hence the same product interprets the negative translation of finite choice.
Referenced from 2 locations
Proof of Theorem 67.5 — Finite DNS and finite choice
Proof. Fix 𝑞, take 𝛼 =𝑃𝑚(⃗𝜀)(𝑞), and take the tuple ⃗𝑝 from lemma 67.4. The premise at coordinate 𝑖 is 𝐴𝑖(𝜀𝑖(𝑝𝑖),𝑝𝑖(𝜀𝑖(𝑝𝑖))). The two product equations rewrite its arguments to 𝛼(𝑖) and 𝑞(𝛼), which is the required conclusion. The finite-choice consequence first applies this finite DNS instance to the finitely many existential matrices and then uses intuitionistic finite choice. ◻
This is the equation-level proof of the primary finite-product result [EOP11].
For a complete finite-choice instance, put 𝐴𝑖(𝑥,𝑦) ≡𝑥 =𝑐𝑖, where (𝑐0,𝑐1,𝑐2) =(1,0,1). Take each 𝜀𝑖 to be the constant selector 𝑐𝑖. For every challenger 𝑞, the product returns (1,0,1), and each premise and conclusion reduces to 𝑐𝑖 =𝑐𝑖. This example is logically complete but computationally degenerate. The score calculation in example 67.3 shows the continuation dependence hidden by constant selectors.
Let 𝑇𝑛 extend the type-zero fragment 𝑇0 by recursors whose result types have degree at most 𝑛. Let 𝑃𝑛 extend 𝑇0 by finite-product functionals at types of degree at most 𝑛. For every 𝑋,𝑅: 𝑃𝑋,𝑅 is definable in 𝑇0+𝑅𝑋∗→𝑋ℕ,𝑇𝑛+1 defines 𝑃𝑛,𝑅𝑋 is definable in 𝑇0+𝑃𝑋,𝑋ℕ,𝑃𝑛 defines 𝑇𝑛,𝑅𝑋→𝑋 is definable in 𝑇0+𝑃𝑋,𝑋ℕ,𝑃𝑛 defines 𝑇𝑛+1. Thus 𝑃𝑛 and 𝑇𝑛+1 are interdefinable. The product at level 𝑛 matches recursion one level higher, not recursion at the same level.
Referenced from 2 locations
Proof of Proposition 67.6 — Exact finite-type level
Proof. The first construction recurses over a continuation state of type 𝑋∗ →𝑋ℕ. The second makes a product write the successive states of an 𝑋-valued recursor into an 𝑋ℕ register. The third uses selection functions over 𝑋 →𝑋, which raises the result-type degree once. ◻
These are precisely Theorems 18, 19, and 21 and Corollary 22 of the finite-product source [EOP11].
★★☆ Repeat example 67.3 for 𝑞′(𝑥0,𝑥1,𝑥2) =3𝑥0 +𝑥1 +5𝑥2. Display every continuation. Then reverse only the tie convention of 𝜀0 and determine whether the tuple changes. (Half a page.)
Referenced from 3 locations
Why no uniform truncation suffices
Suppose 𝑋 contains distinct points 0𝑋,1𝑋. For every 𝑚, a continuous functional 𝑞𝑚 :𝑋ℕ →ℕ exists whose value is not determined by coordinates below 𝑚.
Referenced from 3 locations
Proof of Proposition 67.7 — No uniform coordinate horizon
Proof. Define 𝑞𝑚(𝛼) =1 when 𝛼(𝑚) =1𝑋, and zero otherwise. The functional inspects one coordinate, so it is continuous. Streams that agree below 𝑚 and differ at 𝑚 receive different values. ◻
The proposition refutes a uniform truncation of all continuous challengers. It does not by itself prove that System T cannot realize DNS; such a nondefinability theorem needs a semantic separation argument not developed here. What the proposition forces locally is a control functional whose value is consulted during the recursion.
The explicitly controlled product
Let 𝑋 be a discrete type with a distinguished point 0𝑋. Write 𝑋∗ for finite lists. For a stream 𝛼 :𝑋ℕ, its prefix of length 𝑛 is [𝛼](𝑛). Write 𝑠 ∗𝑥 for list append, 𝑠 ∗𝛼 for prefixing a stream, and 𝟎 for the constant 0𝑋-stream. For 𝑞 :𝑋ℕ →𝑅, put 𝑞𝑠(𝛽):=𝑞(𝑠 ∗𝛽).
Let 𝜀𝑛 :𝐽𝑅𝑋 be a sequence of selectors, and let 𝑙 :𝑅 →ℕ. The functional 𝖾𝗉𝗌,𝑙𝑛(𝜀) :(𝑋ℕ →𝑅) →𝑋ℕ satisfies 𝖾𝗉𝗌,𝑙𝑛(𝜀)(𝑞)={𝟎,𝑙(𝑞(𝟎))<𝑛,𝑐∗𝖾𝗉𝗌,𝑙𝑛+1(𝜀)(𝑞𝑐),𝑙(𝑞(𝟎))≥𝑛, where 𝑐:=𝜀𝑛(𝜆𝑥.𝑞(𝑥∗𝖾𝗉𝗌,𝑙𝑛+1(𝜀)(𝑞𝑥))). The root stream is 𝛼:=𝖾𝗉𝗌,𝑙0(𝜀)(𝑞).
Referenced from 2 locations
The strict inequality is part of the interface. Equality takes the recursive branch. This is the simple product of the primary source, not its later history-sensitive dependent variant [EO14].
For 𝛼 =𝖾𝗉𝗌,𝑙0(𝜀)(𝑞) and every 𝑖, 𝛼=[𝛼](𝑖)∗𝖾𝗉𝗌,𝑙𝑖(𝜀)(𝑞[𝛼](𝑖)).
Referenced from 2 locations
Proof of Lemma 67.9 — Prefix factorization
Proof. Induct on 𝑖. At zero the equation is the definition of 𝛼. Assume the factorization at 𝑖. If 𝑙(𝑞[𝛼](𝑖)(𝟎)) <𝑖, the recursive call is 𝟎, so 𝛼 =[𝛼](𝑖) ∗𝟎. The same value of 𝑞 occurs after one more zero, and the strict inequality implies 𝑙(𝑞[𝛼](𝑖+1)(𝟎)) <𝑖 +1; the call at 𝑖 +1 is also zero. If the inequality fails, one unfolding writes a head 𝑐 =𝛼(𝑖) and the tail call at 𝑖 +1. In both cases the factorization at 𝑖 +1 follows. ◻
This is the full two-case induction of Lemma 3.2 [EO14].
Define 𝑝𝑖(𝑥):=𝑞[𝛼](𝑖)∗𝑥(𝖾𝗉𝗌,𝑙𝑖+1(𝜀)(𝑞[𝛼](𝑖)∗𝑥)). If 𝑖 ≤𝑙(𝑞(𝛼)), then 𝛼(𝑖)=𝜀𝑖(𝑝𝑖),𝑝𝑖(𝛼(𝑖))=𝑞(𝛼).
Referenced from 4 locations
Proof of Theorem 67.10 — Controlled-product equations
Proof. First prove that the call at stage 𝑖 takes the recursive branch. If it stopped, then 𝑙(𝑞[𝛼](𝑖)(𝟎)) <𝑖. Prefix factorization would give 𝛼 =[𝛼](𝑖) ∗𝟎, hence 𝑖>𝑙(𝑞[𝛼](𝑖)(𝟎))𝑝𝑟𝑒𝑓𝑖𝑥𝑓𝑎𝑐𝑡𝑜𝑟𝑖𝑧𝑎𝑡𝑖𝑜𝑛=𝑙(𝑞(𝛼))≥𝑖, a contradiction. One unfolding therefore gives 𝛼(𝑖) =𝜀𝑖(𝑝𝑖). Prefix factorization at 𝑖 +1 gives 𝑝𝑖(𝛼(𝑖))𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛𝑜𝑓𝑡ℎ𝑒𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑎𝑡𝑖𝑜𝑛=𝑞([𝛼](𝑖)∗𝛼(𝑖)∗𝖾𝗉𝗌,𝑙𝑖+1(𝜀)(𝑞[𝛼](𝑖+1)))𝑙𝑒𝑚𝑚𝑎67.9,𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑜𝑟𝑠𝑡𝑎𝑔𝑒=𝑞(𝛼). ◻
The hypothesis and contradiction are exactly those of Theorem 3.8 [EO14].
★★☆ Let 𝑙(𝑟) =𝑟, and suppose a call at depth two has 𝑞(𝟎) =2. Unfold the printed strict test and the mutant test 𝑙(𝑞(𝟎)) ≤2. Show which side of the first controlled-product equation can change. (Half a page.)
Referenced from 3 locations
Dependent control and restricted Spector recursion
Restricted Spector recursion lets the selector depend on the finite history. For 𝑠 ∈𝑋∗ and 𝛽 :𝑋ℕ, define the prefix-preserving update 𝗉𝗎𝗍(𝑠,𝛽)(𝑖):={𝑠(𝑖),𝑖<|𝑠|,𝛽(𝑖),𝑖≥|𝑠|. Unlike list prefixing, 𝗉𝗎𝗍 does not shift the tail indices.
For history-sensitive selectors 𝜀𝑠 :𝐽𝑅𝑋, define 𝖤𝖯𝖲,𝑙𝑠(𝜀)(𝑞)={𝟎,𝑙(𝑞(𝟎))<|𝑠|,𝑐∗𝖤𝖯𝖲,𝑙𝑠∗𝑐(𝜀)(𝑞𝑐),𝑙(𝑞(𝟎))≥|𝑠|, where 𝑐:=𝜀𝑠(𝜆𝑥.𝑞(𝑥∗𝖤𝖯𝖲,𝑙𝑠∗𝑥(𝜀)(𝑞𝑥))).
Referenced from 2 locations
This is Definition 3.11 of the arXiv source. Its course-of-values adapter proves that the simple product defines the dependent product by a System T term [EO14].
Let 𝛿𝑠 :(𝑋 →𝑋ℕ) →𝑋, and let 𝜔 :𝑋ℕ →ℕ. Restricted Spector recursion satisfies 𝖲𝖡𝖱𝜔𝑠(𝛿)={𝗉𝗎𝗍(𝑠,𝟎),𝜔(𝗉𝗎𝗍(𝑠,𝟎))<|𝑠|,𝗉𝗎𝗍(𝑠,𝖲𝖡𝖱𝜔𝑠∗𝑐(𝛿)),𝜔(𝗉𝗎𝗍(𝑠,𝟎))≥|𝑠|, where 𝑐:=𝛿𝑠(𝜆𝑥.𝖲𝖡𝖱𝜔𝑠∗𝑥(𝛿)).
Referenced from 2 locations
The result preserves 𝑠 definitionally: [𝖲𝖡𝖱𝜔𝑠(𝛿)](|𝑠|)=𝑠. In the recursive branch, the child already preserves 𝑠 ∗𝑐, so applying 𝗉𝗎𝗍(𝑠, −) changes no coordinate. The source writes this operation with its update symbol; the explicit definition above prevents it from being mistaken for shifting concatenation. This is the special recursor in Definition 3.17 [EO14].
At the selected homogeneous types, dependent EPS defines restricted SBR by a System T adapter. The adapter preserves both defining equations.
Referenced from 5 locations
Proof of Theorem 67.13 — The controlled product defines SBR
Proof. Take 𝑅′ =𝑋ℕ ×ℕ, 𝑙 =𝜋2, and 𝑞𝜔𝑠(𝛽):=(𝑠∗𝛽,𝜔(𝑠∗𝛽)),̃𝛿𝑠(𝑃):=𝛿𝑠(𝜆𝑥.𝜋1(𝑃𝑥)). Define 𝖲𝖡𝖱𝜔𝑠(𝛿):=𝑠∗𝖤𝖯𝖲𝜋2𝑠(̃𝛿)(𝑞𝜔𝑠). The base tests agree because 𝜋2(𝑞𝜔𝑠(𝟎)) =𝜔(𝑠 ∗𝟎) =𝜔(𝗉𝗎𝗍(𝑠,𝟎)). In the recursive branch, 𝜋1 removes the numerical control before the continuation reaches 𝛿𝑠. The identities 𝑠∗(𝑥∗𝛽)=(𝑠∗𝑥)∗𝛽,(𝑞𝜔𝑠)𝑥=𝑞𝜔𝑠∗𝑥 make the selected heads equal and turn the recursive EPS call into the child SBR call. The outer shifting prefix then agrees with the prefix-preserving update in the SBR equation because the child stream already preserves 𝑠 ∗𝑥. ◻
These are the full adapters of Theorem 3.18 [EO14].
The reverse comparison uses the source’s relativized bar induction, not the decidable two-predicate principle used for semantic totality below. For predicates 𝑆,𝑃 on 𝑋∗, write 𝛼 ∈𝑆 for ∀𝑛.𝑆([𝛼](𝑛)). The scheme BIrel concludes 𝑃([]) from 𝑆([]),∀𝛼∈𝑆.∃𝑛.𝑃([𝛼](𝑛)),∀𝑠∈𝑆.((∀𝑥.(𝑆(𝑠∗𝑥)→𝑃(𝑠∗𝑥)))→𝑃(𝑠)).
Over 𝐸-𝖧𝖠𝜔 +SPEC +BIrel, restricted SBR defines the simple controlled product, and hence defines dependent EPS through the System T course-of-values adapter. Thus EPS and SBR are interdefinable at the selected finite types under these named principles.
Referenced from 3 locations
Proof of Theorem 67.14 — Conditional reverse definability
Proof. The sourced reverse route has four steps. First, restricted SBR defines the general bar recursor 𝖡𝖱𝜔𝑠(𝜙)(𝑞)={𝑞𝑠(𝟎),𝜔(𝗉𝗎𝗍(𝑠,𝟎))<|𝑠|,𝜙𝑠(𝜆𝑥.𝖡𝖱𝜔𝑠∗𝑥(𝜙)(𝑞)),otherwise. That adapter is Powell’s external edge in the comparison. The direct primitive-recursive equivalence between dependent EPS and SBR alone does not give the return from the dependent product to the simple product used here. Second, bar induction and Spector’s condition define the explicitly controlled product of quantifiers 𝖤𝖯𝖰 from 𝖡𝖱. Third, the simple quantifier product is the history-independent instance of EPQ. Fourth, bar induction defines the simple selection product from that quantifier product. Finally Theorem 3.13 defines dependent EPS from the simple product.
The two uses of BIrel are hypotheses, not System T programs. The source records them in Theorems 3.7 and 3.16 and leaves their removal open; its Theorems 3.13 and 3.18 prove only the forward direction used in theorem 67.13. ◻
Powell proves the direct dependent-EPS/SBR equivalence in Example 9.5 and Theorem 9.6(a)[Pow13]. The conditional return to the simple product follows the comparison route in Escardó and Oliva[EO14].
★★★ Unfold the adapter in theorem 67.13 at a prefix 𝑠 of length two. Give the types of 𝑞𝜔𝑠, 𝑙, ̃𝛿𝑠, its argument 𝑃, and the selected 𝑐. Verify the shifting-prefix identity and the final prefix-preservation step used in the recursive branch. (One page.)
Referenced from 3 locations
Totality from continuity and bar induction
The semantic model is the hierarchy of total continuous functionals: every object is total, and each observation of a higher-type output depends on a finite observation of its input. Put ̂𝛼𝑛:=𝗉𝗎𝗍([𝛼](𝑛),𝟎).
For every total continuous 𝜔 :𝑋ℕ →ℕ, ∀𝛼∃𝑛. 𝜔(̂𝛼𝑛)<𝑛.
Referenced from 5 locations
Proof of Lemma 67.15 — Spector's condition
Proof. Continuity at 𝛼 gives a number 𝑘 such that streams agreeing with 𝛼 below 𝑘 receive the same value. Choose 𝑛 >max{𝑘,𝜔(𝛼)}. Then 𝜔(̂𝛼𝑛)𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑖𝑡𝑦𝑎𝑡𝑡ℎ𝑒𝑓𝑖𝑥𝑒𝑑𝑠𝑡𝑟𝑒𝑎𝑚=𝜔(𝛼)<𝑛. The witness depends on 𝛼 and 𝜔; it is not a uniform recursion depth. ◻
This principle is SPEC in the primary comparison [EO14].
The totality proof assumes the following decidable form of bar induction. For predicates 𝐷,𝑄 on 𝑋∗, ∀𝛼∃𝑛.𝐷([𝛼](𝑛))∀𝑠.(𝐷(𝑠)∨¬𝐷(𝑠)),∀𝑠.(𝐷(𝑠)→𝑄(𝑠))∀𝑠.((∀𝑥.𝑄(𝑠∗𝑥))→𝑄(𝑠))𝑄([]).(BIdec) The bar 𝐷 and inductive predicate 𝑄 are distinct. Combining them would delete the premise that a stopping prefix has a total value. This decidable bar-induction boundary is explicit in the primary theorem map [Pow13].
In the total continuous functionals, assume BIdec. If 𝜔 and every 𝛿𝑠 are total continuous functionals, then 𝖲𝖡𝖱𝜔[](𝛿) is total. The EPS term obtained from theorem 67.14 is total under the same semantic hypotheses.
Referenced from 4 locations
Proof of Theorem 67.16 — Totality of restricted Spector recursion
Proof. Define 𝐷(𝑠):=𝜔(𝗉𝗎𝗍(𝑠,𝟎))<|𝑠|,𝑄(𝑠):=𝖲𝖡𝖱𝜔𝑠(𝛿) has a total value. Spector’s condition makes 𝐷 a bar, and comparison of natural numbers makes 𝐷(𝑠) decidable. If 𝐷(𝑠), the base equation returns 𝗉𝗎𝗍(𝑠,𝟎), so 𝑄(𝑠).
For the inductive premise, fix 𝑠 and assume 𝑄(𝑠 ∗𝑥) for every total 𝑥 :𝑋. The map 𝑥 ↦𝖲𝖡𝖱𝜔𝑠∗𝑥(𝛿) is then a total continuation. Totality of 𝛿𝑠 gives a total selected value 𝑐, and the assumption at 𝑠 ∗𝑐 gives a total recursive result. Thus 𝑄(𝑠) in the recursive branch; the base branch was handled above. The rule BIdec gives 𝑄([]). Transport along the sourced reverse adapter gives the EPS claim. This proves semantic totality, not strong normalization of the bare equations. ◻
★★☆ For streams of naturals, let 𝜔(𝛼) =𝛼(0) +1. Give an explicit stopping witness 𝑛 for each 𝛼. Then consider the discontinuous specification that returns the first zero index and returns zero when no zero occurs. Identify the unavailable premise in lemma 67.15. (Half a page.)
Referenced from 3 locations
Let 𝑞 :𝑋ℕ →𝑅 and 𝜔 :𝑋ℕ →ℕ be total continuous functionals, and let 𝜀𝑛 :𝐽𝑅𝑋. There are 𝛼 :𝑋ℕ and 𝑝𝑛 :𝑋 →𝑅 such that, for every 𝑛 ≤𝜔(𝛼), 𝛼(𝑛)=𝜀𝑛(𝑝𝑛),𝑝𝑛(𝛼(𝑛))=𝑞(𝛼).
Referenced from 4 locations
Proof of Theorem 67.17 — Spector equations
Proof. Use 𝑅′ =𝑅 ×ℕ, 𝑞′(𝛽):=(𝑞(𝛽),𝜔(𝛽)),𝑙:=𝜋2,𝜀′𝑛(𝑃):=𝜀𝑛(𝜆𝑥.𝜋1(𝑃𝑥)). Apply theorem 67.10 to 𝑞′,𝑙,𝜀′, and write its continuation as 𝑝′𝑛 :𝑋 →𝑅′. Define 𝑝𝑛:=𝜋1 ∘𝑝′𝑛. Since 𝑙(𝑞′(𝛼)) =𝜔(𝛼), the theorem applies at every 𝑛 ≤𝜔(𝛼). Projection of its two equations gives the required equations. The adjustment 𝜀′𝑛 is necessary: the original selector expects an 𝑅-valued continuation, not an 𝑅 ×ℕ-valued one. ◻
This is Corollary 3.9 [EO14].
Let 𝐶(𝑎) be a formula of WE-𝖯𝖠𝜔. From a derivation WE-𝖯𝖠𝜔+𝖰𝖥-𝖠𝖢+𝖠𝖢ℕ⊢𝐶(𝑎) one can extract a closed term 𝑡 of WE-𝖧𝖠𝜔 +𝖲𝖡𝖱 such that WE-𝖧𝖠𝜔+𝖲𝖡𝖱⊢∀𝑦.|𝐶𝖭(𝑎)|𝑡(𝑎)𝑦. In particular, restricted SBR realizes 𝖣𝖭𝖲ℕ, hence the displayed 𝖼𝖠𝖢ℕ. Semantic totality is relative to the total continuous functionals and BIdec.
Referenced from 3 locations
Proof of Theorem 67.18 — Selected choice interpretation
Proof. Negative translation sends the classical derivation into the weakly extensional intuitionistic base. The functional-interpretation induction handles its logical rules, arithmetic equations, induction, and quantifier-free choice. The new DNS case requires a sequence 𝑓, counterexample continuations 𝑝𝑛, and the index 𝑛 =𝜔(𝑓). Theorem 67.17 gives 𝑓(𝑛)=𝜀𝑛(𝑝𝑛),𝑝𝑛(𝑓(𝑛))=𝑞(𝑓), which are exactly the two substitutions in the Dialectica matrix of DNS. The logical reduction at the end of section 67.1 then handles 𝖼𝖠𝖢ℕ. Theorem 67.16 gives totality of the new functional; all other extracted constants belong to System T. ◻
The exact imported metatheorem is Powell’s Theorem 4.4; its accompanying remark records that verification in the weakly extensional base requires the formalization cited there, rather than Spector’s extensional argument alone [Pow13]. Spector’s original Section 10 gives the restricted one-unknown construction. Sections 12.2 and 12.3 of the printed paper were completed by its editor, Georg Kreisel [Spe62].
★★★ For quantifier-free 𝐴(𝑛,𝑥), derive 𝖼𝖠𝖢ℕ from DNS and intuitionistic countable choice. Then mark the selector, outcome functional, control, selected sequence, and continuations in theorem 67.17. Explain why a product with a horizon fixed before 𝜔 is received cannot perform this construction. (One page.)
Referenced from 3 locations
Finite evidence from the pigeonhole extraction
The pinned Agda development proves, under a Friedman 𝐴-translation, that every Boolean stream has a constant infinite subsequence. Its finite specialization erases the proof component to the executable type 𝖳𝗐𝗈×𝖫𝗂𝗌𝗍ℕ. The archive has seven named streams 𝑎1,…,𝑎7 and six named executable examples. The Agda type of the first is the displayed product above. Its defining equation in the archived module is
example1 = pigeon-program a6 2
The request 2 means that the returned list has length three. Its acceptance check requires three strictly increasing indices and verifies that all three entries of 𝑎6 at those indices equal the returned Boolean. The dependent theorem in FinitePigeon.agda proves this specification before PigeonProgram.agda erases the proof component. The archived sources are Agda from 2011; this edition records no fresh typecheck under an unavailable historical toolchain.
The selection-function, BBC, and modified-bar-recursion modules are alternative realizers of the shift principle. They do not prove equality with the restricted SBR interface fixed here. The project page also records that the three realizer modules disable Agda’s termination checker [Esc11].
The book-owned Kappa corpus in artifacts/ch67-bar-choice-replay/ implements the applied binary product, the three-stage calculation, and a fuel-bounded specialization of dependent EPS. The bound makes it a finite executable shadow, not an implementation of infinite bar recursion. Its strict and non-strict stopping variants return different four-entry traces, so the mutation checks the equation that the chapter uses.
Nearby recursors are not interchangeable
The implicitly controlled product has no explicit length test. Continuity of the outcome functional instead bounds the demanded recursive calls. In the primary comparison it realizes a J-shift by modified realizability, while the explicit product realizes DNS by Dialectica.
Modified bar recursion returns a different object and satisfies different equations. Its equivalence with an implicitly controlled product does not change theorem 67.18. Escardó and Oliva’s comparison separates the arrows that require BIrel, SPEC, or continuity; one cannot erase those annotations when moving between recursors [EO14].
Finally, a finite run concerns one extracted term at one input. Semantic totality quantifies over all total inputs in the chosen continuous model. Neither observation proves the other.
Chapter seminar
None of these problems is a prerequisite for a later core chapter.
Suggested first pass.
Start with the prefix proof and the executable stopping mutation; then compare the two recursor interfaces.
★★☆ Reconstruct theorem 67.10 from prefix factorization. Your proof must display the contradiction that rules out the stopping branch and the calculation of 𝑝𝑖(𝛼(𝑖)). (One page.)
Referenced from 3 locations
★★☆ Let a proposed control return zero when its input stream contains a zero and one otherwise. Show that it is discontinuous at the all-one stream. Explain why lemma 67.15 no longer gives a bar for this control. (Half a page.)
Referenced from 3 locations
★★★ Make a ledger of the arrows 𝖤𝖯𝖲 →𝖲𝖡𝖱 and 𝖲𝖡𝖱 →𝖤𝖯𝖲. For each arrow, record its adapter, base theory, and uses of BIrel or SPEC. Give one sentence explaining why theorem 67.13 does not prove the converse. (One page.)
Referenced from 3 locations
★★★ Practical project.bar-choice-replay Run the Kappa corpus and reproduce all four named cases. Add a fourth finite selector with a policy different from stage three, calculate its result before running, and extend the oracle. Apply the strict-to-non-strict mutation and record the unchanged input that detects it. Finally inspect Examples.agda and state the precise property that a normalized pigeon-program a6 2 result must pass. Separate what the Kappa run, the archived Agda types, and theorem 67.16 establish.
Referenced from 4 locations