Sets the default value to `pp.fieldNotation.generalized` to `true`. Updates tests, and fixes some minor flaws in the implementation of the generalized field notation pretty printer. Now generalized field notation won't be used for any function that has a `motive` argument. This is intended to prevent recursors from pretty printing using it as (1) recursors are more like control flow structures than actual functions and (2) generalized field notation tends to cause elaboration problems for recursors. Note: be sure functions that have an `@[app_unexpander]` use `@[pp_nodot]` if applicable. For example, `List.toArray` needs `@[pp_nodot]` to ensure the unexpander prints it using `#[...]` notation.
95 lines
2.4 KiB
Text
95 lines
2.4 KiB
Text
Inferred termination argument:
|
|
termination_by n - i
|
|
Inferred termination argument:
|
|
termination_by xs.size - i
|
|
Inferred termination argument:
|
|
termination_by xs.size - i
|
|
Inferred termination argument:
|
|
termination_by (xs.size - i, ys.size - j)
|
|
Inferred termination argument:
|
|
termination_by (xs.size - i, i - j)
|
|
Inferred termination argument:
|
|
termination_by (xs.size - i, i)
|
|
guessLexDiff.lean:85:26-85:38: error: fail to show termination for
|
|
failure
|
|
with errors
|
|
argument #2 was not used for structural recursion
|
|
failed to eliminate recursive application
|
|
_root_.failure xs i
|
|
|
|
structural recursion cannot be used
|
|
|
|
Could not find a decreasing measure.
|
|
The arguments relate at each recursive call as follows:
|
|
(<, ≤, =: relation proved, ? all proofs failed, _: no proof attempted)
|
|
i #1 #2 i + i
|
|
1) 85:26-38 = = = =
|
|
2) 85:58-76 ? < _ _
|
|
3) 85:26-38 = = = =
|
|
4) 88:26-42 _ < _ _
|
|
5) 88:26-42 ? ≤ ≤ ?
|
|
6) 88:26-42 _ < _ _
|
|
7) 88:26-42 _ < _ _
|
|
8) 88:26-42 _ < _ _
|
|
9) 97:8-20 _ < _ _
|
|
|
|
#1: xs.size - i
|
|
#2: xs.size - (i + 1)
|
|
|
|
Please use `termination_by` to specify a decreasing measure.
|
|
guessLexDiff.lean:102:4-102:18: error: fail to show termination for
|
|
mutual_failure
|
|
mutual_failure2
|
|
with errors
|
|
structural recursion does not handle mutually recursive functions
|
|
|
|
Could not find a decreasing measure.
|
|
The arguments relate at each recursive call as follows:
|
|
(<, ≤, =: relation proved, ? all proofs failed, _: no proof attempted)
|
|
Call from mutual_failure to mutual_failure2 at 104:4-24:
|
|
i #1 #2
|
|
i = ? ?
|
|
#3 ? = ?
|
|
Call from mutual_failure to mutual_failure2 at 104:52-78:
|
|
i #1 #2
|
|
i ? _ _
|
|
#3 _ < _
|
|
Call from mutual_failure to mutual_failure2 at 104:4-24:
|
|
i #1 #2
|
|
i _ _ _
|
|
#3 _ = _
|
|
Call from mutual_failure to mutual_failure2 at 111:4-28:
|
|
i #1 #2
|
|
i _ _ _
|
|
#3 _ < _
|
|
Call from mutual_failure to mutual_failure2 at 117:8-28:
|
|
i #1 #2
|
|
i _ _ _
|
|
#3 _ ? _
|
|
Call from mutual_failure2 to mutual_failure at 123:4-23:
|
|
i #3
|
|
i _ _
|
|
#1 _ _
|
|
#2 _ _
|
|
Call from mutual_failure2 to mutual_failure at 123:50-75:
|
|
i #3
|
|
i _ _
|
|
#1 _ _
|
|
#2 _ _
|
|
Call from mutual_failure2 to mutual_failure at 127:4-27:
|
|
i #3
|
|
i _ _
|
|
#1 _ _
|
|
#2 _ _
|
|
Call from mutual_failure2 to mutual_failure at 133:8-27:
|
|
i #3
|
|
i _ _
|
|
#1 _ _
|
|
#2 _ _
|
|
|
|
|
|
#1: xs.size - i
|
|
#2: xs.size - (i + 1)
|
|
#3: xs.size - i
|
|
|
|
Please use `termination_by` to specify a decreasing measure.
|