@@ -14,7 +14,7 @@ import Mathlib.Geometry.Manifold.Traces
1414This file defines custom elaborators for differential geometry, to allow for more compact notation.
1515There are two classes of elaborators. The first provides more compact notation for differentiability
1616and continuous differentiability on manifolds, including inference of the model with corners.
17- They allow writing
17+ All these elaborators are scoped to the `Manifold` namespace. They allow writing
1818- `MDiff f` for `MDifferentiable I J f`
1919- `MDiffAt f x` for `MDifferentiableAt I J f x`
2020- `MDiff[u] f` for `MDifferentiableOn I J f u`
@@ -58,7 +58,6 @@ the following.
5858 is correct 90% of the time)
5959- fix pretty-printing: currently, the `commandStart` linter expects some different formatting
6060- better error messages: forgetting e.g. the `T%` elaborator yields cryptic errors
61- - make all these elaborators scoped to the `Manifold` namespace
6261- further testing and fixing of edge cases
6362- add test for the difference between `CMDiff` and `ContMDiff%` (and decide on one behaviour)
6463- added tests for all of the above
@@ -82,6 +81,8 @@ def _root_.Lean.Expr.getUniverse (e : Expr) : TermElabM (Level) := do
8281@[match_pattern] def mkApp12 (f a b c d e g e₁ e₂ e₃ e₄ e₅ e₆ : Expr) :=
8382 mkApp6 (mkApp6 f a b c d e g) e₁ e₂ e₃ e₄ e₅ e₆
8483
84+ namespace Manifold
85+
8586/-- Elaborator for sections in a fibre bundle: converts a section as a dependent function
8687to a non-dependent function into the total space. This handles the cases of
8788- sections of a trivial bundle
@@ -238,8 +239,6 @@ def find_model (e : Expr) (baseInfo : Option (Expr × Expr) := none) : TermElabM
238239
239240 throwError "Couldn’t find models with corners"
240241
241- -- TODO: scope all these elaborators to the `Manifold` namespace
242-
243242/-- `MDiffAt[s] f x` elaborates to `MDifferentiableWithinAt I J f s x`,
244243trying to determine `I` and `J` from the local context.
245244The argument x can be omitted. -/
@@ -359,4 +358,6 @@ elab:max "CMDiff" nt:term:arg t:term:arg : term => do
359358 return ← mkAppM ``ContMDiff #[srcI, tgtI, ne, e]
360359 | _ => throwError m! "Term { e} is not a function."
361360
361+ end Manifold
362+
362363end
0 commit comments