The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V17. Differential calculus in normed spaces

Mathlib.Analysis.Calculus.TangentCone.Defs

13 declarations. Mathlib docs ยท Source

Tangent cone

In this file, we define two predicates UniqueDiffWithinAt ๐•œ s x and UniqueDiffOn ๐•œ s ensuring that, if a function has two derivatives, then they have to coincide. As a direct definition of this fact (quantifying on all target types and all functions) would depend on universes, we use a more intrinsic definition: if all the possible tangent directions to the set s at the point x span a dense subset of the whole subset, it is easy to check that the derivative has to be unique.

Therefore, we introduce the set of all tangent directions, named tangentConeAt, and express UniqueDiffWithinAt and UniqueDiffOn in terms of it. One should however think of this definition as an implementation detail: the only reason to introduce the predicates UniqueDiffWithinAt and UniqueDiffOn is to ensure the uniqueness of the derivative. This is why their names reflect their uses, and not how they are defined.

Implementation notes

Note that this file is imported by Mathlib/Analysis/Calculus/FDeriv/Basic.lean. Hence, derivatives are not defined yet. The property of uniqueness of the derivative is therefore proved in Mathlib/Analysis/Calculus/FDeriv/Basic.lean, but based on the properties of the tangent cone we prove here.

def tangentConeAt E1 #

(R : Type u) โ†’ {E : Type v} โ†’ [AddCommGroup E] โ†’ [SMul R E] โ†’ [TopologicalSpace E] โ†’ Set E โ†’ E โ†’ Set E

The set of all tangent directions to the set s at the point x.

A point y belongs to the tangent cone of s at x iff there exist a family of scalars c n, a family of vectors d n, and a nontrivial filter in the index type such that

  • d n โ†’ 0 along the filter;
  • x + d n โˆˆ s eventually along the filter;
  • c n โ€ข d n โ†’ y along the filter,

The actual definition is given in terms of cluster points of a filter, see mem_tangentConeAt_of_seq and exists_fun_of_mem_tangentConeAt for the two implications unfolding this definition in more convenient way.

In a space with first countable topology, one can assume that the index type is โ„• and the filter is atTop, but the definition we use is more useful without that assumption.

theorem tangentConeAt_def E0 #

