# Documentation

Mathlib.Analysis.Calculus.TangentCone

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

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

def tangentConeAt (𝕜 : Type u_1) {E : Type u_2} [] [Module 𝕜 E] [] (s : Set E) (x : E) :
Set E

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

Instances For
theorem uniqueDiffWithinAt_iff (𝕜 : Type u_1) {E : Type u_2} [] [Module 𝕜 E] [] (s : Set E) (x : E) :
Dense ↑(Submodule.span 𝕜 ()) x
structure UniqueDiffWithinAt (𝕜 : Type u_1) {E : Type u_2} [] [Module 𝕜 E] [] (s : Set E) (x : E) :

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 Fderiv.Basic. 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).

Instances For
def UniqueDiffOn (𝕜 : Type u_1) {E : Type u_2} [] [Module 𝕜 E] [] (s : Set E) :

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 Fderiv.Basic.

Instances For
theorem mem_tangentConeAt_of_pow_smul {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {y : E} {s : Set E} {r : 𝕜} (hr₀ : r 0) (hr : r < 1) (hs : ∀ᶠ (n : ) in Filter.atTop, x + r ^ n y s) :
y
theorem tangentCone_univ {𝕜 : Type u_1} {E : Type u_2} [] {x : E} :
tangentConeAt 𝕜 Set.univ x = Set.univ
theorem tangentCone_mono {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (h : s t) :
theorem tangentConeAt.lim_zero {𝕜 : Type u_1} {E : Type u_2} [] {y : E} {α : Type u_5} (l : ) {c : α𝕜} {d : αE} (hc : Filter.Tendsto (fun n => c n) l Filter.atTop) (hd : Filter.Tendsto (fun n => c n d n) l (nhds y)) :

Auxiliary lemma ensuring that, under the assumptions defining the tangent cone, the sequence d tends to 0 at infinity.

theorem tangentCone_mono_nhds {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (h : ) :
theorem tangentCone_congr {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (h : = ) :
=

Tangent cone of s at x depends only on 𝓝[s] x.

theorem tangentCone_inter_nhds {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (ht : t nhds x) :
tangentConeAt 𝕜 (s t) x =

Intersecting with a neighborhood of the point does not change the tangent cone.

theorem subset_tangentCone_prod_left {𝕜 : Type u_1} {E : Type u_2} [] {F : Type u_3} [] {x : E} {s : Set E} {t : Set F} {y : F} (ht : y ) :
↑() '' tangentConeAt 𝕜 (s ×ˢ t) (x, y)

The tangent cone of a product contains the tangent cone of its left factor.

theorem subset_tangentCone_prod_right {𝕜 : Type u_1} {E : Type u_2} [] {F : Type u_3} [] {x : E} {s : Set E} {t : Set F} {y : F} (hs : x ) :
↑() '' tangentConeAt 𝕜 (s ×ˢ t) (x, y)

The tangent cone of a product contains the tangent cone of its right factor.

theorem mapsTo_tangentCone_pi {𝕜 : Type u_1} {ι : Type u_5} [] {E : ιType u_6} [(i : ι) → NormedAddCommGroup (E i)] [(i : ι) → NormedSpace 𝕜 (E i)] {s : (i : ι) → Set (E i)} {x : (i : ι) → E i} {i : ι} (hi : ∀ (j : ι), j ix j closure (s j)) :
Set.MapsTo (↑()) (tangentConeAt 𝕜 (s i) (x i)) (tangentConeAt 𝕜 (Set.pi Set.univ s) x)

The tangent cone of a product contains the tangent cone of each factor.

theorem mem_tangentCone_of_openSegment_subset {G : Type u_4} [] {s : Set G} {x : G} {y : G} (h : s) :
y - x

If a subset of a real vector space contains an open segment, then the direction of this segment belongs to the tangent cone at its endpoints.

theorem mem_tangentCone_of_segment_subset {G : Type u_4} [] {s : Set G} {x : G} {y : G} (h : segment x y s) :
y - x

If a subset of a real vector space contains a segment, then the direction of this segment belongs to the tangent cone at its endpoints.

### Properties of UniqueDiffWithinAt and UniqueDiffOn#

This section is devoted to properties of the predicates UniqueDiffWithinAt and UniqueDiffOn.

theorem UniqueDiffOn.uniqueDiffWithinAt {𝕜 : Type u_1} {E : Type u_2} [] {s : Set E} {x : E} (hs : ) (h : x s) :
theorem uniqueDiffWithinAt_univ {𝕜 : Type u_1} {E : Type u_2} [] {x : E} :
UniqueDiffWithinAt 𝕜 Set.univ x
theorem uniqueDiffOn_univ {𝕜 : Type u_1} {E : Type u_2} [] :
UniqueDiffOn 𝕜 Set.univ
theorem uniqueDiffOn_empty {𝕜 : Type u_1} {E : Type u_2} [] :
theorem UniqueDiffWithinAt.congr_pt {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {y : E} {s : Set E} (h : ) (hy : x = y) :
theorem UniqueDiffWithinAt.mono_nhds {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (h : ) (st : ) :
theorem UniqueDiffWithinAt.mono {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (h : ) (st : s t) :
theorem uniqueDiffWithinAt_congr {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (st : = ) :
theorem uniqueDiffWithinAt_inter {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (ht : t nhds x) :
UniqueDiffWithinAt 𝕜 (s t) x
theorem UniqueDiffWithinAt.inter {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (hs : ) (ht : t nhds x) :
UniqueDiffWithinAt 𝕜 (s t) x
theorem uniqueDiffWithinAt_inter' {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (ht : t ) :
UniqueDiffWithinAt 𝕜 (s t) x
theorem UniqueDiffWithinAt.inter' {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} {t : Set E} (hs : ) (ht : t ) :
UniqueDiffWithinAt 𝕜 (s t) x
theorem uniqueDiffWithinAt_of_mem_nhds {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} (h : s nhds x) :
theorem IsOpen.uniqueDiffWithinAt {𝕜 : Type u_1} {E : Type u_2} [] {x : E} {s : Set E} (hs : ) (xs : x s) :
theorem UniqueDiffOn.inter {𝕜 : Type u_1} {E : Type u_2} [] {s : Set E} {t : Set E} (hs : ) (ht : ) :
UniqueDiffOn 𝕜 (s t)
theorem IsOpen.uniqueDiffOn {𝕜 : Type u_1} {E : Type u_2} [] {s : Set E} (hs : ) :
theorem UniqueDiffWithinAt.prod {𝕜 : Type u_1} {E : Type u_2} [] {F : Type u_3} [] {x : E} {s : Set E} {t : Set F} {y : F} (hs : ) (ht : ) :
UniqueDiffWithinAt 𝕜 (s ×ˢ t) (x, y)

The product of two sets of unique differentiability at points x and y has unique differentiability at (x, y).

theorem UniqueDiffWithinAt.univ_pi {𝕜 : Type u_1} (ι : Type u_5) [] (E : ιType u_6) [(i : ι) → NormedAddCommGroup (E i)] [(i : ι) → NormedSpace 𝕜 (E i)] (s : (i : ι) → Set (E i)) (x : (i : ι) → E i) (h : ∀ (i : ι), UniqueDiffWithinAt 𝕜 (s i) (x i)) :
UniqueDiffWithinAt 𝕜 (Set.pi Set.univ s) x
theorem UniqueDiffWithinAt.pi {𝕜 : Type u_1} (ι : Type u_5) [] (E : ιType u_6) [(i : ι) → NormedAddCommGroup (E i)] [(i : ι) → NormedSpace 𝕜 (E i)] (s : (i : ι) → Set (E i)) (x : (i : ι) → E i) (I : Set ι) (h : ∀ (i : ι), i IUniqueDiffWithinAt 𝕜 (s i) (x i)) :
theorem UniqueDiffOn.prod {𝕜 : Type u_1} {E : Type u_2} [] {F : Type u_3} [] {s : Set E} {t : Set F} (hs : ) (ht : ) :
UniqueDiffOn 𝕜 (s ×ˢ t)

The product of two sets of unique differentiability is a set of unique differentiability.

theorem UniqueDiffOn.pi {𝕜 : Type u_1} (ι : Type u_5) [] (E : ιType u_6) [(i : ι) → NormedAddCommGroup (E i)] [(i : ι) → NormedSpace 𝕜 (E i)] (s : (i : ι) → Set (E i)) (I : Set ι) (h : ∀ (i : ι), i IUniqueDiffOn 𝕜 (s i)) :
UniqueDiffOn 𝕜 (Set.pi I s)

The finite product of a family of sets of unique differentiability is a set of unique differentiability.

theorem UniqueDiffOn.univ_pi {𝕜 : Type u_1} (ι : Type u_5) [] (E : ιType u_6) [(i : ι) → NormedAddCommGroup (E i)] [(i : ι) → NormedSpace 𝕜 (E i)] (s : (i : ι) → Set (E i)) (h : ∀ (i : ι), UniqueDiffOn 𝕜 (s i)) :
UniqueDiffOn 𝕜 (Set.pi Set.univ s)

The finite product of a family of sets of unique differentiability is a set of unique differentiability.

theorem uniqueDiffWithinAt_convex {G : Type u_4} [] {s : Set G} (conv : ) (hs : ) {x : G} (hx : x ) :

In a real vector space, a convex set with nonempty interior is a set of unique differentiability at every point of its closure.

theorem uniqueDiffOn_convex {G : Type u_4} [] {s : Set G} (conv : ) (hs : ) :

In a real vector space, a convex set with nonempty interior is a set of unique differentiability.

theorem uniqueDiffOn_Ici (a : ) :
theorem uniqueDiffOn_Iic (a : ) :
theorem uniqueDiffOn_Ioi (a : ) :
theorem uniqueDiffOn_Iio (a : ) :
theorem uniqueDiffOn_Icc {a : } {b : } (hab : a < b) :

The real interval [0, 1] is a set of unique differentiability.

theorem uniqueDiffWithinAt_Ioo {a : } {b : } {t : } (ht : t Set.Ioo a b) :