@@ -122,29 +122,14 @@ open Lean Elab Meta Qq in
122122/-- `IsImmersionAt% F n f x` elaborates to `IsImmersionAt F I J n f x`,
123123trying to determine `I` and `J` from the local context. -/
124124scoped elab :max "IsImmersionAt%" ppSpace F:term:arg ppSpace nt:term:arg ppSpace
125- f:term:arg ppSpace x:term:arg : term => do
125+ f:term:arg : term => do
126126 let eF ← Term.elabTerm F none
127127 let ne ← Term.elabTermEnsuringType nt q(WithTop ℕ∞)
128128 let ef ← ensureIsFunction <|← Term.elabTerm f none
129- -- TODO: can I elaborate x as the type of the domain of f instead?
130- let ex ← Term.elabTerm x none
131129 let (srcI, tgtI) ← findModels ef none
132- mkAppM ``IsImmersionAt #[eF, srcI, tgtI, ne, ef, ex ]
130+ mkAppM ``IsImmersionAt #[eF, srcI, tgtI, ne, ef]
133131
134- -- TODO: avoid the need for a type ascription here by inferring the type of x from f
135- -- TODO: add analogous tests for the other elaborators, and fix the same bug!
136- /--
137- error: Application type mismatch: The argument
138- x
139- has type
140- ?m.37
141- of sort `Type ?u.15648` but is expected to have type
142- M
143- of sort `Type u_12` in the application
144- IsImmersionAt F I J n f x
145- ---
146- info: {x | sorry} : Set ?m.37
147- -/
132+ /-- info: {x | IsImmersionAt F I J n f x} : Set M -/
148133#guard_msgs in
149134#check {x | IsImmersionAt% F n f x}
150135/-- info: {x | IsImmersionAt F I J n f x} : Set M -/
@@ -335,7 +320,7 @@ open Manifold
335320
336321variable {f g : M → N} {x : M}
337322
338- -- TODO: why is this error? this should not be!
323+ -- TODO: why is this an error? this should not be!
339324/--
340325error: Function expected at
341326 F
@@ -378,6 +363,8 @@ info: IsImmersionAt % sorry : ?m.45
378363#guard_msgs in
379364#check IsImmersionAt% F n f x
380365
366+ /-- info: IsImmersionAt F I J n f x : Prop -/
367+ #guard_msgs in
381368#check IsImmersionAt F I J n f x
382369
383370/-- If `f` is an immersion, it is an immersion at each point. -/
0 commit comments