Templates in Rewriting Induction

This companion page for the paper Templates in Rewriting Induction shows the Cora proofs for the various recursors and the factorial systems in the paper, using bounded rewriting induction.

To download and install Cora, see the instructions for another submission. These instructions also explain how to invoke Cora's interactive equivalence prover, how to load a proof file and play around in the interactive system.


Recursors

You can download the input file containing all recursors here. This file also contains defined symbols "f" and "g", which are used to stand in for □1 and □2 in the proofs of the conditional inductive theorems. (The odd rules defining f and g are only there to ensure that Cora does not consider them as constructor symbols.)

Lemma 4.1

The unconditional equivalences are listed below:

Lemma 4.8

And here are the conditional equivalences. These use the extra symbols f and g and they are not complete proofs, since they leave the axioms open as equations in the system. If those axioms could also be proved (with other terms taking the place of f and g) we would clearly have a complete proof.


Factorial equivalences

Now we see the proofs of the equivalences between the various forms of factorial

Example 4.2

factTU x ≈ factRD x | x ≥ 1: lcstrs input file with the rules for factTU and factRD (and corresponding recursors)

Example 4.3

factTD x ≈ factRU x | x ≥ 1: lcstrs input file with the rules for factTD and factRU (and corresponding recursors)

Example 4.4

factTU x ≈ factRD x | x ≥ 1: lcstrs input file with the rules for factTU and factRD (and corresponding recursors)

Example 4.5

factTD x ≈ factRU x | x ≥ 1: lcstrs input file with the rules for factTD and factRU (and corresponding recursors)

Remaining factorial equivalences (not discussed in the paper)


Composite equivalence

Finally, let us consider the equivalence of Section 4.4:

In this case, Cora actually fails to find the termination proof automatically. This is because of the use of static dependency pairs for the termination check in the current version of Cora, where for instance taildown(helperG(h), x1, y, h(x) * a) is not considered a valid left-hand side because the higher-order variable h occurs applied.

Nevertheless, we can see that the ordering requirements can be satisfied, since they are captured by the following terminating term rewriting system (presented in Cora notation)::

In the future, we hope to adapt Cora to find such termination abstractions automatically.