Convex Optimization Notes

2. Lecture 2: Separation and Duality🔗

Lecture 1 established the slogan that convexity turns local information into global information. Lecture 2 starts from convex functions, but very quickly it switches to sets. The point of the epigraph is exactly to make that switch. Once a convex function is encoded as a subset of E \times \mathbb{R}, the right tools are projection, separation, and supporting hyperplanes. After that, we translate the geometry back into function language through subgradients.

Lecture 2 turns the slogan of Lecture 1 that convexity turns local information into global information into one geometric picture:

\operatorname{cl}(\operatorname{conv}(S)) = \bigcap\{H(\xi,b) : S \subseteq H(\xi,b)\}.

The two separation theorems to remember are the point-to-closed-convex-set theorem and the cone-separation theorem. Everything else in the lecture is either a reformulation of that picture or a way of bringing it back to convex functions.

2.1. Extended Real and Epigraph🔗

We begin by enlarging the value space from \mathbb{R} to \mathbb{R}\cup\{+\infty\}. The point is not to do arithmetic with +\infty for its own sake. The point is that +\infty lets us encode the effective domain inside the function itself. That makes the epigraph construction completely uniform.

Definition
2.1 Extended real line used in these notes

We write

\mathbb{R}\cup\{+\infty\}

for the one-sided extended real line. Its order is the usual order on \mathbb{R}, extended by

a\le +\infty \qquad\text{for every }a\in \mathbb{R}\cup\{+\infty\}.

In Lecture 2 we use the conventions

a+(+\infty)=+\infty,\qquad \lambda(+\infty)=+\infty\ (\lambda>0),\qquad 0\cdot(+\infty):=0,\qquad \inf\varnothing=+\infty.

Similar properties hold for -\infty. The expression +\infty-\infty is undefined, and we will not use it.

Definition
2.2 Extended-value function and effective domain

Let f : E \to \mathbb{R}\cup\{+\infty\}. Its effective domain is

\operatorname{dom} f := \{x\in E : f(x)<+\infty\}.

The value +\infty is used to encode points outside the effective domain.

Definition
2.3 Convex extended-value function

Let f : E \to \mathbb{R}\cup\{+\infty\}. We say that f is convex if

\forall x,y\in E,\ \forall \theta\in[0,1],\qquad f(\theta x+(1-\theta)y)\le \theta f(x)+(1-\theta)f(y).

Remark
2.1 Compatibility with the Lecture 1 notion of convexity

Let C \subseteq E be convex, and let h : C \to \mathbb{R}. Define the ambient extension \tilde h : E \to \mathbb{R}\cup\{+\infty\} by

\tilde h(x):= \begin{cases} h(x), & x\in C,\\ +\infty, & x\notin C. \end{cases}

Then h is convex in the sense of Lecture 1 if and only if \tilde h is convex in the extended-value sense above. So Lecture 2 is not changing the notion of convexity. It is only changing the packaging.

Definition
2.4 Epigraph

Let f : E \to \mathbb{R}\cup\{+\infty\}. Its epigraph is

\operatorname{epi}(f):=\{(x,t)\in E\times \mathbb{R}: t\ge f(x)\}.

The epigraph is the first place where the function-to-set translation becomes concrete. The next lemma says that convexity of f is exactly convexity of \operatorname{epi}(f).

Lemma
2.1 Epigraph criterion

Let f : E \to \mathbb{R}\cup\{+\infty\}. Then the following are equivalent:

  1. For all x,y\in E and all \theta\in[0,1],

    f(\theta x+(1-\theta)y)\le \theta f(x)+(1-\theta)f(y).

  2. \operatorname{epi}(f) is a convex subset of E\times \mathbb{R}.

Proof

Assume first that f is convex, and let (x_1,t_1),(x_2,t_2)\in \operatorname{epi}(f) and \theta\in[0,1]. Then f(x_i)\le t_i for i\in\{1,2\}, hence

\begin{aligned} f(\theta x_1+(1-\theta)x_2) &\le \theta f(x_1)+(1-\theta)f(x_2)\\ &\le \theta t_1+(1-\theta)t_2. \end{aligned}

Therefore (\theta x_1+(1-\theta)x_2,\theta t_1+(1-\theta)t_2)\in \operatorname{epi}(f), so \operatorname{epi}(f) is convex.

Conversely, assume that \operatorname{epi}(f) is convex, and let x_1,x_2\in E and \theta\in[0,1]. If \theta=0 or \theta=1, the desired inequality is immediate. Assume therefore that \theta\in(0,1). If f(x_1)=+\infty or f(x_2)=+\infty, then

\theta f(x_1)+(1-\theta)f(x_2)=+\infty,

so the desired inequality is trivial. Thus both f(x_1) and f(x_2) are finite real numbers, and therefore (x_1,f(x_1)) and (x_2,f(x_2)) belong to \operatorname{epi}(f). By convexity of \operatorname{epi}(f),

\bigl(\theta x_1+(1-\theta)x_2,\ \theta f(x_1)+(1-\theta)f(x_2)\bigr) \in \operatorname{epi}(f),

which means exactly that

f(\theta x_1+(1-\theta)x_2)\le \theta f(x_1)+(1-\theta)f(x_2).

Hence f is convex.

Formal Statement and Proof

Lean theorem: Lecture02.lem_l2_epi.

theorem Lecture02_lem_l2_epi {E : Type*} [NormedAddCommGroup E] [NormedSpace E] {f : E EReal} (hNoBot : NoBot f) : EConvexOn Set.univ f Convex (eRealEpigraph f) := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fEConvexOn Set.univ f Convex (eRealEpigraph f) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fEConvexOn Set.univ f Convex (eRealEpigraph f)E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fConvex (eRealEpigraph f) EConvexOn Set.univ f E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fEConvexOn Set.univ f Convex (eRealEpigraph f) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhconv:EConvexOn Set.univ fConvex (eRealEpigraph f) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhconv:EConvexOn Set.univ fhconvφ:ConvexOn (effectiveDomain f) fun x => (f x).toReal := EConvexOn.toReal_convexOn_effectiveDomain hNoBot hconvConvex (eRealEpigraph f) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhconv:EConvexOn Set.univ fhconvφ:ConvexOn (effectiveDomain f) fun x => (f x).toReal := EConvexOn.toReal_convexOn_effectiveDomain hNoBot hconvhreal:Convex (epigraph (fun x => (f x).toReal) (effectiveDomain f)) := (lem_l2_epi_real (EConvexOn.convex_effectiveDomain hconv)).mp hconvφConvex (eRealEpigraph f) All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fConvex (eRealEpigraph f) EConvexOn Set.univ f E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhEpi:Convex (eRealEpigraph f)EConvexOn Set.univ f have hreal : Convex (epigraph (fun x => (f x).toReal) (effectiveDomain f)) := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhEpi:Convex (eRealEpigraph f)Convex (epigraph (fun x => (f x).toReal) (effectiveDomain f)) All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fhEpi:Convex (eRealEpigraph f)hreal:Convex (epigraph (fun x => (f x).toReal) (effectiveDomain f)) := Eq.mp (congrArg (Convex ) (eRealEpigraph_eq_epigraph_toReal hNoBot)) hEpihconvφ:ConvexOn (effectiveDomain f) fun x => (f x).toReal := convexOn_of_convex_epigraph hrealEConvexOn Set.univ f All goals completed! 🐙

After the epigraph criterion, the lecture switches to convex sets. The first geometric input is Euclidean projection. Projection is what manufactures separating hyperplanes, and later those separating hyperplanes will come back as subgradients.

2.2. Separation Theorems for Convex Sets🔗

Definition
2.5 Closed halfspace

Let \xi\in E^\ast\setminus\{0\} and b\in \mathbb{R}. The associated closed halfspace is

H(\xi,b):=\{x\in E : \langle \xi,x\rangle\le b\}.

Definition
2.6 Interior and closure

Let S\subseteq E. Its interior is

\operatorname{int}(S):= \{x\in S:\exists r>0\text{ such that }\{y\in E:\|y-x\|<r\}\subseteq S\}.

Its closure is

\operatorname{cl}(S):= \bigcap\{F\subseteq E:F\text{ is closed and }S\subseteq F\}.

Equivalently,

x\in \operatorname{cl}(S) \iff \forall r>0,\ \{y\in E:\|y-x\|<r\}\cap S\neq\varnothing.

Remark
2.2 Basic properties of interior and closure

For every S\subseteq E, the set \operatorname{int}(S) is open, the set \operatorname{cl}(S) is closed, and

\operatorname{int}(S)\subseteq S\subseteq \operatorname{cl}(S).

Moreover, S is open if and only if \operatorname{int}(S)=S, and S is closed if and only if \operatorname{cl}(S)=S.

Theorem
2.2 Point-to-set separation for a closed convex set

Let C\subseteq E be nonempty, closed, and convex, and let z\in E\setminus C. Then there exist \xi\in E^\ast\setminus\{0\} and b\in \mathbb{R} such that

\langle \xi,z\rangle>b \qquad\text{and}\qquad \forall y\in C,\ \langle \xi,y\rangle\le b.

Equivalently, C\subseteq H(\xi,b) while z\notin H(\xi,b).

Proof

Let p be the auxiliary Euclidean projection of z onto C, whose existence and uniqueness follow from Theorem 2.3. Because z\notin C, we have z\neq p. Define \xi\in E^\ast by

\langle \xi,y\rangle:=\langle z-p,y\rangle_2 \qquad\text{for every }y\in E,

and set b:=\langle \xi,p\rangle. By Theorem 2.3,

\forall y\in C,\qquad \langle z-p,y-p\rangle_2\le 0.

Equivalently,

\forall y\in C,\qquad \langle \xi,y\rangle\le \langle \xi,p\rangle=b.

Moreover,

\langle \xi,z\rangle-b = \langle z-p,z-p\rangle_2 = \|z-p\|_2^2>0.

Therefore \langle \xi,z\rangle>b\ge \langle \xi,y\rangle for all y\in C. Since z-p\neq 0, also \xi\neq 0.

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_point_closed_sep.