โˆ€ (R : Type u) {E : Type v} [inst : AddCommGroup E] [inst_1 : SMul R E] [inst_2 : TopologicalSpace E] (s : Set E)
  (x : E), tangentConeAt R s x = {y | ClusterPt y (โŠค โ€ข nhdsWithin 0 ((fun x_1 โ†ฆ x + x_1) โปยน' s))}

Alias of _private.Mathlib.Analysis.Calculus.TangentCone.Defs.0.tangentConeAt.eq_def.

theorem mem_tangentConeAt_of_frequently E0 #

โˆ€ {R : Type u} {E : Type v} [inst : AddCommGroup E] [inst_1 : SMul R E] [inst_2 : TopologicalSpace E] {s : Set E}
  {x y : E} {ฮฑ : Type u_1} (l : Filter ฮฑ) (c : ฮฑ โ†’ R) (d : ฮฑ โ†’ E),
  Filter.Tendsto d l (nhds 0) โ†’
    (โˆƒแถ  (n : ฮฑ) in l, x + d n โˆˆ s) โ†’ Filter.Tendsto (fun n โ†ฆ c n โ€ข d n) l (nhds y) โ†’ y โˆˆ tangentConeAt R s x

Let c n be a family of scalars, d n be a family of vectors, and l be a filter such that

  • d n โ†’ 0 along l;
  • x + d n โˆˆ s frequently along l;
  • c n โ€ข d n โ†’ y along l.

Then y belongs to the tangent cone of s at x. See also

  • mem_tangentConeAt_of_seq for a version assuming that x + d n โˆˆ s eventually along l.
  • exists_fun_of_mem_tangentConeAt for the other implication.

theorem mem_tangentConeAt_of_seq E0 #

โˆ€ {R : Type u} {E : Type v} [inst : AddCommGroup E] [inst_1 : SMul R E] [inst_2 : TopologicalSpace E] {s : Set E}
  {x y : E} {ฮฑ : Type u_1} (l : Filter ฮฑ) [l.NeBot] (c : ฮฑ โ†’ R) (d : ฮฑ โ†’ E),
  Filter.Tendsto d l (nhds 0) โ†’
    (โˆ€แถ  (n : ฮฑ) in l, x + d n โˆˆ s) โ†’ Filter.Tendsto (fun n โ†ฆ c n โ€ข d n) l (nhds y) โ†’ y โˆˆ tangentConeAt R s x

A special case of mem_tangentConeAt_of_frequently, which avoids Filter.Frequently.

theorem exists_fun_of_mem_tangentConeAt E2 #

โˆ€ {R : Type u} {E : Type v} [inst : AddCommGroup E] [inst_1 : SMul R E] [inst_2 : TopologicalSpace E] {s : Set E}
  {x y : E},
  y โˆˆ tangentConeAt R s x โ†’
    โˆƒ ฮฑ l,
      โˆƒ (_ : l.NeBot),
        โˆƒ c d,
          Filter.Tendsto d l (nhds 0) โˆง (โˆ€แถ  (n : ฮฑ) in l, x + d n โˆˆ s) โˆง Filter.Tendsto (fun n โ†ฆ c n โ€ข d n) l (nhds y)

If y belongs to the tangent cone of s at x, then there exist

  • an index type ฮฑ and a nontrivial filter l on ฮฑ;
  • a family of scalars c n, n : ฮฑ, and a family of vectors d n, n : ฮฑ such that
  • d n โ†’ 0 along l;
  • x + d n โˆˆ s eventually along l;
  • c n โ€ข d n โ†’ y along l.

In fact, one can take ฮฑ = R ร— E, c = Prod.fst, and d = Prod.snd, but this is not important, so the lemma statement hides these details.

This lemma provides a convenient way to unfold the definition of tangentConeAt.

abbrev posTangentConeAt E1 #

{E : Type v} โ†’ [inst : AddCommGroup E] โ†’ [Module โ„ E] โ†’ [TopologicalSpace E] โ†’ Set E โ†’ E โ†’ Set E

"Positive" tangent cone to s at x.

structure UniqueDiffWithinAt E1 #

(R : Type u) โ†’
  {E : Type v} โ†’
    [inst : Semiring R] โ†’ [inst_1 : AddCommGroup E] โ†’ [Module R E] โ†’ [TopologicalSpace E] โ†’ Set E โ†’ E โ†’ Prop

A property ensuring that the tangent cone to s at x spans a dense subset of the whole space. The main role of this property is to ensure that the differential within s at x is unique, hence this name. The uniqueness it asserts is proved in UniqueDiffWithinAt.eq in Mathlib/Analysis/Calculus/FDeriv/Basic.lean. To avoid pathologies in dimension 0, we also require that x belongs to the closure of s (which is automatic when E is not 0-dimensional).

theorem uniqueDiffWithinAt_iff E0 #

โˆ€ (R : Type u) {E : Type v} [inst : Semiring R] [inst_1 : AddCommGroup E] [inst_2 : Module R E]
  [inst_3 : TopologicalSpace E] (s : Set E) (x : E),
  UniqueDiffWithinAt R s x โ†” Dense โ†‘(Submodule.span R (tangentConeAt R s x)) โˆง x โˆˆ closure s

ctor UniqueDiffWithinAt.mk E0 #

โˆ€ {R : Type u} {E : Type v} [inst : Semiring R] [inst_1 : AddCommGroup E] [inst_2 : Module R E]
  [inst_3 : TopologicalSpace E] {s : Set E} {x : E},
  Dense โ†‘(Submodule.span R (tangentConeAt R s x)) โ†’ x โˆˆ closure s โ†’ UniqueDiffWithinAt R s x

theorem UniqueDiffWithinAt.dense_tangentConeAt E1 #

โˆ€ {R : Type u} {E : Type v} [inst : Semiring R] [inst_1 : AddCommGroup E] [inst_2 : Module R E]
  [inst_3 : TopologicalSpace E] {s : Set E} {x : E},
  UniqueDiffWithinAt R s x โ†’ Dense โ†‘(Submodule.span R (tangentConeAt R s x))

theorem UniqueDiffWithinAt.mem_closure E0 #

โˆ€ {R : Type u} {E : Type v} [inst : Semiring R] [inst_1 : AddCommGroup E] [inst_2 : Module R E]
  [inst_3 : TopologicalSpace E] {s : Set E} {x : E}, UniqueDiffWithinAt R s x โ†’ x โˆˆ closure s

def UniqueDiffOn E3 #

(R : Type u) โ†’
  {E : Type v} โ†’ [inst : Semiring R] โ†’ [inst_1 : AddCommGroup E] โ†’ [Module R E] โ†’ [TopologicalSpace E] โ†’ Set E โ†’ Prop

A property ensuring that the tangent cone to s at any of its points spans a dense subset of the whole space. The main role of this property is to ensure that the differential along s is unique, hence this name. The uniqueness it asserts is proved in UniqueDiffOn.eq in Mathlib/Analysis/Calculus/FDeriv/Basic.lean.

theorem UniqueDiffOn.uniqueDiffWithinAt E1 #

โˆ€ {R : Type u} {E : Type v} [inst : Semiring R] [inst_1 : AddCommGroup E] [inst_2 : Module R E]
  [inst_3 : TopologicalSpace E] {s : Set E} {x : E}, UniqueDiffOn R s โ†’ x โˆˆ s โ†’ UniqueDiffWithinAt R s x