File tree Expand file tree Collapse file tree
MathlibTest/DifferentialGeometry
Mathlib/Geometry/Manifold Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -401,6 +401,9 @@ scoped elab:max "MDiff" ppSpace t:term:arg : term => do
401401 let (srcI, tgtI) ← findModels e none
402402 mkAppM ``MDifferentiable #[srcI, tgtI, e]
403403
404+ -- We ensure the type of `n` before checking `f` is a function to provide better error messages
405+ -- in case e.g. just `n` was forgotten.
406+
404407/-- `CMDiffAt[s] n f x` elaborates to `ContMDiffWithinAt I J n f s x`,
405408trying to determine `I` and `J` from the local context.
406409`n` is coerced to `WithTop ℕ∞` if necessary (so passing a `ℕ`, `∞` or `ω` are all supported).
Original file line number Diff line number Diff line change @@ -581,11 +581,29 @@ of type
581581to be a function, or to be coercible to a function
582582-/
583583#guard_msgs in
584- #check CMDiffAt [s] f m
584+ #check CMDiff [s] f m
585585
586- -- yields a parse error, "unexpected toekn '/--'; expected term"
586+ -- yields a parse error, "unexpected token '/--'; expected term"
587587-- #check CMDiffAt f
588588
589+ /--
590+ error: Type mismatch
591+ f
592+ has type
593+ M → M'
594+ of sort `Type (max u_10 u_4)` but is expected to have type
595+ WithTop ℕ∞
596+ of sort `Type`
597+ ---
598+ error: Expected
599+ n
600+ of type
601+ Option ℕ∞
602+ to be a function, or to be coercible to a function
603+ -/
604+ #guard_msgs in
605+ #check CMDiff f n
606+
589607end error
590608
591609/-- info: ContMDiffWithinAt I I' 1 f s : M → Prop -/
You can’t perform that action at this time.
0 commit comments