theorem Lecture02_thm_l2_point_closed_sep {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {C : Set E} (hC_closed : IsClosed C) (hC_convex : Convex C) (hC_ne : C.Nonempty) {z : E} (hz : z C) : ξ : Covector E, ξ 0 b : , ( y C, ξ y b) ξ z > b := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z C ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E)) ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclidean ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' C ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b have hC_closed' : IsClosed C' := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' CIsClosed C' All goals completed! 🐙 have hC_convex' : Convex C' := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedConvex C' All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_ne ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b have hz' : e z C' := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nee z C' E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C'False E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nex:Ehx:x Chxz:e x = e zFalse E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nex:Ehx:x Chxz:e x = e zz C All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > b ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e ξ, ξ 0 b, (∀ y C, ξ y b) ξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' eξ 0E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e y C, ξ y bE:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' eξ z > b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' eξ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e:ξ = 0False E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e:ξ = 0ξ' = 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e:ξ = 0u:EuclideanSpace (Fin (Module.finrank E))ξ' u = 0 u E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e:ξ = 0x:Eξ' (e x) = 0 (e x) All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' e y C, ξ y b intro y E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' ey:Ehy:y Cξ y b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' ey:Ehy:y Chy':e y C' := Exists.intro y hy, rflξ y b All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_closed:IsClosed ChC_convex:Convex ChC_ne:C.Nonemptyz:Ehz:z CF:Type := EuclideanSpace (Fin (Module.finrank E))e:E ≃L[] EuclideanSpace (Fin (Module.finrank E)) := toEuclideanC':Set F := e '' ChC_closed':IsClosed C' := (Homeomorph.isClosed_image e.toHomeomorph).mpr hC_closedhC_convex':Convex C' := Eq.mpr (id (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a)))) (Eq.mp (congrArg (Convex ) (Set.image_congr fun a a_1 => Eq.refl (e a))) (Convex.linear_image hC_convex e.toLinearEquiv))hC_ne':C'.Nonempty := Set.Nonempty.image (⇑e) hC_nehz':e z C' := fun hz' => Exists.casesOn hz' fun x h => And.casesOn h fun hx hxz => hz (ContinuousLinearEquiv.injective e hxz hx)ξ':Covector (EuclideanSpace (Fin (Module.finrank E)))hξ'0:ξ' 0b:hC'ξ': y C', ξ' y bhzξ':ξ' (e z) > bξ:Covector E := ContinuousLinearMap.comp ξ' eξ z > b All goals completed! 🐙

Why is the closedness assumption needed? The proof below reduces separation to Euclidean projection, and projection may fail to exist for a convex set that is not closed. The statement itself can also fail: for example, if C=(0,1)\subseteq \mathbb{R} and z=1, then z\notin C but no strict separating halfspace exists. So closedness is not just a proof artifact.

Proof idea. Project z onto C, call the projection p, and use the normal vector z-p to define the separating hyperplane. The next theorem provides exactly this projection step.

Theorem
2.3 Projection onto a nonempty closed convex set

Let \langle \cdot,\cdot\rangle_2 be an inner product on E, and let \|\cdot\|_2 be its induced Euclidean norm. Let C\subseteq E be nonempty, closed, and convex, and let z\in E. Then there exists a unique point p\in C such that

\|z-p\|_2 = \inf_{y\in C}\|z-y\|_2.

Moreover, for p\in C, the following are equivalent:

  1. p\in \arg\min_{y\in C}\|z-y\|_2.

  2. \forall y\in C,\ \langle z-p,y-p\rangle_2\le 0.

Proof

Choose any y_0\in C and define R:=\|z-y_0\|_2+1. If y\in C and \|y-z\|_2>R, then \|y-z\|_2>\|y_0-z\|_2, so a minimizer over C must lie in the nonempty set

K:=C\cap \overline B_2(z,R).

Because the auxiliary norm \|\cdot\|_2 comes from an inner product on the finite-dimensional space E, the set K is closed and bounded, hence compact. The function

\phi(y):=\|z-y\|_2^2

is continuous on K. Therefore, by the Weierstrass theorem, there exists p\in K\subseteq C such that

\phi(p)=\min_{y\in K}\phi(y).

By the choice of R, this point is also a minimizer over all of C.

To prove uniqueness, suppose that both p,q\in C minimize the distance to z. Since C is convex, (p+q)/2\in C. Strict convexity of the squared auxiliary Euclidean norm gives

\|z-\tfrac12(p+q)\|_2^2 < \frac12\|z-p\|_2^2+\frac12\|z-q\|_2^2

whenever p\neq q, contradicting minimality. Hence the minimizer is unique.

Now assume that p is the projection of z onto C. Fix y\in C and define \phi_y(\tau):=\|z-(p+\tau(y-p))\|_2^2 for \tau\in[0,1]. Since p+\tau(y-p)\in C for all \tau\in[0,1] and \phi_y is minimized at \tau=0, we have \phi_y'(0^+)\ge 0. A direct differentiation yields

\phi_y'(0^+)=-2\langle z-p,y-p\rangle_2,

so \langle z-p,y-p\rangle_2\le 0.

Conversely, suppose that p\in C and that \langle z-p,y-p\rangle_2\le 0 for all y\in C. Then for every y\in C,

\|z-y\|_2^2 = \|z-p\|_2^2 + \|y-p\|_2^2 - 2\langle z-p,y-p\rangle_2 \ge \|z-p\|_2^2.

Hence p is the unique projection of z onto C.

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_projection.

