leanprover / leanprover/lean4

RFC: Recording of Open Namespaces

Open
#6,050 2 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium RFC
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Proposal

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/docgen.20scoped.20notations/near/481956588 brought up the issue of scoped notation within doc-gen. As the post shows we currently have no way to know precisely what notations where available when a theorem or definition was declared.

My proposal to address this would be to record the namespaces that were open when a definition was done in an environment extension. This extension could then be introspected by doc-gen in order to pretty print declarations that used scoped notation correctly.

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

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 linked Zulip discussion on scoped notation and the doc-gen context, then investigate how Lean 4 could record open namespaces in an environment extension. Done means doc-gen can introspect that recorded information and pretty-print declarations using scoped notation correctly.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, documentation
Issue type
Feature
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.