Notation scope = little theories (import closure), not the vault
The vault dwarfs a LaTeX paper, so a single flat preamble/registry is wrong (name collisions, unmanageable). The scoping answer is sTeX's little theories.
The rule
- Each note = a little theory; a symbol-macro is declared in its home note (
\Varietyin ashby). - A note may use a symbol iff its home is in that note's transitive import closure (walk
> Prereq:/[[…]]— the 树桩 search). - Scope = the import closure, NOT the vault.
Why the huge vault is a non-issue
Little theories scale precisely because you never hold all symbols at once — only a note's import closure (dozens, not thousands). This is how Lean mathlib / sTeX archives (both enormous) work: V means different things in different closures, by design. Vault size ⟂ scope size — the size never enters resolution.
Collisions only exist within one closure
V@ashby (variety) and V@adaptive-commitment-value (option value) are different theories → never collide — unless a single note imports both, then alias/disambiguate (rare). So scoping dissolves the global-conflation worry: don't keep a global registry, keep per-note closures.
The Obsidian bridge (the one wrinkle)
Obsidian's MathJax has no per-note-import compiler (sTeX does) — only a global preamble or per-note \newcommand. So:
- Declare in the home note;
- Render: generate one global preamble with globally-unique macro names (e.g.
\ashbyV); the renderer ignores scope; - Scope is enforced by the lint: a note may only use macros whose home is in its import closure; a name ambiguous within the closure → "disambiguate". Render global, use scoped-by-lint.
Naming knob
- A: global long names
\ashbyV— zero ambiguity, no compiler, but verbose in formulas; - B: per-note short alias — each note opens
$\newcommand\V{\ashbyV}$, writes\V; short, scope explicit on the alias line, lint checks the alias target is in-closure. Lean B.
One line
Scope = each note's prerequisite/link transitive closure (a little theory), not the vault; however big the vault, resolution is always against one closure — exactly how Lean mathlib survives. Obsidian renders from a global unique-named preamble; the lint enforces the real per-note scope. See notation-checking-prior-art.