theorem Lecture02_thm_l2_projection {E : Type*} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {C : Set E} (hC_ne : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex C) (z : E) : ∃! p C, ( y C, z - p z - y) ( y C, z - p, y - p⟫_ 0) := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:E∃! p, p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_ne∃! p, p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w∃! p, p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w(fun p => p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0) pE:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w (y : E), (fun p => p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0) y y = p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w(fun p => p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0) p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wp CE:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w(∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wp C All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w(∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w y C, z - p z - yE:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w y C, z - p, y - p⟫_ 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w y C, z - p z - y intro y E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wy:Ehy:y Cz - p z - y E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wy:Ehy:y C w, z - w z - y have : ( w : C, z - w) z - (y, hy : C) := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wy:Ehy:y C w, z - w z - y, hy All goals completed! 🐙 All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w y C, z - p, y - p⟫_ 0 All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - w (y : E), (fun p => p C (∀ y C, z - p z - y) y C, z - p, y - p⟫_ 0) y y = p intro q E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:Ehq:q C (∀ y C, z - q z - y) y C, z - q, y - q⟫_ 0q = p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0q = p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqq = p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqCq = p E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpCq = p have hqp' : 0 z - q, q - p⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpC0 z - q, q - p⟫_ have hrewrite : z - q, q - p⟫_ = -z - q, p - q⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpCz - q, q - p⟫_ = -z - q, p - q⟫_ calc z - q, q - p⟫_ = z - q, -(p - q)⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpCz - q, q - p⟫_ = z - q, -(p - q)⟫_ E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpCq - p = -(p - q) All goals completed! 🐙 _ = -z - q, p - q⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpCz - q, -(p - q)⟫_ = -z - q, p - q⟫_ All goals completed! 🐙 have : 0 -z - q, p - q⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChrewrite:z - q, q - p⟫_ = -z - q, p - q⟫_ := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_)))0 -z - q, p - q⟫_ All goals completed! 🐙 All goals completed! 🐙 have hdecomp : z - p, q - p⟫_ = z - q, q - p⟫_ + q - p ^ 2 := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)z - p, q - p⟫_ = z - q, q - p⟫_ + q - p ^ 2 calc z - p, q - p⟫_ = (z - q) + (q - p), q - p⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)z - p, q - p⟫_ = z - q + (q - p), q - p⟫_ E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)z - p = z - q + (q - p) All goals completed! 🐙 _ = z - q, q - p⟫_ + q - p, q - p⟫_ := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)z - q + (q - p), q - p⟫_ = z - q, q - p⟫_ + q - p, q - p⟫_ All goals completed! 🐙 _ = z - q, q - p⟫_ + q - p ^ 2 := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)z - q, q - p⟫_ + q - p, q - p⟫_ = z - q, q - p⟫_ + q - p ^ 2 All goals completed! 🐙 have hnormsq : q - p ^ 2 0 := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)hdecomp:z - p, q - p⟫_ = z - q, q - p⟫_ + q - p ^ 2 := Trans.trans (Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - p) (z - q + (q - p)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub z p (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg z (-p) (Mathlib.Tactic.Abel.termg 1 z 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg z) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 z 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_addg (z - q) (q - p) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub z q (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.subst_into_addg z (-q) (Mathlib.Tactic.Abel.termg 1 z 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.term_atomg z) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 z 0 (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) q 0))))) (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 q 0) (-1) p 0 (Mathlib.Tactic.Abel.termg 1 q 0) (add_zero (Mathlib.Tactic.Abel.termg 1 q 0))))) (Mathlib.Tactic.Abel.term_add_constg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg (-1) q 0) (-1) p (Mathlib.Tactic.Abel.termg 1 q 0) 0 (Eq.trans (Mathlib.Tactic.Abel.term_add_termg (-1) q 0 1 0 0 0 (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.ofNat 0)))) (Eq.refl 0)) (zero_add 0)) (Mathlib.Tactic.Abel.zero_termg q 0))))))) (q - p) (q - p) (Eq.refl (q - p))) (Eq.mpr (id (congrArg (fun _a => _a = z - q, q - p⟫_ + q - p, q - p⟫_) (inner_add_left (z - q) (q - p) (q - p)))) (Eq.refl (z - q, q - p⟫_ + q - p, q - p⟫_)))) (Eq.mpr (id (congrArg (fun _a => z - q, q - p⟫_ + _a = z - q, q - p⟫_ + q - p ^ 2) (real_inner_self_eq_norm_sq (q - p)))) (Eq.refl (z - q, q - p⟫_ + q - p ^ 2)))q - p ^ 2 0 All goals completed! 🐙 have hnorm : q - p = 0 := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:InnerProductSpace Einst✝:CompleteSpace EC:Set EhC_ne:C.NonemptyhC_closed:IsClosed ChC_convex:Convex Cz:Ethis:Nonempty C := Set.Nonempty.to_subtype hC_nep:EhpC:p ChpminEq:z - p = w, z - wq:EhqC:q Chqorth: y C, z - q, y - q⟫_ 0hporth: y C, z - p, y - p⟫_ 0 := (norm_eq_iInf_iff_real_inner_le_zero hC_convex hpC).mp hpminEqhpq:z - p, q - p⟫_ 0 := hporth q hqChqp:z - q, p - q⟫_ 0 := hqorth p hpChqp':0 z - q, q - p⟫_ := have hrewrite := Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - q) (z - q) (Eq.refl (z - q)) (q - p) (-(p - q)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 q 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_negg (p - q) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.termg 1 q (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub p q (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.subst_into_addg p (-q) (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0)) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 p 0) (-1) q 0 (Mathlib.Tactic.Abel.termg 1 p 0) (add_zero (Mathlib.Tactic.Abel.termg 1 p 0))))) (Mathlib.Tactic.Abel.term_neg (-1) q (Mathlib.Tactic.Abel.termg 1 p 0) 1 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Eq.refl (Int.ofNat 1)))) (Eq.refl 1)) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)))))) (Eq.mpr (id (congrArg (fun _a => _a = -z - q, p - q⟫_) (inner_neg_right (z - q) (p - q)))) (Eq.refl (-z - q, p - q⟫_))); have this := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf z - q, p - q⟫_) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - q, p - q⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, p - q⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))); Eq.mpr (id (Eq.trans (Eq.trans (congrArg (LE.le 0) hrewrite) Left.one_le_inv_iff._simp_3) ge_iff_le._simp_1)) (Eq.mp Left.one_le_inv_iff._simp_3 this)hdecomp:z - p, q - p⟫_ = z - q, q - p⟫_ + q - p ^ 2 := Trans.trans (Trans.trans ((fun 𝕜 {E} [Inner 𝕜 E] a a_1 e_a => Eq.rec (motive := fun a_2 e_a => (a_3 a_4 : E), a_3 = a_4 a, a_3⟫_𝕜 = a_2, a_4⟫_𝕜) (fun a_2 a_3 e_a => e_a Eq.refl a, a_2⟫_𝕜) e_a) (z - p) (z - q + (q - p)) (Eq.trans (Mathlib.Tactic.Abel.unfold_sub z p (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.subst_into_addg z (-p) (Mathlib.Tactic.Abel.termg 1 z 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.term_atomg z) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 z 0 (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) p 0))))) (Eq.symm (Mathlib.Tactic.Abel.subst_into_addg (z - q) (q - p) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) p 0)) (Mathlib.Tactic.Abel.unfold_sub z q (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.subst_into_addg z (-q) (Mathlib.Tactic.Abel.termg 1 z 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0)) (Mathlib.Tactic.Abel.term_atomg z) (Mathlib.Tactic.Abel.subst_into_negg q (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.term_neg 1 q 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.term_add_constg 1 z 0 (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) q 0) (zero_add (Mathlib.Tactic.Abel.termg (-1) q 0))))) (Mathlib.Tactic.Abel.unfold_sub q p (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.subst_into_addg q (-p) (Mathlib.Tactic.Abel.termg 1 q 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.term_atomg q) (Mathlib.Tactic.Abel.subst_into_negg p (Mathlib.Tactic.Abel.termg 1 p 0) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.term_atomg p) (Mathlib.Tactic.Abel.term_neg 1 p 0 (-1) 0 (Eq.refl (-1)) neg_zero)) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg 1 q 0) (-1) p 0 (Mathlib.Tactic.Abel.termg 1 q 0) (add_zero (Mathlib.Tactic.Abel.termg 1 q 0))))) (Mathlib.Tactic.Abel.term_add_constg 1 z (Mathlib.Tactic.Abel.termg (-1) q 0) (Mathlib.Tactic.Abel.termg (-1) p (Mathlib.Tactic.Abel.termg 1 q 0)) (Mathlib.Tactic.Abel.termg (-1) p 0) (Mathlib.Tactic.Abel.const_add_termg (Mathlib.Tactic.Abel.termg (-1) q 0) (-1) p (Mathlib.Tactic.Abel.termg 1 q 0) 0 (Eq.trans (Mathlib.Tactic.Abel.term_add_termg (-1) q 0 1 0 0 0 (Mathlib.Meta.NormNum.IsNat.to_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.isInt_neg (Eq.refl Neg.neg) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.negOfNat 1))) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 1))) (Eq.refl (Int.ofNat 0)))) (Eq.refl 0)) (zero_add 0)) (Mathlib.Tactic.Abel.zero_termg q 0))))))) (q - p) (q - p) (Eq.refl (q - p))) (Eq.mpr (id (congrArg (fun _a => _a = z - q, q - p⟫_ + q - p, q - p⟫_) (inner_add_left (z - q) (q - p) (q - p)))) (Eq.refl (z - q, q - p⟫_ + q - p, q - p⟫_)))) (Eq.mpr (id (congrArg (fun _a => z - q, q - p⟫_ + _a = z - q, q - p⟫_ + q - p ^ 2) (real_inner_self_eq_norm_sq (q - p)))) (Eq.refl (z - q, q - p⟫_ + q - p ^ 2)))hnormsq:q - p ^ 2 0 := le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - p, q - p⟫_) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (z - p, q - p⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf z - q, q - p⟫_) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, q - p⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (z - q, q - p⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_lt (z - p, q - p⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (z - q, q - p⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf z - p, q - p⟫_) (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf z - q, q - p⟫_) (Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf q - p) (Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 2))) (Mathlib.Tactic.Ring.pow_add (Mathlib.Tactic.Ring.single_pow (Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2)) (Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2)))) (Mathlib.Tactic.Ring.pow_zero (q - p ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_mul (Mathlib.Tactic.Ring.mul_add (Mathlib.Tactic.Ring.mul_pf_left q - p (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))) (Mathlib.Tactic.Ring.mul_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1)) (Mathlib.Tactic.Ring.add_pf_add_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))) (Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_pf_add_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (z - q, q - p⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, q - p⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul q - p (Nat.rawCast 2) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_lt (z - p, q - p⟫_ ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (z - q, q - p⟫_ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + (q - p ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - p, q - p⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (z - q, q - p⟫_) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul q - p (Nat.rawCast 2) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - p, q - p⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (z - q, q - p⟫_) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf q - p) (Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 2))) (Mathlib.Tactic.Ring.pow_add (Mathlib.Tactic.Ring.single_pow (Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2)) (Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2)))) (Mathlib.Tactic.Ring.pow_zero (q - p ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_mul (Mathlib.Tactic.Ring.mul_add (Mathlib.Tactic.Ring.mul_pf_left q - p (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))) (Mathlib.Tactic.Ring.mul_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1)) (Mathlib.Tactic.Ring.add_pf_add_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))) (Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_pf_add_zero (q - p ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul q - p (Nat.rawCast 2) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (q - p ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero q - p (Nat.rawCast 2) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.le_of_le_of_eq (Mathlib.Tactic.Linarith.add_nonpos (Mathlib.Tactic.Linarith.sub_nonpos_of_le hpq) (Mathlib.Tactic.Linarith.sub_nonpos_of_le hqp')) (neg_eq_zero.mpr (sub_eq_zero_of_eq hdecomp))) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))q - p = 0 All goals completed! 🐙 All goals completed! 🐙

Projection has now produced the first genuine separation statement. The next step is to let exterior points approach a boundary point of C; the limiting argument gives the supporting hyperplane theorem.

Theorem
2.4 Supporting hyperplane theorem

Let C\subseteq E be nonempty and convex, and let x\in \operatorname{cl}(C)\setminus \operatorname{int}(C). Then there exist \xi\in E^\ast\setminus\{0\} and b\in \mathbb{R} such that

\langle \xi,x\rangle=b \qquad\text{and}\qquad \forall y\in C,\ \langle \xi,y\rangle\le b.

Proof

By Lemma 2.11, the set \operatorname{cl}(C) is convex and

\operatorname{int}(\operatorname{cl}(C))=\operatorname{int}(C).

Since x\notin \operatorname{int}(C)=\operatorname{int}(\operatorname{cl}(C)), every neighborhood of x meets E\setminus \operatorname{cl}(C). Choose a sequence (z_k)_{k\ge 1}\subseteq E\setminus \operatorname{cl}(C) such that z_k\to x. For each k, apply Theorem 2.2 to \operatorname{cl}(C) and z_k. Then there exist \xi_k\in E^\ast\setminus\{0\} and b_k\in \mathbb{R} such that

\langle \xi_k,z_k\rangle>b_k \qquad\text{and}\qquad \forall y\in \operatorname{cl}(C),\ \langle \xi_k,y\rangle\le b_k.

By the auxiliary Euclidean inner product, there exists a unique a_k\in E such that

\langle \xi_k,y\rangle=\langle a_k,y\rangle_2 \qquad\text{for every }y\in E.

Rescale so that \|a_k\|_2=1 for every k. By compactness of the auxiliary Euclidean unit sphere, after passing to a subsequence we may assume that a_k\to a for some a\in E with \|a\|_2=1.

Since x\in \operatorname{cl}(C), we have \langle \xi_k,x\rangle\le b_k<\langle \xi_k,z_k\rangle for every k. Because z_k\to x and \|a_k\|_2=1, the difference

0\le b_k-\langle \xi_k,x\rangle < \langle \xi_k,z_k-x\rangle = \langle a_k,z_k-x\rangle_2 \le \|z_k-x\|_2

tends to 0. Hence b_k\to \langle a,x\rangle_2. Now fix y\in C. Passing to the limit in \langle \xi_k,y\rangle\le b_k, equivalently \langle a_k,y\rangle_2\le b_k, gives

\langle a,y\rangle_2\le \langle a,x\rangle_2.

Define \xi\in E^\ast by \langle \xi,y\rangle=\langle a,y\rangle_2 for all y\in E, and set b:=\langle \xi,x\rangle. Then

\langle \xi,x\rangle=b \qquad\text{and}\qquad \forall y\in C,\ \langle \xi,y\rangle\le b.

Since \|a\|_2=1, we have a\neq 0, and therefore \xi\neq 0.

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_supporting.

theorem Lecture02_thm_l2_supporting {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {C : Set E} (hC_ne : C.Nonempty) (hC_convex : Convex C) {x : E} (hx : x closure C \ interior C) : ξ : Covector E, ξ 0 b : , ξ x = b y C, ξ y b := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C ξ, ξ 0 b, ξ x = b y C, ξ y b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_ne ξ, ξ 0 b, ξ x = b y C, ξ y b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).left ξ, ξ 0 b, ξ x = b y C, ξ y b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).right ξ, ξ 0 b, ξ x = b y C, ξ y b have hx_frontier : x frontier (closure C) := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).rightx frontier (closure C) E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).rightx closure C \ interior C All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).righthx_frontier:x frontier (closure C) := Eq.mpr (id (congrArg (fun _a => x _a) (frontier.eq_1 (closure C)))) (Eq.mpr (id (congrArg (fun _a => x _a \ interior (closure C)) closure_closure)) (Eq.mpr (id (congrArg (fun _a => x closure C \ _a) hInt_eq)) hx))ξ:Covector Ehξ0:ξ 0hξle: y closure C, ξ y ξ x ξ, ξ 0 b, ξ x = b y C, ξ y b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).righthx_frontier:x frontier (closure C) := Eq.mpr (id (congrArg (fun _a => x _a) (frontier.eq_1 (closure C)))) (Eq.mpr (id (congrArg (fun _a => x _a \ interior (closure C)) closure_closure)) (Eq.mpr (id (congrArg (fun _a => x closure C \ _a) hInt_eq)) hx))ξ:Covector Ehξ0:ξ 0hξle: y closure C, ξ y ξ x y C, ξ y ξ x intro y E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EC:Set EhC_ne:C.NonemptyhC_convex:Convex Cx:Ehx:x closure C \ interior C_hcl_ne:(closure C).Nonempty := Set.Nonempty.mono subset_closure hC_nehcl_convex:Convex (closure C) := (lem_l2_int_cl_convex hC_convex).lefthInt_eq:interior (closure C) = interior C := (lem_l2_int_cl_convex hC_convex).righthx_frontier:x frontier (closure C) := Eq.mpr (id (congrArg (fun _a => x _a) (frontier.eq_1 (closure C)))) (Eq.mpr (id (congrArg (fun _a => x _a \ interior (closure C)) closure_closure)) (Eq.mpr (id (congrArg (fun _a => x closure C \ _a) hInt_eq)) hx))ξ:Covector Ehξ0:ξ 0hξle: y closure C, ξ y ξ xy:Ehy:y Cξ y ξ x All goals completed! 🐙

