lean4-htt/tests/lean/interactive/terminationBySuggestion.lean.expected.out
Joachim Breitner 32dcc6eb89
feat: GuessLex: avoid writing sizeOf in termination argument when not needed (#3630)
this makes `termination_by?` even slicker.

The heuristics is agressive in the non-mutual case (will omit `sizeOf`
if the argument is non-dependent and the `WellFoundedRelation` relation
is via `sizeOfWFRel`.

In the mutual case we'd also have to check the arguments, as they line
up in the termination argument, have the same types. I did not bother at
this point; in the mutual case we omit `sizeOf` only if the argument
type is `Nat`.

As a drive-by fix, `termination_by?` now also works on functions that
have only one plausible measure.
2024-03-10 22:57:10 +00:00

36 lines
1.1 KiB
Text

{"title": "Try this: termination_by (n, m)",
"kind": "quickfix",
"isPreferred": true,
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 4, "character": 0},
"end": {"line": 4, "character": 15}},
"newText": "termination_by (n, m)"}]}]}}
{"title": "Try this: termination_by n",
"kind": "quickfix",
"isPreferred": true,
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 11, "character": 0},
"end": {"line": 11, "character": 15}},
"newText": "termination_by n"}]}]}}
{"title": "Try this: termination_by x1 => x1",
"kind": "quickfix",
"isPreferred": true,
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 17, "character": 0},
"end": {"line": 17, "character": 15}},
"newText": "termination_by x1 => x1"}]}]}}