leanprover-community / leanprover-community/lean

primed tactics from mathlib

Open
#124 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
433
Forks
79
PR merge metrics
No merged PRs in 30d

Description

Here's a list of "primed" tactics in mathlib which fix bugs or add features to tactics in the core library. I'm not sure which of these should replace their counterparts, if someone else can review this that'd be great. (Feel free to edit this list directly!)

I can try to tackle the ones from tactic.core and tactic.interactive which don't require modifying C++.

Primed tactics in mathlib's tactic.core:

- [ ] iterate', compare iterate in init.meta.tactic.

- [ ] target' is a wrapper around target (C++ implementation here) that instantiates mvars and calls whnf.

Primed tactics in mathlib's tactic.interactive:

  • congr' behaves like congr but takes an optional argument specifying the depth of recursive applications.

  • guard_hyp' fixes guard_hyp by instantiating meta variables.

- [ ] guard_expr_eq' uses is_def_eq, whereas guard_expr_eq uses alpha_eqv.

- [ ] guard_target' uses guard_expr_eq', whereas guard_target uses guard_expr_eq.

  • change' "mimics the behavior of change, except in the case of change x with y at l. In this case, it will correctly replace occurences of x with y at all possible hypotheses in l. As long as x and y are defeq, it should never fail."

Other primed tactics in mathlib:

Any others?

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 by comparing the primed implementations in mathlib's src/tactic/core.lean, src/tactic/interactive.lean, src/tactic/apply.lean, and src/tactic/clear.lean with their counterparts under Lean's library/init/meta files and the linked C++ implementations. Done requires an agreed, reviewed scope for which tactics should replace their core counterparts, including any required changes to the core implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.