Introducing an admit_termination
attribute
#2896
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, I don't think we have a good way of working on a total function while disregarding its termination. This can be useful when the termination is non-trivial (although perhaps evident to a human) so we want to postpone its proof, but without
admit
ing anything else in the function. (This is exactly my reason to add it, working on some big lemma over reflected syntax.)This PR then introduces an attribute
admit_termination
that can be used to disable termination checking for a given letbinding, by not refining its domain with a precedes relation (as if it were in a non-total effect). So this works:But this does not:
The attribute can actually be attached to individual letbindings in a recursive group, not necessarily the entire group, see this:
However, we don't have surface syntax to attach attributes to top-level letbindings (only to the sigelt). And these attributes were not propagated to the letbindings--- this PR changes that. I took a look at adding syntax for attributes for bindings, but it's not clear what it should look like, since the sigelt can also have attributes.