fix: preserve symbol hover for fun_induction function target (#13678)
This PR ensures that one can hover over the function name in fun_induction. Fixes #13673 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
443615f27e
commit
9151360469
3 changed files with 19 additions and 1 deletions
|
|
@ -1024,7 +1024,7 @@ Elaborates the `foo args` of `fun_induction` or `fun_cases`, inferring the args
|
|||
def elabFunTargetCall (cases : Bool) (stx : Syntax) : TacticM Expr := do
|
||||
match stx with
|
||||
| `($id:ident) =>
|
||||
let fnName ← realizeGlobalConstNoOverload id
|
||||
let fnName ← realizeGlobalConstNoOverloadWithInfo id
|
||||
let unfolding := tactic.fun_induction.unfolding.get (← getOptions)
|
||||
let some funIndInfo ← getFunIndInfo? (cases := cases) (unfolding := unfolding) fnName |
|
||||
let theoremKind := if cases then "cases" else "induction"
|
||||
|
|
|
|||
|
|
@ -346,3 +346,12 @@ coinductive InfSeq (r : α → α → Prop) : α → Prop where
|
|||
|
||||
#check InfSeq.step
|
||||
--^ textDocument/hover
|
||||
|
||||
def map' (f : α → β) : List α → List β
|
||||
| [] => []
|
||||
| a::as => f a :: map' f as
|
||||
|
||||
example (xs : List α) : map' id xs = xs := by
|
||||
fun_induction map'
|
||||
--^ textDocument/hover
|
||||
<;> simp_all only [id]
|
||||
|
|
|
|||
|
|
@ -756,3 +756,12 @@
|
|||
{"value":
|
||||
"```lean\nInfSeq.step.{u_1} {α : Sort u_1} (r : α → α → Prop) {a b : α} : r a b → InfSeq r b → InfSeq r a\n```\n***\nTake a step ",
|
||||
"kind": "markdown"}}
|
||||
{"textDocument": {"uri": "file:///hover.lean"},
|
||||
"position": {"line": 354, "character": 16}}
|
||||
{"range":
|
||||
{"start": {"line": 354, "character": 16},
|
||||
"end": {"line": 354, "character": 20}},
|
||||
"contents":
|
||||
{"value":
|
||||
"```lean\nmap'.{u_1, u_2} {α : Type u_1} {β : Type u_2} (f : α → β) : List α → List β\n```",
|
||||
"kind": "markdown"}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue