This PR modifies `let` and `have` term syntaxes to be consistent with each other. Adds configuration options; for example, `have` is equivalent to `let +nondep`, for *nondependent* lets. Other options include `+usedOnly` (for `let_tmp`), `+zeta` (for `letI`/`haveI`), and `+postponeValue` (for `let_delayed)`. There is also `let (eq := h) x := v; b` for introducing `h : x = v` when elaborating `b`. The `eq` option works for pattern matching as well, for example `let (eq := h) (x, y) := p; b`. Future PRs will add these options to tactic syntax, once a stage0 update has been done.
77 lines
1.8 KiB
Text
77 lines
1.8 KiB
Text
c 0
|
|
c 1
|
|
c 2
|
|
c 2.5
|
|
{"version": 2,
|
|
"uri": "file:///incrementalCombinator.lean",
|
|
"diagnostics":
|
|
[{"source": "Lean 4",
|
|
"severity": 2,
|
|
"range":
|
|
{"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 9}},
|
|
"message": "declaration uses 'sorry'",
|
|
"fullRange":
|
|
{"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 9}}}]}
|
|
d 0
|
|
d 1
|
|
d 2
|
|
d 3
|
|
d 2.5
|
|
d 3
|
|
h 0
|
|
h 1
|
|
h 2
|
|
h 3
|
|
h 1
|
|
h 2.5
|
|
h 3
|
|
sh
|
|
{"version": 1,
|
|
"uri": "file:///incrementalCombinator.lean",
|
|
"diagnostics":
|
|
[{"source": "Lean 4",
|
|
"severity": 1,
|
|
"range":
|
|
{"start": {"line": 2, "character": 17}, "end": {"line": 3, "character": 0}},
|
|
"message": "unsolved goals\n⊢ True",
|
|
"leanTags": [1],
|
|
"fullRange":
|
|
{"start": {"line": 2, "character": 17},
|
|
"end": {"line": 6, "character": 18}}},
|
|
{"source": "Lean 4",
|
|
"severity": 1,
|
|
"range":
|
|
{"start": {"line": 1, "character": 24}, "end": {"line": 2, "character": 0}},
|
|
"message": "unsolved goals\nthis : True\n⊢ True",
|
|
"leanTags": [1],
|
|
"fullRange":
|
|
{"start": {"line": 1, "character": 24},
|
|
"end": {"line": 6, "character": 18}}}]}
|
|
sh
|
|
{"version": 2,
|
|
"uri": "file:///incrementalCombinator.lean",
|
|
"diagnostics":
|
|
[{"source": "Lean 4",
|
|
"severity": 1,
|
|
"range":
|
|
{"start": {"line": 2, "character": 18}, "end": {"line": 3, "character": 0}},
|
|
"message": "unsolved goals\n⊢ True",
|
|
"leanTags": [1],
|
|
"fullRange":
|
|
{"start": {"line": 2, "character": 18},
|
|
"end": {"line": 6, "character": 18}}},
|
|
{"source": "Lean 4",
|
|
"severity": 1,
|
|
"range":
|
|
{"start": {"line": 1, "character": 24}, "end": {"line": 2, "character": 0}},
|
|
"message": "unsolved goals\nthis : True\n⊢ True",
|
|
"leanTags": [1],
|
|
"fullRange":
|
|
{"start": {"line": 1, "character": 24},
|
|
"end": {"line": 6, "character": 18}}}]}
|
|
n 0
|
|
n 1
|
|
n 1.5
|
|
i 0
|
|
i 1
|
|
i 1.5
|