A Cyclic Proof System for HFLN

Mayuko Kori, Takeshi Tsukada, Naoki Kobayashi · DOI

Abstract

A cyclic proof system allows us to perform inductive reasoning without explicit inductions. We propose a cyclic proof system for $HFL_{\mathbb{N}}$, which is a higher-order predicate logic with natural numbers and alternating fixed-points. Ours is the first cyclic proof system for a higher-order logic, to our knowledge. Due to the presence of higher-order predicates and alternating fixed-points, our cyclic proof system requires a more delicate global condition on cyclic proofs than the original system of Brotherston and Simpson. We prove the decidability of checking the global condition and soundness of this system, and also prove a restricted form of standard completeness for an infinitary variant of our cyclic proof system. A potential application of our cyclic proof system is semi-automated verification of higher-order programs, based on Kobayashi et al.'s recent work on reductions from program verification to $HFL_{\mathbb{N}}$ validity checking.

Introduction

Verifying the correctness of modern software often necessitates inductive reasoning. For instance, proving that a recursive function eventually terminates or that a loop maintains a specific invariant requires demonstrating that if a property holds for a state $n$, it holds for $n+1$. In traditional logic, this is handled via explicit induction rules. However, these rules are notoriously difficult to automate because they require the "discovery" of an appropriate induction hypothesis—a task that often requires human intuition.

Cyclic proof systems offer a compelling alternative. Instead of the traditional tree-shaped structure of standard proofs, cyclic proofs allow for "back-links," creating cycles within the proof structure. These cycles represent inductive steps. To ensure that such reasoning is not fallaciously circular, these systems impose a "global trace condition." This paper introduces the first such cyclic proof system for Higher-Order Fixed-Point Logic with Natural Numbers ($HFL_{\mathbb{N}}$), a logic specifically suited for the verification of higher-order functional programs like those written in OCaml or Haskell.

The $HFL_{\mathbb{N}}$ Logic and the Challenge of Higher-Order Proofs

$HFL_{\mathbb{N}}$ is a powerful logic that extends first-order logic with higher-order predicates and both least ($\mu$) and greatest ($\nu$) fixed-point operators. While cyclic proof systems have been successfully developed for first-order logic, extending them to higher-order logic introduces significant complexity.

In first-order systems, one typically tracks the "descent" of natural numbers or inductive definitions along a cycle to ensure soundness. In $HFL_{\mathbb{N}}$, the system must account for the interaction between higher-order function applications and nested, alternating fixed-point operators. The core innovation of this work is the development of a delicate global trace condition inspired by game semantics, which tracks how fixed-point operators are unfolded across the cycles of the proof.

The Cyclic Proof System

The proposed system is built upon a sequent calculus framework. The primary mechanism for induction is the repeated unfolding of fixed-point operators.

  1. Induction via Unfolding: The system treats the infinite unfolding of a least fixed-point ($\mu$) on the left-hand side of a sequent as a logical contradiction (an infinite descent), thereby validating the proof. Conversely, the infinite unfolding of a greatest fixed-point ($\nu$) on the right-hand side serves a similar role.
  2. Tracking Complexity: To manage the higher-order nature of the logic, the authors annotate fixed-point operators with sequences of natural numbers. This allows the system to track the "depth" of unfolding even when functions are passed as arguments to other functions.
  3. The Global Trace Condition: A cyclic proof is considered valid only if every infinite path through the proof graph contains an "infinitely progressing trace." For $HFL_{\mathbb{N}}$, this means identifying a specific fixed-point operator that is unfolded infinitely many times and is the most significant (outermost) such operator in the nesting hierarchy.

Theoretical Results: Soundness and Decidability

A critical requirement for any proof system intended for automation is that it must be sound and its proofs must be checkable. The authors provide rigorous proofs for several key properties:

  • Soundness: They demonstrate that any cyclic proof satisfying the global trace condition is mathematically valid; if a proof exists in the system, the statement is true in the standard model.
  • Decidability: The authors prove that checking whether a candidate cyclic proof satisfies the global trace condition is decidable. This is achieved by reducing the problem to the containment problem for Büchi automata, which are used to process infinite paths in the proof graph.
  • Restricted Completeness: While Gödel's Incompleteness Theorem prevents any finite system from being fully complete for $HFL_{\mathbb{N}}$ (as it includes Peano Arithmetic), the authors prove a form of completeness for an "infinitary" version of the system for formulas without higher-order free variables.

Conclusion and Future Directions

This work bridges the gap between abstract proof theory and the practical needs of program verification. By providing a formal framework for cyclic proofs in higher-order logic, the authors lay the groundwork for new semi-automated verification tools. Unlike traditional inductive provers that struggle with hypothesis generation, a cyclic prover can focus on searching for valid cycles and verifying them against the global trace condition.

Future research will focus on implementing these algorithms into automated verification tools and exploring the property of "cut-elimination" within this cyclic framework to further simplify the generated proofs.

Summary updated

BibTeX
@inproceedings{kori2021cyclic,
  author = {Mayuko Kori and Takeshi Tsukada and Naoki Kobayashi},
  title = {{A Cyclic Proof System for HFLN}},
  booktitle = {CSL},
  year = {2021},
  url = {https://openreview.net/forum?id=mpAveWQyZ4},
}
Figure