2.3. Duality of Convex Sets and Cones🔗

Once supporting hyperplanes are available, the natural global question is whether a closed convex set can be reconstructed from all the halfspaces that contain it. To state this cleanly, we first introduce convex hull and closed convex hull.

Definition
2.7 Convex hull

Let S\subseteq E. The convex hull of S is

\operatorname{conv}(S):= \bigcap\{C\subseteq E : C\text{ is convex and }S\subseteq C\}.

Definition
2.8 Closed convex hull

Let S\subseteq E. The closed convex hull of S is

\operatorname{cl}\operatorname{conv}(S):= \bigcap\{C\subseteq E : C\text{ is closed and convex and }S\subseteq C\}.

Proposition
2.5 Basic properties of closure, convex hull, and closed convex hull

Let S\subseteq E. Then the following hold:

  1. \operatorname{cl}(S) is closed, \operatorname{conv}(S) is convex, and S\subseteq \operatorname{cl}(S)\cap \operatorname{conv}(S).

  2. \operatorname{cl}\operatorname{conv}(S) = \operatorname{cl}(\operatorname{conv}(S)).

  3. \operatorname{cl}\operatorname{conv}(S) is closed and convex, and S\subseteq \operatorname{cl}\operatorname{conv}(S).

  4. If C\subseteq E is closed and convex, then \operatorname{cl}\operatorname{conv}(C)=C.

  5. \operatorname{cl}\operatorname{conv}(\operatorname{cl}\operatorname{conv}(S)) = \operatorname{cl}\operatorname{conv}(S).

  6. There exists a closed set S\subseteq \mathbb{R}^2 such that

    \operatorname{conv}(\operatorname{cl}(S)) \subsetneq \operatorname{cl}\operatorname{conv}(S).

Proof
  1. The set \operatorname{cl}(S) is an intersection of closed sets, so it is closed, and every set in that intersection contains S, so S\subseteq \operatorname{cl}(S). Likewise, \operatorname{conv}(S) is an intersection of convex sets, so it is convex, and again S\subseteq \operatorname{conv}(S). Hence S\subseteq \operatorname{cl}(S)\cap \operatorname{conv}(S).

  2. First note that \operatorname{cl}(\operatorname{conv}(S)) is closed and convex and contains S. By the defining minimality of \operatorname{cl}\operatorname{conv}(S), this gives

    \operatorname{cl}\operatorname{conv}(S) \subseteq \operatorname{cl}(\operatorname{conv}(S)).

    Conversely, by definition of \operatorname{conv}(S), one has \operatorname{conv}(S)\subseteq \operatorname{cl}\operatorname{conv}(S). By item (3) below, \operatorname{cl}\operatorname{conv}(S) is closed, so taking closures yields

    \operatorname{cl}(\operatorname{conv}(S)) \subseteq \operatorname{cl}\operatorname{conv}(S).

    Therefore

    \operatorname{cl}\operatorname{conv}(S) = \operatorname{cl}(\operatorname{conv}(S)).

  3. By definition,

    \operatorname{cl}\operatorname{conv}(S) = \bigcap\{C\subseteq E : C\text{ is closed and convex and }S\subseteq C\}.

    An intersection of closed convex sets is again closed and convex, and every set in the intersection contains S. Hence \operatorname{cl}\operatorname{conv}(S) is closed and convex, and S\subseteq \operatorname{cl}\operatorname{conv}(S).

  4. Let C\subseteq E be closed and convex. Since C is one of the sets over which the defining intersection for \operatorname{cl}\operatorname{conv}(C) is taken, we have

    \operatorname{cl}\operatorname{conv}(C)\subseteq C.

    On the other hand, item (3) with S=C gives C\subseteq \operatorname{cl}\operatorname{conv}(C). Therefore

    \operatorname{cl}\operatorname{conv}(C)=C.

  5. By item (3), the set \operatorname{cl}\operatorname{conv}(S) is itself closed and convex. Applying item (4) with C:=\operatorname{cl}\operatorname{conv}(S), we obtain

    \operatorname{cl}\operatorname{conv}(\operatorname{cl}\operatorname{conv}(S)) = \operatorname{cl}\operatorname{conv}(S).

  6. Consider the closed set

    S := \{(0,0)\}\cup\{(x,y)\in \mathbb{R}^2 : x>0,\ y\ge 1/x\}.

    We claim that

    \operatorname{conv}(S) = \{(0,0)\}\cup\{(u,v)\in \mathbb{R}^2 : u>0,\ v>0\}.

    First, let u>0 and v>0. Choose t\in(0,1) so small that t^2\le uv, and set

    a := u/t,\qquad b := v/t.

    Then a>0, and

    b = v/t \ge 1/a.

    Hence (a,b)\in S, and

    (u,v)=t(a,b)+(1-t)(0,0)\in \operatorname{conv}(S).

    Conversely, every point of S\setminus\{(0,0)\} has both coordinates strictly positive, so every nonzero convex combination of points of S also has both coordinates strictly positive. This proves the claim.

    Since S is already closed, we have \operatorname{conv}(\operatorname{cl}(S))=\operatorname{conv}(S). On the other hand,

    \operatorname{cl}\operatorname{conv}(S) = \{(u,v)\in \mathbb{R}^2 : u\ge 0,\ v\ge 0\},

    which strictly contains \operatorname{conv}(S); for example, (0,1)\in \operatorname{cl}\operatorname{conv}(S)\setminus \operatorname{conv}(S). Therefore

    \operatorname{conv}(\operatorname{cl}(S)) = \operatorname{conv}(S) \subsetneq \operatorname{cl}\operatorname{conv}(S).

Theorem
2.6 Closed convex hull equals the intersection of all containing halfspaces

Let S\subseteq E. Then

\operatorname{cl}\operatorname{conv}(S) = \bigcap\{H(\xi,b): \xi\in E^\ast\setminus\{0\},\ b\in \mathbb{R},\ S\subseteq H(\xi,b)\}.

In particular, if S is nonempty, closed, and convex, then

S=\operatorname{cl}\operatorname{conv}(S) =\bigcap\{H(\xi,b): \xi\in E^\ast\setminus\{0\},\ b\in \mathbb{R},\ S\subseteq H(\xi,b)\}.

Proof

Define

\mathcal H(S):= \bigcap\{H(\xi,b): \xi\in E^\ast\setminus\{0\},\ b\in \mathbb{R},\ S\subseteq H(\xi,b)\}.

Every closed halfspace is closed and convex, so \operatorname{cl}\operatorname{conv}(S)\subseteq \mathcal H(S).

Conversely, let z\in E\setminus \operatorname{cl}\operatorname{conv}(S). Applying Theorem 2.2 to the closed convex set \operatorname{cl}\operatorname{conv}(S) and the point z, we obtain \xi\neq 0 and b\in \mathbb{R} such that

\langle \xi,z\rangle>b \qquad\text{and}\qquad \forall y\in \operatorname{cl}\operatorname{conv}(S),\ \langle \xi,y\rangle\le b.

In particular, S\subseteq H(\xi,b), whereas z\notin H(\xi,b). Hence z\notin \mathcal H(S). This proves \mathcal H(S)\subseteq \operatorname{cl}\operatorname{conv}(S), and therefore \mathcal H(S)=\operatorname{cl}\operatorname{conv}(S). If S is additionally nonempty, closed, and convex, then \operatorname{cl}\operatorname{conv}(S)=S by Proposition 2.5, so the final displayed identity follows immediately.

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_separation.

