leanprover / leanprover/reference-manual

Document interaction of `namespace` and `open`

Open Beginner friendly
#884 0 comments 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?

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.