leanprover-community / leanprover-community/mathlib4

Feature Request: `ext?`

Open
#26,042 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement t-meta
Dominant language
Lean
Stars
4.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I am requesting a tactic ext? as the ? analogue of ext. Like the other ? tactics (simp?, exact?, apply?), it would output a clickable text in the infoview that would replace the call to ext?.

The result of the conversion would look like refine [ext_lemma] fun i ↦ ?_. In the case of two or more @[ext] lemmas being applied, the result should also show this.

Zulip discussion: #Is there code for X? > ext?

Testcase:

import Mathlib

lemma test {X Y Z : Type*} (f g : X → Y → Z) : f = g := by
  ext x y
  -- ⊢ f x y = g x y
  sorry

Here ext? x y would be expected to produce the clickable text replacing itself with refine funext fun x ↦ funext fun y ↦ ?_.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the existing ext tactic and the analogous simp?, exact?, and apply? tactics, then use the supplied testcase to inspect the expected infoview output. Done means ext? produces clickable replacement text for one or multiple extension lemmas, including the shown nested funext form.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.