theorem Lecture02_thm_l2_separation {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {S : Set E} : closure (convexHull S) = (p : Covector E × ) (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 (S.Nonempty IsClosed S Convex S S = closure (convexHull S) S = (p : Covector E × ) (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2) := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set Eclosure ((convexHull ) S) = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 (S.Nonempty IsClosed S Convex S S = closure ((convexHull ) S) S = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2) E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set ES.Nonempty IsClosed S Convex S S = closure ((convexHull ) S) S = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 intro _hS_ne E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set E_hS_ne:S.NonemptyhS_closed:IsClosed SConvex S S = closure ((convexHull ) S) S = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set E_hS_ne:S.NonemptyhS_closed:IsClosed ShS_convex:Convex SS = closure ((convexHull ) S) S = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 have hS_eq_clconv : closure (convexHull S) = S := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set E_hS_ne:S.NonemptyhS_closed:IsClosed ShS_convex:Convex Sclosure ((convexHull ) S) = S All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional ES:Set E_hS_ne:S.NonemptyhS_closed:IsClosed ShS_convex:Convex ShS_eq_clconv:closure ((convexHull ) S) = S := prop_l2_cch.right.right.right.right.right.right.right.left hS_closed hS_convexS = p, (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 calc S = closure (convexHull S) := hS_eq_clconv.symm _ = (p : Covector E × ) (_ : x S, p.1 x p.2), closedHalfspace p.1 p.2 := (Lecture02.thm_l2_separation (S := S)).1

At this point the set-level duality picture is in place: \operatorname{cl}\operatorname{conv}(S) is recovered by intersecting all containing halfspaces. The next step is to specialize that picture to convex cones. That cone version will be used again later, especially in Lecture 4 and Lecture 6.

Definition
2.9 Convex cone, dual cone, and polar cone

A set K\subseteq E is a convex cone if

\forall x_1,x_2\in K,\ \forall \alpha_1,\alpha_2\in [0,+\infty),\qquad \alpha_1 x_1+\alpha_2 x_2\in K.

Its dual cone and polar cone are

K^\ast:=\{\xi\in E^\ast:\forall x\in K,\ \langle \xi,x\rangle\ge 0\}, \qquad K^\circ:=\{\xi\in E^\ast:\forall x\in K,\ \langle \xi,x\rangle\le 0\}.

Theorem
2.7 Cone separation and bipolarity

Let K\subseteq E be a nonempty closed convex cone, and let z\in E\setminus K. Then there exists \xi\in K^\circ such that

\langle \xi,z\rangle>0.

In finite dimensions, the canonical map \iota_E : E \to E^{\ast\ast} defined by

(\iota_E(x))(\xi):=\langle \xi,x\rangle \qquad \text{for every }x\in E,\ \xi\in E^\ast

is an isomorphism. Under this identification, define the bipolar cone by

K^{\circ\circ}:=\{x\in E:\forall \xi\in K^\circ,\ \langle \xi,x\rangle\le 0\}.

Consequently,

K^{\circ\circ}=K.

With the convention K^\ast=-K^\circ, it also reads K^{\ast\ast}=K.

Proof

Apply Theorem 2.2 to the closed convex set K and the point z\notin K. Then there exist \xi\in E^\ast\setminus\{0\} and b\in \mathbb{R} such that

\langle \xi,z\rangle>b \qquad\text{and}\qquad \forall x\in K,\ \langle \xi,x\rangle\le b.

Because 0\in K, we have 0\le b. If there existed x_0\in K with \langle \xi,x_0\rangle>0, then \lambda x_0\in K for every \lambda\ge 0, so

\lambda \langle \xi,x_0\rangle = \langle \xi,\lambda x_0\rangle\le b \qquad \forall \lambda\ge 0,

which is impossible as \lambda\to +\infty. Hence

\forall x\in K,\qquad \langle \xi,x\rangle\le 0,

that is, \xi\in K^\circ. Since b\ge 0, we conclude that

\langle \xi,z\rangle>b\ge 0.

This proves the separation statement.

Under the finite-dimensional identification E\simeq E^{\ast\ast}, define

K^{\circ\circ}:=\{x\in E:\forall \xi\in K^\circ,\ \langle \xi,x\rangle\le 0\}.

The inclusion K\subseteq K^{\circ\circ} is immediate from the definition of the polar. Conversely, let z\in E\setminus K. By the first part, there exists \xi\in K^\circ such that \langle \xi,z\rangle>0. Therefore z\notin K^{\circ\circ}, since membership in K^{\circ\circ} would require \langle \xi,z\rangle\le 0 for every \xi\in K^\circ. Hence K^{\circ\circ}\subseteq K, and so K^{\circ\circ}=K. With the convention K^\ast=-K^\circ, it also reads K^{\ast\ast}=K.

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_cone_sep.

theorem Lecture02_thm_l2_cone_sep {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {K : Set E} (hK_ne : K.Nonempty) (hK_closed : IsClosed K) (hK_convex : Convex K) (hK_cone : x K, t : , 0 t t x K) {z : E} (hz : z K) : ξ polarCone K, ξ z > 0 := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z K ξ polarCone K, ξ z > 0 have hK_zero : (0 : E) K := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z K0 K E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z Kx:Ehx:x K0 K simpa using hK_cone x hx 0 (show (0 : ) 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z Kx:Ehx:x K0 0 All goals completed! 🐙) E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > b ξ polarCone K, ξ z > 0 have hb_nonneg : 0 b := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > b0 b E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bthis:ξ 0 b := hK_le 0 hK_zero0 b All goals completed! 🐙 have hξ_polar : ξ polarCone K := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)ξ polarCone K intro x E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Kξ x 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0False have hpos' : 0 < ξ x := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 00 < ξ x All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1False have ht_nonneg : 0 t := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 10 t E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 10 b / ξ x + 1 All goals completed! 🐙 have ht_gt : b < t * ξ x := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))b < t * ξ x E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))b < (b / ξ x + 1) * ξ x E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))b < b + ξ x All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))ht_gt:b < t * ξ x := id (Eq.mpr (id (Mathlib.Tactic.FieldSimp.lt_eq_cancel_lt (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HMul.hMul rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval (Mathlib.Tactic.FieldSimp.subst_add (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.div_eq_eval (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ξ x) (div_one ((1, b) ::ᵣ []).eval))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval ) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval_cons_neg (-1) (ne_of_gt hpos') (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ξ x).2 (1, ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (ξ x)))))) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (b + ξ x)) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (1, b + ξ x) (mul_one ((-1, ξ x) ::ᵣ []).eval))) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₁ (1, b + ξ x) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₂ (-1) 1 (ξ x) (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons_zero (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])) (Mathlib.Tactic.FieldSimp.NF.eval_cons_of_pow_eq_zero (of_decide_eq_true (id (Eq.refl true))) (ne_of_gt hpos') []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (b + ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b + ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b + ξ x).2 (1, b + ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (b + ξ x)))))) zero_lt_one)) (lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.add_pf_add_gt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul b (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero b (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))))hx':t x K := hK_cone x hx t ht_nonnegFalse E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))ht_gt:b < t * ξ x := id (Eq.mpr (id (Mathlib.Tactic.FieldSimp.lt_eq_cancel_lt (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HMul.hMul rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval (Mathlib.Tactic.FieldSimp.subst_add (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.div_eq_eval (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ξ x) (div_one ((1, b) ::ᵣ []).eval))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval ) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval_cons_neg (-1) (ne_of_gt hpos') (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ξ x).2 (1, ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (ξ x)))))) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (b + ξ x)) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (1, b + ξ x) (mul_one ((-1, ξ x) ::ᵣ []).eval))) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₁ (1, b + ξ x) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₂ (-1) 1 (ξ x) (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons_zero (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])) (Mathlib.Tactic.FieldSimp.NF.eval_cons_of_pow_eq_zero (of_decide_eq_true (id (Eq.refl true))) (ne_of_gt hpos') []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (b + ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b + ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b + ξ x).2 (1, b + ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (b + ξ x)))))) zero_lt_one)) (lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.add_pf_add_gt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul b (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero b (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))))hx':t x K := hK_cone x hx t ht_nonneghle:ξ (t x) b := hK_le (t x) hx'False have : t * ξ x b := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)x:Ehx:x Khpos:¬ξ x 0hpos':0 < ξ x := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))t: := b / ξ x + 1ht_nonneg:0 t := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1)))))ht_gt:b < t * ξ x := id (Eq.mpr (id (Mathlib.Tactic.FieldSimp.lt_eq_cancel_lt (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HMul.hMul rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval (Mathlib.Tactic.FieldSimp.subst_add (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.div_eq_eval (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ξ x) (div_one ((1, b) ::ᵣ []).eval))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval ) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval_cons_neg (-1) (ne_of_gt hpos') (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ξ x).2 (1, ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (ξ x)))))) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (b + ξ x)) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (1, b + ξ x) (mul_one ((-1, ξ x) ::ᵣ []).eval))) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₁ (1, b + ξ x) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₂ (-1) 1 (ξ x) (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons_zero (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])) (Mathlib.Tactic.FieldSimp.NF.eval_cons_of_pow_eq_zero (of_decide_eq_true (id (Eq.refl true))) (ne_of_gt hpos') []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (b + ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b + ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b + ξ x).2 (1, b + ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (b + ξ x)))))) zero_lt_one)) (lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.add_pf_add_gt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul b (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero b (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))))hx':t x K := hK_cone x hx t ht_nonneghle:ξ (t x) b := hK_le (t x) hx't * ξ x b All goals completed! 🐙 All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kz:Ehz:z KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))ξ:Covector Ehξ0:ξ 0b:hK_le: y K, ξ y bhz_gt:ξ z > bhb_nonneg:0 b := have this := hK_le 0 hK_zero; Eq.mpr (id ge_iff_le._simp_1) (Eq.mp (congrFun' (congrArg LE.le (map_zero ξ)) b) this)hξ_polar:ξ polarCone K := fun x hx => Decidable.byContradiction fun hpos => have hpos' := lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero (Mathlib.Tactic.Ring.add_pf_add_zero (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a))); let t := b / ξ x + 1; have ht_nonneg := id (le_of_lt (Right.add_pos_of_nonneg_of_pos (Mathlib.Meta.Positivity.div_nonneg_of_nonneg_of_pos hb_nonneg hpos') (Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_one) (Eq.refl (Nat.ble 1 1))))); have ht_gt := id (Eq.mpr (id (Mathlib.Tactic.FieldSimp.lt_eq_cancel_lt (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HMul.hMul rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval (Mathlib.Tactic.FieldSimp.subst_add (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl) (Eq.trans (Mathlib.Tactic.FieldSimp.NF.div_eq_eval (Eq.trans (Eq.refl b) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval b)) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ξ x) (div_one ((1, b) ::ᵣ []).eval))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 b (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 b (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b).2 (1, b).1)) (Mathlib.Tactic.FieldSimp.zpow'_one b))))) (Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl (Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval ) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval_cons_neg (-1) (ne_of_gt hpos') (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ξ x).2 (1, ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (ξ x)))))) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (b + ξ x)) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (1, b + ξ x) (mul_one ((-1, ξ x) ::ᵣ []).eval))) (Eq.trans (Eq.refl (ξ x)) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (ξ x))) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₁ (1, b + ξ x) (Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₂ (-1) 1 (ξ x) (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))) (Eq.symm (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons_zero (one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])) (Mathlib.Tactic.FieldSimp.NF.eval_cons_of_pow_eq_zero (of_decide_eq_true (id (Eq.refl true))) (ne_of_gt hpos') []))))) rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (b + ξ x) (Eq.symm (div_one 1))) (Eq.mpr (id (congrArg (fun _a => _a = b + ξ x) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, b + ξ x) []))) (Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, b + ξ x).2 (1, b + ξ x).1)) (Mathlib.Tactic.FieldSimp.zpow'_one (b + ξ x)))))) zero_lt_one)) (lt_of_not_ge fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (ξ x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add (ξ x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.atom_pf (ξ x)) (Mathlib.Tactic.Ring.add_pf_add_gt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul b (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (ξ x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero b (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (ξ x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt (lt_of_not_ge hpos)) (Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))); have hx' := hK_cone x hx t ht_nonneg; have hle := hK_le (t x) hx'; have this := id (Eq.mp (congrFun' (congrArg LE.le (map_smul ξ (b / ξ x + 1) x)) b) hle); not_le_of_gt ht_gt thisξ z > 0 All goals completed! 🐙

Lean theorem: Lecture02.thm_l2_bipolar.

theorem Lecture02_thm_l2_bipolar {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {K : Set E} (hK_ne : K.Nonempty) (hK_closed : IsClosed K) (hK_convex : Convex K) (hK_cone : x K, t : , 0 t t x K) : bipolarCone K = K := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KbipolarCone K = K have hK_zero : (0 : E) K := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x K0 K E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kx:Ehx:x K0 K simpa using hK_cone x hx 0 (show (0 : ) 0 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x Kx:Ehx:x K0 0 All goals completed! 🐙) E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))bipolarCone K KE:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))K bipolarCone K E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))bipolarCone K K intro z E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z bipolarCone Kz K E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z bipolarCone KhzK:z KFalse E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z bipolarCone KhzK:z Kξ:Covector EhξK:ξ polarCone Khξz:ξ z > 0False E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z bipolarCone KhzK:z Kξ:Covector EhξK:ξ polarCone Khξz:ξ z > 0this:ξ z 0 := hz ξ hξKFalse All goals completed! 🐙 E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))K bipolarCone K intro z E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z Kz bipolarCone K intro ξ E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EK:Set EhK_ne:K.NonemptyhK_closed:IsClosed KhK_convex:Convex KhK_cone: x K, (t : ), 0 t t x KhK_zero:0 K := Exists.casesOn hK_ne fun x hx => Eq.mp (congrArg (Membership.mem K) (zero_smul x)) (hK_cone x hx 0 (have this := le_refl 0; this))z:Ehz:z Kξ:Covector EhξK:ξ polarCone Kξ z 0 All goals completed! 🐙

