Manuscript Offprint
arXiv:2611.00176Coinduction in Grounded Arithmetic
Abstract
A grounded arithmetic counts a sentence as true only when a terminating process establishes it; a sentence no such process settles has no value. Such a logic can state that an event happens, but not that it never happens under unbounded choice. This paper extends such a logic so that it can. The base is Reflective Grounded Arithmetic (RGA) with Inductive Grounded Arithmetic (IGA)'s least-fixed-point reading and ground induction. It adds a separate greatest-fixed-point former with Park's coinduction rule, proves that one former cannot carry both ground induction and coinduction, and adds a dichotomy rule: the classical disjunction between a least-fixed-point atom and the greatest-fixed-point atom of its dual, under a derivable premise that the body's leaves are decided. The systems are sound for an explicit model reading every -body at its greatest fixed point, hence consistent; they agree with the least model wherever it has a value and prove sentences it leaves without one. The dichotomy replaces the underivable hypothesis that an order is well-founded by the derivable one that its steps are decided; the change of model pays for the move. With ground induction the dichotomy derives the omniscience rule of the sibling arithmetic OGA, so the system has no semantics whose certificates for universals are its own proofs. The systems prove, as single sentences, that every decided tree is well-founded or has an infinite branch given by a term, total in the new model; that random assignment terminates while its divergent twin runs forever; that a fair loop terminates and the alternating-bit protocol delivers every message; that open games are determined; that the termination gap in Nakata and Uustalu's trace semantics closes; and that Cinderella wins the bucket game at capacity three. Isabelle/HOL checks every result.
1 Introduction
Five buckets of capacity three stand in a circle. Every round the Stepmother pours one unit of water, divided among the buckets as she likes; then Cinderella empties two adjacent buckets. The Stepmother wins if a bucket ever overflows. Does Cinderella have a strategy that keeps the water in the buckets forever? At capacity three she does, and a single round-robin invariant certifies it; smaller capacities are not attempted here. The game is a standard benchmark for infinite-state safety games [5,9]. Look at what the two players claim. The Stepmother claims that an overflow happens: a terminating event, witnessed by a finite play. Cinderella claims that it never happens, whatever the Stepmother pours, and a unit can be divided in infinitely many ways, so the plays branch without bound at every round. A logic that counts as true only what a terminating process establishes can state the Stepmother's claim. It can also state that one given play never overflows, a universal over the play's rounds. It cannot state Cinderella's claim, a "never" over unboundedly branching plays, except as the negation of a claim that nobody has shown false.
This paper is about such logics, and about the step that lets them say what Cinderella says. A grounded arithmetic is one in which a sentence is true only when a terminating computation, or a well-founded tree of them, makes it so; a sentence that no such process settles is not false but has no value. Picture a logician leafing through a book of computations and coloring some of them true. The grounded tradition colors only terminating ones. What if the logician also colored certain computations that never terminate? Not all of them: the Liar never terminates, and coloring the Liar true is the inconsistency that grounded logic exists to avoid. The question is which non-terminating computations deserve the color. The answer this paper gives is the coinductive one. A computation deserves the color when it is an instance of a recursive definition declared for the greatest fixed point and lies in that fixed point, so that the definition's own unfolding never refutes it. The paper's thesis is that a grounded arithmetic supports that reading exactly, with its rule, its model and its limits stated as theorems.
The setting is Reflective Grounded Arithmetic (RGA) [22], a paraccomplete arithmetic, one in which a sentence may be neither true nor false, where every term is a computation and self-reference is native: a fixed-point former turns any body into a term that unfolds to itself. Its extension IGA, Inductive Grounded Arithmetic [24], adds the elimination rule for every positive self-referential term, called ground induction, and with it the grounded meaning of a positive recursive definition is its least fixed point: accessibility, well-foundedness, the winning positions of a game, and RGA's own truth predicate are single terms with induction principles. The least fixed point is the inductive reading, written below. Cinderella's claim needs the other one.
What the paper adds. Two rules, each with its semantics, a theorem about what they cost, and a body of examples:
-
a greatest-fixed-point former with Park's coinduction rule, a five-line theorem that one former cannot carry both ground induction and coinduction, and an explicit model for which the systems with the rule are sound and consistent, and semantically conservative over the least model (§4);
-
a dichotomy rule, a characterization of exactly when it is valid in , and its soundness there (§5);
-
a theorem that, with ground induction, the dichotomy derives the omniscience rule of IGA's sibling OGA, and that no system with that rule, a recursively enumerable set of theorems and no false claim of nontermination is sound for no semantics whose certificates for universals are its own proofs (§5);
-
examples: streams, runs and branches; random assignment and fair termination through it, up to the alternating-bit protocol; Nakata and Uustalu's gap between termination and non-divergence; open determinacy and the bucket game; the decidedness of Kleene's ordinal notations (§§6–7);
-
a map, produced by build-time checks, of which rules each proof applies (§9).
The coinduction rule. The former is separate in syntax from , with Park's coinduction rule as its introduction. To show that a point lies in , exhibit a certificate: a predicate that holds at the point and that, wherever it holds, makes the body true with the certificate in place of the recursive variable. The rule's closure premise is a hypothetical derivation at an undecided hypothesis, which a grounded system admits as a premise sequent and would not admit as an implication inside a term. Elimination is unfolding. Ground induction cannot be extended to -atoms: at a -term it is inconsistent in five lines, which is why the two formers are separate. The resulting systems, INGA (IGA with ) and OINGA (the union OIGA of IGA with its sibling OGA [23], with ), are sound for an explicit model in which every body of the class is read at its greatest fixed point and everything else as in the least model. The systems are consistent. On every sentence the least model values, they agree with the least model. And they prove sentences the least model leaves without a value, among them the all-zeros atom of the five-line argument, which is the coloring made precise.
The dichotomy. Classically is , the greatest fixed point of the co-body (the De Morgan dual of the body). A grounded system has no rule that turns a failed verification of the -atom into a proof of the -atom, so the two live apart. The dichotomy rule supplies the classical disjunction at one body and one point, under a premise that is a sentence of the system rather than a semantic condition: every non-recursive leaf of the body is decided. With its premise the rule is sound for , and a theorem says exactly when the rule is valid there: when the -atom has a value at every instance. The IGA paper priced the rule of bivalence of accessibility, and the price was a hypothesis on the order, that it is well-founded. The dichotomy's premise is a hypothesis on the order too, that its steps are decided, but one that is derivable whenever the steps are computed by decided terms, as in every example here; the change of model pays for the move (§5). A second cost comes with ATI, the omniscience rule of OGA. RGA and IGA are proof-grounded: each is sound and complete for a semantics in which a universal is true only through a certificate that is one of the system's own proofs (§5 defines the term and its counterpart, omega-grounded). With ground induction the dichotomy derives ATI, and in a system with ATI whose theorems are recursively enumerable and include no false claim of nontermination, no semantics of that kind is sound. The system with both new rules, DINGA (INGA with the dichotomy), is sound for (Theorem 5.4) and, by Theorem 5.5, for no semantics of that kind, and neither is OINGA. So DINGA's verdicts on -atoms are grounded only in an extended sense: they rest on , which reads a -body at its greatest fixed point and a universal through all its instances, and not on a terminating or well-founded process. Figure 1 shows the six systems.

