Skip to content

Commit b532d0b

Browse files
committed
oops in previous commit
1 parent ae2a483 commit b532d0b

File tree

2 files changed

+52
-20
lines changed

2 files changed

+52
-20
lines changed

Mathlib/Geometry/Manifold/Notation.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def findModelInner (e : Expr) (baseInfo : Option (Expr × Expr) := none) :
325325
if let some m ← tryStrategy m!"Units of algebra" fromUnitsOfAlgebra then return some (m, none)
326326
if let some m ← tryStrategy m!"Sphere" fromSphere then return some (m, none)
327327
if let some m ← tryStrategy m!"NormedField" fromNormedField then return some (m, none)
328-
throwError "Could not find a model with corners for `{e}`"
328+
return none
329329
where
330330
/- Note that errors thrown in the following are caught by `tryStrategy` and converted to trace
331331
messages. -/
@@ -634,8 +634,7 @@ def findModel (e : Expr) (baseInfo : Option (Expr × Expr) := none) : TermElabM
634634
let fTerm : Term ← Term.exprToSyntax srcF
635635
let iTerm : Term ← ``(ModelWithCorners.prod $eTerm $fTerm)
636636
Term.elabTerm iTerm none
637-
| _ => throwError "Could not find a model with corners for {e}"
638-
637+
| _ => throwError "Could not find a model with corners for `{e}`"
639638

640639

641640
/-- If the type of `e` is a non-dependent function between spaces `src` and `tgt`, try to find a

MathlibTest/DifferentialGeometry/Notation.lean

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -918,74 +918,107 @@ variable {EM' : Type*} [NormedAddCommGroup EM']
918918
#guard_msgs in
919919
#check MDiff f
920920

921-
/-- error: Could not find a model with corners for `M × M` -/
921+
/-- info: MDifferentiable (I.prod I) (I'.prod I') (Prod.map f g) : Prop -/
922922
#guard_msgs in
923923
#check MDiff (Prod.map f g)
924924

925-
/-- error: Could not find a model with corners for `M × M` -/
925+
/-- info: MDifferentiable (I.prod I) (I'.prod 𝓘(𝕜, 𝕜)) (Prod.map f h) : Prop -/
926926
#guard_msgs in
927927
#check MDiff (Prod.map f h)
928928

929-
/-- error: Could not find a model with corners for `M × M` -/
929+
/-- info: MDifferentiable (I.prod I) (I'.prod I) (Prod.map f ↑φ) : Prop -/
930930
#guard_msgs in
931931
#check MDiff (Prod.map f φ)
932932

933-
/-- error: Could not find a model with corners for `M' × M'` -/
933+
/-- info: MDifferentiable I (I'.prod I') fun x ↦ (f x, g x) : Prop -/
934934
#guard_msgs in
935935
#check MDiff (fun x ↦ (f x, g x))
936936

937-
/-- error: Could not find a model with corners for `M × E` -/
937+
/-- info: MDifferentiable (I.prod 𝓘(𝕜, E)) I' k : Prop -/
938938
#guard_msgs in
939939
#check MDiff k
940940

941-
/-- error: Could not find a model with corners for `E × E` -/
941+
/--
942+
error: `E × E` is a product of normed spaces, so there are two potential models with corners
943+
For now, please specify the model by hand.
944+
-/
942945
#guard_msgs in
943946
#check CMDiff 2 (Prod.map f' f')
944947

945-
/-- error: Could not find a model with corners for `M × M` -/
948+
/-- info: MDifferentiable (I.prod I) (I.prod I) (Prod.map ↑φ ↑φ') : Prop -/
946949
#guard_msgs in
947950
#check MDiff (Prod.map φ φ')
948951

949952
-- Currently, higher-order products are not implemented.
950953
-- XXX: double-check these could work, by trying out the equivalent
951954
-- MDifferentiable/ContMDiff incantation
952-
/-- error: Could not find a model with corners for `M × M × M` -/
955+
/--
956+
error: Found no model with corners on second factor `M × M`
957+
Note: finding a model with corners on products of three or more spaces is not implemented yet
958+
-/
953959
#guard_msgs in
954960
#check MDiff (Prod.map f (Prod.map h g))
955961

956-
/-- error: Could not find a model with corners for `(M × M) × M` -/
962+
/--
963+
error: Found no model with corners on first factor `M × M`
964+
Note: finding a model with corners on products of three or more spaces is not implemented yet
965+
-/
957966
#guard_msgs in
958967
#check MDiff (Prod.map (Prod.map f g) h)
959968

960-
/-- error: Could not find a model with corners for `(M × M) × M × M × E` -/
969+
/--
970+
error: Found no model with corners on first factor `M × M`
971+
Note: finding a model with corners on products of three or more spaces is not implemented yet
972+
-/
961973
#guard_msgs in
962974
#check MDiff (Prod.map (Prod.map f g) (Prod.map h k))
963975

964-
/-- error: Could not find a model with corners for `((M × M) × M) × M × E` -/
976+
/--
977+
error: Found no model with corners on first factor `(M × M) × M`
978+
Note: finding a model with corners on products of three or more spaces is not implemented yet
979+
-/
965980
#guard_msgs in
966981
#check MDiff (Prod.map (Prod.map (Prod.map f g) h) k)
967982

968-
/-- error: Could not find a model with corners for `M × M × M × M × E` -/
983+
/--
984+
error: Found no model with corners on second factor `M × M × M × E`
985+
Note: finding a model with corners on products of three or more spaces is not implemented yet
986+
-/
969987
#guard_msgs in
970988
#check MDiff (Prod.map f (Prod.map g (Prod.map h k)))
971989

972-
/-- error: Could not find a model with corners for `E × EM' × F` -/
990+
/--
991+
error: Found no model with corners on second factor `EM' × F`
992+
Note: finding a model with corners on products of three or more spaces is not implemented yet
993+
-/
973994
#guard_msgs in
974995
#check CMDiff 2 (Prod.map f' (Prod.map g' h'))
975996

976-
/-- error: Could not find a model with corners for `(E × EM') × F` -/
997+
/--
998+
error: Found no model with corners on first factor `E × EM'`
999+
Note: finding a model with corners on products of three or more spaces is not implemented yet
1000+
-/
9771001
#guard_msgs in
9781002
#check CMDiff 2 (Prod.map (Prod.map f' g') h')
9791003

980-
/-- error: Could not find a model with corners for `((E × EM') × F) × F` -/
1004+
/--
1005+
error: Found no model with corners on first factor `(E × EM') × F`
1006+
Note: finding a model with corners on products of three or more spaces is not implemented yet
1007+
-/
9811008
#guard_msgs in
9821009
#check MDiff (Prod.map (Prod.map (Prod.map f' g') h') k')
9831010

984-
/-- error: Could not find a model with corners for `(E × EM') × F × F` -/
1011+
/--
1012+
error: Found no model with corners on first factor `E × EM'`
1013+
Note: finding a model with corners on products of three or more spaces is not implemented yet
1014+
-/
9851015
#guard_msgs in
9861016
#check MDiff (Prod.map (Prod.map f' g') (Prod.map h' k'))
9871017

988-
/-- error: Could not find a model with corners for `E × EM' × F × F` -/
1018+
/--
1019+
error: Found no model with corners on second factor `EM' × F × F`
1020+
Note: finding a model with corners on products of three or more spaces is not implemented yet
1021+
-/
9891022
#guard_msgs in
9901023
#check MDiff (Prod.map f' (Prod.map g' (Prod.map h' k')))
9911024

0 commit comments

Comments
 (0)