leanprover / leanprover/reference-manual
Document interaction of `namespace` and `open`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 129
- Forks
- 67
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 16
Description
What question should the reference manual answer?
The current example on open does not contain any cases where open appears inside namespace. The reference manual does not explain that in
def A.B.C.a1 : Nat := 0
def A.C.a2 : Nat := 0
def C.a3 : Nat := 0
namespace A
open B C
#check a1
#check a2
#check a3 -- unknown identifier `a3`
the namespaces _root_.A.B.C and _root_.A.C come into scope, while _root_.C does not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reference manual's current example for open, then review how it is presented alongside namespace. Update the documentation to show the provided example and explain which nested namespaces come into scope; done means the interaction and the _root_.C exception are clear to readers.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100