The cone theorem is the last set-level specialization in this lecture. Before returning to functions, we record affine hull and relative interior, because the final subgradient existence theorem naturally lives on \operatorname{ri}(\operatorname{dom} f).

2.4. Affine Hull and Relative Interior🔗

Definition
2.10 Affine sets and affine spaces

Let A\subseteq E. We say that A is affine if

\forall x,y\in A,\ \forall \theta\in \mathbb{R},\qquad \theta x+(1-\theta)y\in A.

In these notes, an affine space means an affine subset of some ambient finite-dimensional real vector space, equipped with the induced affine operations.

Definition
2.11 Affine hull and relative interior

Let S\subseteq E. Its affine hull is

\operatorname{aff}(S):= \bigcap\{A\subseteq E : A\text{ is affine and }S\subseteq A\}.

If C\subseteq E, then the relative interior of C is

\operatorname{ri}(C):= \{x\in C:\exists r>0\text{ such that }\{y\in \operatorname{aff}(C):\|y-x\|<r\}\subseteq C\}.

Remark
2.3 Why affine spaces appear here

Convexity and the separation theorems above are fundamentally affine notions: they only use affine combinations and halfspaces, not a preferred origin in the ambient vector space. One could therefore formulate much of this lecture directly on affine spaces. To keep the terminology lighter, we do not globalize that viewpoint throughout the course. Instead, we work globally in a vector space E, and pass locally to affine subspaces when needed. The proof of Theorem 2.10 is the first place where this local affine viewpoint becomes essential.

2.5. Subgradient and Its Existence🔗

We now translate the geometry back into function language. A supporting hyperplane to \operatorname{epi}(f) through (x,f(x)) is exactly a global affine lower bound on f, and that is what a subgradient is. The only new point is that the relevant ambient space is not always all of E, but \operatorname{aff}(\operatorname{dom} f)\times \mathbb{R}.

Definition
2.12 Subgradient and subdifferential

Let f : E \to \mathbb{R}\cup\{+\infty\}, and let x\in \operatorname{dom} f. A covector g\in E^\ast is a subgradient of f at x if

\forall y\in E,\qquad f(y)\ge f(x)+\langle g,y-x\rangle.

The set of all such covectors is denoted by \partial f(x).

Definition
2.13 Proper extended-value function

Let f : E \to \mathbb{R}\cup\{+\infty\}. We say that f is proper if

\operatorname{dom} f\neq \varnothing.

Equivalently, f is proper if there exists x\in E such that f(x)<+\infty. In treatments based on the full extended real line \mathbb{R}\cup\{\pm\infty\}, one also requires f(x)>-\infty for every x. We do not impose that extra condition here because our present extended-value convention has already excluded the value -\infty.

Lemma
2.8 Subgradients are supporting hyperplanes of the epigraph

Let f : E \to \mathbb{R}\cup\{+\infty\}, let x\in \operatorname{dom} f, and let g\in E^\ast. Then the following are equivalent:

  1. g\in \partial f(x).

  2. \forall (y,t)\in \operatorname{epi}(f),\ \langle (g,-1),(y,t)-(x,f(x))\rangle\le 0.

Proof

We have

\langle (g,-1),(y,t)-(x,f(x))\rangle = \langle g,y-x\rangle-(t-f(x)).

Therefore

\forall (y,t)\in \operatorname{epi}(f),\quad \langle (g,-1),(y,t)-(x,f(x))\rangle\le 0

if and only if

\forall (y,t)\in \operatorname{epi}(f),\quad t\ge f(x)+\langle g,y-x\rangle.

Choosing t=f(y), which is admissible for every y\in \operatorname{dom} f, this becomes

\forall y\in \operatorname{dom} f,\qquad f(y)\ge f(x)+\langle g,y-x\rangle.

For y\notin \operatorname{dom} f, the same inequality is automatic because f(y)=+\infty. Hence this is exactly the definition of g\in \partial f(x).

Formal Statement and Proof

Lean theorem: Lecture02.lem_l2_subgrad_support.

theorem Lecture02_lem_l2_subgrad_support {E : Type*} [NormedAddCommGroup E] [NormedSpace E] {f : E EReal} (hNoBot : NoBot f) {x : E} (hx : x effectiveDomain f) {g : Covector E} : IsERealSubgradient f x g (y : E) (t : ), f y (t : EReal) f x + (((g (y - x) : ) : EReal)) (t : EReal) := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector EIsERealSubgradient f x g (y : E) (t : ), f y t f x + (g (y - x)) t E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector EIsERealSubgradient f x g (y : E) (t : ), f y t f x + (g (y - x)) tE:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector E(∀ (y : E) (t : ), f y t f x + (g (y - x)) t) IsERealSubgradient f x g E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector EIsERealSubgradient f x g (y : E) (t : ), f y t f x + (g (y - x)) t intro hsub E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsub:IsERealSubgradient f x gy:E (t : ), f y t f x + (g (y - x)) t E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsub:IsERealSubgradient f x gy:Et:f y t f x + (g (y - x)) t E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsub:IsERealSubgradient f x gy:Et:hyt:f y tf x + (g (y - x)) t All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector E(∀ (y : E) (t : ), f y t f x + (g (y - x)) t) IsERealSubgradient f x g intro hsup E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ef y f x + (g (y - x)) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y f x + (g (y - x))E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y f x + (g (y - x)) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y f x + (g (y - x)) have hfy : f y = (((f y).toReal : ) : EReal) := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y = (f y).toReal All goals completed! 🐙 have h := hsup y (f y).toReal (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain fhfy:f y = (f y).toReal := Eq.symm (EReal.coe_toReal hy (hNoBot y))f y (f y).toReal E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain fhfy:f y = (f y).toReal := Eq.symm (EReal.coe_toReal hy (hNoBot y))(f y).toReal (↑(f y).toReal).toReal All goals completed! 🐙) E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain fhfy:f y = (f y).toReal := Eq.symm (EReal.coe_toReal hy (hNoBot y))h:f x + (g (y - x)) (f y).toReal := hsup y (f y).toReal (Eq.mpr (id (congrArg (fun _a => _a _a.toReal) hfy)) le_rfl)(f y).toReal f x + (g (y - x)) All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y f x + (g (y - x)) have hfy : f y = := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain ff y = E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:¬f y f y = All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E ERealhNoBot:NoBot fx:Ehx:x effectiveDomain fg:Covector Ehsup: (y : E) (t : ), f y t f x + (g (y - x)) ty:Ehy:y effectiveDomain fhfy:f y = := not_not.mp (Eq.mp (congrArg (fun _a => ¬_a) (propext mem_effectiveDomain)) hy) f x + (g (y - x)) All goals completed! 🐙
Proposition
2.9 Differentiable convex functions have a unique subgradient

Let f : E \to \mathbb{R} be convex and differentiable. Then for every x\in E,

\partial f(x)=\{\nabla f(x)\}.

Proof

Fix x\in E. By the Lecture 1 global linear lower bound, the covector \nabla f(x) gives a global affine lower bound on f, so \nabla f(x)\in \partial f(x).

Conversely, let g\in \partial f(x), and define

h(y):=f(y)-\langle g,y\rangle.

Since f is convex and subtracting a linear functional preserves convexity, the function h is convex. It is also differentiable. Moreover, the subgradient inequality for g is exactly

\forall y\in E,\qquad h(x)\le h(y).

Applying the Lecture 1 first-order characterization with \Omega=E gives

\forall y\in E,\qquad \langle \nabla h(x),y-x\rangle\ge 0.

Now fix v\in E. Taking y=x+v gives \langle \nabla h(x),v\rangle\ge 0, while taking y=x-v gives \langle \nabla h(x),-v\rangle\ge 0, hence \langle \nabla h(x),v\rangle\le 0. Therefore \langle \nabla h(x),v\rangle=0 for every v\in E, so \nabla h(x)=0. Since \nabla h(x)=\nabla f(x)-g, we conclude that g=\nabla f(x). Thus \partial f(x)=\{\nabla f(x)\}.

Formal Statement and Proof

Lean theorem: Lecture02.prop_l2_unique_subgrad.

