Extracting total Amb programs from proofs
Pith reviewed 2026-05-24 08:22 UTC · model grok-4.3
The pith
CFP logic extracts total nondeterministic and concurrent programs from formal proofs by interpreting angelic choice.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
CFP is an intuitionistic first-order logic with inductive and coinductive definitions extended by Restriction (binary) and a unary operator for total concurrency. Formal proofs in CFP yield lambda terms with the Amb constructor; these terms are provably total and correct with respect to the original specifications via a domain-theoretic semantics that models Amb as globally angelic choice.
What carries the argument
The Amb constructor for globally angelic choice, justified by the restriction and total-concurrency operators whose proof rules incorporate variants of excluded middle.
If this is right
- Extracted programs are guaranteed total and correct with respect to their specifications.
- Nondeterministic and concurrent behaviors become formally verifiable through proofs in CFP.
- Proof rules involving classical principles become computationally realizable once Amb is available.
- Concrete translations between infinite representations, such as Gray code to signed digits, can be realized by total nondeterministic programs.
Where Pith is reading between the lines
- The same technique might be applied to other choice primitives whose semantics can be captured domain-theoretically.
- One could test whether the extracted Gray-code program indeed produces all possible signed-digit expansions on repeated runs.
- CFP-style operators could be added to existing proof assistants to support verified extraction of programs with built-in nondeterminism.
Load-bearing premise
The domain-theoretic denotational semantics correctly models the operational behavior of Amb and ensures extracted programs satisfy the logical specifications.
What would settle it
An extracted Amb program obtained from a valid CFP proof that fails to terminate on some input or fails to satisfy the specification stated in the proof.
read the original abstract
We present a logical system CFP (Concurrent Fixed Point Logic) supporting the extraction of nondeterministic and concurrent programs that are provably total and correct. CFP is an intuitionistic first-order logic with inductive and coinductive definitions extended by two propositional operators: Restriction (binary), a strengthening of implication, and a unary operator for total concurrency. The source of the extraction is formal CFP proofs, the target is a lambda calculus with constructors and recursion extended by a constructor Amb (for McCarthy's amb) which is interpreted operationally as globally angelic choice and is used to implement nondeterminism and concurrency. The correctness of extracted programs is proven via an intermediate domain-theoretic denotational semantics. We demonstrate the usefulness of our system by extracting a nondeterministic program that translates infinite Gray code into the signed digit representation. A noteworthy feature of CFP is the fact that the proof rules for restriction and concurrency involve variants of the classical law of excluded middle that would not be interpretable computationally without Amb. This is a revised and extended version of the conference paper presented at ESOP 2022 with the same title that contains full proofs of all major results.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces Concurrent Fixed Point Logic (CFP), an intuitionistic first-order logic extended with inductive and coinductive definitions, a binary Restriction operator (a strengthening of implication), and a unary total concurrency operator. Formal CFP proofs serve as the source for extracting programs in a lambda calculus extended by the Amb constructor (interpreted as globally angelic choice for nondeterminism and concurrency). Correctness and totality of extracted programs are established via an intermediate domain-theoretic denotational semantics that is shown adequate with respect to the operational semantics. The system is illustrated by extracting a nondeterministic program translating infinite Gray code into signed-digit representation. The proof rules for Restriction and concurrency incorporate variants of excluded middle that become computationally interpretable only in the presence of Amb. This is a revised and extended journal version of the ESOP 2022 conference paper, now containing full proofs of all major results including the extraction theorem.
Significance. If the central results hold, the work makes a substantive contribution to program extraction in the presence of nondeterminism and concurrency by providing a logically principled route to total, correct Amb programs. The explicit adequacy proof between domain-theoretic and operational semantics, together with the full formalization of the extraction theorem, supplies the kind of rigorous foundation that is often missing in extraction systems involving choice operators. The Gray-code example further demonstrates applicability to infinite data and coinductive reasoning.
minor comments (3)
- [§1] §1 (Introduction): the precise syntactic distinction between the Restriction operator and ordinary implication is introduced only informally; an early displayed definition of the two connectives side-by-side would improve readability for readers unfamiliar with the ESOP version.
- The domain-theoretic model is described as using 'standard' constructions, yet the precise choice of domain (e.g., whether it is the Plotkin powerdomain or a variant tailored to angelic choice) is not stated until the semantics section; an explicit sentence in the overview would help.
- Table or figure numbering for the Gray-code extraction example is absent from the abstract and early sections; cross-references to the concrete extracted term and its specification would make the running example easier to track.
Simulated Author's Rebuttal
We thank the referee for the positive assessment and recommendation to accept. The summary accurately captures the core contributions of CFP, the extraction theorem, the adequacy result, and the Gray-code example.
Circularity Check
No significant circularity
full rationale
The paper supplies explicit proofs of the extraction theorem and semantic adequacy for the Amb operator. These rest on standard intuitionistic logic with inductive/coinductive definitions plus domain theory, without any reduction of the main claims to fitted parameters, self-definitional equations, or load-bearing self-citations. The derivation chain is self-contained and externally verifiable via the stated proof rules and semantics.
Axiom & Free-Parameter Ledger
axioms (1)
- standard math Intuitionistic first-order logic with inductive and coinductive definitions is sound and supports program extraction.
invented entities (3)
-
Restriction operator
no independent evidence
-
Total concurrency operator
no independent evidence
-
Amb constructor
no independent evidence
Lean theorems connected to this paper
-
IndisputableMonolith/Foundation/AbsoluteFloorClosure.leanreality_from_one_distinction unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
CFP is an intuitionistic first-order logic with inductive and coinductive definitions extended by two propositional operators: Restriction (binary) ... and a unary operator for total concurrency.
What do these tags mean?
- matches
- The paper's claim is directly supported by a theorem in the formal canon.
- supports
- The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
- extends
- The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
- uses
- The paper appears to rely on the theorem as machinery.
- contradicts
- The paper's claim conflicts with a theorem or certificate in the canon.
- unclear
- Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.