I am trying to prove a cut-elimination result for a sequent calculus in Coq. I have a derivation of A \vdash B and a derivation of B \vdash C, and I build a derivation of A \vdash C. (My actual sequent calculus is more complex than that, but this is the idea.)
Do you have examples of such cut-elimination proofs already done in this style? I found that doing it in Coq is harder than I thought (details below), and I would have liked to find inspiration in previous developments, but googling for “Coq sequent cut-elimination” does not list an example that I could follow, and in fact it contains more examples of “semantic” cut-elimination arguments than of the usual syntactic approach that I am trying to formalize here.
The examples I found:
- propcalc, for classical propositional logic, does a strong induction on the size of formulas (rather than the size of derivations as one might expect) as the termination measure
- yalla, for linear logic, does a strong induction on the size of both the derivations and the cut formula.
The problem is that this is not obviously a structural induction: there are “principal cases” where both derivations decrease, then there are “commutation” cases where only one of the two derivations decreases (sometime the first one, sometimes the second). So we need to use a measure or well-founded induction.
Furthermore, there is a bit of dependent pattern-matching involved: when you inspect the proof of A \vdash B, you learn about the shape of A and B. For this reason, I have been using Equations, but Equations does not seem to scale to the sequent calculus I am using (
Equations Derive NoConfusion for derivation does not appear to terminate.)
I was looking for solutions where I can write the cut-elimination proof as a program, and I find myself in a bit of a bind:
Program Fixpointis good at dealing with measures, but wants me to do dependent pattern-matching by hand which is proving (in this case; there is a lot of indexing going on in my derivations) above my expertise level, and results in very noisy code.
Equationsdemands well-formed induction, not measures, and seems to struggle in more complex cases.
(For the time being I think that I will revert to the Proof…End mode to write this.)