Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This refactoring PR changes the structure of the `FunInd` module, with the main purpose to make it easier to support mutual structural recursion. In particular the recursive calls are now longer recognized by their terms (simple for well-founded recursion, `.app oldIH [arg, proof]`, but tedious for structural recursion and even more so for mutual structural recursion), but the type after replacing `oldIH` with `newIH`, where the type will be simply and plainly `mkAppN motive args`). We also no longer try to guess whether we deal with well-founded or structural recursion but instead rely on the `EqnInfo` environment extensions. The previous code tried to handle both variants, but they differ too much, so having separate top-level functions is easier. This also fuses the `foldCalls` and `collectIHs` traversals and introduces a suitable monad for collecting the inductive hypotheses.
- Loading branch information