theorem Lecture02_prop_l2_unique_subgrad {E : Type*} [NormedAddCommGroup E] [NormedSpace E] {f : E } (hconv : ConvexOn Set.univ f) (hf : Differentiable f) (x : E) : subdifferential f x = {fderiv f x} := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Esubdifferential f x = {fderiv f x} E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Eg subdifferential f x g {fderiv f x} E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Eg subdifferential f x g {fderiv f x}E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Eg {fderiv f x} g subdifferential f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Eg subdifferential f x g {fderiv f x} E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xg {fderiv f x} E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yg {fderiv f x} have hconv_h : ConvexOn Set.univ h := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yConvexOn Set.univ h All goals completed! 🐙 have hdiff_h : Differentiable h := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))Differentiable h All goals completed! 🐙 have hmin_h : y (Set.univ : Set E), h x h y := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g))) y Set.univ, h x h y intro y E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))y:Ehy:y Set.univh x h y E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))y:Ehy:y Set.univf x - g x f y - g y E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))y:Ehy:y Set.univhgy:f y f x + g (y - x) := hg yf x - g x f y - g y E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))y:Ehy:y Set.univhgy:f y f x + (g y - g x)f x - g x f y - g y All goals completed! 🐙 have hchar := (Lecture01.thm_l1_first_order_char (Ω := (Set.univ : Set E)) (f := h) (xStar := x) hconv_h (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))x Set.univ All goals completed! 🐙) hdiff_h).1 hmin_h have hnonneg : v : E, 0 fderiv h x v := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_h (v : E), 0 (fderiv h x) v E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hv:E0 (fderiv h x) v simpa using hchar (x + v) (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hv:Ex + v Set.univ All goals completed! 🐙) have hnonpos : v : E, fderiv h x v 0 := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v)))) (v : E), (fderiv h x) v 0 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))v:E(fderiv h x) v 0 have hneg : 0 fderiv h x (-v) := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))v:E0 (fderiv h x) (-v) simpa using hchar (x - v) (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))v:Ex - v Set.univ All goals completed! 🐙) have : 0 -fderiv h x v := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))v:Ehneg:0 (fderiv h x) (-v) := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v)))))0 -(fderiv h x) v All goals completed! 🐙 All goals completed! 🐙 have hzero : fderiv h x = 0 := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))hnonpos: (v : E), (fderiv h x) v 0 := fun v => have hneg := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v))))); have this := Eq.mpr (id Left.one_le_inv_iff._simp_3) (Eq.mp (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3) hneg); le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le this) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))fderiv h x = 0 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))hnonpos: (v : E), (fderiv h x) v 0 := fun v => have hneg := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v))))); have this := Eq.mpr (id Left.one_le_inv_iff._simp_3) (Eq.mp (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3) hneg); le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le this) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))v:E(fderiv h x) v = 0 v All goals completed! 🐙 have hderiv_h : fderiv h x = fderiv f x - g := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))hnonpos: (v : E), (fderiv h x) v 0 := fun v => have hneg := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v))))); have this := Eq.mpr (id Left.one_le_inv_iff._simp_3) (Eq.mp (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3) hneg); le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le this) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))hzero:fderiv h x = 0 := ContinuousLinearMap.ext fun v => le_antisymm (hnonpos v) (hnonneg v)fderiv h x = fderiv f x - g All goals completed! 🐙 have hfg : fderiv f x = g := E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))hnonpos: (v : E), (fderiv h x) v 0 := fun v => have hneg := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v))))); have this := Eq.mpr (id Left.one_le_inv_iff._simp_3) (Eq.mp (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3) hneg); le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le this) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))hzero:fderiv h x = 0 := ContinuousLinearMap.ext fun v => le_antisymm (hnonpos v) (hnonneg v)hderiv_h:fderiv h x = fderiv f x - g := id (Eq.mp (congrArg (Eq (fderiv (f - g) x)) (congrArg (HSub.hSub (fderiv f x)) (ContinuousLinearMap.fderiv g))) (fderiv_sub (hf x) (ContinuousLinearMap.differentiableAt g)))fderiv f x = g exact sub_eq_zero.mp (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g subdifferential f xh:E := fun y => f y - g yhconv_h:ConvexOn Set.univ h := id (ConvexOn.sub hconv (LinearMap.concaveOn (↑g) convex_univ))hdiff_h:Differentiable h := Eq.mpr (id (Differentiable.fun_sub_iff_left._simp_1 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g)))) (Eq.mp (Differentiable.sub_iff_left._simp_2 (of_eq_true (ContinuousLinearMap.differentiable._simp_1 g))) (Differentiable.sub hf (ContinuousLinearMap.differentiable g)))hmin_h: y Set.univ, h x h y := fun y hy => id (have hgy := hg y; le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g y ^ Nat.rawCast 1 * Nat.rawCast 1 + (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_lt (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_zero_add (f y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f y)) (Mathlib.Tactic.Ring.atom_pf (g y)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g y) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_gt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf (f x)) (Mathlib.Tactic.Ring.atom_pf (g x)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_add_lt (f x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (g x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (f x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul (g x) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.add_pf_add_gt (f x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_lt (g y ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) (Mathlib.Tactic.Ring.add_pf_add_gt (g x ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (f y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (g x) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero (f y) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0)))))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le (Eq.mp (congrArg (fun _a => f y f x + _a) (ContinuousLinearMap.map_sub g y x)) hgy)) (Mathlib.Tactic.Linarith.sub_neg_of_lt a))))hchar: x_1 Set.univ, 0 (fderiv h x) (x_1 - x) := (Lecture01.thm_l1_first_order_char hconv_h (of_eq_true (Set.mem_univ._simp_1 x)) hdiff_h).mp hmin_hhnonneg: (v : E), 0 (fderiv h x) v := fun v => Eq.mp (congrArg (LE.le 0) (congrArg (⇑(fderiv h x)) (add_sub_cancel_left x v))) (hchar (x + v) (of_eq_true (Set.mem_univ._simp_1 (x + v))))hnonpos: (v : E), (fderiv h x) v 0 := fun v => have hneg := Eq.mpr (id (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3)) (Eq.mp (Eq.trans (congrArg (LE.le 0) (Eq.trans (congrArg (⇑(fderiv h x)) (sub_sub_cancel_left x v)) (map_neg (fderiv h x) v))) Left.one_le_inv_iff._simp_3) (hchar (x - v) (of_eq_true (Set.mem_univ._simp_1 (x - v))))); have this := Eq.mpr (id Left.one_le_inv_iff._simp_3) (Eq.mp (Eq.trans (congrArg (LE.le 0) (map_neg (fderiv h x) v)) Left.one_le_inv_iff._simp_3) hneg); le_of_not_gt fun a => Mathlib.Tactic.Linarith.lt_irrefl (Eq.mp (congrArg (fun _a => _a < 0) (Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsNat.to_raw_eq (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))) (Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)) (Mathlib.Tactic.Ring.atom_pf ((fderiv h x) v)) (Mathlib.Tactic.Ring.sub_pf (Mathlib.Tactic.Ring.neg_add (Mathlib.Tactic.Ring.neg_mul ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Tactic.Ring.neg_one_mul (Mathlib.Meta.NormNum.IsInt.to_raw_eq (Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Eq.refl (Int.negOfNat 1)))))) Mathlib.Tactic.Ring.neg_zero) (Mathlib.Tactic.Ring.add_pf_zero_add ((fderiv h x) v ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))) (Mathlib.Tactic.Ring.add_pf_add_overlap_zero (Mathlib.Tactic.Ring.add_overlap_pf_zero ((fderiv h x) v) (Nat.rawCast 1) (Mathlib.Meta.NormNum.IsInt.to_isNat (Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw 1)) (Mathlib.Meta.NormNum.IsInt.of_raw (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0))))) (Mathlib.Tactic.Ring.add_pf_zero_add 0))) (Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Nat.cast_zero)))) (Mathlib.Tactic.Linarith.add_lt_of_le_of_neg (Mathlib.Tactic.Linarith.sub_nonpos_of_le this) (Mathlib.Tactic.Linarith.sub_neg_of_lt a)))hzero:fderiv h x = 0 := ContinuousLinearMap.ext fun v => le_antisymm (hnonpos v) (hnonneg v)hderiv_h:fderiv h x = fderiv f x - g := id (Eq.mp (congrArg (Eq (fderiv (f - g) x)) (congrArg (HSub.hSub (fderiv f x)) (ContinuousLinearMap.fderiv g))) (fderiv_sub (hf x) (ContinuousLinearMap.differentiableAt g)))fderiv f x - g = 0 All goals completed! 🐙) All goals completed! 🐙 E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Eg {fderiv f x} g subdifferential f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g {fderiv f x}g subdifferential f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Eg:Covector Ehg:g = fderiv f xg subdifferential f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Efderiv f x subdifferential f x E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Ey:Ef y f x + (fderiv f x) (y - x) simpa using Lecture01.lem_l1_gradient_lower_bound (Ω := (Set.univ : Set E)) (f := f) hconv hf x (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Ey:Ex Set.univ All goals completed! 🐙) y (E:Type u_1inst✝¹:NormedAddCommGroup Einst✝:NormedSpace Ef:E hconv:ConvexOn Set.univ fhf:Differentiable fx:Ey:Ey Set.univ All goals completed! 🐙)
Theorem
2.10 Existence of a subgradient on the relative interior

Let f : E \to \mathbb{R}\cup\{+\infty\} be proper and convex. Then

\forall x\in \operatorname{ri}(\operatorname{dom} f),\qquad \partial f(x)\neq \varnothing.

Proof

Let x\in \operatorname{ri}(\operatorname{dom} f), set A:=\operatorname{aff}(\operatorname{dom} f), and let L:=A-x. Consider the convex set

\mathcal E:=\{(y,t)\in A\times \mathbb{R} : f(y)\le t\}.

Since \mathcal E=\operatorname{epi}(f)\cap (A\times \mathbb{R}), Lemma 2.1 implies that \mathcal E is convex. Translate \mathcal E so that (x,f(x)) becomes the origin:

\widetilde{\mathcal E}:= \{(y-x,t-f(x))\in L\times \mathbb{R}:(y,t)\in \mathcal E\}.

Then \widetilde{\mathcal E} is a convex subset of the finite-dimensional vector space L\times \mathbb{R}, and (0,0)\in \widetilde{\mathcal E}. Moreover, (0,0)\notin \operatorname{int}(\widetilde{\mathcal E}): indeed, for every \varepsilon>0, we have (0,-\varepsilon)\notin \widetilde{\mathcal E}.

