leanprover / leanprover/reference-manual

withMainContext

Open
#132 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc-request
Dominant language
Lean
Stars
129
Forks
67
Avg merge
1d 15h
Merged PRs (30d)
16

Description

What question should the reference manual answer?

One of the most common tactic bugs (seen at least a dozen times in examples on Zulip or in Mathlib PRs) is a missing withMainContext. What is a context? How is the context determined by default, and how does this change if a tactic is wrapped in withMainContext?

Maybe you could include an example of a small tactic with this error, showing the classic behaviour which signals this bug (tactic mysteriously ignores variables/hypotheses/goals which were not present at the start of the problem), and then a fixed version of the tactic.

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 with the issue's linked Zulip discussion and the existing reference manual structure; no specific file or section is named in the payload. Done means documenting what a context is, how it is selected by default, how withMainContext changes it, and including a minimal erroneous tactic example alongside its fixed version.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
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.