Figure 1: The six systems over RGA, ordered by inclusion of their rules; an edge is labeled with the rule it adds (, ground induction; ATI, OGA's rule; , coinduction; Dich, the dichotomy). DINGA has no ATI rule but derives it (Theorem 5.3), so OINGA with the dichotomy, the dashed edge, has DINGA's theorems (Theorem 5.4). The shaded systems are sound for and unsound for the least model by design; the others are sound for both. Under each name: whether the system has a semantics whose certificates for universals are its own proofs (§5); OGA's label is an instance of Theorem 5.5 with soundness for the least model; for INGA the question is open.
The examples. The examples are the reason for the rules. Streams are terms the system proves total, their prefix sets the derived view, and the round trip between the two is proved. Runs of a transition system are streams, and "some run is infinite" is a -atom. Every decided tree is well-founded at its root or has an infinite branch, with no bound on the branching; the branch is a term, total in , and Kónig's lemma is the bounded corollary. Random assignment terminates by an arithmetic argument and has no natural-number variant, and its divergent twin runs forever. Fairness enters through Apt and Olderog's transformation of a fair program into one with random assignment: a fair loop terminates, a twin of the loop separates strong from weak fairness as accessibility against the path atom, and the alternating-bit protocol over lossy channels delivers every message. For a search, Nakata and Uustalu's gap between termination and non-divergence closes in two independent ways. The winning regions of an open game are determined, and in the Baire instance player II's strategy is a term, total in . Cinderella wins at capacity three by one coinductive step whose certificate carries her round-robin strategy, while the Stepmother's loss is a refutation. The decidedness of , Kleene's set of notations for computable ordinals, and the split of a tree into its scattered part and its perfect kernel, the shape of the Cantor–Bendixson theorem, close the list.
Coinduction and reactive systems. A reader from verification will want to know what coinduction buys for reactive systems. On a given trace, safety and liveness are both arithmetic, and the proof of a liveness claim is a ranking argument. The new rules enter with unbounded choice: when the trace is not given, the controller's forced eventuality is a -atom with a universal inside its body, its negation is the -atom of the dual, and the dichotomy is determinacy of the reachability game. §8 says this with a table, after the examples have supplied the cases.
Where each rule is spent. Isabelle/HOL checks every theorem in the paper, and the theories of the examples end with a build-time check that records which rules a proof applies and which it does not. The map that results is a finding in its own right. In the examples, asserting a termination claim, a -atom, is arithmetic: folding plus number induction; the examples reach ranks below , and the IGA paper's ladder of ordinal notations exists because at higher ranks this fails. Using a region, by unfolding or searching inside it, is arithmetic too. A -region costs one coinductive step when it is established. The proofs of the dichotomies themselves (accessibility or a path, termination or divergence, determinacy, the bucket game, the scattered part or the kernel) and of the decided -regions apply neither the coinduction rule nor ATI as a rule; the decidedness of applies ATI, a rule the calculus derives. §9 gives the map and says exactly what the checks certify.
Reading the metatheory. Five kinds of claim appear. A grounded claim is a derivation in one of the systems. A classical claim is a HOL theorem about a system or about the least model. A claim in is a classical claim about the specific model that reads -bodies at their greatest fixed points; the paper never presents it as truth without that qualifier, because is not the least model. A prediction is a claim the paper expects but does not prove. And a reading interprets a proved statement, a rank or a count read off a proof, and is not formalized. Every theorem header in the main text names its kind; the appendices, which restate the theorems with every hypothesis, name it where a clause's kind is not clear from its wording.
Road map. §2 recalls RGA and IGA. §3 reads a body at both fixed points and finds the four regions a point can lie in. §4 adds : the former, the rule, the model, the systems. §5 adds the dichotomy and prices it. §6 builds streams, runs and branches. §7 works the examples, fairness among them. §8 says where coinduction adds truth. §9 is the map. §10 places the work and §11 lists what is open and where the artifact is. Theorem headers carry at most two Isabelle names and the kind of claim; Appendix H carries every name.
Terms as computations. RGA has one syntactic category: terms. A term is built from numerals, variables, successor, a recursor, a single binder , application under call-by-name, equality, negation, disjunction, and the universal combinator . There are no separate formulas. A term computes by head reduction; a closed term may reach a numeral, which is then its value, or run forever. The logical constants are read on values: 0 and 1 are the truth values, so has value 1 when both sides reach the same numeral, 0 when they reach different ones, and no value when either side diverges. Negation flips the value; a disjunction is true when either disjunct is and false when both are. A universal is true when every instance is and false when some instance is; this reading is infinitary, a well-founded tree of evaluations rather than one evaluation, and it is what “grounded” means for a universal. A term with no value is neither true nor false. Conjunction is defined, as , and so is the existential, as . The constant names a divergent term, a term with no value, never a falsehood.
Three senses of “has a value” recur, and the paper keeps them apart. A closed term computes a numeral when head reduction reaches it. It has a value in the least model below when the infinitary reading of universals gives it one: every computed value is one, but a term that tests a universal can have a value that no reduction reaches. And from §4 on, a term may have a value only in , the model of the coinductive systems. A term is total in a model when it has a numeral value there at every numeral argument, and the paper always says which model is meant; “total” never means “computes”. Likewise a term is decided in a model when it has a truth value there, which is a semantic fact and not an algorithm.
Judgments and rules. A judgment is a sequent with a finite set of hypothesis terms on the left; a context is well-formed when its hypotheses are. Three forms recur: , that is true; , that reaches a numeral; and , that is decided, reaching 0 or 1. The proof system has forty-two rules. Universal introduction is schematic: to prove one proves for a fresh variable under the hypothesis that is a number. Conversion is a rule in both directions: a term and its head reduct are interderivable. Disjunction elimination is available into any judgment. Primitive recursive functions enter through a verified compiler from index trees, explicit syntax trees naming a function by its constructors, and RGA proves every compiled term total. Two defined forms recur: Dec says that is decided at every number, , and Tot that is total, . A binary relation is decided when is decided at every pair of numbers; the paper writes this Dec as well. Throughout, reads “ is one step from ”: is an -predecessor of , and a chain of steps from descends.
Self-reference. The fixed-point former is a term: fix is and head-reduces to . The Liar is fix . It has no value in the least model, and, classically, RGA derives neither the Liar nor its negation.
The least model. The least model reads a universal as true when every instance is and false when some instance is, and reads everything else by evaluation. It is the least fixed point of Kripke's jump [37] for RGA's language, the operator that extends a partial assignment of values by one round of evaluation, and the name comes from that; RGA is sound for it [22]. Every value it assigns persists in the model of §4.
What RGA lacks. The deduction theorem holds exactly at decided hypotheses: from one may conclude when is decided, and only then [25]; that paper develops the reasoning RGA carries out about its own derivations. Conditional proof at an arbitrary hypothesis is inconsistent, by Curry's paradox, since the fixed-point former builds the Curry term [24]. The consequence that shapes this paper: a premise may be a hypothetical derivation at an undecided hypothesis, but no term expresses that conditional. Both the coinduction rule and the dichotomy rule below are built around that asymmetry.
Bodies and the inductive reading. A body is a term with two distinguished free variables, the recursive predicate variable and the point ; any further free variables are parameters. The mechanization uses de Bruijn indices; the paper writes named variables. The -atom of a body is the closed term , and unfolds in three head steps to with for and for the point. (The IGA paper calls it the ground fixed point; the paper writes because the greatest fixed point is about to appear.) A body is positive when occurs only under an even number of negations and every recursive atom has as its argument a numeral expression in the bound variables: the point, a quantifier-bound variable, zero, or a successor of one of these. A parameter may not appear in the argument of a recursive atom; a computed argument is written through an equality guard, or its existential form. The restriction is forced by the semantics: after substitution a parameter is an arbitrary term, possibly without a value, and no reading of the body can consult the recursive predicate at it.
IGA adds one rule, ground induction. From , a closure argument at a fresh point (from and the body with a motive in place of , derive the motive at ), and , conclude the motive at . It is Park's fixed-point induction [46] in grounded form, with parameters allowed under the grammar above. Semantically, the truth set of in the least model is the least fixed point of the operator that reads the body with the recursive atoms interpreted as membership in a set [24]: a positive self-referential term is an inductive definition. IGA is sound for the least model and consistent. Three facts about the -atom recur below. A -atom is introduced by folding: one backward unfolding, by the conversion rule, plus whatever number induction the body needs, which is arithmetic. It is consumed by ground induction. And it is false only through a well-founded refutation; at a point where no finite unfolding verifies it and none refutes it, as at the start of a search that never succeeds, it has no value, not the value 0.
The sibling OGA and the lattice of rules. OGA [23] is RGA with one rule, ATI, the OGA paper's name for -grounded universal decidedness introduction: from a schematic proof that every instance of a universal's matrix is decided, conclude that the universal is decided. Together with the other rules it acts as Bishop's limited principle of omniscience [6]: a decided search either succeeds at some number or fails everywhere, and the system can say which. OIGA is the union of OGA's and IGA's rules. The development states each rule once, as an assumption of an abstract calculus (an Isabelle locale), and builds the systems by combining assumptions; a theorem proved in such a calculus holds in every system that has its rules. The paper calls the family of calculi so obtained the lattice of rules and names, for each theorem, the rules its proof uses. "Arithmetic" below always means "using RGA's rules alone": number induction, conversion, folding and unfolding, and no fixed-point rule.

Figure 2: The four regions of a body in the least model (Theorem 3.1): (1) verified, (2) refuted, (3) in the greatest fixed point of the truth operator but not the least, where the coinductive reading adds truth, and (4) the rest.
Notation. is the numeral for . is the accessibility term of the IGA paper, the -atom of the body . : every chain of steps from is finite. is the certificate or motive with for the point. Isabelle names appear as name in theorem headers and in Appendix H.
3 A Body Read at Both Fixed Points
Before any new syntax, the least model already has a coinductive reading of every body, and comparing it with the inductive one motivates the design. Every claim in this section is classical: a HOL theorem about operators on sets of numbers.
Two operators. Fix a positive body with closed. Read the body at a point with its recursive atoms interpreted through a set : an atom is true when the instance of is a numeral with , and has no value otherwise. The truth operator sends to the set of at which the body is true under this reading, and the IGA paper proves that 's truth set is lfp . Now read the body with an atom false when the instance of is a numeral with , and valueless otherwise; the falsity operator sends to the set of at which the body is false under that reading. Under these two three-valued readings both operators are monotone, for every body, positive or not, because each reading consults the set in one direction only.
Theorem 3.1 (gfix_omv_false_eq_lfp, gfp_lfp_disjoint; classical). The set of at which is false in the least model is lfp . For every body, gfp and lfp are disjoint.
So a point lies in one of four regions. In lfp the -atom is true, by a well-founded verification. In lfp the atom is false, by a well-founded refutation. In gfp the atom has no value in the least model, yet reading it as true at every point of that region is consistent with the body: that is the third region, where the coinductive reading adds truth. Every other point is in the fourth region, where nothing can be added. A point of gfp is never false in the least model, by the two halves of Theorem 3.1. Figure 2 draws the four regions.
Why is not of the dual. Take the search body for a decided test that is false at every number. Its -atom at 0, “the search from 0 terminates”, has no value in the least model: no finite unfolding makes it true, and nothing refutes it, since refuting it would need a finite reason. So is not true. The greatest fixed point of the body , the co-body of the search body, contains 0: “the search from 0 runs forever”. Classically the two are the same statement. In a paracomplete logic the first has no value and the second is a new truth. That is the gap the dichotomy rule of §5 will close, and only for bodies whose leaves are decided.
When the two readings are complementary. Classically, gfp is the complement of lfp . In the paracomplete setting that is a property of the body, and it is exact.
Theorem 3.2 (gfp_eq_compl_iff; classical). gfp is the complement of lfp if and only if, for every , either the body is true at with its atoms read as true on the complement of lfp , or .
A sufficient condition is that the body is definite: at every set and point , the body is true with the atoms read in or false with the atoms read in the complement of . A syntactic grammar guarantees definiteness: positivity with every non-recursive leaf a term that has a value. Definiteness is not necessary: the body with the Liar is complementary without being definite.
Three examples. The truth-teller body has and : nothing is verified, nothing is refuted, and every point lies in the third region. The coinductive reading colors every instance true. Kripke's construction of truth [37] leaves the truth-teller ungrounded in its least fixed point, and other fixed points make it true or false at will; the reading here makes a choice, and §4 says which. A body with the Liar as a conjunct, , has nothing refuted and nothing coinductively true: every point lies in the fourth region. This body shows why “color the never-refuted true” and “read at the greatest fixed point” differ: the first would make , and so the Liar, true at every point, while the second adds nothing. The two coincide exactly under the condition of Theorem 3.2. Finally, the accessibility body: is everything, for every closed relation, and its falsity set is empty. So the coinductive reading of accessibility has no content, and the content lies in the -atom of the co-body, “there is an infinite descent from ”, which §5 calls Path . The same holds of games: the winning-position body of the IGA paper read at its greatest fixed point is the survival game, the positions from which a player is never caught (the player survives there), and for the body that moves up by one, every position survives, none is won, and every position has no value in the least model.
4 The Greatest Fixed Point: Former, Rule, Model
4.1 Separate syntax
The -atom of a body is a term, as the -atom is, but a different one. is the same self-application as with an identity redex inserted under the abstraction, with . and . , so that and are distinct terms for all bodies and , and head-reduces in four steps to the unfolding of the body at with for the recursive variable. So -elimination is unfolding, by the conversion rule, exactly as for . A reader from programming languages will ask why a tag that reduction can see through should change meaning. The model of §4.3 does not reduce a -atom. It recognizes the atom syntactically, as a head of its own, and reads every application whose head evaluates to it from an oracle. The oracle is built so that the atom's value equals the value of its unfolding, which is why the conversion rule stays sound. And no sequence of head steps turns a -atom of the class into a -atom, provided the body is shaped as a formula, its outermost constructor a negation, disjunction, equation, universal or recursive atom; a body that is itself a -atom applied to the point reaches one in four steps.
The separation is forced. Suppose one former carried both principles: ground induction, and the coinduction rule below.
Theorem 4.1 (nu_gfix_clash; classical). Any proof system whose steps include RGA's rules, the coinduction rule for -terms and ground induction at -terms, and whose step relation is closed under extending the proof list, derives 0 = 1.
The derivation is five lines, and it is the first worked use of the rule. Its witness is the all-zeros atom rather than the shorter truth-teller because the same atom is the valueless theorem of Theorem 4.6. Let be the -atom of the body : “the constant-zero function is zero at , and again from on”. Take the certificate . It holds at 0. At a fresh point with as hypothesis, the body with , the certificate abstracted over its point, for reads , which conversion and reflexivity prove. So the coinduction rule gives . Now apply ground induction at with the point-free motive : the closure premise asks, at a fresh with the body for in which the motive replaces the recursive atom, that is, with as hypothesis, for , which the hypothesis’ second conjunct gives by one conversion step. The rule concludes at 0. The theorem is model-free, and it is the strongest argument for the design: the least and the greatest fixed point act on distinct terms, each read at its own extremal point in one model, and no stratification of the rules is needed. Isabelle, Coq and Agda keep inductive and coinductive definitions apart, in Coq and Agda for reasons of normalization and guardedness as well; the theorem makes one reason for the separation exact for this calculus.
4.2 The coinduction rule
Let be a positive body in which the recursive variable occurs, a well-formed certificate (a term in which the point is the one distinguished free variable), and a variable fresh for the hypotheses, the certificate, and the body's parameters. The rule reads:
In words: if the certificate holds at , and wherever the certificate holds at a fresh point the body holds there with the certificate in place of the recursive predicate, then lies in the greatest fixed point. The certificate set contains and is a post-fixed point, , so this is the Knaster–Tarski principle in the form of Park's coinduction rule [46,47], the exact dual of ground induction, where the motive is a pre-fixed point. In a proof assistant it is Isabelle's weak_coinduct [48], the plain Knaster–Tarski form, and not proof by guarded corecursion: the coinductive hypothesis is never available as a hypothesis, so no guardedness condition arises.
Two features of the rule matter. The closure premise is a hypothetical derivation at the hypothesis , which is in general undecided; the system admits it because it is a premise sequent, never an implication inside a term, which Curry forbids ( ). And the side conditions are those of ground induction with one addition: the body must mention the recursive variable. The addition makes the body a formula, a negation, disjunction, equation, universal or recursive atom, which is the shape the model's reading of a -head requires.
Two derived principles follow from the rule and the replacement of one predicate by a pointwise weaker one inside a positive body (Appendix H): monotonicity, that a -atom implies the -atom of a pointwise weaker body, and coinduction up to union, where the certificate need only be closed under the body up to the -atom itself. The second is the form of Isabelle's coinduct and of the coinduction rules its coinductive package generates, which users know as strong coinduction; it is the simplest of the up-to techniques [50]. The accumulation of the hypothesis in parameterized coinduction [31], the companion [49], and coinduction up to equivalence or up to context are not developed. They are undeveloped rather than known to be blocked; the expected obstacle, a prediction, is that a context applied to a -atom must be a term the body reads, so up to context would need codes read by an evaluator.
A second worked use. Let step from 0 to every , from to , and from 1 back to 0 (the divergent twin of §7). Write for the -atom of the body . , “some chain of steps from is infinite”, which §5 obtains as the co-body of accessibility. To show , take the certificate “every number”, . It holds at 0. At a fresh point , the body of Path with for reads “some -predecessor of has ”, and the predecessor is given by cases on : 1 if , 0 if , otherwise; each case is decided arithmetic. One coinduction step concludes.
4.3 The model
Soundness needs a model in which a body of the right class is read at its greatest fixed point and everything else as before.
The class. A body is in the class when it mentions the recursive variable and is positive in a wider sense, in which a recursive atom may take any argument not mentioning the recursive variable. The rule's narrower grammar is what its soundness proof needs, and the wider class is invariant under value congruence, the replacement of a subterm by a well-formed term of the same value, which one of RGA's rules requires (Appendix B). Writing for a body of the class is the only act of declaration there is; the model reads every such head at its greatest fixed point.
The oracle model. An oracle assigns to each body of the class a set of argument terms at which its -atom is true and a set at which it is false. The oracle model evaluates as the least model does except at an application whose head evaluates to a -atom of the class: there it reads at the argument term. It is monotone in the oracle, and deterministic when the oracle's two sets are disjoint. Each body of the class has a truth operator and a falsity operator relative to , defined as in §3 with for the least model and argument terms for numerals. The oracle is coherent when its two sets are disjoint, at every body of the class its truth set is a fixed point of the truth operator and its falsity set a fixed point of the falsity operator, and both sets are empty at every other body; in the model of a coherent oracle a -atom has exactly the value of its unfolding. The oracle map sends to the oracle that reads each body at the greatest fixed point of its truth operator and at the least fixed point of its falsity operator; the map is monotone in the information order (both sets grow), and is its least fixed point, a coherent oracle. Which non-minimal fixed point of Kripke's construction this is, the polarity of the declaration decides, that is, whether a term is written with 's tag or 's: the greatest for truth, the least for falsity, body by body.
Definition 4.2. is the oracle model at .
Every value of the least model persists in the model of every coherent oracle, among them: a coherent oracle only adds verdicts. The soundness proof of RGA's forty-two rules is carried out once against an interface of twenty-four facts about a model, and the least model satisfies the interface. So does the model of every coherent oracle whose sets are closed under substitution and under value congruence, of the argument and of the body itself (Appendix B): the facts, among them value congruence and the preservation of values by head steps in both directions, are proved once for every such oracle. is one. The closed-off oracle, which reads each body at the least fixed point of its truth operator and the greatest of its falsity operator, the exact dual of , is another, and the IGA paper's closed-off model is built on it [24].
Remark 4.3. is a non-minimal fixed point of the kind Kripke's construction allows, and not an intrinsic one, a fixed point whose verdicts no other fixed point contradicts [37]. The truth-teller, the -atom of the body , is true at every numeral in , whose truth set for that body is the greatest fixed point of its truth operator. The model of the closed-off oracle also satisfies the interface, and there the truth set is the least fixed point, empty, and the falsity set the greatest, so the same atom is false at every numeral; the all-zeros atom of Theorem 4.1 behaves the same way. And the value depends on the declaration: the truth-teller, the same self-application without the identity redex, has the same infinite unfolding and no value in , since its unfolding never reaches a value and no oracle reads a -head. So the question of the introduction, which non-terminating computations deserve the color, is answered for declared bodies: a computation is colored when it is written as a -atom of the class and lies in the greatest fixed point of its body. These facts are classical, by an argument from the two oracles' fixed-point equations, and are not separate theorems of the development.
Theorem 4.4 (rga_nu_sound; classical). RGA's rules are sound for .
For INGA's two further rules: ground induction is sound for every model of the interface that satisfies one more fact, the induction property of its -atoms, and satisfies it by an induction on the model's evaluation. The coinduction rule's case is the content of the construction: the set of well-formed, valued argument terms at which the certificate is true is a post-fixed point of the body's truth operator relative to , hence below its greatest fixed point, hence inside .
4.4 The systems
INGA is IGA with the coinduction rule; OINGA is OIGA with the coinduction rule. The names are compositional: an N for is inserted before the GA of the system extended. §5 adds a third system, DINGA, which is INGA with the dichotomy rule. Two notions are the paper's own. A system is semantically conservative over the least model when a sentence that has a value in the least model, and is derivable from hypotheses true in the least model, is true in the least model; no proof-theoretic conservativity over a fragment is claimed. A system is unsound for the least model by design when it derives a sentence with no value in the least model; by conservativity it never derives a false one.
Theorem 4.5 (inga_nu_sound, oinga_nu_sound; classical). INGA and OINGA are sound for , consistent, and semantically conservative over the least model.
Theorem 4.6 (inga_Z, nuZ_true; classical). INGA derives the all-zeros atom of Theorem 4.1, which is true in at every numeral and has no value in the least model at any.
The least model leaves valueless every instance of a body of the class that lies in its greatest fixed point but not its least; the systems derive some of them, and by Theorem 4.5 nothing false about the arithmetic world enters with them, only verdicts about never-refuted infinite behavior. Both theorems hold for OINGA, and OIGA itself is sound for , so every theorem of IGA and OGA is true there.
What totality means after . In the three senses of §2: in RGA and IGA a derivable Tot says that is total in the least model, and the RGA paper shows what that buys. After and the dichotomy, the judgments N and B are claims in . A term that searches through a -atom may be total in and have no value in the least model, because the atom has none there. Sentences valued in the least model keep their meaning, by conservativity. For every term the examples construct, the paper says in which model it is total.
5 The Dichotomy
5.1 The dual, the co-body and the decidedness premise
The dual of a body negates every recursive atom literally and nothing else: is with each replaced by . It exists for every positive body, is unique, commutes with substitution for parameters, and its negation is again a positive body, which the paper calls the co-body of . Classically, is the -atom of the co-body, . For the accessibility body, the co-body is . : “some -predecessor of is in the set*”. Its -atom is the term Path: there is an infinite chain of steps from .
A grounded system has no rule that turns a failed verification of the -atom into a proof of the -atom (§3). The rule that joins them needs a premise. A decidedness premise of a body is a sentence saying that every non-recursive leaf of the body is decided at all numeral values of the point and the bound variables. For the accessibility body it is Dec , with a trivial conjunct for the recursive atom, and for the game body of §7 it is the decidedness of the three parameters. The premise is a term, derivable like any other. The dual is computed from the body by a syntactic recursion, and a premise by a second one, which at a compound part without the recursive variable may stop at that part as one leaf or descend into it, so a body can have several premises and the rule accepts each of them. Because the premise is computed from the body, the rule needs no semantic side condition, and a proof checker can check every application of it.
5.2 The rule and its characterization
For a positive body mentioning its recursive variable, with dual and decidedness premise :
The rule asserts the classical disjunction at one body and one point. Which side holds is not decided by the rule, and the rule never refutes the -atom: the falsity of a -atom needs a well-founded refutation, which the rule does not supply. For accessibility no system in the paper refutes the atom at a closed relation from no hypotheses at all (the end of §5.4). Two theorems about say what the rule is.
Theorem 5.1 (swap_identity; in ). For every positive body of the rule's class whose co-body is in the class, and every : is true in if and only if is false in .
The falsity half of the co-body's -atom is exactly the -term, with no decidedness needed. So in the rule's conclusion is excluded middle for one class of -atoms, with the negative half renamed to the -term: a semantic excluded middle, gated by a derivable premise and not valid in the least model, and not unrestricted excluded middle ( ). Call the rule valid at a body when its conclusion is true in at every well-formed term x, in every well-formed context in which x is a number; the premise D plays no part in validity.
Theorem 5.2 (thmC, dich_step_mjt; in ). The rule is valid at a body if and only if the -atom of every substitution instance of the co-body has a value in at every numeral. The rule, with its premise, is sound for .
Soundness holds because, wherever the derivable premise is true in , it secures the bivalence of the -atom that validity demands by the characterization above. Two controls show that the premise does the work. At the body the rule is invalid at every numeral, and the premise, which asks to be decided at every point, is true under no substitution, so it blocks every instance. And the premise can fail in for a reason the system cannot see. At a body whose non-recursive leaf is itself a -atom, the leaf can have no value at some instance; in the trace example of §7 the leaf is a reachability atom, valueless at a target state that an infinite run never reaches. The premise then has no value there, and by soundness neither it nor its negation is derivable. A decidedness atom is never false in , so a premise of the dichotomy is either true or valueless, never false.
5.3 The system and its price
DINGA (D for dichotomy) is INGA with the rule. Its derivations are IGA steps, coinduction steps and dichotomy steps, nothing else. OGA's rule ATI is not among its rules, and it need not be.
Theorem 5.3 (g_ati_of_dich; grounded). In every calculus with ground induction and the dichotomy, ATI is a derived rule: from , .
The proof is the dichotomy at the search body , whose computed premise is ATI's premise with a conjunct . The -atom at 0 says that a search for an instance at which is false terminates, and ground induction then refutes the universal; the -atom of the co-body, of , says that the search runs forever, and number induction with unfolding then proves every instance. So adding ATI to DINGA adds no theorem: OINGA with the dichotomy, where ATI is primitive, has DINGA's derivability relation (Theorem 5.4), and results first proved for that system, the examples of §7 among them, are results about DINGA. ATI is OGA's omniscience about decided matrices, so, with ground induction, this omniscience is the dichotomy at one body, and the dichotomy is the stronger rule. Over ground induction alone the inclusion is strict: OIGA, which is IGA with ATI, derives less than IGA with the dichotomy. That is a classical fact, by combining two theorems: OIGA is sound for the least model (oiga_omega_sound), and the dichotomy fails there at a closed, decided, ill-founded order whose premise RGA derives (dich_not_omega_valid_decRel), so OIGA does not derive that instance. Whether OINGA derives every instance of the dichotomy is open: validates the rule wherever its premise holds, so it cannot separate the two systems, and a separation would need a different kind of model. Whether the dichotomy derives ATI without ground induction is also open. Read informally, and not as a theorem, the dichotomy is the general coinductive closing-off of a positive definition with decided leaves, the assertion that its least fixed point or the greatest fixed point of its co-body holds, and ATI is its arithmetical special case.
The price of a rule, in the sense of the IGA paper, is what has to hold for the rule to be sound: there, bivalence of accessibility for a fixed order was sound for the least model exactly when the order is well-founded, a hypothesis on the order.
Theorem 5.4 (dinga_dich_price, dinga_eq_oingad; classical). DINGA is sound for and consistent. In it, for every relation and well-formed context, from Dec and : , and is decided. It is semantically conservative over the least model, and it derives a sentence with no value in the least model. Its derivability relation is that of OINGA with the dichotomy.
Read the dichotomy for accessibility in the least model, with the -atom replaced by the -atom of the same co-body, which is what a -term amounts to there, since the least model simply unfolds it: the dichotomy is then true at every point exactly when the order is well-founded, the same price as bivalence of accessibility. Read in , it is true at every decided relation, well-founded or not. At the relation that steps from every number to its successor, bivalence of accessibility is unsound for the least model while the dichotomy is true in everywhere. Bivalence of accessibility asked lfp ; the dichotomy asks lfp with both operators read in , which holds at every decided relation because the body is then definite, the sufficient condition that follows Theorem 3.2. The dichotomy's premise, Dec , is still a hypothesis on the order, and Theorem 5.2 shows that it does work. What changes is its kind: well-foundedness is a property, not derivable in general, while decidedness of the steps is derivable, in RGA, at every relation whose steps are computed by decided terms (every example here), and is otherwise a sentence like any other. The change of model pays for that move. Theorem 5.4 states the cost, a reading of its clauses rather than a further theorem: soundness for , nothing changed on the sentences the least model values, and new verdicts only where it has none. This is the price of the dichotomy.
The dichotomy is semantic excluded middle for one class of -atoms (Theorem 5.1), not unrestricted excluded middle, in three ways. It is not valid for the least model: at every closed ill-founded order whose premise RGA derives, the conclusion, with the -atom itself, is valueless at some point, so the rule is not sound for the semantics RGA and IGA are sound for. It needs a derivable premise, which can fail by being valueless. And it decides the -atom but not the -atom, which for accessibility is never false in , so that no system in the paper decides it at a point where it is not verified, where classical logic decides both.
The price in proofs: no certificate-grounded semantics. A semantics of a system is certificate-grounded when a universal is true in it only through a certificate, a derivation in the system of the universal's open instance (a different use of the word from the post-fixed point of §4), and false only through a false instance, a disjunction is true only through a true disjunct, a negation only when its argument is false, and nothing is both true and false. The conditions are necessary conditions, "only through", and that is what makes the theorem below strong: it excludes every semantics that meets them, whatever else the semantics does. A system is proof-grounded when it is sound and complete for such a semantics: RGA is [22], and so is IGA [24]. It is omega-grounded when it is sound for the least model but for no certificate-grounded semantics, as OGA and OIGA are. None of these terms is one of the kinds of claim of §1; each names a classical property of a system. INGA, OINGA and DINGA are not sound for the least model, so none is omega-grounded; OINGA and DINGA are not proof-grounded (Corollary 5.6), and for INGA the question is open. The halting family has one universal for each , "machine does not halt on input ".
Theorem 5.5 (ati_cert_unsound, dich_cert_unsound; classical). Let a calculus have ATI, derive a universal of the halting family only where it holds, and derive a recursively enumerable set of them. For every certificate-grounded semantics over the calculus's own derivations under which RGA's closed theorems are true, the calculus derives the decidedness of some universal of the family, which the semantics does not make true. By Theorem 5.3 the same holds for every calculus with ground induction and the dichotomy.
The reason is a count of complexity. Suppose the semantics made ATI's conclusion true at every universal of the family, so that each of them had a value. A universal of the family is true only through a certificate, a derivation, so the true ones are among the derivable ones, and the calculus derives one only where it holds, so the derivable ones are true non-halting claims. A universal of the family is false only through a false instance, a halting computation. Every would then either have a derivable universal, a recursively enumerable condition that holds exactly when machine does not halt on , or halt, also recursively enumerable; so the halting set would be decidable, which it is not. With ground induction the dichotomy derives ATI, and so no certificate-grounded semantics can follow the dichotomy at the halting family either. For DINGA the hypotheses are classical theorems. A primitive-recursive proof checker for OINGA with the dichotomy, carried over by the equality of Theorem 5.4, makes DINGA's derivability recursively enumerable (DINGA's own step relation has a primitive-recursive decider), and semantic conservativity makes it derive a universal of the family only where it holds.
Corollary 5.6 (dinga_not_cert_sound, oinga_not_cert_sound; classical). DINGA and OINGA are sound for (Theorems 4.5 and 5.4) and for no certificate-grounded semantics: their warrant is a model that reads a universal through its instances, as the least model does, and no certificate. OIGA is omega-grounded.
For OINGA the hypotheses of Theorem 5.5 are again classical theorems: its derivability is recursively enumerable, and its conservativity makes it derive a universal of the family only where it holds; the corollary for OINGA goes through ATI's theorem directly, not through the dichotomy. The corollary for OIGA (oiga_not_cert_sound) rests on the same theorem, with soundness for the least model in place of conservativity. Whether INGA is proof-grounded is open: its coinduction step carries a certificate, the post-fixed point, but no certificate-grounded semantics for INGA has been constructed or ruled out.
5.4 Exclusion and decided regions
Two further principles close the circle, and they need the rule less than one would guess.
Theorem 5.7 (g_mu_not_nu, g_dec_nu; grounded). In every calculus with ground induction, in a well-formed context with a number: from . In every calculus with ground induction and the dichotomy: from the decidedness premise, is decided.
Exclusion uses ground induction and no other rule beyond RGA, at the motive “not in the -atom”: in the closure, one conversion at each recursive atom turns the body at that motive into the co-body at the -atom, and the -atom is then folded under negation; it needs no decidedness. For accessibility it says , and with the dichotomy, is decided at every decided relation. The -side stays undecided. No system in the paper proves from no hypotheses at a closed relation , and none can: accessibility is never false in , at any closed and any point, decided or not, as it is never false in the least model, and non-derivability follows by soundness (Theorem C.9).
The lattice. IGA adds ground induction () to RGA, OGA adds ATI, OIGA both; INGA and OINGA add ; DINGA adds the dichotomy to INGA (Figure 1). The development’s abstract calculi are all sixteen combinations of these four rules, one locale each, ordered by inclusion; by Theorem 5.3 every calculus with ground induction and the dichotomy has ATI as a derived rule. Each theorem is stated in the least of them that its proof uses, so the absence of a primitive rule from a proof is carried by the calculus, and the theorem holds in every system that has the calculus’ rules. For ATI in a calculus with ground induction and the dichotomy, the calculus carries only the absence of ATI’s rule, since it derives ATI’s conclusions; §9 says what certifies the rest, and, theorem by theorem, which rules the proof uses within its calculus.
| system | rules beyond RGA | sound for |
|---|---|---|
| IGA | least model, | |
| OGA | ATI | least model, |
| OIGA | , ATI | least model, |
| INGA | ||
| OINGA | , ATI, | |
| DINGA | , dichotomy (ATI derived) |
6 Streams, Runs and Branches
6.1 Streams as total terms
An infinite stream is a term with Tot : every is a number. The paper takes this representation as primary and the alternative, a stream as the set of its finite prefixes, as the derived view; the two are interdefinable. Finite sequences are coded as numbers with a decided parent function, the empty sequence coded as 1. The prefix function sends to the code of the first elements of , and the prefix set is the predicate “some has ”. A branch is a decided set of sequence codes that is prefix-closed, has a member of every length, and has at most one member of each length.
Theorem 6.1 (g_pset_Dec, g_pset/Branch; grounded). For a total , its prefix set is decided, by ATI, and is a branch.
Theorem 6.2 (g_RT_s, g_RT_p; grounded). For a total , the stream recovered from the prefix set agrees with at every , and the prefix set of the stream recovered from a branch has exactly the branch’s members.
The round trip uses ATI to decide the prefix set; the stream is then recovered by a search over that decided set, a search which is a derived rule of RGA, and no fixed-point rule is used. ATI is spent only because the prefix set is defined with an unbounded existential, “some ”. The witness is in fact bounded, since has length , and the elementwise view, that is a prefix of exactly when every position below its length has , is arithmetic without ATI; with the prefix set defined by that bounded form, the round trip would need no ATI (a prediction; the development keeps the unbounded definition).
Streams carry no coinductive content here, and a reader from programming languages should read them that way. A stream is a total function on the numbers, not an element of a coinductive type. Productivity is totality, the judgment Tot derived in the system, proved by number induction; no model enters. A guarded corecursive definition such as is an ordinary recursive function on indices, written with the fixed-point former. Bisimilarity of two streams is pointwise equality, a sentence; RGA has no extensionality for terms, and none is wanted. Every in the paper is a predicate on numerically coded states, such as “some chain of steps from this state is infinite”, and never a type of infinite objects.
The prefix tree. A prefix set is a tree, and a tree has the child relation: is a child of when is a member and the parent of is . The -atom Path of that relation at a node says there is an infinite branch through the node.
Theorem 6.3 (g_pset_path, g_path_pset_hol_iff; grounded). For a total , every member of its prefix set has an infinite branch through it, by one coinduction step with the prefix set as certificate. Conversely, at any code that has a length, the branch predicate and membership in the prefix set are interderivable, with and no ATI; with ATI added to the equivalence is one sentence and the branch predicate is decided, without the dichotomy.
So at a single stream’s prefix tree, the coinductive predicate “there is an infinite branch” is arithmetic. The dichotomy earns its keep only on trees with many branches, which is where the next subsection goes.
6.2 Runs
A run of a relation is a total term with at every : an infinite chain of steps. “Every chain of steps from is finite” is , and “some chain of steps from is infinite” is . Three theorems connect runs with the two atoms, and their proofs spend three different rules.
Theorem 6.4 (g_run_acc, g_run_path; grounded). If is a run of and is accessible, then never visits (ground induction). If is a run of , every state of lies on an infinite chain (one coinduction step, with the image of as certificate).
Theorem 6.5 (g_run_of_path; grounded). For decided , from there is a run from , a term total in , every state of which lies on an infinite chain. The proof uses the dichotomy and ground induction, and applies neither nor ATI.
The run is a generic construction, a replay: given a decided relation , a decided predicate with a progress property (every -state has a -successor in ) and a -state , the term , defined by primitive recursion with a least-witness search at each step, is total, starts at , is a -run and stays in . That is arithmetic. What the dichotomy supplies is the decidedness of , which the search needs, and the progress property is one unfolding. So non-termination is stated positively, as an object: the run. The run is total in ; its search reads a -atom, and the paper does not claim that it reaches numerals by reduction.
6.3 Well-founded, or an infinite branch
König’s lemma says that a finitely branching infinite tree has an infinite path, and the OGA development proves it for decided, prefix-closed trees with a bound on the branching, by a path term that at each node picks the first child with an infinite subtree; the pigeonhole argument that some child has one is where the bound is spent. Without a bound the lemma is false as stated. What holds without a bound is a dichotomy.
Theorem 6.6 (g_tree_acc_or_branch, g_tree_branch; grounded). Let be a decided, prefix-closed set of sequence codes. Then either the root is accessible for the child relation of , that is, is well-founded, or there is a branch given by a term, total in , whose values are nodes of , each the parent of the next, the -th of length . The proof uses the dichotomy and ground induction, and applies neither nor ATI. The branch itself needs neither prefix closure nor sequence codes: for any decided whose root is a member with Path at the root, the replay is total, starts at the root and stays in on nodes with Path.
The branch is the replay at the child relation and , which the dichotomy decides. König’s lemma for bounded branching is the same replay at the parent relation of the full tree, with progress from the pigeonhole, and the OGA theorem is literally a corollary of the replay. The two differ in where the path is total. The bounded path term is total in the least model. The unbounded one is total in , by soundness; its search reads a -atom, and whether it has a value in the least model is not established. Neither is computable in general, and the classical landmark says why: the Kleene tree is a decided, binary, infinite tree no computable function is a path through, and the OGA development has it as a theorem pair, the tree decided and infinite, and no path recursive. The bounded path term through it is total in the least model, as an infinitary object, and is not a computable function; the theorem above would give the same path from the dichotomy, and the formal instance, which needs a recoding of that tree into sequence codes, is left for later work.
7 Examples
Each example gives the program or game, its bodies, the theorems, and the rules the proofs use. The examples sit where §8 will say the new rules matter: unbounded nondeterminism, an adversary, or a tree with many branches.
7.1 Random assignment
The program ; while do is the standard example of countable nondeterminism [3]: it always terminates, but no bound on its running time exists, and its termination has rank . Code the state before the assignment as 0 and the state with as . The step relation then sends 0 to for every (-branching) and to , with no successor at 1. The divergent twin adds a step from 1 to 0.
Theorem 7.1 (g_acc_R1_all, g_R1_no_variant; grounded). Every state is accessible for R: every execution terminates. The proof uses no fixed-point rule. No total term is a strictly decreasing natural-number ranking along R: the variant hypothesis entails 0 = 1 arithmetically, and the proof spends ATI to decide the hypothesis, which turns that entailment into its negation.
The first claim is the finding of §9 at its simplest. Accessibility at 0 is introduced by one backward unfolding whose successors are all loop states, and each loop state is accessible by number induction; folding and conversion are not fixed-point rules, and no ground induction is needed to assert termination, only to use it. The second claim says that no natural-number measure certifies termination: a variant would have to assign to 0 a number above every . That the rank is exactly is a reading of the two claims, not a formalized ordinal statement.
Theorem 7.2 (g_R1p_div, g_R1p_run; grounded). Path_{R'} · 0 holds, by one coinduction step with the certificate "every number" (§4). A run from 0 along R', a term total in M*, exists, every state of which lies on an infinite chain; the proof uses ν for the path and the dichotomy with ground induction for the replay. For both relations, every state is accessible or lies on an infinite chain, by the dichotomy, and the chain predicate is decided, by the dichotomy with ground induction.
The replay is the generic construction of Theorem 6.5, and at it is not the only witness: the run 0, 1, 0, 1, … is primitive recursive and total by RGA’s rules alone, and with Theorem 6.4 it gives as well (an observation; the development states no theorem for this particular run). A nested loop with a random reset at each level terminates at rank , again without a fixed-point rule. And neither OINGA nor DINGA proves : from the divergence, the exclusion theorem and the system’s consistency, which is itself proved through .
7.2 Fairness through random assignment
Fair termination is accessibility over an -branching relation of the same kind. A variant of Apt and Olderog's transformation of a fair program into one with random assignment [2], with natural-number counters and a strict guard, turns the two-component loop that either increments a counter or falsifies its own guard into a step relation whose infinite chains project onto strongly fair infinite runs of the loop, and every strongly fair infinite run of the loop lifts to such a chain. A component may run only while every other enabled component's counter is positive; running it resets its own counter to any number, decrements every other enabled component's counter by one and keeps the counter of every disabled component.
Theorem 7.3 (g_acc_ao_all, aomod_fair_term; grounded and classical). Grounded: every state of the transformed loop is accessible, by one introduction and one number induction on the postponed component's counter, with no fixed-point rule; from accessibility, no state lies on an infinite chain (ground induction); every state is accessible or lies on an infinite chain (the dichotomy); and the chain predicate is decided (the dichotomy with ground induction). Classically, through RGA's soundness for the least model and the correspondence of infinite runs, the loop has no infinite strongly fair run from its initial state.
The postponed component's counter is the measure, and the reset belongs to the component that just ran, so the reset at every iteration does not nest: the rank at the initial state is (a reading). The correspondence is a classical theorem about runs, a projection of chains onto runs and a lifting of runs to chains, and it holds for infinite runs only, since the strict guard can block where the loop does not.
A twin of the loop, the fairness twin, separates strong from weak fairness, and the separation is exactly accessibility against the path atom. Let the first component also toggle a bit , and let the second component, which exits the loop by falsifying the guard, be enabled only when holds. The second component is then enabled at every other step, so a strongly fair run schedules it, while no run keeps it continuously enabled, so weak fairness asks nothing of it. The two transformations differ in one conjunct: the counter of a disabled component is kept, for strong fairness, or reassigned at random, for weak.
Theorem 7.4 (g_acc_aoTs_all, g_aoTw_div; grounded and classical). Grounded: under the strong transformation every state of the fairness twin is accessible, with no fixed-point rule; under the weak transformation the path atom holds at the initial state, by one coinduction step at a three-part certificate. Classically: neither OINGA nor DINGA proves the initial state accessible under the weak transformation, from the exclusion theorem and the system's consistency; through RGA's soundness for the least model, the fairness twin has no strongly fair infinite run from its initial state; and the run that always schedules the first component is weakly fair, a fact about the HOL program alone.
Read with as “channel full”, the first component as “send when empty, lose when full” and the second component as “deliver”, the fairness twin is already the one-message lossy channel: strong fairness is what defeats a channel that may drop messages, and weak fairness is not enough.
The development also builds the transformation as a term former, for any list of guarded components with a flag saying whether the scheduler owes each one fairness, with a monotone rather than exact counter update; whenever every guard and step is decided, the transformed relation is decided, so the dichotomy holds at every such program (Appendix G). Generic accessibility is not on offer, by Harel's theorem [30]: fair termination is -complete.
Eventualities and leads-to. For a step relation , read forward, and a target , the eventually atom is the -atom of the body : every run from reaches . At a state with no successor the universal holds vacuously, so the atom is true there; read as “every run reaches ”, it presumes a relation in which every state has a successor, and on one with deadlocks it says that every run reaches or stops. “ leads to ” is the sentence . The classical leads-to rules are derived rules.
Theorem 7.5 (g_lattice, g_well; grounded). In every calculus with ground induction, for closed, well-formed and , Lamport's Lattice rule [38], which descends from the proof lattices of Owicki and Lamport [45]: if the sentence “for every , either is not accessible along or leads to or to some with ” is derivable, then at every accessible , leads to . The Manna–Pnueli WELL rule [42] is the instance at the family “ holds and the rank is ” (Theorem E.7).
Both rules are one ground induction along accessibility, with the motive carrying accessibility and the leads-to claim together, after one ground induction for the transitivity of “eventually”; the check forbids , the dichotomy and ATI under them. The first disjunct of the hypothesis is never derivable from no hypotheses at a closed order, since is not (Theorem C.9); it is there so that the hypothesis can be one sentence over all while being needed only at accessible ones. For the same reason the conclusion is a rule and not a sentence. A countdown that decrements to zero is the worked instance, its hypothesis and the accessibility of every counter value derived without any fixed-point rule (Appendix E).
The main instance of the term former is the alternating-bit protocol over two lossy one-slot channels, six components: send, lose, deliver on the forward channel and acknowledge, lose, deliver on the return channel. The two loss components owe no fairness, so the adversary drops messages as often as it likes.
Theorem 7.6 (aoAb_every, aomod_ab_deliver; grounded and classical). Grounded: every message is eventually delivered and acknowledged. For every , the eventually atom whose target is “message index at least ” holds at every code of the transformed protocol whose program part satisfies the protocol’s invariant, with any counters; as one sentence, with a parameter of the atom’s target, the atom holds at the codes with the invariant and index 0. Both forms are derived with no fixed-point rule. Classically, through RGA’s soundness for the least model, every infinite run of the protocol from its initial state that is strongly fair to send, acknowledge and the two deliveries reaches every index.
Read through the atom, the grounded claim says that every maximal execution of the transformed protocol from such a code reaches an index at least or ends at a code with no successor; the classical claim, about infinite runs, has no such proviso. The proof uses seven number inductions (a count read off the proof script; the check records only that no fixed-point rule is present). The Lattice rule is not on the path: it consumes a leads-to premise, and a concrete protocol proves its round lemma rather than assuming it. The rank is per phase (a reading), since while one channel is empty the other channel’s components run, so each phase needs an outer induction on the delivery counter and an inner one on the refill counter, and a stale delivery resets the counter at random. Read informally, strong fairness, not weak, is what the lossy channel requires: a loss empties the channel and keeps each delivery only intermittently enabled. No theorem of the development shows the protocol failing under weak fairness; the fairness twin is the formal separation.
The fair-termination theorem also has a native form, in which fairness is a sentence of the calculus rather than a side condition read in the metatheory. A run is a stream parameter whose values carry a program state and the component scheduled at each step. The run sentence says that at every step some component is scheduled, enabled at the current state, and steps to the next; the fairness sentence says, for every component the scheduler owes fairness, that it is enabled only finitely often or scheduled infinitely often, one disjunction per component.
Theorem 7.7 (g_ao_fair_rule, g_ao_run_ev; grounded). For every program whose guards and steps are decided: if the transformed relation is accessible at every code over the initial state, then from the run sentence and the fairness sentence for a stream parameter the calculus derives that the stream does not start at the initial state. For every program, take an eventually atom along the transformed relation, read forward; every run of the transformed relation that starts at a code where that atom holds meets the atom’s target. In the first claim ground induction is spent only in the no-run theorem; the second claim is one ground induction on the eventually atom; neither claim uses ATI, the dichotomy rule or .
The derivation builds the counters of the transformation inside the branches of each fairness disjunction, by a search or as a constant, so it never decides whether a component is enabled infinitely often or scheduled again (Appendix G). The conclusion is a rule about a stream parameter, not a negated sentence.
7.3 Termination and non-divergence
Nakata and Uustalu’s coinductive trace semantics of a while language [44] separates termination from non-divergence, and in their constructive setting the gap is Markov’s principle. The grounded form of the gap is different. Let be a decided test and consider the search from : the body . Its -atom Term says the search terminates; the -atom of the co-body, Div, with body , says it diverges.
Theorem 7.8 (tr_Q1_iff, tr_Q2_iff; grounded). In a well-formed context with a number: Term and are interderivable in , for decided (ground induction for one direction, nothing for the other); Div and are interderivable in ( for one direction); and Term (ground induction).
Markov’s principle proper, from to , is free: the existential is and double-negation elimination is a rule, since a grounded negation flips a value rather than asserting refutability. What separates termination from non-divergence is excluded middle for the sentence , and for the search body the gap closes in two independent ways, with a third route that uses both.
Theorem 7.9 (tr_term_of_ndiv, tr_dich; grounded). From , : the proof uses ATI, which here acts as the limited principle of omniscience, and ; it uses neither ground induction nor the dichotomy. Independently, by the dichotomy, with ATI, and ground induction all absent from the proof. A third proof of the disjunction uses ATI and and no dichotomy.
Whether INGA, with neither ATI nor the dichotomy, proves the first claim is open. The disjunction is the grounded counterpart of Leroy and Grall's coinductive big-step semantics [39], which proves, by classical excluded middle in Coq, that a program either evaluates or diverges. For a deterministic language with a decided step function, take to say that the state after steps is final: is then their “evaluates or diverges”, obtained from the dichotomy under the derivable premise that the steps are decided, and for a nondeterministic decided step relation the same role falls to Acc Path (a reading; the development states no instance for a while language).
Nakata and Uustalu's later section concerns the predicate “the trace reaches and then goes up”, and its grounded form is a -body whose non-recursive leaf is a -atom, reachability. Take the counting program, whose state is a pair :
so the first component never decreases. Write for the -atom of , “the run from the point reaches ”. The up body reads, at a point :
The counting program’s trace satisfies the -atom of the up body at 0 by one coinduction step. This is also the body at which the dichotomy’s premise fails in . Its leaf at the target and the state has no value: it is not true, because every state from which the target is reachable has first component zero, and the run from never returns there; and it is not false, because every state has a successor and a falsity would need a well-founded refutation. So the premise, which asks every leaf to be decided, has no value at that instance, and neither it nor its negation is derivable in DINGA from no hypotheses (Theorem E.5). That is the control named in §5.
7.4 Open determinacy
A game between players I and II on positions is given by three parameters: a decided set U of positions already won by I, a decided relation Move for I's moves, and a decided relation Reply for II's replies. Player I's winning body is
with the existential as a negated universal; is its -atom, I's winning region, and the -atom of its co-body, II's. The game is open for I: a win is witnessed by a finite play.
Theorem 7.10 (gm_det, gm_decll; grounded). For decided , Move, Reply and a position : (the dichotomy alone); (ground induction alone, with no decidedness); and is decided (both).
The decidedness premise is derived from the three parameters by RGA's rules, with no ATI. Classically this is Gale–Stewart determinacy for open games [27], and over a weak base theory open determinacy for games on Baire space, where a move appends a number to a finite sequence, is equivalent to arithmetical transfinite recursion [55], the subsystem of second-order arithmetic that iterates arithmetical comprehension along any well-order. That theorem is about the existence of strategies; Theorem 7.10 is about regions, and the paper claims no calibration. The Baire instance is one substitution. Two concrete games fix the two sides: I wins in one round by two folds, and, when I's target is the set of positions at which II's reply repeats I's last move, II wins forever by answering every move m with , with the complement of U as certificate. The grounded setting also yields a strategy, a term total in .
Theorem 7.11 (gm_sigll; grounded). In the Baire instance with U decided, there is a term , total at every position, such that from any position in and any move of I, the reply chooses keeps the play in . The proof uses the dichotomy, ground induction and least-witness search, and no coinduction step.
The strategy searches, at each position, for the least reply that keeps II in her region; the search is decided because is, and the region is a hypothesis, only unfolded. The term is total in , where has a value; the paper does not claim that it computes. That is as it must be, since winning strategies in computable open games can be non-computable: the open player, when he wins, has a hyperarithmetic strategy (computable from an iteration of the halting problem along a computable well-order), of arbitrarily high level [8]; the closed player's may be non-hyperarithmetic (Kleene's tree). Player II is the closed player here. Player I's strategy, whose extraction would need ordinal ranks rather than one search, is not built.
7.5 The bucket game
The game of the introduction, with buckets of capacity , a natural number, is an instance of the same body. The Stepmother is player I, the open player; she wins when a pour overflows a bucket, since Cinderella may reply only where no bucket exceeds the capacity, so the target U is empty and an overflow leaves Cinderella without a legal reply. Cinderella is player II. Amounts are rational, coded over a common denominator that the Stepmother may refine by any factor at each pour, so her move relation is -branching; restricting her to rational pours is the one simplification of the game of the introduction. The refinement factor is stored in the successor state, which removes every bounded existential from the move relations and makes their decidedness a matter of RGA's rules alone.
Theorem 7.12 (cs_cind_init, cs_stepmother_refuted; grounded). For , Cinderella's region contains the initial state: she has a strategy that keeps the water in the buckets forever. The proof uses one coinduction step and otherwise RGA's rules; ground induction, ATI and the dichotomy are absent from it. For every , every state is won by one of the players, by the dichotomy, and Cinderella's region is decided, by the dichotomy and ground induction. For , the hypothesis that the Stepmother wins from the initial state refutes itself: from , 0 = 1.
The certificate is the round-robin invariant: with a pointer r to the pair Cinderella empties next, each bucket holds at most the entry of a fixed table of bounds indexed by r and the bucket, in units of the current denominator. The proof factors through one strategy term, uniform in the state: the coinduction's closure premise asks, at a certificate state and any pour, for a reply that re-establishes the certificate, and the paper's proof supplies the round-robin reply as a single term that evaluates to the right pair in each of the five cases, so that the strategy's step theorem and Cinderella's region come out of one argument. The strategy term is total by RGA's rules alone, hence in the least model.
The last clause of Theorem 7.12 is the grounded way to say that a player loses, and it is the only one available: the negation is not derivable from no hypotheses in DINGA, nor in any system sound for , at any capacity (Theorem F.8). A -atom is false only through a well-founded refutation, and the Stepmother always has a legal move, the pour of the whole unit into one bucket, so no refutation of her atom ever bottoms out.
The certificate is for capacity three and above, and that bound is attained against the strategy it certifies. Let the Stepmother pour the whole unit into bucket 0 every round while Cinderella follows the round-robin strategy. Every pour of that play is legal, the first five replies are legal at capacity two, and after the sixth pour bucket 0 holds three units, the denominator being one. So at capacity two or less no reply is legal there: the hypothesis that any well-formed term is a legal reply of Cinderella's at that position entails 0 = 1, and the Stepmother has won that play (Theorem F.5, in RGA). The threshold capacity of the game is studied in the literature [9,32]; the paper makes no claim about it.
7.6 Decidedness of O and the Cantor–Bendixson shape
Two results at a body whose -atom is -complete, stated briefly. Let be the -atom of the IGA development's body for Kleene's constructive ordinal notations, the codes of well-founded computable ordinals, and co the -atom of its co-body. At the greatest fixed point the body adds non-notations: a limit code lies there exactly when its sequence never produces a refutable code, and the constant-zero sequence gives a code in the greatest fixed point that is not a notation.
Theorem 7.13 (g_dec_O, g_O_not_coO; grounded). For every number , and is decided. From , .
The leaves of the decidedness premise are equations between pairing codes, decided without ATI, and graph atoms of the partial recursive functions, each an existential over a step bound of an interpreter of index trees, which ATI decides; the step inside each graph atom is total because a decoder of index trees is total, which RGA proves alone. The theorem does not make the system prove at any new ; it decides the complement, in . “Decided” here is the judgment in , not an algorithm. Still, ’s truth set is not hyperarithmetic (classical, by an argument: the least model’s values persist, so is true in exactly when , and Theorem 7.13 with soundness makes decide , which is -complete). A sharper statement is expected: with the least-witness search of the replay, Theorem 7.13 should give a term such that DINGA derives Tot and in is the characteristic function of (a prediction). Beyond that lower bound the paper says nothing about the strength of in reverse-mathematical terms.
The same pattern over three abstract decided parameters, a set of nodes, an extension relation and an incompatibility relation, gives the shape of the Cantor–Bendixson theorem, which splits a tree into a scattered part and a perfect kernel. A node is scattered when it is outside the set or every incompatible pair of its extensions has a scattered member (the -atom), and in the kernel when it is in the set and splits into two kernel points, forever (the -atom of the co-body). Every node is scattered or in the kernel (the dichotomy), the kernel is decided (with ground induction), a kernel point splits by one unfolding, and induction along the scattered rank is ground induction. Countability of the scattered part and a concrete tree coding are out of scope.
8 Where Coinduction Adds Truth
A reader from verification expects a slogan: safety is , liveness is . With the examples in hand the division can be drawn more finely. The classifications in this section are classical, and the table marks which of its rows the development proves as theorem instances. The step relations of this section are read forward, for a step from to , the orientation of the eventually atom of §7, while accessibility and the path atom are written child first, , as in §2.
On a given trace, everything is arithmetic. Let be a total term, a stream of events. A safety property of is a universal over its finite prefixes, when the prefix predicate is decided. A liveness property in the response form, “whenever an obligation arises at position it is met at some ”, is over ; “infinitely often” is and “eventually always” is . No fixed point appears, and the claims are decided leaf by leaf. A proof of such a claim is a ranking argument, a bound or a well-founded measure on how long the obligation stays open, and in a grounded arithmetic that is number induction when the rank is finite or and ground induction along an order beyond that. For a deterministic system with its trace given, safety and liveness both live in RGA, OGA or IGA, and the layer adds no truth. This is the setting of trace-based verification in Bürki’s thesis [13], where liveness is such a statement proved per program and no coinduction is needed because the trace is given; it is also the setting of ranking-function synthesis in the classical literature [38,42], whose leads-to rules are derived rules here (Theorem 7.5). The eventually atom used for them is true vacuously at a state without a successor, so “leads to” means what it classically means under the assumption that no state deadlocks.
enters with unbounded choice. When the trace is not given, because the environment chooses or the schedule is open, a quantifier over infinite behaviors is second-order. Consider forced eventuality: “from state the controller can force the good event, whatever the environment does”. As a recursive definition it is the attractor, a -atom whose body has an existential over the controller’s move and, inside it, a universal over the environment’s reply. Its negation, “the environment can delay the event forever”, is the -atom of the co-body. This is accessibility against the infinite chain in game clothing, and the dichotomy of §5 is determinacy of the reachability game read as a fixed-point identity, exactly as in §7. So the controller’s forced eventuality is inductive even under nondeterminism. Coinduction is for its negation, and for safety under unbounded choice: “the controller can keep the system safe forever” is a -atom of a body with the same shape, and its certificate is an invariant region containing , consisting of safe states, each of which has a move keeping every environment reply in . Under finitely and computably bounded control the region is already arithmetic: wins exactly when, for every , the environment cannot force a violation within rounds, and each round is a bounded search; under unbounded control the attractor does not close at , and the region is in general [30]. The coinduction rule gives the classical certificate, and under a decided step relation the dichotomy makes the two regions jointly exhaustive, at every position, with decided and the reachability side Win left undecided, since it is refuted only through a well-founded refutation: this is the grounded form of Gale–Stewart determinacy for closed games [27]. What is new is not the invariant method, which classical verification applies under any branching, but that a grounded system, which could state neither the region nor the negation of a liveness claim, now states and decides both.
The table. On a decided transition relation in which every state has a successor, and a decided state predicate , the properties of computation-tree logic sort as follows. The last column gives each row's status, explained after the table.
| property | classical form | fixed point | status |
|---|---|---|---|
| EF : some finite run reaches | arithmetic; the readings add nothing | classical | |
| AG : every reachable state satisfies | arithmetic; the readings add nothing | classical | |
| AF : every run eventually hits | under -branching | : accessibility of restricted to | classical (identification) |
| EG : some infinite run stays in | under -branching | : the path atom of restricted to | classical (identification) (decided: thm.) |
| AF | the dichotomy | thm. | |
| the controller can force | under -branching | of an body | classical (identification) |
| the controller can keep | under -branching | of an body | classical (identification) (decided: thm.) |
A “thm.” marks a theorem instance at the relation or game named: the dichotomy row is the dichotomy rule at the accessibility body of restricted to , sound by Theorem 5.2, and the decidedness of the EG and keeping rows is the second clause of Theorem 5.7 at that body and at the game body (for games, Theorem 7.10). “Classical (identification)” marks a row whose match of the property with the atom in the third column is a classical identification, not a theorem of the development; the two arithmetic rows are a classification only. Under computably bounded branching Kónig’s lemma collapses AF and EG to arithmetic. Unbounded nondeterminism is exactly where and the dichotomy earn their keep, and the examples of §7 are programs and games at that boundary.
The alternation boundary. The bodies of this paper are closed in their recursive variable: a nesting is of closed bodies, so AG AF is . (AF ) with AF a separate closed -body. That covers the properties of computation-tree logic expressible with closed bodies and the coinduction they need, safety and reachability games, open and closed determinacy, and the trace predicate of §7. It does not cover the dichotomy at every nesting: a nested -leaf, such as AF inside AG AF , can be valueless, and then the outer body’s decidedness premise fails, as at the trace example’s up body (Theorem E.5); a -over- nesting whose inner body has decided leaves has an inner leaf the dichotomy decides (Theorem 5.7). Two further claims are predictions. Writing the inner AF as , a negated path atom that the dichotomy decides, should make the outer premise derivable at a decided relation. And , which reads nested closed bodies through the information-order fixed point of its oracle map, a stratified reading, should agree with the standard -calculus semantics on alternation-free nestings. Genuine alternation, . . with free in the inner body, is not supported: parity conditions, EG , and the fair fragments of the -calculus [18]. Supporting it would need bodies with predicate parameters and a priority semantics, and the paper does not propose it. Two classical routes around opposite-polarity dependence fit the design. Fairness by transformation to random assignment [2], so that fair termination is accessibility over an -branching relation, is carried out in §7 for a two-component loop (Theorem 7.3) and, through a term former over lists of guarded components, for the alternating-bit protocol over lossy channels (Theorem 7.6). Progress measures [33, 34], which cast Büchi and parity winning regions as -certificates over pairs of a state and a rank, are future work. In both, the price moves into the ordinal height of a closed -atom, the ladder of the IGA paper, though on infinite arenas that height need not be bounded by any fixed notation.
9 Where Each Rule Is Spent
The method, and what it certifies. Each theory of the examples in the session OIGA_Coind, and the theories of the dichotomy and its systems, ends with a block of ML that runs at build time; the two OGA theories that hold the replay and the bounded König lemma (OGA_Coind_Kit, OGA_Koenig_FB) carry none, and their results enter the map only through results of OIGA_Coind whose checks follow the dependencies into them. For each listed theorem the block collects the transitive dependencies of the proof, through every proof body, and applies three tests. It fails the build if any dependency is an unchecked assumption (an Isabelle oracle). It fails if the name of any dependency contains one of the strings omv, omh, Ostar, nu_model, mjt and mtrue. This model-freeness test is a naming convention of the development, and it works because the closure is transitive: a proof that uses a model reaches, at the end of its dependencies, the theorems that define the model's relations, whose names contain those strings, so a model fact under another name, such as the truth of the all-zeros atom in , is caught through them. And the block fails unless named rules occur under results that are meant to use them (a needs list), and if named rules occur under results that are meant not to (a forbids list); both are substring tests on the names of the rules' defining facts. The forbids are live: the same substrings occur under the needs of other results, and a control that must be flagged, the system's own soundness theorem, keeps the model test from being blind. A further ML control, in the junction session Coind_Dinga over the two sibling sessions, confirms that every axiom of the chain beyond those of Isabelle/HOL's Main is a recorded definition, a type definition or a type arity; the sessions of the coinduction chain proper (OIGA, OIGA_Coind, IGA_PGSem, IGA_Closing, Coind_Dinga) add none of the last two kinds, and the build fails if one appears.
The abstract calculus a theorem is stated in is the other certificate: a primitive rule the calculus lacks cannot occur in the proof, and every theorem sits in the least calculus its proof uses. One case needs both certificates. In a calculus with ground induction and the dichotomy, ATI is a derived rule (Theorem 5.3), so the calculus certifies only that ATI is not a primitive rule there. The theories of OIGA_Coind and OIGA are built where that derivation is not in scope: the sublocale edge that carries it lives in IGA_Closing, which is not their ancestor, so in those theories no fact of ATI's is available to such a calculus at all. The check then certifies that the proof does not apply ATI's rule, and only the re-exports in IGA_Closing rest on the check alone. The junction's DINGA restatements inherit the accounting of their originals; through the interpretation their dependencies include the derivation of ATI. An ATI mark in the map therefore records the rule a proof applies; every row that applies ATI is one where the dichotomy and ground induction would do, and the ATI column records the weaker rule, weaker in that OGA and OIGA, which have it, are sound for the least model, where the dichotomy is not valid.
A rank, or a count of steps or of inductions, read off a proof script is called a reading in the text and is not formalized.
The map. Rules: , ground induction; , the coinduction rule; Dich, the dichotomy; ATI, OGA's rule. A result whose calculus has no rule beyond RGA's is arithmetic. "The search" is RGA's least-witness search, a derived rule of RGA, not a fifth rule.
| result | μ | ν | Dich | ATI |
|---|---|---|---|---|
| Arithmetic: no rule beyond RGA's | ||||
| asserting a μ-atom: termination of nested random assignment at every fixed depth k, one-round wins, reachability | × | × | × | × |
| fair termination: the transformed loop, and the fairness twin under strong fairness, every state accessible | × | × | × | × |
| the alternating-bit protocol: every message eventually delivered | × | × | × | × |
| the transformation as a term former: decidedness, one helpful direction | × | × | × | × |
| the decidedness premises of the games and of random assignment | × | × | × | × |
| Cinderella's strategy total and invariant-preserving; the round-robin play lost below capacity three | × | × | × | × |
| Ground induction | ||||
| the Lattice and WELL rules (leads-to) | ✓ | × | × | × |
| the native fairness rule: no fair run from an accessible start (with the search) | ✓ | × | × | × |
| the eventuality rule: a run from a code satisfying an eventually atom meets its target | ✓ | × | × | × |
| exclusion μ �vdash ν: Acc �vdash ¬Path, Term �vdash ¬Div, Win_I �vdash ¬Win_II | ✓ | × | × | × |
| no run from an accessible state | ✓ | × | × | |
| Coinduction | ||||
| establishing a ν-region: prefix branches, runs give paths, divergence, player II's copying region, Cinderella's region, the weak fairness twin's path atom | × | ✓ | × | × |
| The dichotomy | ||||
| dichotomy and determinacy: Acc ∨ Path, Term ∨ Div, Win_I ∨ Win_II, the bucket game, the Cantor-Bendixson split | × | × | ✓ | × |
| decided ν-regions: Dec(Path), Dec(Win_II), Dec(Div) | ✓ | × | ✓ | × |
| a run from a path; well-founded or an infinite branch | ✓ | × | ✓ | × |
| player II's strategy (with the search) | ○ | × | ✓ | × |
| Several rules | ||||
| the runs of the divergent twin of random assignment and of the weakly transformed fairness twin | ○ | ✓ | ✓ | |
| the Stepmother's loss as a refutation | ✓ | ✓ | × | × |
| Dec(O) | ✓ | ✓ | ✓ | |
| ATI | ||||
| no natural-number variant | × | × | × | ✓ |
| termination from non-divergence (ATI as omniscience) | × | ✓ | × | ✓ |
| termination or divergence, by ATI | × | ○ | × | ✓ |
| prefix sets decided; the round trip (with the search) | × | × | × | ✓ |
✓: in the result's calculus, and the check requires it. ○: in the calculus, and the check neither requires nor forbids it; the proof may use it.ª ×: the check forbids it.ᵇ Blank: not in the calculus, and not tested.
ªA check certifies which rules a given proof applies. It does not show that a weaker calculus cannot prove the statement, so the paper says "the proof uses" throughout, except where a non-derivability theorem exists; and the required marks are a lower bound on what the proof text spends.
ᵇAn ATI cross in a row whose calculus has ground induction and the dichotomy means that the proof does not apply ATI's rule, not that ATI's conclusions are out of reach (Theorem 5.3); and a check records presence, not multiplicity, so "one coinduction step" is a reading.
What the map says. Four lines carry the content. In the examples, asserting a μ-atom is arithmetic: folding plus number induction, with ground induction needed only to consume the atom; the termination of nested random assignment at rank ω^k, for every fixed depth k, is an RGA theorem, with one number induction per level (the rank a reading), confirmed by a check that forbids every fixed-point rule under it. The examples stay below ω^ω; at higher ranks accessibility is not arithmetic in general, which is why the IGA paper builds a ladder of ordinal notations. Using a region, by unfolding or searching inside it, is arithmetic as well. A ν-region costs one coinduction step when it is established, and nothing afterwards. The proofs of the dichotomy results, the dichotomies themselves and the decided ν-regions, apply neither ν nor ATI; the proof for Dec(O) applies ATI, which the calculus derives. With ground induction the dichotomy decides every ν-region whose body has decided leaves. The run from a path, the branch of a tree and player II's strategy apply no coinduction step: the path or region is a hypothesis, only unfolded. ATI is applied for the absence of a natural-number variant, for the round trip of streams, where it decides the prefix set, and in the trace example as the limited principle of omniscience; nowhere in the bucket game.
Non-derivability. One kind of negative result is available without a new model: from a proved divergence, the exclusion theorem and the system's consistency, the accessibility claim is not derivable. For the divergent twin of random assignment, neither OINGA nor DINGA proves ; under the weak transformation of the fairness twin, neither proves the initial code accessible, by the same argument from the twin's path atom. The statements at DINGA are checked in the junction theory (CD_Junction). The consistency used is the one proved through . For the fairness twin, RGA's non-derivability of the same accessibility is also proved classically, through the least model: the weakly fair run lifts to an infinite chain of edges true there.
10 Related Work
Two readings of a recursive definition. The inductive and coinductive readings of a definition, against , go back to Park's fixed-point induction [46] and bisimulation [47] and to Kozen's modal -calculus [36]; Sangiorgi traces the history of bisimulation and coinduction across modal logic, set theory and concurrency [51], and Aczel's non-well-founded sets made coinduction the proof principle of a greatest fixed point and bisimulation its equality [1].
Fixed points of truth. Kripke's least fixed point leaves the truth-teller ungrounded while other fixed points settle it, and Kripke singled out the intrinsic fixed points, whose verdicts no fixed point contradicts, and the maximal intrinsic one [37]. is neither minimal nor intrinsic (Remark 4.3): it commits to the greatest fixed point for truth at every declared -body, a choice made by the polarity of the declaration, body by body. Visser's survey treats the structure of the fixed points of the truth jump [60], and Burgess's analysis of their complexity [12] is the classical reference for what calibrating would involve. The axiomatic theories of Kripkean truth take the other route: the Kripke–Feferman theory KF [19], whose standard models are the fixed points of the jump, and the partial-logic theory PKF of Halbach and Horsten [29], sound for the fixed points as partial models, are sound for a whole class of fixed points, where INGA commits to one non-minimal fixed point and proves what holds there. Field's paracomplete theory [20] builds on Kripke's least fixed point with a conditional of its own; the grounded conditional of §2 is instead a premise sequent at an undecided hypothesis. Fitting's Kripke–Kleene semantics for logic programs [21] and the well-founded semantics [59] work with the same split of a three-valued operator into a truth and a falsity part that §3 uses.
Least and greatest fixed points in proof theory. Baelde's MALL [4], linear logic with least and greatest fixed points, has equal to of the dual by construction, which is the duality the dichotomy restores at bodies with decided leaves; Tiu and Momigliano's [57] has both Park rules on defined atoms and proves cut elimination. Both are proof-search frameworks rather than arithmetics, and both have the duality that a grounded system lacks. Over arithmetic, Lubarsky characterized the sets definable in the -calculus over the integers [41], the definability side of the alternation boundary of §8, and Möllerfeld showed that arithmetic with arbitrarily nested least and greatest fixed points, where is the classical dual of , has the strength of -comprehension [43]; Curzi and Das give the computational counterpart for intuitionistic and circular proofs with fixed points [16]. The theories of iterated inductive definitions [11] are the inductive side of the same picture. The paper claims no calibration of DINGA or against these theories. Cyclic proof systems [10], and cyclic arithmetic, which Das calibrates by quantifier complexity [17], obtain induction and coinduction from a global condition on a finite cyclic proof; whether that condition can be stated and checked in a grounded setting is an open question the paper does not touch.
Coinduction in proof assistants. The coinduction rule here is Park's rule, stated in Isabelle as weak_coinduct, which Paulson developed definitionally from Knaster–Tarski greatest fixed points [48]; the codatatype package of Isabelle/HOL [7,58] and Lochbihler's library of lazy lists and streams, of the kind used for Nakata–Uustalu-style traces [40], supply coinductive types, which the paper does without (§6). Proof by guarded corecursion [15], productivity checking [52], parameterized coinduction's accumulation of the hypothesis [31], the companion [49] and up-to techniques [50] refine what a certificate may use; the paper has only coinduction up to union, the form of Isabelle's coinduct and of its coinductive package's generated rules, known to users as strong coinduction. The separation of inductive and coinductive definitions in Isabelle, Coq and Agda is the folklore of which Theorem 4.1 makes one reason exact for this calculus. Capretta's delay monad and the treatments of termination against non-divergence built on it are the type-theoretic analog of the search example, and of non-termination stated positively as a run [14]. Leroy and Grall's coinductive big-step semantics [39] and the trace semantics of Nakata and Uustalu [44] are the sources of the termination-and-divergence example, whose disjunction is their “evaluates or diverges” for the search body; coinductive logic programming [53] reads a logic program at its greatest fixed point in the same spirit.
Verification. Recurrent sets, the certificates of non-termination in Gupta and others' work [28], are exactly the certificates of the path atom: a set closed under one step. Fair termination by transformation to random assignment is Apt and Olderog's [2], and Francez's monograph is the standard account of fairness and its proof methods [26]; the development's two variants of the transformation are described in §7, and the alternating-bit protocol over lossy channels is the standard benchmark for fairness under message loss. The rank- example is Apt and Plotkin's [3], and the -completeness of termination under unbounded nondeterminism Harel's [30]. Progress measures for Büchi and parity conditions are Klarlund's and Jurdziński's [33,34]. Lamport's Lattice rule [38], which descends from the proof lattices of Owicki and Lamport [45], and the Manna–Pnueli well-founded rules [42] are the classical statements that liveness is ranking; Theorem 7.5 derives the Lattice and WELL rules from ground induction. The bucket game is from Bodlaender and others [9] and Hurkens and others [32], and Beyene and others used it as a benchmark for infinite-state safety-game solving [5]. Bürki's thesis on grounded verification of recursive trace systems [13] is the motivating direction: traces produced with finite fuel, safety as a decided predicate on prefixes, liveness as a statement over the given trace, no coinduction. §8 says what that treatment can state and what needs the new rules.
Determinacy and reverse mathematics. Open determinacy is Gale and Stewart's [27]; its calibration at arithmetic-transfinite recursion is Steel's [55], the finer calibrations Tanaka's [56], and Simpson's treatment of the Cantor–Bendixson theorem at comprehension [54] is the classical landmark behind the last example. Blass's bounds on the complexity of winning strategies [8] say what a strategy term can and cannot be. The Kleene tree is Kleene's [35]. The paper claims no calibration of in these terms.
The grounded family. RGA [22], its metatheory of truth, self-reference and internal reasoning [25], OGA [23] and IGA [24] are the systems extended. The grounded reading of implication at an undecided hypothesis, and why it is forced, is the subject of the IGA paper; both rules here are shaped by it.
11 Limits, Open Questions, and the Artifact
Two rules separate DINGA from IGA. The coinduction rule reads a body of the class at its greatest fixed point, and the systems that have it are sound for an explicit model, consistent, semantically conservative over the least model, and unsound for the least model by design: they derive never-refuted instances that the least model leaves without a value. The dichotomy rule supplies the classical disjunction between a least-fixed-point atom and the greatest-fixed-point atom of its co-body, under a derivable premise; it trades the hypothesis that an order is well-founded for the derivable one that its steps are decided, and the change of model pays for the trade (§5.3). A second cost, inherited from ATI (Theorem 5.3), is the loss of every certificate-grounded semantics: RGA and IGA are proof-grounded, while OINGA and DINGA, like OIGA, have no certificate-grounded semantics; unlike OIGA they are unsound for the least model by design, and their warrant is . With the two rules, streams, runs, branches, the regions of a game, and the termination or divergence of a search are single sentences, and the map of §9 says what each costs.
Expressiveness. Genuine alternation is not supported, and the paper does not propose it. Of the two classical routes around opposite-polarity dependence, random assignment for fairness is carried out, up to the alternating-bit protocol's eventual delivery (Theorem 7.6), and progress measures for Büchi and parity conditions are the natural next example. Streams enter bodies as parameters, not as points. Stream bisimilarity for systems with infinite branching, and up-to context techniques, would need codes read by an evaluator (a prediction, §4). Player I's strategy in an open game is not extracted.
Open questions about the rules. Whether INGA proves termination from non-divergence without ATI is open, and so is whether INGA is proof-grounded. Whether OINGA derives every instance of the dichotomy is open; cannot separate the two systems. The calculus of ground induction with the dichotomy but without is already unsound for the least model, so it pays the dichotomy's price without , and every rule of OIGA holds in it, ATI as a derived rule; what model and strength that calculus has is open.
Calibration. The strength of in reverse-mathematical terms, and the complexity of the -truth sets of the controller's region, are not established beyond a lower bound: 's truth set is not hyperarithmetic (, classical, by an argument). The bucket game's threshold capacity is not settled here; the certificate is for capacity three and above, and that bound is attained against the strategy it certifies (Theorem F.5).
The question of the introduction. Which non-terminating computations deserve to be colored true? The paper's answer, at the level of declared bodies (Remark 4.3): the instances of a body of the class, written with 's tag, that lie in the greatest fixed point of its truth operator, relative to the least fixed point of the oracle map. They are never refuted; nothing the least model values changes; and reading at the greatest fixed point is not the same as coloring the never-refuted true, since the two coincide only for bodies that satisfy Theorem 3.2.
The artifact. Isabelle/HOL (Isabelle2025-2) checks every theorem in this paper; the remarks are arguments and are not mechanized. No session in the chain enables quick_and_dirty, the build-time checks fail on any oracle, and an axiom check confirms that every axiom beyond those of Isabelle/HOL's Main is a recorded definition, a type definition or a type arity; the sessions of the coinduction chain proper (OIGA, OIGA_Coind, IGA_PGSem, IGA_Closing, Coind_Dinga) add none of the last two kinds, and the build fails if one appears. The sessions, over the RGA development (RGA, with the model interface, and RGA_Kit), are GCalc_Core (the base abstract calculus), AGA, OGA (the replay, Kónig's lemma and the Kleene tree: OGA_Coind_Kit, OGA_Koenig_FB, OGA_Kleene_Tree), IGA (the former, the model and the dichotomy rule: theories IGA_Nu, IGA_Nu_Sound, IGA_Nu_Rule, IGA_Dich, IGA_Coind and companions), OIGA (the abstract calculi with the rules and the systems: GNU, GDich, GShell and their companions), OIGA_Coind (streams, games, fairness and the other examples), IGA_PGSem (the theorems on certificate-grounded semantics), IGA_Closing (ATI from the dichotomy, the closed-off oracle, DINGA with a primitive-recursive step decider and its recursively enumerable derivability through the equality with OINGA with the dichotomy, whose proof checker is there), and Coind_Dinga, the junction over OIGA_Coind and IGA_Closing (the examples restated at DINGA, the axiom check, and OINGA's recursively enumerable derivability). The whole chain builds with isabelle build -d hol Coind_Dinga; a clean build of the chain takes about seven minutes with ten threads on an Apple-silicon workstation. Appendix H lists the theorems with their names. The development checked is the one at the tag coind-2026-10-30 of the project repository, whose address will be given at its public release.
References
[1] Peter Aczel. Non-Well-Founded Sets, volume 14 of CSLI Lecture Notes. CSLI Publications, 1988.
[2] Krzysztof R. Apt and Ernst-Rüdiger Olderog. Proof rules and transformations dealing with fairness. Science of Computer Programming, 3(1):65–100, 1983.
[3] Krzysztof R. Apt and Gordon D. Plotkin. Countable nondeterminism and random assignment. Journal of the ACM, 33(4):724–767, 1986.
[4] David Baelde. Least and greatest fixed points in linear logic. ACM Transactions on Computational Logic, 13(1):1–44, 2012. doi:10.1145/2071368.2071370.
[5] Tewodros A. Beyene, Swarat Chaudhuri, Corneliu Popeea, and Andrey Rybalchenko. A constraint-based approach to solving games on infinite graphs. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2014), pages 221–233, 2014.
[6] Errett Bishop. Foundations of Constructive Analysis. Academic Press, New York, 1967.
[7] Jasmin Christian Blanchette, Johannes Hölzl, Andreas Lochbihler, Lorenz Panny, Andrei Popescu, and Dmitriy Traytel. Truly modular (co)datatypes for Isabelle/HOL. In Interactive Theorem Proving (ITP 2014), volume 8558 of Lecture Notes in Computer Science, pages 93–110. Springer, 2014. doi:10.1007/978-3-319-08970-6_7.
[8] Andreas Blass. Complexity of winning strategies. Discrete Mathematics, 3(4):295–300, 1972. doi:10.1016/0012-365X(72)90086-6.
[9] Marijke H. L. Bodlaender, Cor A. J. Hurkens, Vincent J. J. Kusters, Frank Staals, Gerhard J. Woeginger, and Hans Zantema. Cinderella versus the wicked stepmother. In Theoretical Computer Science, IFIP TCS 2012, volume 7604 of Lecture Notes in Computer Science, pages 57–71. Springer, 2012.
[10] James Brotherston and Alex Simpson. Sequent calculi for induction and infinite descent. Journal of Logic and Computation, 21(6):1177–1216, 2011.
[11] Wilfried Buchholz, Solomon Feferman, Wolfram Pohlers, and Wilfried Sieg. Iterated Inductive Definitions and Subsystems of Analysis: Recent Proof-Theoretical Studies, volume 897 of Lecture Notes in Mathematics. Springer, 1981.
[12] John P. Burgess. The truth is never simple. Journal of Symbolic Logic, 51(3):663–681, September 1986.
[13] Benjamin Bürki. Grounded verification of recursive trace systems. Master's thesis, EPFL, June 2026. URL: https://bford.info/thesis/2026-b%C3%BCrki/.
[14] Venanzio Capretta. General recursion via coinductive types. Logical Methods in Computer Science, 1(2:1):1–28, 2005.
[15] Thierry Coquand. Infinite objects in type theory. In Types for Proofs and Programs (TYPES 1993), volume 806 of Lecture Notes in Computer Science, pages 62–78. Springer, 1994.
[16] Gianluca Curzi and Anupam Das. Computational expressivity of (circular) proofs with fixed points. Logical Methods in Computer Science, 21(4), 2025. Paper 18. doi:10.46298/lmcs-21(4:18)2025.
[17] Anupam Das. On the logical complexity of cyclic arithmetic. Logical Methods in Computer Science, 16(1), 2020. doi:10.23638/LMCS-16(1:1)2020.
[18] E. Allen Emerson and Chin-Laung Lei. Efficient model checking in fragments of the propositional mu-calculus (extended abstract). In Proceedings of the First Annual IEEE Symposium on Logic in Computer Science (LICS 1986), pages 267–278. IEEE Computer Society, 1986.
[19] Solomon Feferman. Reflecting on incompleteness. Journal of Symbolic Logic, 56(1):1–49, March 1991. doi: 10.2307/2274902.
[20] Hartry Field. Saving Truth From Paradox. Oxford University Press, 2008. doi:10.1093/acprof:oso/9780199230747.001.0001.
[21] Melvin Fitting. A Kripke-Kleene semantics for logic programs. Journal of Logic Programming, 2(4):295–312, 1985.
[22] Bryan Ford. Computable quantification in reflective grounded arithmetic, 2026. arXiv preprint 2607.25533. https://bford.info/pub/lang/rga/. arXiv:2607.25533.
[23] Bryan Ford. Idealizing useful fictions in omega grounded arithmetic, 2026. arXiv preprint 2608.17862. https://bford.info/pub/lang/oga/. URL: https://arxiv.org/abs/2608.17862, arXiv:2608.17862.
[24] Bryan Ford. Inductive grounded arithmetic: Goodstein, the hydra, and , 2026. arXiv preprint. arXiv:2610.34548.
[25] Bryan Ford. Internal reasoning and consistency in reflective grounded arithmetic, 2026. arXiv preprint 2608.16140. https://bford.info/pub/lang/irga/. arXiv:2608.16140.
[26] Nissim Francez. Fairness. Monographs in Computer Science. Springer, New York, 1986. doi:10.1007/978-1-4612-4886-6.
[27] David Gale and Frank M. Stewart. Infinite games with perfect information. In Contributions to the Theory of Games, Volume II, volume 28 of Annals of Mathematics Studies, pages 245–266. Princeton University Press, 1953.
[28] Ashutosh Gupta, Thomas A. Henzinger, Rupak Majumdar, Andrey Rybalchenko, and Ru-Gang Xu. Proving non-termination. In 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 147–158, January 2008.
[29] Volker Halbach and Leon Horsten. Axiomatizing Kripke's theory of truth. Journal of Symbolic Logic, 71(2):677–712, June 2006. doi:10.2178/jsl/1146620166.
[30] David Harel. Effective transformations on infinite trees, with applications to high undecidability, dominoes, and fairness. Journal of the ACM, 33(1):224–248, 1986.
[31] Chung-Kil Hur, Georg Neis, Derek Dreyer, and Viktor Vafeiadis. The power of parameterization in coinductive proof. In Proceedings of the 40th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2013), pages 193–206, 2013.
[32] Antonius J. C. Hurkens, Cor A. J. Hurkens, and Gerhard J. Woeginger. How Cinderella won the bucket game (and lived happily ever after). Mathematics Magazine, 84(4):278–283, 2011.
[33] Marcin Jurdziński. Small progress measures for solving parity games. In STACS 2000, 17th Annual Symposium on Theoretical Aspects of Computer Science, volume 1770 of Lecture Notes in Computer Science, pages 290–301. Springer, 2000.
[34] Nils Klarlund. Progress measures for complementation of -automata with applications to temporal logic. In Proceedings of the 32nd Annual Symposium on Foundations of Computer Science (FOCS 1991), pages 358–367, 1991.
[35] Stephen Cole Kleene. Introduction to Metamathematics. North-Holland, 1952.
[36] Dexter Kozen. Results on the propositional -calculus. Theoretical Computer Science, 27(3):333–354, 1983.
[37] Saul Kripke. Outline of a theory of truth. The Journal of Philosophy, 72(19):690–716, November 1975. doi: 10.2307/2024634.
[38] Leslie Lamport. The temporal logic of actions. ACM Transactions on Programming Languages and Systems, 16(3):872–923, 1994.
[39] Xavier Leroy and Hervé Grall. Coinductive big-step operational semantics. Information and Computation, 207(2):284–304, 2009.
[40] Andreas Lochbihler. Coinductive. Archive of Formal Proofs, February 2010. https://isa-afp.org/entries/Coinductive.html, Formal proof development.
[41] Robert S. Lubarsky. -definable sets of integers. Journal of Symbolic Logic, 58(1):291–313, 1993. doi:10.2307/2275338.
[42] Zohar Manna and Amir Pnueli. The Temporal Logic of Reactive and Concurrent Systems: Specification. Springer, 1992.
[43] Michael Möllerfeld. Generalized Inductive Definitions: The -Calculus and -Comprehension. PhD thesis, Westfälische Wilhelms-Universität Münster, 2002.
[44] Keiko Nakata and Tarmo Uustalu. A Hoare logic for the coinductive trace-based big-step semantics of While. Logical Methods in Computer Science, 11(1:1):1–32, 2015.
[45] Susan Owicki and Leslie Lamport. Proving liveness properties of concurrent programs. ACM Transactions on Programming Languages and Systems, 4(3):455–495, 1982. doi:10.1145/357172.357178.
[46] David Park. Fixpoint induction and proofs of program properties. In Bernard Meltzer and Donald Michie, editors, Machine Intelligence 5, pages 59–78. Edinburgh University Press, 1969.
[47] David Park. Concurrency and automata on infinite sequences. In Theoretical Computer Science, 5th GI-Conference, volume 104 of Lecture Notes in Computer Science, pages 167–183. Springer, 1981.
[48] Lawrence C. Paulson. Mechanizing coinduction and corecursion in higher-order logic. Journal of Logic and Computation, 7(2):175–204, 1997. doi:10.1093/logcom/7.2.175.
[49] Damien Pous. Coinduction all the way up. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2016), pages 307–316, 2016.
[50] Damien Pous and Davide Sangiorgi. Enhancements of the bisimulation proof method. In Davide Sangiorgi and Jan Rutten, editors, Advanced Topics in Bisimulation and Coinduction, pages 233–289. Cambridge University Press, 2012.
[51] Davide Sangiorgi. On the origins of bisimulation and coinduction. ACM Transactions on Programming Languages and Systems, 31(4):15:1–15:41, 2009. doi:10.1145/1516507.1516510.
[52] Ben A. Sijtsma. On the productivity of recursive list definitions. ACM Transactions on Programming Languages and Systems, 11(4):633–649, 1989.
[53] Luke Simon, Ajay Mallya, Ajay Bansal, and Gopal Gupta. Coinductive logic programming. In Logic Programming, 22nd International Conference (ICLP 2006), volume 4079 of Lecture Notes in Computer Science, pages 330–345. Springer, 2006.
[54] Stephen G. Simpson. Subsystems of Second Order Arithmetic. Cambridge University Press, Cambridge, 2 edition, 2009.
[55] John R. Steel. Determinateness and Subsystems of Analysis. PhD thesis, University of California, Berkeley, 1977.
[56] Kazuyuki Tanaka. Weak axioms of determinacy and subsystems of analysis I: games. Zeitschrift für mathematische Logik und Grundlagen der Mathematik, 36:481–491, 1990.
[57] Alwen Tiu and Alberto Momigliano. Cut elimination for a logic with induction and co-induction. Journal of Applied Logic, 10(4):330–367, 2012. doi:10.1016/j.jal.2012.07.007.
[58] Dmitriy Traytel, Andrei Popescu, and Jasmin Christian Blanchette. Foundational, compositional (co)datatypes for higher-order logic: Category theory applied to theorem proving. In 27th Annual IEEE Symposium on Logic in Computer Science (LICS 2012), pages 596–605. IEEE, 2012. doi:10.1109/LICS.2012.75.
[59] Allen Van Gelder, Kenneth A. Ross, and John S. Schlipf. The well-founded semantics for general logic programs. Journal of the ACM, 38(3):619–649, 1991.
[60] Albert Visser. Semantics and the liar paradox. In Dov M. Gabbay and Franz Guenthner, editors, Handbook of Philosophical Logic, Volume IV, pages 617–706. D. Reidel, 1989. doi:10.1007/978-94-009-1171-0_10.
A The Rules in Full
The mechanization uses de Bruijn indices: in a body, index 0 is the point and index 1 the recursive variable, and under binders they shift to and . substitutes the abstraction of the certificate or motive for the recursive variable, so that a recursive atom becomes , one head step from substitutes for the point.
The positivity grammar (posP). A term in which the recursive variable does not occur is positive and negative. is positive when is a numeral expression in the bound variables (pnexp): a variable bound inside the body or the point, 0, or the successor of one. is positive when is negative and conversely. is positive when both are, negative when both are. is positive when is, and negative when is, with indices shifted.
The coinduction rule (nuS). Premises: positive and mentioning the recursive variable; ; and well-formed; not free in , in , or in . Conclusion: .
The dual (ndual). A term not mentioning the recursive variable is its own dual. The dual of a recursive atom , with a numeral expression in the bound variables, is . The dual commutes with negation, disjunction and the universal.
The decidedness premise (nfdec). The premises of a body are generated by a relation, not a function. For a term not mentioning the recursive variable under binders, a premise is the universal closure, over the point and the bound variables, of ; the clauses below may also descend into such a term, which is why a body can have several premises, and the rule accepts each of them. For a recursive atom the premise is . For a premise of is one; for the conjunction of one for each; for a premise of one binder deeper. For the control body every premise is therefore the universal closure of conjoined with , which no substitution makes true.
The dichotomy rule (dichS). Premises: positive and mentioning the recursive variable; the dual of ; the decidedness premise of ; ; ; well-formed. Conclusion: .
ATI (pr_allTI). From , which is proved schematically at a fresh , conclude .
The soundness case of the coinduction rule. In , under an arbitrary well-formed substitution for the free variables, let the certificate set be the set of well-formed argument terms that have a value and at which is true. The first premise makes true and the third gives a value, so . At every term of , the closure premise, with the fresh point instantiated at itself (its hypothesis holds because has a value), makes the body true at with for the recursive variable. The positive transport lemma for the oracle model (omvO_pos_neg_transport_P) turns this into truth with the recursive atoms read in the set of terms at which applies truly; because every atom argument is a numeral expression in the point and the bound variables, it is well-formed and valued at the instance, so the reading restricts to . That gives for the body's truth operator relative to . So is below the greatest fixed point, which is the oracle's truth set for the body, and the -atom at is true. No value congruence is used; the certificate set is indexed by terms.
Appendices B to G: the headline proofs in detail
The six appendices below give, for each headline theorem, the statement as it stands in the Isabelle sources with every hypothesis, the definitions it rests on, the proof as numbered steps that follow the mechanized proof, with each induction's motive and each coinduction's region written out, and a list of lemmas a reader re-mechanizing the proof in another assistant would need. They are written for a competent Master's or early PhD student without logic expertise. Isabelle names appear throughout, in sans serif, so that each step can be found in the sources. Appendix A states the rules; Appendix H indexes every theorem.
Common vocabulary. Variables are de Bruijn indices in the sources; the appendices write named variables and say which index is meant where it matters. In a body, index 0 is the point and index 1 the recursive variable. A term is well-formed (wft) when it is built correctly from the constructors, closed (closed) when no index occurs free; lifting (lift) moves a term under a binder. substitutes for a binder's variable (bsub); applies a substitution to every free variable at once (subf), and a substitution is well-formed (wsubf) when its images are. A sequent is a derivation in RGA, or in the system or abstract calculus named; is well-formed (wfc) when its members are; says is a number and that it is decided. A derivation is a proof list, each entry a sequent obtained by one rule from entries before it; the list contains when is one of its entries. is valid in a model when, for every well-formed substitution that makes every member of true in ( satisfies ), is true in . An eigenvariable is the fresh variable that a rule binding a variable (universal introduction, ground induction, coinduction) introduces in its premise, fresh for everything else in the premise, so that the premise holds at every instance of the variable. ATI in its open form (ir_allTI_open) derives the decidedness of a universal from the decidedness of its body at a fresh number variable.
The least model is the pair of mutually inductive relations of [25]: reaches the head form (omh) and has the value (omv), with 1 for true and 0 for false, twenty-one rules in all, and a term has at most one value. The oracle model at an oracle is the same pair of relations with a -head for each body of the class, a guard that keeps the beta clause from unfolding a -term of the class, and two clauses that read an application whose head is a -head at the oracle's verdict on the argument term (omhO, omvO). The oracle map (Om) sends to the oracle that reads each body of the class at the greatest fixed point of its truth operator and the least fixed point of its falsity operator, both relative to the model at ; (Ostar) is its least fixed point and is the oracle model at , so that " is true in " is omvO Ostar . Every value of the least model persists in (omv_omvO_Ostar).
The oracle readings. A body with recursive index is read at an environment with its recursive atoms interpreted as membership in a set: the truth reading over the least model (osem) says when the body reads true, and requires the atom's argument to be a literal numeral. Over the oracle model at the readings come in a truth form and a falsity form (osemO, fsemO), and the reading relative to with numeral membership is osemM. The truth operator of a body sends a set to the set of points at which the body reads true (numerals for the least-model reading, argument terms for the oracle readings); the falsity operator likewise with the falsity reading.
The dual and the premise. The dual of a body (ndual) is a relation between bodies that negates each recursive atom and nothing else; it is functional (ndual_fun) and exists for every body in the positive or the negative grammar (ndual_exists). The decidedness premise (nfdec) is likewise a relation between a body and a term: it holds of a body and any term that conjoins decidedness claims for the body's non-recursive leaves, so a body may have several premises, and the rule accepts any of them.
The abstract calculi. The development states each grounded theorem in a locale that has exactly the rules the proof uses, over RGA: gcalc has none beyond RGA's; the suffixes gfix, ati, nu and dich add ground induction, OGA's rule, the coinduction rule and the dichotomy, in every combination (gcalc_gfix_nu, gcalc_ag for ground induction with ATI, gcalc_ag_nu_dich for all four, and so on). A result stated in one calculus holds in every system that interprets the calculus; INGA interprets gcalc_gfix_nu and OINGA gcalc_ag_nu. Every calculus with ground induction and the dichotomy interprets gcalc_ati (Theorem 5.3). DINGA (dinga) interprets gcalc_ag_nu_dich, and so does oinga_dich, OINGA with the dichotomy, which has the same derivability relation (Theorem 5.4); results stated for oinga_dich, under oingad_names, are results about DINGA, and those the paper cites at DINGA are restated there by name in the junction session Coind_Dinga (Appendix C). Facts about are HOL theorems in the locale rga.
B The model and the soundness of the coinduction rule
Files: RGA/RGA_Omega_Sound.thy (the model interface and the generic soundness theorem), IGA/IGA_Nu.thy (the -former, the oracle model, the oracle map, coherence, head-step invariance, the all-zeros atom), IGA/IGA_Nu_Sound.thy (the value congruence of and rga_nu_sound), IGA/IGA_Nu_Rule.thy (the coinduction rule, INGA, its soundness and conservativity, the clash), IGA/IGA_Coind.thy (a body read at both fixed points), and IGA/IGA_KleeneO_Meas.thy (the least model's falsity reading and its transport lemma). All results are classical: HOL theorems in the locale rga, or in inga for the system.
Definitions. The -former (trmNu) is with . and . ; the identity redex makes a different term from every (trmNu_neq_trmGfix), and reaches in four head steps (nu_step1 to nu_step4). Three positivity grammars share the clauses for non-occurrence, disjunction, negation (which swaps the positive and negative halves) and the universal (one index deeper). They differ at the recursive atom : pos asks to be a numeral expression in the variables other than ; the rule's grammar posP asks for a numeral expression in the variables below (pnexp: the point and the quantifier-bound variables, never a parameter); and the model's grammar posA accepts any in which does not occur (posP_posA: posP implies posA). A body is in the class (nuGood) when it is posA-positive at index 1 and index 1 occurs in it (nuGood_of_posP: a posP-positive body that mentions is in the class). A body of the class is a disjunction, negation, equation, universal or recursive atom (nuGood_fshape).
An oracle assigns to each body two sets of terms, , the arguments at which is to be true, and , those at which it is to be false; oracles are ordered pointwise by inclusion of both sets. An oracle is consistent (ocons) when the two sets are disjoint for every body. The oracle model (omhO, omvO) is a pair of simultaneous inductive relations, the head judgment and the value judgment , with nine head clauses and fifteen value clauses. Its heads are those of the least model plus one -head per body. The clauses are the least model's with three changes.
-
The head-level beta clause (omhO_appLam) carries the guard that is not for a body of the class, so a -term of the class is never unfolded as a head.
-
A new head clause (omhO_nu): for in the class, .
-
Two oracle clauses (omvO_nuT, omvO_nuF): if and , then . The oracle is consulted at the argument term , not at a value of , and at every application whose function part evaluates to a -head.
A -term of the class has only the -head (omhO_trmNu_inv), so its atoms take values only through the oracle (omvO_nu_atom_inv, omvO_nu_atoml), and a -term itself has no value (omvO_trmNu_none).
The oracle readings of a body are inductive relations like the least model's readings, with the set indexed by terms. (osemO) reads a part in which does not occur by of its -instance, reads an atom , with not occurring in , true when the term lies in and never false, and reads disjunction, negation and the universal (over numerals) clause by clause. (fsemO) is the dual: an atom reads false when and never true. The environment of a body at the point (nuenv) sends 0 to , 1 to and to , so that its instance is (nuenv_gsub). The truth and falsity operators relative to (FO, GO) are and ; the two operators are monotone in the set and in the oracle, for every body (FO_mono2, GO_mono2, FO_mono, GO_mono). The oracle map (Om) is and for in the class, both empty otherwise; the map is monotone (Om_mono), and (Ostar). Hence, for in the class, and (Ostar_T, Ostar_F). is with its head judgment.
The model interface (omega_model) is a locale over a relation with twenty-four assumptions: uniqueness of values; the inversions and introductions of the least model's clauses for zero, successor, equation, negation, disjunction and the universal; the recursor's successor clause (an introduction only); no value for ; beta, iff ; head-step invariance in both directions (M_hstep, M_hstep_rev); and two value congruences, M_vc (if and are well-formed and agree at every variable up to replacing a term by a well-formed term with the same value, then implies and (if and are well-formed with the same value, implies ).
The value congruence of (ovcrdO, at depth ; ovcrO at depth 0) relates two terms that are equal except that, at some positions, they hold well-formed terms with the same value in (lifted past binders). The congruence image of a -term is a mixed self-application (mix) with and congruent to at depth 2 (ovcr_trmNu_E); when the halves differ the mixed term is not a -term, and mix has exactly the value of (mix_val).
B.1 RGA is sound for
Theorem B.1 (rga_nu_sound). If is derivable in RGA, is well-formed, and every member of is true in , then is true in .
Truth here is the value judgment on itself, the identity substitution; the form for every well-formed substitution is nu_model.rga_sound_mjt. The theorem is one line: the generic soundness theorem of the interface, instantiated through the sublocale rga omega_model(val), whose justification nu_model_omega_model carries the work.
Proof.
-
Generic soundness (in omega_model, nothing specific to ). rga_M_sound is rga_sound_mjt at the identity substitution (wsubf_var); rga_sound_mjt passes to a valid proof list containing the judgment. prf_mjt is an induction on that list, with motive: for every and , if the list contains and is well-formed, then is valid in . At a list , a judgment is either already in , or is , obtained by one rule from judgments of ; rga_step_mjt then treats the forty-two rules case by case. Each case fixes a well-formed satisfying , applies the premises' validity at or at an updated , and closes with interface facts; for instance the conversion rules use the head-step facts, and pr_eq_subs, pr_nat_ind and the universal rules use the value congruence.
-
Reduction to the value congruences (nu_model_iff_vc): val satisfies the interface if and only if it satisfies and . Only the “if” direction is used. Of the twenty-two other facts, the inversions hold at every oracle by case analysis on the inductive definition and the introductions are clauses; uniqueness is step 3 and head-step invariance step 4.
-
Determinism (omvO_Ostar_unique).
(a) At every consistent oracle, omhO_det_excl is a simultaneous rule induction with motive: a term with head has no other head and no value; a term with value has no other value and no head. In the oracle cases a true and a false reading at one term would put the argument in both of the oracle's sets. In the beta case the guard of clause 1 and omhO_trmNu_inv separate a -head from a -head. The consequence is omvO_unique.
(b) is consistent (ocons_Ostar), by fixed-point induction along the transfinite iteration of Om (ccpo_class.fix_induct). The base, the empty oracle, is consistent. Consistency is admissible (ocons_admissible): a term in the union of the truth sets and the union of the falsity sets of a chain lies in both sets of the larger of the two members involved. The step (ocons_Om) is gfpO_lfpO_disjoint: at a consistent , gfp and lfp are disjoint. Write . By lfp_lowerbound it suffices that the complement of is closed under . A in would satisfy , since is a fixed point, and . osemO_fsemO_excl, an induction on the truth reading at disjoint sets, refutes the pair: at a non-recursive leaf by omvO_unique, at an atom by disjointness, and at connectives by the inversions of the falsity reading.
- Coherence and head-step invariance.
(a) Two transports, at any oracle. osemO_term, an induction on the reading, turns , for in the class with and , into ; the atom case is . fsemO_term is the dual. omvO_pos_neg_transport goes back, by induction on posA/negA: a true instance of a positive part reads true at 's own truth set, a false one reads false at the falsity set, and dually for a negative part. The atom case is ; the model reads a -atom only through the oracle, so the induction is structural. Together: , for in the class, iff , and likewise with .
(b) Coherence (nu_coherent_T, nu_coherent_F): for in the class, iff has value in . By Ostar_T and gfp_fixpoint, ; apply (a). Falsity likewise, with lfp_fixpoint.
(c) nu_head_val: if hd_{Θ*}(t, ν_{Φ}), then and have the same values in . Forward: by determinism the value of came from an oracle clause; apply coherence. Backward: an instance of a body of the class has only truth values (omvO_body_bool), so coherence and an oracle clause apply.
(d) omO_hstep_sim is an induction on the head step from a redex to its reduct, with a two-part motive: every value of the reduct is a value of the redex; every head w of the reduct has a head of the redex with , or one of , w the -head and the other the -head of (heqN). At a beta step whose redex is a -term of the class, the reduct is , whose only head is the -head of the unfolding (omhO_Ostar_nul_redex_eq), paired with ; any other beta step uses the beta clause. The recursion steps are direct. At a step inside the function part of an application, related heads and the unfolding's -head close by nu_head_val, and by omhO_body_none (an instance of a body of the class has no head). omO_hstep_rev is the mirror, from redex to reduct.
- The value congruence of (omvO_vcr_ex): if and is congruent to , then . The proof evaluates at an auxiliary oracle, the congruence interior (Ocg): when and, for all congruent to at depth 2 and every congruent to , the term has value in . Directly (Ocg_le).
(a) The class is invariant under the congruence at depth 2 (ovcrdO_nuGood), by induction on posA/negA, using that congruence preserves whether a low index occurs (ovcrdO_free_low).
(b) omO_vcr_transport is a simultaneous rule induction on hd_{Θ°} and val_{Θ°}, with motive: if X has head w, every Z congruent to X has, in M*, a head related to w (nhrel: the least model's head relation, plus a ν-head related to a ν-head of a congruent body or to the λ-head of a mixed unfolding, and conversely); if X has value r, every such Z has value r in M*. The least model's cases replay RGA's congruence proof with the congruence inversions. Four cases are new. At νΨ (tr_case_nu) the image is a mixed self-application: a ν-term of the class with the ν-head when the halves agree (by (a)), otherwise a term with the λ-head of the mixed unfolding. The head-level beta case with a ν-term image is tr_case_appLam_h; the value-level beta case is tr_case_appLam_v. At an oracle clause (tr_case_nuTF), u ∈ Θ°(Φ, b): if the image is a swapped leaf, determinism closes; otherwise the image is t′ · u′, t′ has head ν_{Ψ₁} or the λ-head of mix(Ψ₁, Ψ₂), the definition of Θ° supplies the value b of Ψ₁[νΨ₂/a][u′/x], and nu_head_val or the beta clause gives the value of t′ · u′.
(c) osemO_vcr and fsemO_vcr, by induction on the reading at : from , a congruent , related environments (envrel) and a set map (whenever and is congruent to , then ), conclude . Non-recursive leaves go through (b).
(d) A coinduction (Ocg_gfp_cong). Region: , the set of congruent to some , for a of the class congruent to . Closure obligation: , which follows by unfolding the greatest fixed point and applying (c) with the environments and (envrel_nuenv, ovcrO_trmNu). So .
(e) Ocg_prefix: . Let ; monotonicity of and give . The truth half: (c) with the set map of (d) gives , and turns that into the truth of (nuenv_gsub2). The falsity half is a least-fixed-point induction (lfp_induct) with motive: every mixed unfolding of congruent bodies at a congruent argument is false at . Its step applies fsemO_vcr with the set map that motive supplies and nu_coherent_F, then fsemO_term.
(f) By lfp_lowerbound, (Ostar_le_Ocg), so (Ocg_eq_Ostar). omvO_vcr_ex com-poses monotonicity of the model in the oracle, which moves a value at to , with the value half of (b).
(g) M_vc is omvO_vc_var: the two substitutions are congruent pointwise (ovcrO_refl, ovcrO_swap), hence on every term (ovcrO_subf1). M_vcb is omvO_vc_bsub, through ovcrO_bsub.
- Close. nu_model_omega_model combines step 2 with the two instances of step 5(g); the sublocale and the theorem follow.
The proof for every coherent oracle. Of the proof above uses only that the oracle is consistent, that its truth and falsity sets are fixed points of the two operators at every body of the class and empty elsewhere, and two inclusions: of step 5, and the analogous inclusion in the oracle's substitution interior, which makes the oracle's sets closed under substitution (Ostar_le_Ocg, Ostar_le_Osub). The development states these as the assumptions of three nested locales over an arbitrary oracle, cohO (consistency and coherence, in IGA/IGA_Nu_thy), cohO2 (the substitution inclusion) and cohO3 (the congruence inclusion, in IGA/IGA_Nu_Sound.thy), and proves the coherence facts, the persistence of the least model's values (cohO.omv_le.omvO_Oz) and the interface (cohO3.nu_model_omega_model) once in them. is the instance (cs, cs2, cs3), and every fact above keeps its name in the locale rga. The closed-off oracle (OstarC, the least fixed point of the map that reads each body at the least fixed point of its truth operator and the greatest fixed point of its falsity operator) is a second instance, with its own proofs of the two inclusions, and its model satisfies the interface (closed_off_omega_model, in IGA_Closing/CM_Closed.thy).
B.2 The coinduction rule and the systems
The rule (nuS) has the side conditions: ; index 1 free in ; and well-formed; not free in , in , or in . Its premises are, in the proof list, , the closure premise , , , and ; its conclusion is . INGA's step relation (inga_derives) is IGA's, RGA's forty-two rules and ground induction (pr_gfix), or a coinduction step. The locale omega_model_gfix adds to the interface the ground-induction property : for with whenever , the truth of implies the truth of .
Theorem B.2 (inga_nu_sound, inga_consistent). If is derivable in INGA, is well-formed and every member of is true in , then is true in . is not derivable in INGA.
Proof.
-
Skeleton. step_M_sound is prf_mjt abstracted over the step relation (step_prf_mjt), followed by the identity substitution. Its inputs are nu_model_omega_model, well-formedness of steps (inga_wft) and step soundness (inga_step_mjt), which splits on the disjunction defining the step relation. inga_consistent is step_M_consistent with the same inputs, since is never true.
-
IGA steps (nu_model_gfix.gi_step_mjt). An IGA step is an RGA step, handled by the preceding theorem's step 1, or a ground-induction step, handled by gfix_step_mjt, written once for every model of omega_model_gfix: from the premises, has a value ; moves the -atom's truth to ; the closure premise at the substitution sending to each numeral discharges the hypothesis of ; beta and move back to . has the property (nu_omega_model_gfix) by gfix_omvO_ind_par, through the set form gfix_omvO_ind_set_par at and osemM_term. The set form is the first component of the motive of gfix_transportO_par, one rule induction on the derivations of with the five-part motive of the IGA paper's transport lemma (gflnvM), read in the numeral-set reading relative to (osemM). The five parts say: a true -atom at a numeral has (gfA); a true instance of a positive part reads true at and a false instance of a negative part reads false at (gfPM, gfNM); and the same two for a body under a applied to a numeral (gfRPM, gfRNM). The two new cases, the oracle clauses, close because a -head is none of the heads the motive inspects: it is not the head of (omhO_Ostar_det, omhO_trmGfix), not and not a -head.
-
The coinduction step (nu_step_mjt). Invert the step to obtain ; by the outer induction the three premises are valid in . Fix a well-formed satisfying , and write and for the body and the certificate with the substitution pushed under two and one binders, and . is posP-positive (posP_subf2) and in the class (nuGood_of_posP, free1_subf2). The certificate set is
(a) : well-formed because is (the premise is well-formed) and is (wsubf_img_wft); valued by the validity of (mtrue_NE); and true by the validity of (bsub_subf_commute).
(b) Region and closure obligation. The coinduction’s region is and its obligation is . Take and , a well-formed substitution; the eigenvariable is instantiated at the term itself, not at a numeral. By freshness, leaves and unchanged (subf_ext_free). satisfies the closure premise’s context: because has a value (mtrue_Nl); because its instance is ; by freshness. The closure premise’s validity at gives the truth of (bsub_asub, subf_gsub_par), the instance of at the environment that sends 0 to and 1 to .
(c) omvO_pos_neg_transport_P, an induction on posA/negA with the recursive index sent to an arbitrary term , turns that truth into .
(d) osemO_restrict, an induction on the reading, shrinks the set to . Its hypotheses: is posP-positive or negative, and is well-formed and valued below index 1 (envV; here only the point ). At an atom the argument is a numeral expression in the variables below 1, so its instance is well-formed and valued (pnexp_envV), and the truth of is the truth of (omvO_beta). The restriction is the one step that needs the narrower grammar posP rather than posA; elsewhere posP serves only to place in the class.
(e) osemO_env_off replaces by : the two differ only at index 1, which the reading never consults. So .
(f) Close. gfp_upperbound gives , so , and omvO_nu_atoml gives the truth of , which is (subf_trmNu_gen).
No value congruence enters the coinduction step: the certificate set is indexed by terms. Ground induction, by contrast, passes through a numeral and needs M_vc_arg and M_vcb.
Theorem B.3 (inga_conservative). If is derivable in INGA, is well-formed, every member of is true in the least model, and has some value in the least model, then is true in the least model.
Proof
-
omv_le_omvO_Ostar: every value in the least model is a value in . The inclusion is half of omv_omvO_Ostar, a simultaneous rule induction on the least model, with motive: if , then , or is the -head of for a of the class and ; if , then . At the head-level beta case, if is a -term of the class, the least model's head is the unfolding's -head (omh_trmNu, omh_det) and gives (omhO_nu); when the function part already sat at a -head, the body instance has no head (omhO_body_none). The value-level beta case at a -head closes by nu_head_val. The other cases use the matching clauses.
-
Theorem B.2, with the hypotheses lifted by step 1, makes c true in .
-
Step 1 also gives , and determinism of forces r = 1.
B.3 The all-zeros atom and the clash
The body is (zPhi), with the abbreviation , and (trmZ). is in the class (nuGood_zPhi) and posP-positive (posP_zPhi).
Theorem B.4 (nuZ_true, nuZ_true_valueless). For every term , is true in . Moreover , is true in , and for every and , does not have the value in the least model.
Theorem B.5 (inga_Z, inga_omega_unsound). is derivable in INGA. Hence some has derivable in INGA and is not true in the least model.
The valuelessness of the witness is the third clause of Theorem B.4; inga_omega_unsound itself states “not true”.
Proof.
-
FO_zPhi_UNIV: at every oracle, sends the set of all terms to itself. The first conjunct is true by beta at every oracle (omvO_s_eq), and every atom reads true because every argument lies in the set. By gfp_upperbound every term lies in gfp , and omvO_nu_atoml gives nuZ_true. The membership of is the inversion omvO_nu_atom_inv.
-
Valuelessness (omv_Z_valueless_gen): a rule induction on the least model with a negative motive: no term with a value is one of the four shapes , , and , with the equation . The four shapes are the unfolding of (gsub_zPhi) and its subterms. At the beta case for the head of is unique (omh_det, omh_trmNu), so the body is the unfolding, which the hypothesis excludes. The precursor and universal cases cannot match a -head. The negation cases pass to the inner shape: the outer negation to the disjunction at the same , the negated atom to . A true disjunct would make false, against omv_s_eq and uniqueness; the other disjunction cases fall to the hypothesis. In effect the induction is a well-founded descent: a value at needs a value at .
-
inga_Z: one application of the rule (ir_nu) with certificate . The premises are RGA derivations (z_prem1 to z_prem3): ; in the context , , the body with for , assembled from by conversion, by reflexivity turned into by conversion, and two double-negation introductions and a disjunction rule for the conjunction; and .
-
inga_omega_unsound: step 2 at , with step 3.
Theorem B.6 (nu_gfix_clash). Let be a step relation on proof lists, contexts and conclusions such that every RGA step is an step, is monotone in the proof list (if the proof list is a subset of , as sets, and , then ), every coinduction step is an step, and every step of ground induction at -terms (gfixNuS) is an step. Then is derivable for .
gfixNuS is the clause of pr_gfix with in place of : side conditions posP-positive, and well-formed, and the three freshness conditions; premises , , , and ; conclusion . The clause does not ask to occur in .
Proof.
-
RGA entailment embeds into -entailment (entails_step_embed).
-
for : merge the three embedded premises of step 3 of the preceding proof into one proof list (entails_merge3, using monotonicity), then one coinduction step.
-
clash_prem2, in RGA: the closure premise of ground induction at the point-free motive . Its hypothesis is the body with for , . A disjunction rule gives , double-negation elimination gives the redex, and one conversion from the redex to its reduct (ir_convE at a beta step) gives .
-
Merge step 2, step 3 and , and apply one gfixNuS step; the conclusion is .
The proof uses no model: a build-time check confirms that no name among its transitive dependencies contains one of the strings omv, omh, Ostar, nu_model, mjt and mtrue, the names of the two models' relations and of their soundness facts.
B.4 A body read at both fixed points
These three results concern the least model and the operators (gfixOp) and (gfixFOp) of Theorem 3.1, on sets of numbers; no oracle is involved. The readings consult an atom at a literal numeral: reads , with not occurring in , true when with (os_app), and reads such an atom false when with (fs_app). Both operators are monotone for every body (gfixOp_mono, gfixFOp_mono).
Theorem B.7 (gfix_omv_false_eq_lfp, gfp_lfp_disjoint). If is pos-positive at index 1 and is closed, then is false in the least model} = lfp . For every term , gfp .
Theorem B.8 (gfp_eq_compl_iff). For every term , gfp if and only if every lies in or in lfp .
Proof
-
Falsity set, one inclusion (lfp_gfix_omv_false). By lfp_lowerbound it suffices that the falsity set false} is closed under (fsem_gfix_omv): fsem_term, at the predicate term , gives the falsity of , and the value-level beta clause with omh_trmGfix folds that falsity back to .
-
The other inclusion (gfix_omv_false_lfp) applies gfix_omv_false_ind_set with , whose closure hypothesis is the fixed-point equation (gfixFOp_lfp). gfix_omv_false_ind_set is the falsity half of a transport lemma (gfix_false_transport), a rule induction on the least model with a combined motive: false instances of lie in X, positive bodies read false, negative bodies read true, and the two quantifier-instance redexes likewise. Positivity and closedness are used there.
-
Disjointness. Write . By lfp_lowerbound it suffices that is closed under . An in would satisfy, by gfp_fixpoint, both the truth reading at and the falsity reading at . osem_fsem_excl, an induction on the truth reading at disjoint sets, refutes the pair: at a leaf the falsity reading gives the opposite value (fsem_nf_only), against uniqueness; at an atom the numeral would lie in both sets (fsem_app_F, num_trm_eq_iff); at a connective the inversions of the falsity reading apply. No positivity is used.
-
Complement, left to right. With , the equation turns gfp_fixpoint into , so every is in or in .
-
Right to left. The hypothesis says , a post-fixed point, so gfp_upperbound gives gfp , and step 3 gives the converse inclusion.
The oracle form of step 3, gfpO_lfpO_disjoint, is step 3(b) of the proof of Theorem B.1; the oracle form needs a consistent oracle, because its leaf case uses determinism of the oracle model.
Head steps never turn a -atom into a -atom. nu_hsteps_not_gfix (OIGA/GNu.thy): for a body shaped as a formula (fshape; every body of the class is, nuGood_fshape), no term reachable from by head steps has the form . The orbit of the atom (nuOrbit) has five shapes, the atom, the three unfolding stages and the body instance, and is closed under head steps by inversion (hstep_trmNu_inv, hstep_app_spine_inv, hstep_beta_inv); in the instance case the formula shape leaves either a connective, which takes no step, or , back in the orbit; induction on the reflexive transitive closure and a shape check finish it. The shape condition is needed: the body that is itself a closed -atom applied to the point reaches in four steps (nu_hsteps_gfix_unshaped).
Lemmas a re-mechanization needs.
-
nu_step1-nu_step4, trmNu_neq_trmGfix: the -former unfolds in four head steps and differs from every -atom.
-
omhO_trmNu_inv, omvO_nu_atom_inv, omvO_nu_atoml: a -atom of the class takes values through the oracle alone.
-
omhO_det_excl, osemO_fsemO_excl, ocons_Ostar: determinism at a consistent oracle; is consistent.
-
osemO_term, omvO_pos_neg_transport, nu_coherent_T, nu_coherent_F, nu_head_val: a -atom has the value of its unfolding.
-
omO_hstep_sim, omO_hstep_rev: head steps preserve values in both directions, heads up to heqN.
-
omO_vcr_transport, Ocg_gfp_cong, Ocg_prefix, omvO_vcr_ex: the value congruence of , through the congruence interior.
-
nu_model_iff_vc, step_prf_mjt, step_M_sound: the interface reduced to two facts; soundness from step soundness.
-
gfix_transportO_par, gfix_step_mjt: ground induction is sound for .
-
omvO_pos_neg_transport_P, osemO_restrict, osemO_env_off, nu_step_mjt: the coinduction step.
-
omv_omvO_Ostar: the least model lies below .
-
FO_zPhi_UNIV, omv_Z_valueless_gen, clash_prem2: the all-zeros atom and the clash.
-
fsem_gfix_omv, gfix_omv_false_ind_set, osem_fsem_excl: the least model's falsity set; the two readings exclude each other at disjoint sets.
C The dichotomy
Files: IGA/IGA_Dich.thy (the dual, the premise, the swap identity, the characterization of validity (Theorem 5.2), the rule and its step soundness, accessibility never false), OIGA/GDich.thy (the calculi with the dichotomy, the system oinga_dich, whose entailment equals DINGA's, the price theorem, the accessibility instances), OIGA/GDich2.thy (exclusion, the decided -atom, the premise of the body), OIGA/GDcmp.thy (totality of the decompiler, Dec()), IGA_Closing/CO_Links.thy (ATI from the dichotomy), IGA_Closing/CO_Check.thy (the proof checker of oinga_dich) and IGA_Closing/CO_Dinga.thy (DINGA, the equality dinga_eq_oingad, the re-exports). The results about are classical theorems in the locale rga; the derivations are in the abstract calculi named with each theorem.
Definitions. The dual (ndual) is an inductive relation with five clauses: a term in which index does not occur is its own dual; the dual of , with a numeral expression in the variables below (pnexp), is ; and the dual commutes with disjunction, negation and the universal (one index deeper). The relation is functional (ndual_fun); a dual exists for every posP-positive or negative term (ndual_exists); the dual of a positive term is negative and conversely (ndual_polar), so if is the dual of a positive then is positive (ndual_posP) and, when index 1 occurs in , in the class (ndual_nuGood); and the dual commutes with substitution for parameters (ndual_subf2). For a body with dual , the -body is and the two atoms of the rule are and .
The decidedness premise (nfdec) is an inductive relation with five clauses. If does not occur in , then is the universal closure, over the indices below , of B, where is with the absent index removed (lowr; the parameters stay free). For a recursive atom with a numeral-expression argument, is . For a disjunction, is the conjunction of a premise of each disjunct; for a negation, a premise of its argument; for a universal, a premise of its body one index deeper. The relation is not functional: at a compound part in which does not occur, the first clause and a structural clause both apply, and the rule accepts any premise so obtained. A premise exists for every positive body (nfdec_exists). For the accessibility body one premise is Dec (nfdec_accPhi).
The rule (dichS) has the side conditions posP-positive at 1, index 1 free in , the dual of , a premise of , well-formed; its premises are and ; its conclusion is . There is no eigenvariable, and parameters are allowed. The rule is valid at and (dichValid) when, for every well-formed and well-formed such that is valid in , is valid in . The premise does not occur in validity.
Three operators on sets of numbers, relative to , carry the proofs. For a -body , and (FN, GN), where is the set of numerals of members of . For a -body , (gfixOpM), where sends 0 to , 1 to and to , so that it differs from only at index 1, and the reading takes non-recursive leaves from and reads an atom true when its argument's instance is a numeral with . The three operators are those of Theorem 3.1, the truth and falsity operators of a body, with the least model replaced by .
C.1 The swap identity
Theorem C.1 (swap_identity). Let be the dual of at index 1, with and posP-positive at 1 and in the class. Then for every : is true in if and only if is false in .
The swap identity is Theorem 5.1; the hypothesis that index 1 occurs in is not needed, since membership of in the class already implies that index 1 occurs (ndual_free).
Proof
-
The -side is a least fixed point in (gfix_omvO_eq_lfp): for posP-positive, true in = lfp . One inclusion (lfp_gfix_omvO) is lfp_lowerbound: the truth set is closed under , because osemM_term turns a reading at the truth set into the truth of , and one backward beta step at the head of (omhO_trmGfix) gives . The other inclusion (gfix_omvO_lfp) is the ground-induction property of , gfix_omvO_ind_set_par, at , whose closure hypothesis is the fixed-point equation (gfixOpM_lfp). The ground-induction property is the one place positivity of enters.
-
The swap lemma (ndual_swap): if is the dual of at , then for every , and , iff . Induction on the dual, with and arbitrary. At a part without index both sides are the value of in . At an atom with true: the falsity reading of is true iff the atom reads false, iff , iff the atom is true (fsemO_app_F, osemM_app_T). At an atom with false neither side holds, since the falsity reading has no true atoms and no false ones (fsemO_app_T_none, osemM_app_F_none). Disjunction, negation and the universal follow from the inversion lemmas of both readings and the induction hypotheses. The lemma needs no positivity and no condition on .
-
Numeral restriction (nrestrict_T, nrestrict_F): for in the class and posP-positive, the numerals in are gfp and those in are lfp . The engine is osemO_restrict_num and fsemO_restrict_num: at an environment that is numeral below the recursive index (envN), a reading of a term of the positive or negative grammar at a set transfers to any containing the numerals of , because every atom argument is then a numeral expression and evaluates to a numeral (pnexp_envN). For falsity, forward: the set of terms such that implies is closed under (restrict, then use the fixed point), so lies inside that set; backward: is closed under (GO_mono2). Truth is the analog with gfp_upperbound.
-
The operators coincide (GN_dual): . At a point : iff reads false at , iff reads true there (fsemO_not_F_any), iff reads true in there (step 2), iff reads true at (osemM_env_off: the two environments differ only at index 1, which the reading never consults), iff .
-
Assembly. By step 4 the two least fixed points agree. By step 1 and step 3, is true iff , iff is false (omvO_nu_atoml, omvO_nu_atom_inv).
C.2 The characterization of validity and the step soundness of the rule
Theorem C.2 (thmC). Let be posP-positive at 1, with index 1 free in , and its dual. The rule is valid at and if and only if, for every well-formed substitution and every , the atom has a value in , where is with applied to its parameters (the substitution pushed under two binders, subf_lift).
The substitutions range over all well-formed ones, closing or not; the identity substitution is one of them.
Theorem C.3 (dich_step_mjt). Suppose the conclusion comes from one dichotomy step whose premises are judgments of the proof list ; every judgment in with well-formed is valid in ; every judgment in has well-formed; and is well-formed. Then is valid in .
Together the characterization and the step soundness are Theorem 5.2. The step soundness assumes nothing about the body: the premise does the work.
Shared lemmas
-
Instances (dich_inst): at every , is posP-positive (posP_subf2), is its dual (ndual_subf2), , and is posP-positive and in the class (ndual_posP, nuGood_of_posP, free1_subf2, ndual_free).
-
Swap at instances (dich_swap_inst): by Theorem C.1 at the instance pair, for every and , is true iff is false.
-
Substitution into the conclusion (dich_concl_inst): applied to is (subf_trmGfix, subf_trmNu_gen).
-
The disjunction at a valued term (disj_at_term). Suppose that has a value for every , that is true iff is false for every , and that is well-formed with value . Then is true in . The numeral and are congruent (ovcrO_swap). If is true, the value congruence (ovcrO_appl, omvO_vcr_ex) moves the truth to ; if false, the swap makes true and the congruence moves that truth to . A disjunction clause closes either case.
Proof of Theorem C.2, left to right
-
Assume validity; fix a well-formed and . is valid, since has a value.
-
Validity at and makes valid, so its instance at is true; by shared lemma 3, and since leaves the closed numeral alone, that instance is .
-
Invert the disjunction (omvO_or_inv). If the -disjunct is true, shared lemma 2 makes the -atom false; otherwise the -atom is true. Either way the -atom has a value. The swap at every instance needs ndual_subf2.
Proof of Theorem C.2, right to left. Fix a well-formed , a well-formed with valid, and a well-formed satisfying . Then has a value (mtrue_NE) and is well-formed (wsubf_img_wft); shared lemma 4 with the assumption at , shared lemma 2 and shared lemma 3 gives the truth of the conclusion's instance. The premise is not involved.
Proof of Theorem C.3. The step replaces the assumption of the right-to-left direction by a consequence of the premise, bivalence of the -atom at every instance that satisfies the context.
-
The leaf condition (leafdec): an inductive relation over the grammar, relative to a substitution , whose leaf clause says that does not occur in and that, for every , has a value in at the environment sending to , to and to (penv).
-
The premise gives the leaf condition (nfdec_leafdec): if is a premise of at and is true, then satisfies the leaf condition at . Induction on the premise relation. At the leaf clause the truth of the iterated universal (allqN_true_iff, an induction on ) gives the truth of at every numeral assignment of the quantified indices; that environment agrees with penv on the free variables of (envq_lowr); and is true iff has a value (omvO_typeB_true). At an atom the condition is immediate. A true conjunction gives both conjuncts (omvO_and_true); negation and the universal pass the hypothesis through.
-
The dual keeps the leaf condition (ndual_leafdec), by induction on the dual. For a compound part, split on whether k occurs: if not, the dual is the part itself (ndual_nfree_id); if so, only the structural clause of the leaf condition applies, and the induction hypotheses finish. This split settles the overlap of the dual's first clause with its structural clauses.
-
From the leaf condition to determinacy (leafdec_dposE). The determinacy grammar at an environment (dposE, dnegE) admits a leaf when every environment that agrees with above and is numeral below gives the leaf a value (nvalE), admits recursive atoms with numeral-expression arguments as positive, and follows the grammar elsewhere, asking for a universal's body at every numeral extension of . If satisfies the leaf condition at and sends each index to , the parameter that index names (idAbove), a positive (negative) has its instance at in the positive (negative) half. Induction on the leaf condition with arbitrary; at a leaf, every admissible environment composed with the instance is a penv instance of (inst_leaf).
-
dich_premise_dposE: from the validity of , a well-formed satisfying makes true (mjtD); steps 2 and 3 give the leaf condition for and for ; step 4 at the environments (idAbove_nuenv) puts the instance in the positive half at every point.
-
Determinacy gives the union (dposE_det, dposE_gdetM, gdetM_union). By mutual induction on the determinacy grammar, at an environment numeral below : a positive part reads true at or reads false at the numerals of the complement of , and a negative part the reverse. A leaf has a value, true or false; an atom's argument is a numeral (pnexp_envN), and classically or not; the universal splits classically on whether every numeral instance reads true, otherwise the failing instance reads false. At the environments of the determinacy says: for every and , or . Let . For , the instance at gives , since ; so is a post-fixed point of , and gfp_upperbound gives gfp . Only this inclusion is used.
-
Bivalence (thmC_rhs_forms, dich_premise_bivalent): by step 3 of the proof of Theorem C.1, the union says that every numeral lies in , so the -atom of has a value at every numeral.
-
The step at a body (dich_valid_at): from the validity of and and a well-formed , the right-to-left proof of Theorem C.2 applies at each satisfying , with step 7 in place of the assumption.
-
The theorem. Invert the step; well-formedness of the recorded judgment gives a well-formed ; the hypothesis on makes and valid; step 8 concludes.
The premise is a sufficient condition for bivalence: the rule is valid at a body whenever the premise is valid in every well-formed context (dich_valid_of_premise), and the step uses neither Theorem C.2 nor validity. The controls are dichA_valid, the valid accessibility body at the relation (flipD), and dichB_invalid, the invalid body , whose premise is true at no substitution (botD_never_true).
C.3 The system and its price
DINGA is the locale dinga (theory IGA_Closing/CO_Dinga.thy); its step relation (dinga_derives) is RGA's step, a ground-induction step, a coinduction step or a dichotomy step, with no ATI rule, and dinga_ent is its entailment. ATI is derived (dinga_ir_allTI), by Theorem 5.3 (g_ati_of_dich, in gcalc_gfix_dich, with the sublocale edge gcalc_gfix_dich ⊆ gcalc_ati, in IGA_Closing/CO_Links.thy). The system oinga_dich, whose step relation (oingad_derives) is OINGA's or a dichotomy step, so that ATI is primitive there, has the same entailment (dinga_eq_oingad; the inclusion oingad_le_dinga runs through g_ati_of_dich). The system-level results below are proved for oinga_dich and re-exported at DINGA through the equality under dinga_ names, and DINGA's own step decider is primitive recursive without an ATI detector (n2pr_dinga_derives). The results of the examples in OIGA_Coind keep their oingad_ names (that session is not an ancestor of IGA_Closing); they are restated at DINGA by name in the junction theory CD_Junction (session Coind_Dinga), which sees both sessions: every result proved in an abstract calculus oingad_X as dinga.dinga_X, with a build-time check that each restatement agrees with its original, and the system-level facts the paper cites (dinga_stepmother_not_refuted, dinga_R1p_not_acc, dinga_aoTw_not_acc, dinga_trUp_dich_premise_not derivable, dinga_trUp_dich_premise_neg_not derivable, dinga_tr_dich_prem_open, dinga_tr_dich_unavailable). The same theory proves OINGA's derivability recursively enumerable (oinga_entails_re) and oinga_not_cert_sound.
The accessibility body has the dual (psiAcc, ndual_accPhi), and Path (trmPath, pathPhi).
Theorem C.4 (dinga_dich_price, oinga_dich_price). In DINGA: (i) if , is well-formed and every member of is true in , then is true in ; (ii) is not derivable; (iii) for every , and , from and , ; (iv) for every well-formed , and every and , from and , ; (v) if , is well-formed, every member of is true in the least model, and has some value in the least model, then is true in the least model; (vi) some has and is not true in the least model.
Clause (iii) has no well-formedness hypothesis on . The witness of clause (vi), , has no value in the least model by Theorem B.4.
Proof. dinga_dich_price takes clauses (i), (ii), (v) and (vi) from the corresponding oingad_facts through the two inclusions of dinga_eq_oingad (dinga_nu_sound, dinga_consistent, dinga_conservative, dinga_omega_unsound), and (iii) and (iv) directly (dinga_acc_or_path, dinga_dec_path). The clauses for oinga_dich:
-
(i): oingad_nu_sound, the skeleton step_M_sound at with oingad_wft and the step soundness oingad_step_mjt, which sends an OINGA step to oinga_step_mjt and a dichotomy step to Theorem C.3. (ii): oingad_consistent, by step_M_consistent.
-
(iii): g_acc_or_path, proved in gcalc_dich and available through the sublocale oinga_dich ⊆ gcalc_ag_nu_dich. Well-formedness of follows from ; the premise is a conjunction introduction; one dichotomy step at the accessibility body concludes.
-
(iv): g_dec_path, in gcalc_gfix_dich, is the proof of Theorem C.6 below at the accessibility body, with g_acc_not_path (in gcalc_gfix) for exclusion: transfinite induction at the proved accessibility (gi_Tl_par) with motive , whose step is a double-negation introduction followed by folding the -atom under negation, four backward head steps (g_nu_fold_neg).
-
(v): oingad_conservative, as for Theorem B.3: lift the hypotheses and the value r to (omv_le_omvO_Ostar), apply (i), and use determinism.
-
(vi): oingad_omega_unsound, with the derivation of embedded from OINGA (oingad_Z) and Theorem B.4.
C.4 Exclusion and the decided -atom
Theorem C.5 (g_mu_not_nu). In gcalc_gfix: if is posP-positive at 1, is its dual, is well-formed, and , then .
Theorem C.6 (g_dec_nu). In gcalc_gfix_dich: if is posP-positive at 1, index 1 is free in , is its dual, is a premise of , is well-formed, , and is well-formed, then B.
Exclusion and the decided -atom are Theorem 5.7. Exclusion assumes neither that index 1 occurs, nor any decidedness, nor any model.
Proof of Theorem C.5
- The dual induction (g_ndual_beta_env, in gcalc). Fix a well-formed and let . Claim, by induction on the dual of at : for every well-formed and every substitution of well-formed terms with , (a) implies , and (b) implies . The plain and negated statements travel together, so no polarity is needed.
(a) Without index k: the two substitutions agree on t.
(b) Atom : with , which the update does not change, , one beta step from ; (a) by ir_convE, (b) by ir_conv_negE.
(c) Disjunction and negation: the elimination and introduction rules of each connective, with hypothesis (a) or (b) as the polarity requires; a negation's (a) uses its argument's (b).
(d) Universal: (a) by introduction at a fresh eigenvariable (rp_all): instantiate at , apply hypothesis (a) at the substitution extended by (index still sent to ), and fold back; (b) by rp_not_allE at a refuted instance, hypothesis (b), one beta step under negation, and ir_not_all.
-
Bodyform (g_ndual_beta): from , , by step 1(a) at the environment sending 0 to and 1 to .
-
The ground induction. Let and the motive at the point ; then at . Choose fresh for , and , and let be , , . Closure obligation: . In , step 2 gives ; double-negation introduction gives ; folding under negation (g_nu_fold_neg) gives , which is . Ground induction (ir_gfix_par) with and gives . The -atom is folded, never unfolded: the substance lies in the dual induction of step 1.
Proof of Theorem C.6
-
The dichotomy (ir_dich) gives with and .
-
Eliminate the disjunction. In the branch , Theorem C.5 in the context gives ; in the branch the hypothesis serves; a disjunction introduction gives in both branches, and ir_bool gives .
C.5 Decidedness of O
(trmO, oPhi) has seven clauses, three for membership (zero, successor and limit codes) and four for the order. The limit clause reads the decoded sequence through the graph atom (oGr), where dc is the decompiler of index trees (dcmp, a general fixed point) and lock the locked reader (lockT): is the first nonzero value of for , and 0 if there is none. is posP-positive, mentions (posP_oPhi, free1_oPhi), and lies in the arithmetic class okP (okP_oPhi): its non-recursive parts are built by equations, disjunction, negation and universals from terms built by variables, numerals, successor, pairing and (okT, okF).
Theorem C.7 (dcmp_total). In RGA: from , and , , in every context.
Theorem C.8 (g_dec_O, g_O_not_coO). In gcalc_ag_dich: if is the dual of , is well-formed and , then and . B. In gcalc_gfix: if is the dual of , is well-formed, and , then .
The decidedness of is Theorem 7.13, with ; a dual exists (oPhi_dual_premise_ex).
Proof of Theorem C.7
-
with the closed motive (). Course-of-values induction (ir_cov_ind_acc, derived from number induction over the accumulator “dt holds below ”) reduces the goal to: from and the accumulator, derive ; by it suffices to derive at fresh numbers ().
-
. The induction hypothesis gives totality at every (acc_descent_strict). Split into the four initial codes, at which the decompiler returns a total compiled initial function (), and (). At the children’s codes are numbers at most , hence below (, , , ), and the parity of chooses the node (). At a composition node () three applications of the hypothesis give totality. At a recursion node () the result is a recursion term , total by number induction on the recursion argument (), with base and step from the hypothesis.
-
The theorem instantiated at and the universals at (). carries the theorem to every calculus.
Proof of Theorem C.8
-
The reader is total (g_lock_total, in gcalc): from Theorem C.7 and numbers , the locked reader’s loop is a number by number induction on the step count (g_lockK_N), and head-reduces to that loop (lockT_unf).
-
The premise is derivable (g_nfdec_ok, in gcalc_ati): given the reader’s totality, if is a premise of at , lies in okP at and every free variable of is at most , then for every well-formed . Induction on the premise relation. At the leaf clause, is in okF, and (an induction on by universal introduction) reduces the goal to at every assignment of numbers to the quantified indices. , an induction on okF, decides that formula: an equation between okT terms is decided because both sides are numbers (g_okT_N, an induction on okT whose reader case is step 1, and ir_eqTl); disjunction and negation by ir_orTl and ir_negTl; a universal by deciding its body at a fresh number and then ATI (ir_allTl). ATI enters only there; in the universals so decided include the existential over the step count in the graph atom. At an atom the premise is reflexivity; a conjunction takes both hypotheses; negation and the universal pass through. instantiated at (okP_oPhi, oPhi_free_le).
-
Assembly (g_dec_O_total, g_dec_O_of_dcmp_total): obtain a premise (nfdec_exists); step 2 derives it; one dichotomy step at (g_dec_O_cond) gives the disjunction, and Theorem C.6 gives the decidedness.
-
g_O_not_coO is Theorem C.5 at , with no premise, no ATI and no dichotomy.
C.6 Accessibility is never false
Theorem C.9 (accO_false_empty, oingad_acc_not_refuted, dinga_acc_not_refuted). If is closed, then for every term , does not have the value 0 in . If is closed, then for every , is not derivable in DINGA.
Neither statement assumes decidedness of or well-formedness of or ; the underivability is for DINGA at the empty context.
Proof
-
Shapes. Write for the body at the point under the binder (accBody). The invariant accInvOF says: if has the value 0, then is none of (S1) , (S2) , (S3) , (S4) . For closed , the head of in every oracle model is the -head whose body, at the 's variable , is (omhO_trmAcc).
-
accO_false_inv: every derivation of satisfies the invariant. Mutual rule induction on the oracle model, with the trivial motive for heads. The cases with value 0:
(a) False disjunction: in shape (S3) the right disjunct is shape (S4), excluded by the hypothesis.
(b) Beta, with at a -head: (S1) would make , which has no -head (omhO_A_inv); in (S2) the head body is (omhO_lam_inv) and the reduct is (S3) (bsub_accBody); in (S4) determinism of heads in with omhO_trmAcc makes the reduct (S1) (acc_beta2). The hypothesis excludes each of these shapes.
(c) False universal: in (S1) the refuted instance is (S2).
(d) Recursor clauses and the false oracle reading: the head is a precursor head or a -head, so no shape matches. The false oracle clause (omvO_nuF), the only value-0 clause specific to , is discharged the same way: a -head is the head of no shape.
accO_false_empty is the invariant at shape (S4).
- oingad_acc_not_refuted: a derivation of would make true in by Theorem C.4(i), so would have the value 0 (omvO_not_inv), against step 2. dinga_acc_not_refuted is the same statement at DINGA, through dinga_eq_oingad.
C.7 The dichotomy is not valid for the least model
Files: OIGA/GDich.thy (context rga). The least model reads the -former by its unfolding, so a -application is true there only through a finite derivation, which puts the point into the least fixed point of the body's truth operator.
Theorem C.10 (nu_omv_le_lfp, dich_not_omega_valid; classical). (i) For a positive body with closed, if is true in the least model then (and is true as well). (ii) For a closed well-formed order with accRelN not well-founded, the dual of the accessibility body and any premise of that body that is valid in the least model: it is not the case that, for every well-formed context and well-formed with and true under every substitution satisfying , the conclusion is true as well. The variant dich_not_omega_valid_decRel takes the premise derived in RGA instead of valid.
-
Transport at a head. hfix_transport replays the transport lemma of the IGA paper's soundness case with the hypothesis “T is the -term” replaced by “T reaches the head form with body ” (omh); the original proof used T only through that head fact. omh_trmNu supplies the head fact for .
-
The closure condition. osem_upd_rec: the oracle reading never consults the environment at the recursive index, so the closure condition at is the one for . Induction on the derivation of the value then gives (i) (nu_omv_ind_set, nu_omv_le_lfp).
-
Path is nowhere true. pathPhi_gfixOp_empty: the least fixed point of the path body's truth operator is empty, so Path_R · is never true in the least model (path_omv_never_true); hence the disjunction is true exactly where Acc_R is, and . Acc_R · true is equivalent to well-foundedness (acc_or_path_omega_iff_wf, from accbiv_omega_sound_iff_wf).
-
The rule-validity form. Instantiate at the empty context and at a numeral where fails (acc_or_path_omega_not_wf); ndual_fun identifies with the dual the rule builds. For the variant, rga_sound_oomjt turns the RGA derivation of the premise into its validity.
Lemmas a re-mechanization needs
• ndual_fun, ndual_exists, ndual_posP, ndual_subf2: the dual is functional, exists in the grammar, is positive under negation and commutes with substitution.
• gfix_omvO_eq_lfp: the -atom's truth set in is lfp .
• ndual_swap, GN_dual: the falsity reading of the dual is the truth reading of the body, so .
• nrestrict_T, nrestrict_F: on numerals the oracle's sets are the fixed points of the numeral operators.
• disj_at_term: bivalence and the swap give the disjunction at any valued term.
• nfdec_leafdec, ndual_leafdec, leafdec_dposE: a true premise puts the -body's instances in the determinacy grammar.
• dposE_det, gdetM_union, dich_premise_bivalent: determinacy gives bivalence of the -atom.
• dich_valid_at, oingad_step_mjt: the step, and the system's step soundness.
• g_acc_not_path, g_nu_fold_neg: accessibility excludes a path; a -atom folds under negation.
• g_ndual_beta_env: the dual induction under a negated predicate.
• dct_core, ir_cov_ind_acc: totality of the decompiler by course-of-values induction.
• g_lock_total, g_okF_B, g_nfdec_ok: the premise of the O body, with ATI at the universals.
• omhO_trmAcc, accO_false_inv: the four-shape invariant for accessibility in .
D Streams, runs and branches
Files: OIGA_Coind/GStream.thy (prefix sets, the round trip, the prefix tree, runs), OIGA_Coind/GBranch.thy (the run from a path and the branch), OGA/OGA_Coind_Kit.thy (runs, the child relation, the replay, the decomposition fb_surj), OGA/OGA_Koenig_FB.thy (sequence codes), OGA/OGA_Shell.thy (membership, the search combinator, srch_from_ex), OIGA/GShell.thy (the search lemma mu_choice), OIGA/GDich.thy (the dichotomy at the accessibility body, the decided path atom, the negative fold), OIGA/GNu.thy (the unfolding) and OIGA/GPar.thy (ground induction with parameters).
Definitions: sequence codes and prefix sets. A finite sequence is coded as a number. The empty sequence is 1; appending to gives with Cantor pairing (fbSnoc). The parent, the last element and the -fold parent of a code are compiled primitive recursive functions, written par, last and drop (fbPar, fbLast, fbDrop), and a code has length when . The code 0 is junk: its parent and every drop of it are 0, so it has no length (len_zero_absurd). A code of length is the parent with the last element appended (fb_surj). For a stream , the prefix function (pfx) is defined by primitive recursion from 1: and (pfx_0, pfx_S; their premise is the totality of the recursion's step function, which follows from Tot at a well-formed context, pfxStep_Tot2; pfx_S also assumes Tot ). The prefix set (pset) is . For a set term abbreviates (Mem). A set term is a branch, written Branch() (fbBranch), when five conditions hold, as one conjunction: Dec ; weak prefix closure (fbPrefClosedS), that every drop of a member is 0 or a member; a node at every length (fbInfTree), that for every some member has length ; linearity (fbLin), that two members of the same length are equal; and codes only (fbSeqs), that every member has a length. The stream recovered from (spr) is , where is the search combinator at the matrix “ is a member of of length ” (sprPhi, muF): it returns the least number satisfying the matrix, searching from 0.
Definitions: trees, runs and the replay. The child relation of a set (fbTreeRel) is ; only the child is required to be a member. is the -atom of . A run of , written (stRun), is , in the orientation of the accessibility body; the image of (stImg) is ; and every (stEvery) is . The replay (gPath) at a relation and a set iterates one search step from a start by primitive recursion: the step at (gStepBody) is, if , the least with , and otherwise 0. Progress (gProg) is . For a branch term : is (fbPathIn); is (fbPathExt); is has length (fbPathLen).
Theorem D.1 (g_RT_s, g_RT_p; grounded). In the calculus gcalc_ati, with well-formed: (i) if , then ; (ii) if , then . The companion g_pset_Branch, in gcalc_ati: if , then .
Proof of Theorem D.1. The prefix-function kit is proved in RGA and carried into every calculus by cut: pfx_s is total; the parent of pfx_s is pfx_s (pfx_par_S); pfx_s has length n (pfx_len, number induction on n with motive “pfx_s has length i”); and that length is unique (g_pfx_len_uniq: if pfx_s has length m then m = n, by number induction on n with motive “for every m, pfx_s does not have length m, or m = n”).
-
The prefix set is decided (g_pset_Dec). It suffices, at every number of every extension, that is decided (g_Dec_laml). At a fresh number variable , the equation is decided, both sides being numbers, and so is its negation; ATI in its open form (ir_allTI_open) decides , and its negation is the existential. This lemma is the only place where the theorem applies ATI; clause (ii) calls the lemma again in step 8.
-
The branch conditions (g_pset_Branch). Decided: step 1. Weak prefix closure (g_pset_PrefClosedS): split on the membership of , decided by step 1; a member is ; for a drop count , split or ; the drop is , a member (g_pfx_drop_le), or 0 (g_pfx_drop_gt). A node at every length: . Linearity (g_pset_Lin): four decided case splits, on the membership of and of (step 1) and on the two length equations; in the remaining case and both have length , so uniqueness gives . Codes only: split on membership (step 1); a member has length .
-
The search premises (g_spr_premises). From Dec p and a node at every length, at a fresh number variable n: the matrix “member of length ” is decided, from Dec p and the decidedness of equality; and it has a witness, the instance at of “a node at every length”.
-
The search (mu_choice). From the two premises of step 3: Tot , equals the search value, the result of the least-number search from 0 at the matrix for (srchK), and the search value satisfies the matrix; g_mu_choice_all packages the last clause as is a member of of length . The lemma is stated in gcalc, the base calculus: its content is RGA's srch_from_ex (a decided matrix with a witness makes the search from 0 a number satisfying the matrix), whose two clauses the calculus cuts in directly by g_via2. No ATI step occurs in that derivation, and no minimality of the search value is used anywhere in the theorem: uniqueness comes from g_pfx_len_uniq and from linearity.
-
Clause (i). Fix and let . Step 4 at , with step 1 for decidedness and (a node at every length) for the witness, makes a member of length , so for some (), and uniqueness of length gives . Then , whose last element is ; one beta step (spr_beta) turns into last(c).
-
The bridge (g_RTp_bridge). Assume the branch conditions of and write . Then . The code has length , so (fb_surj); has length and is a member by weak prefix closure (the junk case is excluded by the length); is a member of length ; and linearity identifies with (g_fbLinE).
-
The prefixes of the recovered stream (g_RTp_pfx). pfx_spr_p · (k + 1) = M · k, by number induction on k with motive “pfx_spr_p · (i + 1) = M · i”. Base: M · 0 has length 1, so it is 1~last(M · 0), which is pfx_spr_p · 1. Step (g_RTp_step): unfold pfx once, rewrite with the hypothesis and spr_beta, and close with step 6.
-
First inclusion (g_RTp_sub). At a number , split on , which is decided by step 1 at the total stream (g_spr_Tot); this case split spends ATI. A member is ; if it is 1, the drop of by one, a member by weak prefix closure; if it is by step 7, a member by step 4.
-
Second inclusion (g_RTp_sup). Split on , decided by Dec (no ATI). A member has some length (codes only). If , . If , and are members of the same length, so .
-
Clause (ii). Universal introduction, the branch conditions unpacked (g_fbBranchE), and the conjunction of steps 8 and 9.
The stronger prefix closure of the OGA development (fbPrefClosed, every drop a member) fails at every prefix set: the drop of the root 1 is the junk code 0 (g_pset_not_fbPrefClosed). This is why a branch is defined with the weak form.
Theorem D.2 (g_pset_path, g_path_pset_iff; grounded). Let be well-formed, , and write . (i) In : if and , then . (ii) In : if , and , then .
Proof of Theorem D.2
-
Coinduction at a certificate set (g_path_coind, in gcalc_nu). For a set term and a relation : from , , and the closure obligation “at every not free in , , , ”, conclude . This lemma is one application of the coinduction rule at the body of , with certificate and an eigenvariable fresh for , and the body at once.
-
Clause (i). Step 1 at and . The region is the prefix set. Closure: from , eliminate the existential, ; the child is in and its parent is (g_pfx_par_S), so (g_TR_l), and g_path_child_intro introduces the existential of the body.
-
Forward half, no rule (g_path_pset, in gcalc). Unfold Path once (g_nu_unfold) and eliminate the existential: some with . Then g_TR_child_pset: a code with a length whose child is in is itself in . The child is pfx; if the child is 1, so , its parent, is the junk code 0, which has no length, against the hypothesis on ; if , then (g_pfx_par_S).
-
Non-members have no infinite branch (g_not_pset_not_path, in gcalc_ati). If , then for every the atom is decided (g_TR_B, from Dec of step 1 of the proof of Theorem D.1, which spends ATI); in the positive case g_TR_child_pset puts in , a contradiction. So , and the negative fold (g_nu_fold_neg) gives .
-
Clause (ii). is decided (step 1 of Theorem D.1). For the left conjunct, split on : the negative case gives Path by step 4, the positive case the right disjunct. For the right conjunct, implication introduction at the decided antecedent (ir_impl_bool) with clause (i). The same case split, producing Path Path, gives the decided form g_path_pset_dec.
The interderivability form (g_path_pset_hol_iff, in gcalc_nu) is steps 2 and 3 as a statement about derivability: if and only if , at a code with a length. Its check forbids ATI and the dichotomy.
Theorem D.3 (g_run_acc, g_run_path; grounded). Let be well-formed, a well-formed term and . (i) In : if and , then . (ii) In : if , then .
Proof of Theorem D.3
-
Clause (i): the motive. , with the stream as a parameter (its instances are rewritten by bsub_runMotive).
-
Ground induction along Acc_R with parameters (gi_Tl_par, one application of ir_gfix_par at the accessibility body, the eigenvariable fresh for the context, the motive and R). The closure obligation: in every extension and at every number z, from derive .
-
The closure. Fix ; is decided, being a number. If , the run gives , hence by transport (g_app_transport0); the hypothesis at gives , whose instance at is , against reflexivity. Otherwise is the case hypothesis itself. The rule then yields .
-
Clause (ii) (g_run_path). Step 1 of the proof of Theorem D.2 at Q the image of s, which is the coinduction's region. Start: is in the image (g_img_mem). Closure: from (g_img_memE), the state is in the image and by the run and transport; g_path_child_intro concludes. One coinduction step.
Theorem D.4 (g_run_of_path; grounded). In gcalc_gfix_dich: if is well-formed, (as a relation), and , then, writing for the replay at , and start : , , and .
Proof of Theorem D.4
-
The replay, in RGA (gpb_run_of_progress, carried into every calculus as g_run_of_progress). From Dec C (as a relation), Dec Q, progress, a N and Q(a): the replay is total, starts at a, is a C-run and stays in Q. The search matrix “C(y, x) Q(y)” is decided (gq_Dec); at the step equals the search value, which is a number, a C-child of x and in Q (gpb_search, by srch_from_ex on the existential that progress supplies); the invariant holds by number induction on n with motive “ ” (gpb_inv); and the edge follows from the recursion equation, the invariant and the search (gpb_ext). The check forbids all four rules under the replay.
-
Path is decided (g_Dec_path), pointwise by g_dec_path: the dichotomy at the accessibility body, and the exclusion Acc Path (ground induction) for the accessible disjunct.
-
Progress (g_prog_path, in gcalc, from Dec Path ). At x, split on Path x. In the positive case unfold once (g_nu_unfold), eliminate the negated universal to a j with and Path j, and conclude the existential. No coinduction step: the path is a hypothesis.
-
Step 1 at , , , with steps 2 and 3.
Theorem D.5 (g_tree_branch, g_tree_acc_or_branch; grounded). In gcalc_gfix_dich, with well-formed, Dec , and the replay at , and start 1: (i) if and , then derives Tot , , , every , and ; (ii) if derives codes-only and weak prefix closure for , then .
Proof of Theorem D.5
-
is decided, from Dec and the decidedness of equality (g_TR_decRel, no rule beyond RGA's).
-
Clause (i). Theorem D.4 at and gives totality, the start, the run and every. For , split (the root, a member by hypothesis) or (the run's edge , whose first conjunct is membership; g_treeRun_mem). ext is the second conjunct of each edge (g_treeRun_par). len is number induction on with motive “ has length ” (treeRun_len): the base is , the step the parent equation and the drop law (dropF_front).
-
Removing the root hypothesis (g_tree_root_mem, in gcalc). With codes only and weak prefix closure, gives : one unfolding gives a child , a member with some length ; its -fold drop is 1, not junk, hence a member. The corollary g_tree_branch_seq, in gcalc_gfix_dich, is clause (i) without the root hypothesis.
-
Clause (ii). The dichotomy at the accessibility body of , at 1 (g_acc_or_path), gives . The accessible case is the left disjunct; in the path case, step 3 gives the conclusions of clause (i), and the conjunction of four of them (totality, in, ext, len) is the right disjunct.
The element stream (g_tree_elem) sends to last and has the branch nodes as its prefixes, by number induction with fb_surj; its prefix set lies in (g_tree_elem_pset, in gcalc_ag_dich, where ATI decides the prefix set; the ATI hypothesis is redundant there, since the calculus has ground induction and the dichotomy and so derives ATI, Theorem 5.3).
Where ATI is spent. In this appendix ATI is applied as a rule only to decide a prefix set (g_pset_Dec, one ir_allTI_open). The round trip spends ATI through g_pset_Dec twice over: in clause (i) as the decidedness premise of the search at pset_s, in clause (ii) as the case split of the first inclusion. Theorem D.2(ii) spends ATI through the same lemma. The search lemma mu_choice sits in the base calculus, since its derivation is RGA's search lemma, and the check for the round trip requires it by name; so a result that uses the search and decides nothing by ATI, such as player II's strategy in Appendix F, does not apply ATI. Theorem D.3 is stated in calculi without ATI. Theorems D.4 and D.5 are stated without ATI as a primitive rule: their calculi have ground induction and the dichotomy and so derive ATI (Theorem 5.3), the proofs do not apply it, and their theories are built where that derivation is not in scope.
Lemmas a re-mechanization needs
• pfx_0, pfx_S, pfx_par_S: the recursion equations of the prefix function and its parent law.
• pfx_len, g_pfx_len_uniq: the prefix of index n has length exactly n.
• g_pfx_drop_le, g_pfx_drop_gt: a drop of a prefix is a shorter prefix or junk.
• g_pset_Dec: a prefix set is decided (ATI).
• g_pset_PrefClosedS, g_pset_InfTree, g_pset_Lin, g_pset_Seqs: the four other branch conditions of a prefix set.
• mu_choice, g_mu_choice_all: a decided matrix with a witness gives a total search function whose values satisfy it.
• srch_from_ex: the same in RGA, for one search.
• fb_surj, g_fbLinE, g_fbPrefClosedS_len: decomposition of a nonempty code; elimination of linearity and of weak prefix closure at a code with a length.
• g_RTp_bridge, g_RTp_pfx: consecutive search values are parent and child; the recovered stream's prefixes are the search values.
• g_path_coind: coinduction for Path at a certificate set.
• g_path_child_intro: the body of Path from a child in the certificate.
• g_TR_child_pset: a code with a length whose child is a prefix is a prefix.
• g_TR_decRel: the child relation of a decided set is decided.
• gi_TI_par: ground induction along with a parametric motive.
• gpb_run_of_progress (with gpb_search, gpb_inv, gpb_ext): the replay is a run that stays in Q.
• g_prog_path: a decided Path has progress, by one unfolding.
• g_dec_path, g_acc_or_path: Path decided, and Acc Path , at a decided relation.
• g_tree_root_mem, treeRun_len: the root of a tree with codes only and weak prefix closure is a member when holds; a run of the child relation from the root has the right lengths.
E The two program examples
Files: OIGA_Coind/GRand.thy (random assignment and its divergent twin), OIGA_Coind/GTrace.thy (the search body, its two atoms, and the counting program's bodies), OIGA_Coind/GTraceModel.thy (the model side of the counting program), with the generic lemmas of OIGA/GDich.thy, OIGA/GDich2.thy, OIGA_Coind/GStream.thy and OIGA_Coind/GBranch.thy.
Definitions: random assignment. A state is 0 (before the assignment) or (the loop with ). The step relation is : 0 steps to every , steps to , and 1, the loop exit, has no successor. The divergent twin adds the step from 1 to 0: . A term V is a variant (r1Var) when , the order being the compiled test ltOp. The certificate “every state” (allSt) is .
Definitions: the search and the counting program. For a set term , the search body (trSPhi) is , and its dual (trSPsi) is . Term (trTerm) and Div (trDiv), whose body reads . The decidedness premise of the search body is Dec (trDecD, nfdec_trSPhi). Ex (trEx) and All (trAll); the negation of All is literally Ex (trAll_neg). The counting program's state is a pair , and its step (trStep, source first) is: if , go to ; otherwise go to . The first component never decreases. Reachability Reach (trReach) is the -atom of : the run from the point reaches . The body "reaches and then goes up" (the up body, trUpPhi) reads, at a point : some has Reach, the first component of is , and some with step() has (through an equality guard on a bound variable). The reach atom is a leaf of that body that does not mention the recursive variable.
Theorem E.1 (g_acc_R1_all, g_R1_no_variant; grounded). Let be well-formed. (i) In gcalc: if , then . (ii) In gcalc_ati: if , then , where is the variant property.
Clause (ii) is a schema: for each term V whose totality is derivable, the negation is derivable. No quantifier over terms is involved.
Proof of Theorem E.1
-
Accessibility introduction (g_acc_intro0, in gcalc). For a closed well-formed , a well-formed and a well-formed : if in every well-formed extension, at every number , is derivable, then . The lemma is universal introduction followed by one fold of the -atom (acc_unfoldl, conversions), and a fold is not a fixed-point rule.
-
The loop states (g_acc_R1_loop). Acc, by number induction on with motive “Acc”. Base: no has , since refutes the left disjunct and with is refuted by a decided case on ; step 1 concludes. Step: at and a number , split on the decided . If so, the hypothesis gives Acc by transport; if not, , because and successor is injective. Step 1 concludes.
-
The initial state (g_acc_R1_init). One application of step 1 at 0: split , where fails, or , accessible by step 2.
-
Clause (i). Split or ; steps 3 and 2.
-
A variant refutes itself, in RGA (r1Var_absurd). From Tot V and Var(V), any well-formed . Number induction on with motive “”, that is . Base: . Step: the edge from to (R1_edge_dec) gives (r1Var_E); splitting into equality (transport) and < (transitivity) gives (ir_ltOp_split), so . The instance at gives ; the edge from 0 to (R1_edge_init) gives ; both cases of contradict irreflexivity of <.
-
The variant property is decided. At two fresh number variables the matrix is decided; two applications of ATI (ir_allTI_open) decide Var(V), hence its negation.
-
Clause (ii). Under the hypothesis , double-negation elimination and step 5 give . neg_decided_explosive_iff (for a decided , holds exactly when is derivable), at the decided , gives .
The contradiction from a variant is RGA's; ATI is spent only to decide the variant property, which turns the hypothetical refutation into a derivable negation.
Theorem E.2 (g_R1p_div, g_R1p_run; grounded). Let be well-formed. (i) In gcalc_nu: . (ii) In gcalc_gfix_nu_dich: writing for the replay at and start 0 (Appendix D), derives Tot , , run_{R'} (P) and every_{Path_{R'}} (P).
Proof of Theorem E.2
-
Clause (i). Coinduction at a certificate set (g_path_coind) with ; the region is every number, and holds by conversion. Closure at a fresh : split or , and or . At the child is 1, with (R1_edge_init, R1p_of_R1); at the child is 0, with the back edge (R1p_back); at the child is (R1_edge_dec). Each case closes by g_path_child_intro. One coinduction step.
-
Clause (ii). is decided in RGA (g_R1p_decRel); g_run_of_path (Appendix D) at , with the path of clause (i) at x = 0.
Companions. and the same for are at the two decided relations (g_R1_acc_or_path, g_R1p_acc_or_path, in gcalc_dich, the dichotomy alone). The decided forms (g_R1_dec_path, g_R1p_dec_path) are , in gcalc_gfix_dich, so they use ground induction as well, for the exclusion. Non-derivability (oinga_R1p_not_acc, classical): an empty-context derivation of in OINGA gives by the exclusion, which clause (i) refutes, against the consistency of OINGA (oinga_consistent_notation); oingad_R1p_not_acc is the same for OINGA with the dichotomy, restated at DINGA as dinga_R1p_not_acc in the junction theory CD_Junction.
Theorem E.3 (tr_Q1_iff, tr_Q2_iff; grounded). Let be well-formed and . (i) In gcalc_gfix, with : if and only if . (ii) In gcalc_nu, for every : if and only if . (iii) In gcalc_gfix (tr_excl): if , then .
The two equivalences are between derivability facts, not internal biconditionals. Clause (ii) needs no decidedness of q.
Proof of Theorem E.3
-
Backward induction (tr_back_ind, in gcalc). For a predicate : from Dec , , , and, in every well-formed extension and at every number , “ gives ” and “ gives ”, conclude . Number induction on with motive (trK). Base: at , split on the decided ; in the positive case tr_pAdd_0 transports it to , which gives . Step: split on ; in the positive case (tr_pAdd_shift), so at gives , hence . The instance of at finishes.
-
Clause (i), backward (tr_term_of_ex, no rule beyond RGA's). Eliminate the existential and apply step 1 with : a witness gives the left disjunct of the body, and the right one, each followed by one fold (gm_gfix_fold).
-
Clause (i), forward (tr_ex_of_term). Ground induction (ir_gfix_par) at the search body with motive , the eigenvariable fresh for the context, the motive and the body. Closure obligation: from , derive . In the left case the witness is (tr_pAdd_0); in the right case a witness for gives the witness for (tr_pAdd_shift). The rule yields . This direction does not use Dec .
-
Clause (ii), forward (tr_all_of_div, no rule beyond RGA's). First for every (tr_div_add), by number induction on with motive “”, the step one unfolding and a transport along . Then, at each , one unfolding at gives the conjunct .
-
Clause (ii), backward (tr_div_of_all). The coinduction rule at the body with certificate ; the region is the set of points from which never holds. The start is the hypothesis. Closure obligation: at a fresh with , derive . The instance at gives ; the instance at , transported, gives ; conversion reads that universal as the certificate at . One coinduction step.
-
Clause (iii). g_mu_not_nu at the search body and its dual: ground induction with motive “”.
Theorem E.4 (tr_term_of_ndiv, tr_dich; grounded). Let and . (i) In gcalc_ati_nu, with well-formed: if , then . (ii) In gcalc_dich: . The third route (tr_ati_disj, in gcalc_ati_nu, with well-formed) derives the same disjunction.
Proof of Theorem E.4.
-
The universal is decided (tr_all_B, in gcalc_ati). At a fresh number variable is decided by Dec ; ATI (ir_allTI_open) decides . Here ATI acts as the limited principle of omniscience.
-
Clause (i). Split on . If the universal holds, step 5 of the proof of Theorem E.3 gives , against the hypothesis. If fails, its negation is literally , and step 2 of the same proof gives .
-
Clause (ii). The premise by conjunction introduction; one application of the dichotomy at the search body, with its positivity, mention, dual and premise facts (posP_trSPhi, free1_trSPhi, ndual_trSPhi, nfdec_trSPhi).
-
The third route. The case split of step 2, with on the positive side and on the negative. The third route's decided form tr_ati_dec uses the witness refutation tr_ndiv_of_ex on the negative side; the dichotomy's decided form tr_dich_dec is g_dec_nu.
Theorem E.5 (nfdec_not_false, trUp_premise_valueless; in ). (i) For every , body and premise with nfdec, and every substitution : is not false in . (ii) For every with nfdec and every : has no value in . (iii) In DINGA (oingad_trUp_dich_premise_not_derivable, oingad_trUp_dich_premise_neg_not_derivable, restated at DINGA as dinga_trUp_dich_premise_not_derivable and dinga_trUp_dich_premise_neg_not_derivable in CD_Junction; classical): for every with nfdec, neither nor is derivable from the empty context. (iv) The combined forms (tr_dich_prems_valueless, oingad_tr_dich_prems_open, oingad_tr_dich_unavailable, restated at DINGA as dinga_tr_dich_prems_open and dinga_tr_dich_unavailable in CD_Junction; classical): every such is neither true nor false in and neither derivable nor refutable, and such a exists (tr_dich_prems_ex), so the rule is unavailable at the up body.
The premise relation is not functional: ranges over every premise the grammar computes, and the theorem holds for each.
Proof of Theorem E.5.
-
The step in . An equation derivable in RGA from no hypotheses gives the value in , by rga_nu_sound (trmod_val_of_eq); so pairing, projections and predecessor have their arithmetic values at numerals. A true step from to forces , where succ is the HOL function computing the program's next state (trmod_step_inv), and the step to succ() is true (trmod_step_true).
-
The reach atom is never false (tr_reach_not_false, at every target and numeral ). Induction over the mutual inductive definition of the model's head and value relations, with the invariant trFlnv: no value judgment derived is one of “Reach is false”, “its body instance is false”, “the negated universal of the body is false”, “the universal is true”, for whose step from is not false, “the -instance of that universal, as a redex or contracted, is true”, and “ is true”. The case that uses the program is the true universal: its truth includes the instance at , whose step is not false (trmod_succ_not_false), and that instance is excluded by the induction hypothesis. Read operationally, a falsity derivation would have to follow the run forever.
-
The reach atom from to is not true (tr_reach_not_true). The atom's truth set in is the least fixed point of its operator relative to (gfix_omvO_eq_lfp). By least-fixed-point induction at the set “first component 0” (tr_reach_lfp_fst0), every state from which is reachable has first component 0: a state in the operator's image is itself, or steps truly to a member with first component 0, and then forces the first component of to be 0. The state has first component 1.
-
The premise is not true (trUp_premise_not_true). If were true, its model-side reading (nfdec_leafdec) would make every leaf valued at every environment of numerals; descending through the negation, the universal and the disjunction of the up body (trmod_up_leafdec), the reach leaf would be valued at the environment sending to and the point to . Value congruence through the second projection turns that leaf into Reach, which step 3 makes not true and step 2 not false.
-
Clause (i). Induction on the premise grammar. Leaf: the universal closure of “ is decided” is never false (trmod_allqN_B_not_false, by induction on the number of quantifiers: a false universal has a false instance; with none left, false would make both true and false, against uniqueness of values). Recursive atom: is not false. Disjunction: a false conjunction has a false conjunct. Negation and the universal pass the premise through unchanged.
-
Clause (ii): a value of would be true, against step 4, or false, against clause (i).
-
Clause (iii). An empty-context derivation of makes true in (oingad_nu_sound), against step 4 at the identity substitution. A derivation of makes false, against clause (i).
Where ATI is spent. In this appendix ATI is applied as a rule only to decide a universal: the variant property in Theorem E.1(ii) and All in Theorem E.4(i) and the third route. The termination of random assignment, the divergence of its twin, the disjunctions Acc Path and Theorem E.3 are stated in calculi without ATI; the decided forms are stated without ATI as a primitive rule, in calculi with ground induction and the dichotomy, which derive ATI (Theorem 5.3), but their proofs do not apply it and their theories are built where that derivation is not in scope. The checks forbid it under Theorem E.1(i), g_R1p_div, the two directions of Theorem E.3 that use a rule, and tr_dich.
E.1 Nested random assignment at every fixed depth
Files: OIGA_Coind/GRandDepth.thy (imports GRand). The relation of depth is a HOL function of producing a term (rdRel): depth 0 has no edges; depth runs on Cantor-pair codes of a depth- state and a counter , and one step either decrements the counter or steps along the depth- relation and resets the counter to any number. Read lexicographically the relation has height (a reading). Every number is a state, and the relation is decided at every (rdRel_B, HOL induction on , no ATI).
Theorem E.6 (rd_ti, acc_rdRel; grounded). In the locale rga, for every : transfinite induction along the depth- relation holds for every closed motive that is progressive in the every-extension form of acc_Rn_l; and for every well-formed and , . In gcalc: g_acc_rdRel, g_rdRel_B.
-
HOL induction on , motive arbitrary. Accessibility is not a strong enough motive for the induction on ; the schema is stated for every closed progressive .
-
The step. Apply the depth- schema to the motive . Its progressiveness is one internal number induction (ir_nat_ind) on the counter, using all_cont, the edge analysis rdB_cases, the pairing round trips with cmp_argl and app_T_cong, and the outer hypothesis for a step over a depth- edge.
-
Accessibility. acc_rdRel is the schema at , made progressive by acc_unfoldl together with rdRel_B; acc_rdRel_3 is the instance . The check at the end of the theory forbids ground induction, , the dichotomy and ATI under the new theorems, with a blindness control on g_R1_not_path.
E.2 The Lattice rule and the WELL rule
Files: OIGA_Coind/GLattice.thy (imports GTrace). For a closed step relation , source first, and a target , the eventually atom (trEv) is the -atom of the body ; a state without a successor satisfies it vacuously, so the step relation is taken total. Leads-to (ltTo) is the sentence . The lattice hypothesis (latHyp) at an order , a family and a target is the sentence .
Theorem E.7 (g_lattice, g_well; grounded). In gcalc_gfix, for closed well-formed , , , : from , and , ; at a state, from and , (g_lattice_at). The WELL rule: at the family “ and ” (wellF), from the hypothesis, , , and , .
-
Transitivity and monotonicity of eventually (ev_mono_trans, gcalc_gfix): from and, in every extension of the context, giving , conclude ; one ground induction on the outer atom, the unfolding and folding laws ev_unfold, ev_fold, ev_now, ev_next being RGA-level.
-
The motive. Ground induction on at the motive “ and ” (latMot): the closure receives the body of the accessibility atom at the new point, not the atom, so the motive carries accessibility to meet the relativized hypothesis. The schema form g_lattice_sch takes the hypothesis at every extension; g_lattice instantiated the sentence.
-
The closure. Rebuild from the first conjunct of the induction hypothesis; apply the hypothesis at ; apply step 1 with the lattice target at : a -state folds directly (ev_now), and a witness gets from the induction hypothesis' second conjunct.
-
Why the conclusion is a rule. The sentence would need at points the order leaves inaccessible, where accessibility is undecided; Lamport's existential conclusion is handled in the metatheory by g_lattice_at.
-
The countdown (cd_term): the step stuttering at , the equation , the set ; every number is accessible along the predecessor order by one number induction (cd_acc) and the hypothesis sentence is derived without a fixed-point rule (cd_hyp); the Lattice rule at a state gives for every .
Fair termination, the fairness twin, the transformation as a term former, the alternating-bit protocol and the native fairness rule are treated in Appendix G.
Lemmas a re-mechanization needs.
• g_acc_intro0: accessibility introduced by one fold from “every successor is accessible”.
• R1_edge_dec, R1_edge_init, R1p_back, R1p_of_R1: the edges of the two relations.
• g_R1_decRel, g_R1p_decRel: both relations are decided in RGA.
• r1Var_E, r1Var_absurd: the variant property's instance at an edge, and its refutation in RGA.
• neg_decided_explosive_iff: at a decided exactly when is derivable.
• g_path_coind, g_path_child_intro, g_run_of_path (Appendix D).
• tr_back_ind: backward induction from a witness of q.
• tr_pAdd_0, tr_pAdd_S, tr_pAdd_shift: the addition equations used for transport.
• tr_div_add: divergence propagates along the search.
• tr_ndiv_of_ex: a witness refutes divergence, by negative folds, with no rule.
• tr_all_B: All decided (ATI).
• g_mu_not_nu, g_dec_nu: the generic exclusion and decided -atom.
• trmod_step_inv, trmod_step_true: the step relation in is the successor function.
• tr_false_inv: the falsity invariant of the reach atom.
• tr_reach_lfp_fst0: every state that reaches has first component 0.
• nfdec_leafdec, trmod_up_leafdec: a true premise values every leaf, here the reach leaf.
• trmod_allqN_B_not_false: a closure of a decidedness atom is never false.
F The two games
Files: OIGA_Coind/GDet.thy (the game body, determinacy, the Baire instance and player II's strategy), OIGA_Coind/GDetModel.thy (the game atom in ), OIGA_Coind/GBucket.thy (the bucket game), OIGA_Coind/GBucketModel.thy (the Stepmother's legal pour and the model side), OGA/OGA_Coind_Kit.thy (tuples, folds over five buckets, multiplication and the dispatch on a phase).
Definitions: the game body. A game has three parameters: a target set , a move relation for player I and a reply relation for player II, both child-first: says is a legal move of I at , and that is a legal reply of II at . Player I's body (gmPhi) is
with the existential written and the parameters lifted past the two binders. Its dual (gmPsi) replaces by . (gmWinI) and (gmWinII). Unfolded, the body of at reads : II is outside the target and answers every move with a reply back in the region. The body's decidedness premise (gmDec) is , where (gmRp3) is the reply leaf decided at every triple of numbers, the outermost variable unused. The structural facts posP_gmPhi, free1_gmPhi, ndual_gmPhi and nfdec_gmPhi (body positive, mentions , has that dual and that premise) are proved in RGA's metatheory by one grammar rule per connective.
Definitions: the Baire instance and the strategy. Positions are sequence codes, the root is the empty code 1, and a move or reply appends one number: (gmExt), decided in RGA (g_gmExt_decRel). In this instance . Write for at the target . A code is good for a set (gmGood) when : is a move of I from a position of . The strategy's matrix (gmSigB) is , and the strategy (gmSig) is the search combinator at : the least satisfying . The second disjunct makes the matrix satisfiable at every .
Definitions: the bucket game. Five buckets stand in a circle, each of capacity units. At each round the Stepmother (player I) pours one unit, split as she likes, and Cinderella (player II) empties two adjacent buckets. Amounts are numerators over a common denominator . A state is an eight-tuple of nested Cantor pairs (csTup): the phase of the round-robin clock, the denominator, the last refinement factor and the five numerators, read by csPh, csDen, csFac and csBk. The initial state (csInit) has phase 0, denominator and factor 1, and empty buckets. The target is empty: (csU). The Stepmother's move (csM) is the conjunction of: ; ; ; for every (each bucket scales and may grow); and the five increments sum to . The order is truncated subtraction ( is ); the refinement factor is stored in the successor, so no quantifier occurs. Cinderella's reply (csRp) is the conjunction of: no overflow at , that every bucket of is at most (csNoOvf, with the -fold sum ); ; ; the phase advances, 4 to 0 and to otherwise (csAdv); and for some , empties buckets and of and copies the rest (csEmpB). So overflow is tested after the pour and before the emptying; at an overflowing state II has no legal reply, and the move clause of I's body holds there vacuously. The schedule empties at phase the pair starting at (csPi). The table (csG) has rows , , , , indexed by the bucket ; it satisfies if is in the pair of phase and otherwise (cs_T1), and (cs_T2). The certificate (csW) holds at when, for some , the phase of is and every bucket satisfies (csWr); it need not be decided. The strategy term sig (csSig) dispatches on the phase of (cdSel) to the tuple with phase , the denominator and factor of , and the buckets of with the pair of phase emptied (csSigma). The two regions at capacity are Win and Win at these three parameters, written Win and Win (csWinI, csWinII).
Theorem F.1 (gm_det, gm_decll; grounded). Let be well-formed, with , , (the relations decided at every pair) and . (i) In : . (ii) In : . Companions: in , from well-formed, and , (gm_excl, no decidedness hypotheses); in , the body's decidedness premise (gmDec) from the three decidedness hypotheses (g_gmDec).
Proof of Theorem F.1
-
The premise (g_gmDec, no rule beyond RGA's). Three nested universal introductions at every extension (g_allq_env) introduce ; at the innermost level Dec Rp instantiated at (g_decRel_inst) is the reply leaf ( unused). Then , and conjunction introduction with Dec U and Dec M. The check forbids all four rules here.
-
Clause (i). One application of the dichotomy at the game body, with dual gmPsi, premise gmDec from step 1, the four structural facts and x N. That application is the whole proof; the check forbids , ATI and ground induction.
-
Exclusion (gm_excl): g_mu_not_nu at the body. The lemma's proof is ground induction at with motive . Closure obligation: at a fresh with and the body at with for , derive . turns that body instance into the dual's instance at ; double negation and the negative fold give .
-
Clause (ii) (g_dec_nu). Step 2 gives . In the left case step 3 gives ; in the right case ; either way , which is (ir_bool). The check requires the dichotomy and ground induction and forbids and ATI. The calculus has no and no ATI as a primitive rule; it derives ATI (Theorem 5.3), the proof does not apply it, and GDet is built where that derivation is not in scope.
The Baire instances (gm_baire_det, gm_baire_excl, gm_baire_decll) are the three results at . In the two concrete Baire games, I wins at the root in one round when the target is “player I’s last move was 0, at a position other than the root” (gm_l_one_round, two folds), and II wins at the root when the target is “the last two moves agree, at a position other than the root” by answering every move with , the certificate being the complement of the target (gm_ll Copies, one coinduction step).
Theorem F.2 (gm_sigll; grounded). In gcalc_gfix_dich, at the Baire instance, with well-formed and : (i) ; (ii) if , and , then .
Proof of Theorem F.2. Work in the context extended by a number variable , the argument of the strategy, with and lifted (lift_gmWinll).
-
The region is decided. At every extension and number , B: Theorem F.1(ii) at Dec and the decidedness of Ext. This step is where the dichotomy and ground induction enter.
-
Goodness is decided, from step 1 at par(v), the decidedness of Ext, and conjunction.
-
The matrix is decided (g_Dec_laml): at every number , is decided by step 1 and by step 2.
-
A witness exists. Split on the decided good. If not good, satisfies the matrix by its second disjunct. If good, unfolds once (g_nu_unfold, no rule) to II’s body at par(v), and is a move from par(v); the body’s move clause (gm_psiE_M) supplies with and ; then (gmExt_eq), so by transport, and witnesses the matrix.
-
Clause (i). The search lemma mu_choice on steps 3 and 4 gives Tot .
-
The search satisfies the matrix: g_mu_choice_all gives .
-
Clause (ii). Let . Instantiate step 6 at . Since (fbPar_snoc), the hypothesis and (gmExt_snoc) make good; disjunction elimination against goodness (gmSigB_E) gives .
No coinduction step occurs: the region is a hypothesis and is only unfolded, and the check forbids . No ATI step occurs either: decidedness comes from the dichotomy and ground induction (step 1), and the search lemma mu_choice is RGA’s, stated in the base calculus (Appendix D).
Theorem F.3 (gm_win_l_not_false; in ). Let be a set of naturals with (gmSurvl): for every some has not false in , and every with true in lies in . Then for every and every , is not false in .
Proof of Theorem F.3. The proof is an induction over the mutual inductive definition of the model’s head and value relations (gm_false_inv), with the trivial motive on head judgments and, on value judgments , the invariant gmFInv: is none of ten shapes. Write for the instance at of the outer universal’s matrix and for the inner universal’s matrix (gmL1, gmL2). For : (1) false; (2) the body instance at false; (3) the body instance’s negated universal false; (4) true. For with not false and every true reply of in : (5) true; (6) its beta reduct true. For with every true reply of in : (7) true; (8) false; (9) false; (10) its reduct false. The cases:
-
Negation true from its argument false: only (7) has that form, and its argument would be (8). Negation false from its argument true: (3) would need (4).
-
Disjunction true from its left disjunct: (6) would need true, so false (omvO_not_inv), against the shape's hypothesis. From its right disjunct: (6) would need (7).
-
Disjunction false from both disjuncts false: (2) would need (3); (10) would need true, so , and false, which is (1) at .
-
Application of an abstraction: the head of is the abstraction of the body with for (gm_head_W, by determinism of heads), so (1) reduces to (2) (gm_L0_eq), (5) to (6) (gm_L1_eq) and (9) to (10) (gm_L2_eq).
-
Universal true from every instance true: (4) would need true at the move that survival supplies, which is (5). This case is the only use of the existential in the survival hypothesis. Universal false from one instance false: (8) would need (9).
-
Recursor heads, -heads and the remaining clauses produce no shape.
The theorem is shape (1). Read operationally: a falsity derivation of is well-founded, and at a surviving position it would have to pass through shapes (1) to (10) and return to (1) at a new position of S, forever.
Theorem F.4 (cs_cind, cs_cind_init; grounded). In gcalc_nu, for a capacity (a HOL natural), with well-formed: if and , then . In particular .
Proof of Theorem F.4
-
One coinduction step (gm_winll_coind): the coinduction rule at II's body with certificate , so the region is the set of certificate states, and an eigenvariable fresh for the context, the certificate's abstraction and the body at once. Closure obligation: at every j not free in , from j N and , derive II's body at j with the certificate for a.
-
Introducing 's body (gm_psil, in gcalc). From , Dec , , and, at every extension and number with , a number with and , the body follows: universal introduction over , a case split on the decided , and in the move case the existential introduced at the supplied . Here is csU_never and Dec is g_csM_decRel; the decidedness of the move relation serves this case split, not a dichotomy.
-
The reply. Take , a number (csSig_N). The step theorem cs_sig_step (in gcalc, at ), from and , gives and . The step theorem is the RGA lemma cs_sig_step0 carried by cut:
(a) The certificate at is a five-way disjunction over (csAny_E); fix the case : the phase of is and . The move keeps the phase, so has phase (cs_M_parts).
(b) The strategy evaluates at phase to the tuple for phase (cs_sig_eval: one beta step and the dispatch at a numeral phase), whose fields are read off (cs_sigma_acc).
(c) One pour adds at most one unit (cs_pour_q): from and the move, . With ; the increment is at most the sum of the five increments (cs_summand_le), which is ; the arithmetic core cs_pour_bound then gives , using (cs_pMul_cdSum, by HOL induction on ).
(d) The reply is legal (cs_step_Rp). No overflow: , by step (c), cs_T2 and ; this is the only use of the capacity hypothesis. Denominator and factor are copied. The phase advances, by cases on . The emptied pair is .
(e) The certificate holds at the reply (cs_step_W) at phase : an emptied bucket is 0; any other bucket equals , which is by cs_T1 and .
One beta step turns into the certificate's abstraction applied to r, as step 2 requires.
- The initial state: init is a number and satisfies the certificate at phase 0 with empty buckets (cs_W_init).
The coinduction rule is used once, in step 1, and every other step is in gcalc; the check forbids the dichotomy, ATI and ground induction under the theorem, all four rules under the strategy, the step and the kit, and ATI and mu_choice under every result of the theory. The strategy is total in RGA (cs_sig_total).
Theorem F.5 (cs_rr_tight; grounded). In RGA, at every context . Let play(0) = init and play (csPlay), the play in which the Stepmother pours the whole unit into bucket 0 every round (csPour, Theorem F.7) and Cinderella answers by the round-robin strategy. (i) For every , , play: every pour of the play is legal. (ii) For every , , pour(\text{play}(n)))\Gamma \vdash n_0(\text{pour}(\text{play}(5))) = 3\Gamma \vdash d_{\text{pour}(\text{play}(5))} = 1c < 3rRp_c(r, \text{pour}(\text{play}(5)))\Gamma \vdash 0 = 1$.
So after the sixth pour bucket 0 holds three units over the denominator one, and at capacity two or less every candidate reply of Cinderella's is refuted: the Stepmother has won that play. The bound of Theorem F.4 is therefore attained against the strategy it certifies. The theorem says nothing about other strategies or about the game's threshold. The proof is by computation: the fields of each state of the play are read off by RGA's rules (cs_play_acc), and for clause (v) the proof unfolds the reply relation and refutes its no-overflow conjunct, which concerns the poured position (bucket 0 holds three units, above the capacity), so the refutation holds whatever the reply.
Theorem F.6 (cs_stepmother_refuted; grounded). In gcalc_gfix_nu, for and well-formed: . init, .
Proof of Theorem F.6.
-
The extended context is well-formed and proves init N.
-
Exclusion (cs_excl, step 3 of the proof of Theorem F.1 at the bucket parameters) under the hypothesis gives . Ground induction.
-
Theorem F.4 in the extended context gives . One coinduction step.
-
Negation elimination gives .
The check requires ground induction and forbids the dichotomy and ATI. OINGA reads the theorem through the edge from gcalc_ag_nu to gcalc_gfix_nu. At every capacity, with no capacity hypothesis, every state is won by one of the players (cs_det, in gcalc_dich) and Cinderella's region is decided (cs_decll, in gcalc_gfix_dich, so with ground induction as well): Theorem F.1 at the decidedness facts g_csU_Dec, g_csM_decRel and g_csRp_decRel.
Theorem F.7 (cs_pour_legal, cs_init_surv; grounded and in ). (i) In RGA: if , then , where pour(p) (csPour) keeps the phase and denominator of , has factor 1, adds to bucket 0 and copies the other buckets. (ii) In , at every capacity : .
Proof of Theorem F.7.
-
Clause (i). Read the fields of pour(p) (cs_acc_tup) and use (cs_pMul_oneL, number induction). The five conjuncts: ; ; the phase is copied; and ; the increments are and four zeros, whose five-fold sum collapses to (cs_sum5_unfold). The pour has no overflow precondition and is legal at every number .
-
Clause (ii). Fix ; with the reply condition is trivial. Clause (i) at is an empty-context derivation in RGA, so is true in (rga_nu_sound). pour() is derivably a number, so it has a numeral value (cs_N_num_rel); value congruence under application (ovcrO_appl) and transport (omvO_vcr_ex) make true; by uniqueness of values it is not false.
Theorem F.8 (cs_win1_not_false, dinga_stepmother_not_refuted; in , classical). (i) At every capacity c, is not false in . (ii) At every capacity c, DINGA does not derive from the empty context (oingad_stepmother_not_refuted for OINGA with the dichotomy, restated at DINGA in the junction theory CD_Junction).
Proof of Theorem F.8
-
Clause (i). init is derivably a number, so it has a numeral value (cs_N_num_rel); if were false, value congruence would make false; but Theorem F.3 with Theorem F.7(ii) and says that atom is not false.
-
Clause (ii). An empty-context derivation of the negation makes true in (oingad_nu_sound); by omvO_not_inv the atom then has a value with true, so the atom is false, against clause (i).
Overflow plays no part here: the Stepmother survives everywhere because the legal pour exists at every position.
Where ATI is spent. No result of this appendix applies ATI as a rule. The results stated in a calculus with ground induction and the dichotomy (gm_decll, gm_sigll, cs_decll) have ATI as a derived rule (Theorem 5.3) but not as a primitive one, and their theories are built where that derivation is not in scope. Theorem F.2 uses the search lemma mu_choice, which is RGA's search carried into the base calculus by cut; the check for the strategy requires mu_choice and the dichotomy by name and forbids ATI and . The bucket game's check forbids ATI and mu_choice under every result of its theory.
A stuck position is lost. gm_win1_stuck_false (OIGA_Coind/GDetModel.thy): if the target is false at in and every move from is false in , then is false in . One unfolding: at every the first disjunct of the move clause, “the move is not legal”, is true (omvO_notT, omvO_orT1, gm_L1_eq); so the universal over moves is true (omvO_A_laml) and its negation, the existential, false; so the body is false (omvO_orF, gm_L0_eq), and omvO_appLam with omhO_trmGfix carries the value to the atom.
Lemmas a re-mechanization needs
• posP_gmPhi, free1_gmPhi, ndual_gmPhi, nfdec_gmPhi: the side conditions of the dichotomy at the game body.
• g_gmDec: the premise from the decidedness of the three parameters, in RGA.
• g_allq_env, g_decRel_inst: universal introduction at every extension; a decided relation's instance.
• g_mu_not_nu, g_ndual_beta, g_dec_nu: the generic exclusion and decided -atom.
• gm_psiE_M, gm_psil: eliminating and introducing II's body at a move.
• gm_winll_coind: coinduction for II's region at a certificate set.
• gmExt_eq, gmExt_snoc, g_gmExt_decRel: the Baire extension relation.
• mu_choice, g_mu_choice_all: the search (Appendix D).
• gmSigB_E: the matrix at a good code gives the region.
• gm_head_W, gm_L0_eq, gm_L1_eq, gm_L2_eq, gm_false_inv: the head of Win in , the three instance steps, and the falsity invariant.
• csU_never, g_csU_Dec, g_csM_decRel, g_csRp_decRel: the target never holds, and the three bucket parameters are decided in RGA.
• cs_sig_eval, cs_sigma_acc, cs_M_parts: the strategy at a numeral phase, its fields, and the move's parts.
• cs_pour_q, cs_pour_bound, cs_pMul_cdSum: one pour adds at most one unit of the new denominator.
• cs_step_Rp, cs_step_W, cs_T1, cs_T2, cs_W_init: the reply is legal and re-establishes the certificate; the table laws; the certificate at the start.
• cs_pour_legal, cs_N_num_rel, ovcrO_appl: the legal pour; numeral values of derivable numbers; value congruence under application.
G Fair termination and eventual delivery through random assignment
Files, all in OIGA_Coind: GFairCorr.thy (imports Main; runs, fairness, the exact and the weak edge and their correspondences), GFairX.thy (imports GFairCorr; the relaxed masked edge, its correspondence, the eventuality transfer), GFair.thy (imports GLattice; the two-component loop), GFairModel.thy (imports GFair, GFairCorr and GTraceModel; the loop in the least model), GFairTwin.thy (imports GFair; the fairness twin), GFairTwinModel.thy (imports GFairTwin and GFairModel), GFairGen.thy (imports GFairTwin; the term former, its kit, the motive pack, the helpful direction, the regression), GFairGenModel.thy (imports GFairGen, GFairX and GFairModel; the generic least-model side), GFairAbp.thy (imports GFairGen; the alternating-bit protocol), GFairAbpModel.thy (imports GFairAbp and GFairGenModel), GFairLift.thy (imports GFairGen; the native fairness rule and the eventuality rule). The generic lemmas come from GLattice.thy, GStream.thy, GBranch.thy, GRand.thy, OIGA/GDich.thy, OIGA/GShell.thy and the tuple kit OGA/OGA_Coind_Kit.thy; the least-model facts from RGA/RGA_Omega_Sound.thy, IGA/IGA_Sound.thy and IGA/IGA_Lfp.thy.
Conventions. For a closed step relation says that is a successor of , the orientation of accessibility. The eventually atom (trEv) takes its relation source first, so the term former below produces one relation in two orientations. The order is the equation for truncated subtraction (gapSub), and is . Codes are nested Cantor pairs built by the tuple kit of OGA_Coind_Kit: (csTup), read by field (csGet), with the kit's finite conjunction and disjunction over a HOL-indexed family of terms (csAll, csAny). A premise holds at every extension when it is required in every well-formed context that derives everything derives; universal introduction and the case lemmas deliver their cases in such extensions. Results of RGA (locale rga) hold in every calculus by g_viaLW; the rows below are those transfers.
G.1 The classical correspondence
Definitions. A program has components, with guards and one-step relations (source first) on a state type. A run is a state sequence with a schedule such that at every the component is enabled at and steps from to (aoRun); only infinite runs exist in this vocabulary. A run is strongly fair (aoSF) when every component enabled infinitely often is scheduled infinitely often, and weakly fair (aoWF) when every component enabled from some point on is scheduled infinitely often (aoSF_aoWF: strong implies weak). A mask marks the components owed fairness, and aoSFM restricts strong fairness to them. A transformed state is a pair of a program state and a counter vector. In each of the three edges below, the scheduled component is enabled at and steps to , and its own counter is unconstrained, Apt and Olderog's random assignment .
• The exact edge (aoEdgeAt, aoEdge): every other enabled component has a positive counter (the strict guard) and its counter decreases by exactly one; the counter of every other disabled component is kept.
• The weak edge (aoEdgeW): the counter of a disabled component other than i is reassigned at random instead.
• The relaxed masked edge (aoEdgeX): for every masked , the counter strictly decreases if j is enabled, which forces it to have been positive, and does not increase if j is disabled; unmasked counters are free. The exact edge is a relaxed edge for the full mask (aoEdge_aoEdgeX).
The pending set (aoPend) of at time is the set of steps at which is enabled and such that is not scheduled at any step from through ; the counter (aoCnt) is its size, and the lift (aoLift) of a run at is with the counters at . The weak counter (aoWCnt) counts the steps before is next scheduled or next disabled; the masked lift (aoXLift) sets unmasked counters to 0.
Theorem G.1 (ao_sound, ao_complete; classical), (i) Every infinite chain of the exact edge projects onto an infinite strongly fair run (ao_sound); of the weak edge, onto a weakly fair one (ao_wsound); of the relaxed masked edge, onto one strongly fair for the mask (ao_xsound). (ii) Every infinite strongly fair run lifts to an infinite chain of the exact edge with the same projection (ao_complete); likewise for the weak edge (ao_wcomplete) and the relaxed edge (ao_xcomplete). (iii) If no infinite chain of the exact edge starts at for any , no infinite strongly fair run starts at (ao_fair_term); likewise for the weak and the relaxed edge (ao_fair_wterm, ao_fair_xterm), and conversely a chain gives a fair run (ao_fair_div, ao_fair_wdiv, ao_fair_xdiv). (iv) If every infinite relaxed chain from every reaches a state whose program part satisfies , every infinite run from strongly fair for the mask reaches (ao_fair_xev).
No RGA term occurs; the checks of GFairCorr and GFairX forbid every dependency whose name mentions rga. The correspondence holds for infinite runs only: the strict guard blocks where two enabled components both have counter 0, and the program does not.
Proof of Theorem G.1
-
Projection (ao_sound). Choose from each edge (choice in HOL). Along a chain on which is not scheduled from on, plus the number of steps in at which is enabled equals (ao_cnt_invariant, induction on ). If is enabled infinitely often, that count exceeds for some (ao_card_unbounded). The weak and masked forms use on a stretch where is always enabled (ao_wcnt_invariant) and an inequality (ao_xcnt_invariant).
-
Finiteness of the pending set (aoPend_finite), the one place a classically undecidable question is split. If is scheduled at some , the set lies below ; if not, strong fairness makes enabled only finitely often, and the set lies below the last such step. The definition of the counter makes no case split.
-
One step (aoPend_step, aoCnt_step, aoCnt_pos). When , the pending set at is the set at with added if is enabled at , and the same set otherwise: the counter decreases by one or is kept, and an enabled has a positive counter.
-
Lifting (ao_complete). By step 3 each lifted step is an exact edge. The weak set is finite by weak fairness (aoWPend_finite); the masked lift needs finiteness only from the fairness clause of itself (aoPend_finite_at, aoCnt_xstep, aoCnt_xpos).
-
Transfers. Lift a fair run from at the counter vector it induces at time 0, or project a chain. For (iv), the lift keeps the program part (ao_fair_xev).
G.2 The two-component loop
Definitions. The program is ; ; , after Apt and Olderog and Grumberg, Francez, Makowsky and de Roever: always scheduling component 1 diverges, and every strongly fair run terminates. The transformed relation aoT is written by hand at the RGA level, on codes ( 0 initial, 1 loop, 2 exit; fields aoPc, aoXv, aoZ1, aoZ2yxpcx_y = 0pcx_y = x_x + 1z_2(y) + 1 = z_2(x)z_1pcxz_1(y) + 1 = z_1(x)z_2$ free). The strict guard and the decrement are one equation. Both components are enabled at every loop code, so the update is exact.
Theorem G.2 (g_acc_ao_all, aomod_fair_term; grounded and classical). (i) In gcalc: for every well-formed and , ; and (g_ao_decRel). (ii) Classically, through RGA's soundness for the least model: the HOL loop has no infinite strongly fair run from , .
Proof of Theorem G.2
-
Decidedness and the case lemma. The edge is decided at numbers (aoT_B), with no ATI. From and three case premises, each at every extension and receiving the equations of one disjunct, any well-formed follows (aoB_cases); no tuple rebuild lemma is needed, because the motive below quantifies over every code with the given fields. Impossible cases close by against (ao_ne01) and against (ao_ne12).
-
Introduction and the exit (acc_ao_l, acc_ao_exit). If at every extension every number with aoB is accessible, so is : one fold of the -atom by conversion, universal introduction, the decided edge split. At an exit code every case is refuted.
-
The loop step (acc_ao_loop_step). A loop code is accessible if every loop code with is: the initial case is refuted, component 1 is the hypothesis, and component 2 lands at an exit code.
-
The loop induction (acc_ao_loop). The closed motive (aoMot_l, aoMot_E), and one internal number induction (ir_nat_ind) on . At 0 every component-1 successor would have ; at it has , covered by the hypothesis. The universal over the whole code absorbs the free and the change of .
-
Every code (acc_ao_all). One introduction with no case split on the source: every successor is a loop code, accessible at its own (acc_ao_loop_at), or an exit code.
-
The rows. In gcalc: g_acc_ao_all, g_acc_ao_init, g_ao_decRel. In gcalc_gfix: no path (g_ao_not_path), and no run of aoT, the transformed relation and not the loop, visits the initial code (g_ao_no_run). In gcalc_dich: Acc√Path (g_ao_acc_or_path); in gcalc_gfix_dich: the path atom decided (g_ao_dec_path). OINGA and DINGA readings.
-
The bridge. HOL states , HOL component 0 the increment and 1 the exit, and the encoding aoEnc at or 2 by (aomod_tup_eq, aomod_fields). A HOL exact edge is derivable in RGA at the encoded numerals (aomod_edge_der) and a non-edge is refuted (aomod_edge_neg); through soundness for the least model (aomod_true, by rga_omega_sound), aoT is true at two encoded numerals exactly when the HOL edge holds (aomod_edge_iff).
-
Clause (ii) (aomod_fair_term). By ao_fair_term, exclude for each an infinite chain of exact edges from ((true,0),z). acc_ao_init at the empty context puts the numeral of the initial code in HOL's accessible part of the relation true in the least model (acc_omv_sound); the initial edge of aoT reaches the encoded start code at every , so every start code is accessible; a chain of HOL edges descends along that relation (step 7), and an accessible point has no such chain (aomod_acc_chain). Only the one-directional soundness of accessibility is used; aomod_acc_iff is an extra. For this program the HOL statement also has a direct proof; the point is the pipeline.
The rank at the initial code is , finite at every loop code (a reading of the relation and of the proof). The measure is the postponed component's counter , never the counter that component 1 resets.
G.3 The fairness twin
Definitions. The program is ; ; ; ; . A run that never schedules component 2 enables it at every other step: infinitely often, never continuously. Codes are . Four edge kinds: the initial edge (aoTwl: to 1, , counters free); component 1 at , where component 2 is disabled (aoTwA: incremented, set to 1, counters free); component 1 at (aoTwC: incremented, set to 0, ); component 2 at (aoTwD: to 2, ). The strong body aoTsB adds to the second kind, keeping the disabled component's counter as the exact edge does; the weak body aoTwB omits that conjunct, as the weak edge does. That conjunct is the whole difference between aoTs and aoTw, both relations decided (aoTs_B, aoTw_B). The certificate aoCert holds at a code that is initial, a loop code with , or a loop code with and a successor.
Theorem G.3 (g_acc_aoTs_all, g_aoTw_div; grounded and classical). Let be well-formed. (i) In gcalc: every number is accessible for aoTs (g_acc_aoTs_all; the initial code, g_acc_aoTs_init). (ii) In gcalc_nu: . (iii) In gcalc_gfix_nu_dich: a run of aoTw, a term total in , from the initial code, every value on the path (g_aoTw_run). (iv) Classically: neither OINGA nor DINGA derives Acc from the empty context (oinga_aoTw_not_acc, oingad_aoTw_not_acc, restated at DINGA as dinga_aoTw_not_acc in CD_Junction), nor does RGA (aomod_tw_weak_not_der). (v) Classically: the HOL twin has no infinite strongly fair run from its initial state, and has an infinite weakly fair one (aomod_tw_separation).
Proof of Theorem G.3.
-
Clause (i). A four-way case lemma (aoTsB_cases). A loop code with is accessible if every loop code with one less is (acc_aoTs_c1_step: the second kind is refuted by , the third is the hypothesis, the fourth exits). Any loop code is, under the same hypothesis (acc_aoTs_loop_step): a successor of the second kind keeps and has , and the hypothesis transports along . Then one number induction on at a motive of the shape of aoMot (acc_aoTs_loop); the case on comes from the case lemma, not from a second induction.
-
Clause (ii) (g_aoTw_div). One coinduction step (g_path_coind) at the certificate, from aoCert_init. Closure at a fresh variable: split the certificate's three disjuncts and name a successor in each disjunct by g_path_child_intro. The successors are from the initial code; from , the counter of the disabled component 2 reassigned to ; from and (aoTw_succ0, aoTw_succ1, aoTw_succ2, aoCert_succ). The pattern is that of g_R1p_div.
-
Clause (iii). g_run_of_path at the decided relation (g_aoTw_decRel) and the path of clause (ii).
-
Clause (iv). An empty-context derivation of the accessibility, with g_acc_not_path and clause (ii), would derive , against oinga_consistent_notation (itself proved through ), or oingad_consistent_notation. For RGA: the weakly fair run of clause (v) lifts by ao_wcomplete to a chain of weak edges, every edge an RGA edge of aoTw at the encoded numerals (aomod_tw_wedge_der) and so true in the least model, so the start is not accessible there (aomod_tw_weak_not_acc), and soundness gives the non-derivability.
-
Clause (v). No strongly fair run: the chain of Theorem G.2(ii), with acc_aoTs_init and the bridge for the exact edge (aomod_tw_edge_der, aomod_tw_fair_term). The weakly fair run always schedules component 1, ; the run is weakly and not strongly fair (aomod_tw_weak_run), a fact about the HOL program alone, with no least model on that half.
ao_wcomplete is used only for the non-derivability in RGA; ao_wsound has no downstream use. The twin's bridge is one-directional; no refutation of a non-edge is proved or needed. One reading is withheld: the path atom of clause (ii) read in as an infinite HOL chain, which would need the truth set of a path atom turned into a sequence by dependent choice, with the edge decided at numerals in ; the development has no such lemma, and the classical weak divergence is read off the HOL run instead. The rank at the initial code under aoTs is (a reading).
G.4 The transformation as a term former
Definitions. A program is a HOL list of components : a closed guard a sentence about a program-state code), a closed step , successor first) and a HOL fairness flag, the mask (aoGd, aoStp, aoFr; aoOk says every guard and step is closed and well-formed). A transformed code is , read by aoSt (written st) and aoZc (written z_j). The counter law (aoCtr) of a masked component, from to , is
and for an unmasked one. The edge of component (aoCompB) is and the counter law of every other component, a kit conjunction; the body aoRelB is the kit disjunction over . The term former is the HOL function aoRel from the list to the closed term . aoRelB ; aoRelF is the same relation in the forward orientation, for the eventually atom. A program has decided components (aoDecCs) when, in every context, every guard is decided at every number and every step at every pair of numbers. The motive pack is
with , , lifted as wholes, so they may have free variables (a parametric target, or a predicate that mentions an eigenvariable); the pack is not a closed motive. aoPrd reads a program-state predicate on the program part, and aoZf turns a counter into a function.
Theorem G.4 (aoRel_cases, acc_aoRel_helpful; grounded). In RGA, for every list with aoOk and every well-formed : (i) From aoRelBy and, at every extension and every HOL index , a case premise receiving , and the counter law of every masked , the cases' conclusion follows. (ii) With decided components, the relation is decided (aoRel_B, g_aoRel_decRel). (iii) For well-formed , , : if is decided and a number at every extension, and is progressive for along (at every extension, a with has once every with and has at every further extension), then every number with has (aoMotL_wf). (iv) Let the components be decided, masked, and , well-formed, with, for numbers and
IB is decided, in every context;
P1 gives , in every context;
P2 for every , , and give , in every context;
P3 and give , in every context;
P4 at every extension of , every code whose program part satisfies E is accessible.
Then every number with has .
Clause (iv) is the one-level case of the rule of Grumberg, Francez, Makowsky and de Roever; its rank is (a reading).
Proof of Theorem G.4
-
The kit. Closedness and head steps of both orientations, edge introduction and elimination (aoRel_I, aoRel_E, aoRelF_I, aoRelF_E), and aoRelB_I, which builds an edge from a HOL index, its guard, its step and the other counter laws. The counter law is introduced when enabled with a strict decrease (aoCtr_I_en) or disabled without increase (aoCtr_I_dis); eliminated, an enabled component strictly decreases (aoCtr_E_en) and no counter increases (aoCtr_E_le).
-
Clauses (i) and (ii). Kit disjunction elimination, then aoCompB_D and kit conjunction elimination; cases indexed by HOL numbers need one step lemma per component. Decidedness by HOL induction over the list, with no ATI. Accessibility is introduced from every successor by the decided edge split (acc_aoRel_I), and a code with no enabled component is accessible (acc_aoRel_idle).
-
Clause (iii). One internal number induction on at the pack, with a fresh variable. At 0 every hypothesis case is refuted, since fails (ao_suc_le0); at the hypothesis case reduces to , closed by aoMotL_E. The instance at finishes: well-founded induction on a counter at a decided predicate costs one number induction.
-
Clause (iv). Clause (iii) at , , . At a code with , introduce and split the edge to by clause (i). If , P3 and P4 close. If , P2 gives or at ; closes by P4; in the branch is enabled at the source (P1) and masked, so gives (), and the induction hypothesis closes.
-
The rows, at every program with decided components: in gcalc, g_aoRel_decRel; in gcalc_gfix, from a derived accessibility, no path (g_aoRel_not_path) and no run through the code (g_aoRel_no_run); in gcalc_dich, Acc ∨ Path (g_aoRel_acc_or_path); in gcalc_gfix_dich, the path atom decided (g_aoRel_dec_path).
-
The regression (aoLp). The loop as a list over two-field program codes : both guards (aoLpG), steps aoLpA1 and aoLpA2, both masked, exit set (aoLpE). Exit codes are idle; loop codes are clause (iv) at the exit component (acc_aoLp_loop); every code by a decided split on the guard (g_acc_aoLp_all). The regression has no initial edge, and the relation aoT is not re-derived literally: its code is flat, with an initial edge and the exact update. The twin is not re-derived, and its weak transformation lies outside the term former, which has only the strong, masked law. The regression has no least-model reading.
G.5 The least-model side of the term former
For HOL guards , steps and an encoding of program states, aoGnEnc encodes as the nested Cantor pair of (aoGnCode). The bridge premises, for every component , with derivations in RGA from no hypotheses at encoded numerals, are: BG, if then is derivable; BN, if is masked and then is derivable; BA, if and then the step is derivable.
Theorem G.5 (aomod_gen_fair_term, aomod_gen_fair_ev; classical). For every list with aoOk, under BG, BN and BA: (i) if RGA derives, from no hypotheses, Acc_aoRel at the encoded code of for every , the HOL program has no infinite run from strongly fair for the mask; (ii) for a closed target whose truth in the least model at an encoded code implies of the program part, if RGA derives, from no hypotheses, Ev along aoRelF at the encoded code of for every , every infinite run from strongly fair for the mask reaches a state satisfying .
The pipeline reads RGA derivations from the empty context only, through rga_omega_sound; a derivation that uses ground induction in OINGA is not read by the pipeline. No decidedness premise appears.
Proof of Theorem G.5.
-
The code and the edge at numerals. The kit tuple of numerals is the numeral of the code, read back field by field (aomod_gn_tup_eq, aomod_gn_fields). A relaxed masked HOL edge gives an RGA derivation of aoRelB at the encoded numerals, in both orientations (aomod_gen_edge_der): the guard by BG, the step by BA, and per masked a HOL case on , aoCtr_l_en with BG or aoCtr_l_dis with BN. The refutation of a non-edge is not needed.
-
Clause (i). By ao_fair_xterm, exclude an infinite relaxed chain from each . The derived accessibility is true (aomod_true), so the start lies in HOL's accessible part of the true relation (acc_omv_sound, which needs closedness and well-formedness); each chain edge is true by step 1, against aomod_acc_chain.
-
The eventually atom in the least model (aomod_ev_chain). For closed and , if is true, every sequence from with true edges meets . The atom's truth set is the least fixed point of its operator (gfix_omv_eq_lfp, positivity posP_evPhi). The set of points from which every true chain meets is closed under the operator: the branch is index 0; in the universal branch, the instance at the chain's second point has a false first disjunct, since that edge is true, so the recursive atom puts the second point in the set (aomod_os_varT, aomod_num_inj).
-
Clause (ii) (aomod_gen_fair_ev). ao_fair_xev reduces the claim to relaxed chains; the derived atom is true, each edge is true in the forward orientation (step 1), step 3 gives an index where is true, and the hypothesis on gives .
G.6 The alternating-bit protocol
Definitions. The program-state code is : the message index, the sender's bit, the receiver's expected bit, and the data and acknowledgement channels, each 0 (empty) or (holding bit ). The invariant (aoAblnvH) on the control part is : a stale bit is never taken for a fresh one; its 24 tuples of 36 are listed (aoAblnvL, aoAblnvL_char). Six components: send , lose on the data channel, deliver on the data channel , and at a match ), acknowledge , lose on the acknowledgement channel, deliver on the acknowledgement channel , and , at a match ; the mask aoAbFrH leaves the two losses unconstrained. The grounded guard of (aoAbGd) is membership of the control in the table of invariant tuples enabling (aoAbL), so every guard contains the invariant; steps follow the HOL tables aoAbStH and aoAbIncH. Phase 2 splits into the full-good tuples with (aoAbFG2), the empty ones with (aoAbEM2) and the stale ones with (aoAbST2); phase 1 likewise on . The program aoAbPg has decided components (aoAbPg_dec). aoAbPc X k holds at a code with index , an arbitrary term, and control in the table X. The target aoAbG is . The sentence aoAbSent is
the atom along aoRelF aoAbPg.
Theorem G.6 (aoAb_every, aomod_ab_deliver; grounded and classical). (i) In RGA: from well-formed, , and , , at any index and any counters. (ii) In RGA: (aoAb_sent; in every calculus, g_aoAb_sent). (iii) Classically, through RGA's soundness for the least model: every infinite run of the HOL protocol from index 0, both bits 0 and both channels empty, strongly fair for send, acknowledge and the two deliveries, with the losses unconstrained, reaches an index at least , for every .
The sentence covers the codes with the invariant and index 0; clause (i) covers every invariant code, as a derivation at each and , and in every calculus at a numeral (g_aoAb_sent_at). Read through the atom, clause (i) says that every run of the transformed protocol from reaches an index at least ; the atom also holds vacuously at a code without successor.
Proof of Theorem G.6
-
The tables (HOL, one simp each). Every invariant tuple enabling steps into the invariant (aoAblnv_presH), and the invariant is the union of the two phases (aoAblnv_split). At full-good phase-2 tuples the acknowledgement delivery increments the index and lands in the invariant, and every other step keeps the index and lands at full-good or empty tuples; at empty tuples acknowledge lands at full-good ones and the acknowledgement delivery is disabled; a stale delivery lands at empty tuples (aoAbFG2_tab, aoAbEM2_tab, aoAbST2_tab). Phase 1 mirrors these with the data delivery, which at full-good tuples lands in phase 2 with the index kept, the progress edge.
-
The successor lemma (aoAb_succ). An edge from a code whose control is the HOL tuple hands its case, at every extension, a component with in its table, the successor control, the index law and the counter laws (aoRel_cases, aoAbStp_cases; a different tuple at the same code is refuted by aoAbsL_uniq). Every later case analysis is the successor lemma plus a table fact.
-
The nested induction (aoAb_nest). For a decided closed , an arbitrary target , decided sets FG and EM, a delivery counter , a refill counter and a progress set giving the atom at every extension: if every edge from FG leads to , or to FG or EM with smaller , and every edge from EM leads to FG with not larger, or to EM with not larger and smaller, then every number in FG or EM satisfies . An outer aoMotL_wf on ; inside the outer induction, the full codes by ev_next; then the empty codes by an inner aoMotL_wf on at the predicate “EM and at most ” (aoAbLe), which mentions the outer code : a parametric motive.
-
Phase 2 (aoAb_phase2). If at every extension every invariant code with index satisfies the atom, so does every phase-2 code with index k. The full-good and empty codes by step 3, with the acknowledgement delivery's counter, acknowledge's, and the case lemmas aoAb_cFG2 (by aoCtr_E_en) and aoAb_cEM2 (by aoCtr_E_le). The stale codes by one more aoMotL_wf on the delivery counter: a stale delivery lands at an empty code with its counter reset at random, covered for every counter.
-
Phase 1 and the round (aoAb_phase1, aoAb_round). Phase 1 is the mirror, with the data delivery's and send's counters, aoAb_cFG1, aoAb_cEM1, and step 4 as the progress continuation. The round splits the invariant codes at index by phase.
-
Clause (i) (aoAb_every). aoMotL_wf at the invariant and the distance (aoAbDk), a parameter of the distance and of the target. At , split the distance: at , (aoAbG_I) and the atom folds (ev_now); at , the round at , whose hypothesis is the induction hypothesis, the distance at index being .
-
Clause (ii) (aoAb_sent). Two universal introductions, a decided split on the invariant, clause (i). Rows: in gcalc, g_aoAb_sent, g_aoAb_sent_at, g_aoAb_decRel; in gcalc_dich, g_aoAb_acc_or_path; in gcalc_gfix_dich, g_aoAb_dec_path.
-
The bridge. HOL states ; the HOL guard aoAbGrdH is membership in the table, so every state of a run satisfies the invariant; aoAbActH applies the step and index tables. BG holds (aomod_ab_BG); BN holds for every component, masked or not (aomod_ab_BN, from aoAbIn_neg); BA holds (aomod_ab_BA). Truth of the target at an encoded code implies (aomod_ab_GP, with aomod_gap_pos).
-
Clause (iii) (aomod_ab_deliver). Clause (i) at the empty context, the numeral and every encoded start code, not the sentence; then aomod_gen_fair_ev with the order .
The inductions number seven: two in each nested induction, one per phase for the stale codes, and the distance induction (a count read off the proof script; the check records presence). The rank is per phase, outer on the delivery counter and inner on the refill counter (a reading). The index increments exactly at a matching acknowledgement delivery, which the matching data delivery precedes in the phase order; no HOL statement about data deliveries is made, and no theorem shows the protocol failing under weak fairness.
G.7 The native fairness rule
Definitions. A stream parameter , with Tot , carries a program state and the scheduled component: and . The run sentence aoRunS is Tot . , a kit disjunction. For a component , Fa (aoFaS) is , “never enabled after some point”, and Fb (aoFbS) is , “scheduled infinitely often”. The fairness sentence aoFairS is the kit conjunction of Fa Fb over the masked components: strong fairness in its implication form written as a disjunction. At a model-true stream the two sentences say that the stream is a run strongly fair for the mask (a reading; no least-model reading of the sentences is formalized). The lifted stream aoLiftT at bound streams has the value at (aoLiftV): the counter of is .
Theorem G.7 (g_ao_fair_rule, g_ao_run_ev; grounded). In gcalc_gfix, for every list with aoOk and every well-formed : (i) with decided components, if at every extension every code with is accessible for aoRel, then from , , and , ; (ii) for a well-formed , from and , the atom along aoRelF, (aoEvTgt).
Clause (i) is a rule, a schema in the stream term , not a sentence; clause (ii) needs no decidedness of the components. The regression at aoLp and is g_aolp_fair_rule, its premise from g_acc_aolp_all.
Proof of Theorem G.7
-
The counter laws (in RGA). From (L1) , (ao_ctr_le); with also (L2) , (ao_ctr_lt). The gap arithmetic is ao_gap_mono1, by the decided split gapSub_le_or_lt, and ao_gap_anti2.
-
The bound in the Fb branch. is the least with and , the search (muF) at a decided matrix (ao_fb_dec) whose existence is Fb (ao_fb_open); is total and meets its matrix (ao_fb_Tot, ao_fb_all, by gcalc.mu_choice and g_mu_choice_all). When : (L2), since would force and (ao_fb_L2, no guard premise); and (L1), since is a witness at and the search is minimal (ao_fb_L1, by gcalc.mu_choice_min).
-
The bound in the Fa branch. The constant stream at the existential's witness , an eigenvariable (ao_Tot_const). (L1) is trivial (ao_fa_L1); (L2) uses the guard: from Fa at and , by the decided split of and (ao_fa_L2).
-
The branch continuation (ao_fair_branches). aoBnd says that every bound stream is total and, for masked , at every extension and with , satisfies (L1), and (L2) when . HOL induction on the remaining components (ao_fair_branches_aux): an unmasked component gets the constant 0; a masked one has Fa Fb, eliminated by cases; the Fa existential, written , yields a fresh eigenvariable (rp_not_allE, ir_dnegE). The derivation has leaves for masked components; the HOL text is linear. The result: any goal that follows at every extension and every family with aoBnd follows from aoFairS.
-
The lifted run (ao_lift_step, ao_lift_run). At , the run disjunction (ao_gAny_E) gives the scheduled with its guard and step. For every masked , by numeral distinctness, so (L1) holds; the decided guard (aoDecCsD) is split: enabled gives (L2), ao_ctr_lt and aoCtr_l_en, disabled ao_ctr_le and aoCtr_l_dis. Then g_aoRelB_l and aoRel_l; with totality (ao_lift_Tot), the lifted stream is a run of aoRel.
-
Clause (i). Split on the decided . In the positive branch, step 4 with the continuation: the lifted stream is a run (step 5) whose first value has program part , so the premise makes accessible; g_run_acc (ground induction at the parametric motive "no value of the stream is the point") gives , refuted at . The negative branch is the conclusion.
-
Clause (ii) (g_ao_run_ev). One ground induction (ir_gfix_par) on the eventually atom, at the motive aoEv-Mot, , the stream a parameter, the eigenvariable fresh for the context, the motive and the body. Closure at under the body, at every extension and , by the decided split ; in the branch, the witness (ao_exq); in the universal branch, the run's edge from to (g_runE) turned forward (aoRel_E, aoRel_F_l) gives the motive at , whose instance at is the target. The final instance is at and .
Where a decision would hide. The classical lifting uses one uniform counter (aoCnt), whose finiteness proof (aoPend_finite) splits cases on "j is scheduled again from ", a question, and in the negative case obtains from strong fairness that is never enabled from some point, the negation of a question. A grounded transcription of that counter would have to decide these questions (a reading of the classical proof). The native proof builds the counter inside the branches of each fairness disjunction, by search or as a constant. Every case split of the native proof is on a decided atom: the start equation, a guard at a number, the order of two numbers, and in clause (ii) the equation ; the check forbids ATI, the dichotomy and under both clauses and the regression. A native "every fair run meets the target", combining steps 4 and 5 with clause (ii), is not proved; the fairness eventuality is obtained only classically (Theorem G.5, Theorem G.6). The negated sentence "no stream is a fair run" is not stated, since the calculus has no quantifier over stream terms. The no-variant theorem of random assignment reaches its negation by spending ATI to decide its hypothesis; for "no stream is a fair run" the corresponding hypothesis, the fairness sentence, has leaves (a reading; no non-derivability is proved), and the native reading of fairness is the disjunctive one.
Where the rung rules are spent. For each result: its calculus, and what the check at the end of its theory requires and forbids among ground induction (), coinduction (), the dichotomy (Dich) and ATI. Every result of the four model theories is classical, and the checks of those theories forbid all four rules under the fair-termination and delivery theorems.
| result | calculus | check needs | check forbids |
|---|---|---|---|
| loop, twin, term former, protocol: decidedness, case lemmas, accessibility, aoMotL_wf, acc_aoRel_helpful, aoAb_every, aoAb_sent | gcalc | all four | |
| no path, no run: g_ao_not_path, g_aoTs_no_run, g_aoRel_no_run | μ | μ | ν, Dich, ATI |
| Acc ∨ Path: g_ao_acc_or_path, g_aoTw_acc_or_path, g_aoAb_acc_or_path | Dich | Dich | μ, ν, ATI |
| the path atom decided: g_aoRel_dec_path, g_aoAb_dec_path | μ, Dich | μ, Dich | ν, ATI |
| weak divergence of the twin: g_aoTw_div | ν | ν | μ, Dich, ATI |
| the run of the weak twin: g_aoTw_run | μ, ν, Dich | ν, Dich | |
| bound streams, counter laws, branches, lift: ao_fair_branches, ao_lift_run | gcalc | all four | |
| g_ao_fair_rule, g_aoLp_fair_rule | μ | μ, the search | ν, Dich, ATI |
| g_ao_run_ev | μ | μ | ν, Dich, ATI |
ATI is used nowhere in this appendix. The search enters g_ao_fair_rule through mu_choice_min and g_mu_choice_all, both derived rules of RGA, carried into the calculus by cut. The non-derivability results rest on oinga_consistent and oingad_consistent.
Lemmas a re-mechanization needs.
-
aoPend_finite: the pending set is finite under strong fairness, the one classically split question.
-
aomod_acc_chain: no infinite descending chain from an accessible point (HOL).
-
aoB_cases, aoTsB_cases, aoRel_cases: case lemmas at an eigenvariable code from projection equations alone, each case at every extension; no tuple rebuild lemma.
-
aoCtr_E_en, aoCtr_E_le: the counter law eliminated, a strict decrease when enabled and no increase in either case.
-
aoMotL_E, aoZf_eq: the pack at m eliminated at a code with and , and a counter read as a function.
-
aoAbls_uniq: a code carries one control tuple, so every protocol case analysis is the successor lemma plus a HOL table fact.
-
aoAbln_neg: a control tuple outside a table refutes membership, which gives BN for every component.
-
ao_gap_mono1, ao_gap_anti2: monotonicity and antitonicity of truncated subtraction, the native counters' arithmetic.
-
g_run_acc, g_runE, g_path_coind, g_path_child_intro, g_run_of_path, mu_choice, mu_choice_min, g_mu_choice_all, ev_now, ev_next, gfix_omv_eq_lfp, acc_omv_sound: the generic machinery (Appendix D).
H The Theorems and Their Isabelle Names
Sessions: RGA (the base and the model interface), IGA (the ν-former, the model, the rules, the dichotomy), OIGA (the abstract calculi and the systems), OIGA_Coind (the stream layer and the examples, written Coind below), OGA (the replay and König), IGA_PGSem (certificate-grounded semantics, PGSem below) and IGA_Closing (ATI from the dichotomy, DINGA, the closed-off oracle; Closing below) and Coind_Dinga (the junction theory CD_Junction, which restates every example result oingad_X at DINGA as dinga.dinga_X; Junction below). A name qualified by a calculus, such as gcalc_nu.cs_cind, is the theorem in that abstract calculus; the systems carry instances under their own prefixes. View: grounded, a derivation in a calculus; classical, a HOL theorem about a calculus or the least model; M*, a HOL theorem about the ν-model; def., a definition. A HOL biconditional between two derivability judgments is listed as grounded and classical: an interderivability.
| Statement | Isabelle name | Session | View |
|---|---|---|---|
| Both fixed points (§3) | |||
| falsity set is the lfp; disjointness (Thm. 3.1) | gfix_omv_false_eq_lfp, gfp_lfp_disjoint | IGA | classical |
| never false | gfp_never_false | IGA | classical |
| complement iff decided (Thm. 3.2) | gfp_eq_compl_iff, gdet_gfp_eq, dpos_gdet | IGA | classical |
| determinacy not necessary | liarOr_identity, liarOr_not_gdet | IGA | classical |
| truth-teller; Liar conjunct | tt_gfp, tt_valueless, liar_gap | IGA | classical |
| accessibility's ν-reading is everything | acc_gfp_UNIV, acc_lfp_false_empty | IGA | classical |
| survival game; the up-by-one game | win_gfp_eq, win_surv_iff, stepU_valueless | IGA | classical |
| O at gfp | theorem_D, o_const_gfp_not_lfp | IGA | classical |
| The former, the rule, the model (§4) | |||
| the former; distinct from μ; unfolding | trmNu, trmNu_neq_trmGfix, nu_step1, nu_step2, nu_step3, nu_step4 | IGA | def., classical |
| the clash (Thm. 4.1) | nu_gfix_clash, oinga_gfixNu_inconsistent | IGA, OIGA | classical |
| head steps never turn a ν-atom into a μ-atom | nu_hsteps_not_gfix, nu_hsteps_not_gfix_good | OIGA | classical |
| the rule; the calculus with it | nuS; gcalc_nu (assumption ir_nu) | IGA, OIGA | def. |
| positive replacement; monotonicity; up to union | g_pos_replace, g_nu_mono, g_nu_upto | OIGA | grounded |
| the ν class; invariance under value congruence | nuGood, ovcrdO_INV | IGA | def., classical |
| oracle model; oracle map; Θ* | omvO, Om, Ostar, ocons_Ostar | IGA | def., classical |
| coherence | nu_coherent_T, nu_coherent_F | IGA | M* |
| least model persists | omv_le_omvO_Ostar | IGA | classical |
| the interface; its soundness theorem; RGA sound for M* | omega_model, omega_model.step_M_sound, rga_nu_sound | RGA, IGA | classical |
| coherent oracles; the interface at every one closed under substitution and congruence; the closed-off oracle | cohO, cohO3.nu_model_omega_model, OstarC, closed_off_omega_model | IGA, Closing | def., classical |
| ground induction at M* | omega_model_gfix, gfix_omvO_ind_par | IGA | M* |
| the rule's step is sound | nu_step_mjt | IGA | M* |
| INGA sound, consistent, conservative (Thm. 4.5) | inga_nu_sound, inga_consistent, inga_conservative | IGA | classical |
| OINGA sound, consistent, conservative (Thm. 4.5); OIGA sound for M* | inga_nu_sound, oinga_nu_sound | OIGA | classical |
| unsound for the least model by design (Thm. 4.6) | inga_omega_unsound, nuZ_true, nuZ_true_valueless; inga_Z | IGA | classical; grounded |
| The dichotomy (§5) | |||
| the dual; its laws | ndual, ndual_posP, ndual_exists, ndual_fun, ndual_subf2 | IGA | def., classical |
| the premise | nfdec, nfdec_accPhi | IGA | def. |
| swap identity (Thm. 5.1) | swap_identity | IGA | M* |
| validity characterized; the premise gives bivalence (Thm. 5.2) | dichValid, thmC, dich_premise_bivalent | IGA | M* |
| the rule; its step is sound (Thm. 5.2) | dichS, dich_step_mjt | IGA | def., M* |
| controls | dichB_invalid, botD_never_true, dichA_valid | IGA | M* |
| ATI from the dichotomy (Thm. 5.3) | g_ati_of_dich, gcalc_gfix_dich ⊆ gcalc_ati | Closing | grounded |
| DINGA; its derivability equals OINGA's with the dichotomy | dinga, dinga_derives, dinga_eq_aingad, n2pr_dinga_derives | Closing | def., classical |
| the price (Thm. 5.4) | dinga_dich_price, oinga_dich_price | Closing, OIGA | classical |
| Statement | Isabelle name | Session | View |
|---|---|---|---|
| no certificate-grounded semantics with ATI (Thm. 5.5) | cert_sem_gap, ati_cert_unsound, dich_cert_unsound | PGSem, Closing | classical |
| DINGA and OIGA have none (Cor. 5.6) | dinga_entails_re, dinga_not_cert_sound, oiga_not_cert_sound | Closing, PGSem | classical |
| OINGA sound for M* and has none (Cor. 5.6) same price as bivalence in the least model | oinga_entails_re, oinga_not_cert_sound acc_or_mupath_omega_iff_wf, cbiv_iff_acc_or_mupath | Junction OIGA | classical |
| the dichotomy not valid for the least model, with the ν-atom itself | nu_omv_le_lfp, dich_not_omega_valid | OIGA | classical |
| the same, with the premise derived in RGA true in M* at every decided relation; the contrast exclusion; decided ν-atom (Thm. 5.7) | dich_not_omega_valid_decRel oingad_dich_decided_true, flipD_contrast g_mu_not_nu, g_dec_nu, g_acc_not_path, g_dec_path | OIGA OIGA | classical M*, classical grounded |
| Acc ∨ Path accessibility never false in M*; ¬Acc underivable | g_acc_or_path accO_false_empty, oingad_acc_not_refuted, dinga_acc_not_refuted | OIGA IGA, OIGA, Closing | grounded M*, classical |
| Streams, runs, branches (§6) | |||
| prefix function and set; elementwise view branches; the prefix set a branch (Thm. 6.1); round trip (Thm. 6.2) | pfx, pset, g_pset_elem_iff fbBranch, g_pset_Dec, g_pset_Branch, g_RT_s, g_RT_p | Coind Coind | def., grounded grounded |
| prefix set and branches (Thm. 6.3) | g_pset_path, g_path_pset_hol_iff, g_path_pset_iff, g_path_pset_dec | Coind | grounded, classical |
| generic certificate coinduction runs (Thms. 6.4, 6.5) | g_path_coind stRun, g_run_acc, g_run_path, g_run_of_path | Coind Coind, OGA | grounded def., grounded |
| the replay | gPath, gProg, gpb_run_of_progress | OGA | def., grounded |
| well-founded or explicit branch (Thm. 6.6) | g_tree_acc_or_branch, g_tree_branch, g_tree_elem | Coind | grounded |
| König's lemma as a corollary | koenig_fb_inst, koenig_fb_cor | OGA | grounded |
| the Kleene tree: decided, infinite, no recursive path | kTree_Dec, kTree_InfTree, kleene_no_recursive_path | OGA | grounded, classical |
| Examples (§7) | |||
| random assignment (Thm. 7.1) | g_acc_R1_all, g_R1_no_variant | Coind | grounded |
| nested random assignment at every fixed depth (§9) | rdRel, rd_ti, acc_rdRel, g_acc_rdRel | Coind | def., grounded |
| fair termination through random assignment (Thm. 7.3) | aoT, g_acc_ao_all, g_acc_ao_init, g_ao_not_path, g_ao_acc_or_path | Coind | def., grounded |
| the correspondence of infinite runs; the least-model reading (Thms. G.1, G.2) | ao_sound, ao_complete, ao_fair_term, aomod_fair_term | Coind | classical |
| the relaxed masked edge: correspondence and transfers (Thm. G.1) | aoEdgeX, ao_xsound, ao_xcomplete, ao_fair_xterm, ao_fair_xev | Coind | def., classical |
| the fairness twin: strong termination, weak divergence (Thm. 7.4) | aoTs, aoTw, g_acc_aoTs_init, g_aoTw_div, oinga_aoTw_not_acc | Coind | def., grounded, classical |
| the fairness twin: every strong state accessible; the weak run; non-derivability (Thm. G.3) | g_acc_aoTs_all, g_aoTw_run, oin-gad_aoTw_not_acc, aomod_tw_weak_not_der; at DINGA dinga_aoTw_not_acc | Coind, Junction | grounded, classical |
| the weak correspondence; the fairness twin's separation | ao_wsound, ao_wcomplete, aomod_tw_fair_term, aomod_tw_weak_run, aomod_tw_separation | Coind | classical |
| the transformation as a term former; its case lemma; decideness; the motive pack (Thm. G.4) | aoRel, aoRel_cases, g_aoRel_decRel, aoMotL_wf | Coind | def., grounded |
| the loop as a regression of the term former | aoLp, g_acc_aoLp_all, g_aoLp_fair_rule | Coind | def., grounded |
| one helpful direction; the generic least-model pipeline (Thm. G.5) | acc_aoRel_helpful, aomod_gen_fair_term, aomod_ev_chain, aomod_gen_fair_ev | Coind | grounded, classical |
| the alternating-bit protocol (Thm. 7.6) | aoAbPg, aoAbInv, aoAb_phase2, aoAb_round, aoAb_every, aoAb_sent, g_aoAb_sent_at, aomod_ab_deliver | Coind | def., grounded, classical |
| the native fairness rule (Thm. 7.7) | aoRunS, aoFairS, ao_fair_branches, ao_lift_run, g_ao_fair_rule, g_ao_run_ev | Coind | def., grounded |
| divergent twin (Thm. 7.2) | g_R1p_div, g_R1p_run, g_R1_acc_or_path, g_R1_dec_path | Coind | grounded |
| non-derivability | oinga_R1p_not_acc, oingad_R1p_not_acc; at DINGA dinga_R1p_not_acc | Coind, Junction | classical |
| Statement | Isabelle name | Session | View |
|---|---|---|---|
| rank | acc_Rn_init, g_acc_Rn_init | Coind | grounded |
| termination and divergence (Thm. 7.8) | tr_Q1_iff, tr_Q2_iff, tr_excl | Coind | grounded, classical |
| the gap closed (Thm. 7.9) | tr_term_of_ndiv, tr_dich, tr_dich_dec, tr_ati_disj | Coind | grounded |
| the eventually atom, leads-to; the Lattice and WELL rules (Thm. 7.5); the countdown reaches then goes up | trEv, ltTo, ev_mono_trans, g_lattice, g_lattice_at, g_well, cd_term | Coind | def., grounded |
| the reach atom valueless at ; the premise valueless, underivable, irrefutable | tr_up0tr_reach_not_true, tr_reach_not false, trUp premise_valueless, oin-gad_trUp_dich_priorise_not derivable, tr_dich_prem_valueless, oingad_tr_dich_unavailable; at DINGA dinga_trUp_dich_priorise_not derivable, dinga_tr_dich_prem_open, dinga_tr_dich_unavailable | Coind | grounded, classical |
| a decidedness atom is never false in | nfdec_not_false | Coind | |
| determinacy (Thm. 7.10) | gm_det, gm_excl, gm_decll, g_gmDec | Coind | grounded |
| concrete games | gm_l_one_round, gm_ll copies | Coind | grounded |
| player II's strategy (Thm. 7.11) | gm_sigll | Coind | grounded |
| bucket game (Thm. 7.12) | cs_cind, cs_cind_init, cs_det, cs_decll, cs_stepmother_refuted, cs_sig_total, cs_sig_step | Coind | grounded |
| the round-robin play lost below capacity three (Thm. F.5) | csPlay, cs_rr_tight | Coind | def., grounded |
| the game atom not false in where player I survives | gmSurvI, gm_winI_not_false | Coind | def., |
| the game atom false at a stuck position | gm_winI_stuck_false | Coind | |
| the Stepmother's legal pour; her loss underivable | cs_pour_legal, cs_init_surv, cs_winI_not false, oingad_stepmother_not refuted; at DINGA dinga_stepmother_not refuted | Coind, Junction | grounded, , classical |
| Dec() (Thm. 7.13) | g_dec_O, dinga_dec_O, g_O_not_coO, dcmp_total | OIGA, Closing | grounded |
| Cantor-Bendixson shape | g_cb_dich, g_kernel_perfect, g_cb_rank_induct, g_cb_dec_kernel; at DINGA dinga_cb_dich, dinga_kernel_perfect | OIGA, Closing | grounded |