exercise 64.1.
The supports are {𝑏} and {𝑏,𝑐}, respectively. Moreover ⟨𝑎⟩(𝑎,𝑏)=⟨𝑐⟩(𝑐,𝑏). To verify the equation, choose fresh 𝑑. Both transposition actions, (𝑎 𝑑) ⋅(𝑎,𝑏) and (𝑐 𝑑) ⋅(𝑐,𝑏), give (𝑑,𝑏). The second abstraction cannot equal ⟨𝑐⟩(𝑐,𝑏), because equal nominal elements have equal least support, while {𝑏,𝑐} ≠{𝑏}.
exercise 64.2.
Restriction at 𝑎 discards 𝑧, retains the later fresh declaration of 𝑏, discards 𝑦, removes 𝑎, and returns 𝑥 :𝑋;𝖿𝗋𝖾𝗌𝗁 𝑏 :𝛽. Restriction at 𝑏 discards 𝑧, removes 𝑏, and returns 𝑥 :𝑋;𝖿𝗋𝖾𝗌𝗁 𝑎 :𝛼,𝑦 :𝑃(𝑎). Rule R-Var discards 𝑦 because 𝑃(𝑎) may mention the name being removed; R-Name retains 𝑏 because its freshness declaration is stable under removal of the earlier name.
exercise 64.3.
Assume Γ′;𝖿𝗋𝖾𝗌𝗁 𝑎 :𝛼 ⊢𝑀 :𝐵 and Γ𝗋𝖾𝗌𝗍𝗋𝗂𝖼𝗍𝑏 :𝛼 ⇒Γ′. Name abstraction gives Γ′ ⊢⟨𝑎 :𝛼⟩𝑀 :𝖭𝑎 :𝛼.𝐵, and concretion gives Γ ⊢(⟨𝑎 :𝛼⟩𝑀)@𝑏 :𝐵[𝑏/𝑎]. The name-substitution instance of general substitution gives the same type to 𝑀[𝑏/𝑎], hence beta is typed. If 𝑀 used a variable declared after 𝑏, it would not type in Γ′, so the concretion premise would fail.
exercise 64.4.
Represent the terms as ⟨𝑎⟩⟨𝑏⟩𝑎 and ⟨𝑐⟩⟨𝑑⟩𝑐. Extend by one fresh 𝑒, restrict the extension back to the common prefix, and concrete both outer abstractions at 𝑒. Name beta gives ⟨𝑏⟩𝑒 and ⟨𝑑⟩𝑒. Extensional equality at the inner abstraction type opens both at another fresh 𝑓, producing 𝑒 on each side. Structural name comparison closes the derivation. The first opening is the explicit use of restriction.
exercise 64.5.
Frozen DNTT can introduce an abstraction and open it at a chosen literal, but it cannot inspect whether the opened body is that literal. The proposed function needs a name-equality/name-case eliminator. Adding it changes the canonical neutral heads, so algorithmic-equality completeness and adequacy must be proved again; normalization or canonicalization for the enlarged calculus must also be re-established.
exercise 65.1.
Unfold ∀𝑥.𝑓 𝑥 =𝑔 𝑥; this is the one definition-dependent step. It says that the predicate 𝜆𝑥.𝑓 𝑥 =𝑔 𝑥 equals the constantly true predicate. Rule COMB specializes this equality at fresh 𝑥, and EQ-MP with the closed proof of ⊤ yields 𝑓 𝑥 =𝑔 𝑥. Rule ABS now gives equality of 𝜆𝑥.𝑓 𝑥 and 𝜆𝑥.𝑔 𝑥. Eta rewrites both sides, and two uses of transitivity give 𝑓 =𝑔.
exercise 65.2.
For ABS, equality of the bodies in every environment satisfying Γ gives equality of the denoted functions. Freshness of 𝑥 for Γ ensures that changing the argument does not change whether the assumptions hold. Without it, from assumption 𝑥 =0 one could abstract the derivation of 𝑥 =0 and conclude the false equation (𝜆𝑥.𝑥) =(𝜆𝑥.0) on a type with two elements. For DEDUCT-ANTISYM, under the undischarged assumptions the first premise excludes (𝑝,𝑞) =(0,1) and the second excludes (1,0); hence their Boolean denotations agree. The requirement that assumptions and conclusions have type 𝖻𝗈𝗈𝗅 is essential to that truth-value argument.
exercise 65.3.
Transitivity follows pointwise from transitivity of equality on counts. The equation 𝖼𝗈𝗎𝗇𝗍(𝑎,𝑥𝑠++𝑦𝑠) =𝖼𝗈𝗎𝗇𝗍(𝑎,𝑥𝑠) +𝖼𝗈𝗎𝗇𝗍(𝑎,𝑦𝑠) proves respectfulness. Apply 𝗋𝖾𝗉 to two lifted unions; their representatives have the same count at every 𝑎 by commutativity of addition, so quotient extensionality gives 𝐴 ⊎𝐵 =𝐵 ⊎𝐴. Nonemptiness is used once to introduce the new HOL type and once to choose the default value of 𝖺𝖻𝗌 outside the representing subset.
exercise 65.4.
Use 𝖵𝖾𝖼𝖯𝗋𝖾𝖽(𝐴,𝑛,𝑥𝑠) ≡𝖠𝗅𝗅(𝐴,𝑥𝑠) ∧𝗅𝖾𝗇𝗀𝗍𝗁(𝑥𝑠) =𝑛. A translated function 𝑓 must satisfy ∀𝑛,𝑥𝑠.𝖵𝖾𝖼𝖯𝗋𝖾𝖽(𝐴,𝑛,𝑥𝑠) ⇒𝗅𝖾𝗇𝗀𝗍𝗁(𝑓 𝑛 𝑥𝑠) =𝑛 +1, together with its chosen codomain predicate. HOL assigns 𝑓 an ordinary simple type; dependency appears in the theorem guarding admissible arguments and results, not in its typing judgment.
exercise 65.5.
Beta is a primitive rule. Eta, choice, and infinity are closed axioms. Functional and propositional extensionality are derived theorems; the latter also uses the two-valued Boolean encoding. The choice function and the infinite set interpreting 𝗂𝗇𝖽 are semantic constructions that validate the corresponding axioms, not additional inference rules.
exercise 65.6.
The oracle lies inside the trusted base because it manufactures abstract theorem values without a kernel trace. Confinement is recovered exactly if every returned 𝗈𝗋𝖺𝖼𝗅𝖾(𝑠) is semantically valid at its recorded assumptions and conclusion. Decidability, completeness, and termination of the oracle are unnecessary for soundness.
exercise 66.1.
Take 𝐹=𝖱ℕ→ℕ(𝜆𝑥.𝑥)(𝜆𝑛.𝜆ℎ.𝜆𝑥.ℎ(𝖲𝑥)). Then 𝐹 0 4 →4, 𝐹 1 4 →𝐹 0 5 →4 +1, and repeating gives 𝐹 3 4 →𝐹 2 5 →𝐹 1 6 →𝐹 0 7 →7.
exercise 66.2.
For candidate closure at 𝜎 →𝜏, apply a reduct of the function to arbitrary 𝑢 ∈R𝜎 and use closure at 𝜏. For neutral expansion, reductions of 𝑡 𝑢 reduce 𝑡, reduce 𝑢, or expose a head redex; induct lexicographically on the type and the sum of their finite reduction heights. Candidate fact 1 follows by applying an arrow term to a fresh reducible variable. Finally, reducible 𝑛 is strongly normalizing. Every reduction of 𝖲𝑛 is induced by a reduction of 𝑛, so 𝖲𝑛 is strongly normalizing and therefore belongs to Rℕ.
exercise 66.3.
The first formula becomes ∃𝐹ℕ→ℕ∀𝑛.𝑃(𝑛,𝐹𝑛). The implication becomes ∃𝑈(ℕ→ℕ)→ℕ,𝑌(ℕ→ℕ)→ℕ ∀𝐹.(𝑃(𝑌𝐹,𝐹(𝑌𝐹))→𝑄(𝑈𝐹)). Here 𝑈 turns the premise’s candidate witness function into the existential witness for 𝑄, while 𝑌 chooses the premise input to challenge.
exercise 66.4.
At zero choose zero. If 𝑚 =𝑛2, choose 𝑚 +(𝑛 +𝑛 +1); arithmetic gives 𝑚 +2𝑛 +1 =(𝑛 +1)2. Extraction yields 𝜆𝑛.𝖱ℕ0(𝜆𝑘.𝜆𝑟.𝑟+(𝑘+𝑘+1))𝑛. At 3 it reduces through accumulators 0,1,4,9. The reduction trace calculates the numeral; the target induction, using the recursor equations and ring equalities, proves that the numeral satisfies 𝑚 =𝑛 ⋅𝑛.
exercise 66.5.
The witness player maps a proposed witness 𝑥 for 𝐴 forward to 𝑈𝑥 for 𝐵. Given a challenge 𝑣 to that result, the same strategy maps backwards to 𝑌𝑥𝑣, a challenge to 𝐴. For (∀𝑛∃𝑚.𝑃(𝑛,𝑚)) →∃𝑘.𝑄(𝑘), deleting 𝑌 loses the input 𝑛 =𝑌𝐹 at which the premise function must be tested before concluding 𝑄(𝑈𝐹).
exercise 66.6.
The chapter proves the direct 𝖧𝖠-to-𝑇 theorem. The selected intensional, weakly extensional, and type-zero-equality higher-type variants, including 𝖧𝖠𝜔0, admit corresponding direct variants. Full 𝐸-𝖧𝖠𝜔 first needs a formal interpretation into the type-zero-equality system at the stated low-type boundary. Classical arithmetic first needs negative translation. General countable choice and classical analysis are not covered here; their selected realizers use the separately developed bar-recursive extension.
exercise 67.1.
The final maximizing selector always chooses one. Hence the continuation at stage one is 𝑥1 ↦3𝑥0 +𝑥1 +5, whose minimizing selector chooses zero. The first continuation is 𝑥0 ↦3𝑥0 +5, so the maximizing selector chooses one. Thus the tuple is (1,0,1) and its score is eight. No comparison at stage zero is a tie, so reversing only its tie convention changes nothing.
exercise 67.2.
The printed test asks 2 <2, which is false, and therefore computes 𝑐 =𝜀2(𝑝2) before recursing. The mutant asks 2 ≤2, which is true, and returns the zero stream. Consequently the mutant may have 𝛼(2) =0𝑋 while the printed equation requires 𝛼(2) =𝜀2(𝑝2). A selector that always returns 1𝑋 ≠0𝑋 witnesses the failure.
exercise 67.3.
At |𝑠| =2, 𝑞𝜔𝑠:𝑋ℕ→𝑋ℕ×ℕ,𝑙:𝑋ℕ×ℕ→ℕ, 𝑃:𝑋→𝑋ℕ×ℕ,̃𝛿𝑠(𝑃)=𝛿𝑠(𝜆𝑥.𝜋1(𝑃𝑥)):𝑋,𝑐:𝑋. The streams 𝑠 ∗(𝑥 ∗𝛽) and (𝑠 ∗𝑥) ∗𝛽 agree coordinatewise. For 𝑖 <2, both return 𝑠(𝑖); at 𝑖 =2, both return 𝑥; and above two both return 𝛽(𝑖 −3). Hence 𝑠 ∗(𝑥 ∗𝛽) =(𝑠 ∗𝑥) ∗𝛽. Substitution of that identity into the definition of 𝑞𝜔𝑠 gives (𝑞𝜔𝑠)𝑥 =𝑞𝜔𝑠∗𝑥. Therefore the EPS recursive branch has exactly the child SBR call required by the SBR equation. Since that child has the form (𝑠 ∗𝑥) ∗𝛽, it already preserves 𝑠. Therefore 𝗉𝗎𝗍(𝑠,𝖲𝖡𝖱𝑠∗𝑥) =𝖲𝖡𝖱𝑠∗𝑥, while the EPS branch is 𝑠 ∗(𝑥 ∗𝛽) =(𝑠 ∗𝑥) ∗𝛽. This is the final prefix-preservation step.
exercise 67.4.
Choose 𝑛 =𝛼(0) +2. Since 𝑛 ≥1, the zero extension ̂𝛼𝑛 retains coordinate zero, and 𝜔(̂𝛼𝑛)=𝛼(0)+1<𝑛. For the second specification, continuity at a stream with no zero would require a finite prefix deciding the value zero. Extend any such prefix by a zero at a later coordinate. The value then becomes that later index, a contradiction. Thus the finite observation bound used in lemma 67.15 is unavailable.
exercise 67.5.
Apply DNS to 𝐵(𝑛) ≡∃𝑥.𝐴(𝑛,𝑥): (∀𝑛¬¬∃𝑥.𝐴(𝑛,𝑥))→¬¬∀𝑛∃𝑥.𝐴(𝑛,𝑥). Inside the final double negation, intuitionistic countable choice gives ∃𝑓∀𝑛.𝐴(𝑛,𝑓𝑛), which is 𝖼𝖠𝖢ℕ. In Spector’s equations, 𝜀𝑛 is the premise selector, 𝑞 is the outcome challenger, 𝜔 selects the challenged coordinate, 𝛼 is the proposed choice sequence, and 𝑝𝑛 is its local counterexample continuation. A fixed horizon 𝑚 fails for a control that reads coordinate 𝑚, as in proposition 67.7.
exercise 67.6.
Assume 𝑖 ≤𝑙(𝑞(𝛼)). If the stage-𝑖 call stopped, prefix factorization would give 𝛼 =[𝛼](𝑖) ∗𝟎, and hence 𝑖>𝑙(𝑞[𝛼](𝑖)(𝟎))=𝑙(𝑞(𝛼))≥𝑖, a contradiction. The recursive equation therefore gives 𝛼(𝑖) =𝜀𝑖(𝑝𝑖). Prefix factorization at 𝑖 +1 then rewrites the tail in 𝑝𝑖(𝛼(𝑖)) to the tail of 𝛼, yielding 𝑝𝑖(𝛼(𝑖)) =𝑞(𝛼).
exercise 67.7.
At the all-one stream the proposed control returns one. For every finite prefix of that stream, append a zero beyond the prefix. The altered stream agrees on the entire observed prefix but receives value zero. Thus no finite observation determines the value at the all-one stream. Without continuity, Spector’s condition is not obtained, so 𝐷(𝑠) ≡𝜔(𝗉𝗎𝗍(𝑠,𝟎)) <|𝑠| is not known to be a bar.
exercise 67.8.
The forward ledger is 𝖤𝖯𝖲⟶𝖲𝖡𝖱:𝑅′=𝑋ℕ×ℕ,𝑙=𝜋2, 𝑞𝜔𝑠, ̃𝛿𝑠; it is verified in finite-type arithmetic and uses neither BIrel nor SPEC. The reverse ledger is 𝖲𝖡𝖱→𝖡𝖱→𝖤𝖯𝖰→𝖾𝗉𝗊→𝖾𝗉𝗌→𝖤𝖯𝖲. The 𝖡𝖱 →𝖤𝖯𝖰 and 𝖾𝗉𝗊 →𝖾𝗉𝗌 arrows use BIrel; the former also uses SPEC. The forward adapter therefore cannot establish the reverse arrow: definability in one direction is not symmetric.
exercise 68.1.
Write 𝑊 for the loop followed by the final assertion and write 𝐴1,𝐴2,𝐷 for the two body assertions and decrement. For input 𝑛, the loop-head stores are exactly (𝑖,𝑛), 0 ≤𝑖 ≤𝑛. At every positive 𝑖, the reachable control suffixes are 𝐴1;𝐴2;𝐷;𝑊,𝐴2;𝐷;𝑊,𝐷;𝑊, all at store (𝑖,𝑛), followed by 𝑊 at (𝑖 −1,𝑛); the while-unrolling conditional and the administrative 𝐬𝐤𝐢𝐩;𝑐 residuals add no stores. At 𝑖 =0, the false guard reaches the final assertion and then 𝐬𝐤𝐢𝐩, still at (0,𝑛). Taking 𝑛 =0,1,2 gives the six distinct loop-head stores (0,0),(1,1),(0,1),(2,2),(1,2),(0,2). Each positive-body store satisfies 0 ≤𝑖 ≤𝑛, and each exit store has 𝑖 =0. Hence no reachable configuration is a predecessor of 𝖾𝗋𝗋𝗈𝗋.
exercise 68.2.
Let the bad entry be {0, +} −♭{0, +} ={0, +}. The smallest witness is 0 −1 = −1: both operands lie in the declared concretizations, but the result does not. The best entry is 𝛼𝗌{𝑚−𝑛∣𝑚,𝑛≥0}={−,0,+}, because 0 −1, 0 −0, and 1 −0 witness the three signs.
exercise 68.3.
For decrement by one, the loop-head iteration is ⊥, then 𝑥,𝑦 ↦[0,4], then the same store: the true filter gives 𝑥 ↦[1,4], decrement gives [0,3], and joining with entry restores [0,4]. The false filter gives 𝑥 =[0,0]. Thus 0 ≤𝑥 and the final 𝑥 =0 are proved; independent intervals report the relational assertion 𝑥 ≤𝑦 as possible error.
With decrement by two, the loop-head sequence is ⊥, [0,4], [ −1,4], then stable at [ −1,4] for 𝑥, while 𝑦 =[0,4]. The true filter [1,4] maps to [ −1,2]; the false exit is [ −1,0]. Inputs 1 and 3 reach 𝑥 = −1, so both the body nonnegativity assertion and final equality can fail.
exercise 68.4.
Adjoin ±∞ to the ordered threshold set 𝑇 ={ −1,0,1,10}. When a lower bound decreases, replace it by the greatest threshold not above the proposal; when an upper bound increases, replace it by the least threshold not below the proposal. Otherwise retain the old endpoint. The chosen interval contains both arguments, so coverage holds. Each endpoint moves only upward through the finite threshold list and then to infinity, so every finite product iteration terminates. On the counter chain the upper endpoints are 0,1,10,+∞, whereas ordinary widening jumps from 0 directly to +∞.
exercise 68.5.
Before assignment, intervals give 𝑥,𝑦 ∈[0, +∞] and the DBM gives 𝑥 −𝑦 ≤0. Assignment 𝑧 :=𝑦 copies the entire row and column of 𝑦: 𝐷′𝑧𝑤 =𝐷𝑦𝑤 and 𝐷′𝑤𝑧 =𝐷𝑤𝑦. Hence 𝑧 −𝑦 ≤0, 𝑦 −𝑧 ≤0, and closure with 𝑥 −𝑦 ≤0 yields 𝑥 −𝑧 ≤0, that is, 𝑥 ≤𝑧. Interval reduction alone leaves 𝑧 ∈[0, +∞], but the relational component proves the comparison. The rule 𝐷′𝑧𝑤 =𝐷𝑦𝑤 while leaving the column of 𝑧 unchanged is unsound: from 𝑦 =0,𝑧 =1, executing 𝑧 :=𝑦 makes 𝑦 −𝑧 =0, contradicting the retained old bound 𝑦 −𝑧 ≤ −1.
exercise 68.6.
Before deleting 𝑢, add 𝖡𝗈𝗋𝗋𝗈𝗐(𝑎,𝑝 ::𝑞,𝑏). Concretely, if 𝑎.𝑝 reaches the reference stored at 𝑢, and following 𝑞 from that reference reaches the reference at 𝑏, then 𝑎.(𝑝 ::𝑞) reaches 𝑏. Omitting the edge makes 𝑏 an unrooted live reference after 𝑢 is popped, violating the no-dangling-reference/rooted-path clause of 𝖨𝗇𝗏.
exercise 68.7.
Order types by inclusion of concretizations and take join to be ∨. The constant-guard term has type 𝖨𝗇𝗍 ∨𝖡𝗈𝗈𝗅 under a purely structural branch rule; a filter that evaluates the guard reduces it to 𝖨𝗇𝗍. The union rules are sound by set union. They remain incomplete for safe higher-order programs that require intersections, polymorphism, or relational facts. Principality is not a proposition in this fragment: there are no type variables, substitutions, or instantiation preorder from which to define a most general type.
exercise 68.8.
Let ̂𝖺𝗅𝗅𝗈𝖼 return (𝑥,ℓ), where ℓ is the most recent call site. Map a concrete binding address created at ℓ to that pair; then 𝛼𝑎(𝖺𝗅𝗅𝗈𝖼(𝜍)) =̂𝖺𝗅𝗅𝗈𝖼(𝛼𝜍) by definition, which is the allocation premise of the simulation. Monovariant allocation joins the two arguments to 𝑥 in {0,𝗍𝗋𝗎𝖾}. Call-site allocation stores {0} at the first (𝑥,ℓ1) and {𝗍𝗋𝗎𝖾} at the second (𝑥,ℓ2); the closure for 𝑓 may still be shared.
exercise 68.9.
Use the chapter’s two-condition program. The edge combination 𝑥 ≠0;𝑦 :=1;𝑦 =0 is a syntactic path but has no concrete trace. Joining after the first conditional gives 𝑥 top and 𝑦 =[0,1]; the second true filter leaves 𝑥 top, so the syntactic-path interval result reports a possible failure of 𝑥 =0. Every semantic trace taking the second true edge previously took the first true edge and therefore has 𝑥 =0,𝑦 =0; its assertion succeeds. The first claim follows by abstract edge composition; the second follows by induction over concrete transitions.
exercise 68.10.
The concrete sum set is { −1,0,…,7}, so its interval hull is [ −1,7]. This is exactly the endpoint calculation [1 +( −2),3 +4]. The result [ −∞,7] is also sound but less precise, because [ −1,7] ⊊[ −∞,7]; optimality of the hull excludes any strictly smaller sound interval.
exercise 68.11.
For 𝑐1;𝑐2, a terminal execution first reaches a terminal store of 𝑐1 and then one of 𝑐2. Apply the two induction hypotheses in that order. An error occurs either in 𝑐1, or in 𝑐2 after such a terminal store, exactly matching the disjunction in 𝖾𝗋𝗋♯. For a loop, induction on completed iterations puts every head store in every 𝑋 satisfying Φ𝐴(𝑋) ⊑𝑋; hence it lies in the selected least pre-fixed invariant. A false guard uses the exit refinement, while an error during a true-guard body uses the body error flag.
exercise 68.12.
At entry, (𝐷𝑥𝑦,𝐷𝑦𝑥) =(0,0). One body step proposes ( −1,1), and entrywise join gives (0,1). The next two proposals and joins give (0,2) and (0,3). Widening retains stable 𝐷𝑥𝑦 =0 and drops the weakened reverse entry to +∞. Applying the body again proposes ( −1, +∞); join with entry returns (0, +∞), so the widened matrix is pre-fixed and still entails 𝑥 −𝑦 ≤0.
exercise 68.13.
The local analyzer assumes the concrete semantics, concretizations, local transformer proofs, and checked pre-fixed point. The machine theorem assumes the CEK/CESK rules, abstraction map, finite store order, and tick/allocation contracts. Verasco’s imported theorem additionally fixes its C#minor semantics and five section parameters. The interval-trace bound assumes the paper’s typed probabilistic language plus countability and compatibility or exhaustivity. For example, moving exhaustivity to the local interval analyzer would not justify an upper measure bound: ordinary store coverage is not an almost-everywhere trace cover.
exercise 69.1.
The left branch stores 𝜎(𝑦) =𝛼0 +1. At 𝜌(0) = −2, the instance is 𝑠(𝑥) = −2,𝑠(𝑦) = −1. Both −2 ≤0 and −1 ≤2 hold.
exercise 69.2.
S-If-T adds 𝛼0 ≤0, and S-If-F adds 0 −𝛼0 ≤ −1. The feasible pass models are −2 on the left and 1 on the right. The right failure has model 4. Replays yield (𝑥,𝑦) =( −2, −1),(1,0),(4,3), with only the last assertion failing. The left failure condition 𝛼0 ≤0 ∧𝛼0 ≥2 has no model.
exercise 69.3.
Take 𝑠(𝑥) =0, 𝜎(𝑥) =𝛼0, and 𝜌(0) =0. Concrete assignment sets 𝑦 =1, while the erroneous symbolic store instantiates to 𝑦 =0. The repaired rule stores [𝑥 +1]𝜎 =𝛼0 +1; the copy-plus-constant line of expression correspondence then proves both sides equal to 1.
exercise 69.4.
The stronger state 𝑥 ≤ −1 ∧𝑦 ≤1 is subsumed by 𝑥 ≤0 ∧𝑦 ≤1. For the first consequent, add its complement 𝑥 ≥1; the edges for 𝑥 ≤ −1 and −𝑥 ≤ −1 form a cycle of total weight −2. The second consequent is already an atom. If the stores differ, the two path conditions may describe equal inputs but instantiate different concrete stores, so the representation inclusion used by the proof does not follow.
exercise 69.6.
Use 𝑚 inputs and branch independently on 𝑥𝑖 ≤0, with skip in both branches. Every Boolean branch vector has a model, hence there are 2𝑚 feasible leaves. Depth-first reaches one complete vector before siblings; breadth-first reaches all depth-𝑑 prefixes first; concolic negation follows one vector and schedules selected prefixes. Completeness requires that every pending node, respectively every retained branch-negation obligation, is eventually selected and that each supported solver query eventually returns checkable evidence.
exercise 69.7.
Assignment maps each guarded term through the same copy-plus-constant operation. Evaluation distributes over 𝗂𝗍𝖾, so the branch selected by Φ𝑖 produces exactly the post-store obtained by assigning in 𝜎𝑖. For a near miss, merge 𝑥 =0,𝑦 =0,𝑧 =0 and 𝑥 =1,𝑦 =1,𝑧 =1 with the disjunctive condition but select the first store for 𝑦 and the second for 𝑧. Input 𝑥 =0 then yields 𝑦 =0,𝑧 =1, represented by neither input state.
exercise 69.8.
Extend representation by requiring equal domains and 𝐻(𝑎) =[[̂𝐻(𝑎)]]𝜌 at every allocated address. The read rules require [[𝜎(𝑝)]]𝜌 to lie in both domains. They update 𝑥 with 𝐻(𝑠(𝑝)) and ̂𝐻(𝜎(𝑝)), respectively. Heap representation makes those values equal, while all other variables and heap cells are unchanged.
exercise 70.1.
Without the pc premise, each branch derives 𝑙 :=0 or 𝑙 :=1 from a low constant. Stores 𝑠0(ℎ) =0,𝑠1(ℎ) =7 agreeing on 𝑙 select opposite branches and finish with public values 0 and 1. Thus the derived program violates low equivalence.
exercise 70.2.
From 𝑝 ⊑𝗌𝖾𝖼𝑝′, join monotonicity gives 𝑝 ⊔ℓ ⊑𝗌𝖾𝖼𝑝′ ⊔ℓ. An IF-While derivation at 𝑝′ types its body at 𝑝′ ⊔ℓ; the induction hypothesis therefore types the body at 𝑝 ⊔ℓ, and IF-While rebuilds the conclusion at 𝑝.
exercise 70.3.
Relabel 𝑙 as 𝐻; each branch then satisfies 𝐻 ⊔⊥ ⊑𝗌𝖾𝖼𝐻. Alternatively make both branches assign 0. The latter has equal public results in all terminating runs, but the checker still requires 𝐻 ⊑𝗌𝖾𝖼𝐿, so it is a secure rejected program.
exercise 70.4.
(a) is accepted and secure. (b) is rejected but secure: both runs write zero. (c) is rejected and leaks by the two stores from exercise 70.1. (d) is accepted and secure because a public value may flow into a secret location and the public projection does not change.
exercise 70.6.
Let the guard label be ℓ⧸ ⊑𝗌𝖾𝖼𝑜. Every body derivation is typed at 𝑝 ⊔ℓ⧸ ⊑𝗌𝖾𝖼𝑜, so confinement relates its input and output. Induction on the finite first loop evaluation composes those relations until its exit store is low-equivalent to its initial store; repeat independently for the second run. Symmetry and transitivity compose 𝑠′1 ≈𝑜Γ𝑠1, 𝑠1 ≈𝑜Γ𝑠2, and 𝑠2 ≈𝑜Γ𝑠′2.
exercise 70.7.
Take 𝐰𝐡𝐢𝐥𝐞 ℎ =0 𝐝𝐨 𝐬𝐤𝐢𝐩. Stores agreeing on all low variables but with secrets 0 and 1 yield divergence and termination. An observation with a termination bit distinguishes them. TINI requires two terminating derivations, so termination-sensitive noninterference must relate divergence as well as final stores.
exercise 70.8.
Let 𝑙 :=ℎmod2 be the intended release. A policy may relate two initial stores only when their secrets have equal parity; the required conclusion is ordinary low equivalence of outputs. Original low equivalence relates all secret values, including different parity, so the command violates the old theorem even though it meets the new policy.