lean4-htt/tests/lean/interactive/incrementalTactic.lean.expected.out
Kyle Miller 407a59d697
feat: pretty print props with only if domain is prop, add pp.foralls (#7812)
This PR modifies the pretty printing of pi types. Now `∀` will be
preferred over `→` for propositions if the domain is not a proposition.
For example, `∀ (n : Nat), True` pretty prints as `∀ (n : Nat), True`
rather than as `Nat → True`. There is also now an option `pp.foralls`
(default true) that when false disables using `∀` at all, for
pedagogical purposes. This PR also adjusts instance implicit binder
pretty printing — nondependent pi types won't show the instance binder
name. Closes #1834.

The linked RFC also suggests using `_` for binder names in case of
non-dependance. We're tabling that idea. Potentially it is useful for
hygienic names; this could improve how `Nat → True` pretty prints as `∀
(a : Nat), True`, with this `a` that's chosen by implication notation
elaboration. Relatedly, this PR exposes even further the issue where
binder names are reused in a confusing way. Consider: `Nat → Nat → (a :
Nat) → a = a` pretty prints as `∀ (a a a : Nat), a = a`.
2025-04-04 02:55:47 +00:00

127 lines
4.1 KiB
Text

b 0
b 1
b 2
b 2.5
t 0
t 1
t 2
t 2
{"version": 3,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 4, "character": 12}, "end": {"line": 4, "character": 13}},
"message":
"tactic 'introN' failed, insufficient number of binders\na n : Nat\n⊢ True",
"fullRange":
{"start": {"line": 4, "character": 12},
"end": {"line": 4, "character": 13}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 22}, "end": {"line": 3, "character": 0}},
"message": "unsolved goals\nthis : ∀ (a a : Nat), True\n⊢ True",
"leanTags": [1],
"fullRange":
{"start": {"line": 2, "character": 22},
"end": {"line": 10, "character": 11}}}]}
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 1, "character": 38}, "end": {"line": 4, "character": 3}},
"message": "unexpected token '/-!'; expected ')', '_', identifier or term",
"fullRange":
{"start": {"line": 1, "character": 38},
"end": {"line": 4, "character": 3}}}]}
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 9}, "end": {"line": 2, "character": 11}},
"message": "unknown identifier 'no'",
"fullRange":
{"start": {"line": 2, "character": 9}, "end": {"line": 2, "character": 11}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 3, "character": 9}, "end": {"line": 3, "character": 16}},
"message": "unsolved goals\n⊢ Nat",
"leanTags": [1],
"fullRange":
{"start": {"line": 3, "character": 9},
"end": {"line": 3, "character": 16}}}]}
s
{ goals := #[{ type := Lean.Widget.TaggedText.tag
{ subexprPos := "/", diffStatus? := none }
(Lean.Widget.TaggedText.text "True"),
isInserted? := some false,
isRemoved? := none,
hyps := #[] }] }
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 8}, "end": {"line": 2, "character": 25}},
"message":
"tactic 'rewrite' failed, did not find instance of the pattern in the target expression\n 0\n⊢ True",
"fullRange":
{"start": {"line": 2, "character": 8},
"end": {"line": 2, "character": 25}}}]}
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 3, "character": 12}, "end": {"line": 3, "character": 16}},
"message": "unsolved goals\ncase zero\n⊢ True",
"leanTags": [1],
"fullRange":
{"start": {"line": 3, "character": 12},
"end": {"line": 3, "character": 16}}}]}
{"version": 2,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 6}, "end": {"line": 2, "character": 10}},
"message": "unsolved goals\n⊢ True",
"leanTags": [1],
"fullRange":
{"start": {"line": 2, "character": 6}, "end": {"line": 2, "character": 10}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 3, "character": 4}, "end": {"line": 3, "character": 10}},
"message": "no goals to be solved",
"fullRange":
{"start": {"line": 3, "character": 4}, "end": {"line": 3, "character": 10}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 4, "character": 2}, "end": {"line": 4, "character": 8}},
"message": "no goals to be solved",
"fullRange":
{"start": {"line": 4, "character": 2}, "end": {"line": 4, "character": 8}}}]}
{"version": 2,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 3, "character": 8}, "end": {"line": 3, "character": 21}},
"message": "unknown identifier 'noSuchTheorem'",
"fullRange":
{"start": {"line": 3, "character": 8},
"end": {"line": 3, "character": 21}}}]}