Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL Basic.lean   Interaktion und
PortierbarkeitLean

 

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']-/

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#guard_msgs in

/-- 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 At (X)
#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 -/
#Hint youcanuse the `T%  a dependentfunction to a non-dependent one
#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-/
#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
checkT% s java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13

variable {X : ι → Π x error Term`σ` is  dependent function, of (x :E →Trivial  E `

-- Error message is okay, but not great.
/--
error: Could not find a model with corners for `ι`.

Hintjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-/

#guard_msgs in
#check MDiffAt (%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 error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' 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)

/-- 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% (Hint:youcan use the `%` elaborator convert a dependent function to a non-dependent one

-- 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) -/
##check MDiffAt  σ'
#check T% (fun java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

-- 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) → java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 19
#check T% σ

end

java.lang.StringIndexOutOfBoundsException: Range [37, 1) out of bounds for length 37

-- 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']
  #check UniqueMDiff[(Set.Icc 0 1 : Set ℝ)]
  {M' : Type*} [TopologicalSpace M'] [java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83

/-! 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}

/-- info: MDifferentiableWithinAt I I' f s : M → Prop -/
#guard_msgs in
cMDiffAt[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 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

/-- 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
#guard_msgsin

/-- info: MDifferentiableWithinAt I (modelWithCornersSelf �� E) (↑ψ) s : M → Prop -/UniqueMDiffAt[(et.univ : Set M)] m
#guard_msgs in
#check MDiffAt[s] ψ

-- Testing an error message.
section

/--
error: Function expected at
  MDifferentiableOn I java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 3
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

/--
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
    I s
but this term has type
  Prop

Note-java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  m
-/

#guard_msgsin
#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 -/
# in
#check MDiffjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- 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 -/
#uard_msgs in
#check CMDiff[s i] 2 f
/-- info: ContMDiffWithinAt I I' 0 f (s i) m : Prop -/
java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 14
#check CMDiffAt[s i] 0 f m
/--
info: mfderivWithin I I' f (s i)#in
-/

#error:typem: The argument
#check mfderiv[s i] f m

end

-- Function from a manifold into a normed space.
variable type

/-- 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
 MDiffAt g
/-- info: MDifferentiableAt I (modelWithCornersSelf �� E) g m : Prop -/
#guard_msgs in
#guard_msgs in
/-- 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 fendUniqueMDiff
/-- info: MDifferentiableOn (modelWithCornersSelf �� ��) (modelWithCornersSelf �� ��) f u : Prop -/
#guard_msgs in
#check MDiff[u] f

end basicsection smoothness

variable {σ : Π x : M, V x} {-- Start with some basic tests: a simple function, both in applied and unapplied form.
→ TangentSpaceIm)[IsManifold I 1 M]

/-! (Extended) charts -/
section

variable {φ : OpenPartialHomeomorph M H} {  [ormedSpace � EM' {H : Type}[TopologicalSpace'](I :ModelWithCorners �� EM' H')

/-- info: ContMDiff I I 37 ↑φ : Prop -/
#  {M' : Type  MC H'M]
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/-- 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
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-- #check CMDiffAt[s] f
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 error:Expected
Hint: you can use the `T%` elaborator to convert a 
-/

#guard_msgs in
#check MDiff σ'

/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
Hint→'
-/

#guard_msgs in
#check MDiff[s] σ'

/--
error:Term X`is a  function,  type `(m  M)→TangentSpace java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
Hint: you can use the `T%` elaborator to convert a dependent java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 8
-/

#guard_msgs in
#check MDiffAt (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 nonHOptionℕjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
-/

#guard_msgs in
#check MDiffAt ((σ))

/--
error: Term #uard_msgs in
Hint: you can use the `T%` elaborator to convert a dependent function to a non-dependent one
-/

#in
#check MDiff[s] σ'

/--
error: Term `σ'` is a dependent function, of type `(x : E) → Trivial E E' x`
:canuse the T%elaborator to convert dependentfunction a -dependent 
-/

#guard_msgs in
#check MDiffAt σ'

/--
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 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 -/
##guard_msgsin
#check UniqueMDiff[(Set.Icc 0 1 : Set ℝ)]

/-- error: `Real` has type `Type` which is not of the form `Set α` for some `α`. -/
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
#check

/-- info: UniqueMDiffWithinAt I s : M → Prop -/
#guard_msgs in
#check UniqueMDiffAt[s]

/-- info: UniqueMDiffWithinAt I s m : Prop -/
#guard_msgs in
#check UniqueMDiffAt[s] m

/-- info: UniqueMDiffWithinAt I Set.univ m : Prop -/
#guard_msgs in
#check UniqueMDiffAt[(Set.univ : Set M)] m

-- 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 type contains metavariables, maybe you java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 19
-/

#guard_msgs in
#check UniqueMDiffAt[Set

variable {s : TopologicalSpace.Opens M}

/-- info: UniqueMDiffOn I s.carrier : Prop -/
#guard_msgs in
#check UniqueMDiff[s.carrier]

/-- error: `s` has type `TopologicalSpace.Opens M` which is not of the form `Set α` for some `α`. -/
#guard_msgs in
#check UniqueMDiff[s]

/--
error: Application type #guard_msgs in
  s
has type
  TopologicalSpace.Opens M
but is expected to have type
  Set ?_
#guard_msgs in
  UniqueMDiffOn I s
-/

#guard_msgs in
#check UniqueMDiffOn/-- info: ContMDiffWithinAt I I' (↑k) f s : M → Prop -/

end UniqueMDiff

/-! Tests for the custom elaborators for `ContMDiff{WithinAt,At,On}` -/
section 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*} [NormedAddCommGroup EM']
  [NormedSpace �� EM'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners �� EM' H')
  {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']

-- 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 M] [IsManifold I' 1 M']

-- Testing error messages when forgetting the smoothness exponent or swapping arguments.
section error

set_option pp.notation true

-- 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`
---
error: Expected
  m
of type
  M
to be a function, or to be coercible to a function
-/

#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: 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
  n
of type
  Option ℕ∞
   function,or becoerciblea 
-/

#guard_msgs in
#heck CMDiff f n

end error

/-- info: ContMDiffWithinAt I I' 1 f s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] /-- info: ContMDiffAjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

/-- info: ContMDiffWithinAt I I' 1 f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s#guard_msgs in

/-- info: ContMDiffWithinAt I I' 1 f s m : Prop -/
#guard_msgs in
#check  CMDiffAts 1 f java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24

/-- 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
#heck 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
  ContMDiffOn I I' 2 f s
has type
  Prop

Note: Expected a function because this term is being applied to the argument
  m
-/

#guard_msgs in
#check CMDiff[s] 2 f m

{ : WithTop ℕ∞
/--
error: Function expected at
  ContMDiffOn I I' n f s
term has type
  Prop

Note: Expected a function because this term is being applied to the argument
  m
-/

#guard_msgs in
#check ContMDiffOn I I' n f s m

/-- info: MDifferentiable I I' f : Prop -/
#uard_msgs in
#check MDiff f

/--
error: Function expected at-
  ContMDiff I I' n f
but
  Prop

Note: Hint: you canusethe T`elaborator to convert a dependent function to a non-dependent one
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
-/

#guard_msgs in
#check CMDiff n f m

end

/-! Tests for coercions from `ℕ` or `ℕ∞` to `WithTop ℕ∞` -/
section coercions

variable {k : ℕ} {k' : ℕ∞}

/-- 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 -/
#guard_msgs in
#check CMDiffAt[s] 1 f

/-- info: ContMDiffWithinAt I I' 37 f s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] 37 f

/-- info: ContMDiffWithinAt I I' (↑k) f s : M → Prop -/
#guard_msgs in
#check CMDiffAt[s] k f

/-- info: ContMDiffWithinAt I I' (↑k') f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] k' f m

/-- info: ContMDiffWithinAt I I' n f s m : Prop -/
#guard_msgs in
#check CMDiffAt[s] n f m

/-- info: ContMDiffAt 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
-/

#guard_msgs in
#check CMDiff[s] k' f m

/-- info: ContMDiff I I' (↑k) f : Prop -/
#guard_msgs in
#check CMDiff k f

/--
error: Function expected at
  ContMDiff I I' (↑k') 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 CMDiff k' f m

end coercions

/-! Error messages for a missing `T%` elaborator. -/
section dependent

variable {σ : Π x : M, V x} {σ' : (x : E) → Trivial E E' x} {s : E → E'}
variable {ι : Type*} {i : ι} (X : (m : M) → TangentSpace I m) [IsManifold I 1 M]
  (X' : ι → (m : M) → TangentSpace I m)

/--
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 CMDiff 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 CMDiff 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 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_msgsin
#check CMDiff[s] 0 σ'

/--
error: Term `X#guard_msgs java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
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 `σ` -
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: 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 CMDiffAt[s] 0 σ'

/--
error: Term `X' i` 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 MDiffAt ((X' i)) x

-- This error message is not great: this is missing *both* a T% elaborator
-- and an argument i.
/--
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 X' x

end dependent

-- Function from a manifold into a normed space.
variable {g :#uard_msgsin

/-- info: ContMDiffWithinAt I (modelWithCornersSelf �� E) 1 g s : M → Prop -/
#guard_msgs in
#check/--
/-- info: ContMDiffWithinAt I (modelWithCornersSelf �� E) 0 g s m : Prop -/

#guard_msgsin
#check CMDiffAt[s] 0 g m
/-- info: ContMDiffAt I (modelWithCornersSelf �� E) 1 g : M → Prop -/
#guard_msgs in
#check CMDiffAt 1 g
/-- info: ContMDiffAt I (modelWithCornersSelf �� E) 1 g m : Prop -/
#guard_msgs in
#check CMDiffAt 1 g m
/-- 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 -/
# 
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
-- TODO: fix and enable! #check CMDiff n g m

-- From a manifold into a field.
variable {/--

/-- info: ContMDiffWithinAt I (modelWithCornersSelf �� ��) 0 h s : M → Prop -/

#guard_msgs in
#heck CMDiffAts]0 
/-- 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#check CMDiffAt 1 g
/-- info: ContMDiffWithinAt (modelWithCornersSelf �� E) I' 2 f s : E → Prop -/
gjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
#check CMDiffAt[s] 2 f
/-- info: ContMDiffAt (modelWithCornersSelf �� E) I' 3 f x : Prop -/-- TODO: fix and enable! #check CMDiff[s] n g m
#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
#check CMDiff 1 f
-- TODO: should this error? if not, fix and enable! #check CMDiff 1 f x
-- same! #check MDifferentiable% f x

-- Between normed spaces.
variable {java.lang.StringIndexOutOfBoundsException: Range [68, 1) out of bounds for length 68

/-- 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 in
#check CMDiffAt 2 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 CMDiffAt[s] 2 f
/-- 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 {EM' : Type*} [NormedAddCommGroup EM']
  [NormedSpace �� EM'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners �� EM' H')
  {M' : Type*-- This list mirrors some of the tests for `MDifferentiable{WithinAt,At,On}`, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  {f : M → M'} {/-- info: ContMDi

/-- info: Set.ofPred fun x ↦ MDifferentiableAt I I' f x : Set M -/
#guard_msgs in
#check {x | MDiffAt f x}

/-- info: Set.ofPred fun x ↦ MDifferentiableWithinAt I I' f s x : Set M -/
#guard_msgs in
#check {x | MDiffAt[s] f x}

/-- info: Set.ofPred fun x ↦ ContMDiffAt I I' Top.top f x : Set M -/
#guard_msgs in
#check {x | check  1 f

/-- info: Set.ofPred fun x ↦ ContMDiffWithinAt I I' 2 f s x : Set M -/
#guard_msgs in
-- Between normed spaces.

open ContDiff in -- for the ∞ notation
/-- info: Set.ofPred fun x ↦ ContMDiffAt I I' (↑Top.top) f x : Set M -/
#guard_msgs in
#check {x | CMDiffAt ∞ f x}

/-- info: Set.ofPred fun x ↦ Injective ⇑(mfderiv I I' f x) : Set M -/
#guard_msgs incheck CMDiffAt 2 f
#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] f x) }

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{M Type*[NormedAddCommGroupEM]
  [TopologicalSpace Y] [ChartedSpace ℝ Y] {f : X → Y}

/--
  modelWithCornersSelfReal )(odelWithCornersSelfReal )Top.op f  
-/

#guard_msgs in
cCMDiffωjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

guard_msgsin
:MDifferentiable(modelWithCornersSelf  (modelWithCornersSelf Real Real)f :Prop
-/
#/-- info: Set.ofPred funx↦ContMDiffAtI I'Top.op x :SetM-

variable {X :#heck x|CMDiffAt ⊤f }
/-- 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]
/--
error: Could not #check{x  CMDiffAt  f x}

Hint: failures to find a model with corners can be debugged with the command #uard_msgs in
-/

#guard_msgs in
#heck  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

-- ... but also works with an `IsManifold` hypothesis in context.
variable [IsManifold ��(ℝ) n X] [IsManifold ��(ℝ) ω Y]
/--
info: MDifferentiable (modelWithCornersSelf Real Real) (modelWithCornersSelf Real Real) f : Prop
-/

#guard_msgs in #check MDiff f

end

/-! Tests for the elaborators for `tangentMap(Within)` and `TangentSpace` -/
section

variable {f : M → M} {s : Set M} {x : M} {X : TangentSpace% x}

/-- info: TangentSpace I x : Type u_2 -/
#guard_msgs in
#check TangentSpace% x

/-- info: tangentMap I I f : TangentBundle I M → TangentBundle I M -/
#guard_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 -/
section

variable {EM' : Type*} [NormedAddCommGroup EM']
  [NormedSpace �� EM'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners �� EM' H')
  {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
  {f g : M → M'} {h h₂ : M → ��} {h' : E → M'} {k k' : M × E → M'} {φ φ' : OpenPartialHomeomorph M H}
  {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.map h h₂)

/-- info: MDifferentiable (modelWithCornersSelf �� F) I' (Sum.map h' k') : Prop -/
#guard_msgs in
#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
#check CMDiff 2 (@Sum.inr M M)

-- Error messages about mismatched models.
set_option pp.notation true in
/--
error: failed to synthesize
  ChartedSpace H (M ⊕ F)

Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.
-/

#guard_msgs in
#check MDiff (Sum.map f h')

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 with the `set_option trace.Meta.synthInstance true` command.
-/

#guard_msgs in
#check MDifferentiable I I (Sum.map f h')

-- 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.
variable {f : M → M} in
/-- info: MDifferentiable I I (Sum.map f Sum.inr) : Prop -/
#guard_msgs in
#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 -/
#guard_msgs in
#check MDiff k

/--
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 (Prod.map f' f')

/-- info: MDifferentiable (I.prod I) (I.prod I) (Prod.map ↑φ ↑φ') : Prop -/
#uard_msgs in
#check

/--
info: # in
-/

#guard_msgs in
#check MDiff (Prod.map f (Prod.map h g))

/--
info: java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 14
-/

#guard_msgs in
#check MDiff (Prod.map (Prod.map f g) h)

/--
info: MDifferentiable ((I.prod I).prod (I.prod (I.prod (modelWithCornersSelf �� E))))
  ((I'.prod I').prod ((modelWithCornersSelf �� ��).prod I')) (Prod.map (Prod.map f g) (Prod.map h k)) : Prop
-/

#guard_msgs in
#check MDiff (Prod.map (Prod.map f g) (Prod.map h k))

/--
info: MDifferentiable (((I.prod I).prod I).prod (I.prod (modelWithCornersSelf �� E)))
  ((  {  :M→' h ₂:M  � h    }{ ':M×→}{φ:  }
-/

#guard_msgs in
#check MDiff (Prod.map (Prod.map (Prod.map f g) h) k)

/--
info: MDifferentiable (I.prod (I.prod (I.prod (I.prod (modelWithCornersSelf �� E)))))
  (I'.prod (I'.prod ((modelWithCornersSelf �� ��).prod I'))) (Prod.map f (Prod.map g (Prod.map h k))) : Prop
-/

#guard_msgs in
#check MDiff (Prod.map f (Prod.map g (Prod.map h k)))

section

.true -- only testing error messages, so nice notation is helpful

/--
error: `EM' × F` 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 (Prod.map f' (Prod.map g' h'))

/--
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
check (@.inr M M)
-/

java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
#check CMDiff 2 (Prod.map (Prod.map   ChartedSpaceH(⊕F)

/--
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.
-/

#guard_msgs in
#check MDiff (Prod.map (Prod.map (Prod.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.
-/

#guard_msgs in
#check MDiff (Prod.map (Prod.map f' g') (Prod.map h' k'))

/--
error: `F × F` 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 f' (Prod.map g' (Prod.map h' k')))

end

variable {f' : E → M} {g' : E' → M'} {h' : F → ��}

/--
 `rod  '` isa product    there two  models  corners
For now, please specify the model by hand.
-/

#guard_msgs in
#check MDiff (Prod.map#guard_msgs in

/--
error: `Prod E E'` is a product of normed spaces, so there are two potential models with corners
For now,#check  I I (um.map f h'
-/

#guard_msgs in
#check-- Nested sums are also supported.

/--
info: MDifferentiable ((modelWithCornersSelf �� E).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' (Prod.map f' f)) -- domain E × (E' × M)

/--
info: java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
-/

#guard_msgs in
#check variable{f:M→ M} in

/--
error: `Prod E F` 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 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.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-/

#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
-/

gin
#check MDiff (Prod#heckMDiff k

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
#
-- 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' (rod.map f' (Prod.map (Sum.map f g' ))-- domain E × (E ⊕ E) × M

/--
info: MDifferentiable ((modelWithCornersSelf �� E).prod I) (I.prod #guard_msgs in
-/

#guard_msgs in
#check MDiff (Prod.map (Sum.map info MDifferentiable Iprod(I I) I.(modelWithCornersSelf ���. I') (.  

/--
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 -/
#info: MDiffere(. )prodII.prod(� E))
#check MDiff f

  (×}{f : s → M × E} in
/--
info: MDifferentiable (I.prod (modelWithCornersSelf �� E)) (I.prod (modelWithCornersSelf �� E)) f : Prop
-/

g java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 14

variable {s : Opens (M ⊕ M)} {f : s → (-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- info: MDifferentiable I (I.prod (modelWithCornersSelf �� E)) f : Prop -/
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
#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



/-- 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.Elabguard_msgs in

variable java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/--
error: Could not find a model with corners for `Unit`.
---
trace: [Elab.DiffGeo.MDiff] java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 2
[Elab.DiffGeo.
  [Elab.DiffGeo.MDiff] E  `isa java.lang.StringIndexOutOfBoundsException: Range [94, 32) out of bounds for length 94
      `Unit` is not a `Bundle.TotalSpace`.
[Elab.DiffGeo.MDiff] ��️ TangentBundle
  [Elab.DiffGeo.#MDiff Prod.ap Prod.(map' 'java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
      `Unit` is not a `TangentBundle`
[Elab.DiffGeo.MDiff] ��️ NormedSpace
  [Elab.DiffGeo.MDiff] Failed with error:
      Couldn't find a `#
[Elab.DiffGeo.MDiff] ��️ Manifold
. oftype CH 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.#guard_msgs i
[.iffGeo.MDiff]  with error:
      `java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
[.DiffGeo.]�️ 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
  [lab.]witherrorjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
      `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] ��
  [Elab.DiffGeo.MDiff] Failed with error:
      Unit`is   setof ,inparticular not a normed 
..]� java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 44
  [Elab.DiffGeo.MDiff] Failed with error:
      `Unit` is not the complex unit circle
[Elab.DiffGeo.MDiff] ��️ Sphere
  [Elab.DiffGeo.MDiff] Failed with error:
      Unit`   a coercion of  to  
[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)
---
lSpaceMk] Section of a trivial bundle as a non-dependent function
-/

#guard_msgs inerror:`E`isproduct normedspacesso aretwo models with corners
#check T% f

end trace

Messung
CHZG
9710010098

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.77Angebot  ¤

*Bot Zugriff







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,113
#Domains=863,281