Coinduction is an elegant technique to prove inclusions into sets defined as greatest fixed points. A common pattern is to prove statements that are almost inclusions into greatest fixed points, but that are guarded by an existential quantification. In these cases, coinduction cannot be employed without first instantiating the quantifier. However, if not for the quantifier, the rest of the proof would, in principle, follow by a simple coinductive argument.
In this paper, we introduce a technique to handle such proofs without having to explicitely provide an entire existential witness up-front. Instead, it enables a more declarative approach in which users specify an “abstract machine” that constructs the witness “one step at a time”. The technique is primarily designed for mechanized reasoning in type-theory-based proof assistants; a setting in which proofs combining existence and coinduction are famously difficult because of tensions between the obligation to provide existential witnesses constructively, the subtlety of guarded corecursion as the main mechanism to construct coinductive objects, and the inability to employ large elimination from propositions to types. Our declarative approach hides these obstacles behind a simple interface, letting users reason about abstract specifications rather than concrete existential witnesses. We implement the technique in the Rocq proof assistant, and demonstrate its use on a selection of examples.