SSL Basic.lean
Sprache: Lean
|
|
module
public import Mathlib.Geometry.Manifold.Notation
public import Mathlib.Geometry.Manifold.VectorBundle.Basic
set_option pp.unicode.fun true
open Bundle Filter Function Topology
open scoped Manifold
variable { : Type*} [NontriviallyNormedField ]
section
variable {E : Type*} [NormedAddCommGroup E]
[NormedSpace E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners E H)
{M : Type*} [TopologicalSpace M] [ChartedSpace H M]
{E' : Type*} [NormedAddCommGroup E'] [NormedSpace E']
variable (F : Type*) [NormedAddCommGroup F] [NormedSpace F]
-- `F` model fiber
(n : WithTop ℕ∞)
(V : M → Type*) [TopologicalSpace (TotalSpace F V)]
[∀ x, AddCommGroup (V x)] [∀ x, Module (V x)]
[∀ x : M, TopologicalSpace (V x)] [∀ x, IsTopologicalAddGroup (V x)]
[∀ x, ContinuousSMul (V x)]
[FiberBundle F V] [VectorBundle F V]
-- `V` vector bundle
/-! Tests for the `T%` elaborator, inserting calls to `TotalSpace.mk'` automatically. -/
section TotalSpace
variable {σ : Π x : M, V x}
{σ' : (x : E) → Trivial E E' x} {σ'' : (y : E) → Trivial E E' y} {s : E → E'}
/-- info: (T% σ) : M → TotalSpace F V -/
#guard_msgs in
#check T% σ
-- Note how the name of the bound variable `x` resp. `y` would have been preserved,
-- except for the delaborator collapsing this to `T%` again.
-- TODO: parentheses here are not strictly necessary; find a way to remove them!
/-- info: (T% σ') : E → TotalSpace E' (Trivial E E') -/
#guard_msgs in
#check T% σ'
/-- info: (T% σ'') : E → TotalSpace E' (Trivial E E') -/
#guard_msgs in
#check T% σ''
/-- info: (T% s) : E → TotalSpace E' (Trivial E E') -/
#guard_msgs in
#check T% s
variable (X : (m : M) → TangentSpace I m) [IsManifold I 1 M]
/-- info: (T% X) : M → TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check T% X
variable {x : M}
-- Testing precedence.
section precedence
/-- info: (T% σ) x : TotalSpace F V -/
#guard_msgs in
#check (T% σ) x
/-- info: (T% σ) x : TotalSpace F V -/
#guard_msgs in
#check T% σ x
-- Nothing happening, as expected.
/-- info: σ x : V x -/
#guard_msgs in
#check T% (σ x)
-- Testing precedence when applied to a family of section.
variable {ι j : Type*}
-- Partially applied.
/-- info: (T% s) : ι → TotalSpace ((x : M) → V x) (Trivial ι ((x : M) → V x)) -/
#guard_msgs in
variable {s : ι → (x : M) → V x} in
#check T% s
-- Note: pre-existing bug in the delaborator, should be `T% (s i)`!
/-- info: (T% s) i : TotalSpace (ι → (x : M) → V x) (Trivial ι (ι → (x : M) → V x)) -/
#guard_msgs in
variable {s : ι → ι → (x : M) → V x} {i : ι} in
#check T% s i
variable {X : ι → Π x : M, TangentSpace I x} {i : ι}
-- Error message is okay, but not great.
/--
error: Could not find a model with corners for `ι`.
Hint: failures to find a model with corners can be debugged with the command `set_option trace.Elab.DiffGeo.MDiff true`.
-/
#guard_msgs in
#check MDiffAt (T% X) x
end precedence
example : (fun m ↦ (X m : TangentBundle I M)) = (fun m ↦ TotalSpace.mk' E m (X m)) := rfl
-- Applying a section to an argument.
section
set_option pp.notation false
-- This application is not beta-reduced, because of the parentheses around the T%.
/-- info: (fun m ↦ TotalSpace.mk' E m (X m)) x : TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% X) x
-- We apply head-beta reduction of the applied form: there is nothing to do here.
/-- info: (fun m ↦ TotalSpace.mk' E m (X m)) x : TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% X x)
-- This variant is beta-reduced.
/-- info: (fun x ↦ TotalSpace.mk' E x (X x)) x : TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% (fun x ↦ X x) x)
/-- info: fun m ↦ TotalSpace.mk' E m (X m) : M → TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% X)
-- As is this version.
/-- info: fun x ↦ TotalSpace.mk' E x (X x) : M → TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% (fun x ↦ X x))
-- The term `x` is outside parentheses: the form `x ↦ X x` is still reduced because
-- we apply head beta reduction to the application.
/-- info: (fun x ↦ TotalSpace.mk' E x (X x)) x : TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check (T% (fun x ↦ X x)) x
-- Parentheses around the argument are not required right now.
/-- info: (fun x ↦ TotalSpace.mk' E x (X x)) x : TotalSpace E (TangentSpace I) -/
#guard_msgs in
#check T% (fun x ↦ X x) x
-- Applying the same elaborator twice errors.
/--
error: could not find a `FiberBundle` instance on `TotalSpace E`:
`fun m ↦ TotalSpace.mk' E m (X m)` is a function into `TotalSpace E`
hint: you may be missing suitable typeclass assumptions
-/
#guard_msgs in
#check (T% (T% X))
set_option pp.notation true
/--
error: could not find a `FiberBundle` instance on `TotalSpace E`:
`(T% X)` is a function into `TotalSpace E`
hint: you may be missing suitable typeclass assumptions
-/
#guard_msgs in
#check (T% (T% X)) x
/--
error: could not find a `FiberBundle` instance on `TotalSpace E`:
`(T% X)` is a function into `TotalSpace E`
hint: you may be missing suitable typeclass assumptions
-/
#guard_msgs in
#check (T% (T% X)) x
end
section
-- Check minimal assumptions to find a model fiber.
variable {B F Z : Type*} [TopologicalSpace B] [TopologicalSpace F]
{E : B → Type*} [TopologicalSpace (TotalSpace F E)] (σ : (b : B) → E b)
/-- info: (T% σ) : B → TotalSpace F E -/
#guard_msgs in
#check T% σ
end
-- Error message when missing typeclass assumptions for sections of a fiber bundle.
-- This used to silently do nothing; now there is a helpful error.
section
variable {B F Z : Type*} [TopologicalSpace B] [TopologicalSpace F]
{E : B → Type*} (σ : (b : B) → E b)
/--
error: could not find a `FiberBundle` instance on `E`:
`σ` is a function into `E`
hint: you may be missing suitable typeclass assumptions
-/
#guard_msgs in
#check T% σ
/-- info: (T% σ) : B → TotalSpace F E -/
#guard_msgs in
variable [TopologicalSpace (TotalSpace F E)] [(b : B) → TopologicalSpace (E b)] [FiberBundle F E] in
#check T% σ
end
end TotalSpace
-- We want to capture the output of the custom *elaborators* specifically: turning off all notation
-- deactivates some notation for models with corners, but also the delaborators corresponding
-- to the elaborators.
set_option pp.notation false
/-! Tests for the elaborators for `MDifferentiable{WithinAt,At,On}`. -/
section differentiability
variable {EM' : Type*} [NormedAddCommGroup EM']
[NormedSpace EM'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners EM' H')
{M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
/-! Some basic tests: a simple function, both in applied and unapplied form -/
section basic
-- General case: a function between two manifolds.
variable {f : M → M'} {s : Set M} {m : M}
/-- info: MDifferentiableWithinAt I I' f s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] f
/-- info: MDifferentiableWithinAt I I' f s m : Prop -/
#guard_msgs in
#check MDiffAt[s] f m
/-- info: MDifferentiableAt I I' f : M → Prop -/
#guard_msgs in
#check MDiffAt f
/-- info: MDifferentiableAt I I' f m : Prop -/
#guard_msgs in
#check MDiffAt f m
/-- info: MDifferentiableOn I I' f s : Prop -/
#guard_msgs in
#check MDiff[s] f
-- A partial homeomorphism or partial equivalence.
variable {φ : OpenPartialHomeomorph M E} {ψ : PartialEquiv M E}
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf E) (↑φ) s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] φ
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf E) (↑ψ) s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] ψ
-- Testing an error message.
section
/--
error: Function expected at
MDifferentiableOn I I' f s
but this term has type
Prop
Note: Expected a function because this term is being applied to the argument
m
-/
#guard_msgs in
#check MDiff[s] f m
/--
error: Function expected at
MDifferentiableOn I I' f s
but this term has type
Prop
Note: Expected a function because this term is being applied to the argument
m
-/
#guard_msgs in
#check MDifferentiableOn I I' f s m
/-- info: MDifferentiable I I' f : Prop -/
#guard_msgs in
#check MDiff f
/--
error: Function expected at
MDifferentiable I I' f
but this term has type
Prop
Note: Expected a function because this term is being applied to the argument
m
-/
#guard_msgs in
#check MDiff f m
end
-- Testing the precedence of parsing of the "within" set: regression test.
section
variable {ι : Type} {i : ι} {s : ι → Set M}
/-- info: MDifferentiableOn I I' f (s i) : Prop -/
#guard_msgs in
#check MDiff[s i] f
/-- info: MDifferentiableWithinAt I I' f (s i) m : Prop -/
#guard_msgs in
#check MDiffAt[s i] f m
/-- info: ContMDiffOn I I' 2 f (s i) : Prop -/
#guard_msgs in
#check CMDiff[s i] 2 f
/-- info: ContMDiffWithinAt I I' 0 f (s i) m : Prop -/
#guard_msgs in
#check CMDiffAt[s i] 0 f m
/--
info: mfderivWithin I I' f (s i) m : ContinuousLinearMap (RingHom.id ) (TangentSpace I m) (TangentSpace I' (f m))
-/
#guard_msgs in
#check mfderiv[s i] f m
end
-- Function from a manifold into a normed space.
variable {g : M → E}
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf E) g s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] g
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf E) g s m : Prop -/
#guard_msgs in
#check MDiffAt[s] g m
/-- info: MDifferentiableAt I (modelWithCornersSelf E) g : M → Prop -/
#guard_msgs in
#check MDiffAt g
/-- info: MDifferentiableAt I (modelWithCornersSelf E) g m : Prop -/
#guard_msgs in
#check MDiffAt g m
/-- info: MDifferentiableOn I (modelWithCornersSelf E) g s : Prop -/
#guard_msgs in
#check MDiff[s] g
-- TODO: fix and enable! #check MDiff[s] g m
/-- info: MDifferentiable I (modelWithCornersSelf E) g : Prop -/
#guard_msgs in
#check MDiff g
-- TODO: fix and enable! #check MDiff g m
-- From a manifold into a field.
variable {h : M → }
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf ) h s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] h
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf ) h s m : Prop -/
#guard_msgs in
#check MDiffAt[s] h m
/-- info: MDifferentiableAt I (modelWithCornersSelf ) h : M → Prop -/
#guard_msgs in
#check MDiffAt h
/-- info: MDifferentiableAt I (modelWithCornersSelf ) h m : Prop -/
#guard_msgs in
#check MDiffAt h m
/-- info: MDifferentiableOn I (modelWithCornersSelf ) h s : Prop -/
#guard_msgs in
#check MDiff[s] h
-- TODO: fix and enable! #check MDiff[s] h m
/-- info: MDifferentiable I (modelWithCornersSelf ) h : Prop -/
#guard_msgs in
#check MDiff h
-- TODO: fix and enable! #check MDiff h m
-- The following tests are more spotty, as most code paths are already covered above.
-- Add further details as necessary.
-- From a normed space into a manifold.
variable {f : E → M'} {s : Set E} {x : E}
/-- info: MDifferentiableWithinAt (modelWithCornersSelf E) I' f s : E → Prop -/
#guard_msgs in
#check MDiffAt[s] f
/-- info: MDifferentiableAt (modelWithCornersSelf E) I' f x : Prop -/
#guard_msgs in
#check MDiffAt f x
-- TODO: fix and enable! #check MDiff[s] f x
/-- info: MDifferentiable (modelWithCornersSelf E) I' f : Prop -/
#guard_msgs in
#check MDiff f
-- TODO: should this error? if not, fix and enable! #check MDiff f x
-- same! #check MDifferentiable% f x
-- Between normed spaces.
variable {f : E → E'} {s : Set E} {x : E}
/-- info: MDifferentiableAt (modelWithCornersSelf E) (modelWithCornersSelf E') f x : Prop -/
#guard_msgs in
#check MDiffAt f x
/-- info: MDifferentiableAt (modelWithCornersSelf E) (modelWithCornersSelf E') f : E → Prop -/
#guard_msgs in
#check MDiffAt f
-- should this error or not? #check MDiff[s] f x
/--
info: MDifferentiableWithinAt (modelWithCornersSelf E) (modelWithCornersSelf E') f s : E → Prop
-/
#guard_msgs in
#check MDiffAt[s] f
/-- info: MDifferentiableOn (modelWithCornersSelf E) (modelWithCornersSelf E') f s : Prop -/
#guard_msgs in
#check MDiff[s] f
-- Normed space to a field.
variable {f : E → } {s : Set E} {x : E}
/-- info: MDifferentiableAt (modelWithCornersSelf E) (modelWithCornersSelf ) f x : Prop -/
#guard_msgs in
#check MDiffAt f x
-- Field into a manifold.
variable {f : → M'} {u : Set } {a : }
/-- info: MDifferentiableAt (modelWithCornersSelf ) I' f a : Prop -/
#guard_msgs in
#check MDiffAt f a
/-- info: MDifferentiableOn (modelWithCornersSelf ) I' f u : Prop -/
#guard_msgs in
#check MDiff[u] f
-- Field into a normed space.
variable {f : → E'} {u : Set } {a : }
/-- info: MDifferentiableAt (modelWithCornersSelf ) (modelWithCornersSelf E') f a : Prop -/
#guard_msgs in
#check MDiffAt f a
/-- info: MDifferentiableOn (modelWithCornersSelf ) (modelWithCornersSelf E') f u : Prop -/
#guard_msgs in
#check MDiff[u] f
-- On a field.
variable {f : → } {u : Set } {a : }
/-- info: MDifferentiableAt (modelWithCornersSelf ) (modelWithCornersSelf ) f a : Prop -/
#guard_msgs in
#check MDiffAt f a
/-- info: MDifferentiableOn (modelWithCornersSelf ) (modelWithCornersSelf ) f u : Prop -/
#guard_msgs in
#check MDiff[u] f
end basic
variable {σ : Π x : M, V x} {σ' : (x : E) → Trivial E E' x} {s : E → E'}
variable (X : (m : M) → TangentSpace I m) [IsManifold I 1 M]
/-! (Extended) charts -/
section
variable {φ : OpenPartialHomeomorph M H} {ψ : PartialEquiv M E} {s : Set M}
/-- info: ContMDiff I I 37 ↑φ : Prop -/
#guard_msgs in
#check CMDiff 37 φ
/-- info: MDifferentiable I I ↑φ : Prop -/
#guard_msgs in
#check MDiff φ
/-- info: MDifferentiable I (modelWithCornersSelf E) ↑ψ : Prop -/
#guard_msgs in
#check MDiff ψ
/-- info: MDifferentiableWithinAt I I (↑φ) s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] φ
/-- info: MDifferentiableWithinAt I (modelWithCornersSelf E) (↑ψ) s : M → Prop -/
#guard_msgs in
#check MDiffAt[s] ψ
end
/-! Error messages in case of a forgotten `T%`. -/
section
/--
error: Term `X` is a dependent function, of type `(m : M) → TangentSpace I m`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check MDiff X
/--
error: Term `σ` is a dependent function, of type `(x : M) → V x`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check MDiff σ
/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check MDiff σ'
/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check MDiff[s] σ'
/--
error: Term `X` is a dependent function, of type `(m : M) → TangentSpace I m`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
/ *java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
X
/--
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 60
: T` elaborator toconvert java.lang.StringIndexOutOfBoundsException: Range [92, 88) out of bounds for length 92
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
# i
#check MDiffAt ((σ))
/--
: σ afunction type` ) E'x`
Hint
-/
#guard_msgs in
#check MDiff[s] σ'
/--T java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
xxjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
the`` to java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 92
-/
#guard_msgs in
'
/--
error: Term `σ'` is a dependent
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check MDiffAt[s] σ'
end
end differentiability
/-! Tests for the elaborators for `UniqueMDiff{WithinAt,On}`. -/
section UniqueMDiff
variable {s : Set M} {m : M}
/-- info: UniqueMDiffOn I s : Prop -/
#guard_msgs in
#check UniqueMDiff[s]
/-- info: UniqueMDiffOn (modelWithCornersSelf Real Real) (Set.Icc 0 1) : Prop -/
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 41
/-- error: `Real` has type `Type` which is not of the form `Set α` for some `α`. -/
#guard_msgs in
#check UniqueMDiff[ℝ]
/-- info: UniqueMDiffWithinAt I s : M → Prop -/variable{ :M→}{ : } {m }
#guard_msgs in
#check#heck java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 19
/-- info: UniqueMDiffWithinAt I s m : Prop -/
#guard_msgs in
#check UniqueMDiffAt[s] m
/-- info: UniqueMDiffWithinAt I Set.univ m : Prop -/
# in
#check [S. ]java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
-- In the future, the elaborators should take the type of `m` into account.
/--
error: Could not find a model with corners for `?_`.
Hint: the expected MDifferentiableOnI'f s
-/
#guard_msgs in
## java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
guard_msgs
/-- info: UniqueMDiffOn I s.carrier : Prop -/
java.lang.StringIndexOutOfBoundsException: Range [58, 8) out of bounds for length 58
#check #in
/-- error: `s` has type `TopologicalSpace.Opens M` which is not of the form `Set α` for some `α`. -/
#guard_msgs in
#check UniqueMDiff[s]
/--
error Application ismatchThe
s
has type
TopologicalSpace.Opens M
/
Set ?_
in/-- info: MDifferentiableAt I (modelWithCornersSelf E) g : M → Prop -/
#checkg
-/
#in
#check UniqueMDiffOnjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
/-! Tests for the custom elaborators for `ContMDiff{WithinAt,At,On}` -/
smoothness
-- Copy-pasted the tests for differentiability mutatis mutandis.
-- Start with some basic tests: a simple function, both in applied and unapplied form.
variable {EM' : Type*} java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 60
[]' * H ' java.lang.StringIndexOutOfBoundsException: Range [82, 80) out of bounds for length 91
*}[TopologicalSpace'] [hartedSpaceH '
-- TODO: add tests for the error message when smoothness hypotheses are missing
-- General case: a function between two manifolds.
variable {f : M → M'} {s : Set M} {m : M}
variable [IsManifold I 1
-- Testing error messages when forgetting the smoothness exponent or swapping arguments.
section error
set_option -
-- yields a parse error, "unexpected token '/--'; expected term"
-- TODO: make this parse, but error in the elaborator
-- #check CMDiffAt[s] f
/--
error: Type mismatch
f
has type
M → M'
of sort `Type (max u_10 u_4)` but is expected to have type
WithTop ℕ∞
of sort `Type`
---
of type
M
to be a function, java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 2
-/
#guard_msgs in
#check CMDiffAt[s] f m
/--
error: Type mismatch
f
has type
M M
of sort `Type (max u_10 u_4)` but is expected to have type
WithTop ℕ∞
of sort `Type`
---
error: Expected
m
of type
M
to be a function, or to be coercible to a function
-/
#guard_msgs in
#check CMDiff[s] f m
-- yields a parse error, "unexpected token '/--'; expected term"
-- #check CMDiffAt f
/--
error ` dependent,of: TangentSpaceI m`
f
has type
M → M'
of sort `Type (max u_10 u_4)` but is expected to have type
WithTop ℕ∞
of sort `Type`
---
error: Expected
n
of type
∞
to be a function, or to be coercible to a function
-/
g java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
#check CMDiff f n
end error
/-- info: ContMDiffWithinAt I I' 1 f s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] 1 f
/-- info: ContMDiffWithinAt I I' 1 f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] 1 f m
/-- info: ContMDiffWithinAt I I' 1 f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] 1 f m
/-- info: ContMDiffAt I I' 1 f : M → Prop -/
#guard_msgs in
#check CMDiffAt 1 f
/-- info: ContMDiffAt I I' 2 f m : Prop -/
#guard_msgs in
#check CMDiffAt 2 f m
/-- info: ContMDiffOn I I' 37 f s : Prop -/
#guard_msgs in
#check CMDiff[s] 37 f
-- Testing an error message.
section
/--
error: Function expected at
ContMDiffOnguard_msgs java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
but this term has type
Prop
Note: Expected a Hint you the`% toconverta to anon one
m
-/
#guard_msgs in
#check CMDiff[s] 2 f m
variable {n : WithTop ℕ∞}
/--
error: Function expected at
ContMDiffOn I I' n f s
but this term has type
Prop
Note: Expected a function because this term is java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 2
m
-/
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
#check java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
/-- info: MDifferentiable I I' f : Prop -/
#guard_msgs in
#check MDiff f
/--
error: Function expected at
ContMDiff I I' n
but this term has type
Prop
Note: Expected a function because this term is being applied to the argument
m
-/
#guard_msgs in
#check CMDiff n f m
end
/-! Tests for coercions from `ℕ` or `ℕ∞` to `WithTop ℕ∞` -/
section coercions
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
/-- info: ContMDiffWithinAt I I' 0 f s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] 0 f
/-- info: ContMDiffWithinAt I I' 1 f s : M → Prop -/
java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 26
/-- info: ContMDiffWithinAt I I' 37 f s : M → Prop -/
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
#check CMDiffAt
/-- info: ContMDiffWithinAt I I' (↑k) f s : M → Prop -/
#guard_msgs in
java.lang.NullPointerException
/-- info: ContMDiffWithinAt I I' (↑k') f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] kto bea to to function
/-- info: ContMDiffWithinAt I I' n f s m : Prop -/
#guard_msgs in
#check#CMDifffjava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
t I I' (↑k) f : M → Prop -/
#guard_msgs in
#check CMDiffAt k f
/-- info: ContMDiffAt I I' (↑k') f m : Prop -/
#guard_msgs in
#check CMDiffAt k' f m
/-- info: ContMDiffOn I I' (↑k) f s : Prop -/
#guard_msgs in
#check CMDiff[s] k f
/--
error: Function expected at
ContMDiffOn I I' (↑k') f s
but this term has type
Prop
Note: Expected a function because this term is being applied to the argument
m
-/
java.lang.StringIndexOutOfBoundsException: Range [14, 11) out of bounds for length 14
#checkcheck[]1 m
/-- info: ContMDiff I I' (↑k) f : Prop -/
#guard_msgs in
#check CMDiff k f
/--
error: Function expected at
ContMDiff I I' (↑#heckCMDiffAt 2java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
but this term has type
Prop
Note: Expected a but this term java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
m
-/
#guard_msgs in
#check CMDiff k' f m
end coercions
/-! Error messages for a missing `T%` elaborator. -/
section dependent
variable {σvariable nWithTopℕ}
variable expectedjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
(X' : ι → (m : M) → TangentSpace I m)
/--
error: Term `X` is a dependent function, of type `(but this java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 22
Hint: you can #java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
-/
#guard_msgs in
#check CMDiff 0 X
/--
error: Term Prop
use `% java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 92
-/
#guard_msgs in
#check m
/--
error: Term `σ'` is a dependent function, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 2
Hint: you can use the `T%
-/
#guard_msgs in
#check CMDiff 0 σ'
/--
error: Term `σ'` is a dependent function, of type `(#guard_msgs
Hint/--
-/
#in
#check CMDiff[s] 0 σ'
/--
error: Term `X` is a dependent function, of type `(m : M) → TangentSpace I m`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check CMDiffAt 0 (X)
/--
error: Term `σ` is a dependent function, of type `(x : M) → V x`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check CMDiffAt 0 ((σ))
/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/
#guard_msgs in
#check CMDiff[s] 0 σ'
/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
Hint-- Function from a manifold into a normed space.
-/
g
#check CMDiffAt java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/--
error
Hint: you can use the# java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
-/
#guard_msgs in
#check CMDiffAt[s] 0 σ'
/--
error: Term `X' i` is a dependent function, of type `(m : M) → TangentSpace I java.lang.StringIndexOutOfBoundsException: Range [0, 79) out of bounds for length 67
guard_msgsin
-/
#guard_msgs in
#check MDiffAt ((X' i)) x
-- This error message is not great: this is missing *both* a T% elaborator
-- and an argument i.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Hint: failures to find#CMDiffAt[]0h
-/
#guard_msgs in
#check MDiffAt X' x
endjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
#check CMDiff[s] n h
-- TODO: fix and enable! #check CMDiff[s] n h m
/-- info: ContMDiffWithinAt I (modelWithCornersSelf E) 1 g s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] 1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- info: ContMDiffWithinAt I (modelWithCornersSelf E) 0 g s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] 0 g m
/-- info: ContMDiffAt I (modelWithCornersSelf E) 1 g : M → Prop -/
#guard_msgs in
#check 1g
/-- info: ContMDiffAt I (modelWithCornersSelf E) 1 g m : Prop -/
#guard_msgs in
#check CMDiffAt 1 g m#uard_msgs in
/-- info: ContMDiffOn I (modelWithCornersSelf E) n g s : Prop -/
#guard_msgs in
#check CMDiff[s] n g
-- TODO: fix and enable! #check CMDiff[s] n g m
/-- info: ContMDiff I (modelWithCornersSelf E) n g : Prop -/
#guard_msgs in
#check CMDiff n g
-- TODO: fix and enable! #check CMDiff n g m
-- From a manifold into a field.
variable {h : M → }
/-- info: ContMDiffWithinAt I (modelWithCornersSelf ) 0 h s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] 0 h
/-- info: ContMDiffWithinAt I (modelWithCornersSelf ) 1 h s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] 1 h m
/-- info: ContMDiffAt I (modelWithCornersSelf ) 2 h : M → Prop -/
#guard_msgs in
#check CMDiffAt 2 h
/-- info: ContMDiffAt I (modelWithCornersSelf ) n h m : Prop -/
#guard_msgs in
#check CMDiffAt n h m
/-- info: ContMDiffOn I (modelWithCornersSelf ) n h s : Prop -/
#guard_msgs in
#check CMDiff[s] n h
-- TODO: fix and enable! #check CMDiff[s] n h m
/-- info: ContMDiff I (modelWithCornersSelf ) 37 h : Prop -/
#guard_msgs in
#check CMDiff 37 h
-- TODO: fix and enable! #check CMDiff 0 h m
-- The following tests are more spotty, as most code paths are already covered above.
-- Add further details as necessary.
-- This list mirrors some of the tests for `MDifferentiable{WithinAt,At,On}`, but not all.
-- From a normed space into a manifold.
variable {f : E → M'} {s : Set E} {x : E}
/-- info: ContMDiffWithinAt (modelWithCornersSelf E) I' 2 f s : E → Prop -/
#guard_msgs in/-- info: Set.ofPred fun x ↦ MDifferentiableAt I I' f x : Set M -/
#check #guard_msgsjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
/-- info: ContMDiffAt (modelWithCornersSelf E) I' 3 f x : Prop -/
#guard_msgs in
#check CMDiffAt 3 f x
-- TODO: fix and enable! #check CMDiff[s] 1 f x
/-- info: ContMDiff (modelWithCornersSelf E) I' 1 f : Prop -/
#guard_msgs in
#heckCMDiff 1
-- TODO: should this error? if not, fix and enable! #check CMDiff 1 f x
-- same! #check MDifferentiable% f x
-- Between normed spaces.
variable
/-- info: ContMDiffAt (modelWithCornersSelf E) (modelWithCornersSelf E') 2 f x : Prop -/
#guard_msgs in
#check CMDiffAt 2 f x
/-- info: ContMDiffAt (modelWithCornersSelf E) (modelWithCornersSelf E') 2 f : E → Prop -/
#guard_msgs /-- info: Set.ofPred fun x ↦ Injective ⇑(mfderiv I I' f x) : Set M -/
#f
-- should this error or not? #check CMDiff[s] 2 f x
/--
info: ContMDiffWithinAt (modelWithCornersSelf E) (modelWithCornersSelf E') 2 f s : E → Prop
-/
#guard_msgs in
#check java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
/-- info: ContMDiffOn (modelWithCornersSelf E) (modelWithCornersSelf E') 2 f s : Prop -/
#guard_msgs in
#check CMDiff[s] 2 f
end smoothness
/-! Inferring the type of `x` for all ContMDiff/MDifferentiable{Within}At elaborators. -/
section
variable {' :Type* 'java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
[java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
{M' : Type*} info:ContMDiff( Real m Real . f:Prop
{f : M → M'} {s : Set M}
/-- info: Set.ofPred fun x ↦ MDifferentiableAt I I' f x : Set M -/
#guard_msgs#heck ωf
#check {x | MDiffAt f x}
/-- info: Set.ofPred fun x ↦ MDifferentiableWithinAt I I' f s x : Set M -/
#guard_msgs in
#check {info ( RealReal)modelWithCornersSelf ):Prop
/-- info: Set.ofPred fun x ↦ ContMDiffAt I I' Top.top f x : Set M -/ '. f : /
#guard_msgs in
c{ ⊤fx}
/-- info: Set.ofPred fun x ↦ ContMDiffWithinAt I I' 2 f s x : Set M -/
#guard_msgs in
#check {x | CMDiffAt[s] 2 f x}
open ContDiff in -- for the ∞ notation
/-- info: Set.ofPred fun x ↦ ContMDiffAt I I' (↑Top.top) f x : Set M -/
#guard_msgs in
{|CMDiffAt∞xjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
/-- info: Set.ofPred fun x ↦ Injective ⇑(mfderiv I I' f x) : Set M -/
gjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
#check {x | Function.Injective (mfderiv% f x) }
/-- info: Set.ofPred fun x ↦ Surjective ⇑(mfderivWithin I I' f s x) : Set M -/
#guard_msgs in
#check {x | Function.Surjective (mfderiv[s] #MDifff
end
/-! Inferring a model with corners, when the inferred model is not in the local context,
but an explicitly named construction (e.g. `(, E)` on some normed space `E`). -/
section
open scoped ContDiff
-- This does not require any `IsManifold` hypothesis, ...
variable {X Y : Type*} [TopologicalSpace X] [ChartedSpace ℝ X]
[TopologicalSpace Y] [ChartedSpace ℝ Y] {f : X → Y}
/--
info: ContMDiff (modelWithCornersSelf Real Real) (modelWithCornersSelf Real Real) Top.top f : Prop
-/
#guard_msgs in
#check CMDiff ω f
variable {f : X → ℝ} in /--
info: MDifferentiable (modelWithCornersSelf Real Real) (modelWithCornersSelf Real Real) f : Prop
-/
#guard_msgs in #check MDiff f
variable {X : Type*} [TopologicalSpace X] [ChartedSpace F X] {f : X → } in
/-- info: MDifferentiable (modelWithCornersSelf F) (modelWithCornersSelf ) f : Prop -/
#guard_msgs in
#check MDiff f
-- This test is expected to fail: it passing would amount to guessing a model with corners on
-- a product of two normed spaces (which is ambiguous).
variable {X : Type*} [TopologicalSpace X] [ChartedSpace (F × F) X] {f : X → } in
/--
error: Could not find a model with corners for `X`.
Hint: failures to find a model with corners can be debugged with the command `set_option trace.Elab.DiffGeo.MDiff true`.
-/
#guard_msgs in
#check MDiff f
-- ... but also works with an `IsManifold` hypothesis in context.
variable [IsManifold (ℝ) n X] [IsManifold (ℝ) ω Y]
/--
infojava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
-/
#guard_msgs in #check MDiff f
end
/-! Tests for the elaborators for `tangentMap(Within)` and `TangentSpace` -/
section
variable {f : M → Mguard_msgs
/-- info: TangentSpace I x : Type u_2 -/
#guard_msgs in
#check TangentSpace% x
/-- info: tangentMap I I f : TangentBundle I M → TangentBundle I M -/
#uard_msgs in
#check tangentMap% f
/-- info: tangentMapWithin I I f s : TangentBundle I M → TangentBundle I M -/
#guard_msgs in
#check tangentMap[s] f
/-- info: tangentMap I I f { proj := x, snd := X } : TangentBundle I M -/
#guard_msgs in
#check tangentMap% f X
/-- info: tangentMapWithin I I f s { proj := x, snd := X } : TangentBundle I M -/
#guard_msgs in
#check tangentMap[s] f X
end
/-! Products of models with corners: TODO, add lots of further tests -/
-
variable {EM' : Type*} [NormedAddCommGroup EM']
[NormedSpace EM'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 85
{M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
fg M'{h →}{' :E →M' kk : ×E M' φ ' OpenPartialHomeomorph MH}
{f' : E → M} {g' : EM' → M'} {h' k' : F → M'}
section sum
/-- info: MDifferentiable I I' (Sum.map f g) : Prop -/
#guard_msgs in
#check MDiff (Sum.map f g)
/-- info: MDifferentiable I (modelWithCornersSelf ) (Sum.map h h₂) : Prop -/
#guard_msgs in
#check MDiff (Sum.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14
/-- info: MDifferentiable (modelWithCornersSelf F) I' (Sum.map h' k') : Prop -/
#set_option ppnotation -- only testing error messages, so nice notation is helpful
#check MDiff (Sum.map h' k')
/-- info: ContMDiff I I 2 Sum.swap : Prop -/
#guard_msgs in
#check CMDiff 2 (@Sum.swap M M)
/-- info: ContMDiff I I 2 Sum.inl : Prop -/
#guard_msgs in
#check CMDiff 2 (@Sum.inl M M)
/-- info: ContMDiff I I 2 Sum.inr : Prop -/
#guard_msgs in
# CMDiff 2 (Sumjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 30
-- Error messages about mismatched models.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
/--
error: failed to synthesize
( F)
Hint: Additional diagnostic information may be available using the `/
-/
#guard_msgs in
#check java.lang.StringIndexOutOfBoundsException: Range [94, 9) out of bounds for length 94
set_option pp.notation true in
/--
error: failed to synthesize instance of type class
ChartedSpace H (M ⊕ F)
Hint: Type class instance resolution failures can be inspected witherror: PEE` productof normed spaces,so are potential with
-/
MDifferentiableISmaph)
-- Nested sums are also supported.
/-- info: MDifferentiable I I' (Sum.map (Sum.map f f) f) : Prop -/
#guard_msgs in
#check MDiff (Sum.map (Sum.map f f) f)
/-- info: MDifferentiable I I' (Sum.map (Sum.map f (Sum.map g g)) f) : Prop -/
#guard_msgs in
#check MDiff (Sum.map (Sum.map f (Sum.map g g)) f)
-- Edge case: we don't care about the second factor.
→
/-- info: MDifferentiable I I (Sum.map f Sum.inr) : Prop -/
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 3
#check MDiff (Sum.map f (@Sum.inr M M))
/-- info: MDifferentiable I I' (Sum.map f (Sum.map f (Sum.map g g))) : Prop -/
#guard_msgs in
#check MDiff (Sum.map f (Sum.map f (Sum.map g g)))
end sum
section product
/-- info: MDifferentiable I I' f : Prop -/
#guard_msgs in
#check MDiff f
/-- info: MDifferentiable (I.prod I) (I'.prod I') (Prod.map f g) : Prop -/
#guard_msgs in
#check MDiff (Prod.map f g)
/-- info: MDifferentiable (I.prod I) (I'.prod (modelWithCornersSelf )) (Prod.map f h) : Prop -/
#guard_msgs in
#check MDiff (Prod.map f h)
/-- info: MDifferentiable (I.prod I) (I'.prod I) (Prod.map f ↑φ) : Prop -/
#guard_msgs in
#check MDiff (Prod.map f φ)
/-- info: MDifferentiable I (I'.prod I') fun x ↦ Prod.mk (f x) (g x) : Prop -/
#guard_msgs in
#check MDiff (fun x ↦ (f x, g x))
/-- info: MDifferentiable (I.prod (modelWithCornersSelf E)) I' k : Prop -/
##uard_msgs
c java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 14
/--
error: `Prod E E` is a product of normed spaces, so there are two potential models with corners
For now, please specify the model by hand.
-/
#guard_msgs in
#check CMDiff 2''f
/-- info: MDifferentiable (I.prod I) (I.prod I) (Prod.map ↑φ ↑φ') : Prop -/
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
#check MDiff (Prod.map φ φ')
/--
:(. (.prodI)('prod ( )prodI)Prodmapf (Prod.map h g)) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map f (java.lang.StringIndexOutOfBoundsException: Range [70, 30) out of bounds for length 70
/--
info: MDifferentiable ((I.prod I).prod I) ((I'.prod I').prod (modelWithCornersSelf )) (Prod.map (Prod.map f g) h) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map f g) h)
/--
ntiable (IprodI.prod (.prod ( modelWithCornersSelf E))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
((I'.variable {s:Opens ( E)
-/
#guard_msgs in
#check MDiff#uard_msgsin
/--
info: MDifferentiable (((Iicheck MDiff f
((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map (Prod.map f g) h/
/--
info: MDifferentiable (I.prod (I.prod (I.prod (I.prod (modelWithCornersSelf E)))))
(I'.prod (I'.prod ((modelWithCornersSelf /-- info: MDifferentiable I ((modelWithCornersSelf ).prod (modelWithCornersSelf E)) f : Prop -/
-/
#guard_msgs in
#check MDiff (end opens
section
set_option pp.notation true -- only testing error messages, so nice notation is helpful
/-- info: MDifferentiable (I.prod (modelWithCornersSelf E)) I' (Sum.map k k) : Prop -/
/--
error: `EM' × F` is a product of normed spaces, so there are two potential models with corners
For now, pleasejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-/
#
#check CMDiff 2 (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/--
error: `E × EM'` is a product of normed spaces, so there are two potential models with
For now, please specify the model by hand.
-/
#guard_msgs in
#check CMDiff 2 (Prod.map (Prod.map f' g') h')
/--
error:`×EM' is a product of normed spaces, so there are two potential models with corners
For now, please specify the model by hand.
-/
#guard_msgs in
#check MDiff(Prod.ap(Prod.ap (rod.map f' g') h) k)
/--
error: `E × EM'` is a product of normed spaces, so there are two potential models with corners
For now, please specify the model by hand.
-/
#uard_msgs in
#check MDiff (Prod.map (Prod.map f' g') (Prod.map h' k'))
/--
[ElabDiffGeo.MDiff]considering instance of type `hartedSpace M`
For now, please specify the model by hand.
-/
n
#check MDiff (Prod.map f' (Prod.map g' (Prod.map h' k') [ElabDMDiff Failedwithjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
end
ElabDiffGeoMDiff
/--
error: `Prod E E'` is a product of normed spaces, so there are two potential models with corners
For[lab.DiffGeo.MDiff]Failed with error:
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map f' g') h') -- domain E × E' × F
/--
error: `Prod E E'` is a product of normed spaces, so there are two potential models with corners
For now, please specify the model by hand.
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map f' g') f) -- domain E × E' × M = (E × E') × M
/--` nota set units in not of complete normedalgebra
info: MDifferentiable ((modelWithCornersSelf E).prod ((modelWithCornersSelf E).prod I)) (I.prod [ElabDiffGeoMDiff ️Complex unit circle
(Prod.map f' (Prod.map f' f)) : Prop
-/
#guard_msgs in
`isnotacoercionofa setatype
/--
info: MDifferentiable (I.prod ((modelWithCornersSelf E).prod I)) (I'.prod (I.prod I')) (Prod.map f (Prod.map f' f)) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map f#check MDiff (Prod.map f a anon- function
/--
Prod F is a ofnormed , there are two potentialmodels with corners
For now, please specify the model by hand.
-/
#guard_msgs in
#check MDiff (Prod.map f (Prod.map f' h')) -- domain M × (E × F)
/--
info: MDifferentiable ((I.prod (modelWithCornersSelf E)).prod (modelWithCornersSelf F))
((I'.prod I).prod (modelWithCornersSelf )) (Prod.map (Prod.map f f') h') : Prop
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map f f') h') -- domain (M × E) × F
/--
info: MDifferentiable (((modelWithCornersSelf E).prod I).prod (modelWithCornersSelf F))
((I.prod I').prod (modelWithCornersSelf )) (Prod.map (Prod.map f' f) h') : Prop
-/
#guard_msgs in
#check MDiff (Prod.map (Prod.map f' f) h') -- domain (E × M) × F
end product
-- Combining sums and products.
variable {f : M → M'} {g : M' → M} {f' g' : E → M} {h' : F → E}
/--
info: MDifferentiable (I'.prod (I.prod I)) (I.prod (I'.prod I')) (Prod.map g (Prod.map f f)) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map g (Prod.map f f))
-- domain M' × (M ⊕ M)
/--
info: MDifferentiable ((modelWithCornersSelf E).prod ((modelWithCornersSelf E).prod I)) (I.prod (I.prod I'))
(Prod.map f' (Prod.map (Sum.map f' g') f)) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map f' (Prod.map (Sum.map f' g') f)) -- domain E × (E ⊕ E) × M
/--
info: MDifferentiable ((modelWithCornersSelf E).prod I) (I.prod I') (Prod.map (Sum.map f' f') (Sum.map f f)) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map (Sum.map f' f') (Sum.map f f)) -- domain (M ⊕ M) × (E ⊕ E)
/--
info: MDifferentiable (I.prod (modelWithCornersSelf E)) (I'.prod I) (Prod.map (Sum.map f f) (Sum.map f' g')) : Prop
-/
#guard_msgs in
#check MDiff (Prod.map (Sum.map f f) (Sum.map f' g'))
/--
info: MDifferentiable (I.prod (modelWithCornersSelf E)) (I'.prod I)
(Sum.map (Prod.map (Sum.map f f) (Sum.map f' g')) (Prod.map (Sum.map f f) (Sum.map f' g'))) : Prop
-/
#guard_msgs in
#check MDiff (Sum.map (Prod.map (Sum.map f f) (Sum.map f' g')) (Prod.map (Sum.map f f) (Sum.map f' g'))) -- domain: (M ⊕ M) × (E ⊕ E) ⊕ (M ⊕ M) × (E ⊕ E)
section opens
open TopologicalSpace
variable {s : Opens M} {t : Opens E} {u : Opens M'}
variable {f : s → M'} in
/-- info: MDifferentiable I I' f : Prop -/
#guard_msgs in
#check MDiff f
variable {f : s → u} in
/-- info: MDifferentiable I I' f : Prop -/
#guard_msgs in
#check MDiff f
variable {f : u → M × E} in
/-- info: MDifferentiable I' (I.prod (modelWithCornersSelf E)) f : Prop -/
#guard_msgs in
#check MDiff f
variable {s : Opens (M × E)} {f : s → M × E} in
/--
info: MDifferentiable (I.prod (modelWithCornersSelf E)) (I.prod (modelWithCornersSelf E)) f : Prop
-/
#guard_msgs in
#check MDiff f
variable {s : Opens (M ⊕ M)} {f : s → (M × E) ⊕ (M × E)} in
/-- info: MDifferentiable I (I.prod (modelWithCornersSelf E)) f : Prop -/
#guard_msgs in
#check MDiff f
variable {s : Opens (M ⊕ M)} {f : s → × E}
/-- info: MDifferentiable I ((modelWithCornersSelf ).prod (modelWithCornersSelf E)) f : Prop -/
#guard_msgs in
#check MDiff f
end opens
/-- info: MDifferentiable (I.prod (modelWithCornersSelf E)) I' (Sum.map k k) : Prop -/
#guard_msgs in
#check MDiff (Sum.map k k)
end
section trace
/- Test that basic tracing works. -/
set_option trace.Elab.DiffGeo true
variable {f : Unit → Unit}
/--
error: Could not find a model with corners for `Unit`.
---
trace: [Elab.DiffGeo.MDiff] Finding a model with corners for: `Unit`
[Elab.DiffGeo.MDiff] ️ TotalSpace
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a `Bundle.TotalSpace`.
[Elab.DiffGeo.MDiff] ️ TangentBundle
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a `TangentBundle`
[Elab.DiffGeo.MDiff] ️ NormedSpace
[Elab.DiffGeo.MDiff] Failed with error:
Couldn't find a `NormedSpace` structure on `Unit` among local instances.
[Elab.DiffGeo.MDiff] ️ Manifold
[Elab.DiffGeo.MDiff] considering instance of type `ChartedSpace H M`
[Elab.DiffGeo.MDiff] Failed with error:
Couldn't find a `ChartedSpace` structure on `Unit` among local instances, and `Unit` is not the charted space of some type in the local context either.
[Elab.DiffGeo.MDiff] ️ ContinuousLinearMap
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a space of continuous linear maps
[Elab.DiffGeo.MDiff] ️ ContinuousAlternatingMap
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a space of continuous alternating maps
[Elab.DiffGeo.MDiff] ️ RealInterval
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a coercion of a set to a type
[Elab.DiffGeo.MDiff] ️ EuclideanSpace
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a Euclidean space, half-space or quadrant
[Elab.DiffGeo.MDiff] ️ UpperHalfPlane
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not the complex upper half plane
[Elab.DiffGeo.MDiff] ️ Units of algebra
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a set of units, in particular not of a complete normed algebra
[Elab.DiffGeo.MDiff] ️ Complex unit circle
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not the complex unit circle
[Elab.DiffGeo.MDiff] ️ Sphere
[Elab.DiffGeo.MDiff] Failed with error:
`Unit` is not a coercion of a set to a type
[Elab.DiffGeo.MDiff] ️ NormedField
[Elab.DiffGeo.MDiff] Failed with error:
failed to synthesize
NontriviallyNormedField Unit
⏎
Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.
[Elab.DiffGeo.MDiff] ️ InnerProductSpace
[Elab.DiffGeo.MDiff] Failed with error:
Couldn't find an `InnerProductSpace` structure on `Unit` among local instances.
-/
#guard_msgs in
#check mfderiv% f
set_option pp.notation true in
/--
info: (T% f) : Unit → TotalSpace Unit (Trivial Unit Unit)
---
trace: [Elab.DiffGeo.TotalSpaceMk] Section of a trivial bundle as a non-dependent function
-/
#guard_msgs in
#check T% f
end trace
¤ Dauer der Verarbeitung: 0.198 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|