Apply Theorem 2.4 in the finite-dimensional vector space L\times \mathbb{R}. We obtain (\eta,\alpha)\in L^\ast\times \mathbb{R}, not both zero, such that

\forall (v,s)\in \widetilde{\mathcal E},\qquad \langle \eta,v\rangle+\alpha s\le 0.

Since (v,s)\in \widetilde{\mathcal E} implies (v,s+r)\in \widetilde{\mathcal E} for every r\ge 0, we must have \alpha\le 0. We claim that \alpha<0. If \alpha=0, then

\forall y\in \operatorname{dom} f,\qquad \langle \eta,y-x\rangle\le 0.

Because x\in \operatorname{ri}(\operatorname{dom} f), there exists r>0 such that x+v\in \operatorname{dom} f for every v\in L with \|v\|<r. Fix v\in L, and choose t>0 so small that t\|v\|<r. Then x+tv,x-tv\in \operatorname{dom} f, so the displayed inequality gives

\langle \eta,tv\rangle\le 0 \qquad\text{and}\qquad \langle \eta,-tv\rangle\le 0.

Hence \langle \eta,v\rangle=0. Since v\in L was arbitrary, \eta=0, a contradiction. Thus \alpha<0.

Set g_L:=-\eta/\alpha\in L^\ast. For every y\in \operatorname{dom} f, the point (y,f(y)) belongs to \mathcal E, so

(y-x,f(y)-f(x))\in \widetilde{\mathcal E}.

Therefore

f(y)\ge f(x)+\langle g_L,y-x\rangle.

By Lemma 2.12, extend g_L to some covector g\in E^\ast. Using y-x\in L, we still have

\forall y\in \operatorname{dom} f,\qquad f(y)\ge f(x)+\langle g,y-x\rangle.

For y\notin \operatorname{dom} f, the same inequality is again automatic, so g\in \partial f(x). Equivalently, by Lemma 2.8, (g,-1) defines a supporting hyperplane of \operatorname{epi}(f) at (x,f(x)).

Formal Statement and Proof

Lean theorem: Lecture02.thm_l2_subgrad_exist.

theorem Lecture02_thm_l2_subgrad_exist {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {f : E EReal} (hproper : IsProper f) (hconv : EConvexOn Set.univ f) {x : E} (hx : x intrinsicInterior (effectiveDomain f)) : g : Covector E, IsERealSubgradient f x g := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional Ef:E ERealhproper:IsProper fhconv:EConvexOn Set.univ fx:Ehx:x intrinsicInterior (effectiveDomain f) g, IsERealSubgradient f x g E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional Ef:E ERealhproper:IsProper fhconv:EConvexOn Set.univ fx:Ehx:x intrinsicInterior (effectiveDomain f)g:Covector Ehg:IsERealSubgradientWithin f (effectiveDomain f) x g g, IsERealSubgradient f x g All goals completed! 🐙
Remark
2.4 Why the (relative) interior condition is needed

The hypothesis x\in \operatorname{ri}(\operatorname{dom} f) cannot be weakened to x\in \operatorname{cl}(\operatorname{dom} f). Consider

f(x):= \begin{cases} x\log x,& x>0,\\ 0,& x=0,\\ +\infty,& x<0. \end{cases}

Then f is proper, closed, and convex, with \operatorname{dom} f=[0,\infty), so 0\in \operatorname{cl}(\operatorname{dom} f)\setminus \operatorname{ri}(\operatorname{dom} f). However, \partial f(0)=\varnothing. Indeed, if g\in \partial f(0), then for every y>0,

y\log y=f(y)\ge f(0)+gy=gy,

so \log y\ge g for every y>0, which is impossible because \log y\to -\infty as y\downarrow 0.

2.6. Proof-Local Lemmas🔗

Lemma
2.11 Closure preserves convexity and interior for convex sets

Let C\subseteq E be convex. Then \operatorname{cl}(C) is convex and

\operatorname{int}(\operatorname{cl}(C))=\operatorname{int}(C).

Proof

To prove convexity of \operatorname{cl}(C), let u,v\in \operatorname{cl}(C) and \theta\in[0,1]. Choose sequences u_n,v_n\in C such that u_n\to u and v_n\to v. Then

\theta u_n+(1-\theta)v_n\in C

for every n, and

\theta u_n+(1-\theta)v_n\to \theta u+(1-\theta)v.

Hence \theta u+(1-\theta)v\in \operatorname{cl}(C).

The inclusion \operatorname{int}(C)\subseteq \operatorname{int}(\operatorname{cl}(C)) is immediate from C\subseteq \operatorname{cl}(C). For the reverse inclusion, let x_0\in \operatorname{int}(\operatorname{cl}(C)). Choose r>0 such that

\{y\in E:\|y-x_0\|<r\}\subseteq \operatorname{cl}(C).

Let d:=\dim(E), fix a basis e_1,\dots,e_d of E, and choose \varepsilon>0 so small that the points

y_i:=x_0+\varepsilon e_i \qquad (1\le i\le d), \qquad y_0:=x_0-\varepsilon\sum_{i=1}^d e_i

all belong to \{y\in E:\|y-x_0\|<r\}. Then y_0,\dots,y_d\in \operatorname{cl}(C), they are affinely independent, and

x_0=\frac{1}{d+1}\sum_{i=0}^d y_i,

so x_0\in \operatorname{int}(\operatorname{conv}\{y_0,\dots,y_d\}). Choose z_0,\dots,z_d\in C sufficiently close to y_0,\dots,y_d that z_0,\dots,z_d remain affinely independent and the barycentric coordinates of x_0 with respect to z_0,\dots,z_d remain strictly positive. Then

x_0\in \operatorname{int}(\operatorname{conv}\{z_0,\dots,z_d\})\subseteq C,

so x_0\in \operatorname{int}(C). Therefore \operatorname{int}(\operatorname{cl}(C))\subseteq \operatorname{int}(C), proving the claim.

Formal Statement and Proof

Lean theorem: Lecture02.lem_l2_int_cl_convex.

theorem ConvexOptV3.Lectures.Lecture02.lem_l2_int_cl_convex.{u_2} : {E : Type u_2} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace E] [FiniteDimensional E] {C : Set E}, Convex C Convex (closure C) interior (closure C) = interior C := fun {E} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {C} hC_convex => Convex.closure hC_convex, if hC_int : (interior C).Nonempty then Convex.interior_closure_eq_interior_of_nonempty_interior hC_convex hC_int else have h_affine_closure := le_antisymm (affineSpan_le_of_subset_coe (closure_minimal (subset_affineSpan C) (AffineSubspace.closed_of_finiteDimensional (affineSpan C)))) (affineSpan_mono subset_closure); have hIntClosure_empty := Set.eq_empty_iff_forall_notMem.mpr fun x hx => have h_affine_top_closure := (Convex.interior_nonempty_iff_affineSpan_eq_top (Convex.closure hC_convex)).mp (Exists.intro x hx); have h_affine_top := Eq.mp (congrFun' (congrArg Eq h_affine_closure) ) h_affine_top_closure; hC_int ((Convex.interior_nonempty_iff_affineSpan_eq_top hC_convex).mpr h_affine_top); have hInt_empty := Set.not_nonempty_iff_eq_empty.mp hC_int; Eq.mpr (id (congrArg (fun _a => _a = interior C) hIntClosure_empty)) (Eq.mpr (id (congrArg (fun _a => = _a) hInt_empty)) (Eq.refl ))#print Lecture02.lem_l2_int_cl_convex
Lemma
2.12 Extending a covector from a subspace

Let L\subseteq E be a linear subspace, and let g_L\in L^\ast. Then there exists g\in E^\ast such that

\forall v\in L,\qquad \langle g,v\rangle=\langle g_L,v\rangle.

Proof

Choose a linear subspace M\subseteq E such that

E=L\oplus M.

Every x\in E can then be written uniquely as x=v+w with v\in L and w\in M. Define g : E \to \mathbb{R} by

g(v+w):=g_L(v).

This is well defined by the uniqueness of the decomposition x=v+w, and it is linear because the projection E\to L along M is linear. Thus g\in E^\ast, and for every v\in L we have

g(v)=g_L(v).

This is exactly the desired extension.

Formal Statement and Proof

Lean theorem: Lecture02.lem_l2_extend_covector.

theorem Lecture02_lem_l2_extend_covector {E : Type*} [NormedAddCommGroup E] [NormedSpace E] [FiniteDimensional E] {L : Submodule E} (gL : Covector L) : g : Covector E, v : L, g v = gL v := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector L g, (v : L), g v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L q g, (v : L), g v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional L g, (v : L), g v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional Lhq_closed:IsClosed q := Submodule.closed_of_finiteDimensional q g, (v : L), g v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional Lhq_closed:IsClosed q := Submodule.closed_of_finiteDimensional qP:E →L[] L := L.linearProjOfClosedCompl q hLq hL_closed hq_closed g, (v : L), g v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional Lhq_closed:IsClosed q := Submodule.closed_of_finiteDimensional qP:E →L[] L := L.linearProjOfClosedCompl q hLq hL_closed hq_closed (v : L), (ContinuousLinearMap.comp gL P) v = gL v E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional Lhq_closed:IsClosed q := Submodule.closed_of_finiteDimensional qP:E →L[] L := L.linearProjOfClosedCompl q hLq hL_closed hq_closedv:L(ContinuousLinearMap.comp gL P) v = gL v have hPv : P (v : E) = v := E:Type u_1inst✝²:NormedAddCommGroup Einst✝¹:NormedSpace Einst✝:FiniteDimensional EL:Submodule EgL:Covector Lq:Submodule EhLq:IsCompl L qhL_closed:IsClosed L := Submodule.closed_of_finiteDimensional Lhq_closed:IsClosed q := Submodule.closed_of_finiteDimensional qP:E →L[] L := L.linearProjOfClosedCompl q hLq hL_closed hq_closedv:LP v = v try 'simp' instead of 'simpa' Note: This linter can be disabled with `set_option linter.unnecessarySimpa false`All goals completed! 🐙 All goals completed! 🐙

2.7. Exercises🔗

  1. Prove Proposition 2.5. Hint for item 6: try T:=\{(x,y)\in \mathbb{R}^2:x>0,\ y\ge 1/x\}\cup\{(0,0)\}.

  2. Fix the auxiliary Euclidean norm \|\cdot\|_2 from the ambient convention and let f(x)=\|x\|_2 on E. Compute \partial f(0) and \partial f(x) for x\neq 0.