Theorem: IsMinOn.of_isLocalMinOn_of_convexOn_Icc
File: Mathlib/Analysis/Convex/Extrema.lean

tactic: rintro c hc
state_before: E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsLocalMinOn f (Icc a b) a
h_conv : ConvexOn ℝ (Icc a b) f
⊢ IsMinOn f (Icc a b) a

tactic: dsimp only [mem_setOf_eq]
state_before: E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsLocalMinOn f (Icc a b) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
⊢ c ∈ {x | (fun x => f a ≤ f x) x}

tactic: rw [IsLocalMinOn, nhdsWithin_Icc_eq_nhdsWithin_Ici a_lt_b] at h_local_min
state_before: E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsLocalMinOn f (Icc a b) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
⊢ f a ≤ f c

tactic: rcases hc.1.eq_or_lt with (rfl | a_lt_c)
state_before: E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
⊢ f a ≤ f c

tactic: have H₁ : ∀ᶠ y in 𝓝[>] a, f a ≤ f y :=
  h_local_min.filter_mono (nhdsWithin_mono _ Ioi_subset_Ici_self)
state_before: case inr
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
⊢ f a ≤ f c

tactic: have H₂ : ∀ᶠ y in 𝓝[>] a, y ∈ Ioc a c := Ioc_mem_nhdsWithin_Ioi (left_mem_Ico.2 a_lt_c)
state_before: case inr
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
⊢ f a ≤ f c

tactic: rcases(H₁.and H₂).exists with ⟨y, hfy, hy_ac⟩
state_before: case inr
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
⊢ f a ≤ f c

tactic: rcases(Convex.mem_Ioc a_lt_c).mp hy_ac with ⟨ya, yc, ya₀, yc₀, yac, rfl⟩
state_before: case inr.intro.intro
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
y : ℝ
hfy : f a ≤ f y
hy_ac : y ∈ Ioc a c
⊢ f a ≤ f c

tactic: suffices : ya • f a + yc • f a ≤ ya • f a + yc • f c
state_before: case inr.intro.intro.intro.intro.intro.intro.intro
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
ya yc : ℝ
ya₀ : 0 ≤ ya
yc₀ : 0 < yc
yac : ya + yc = 1
hfy : f a ≤ f (ya * a + yc * c)
hy_ac : ya * a + yc * c ∈ Ioc a c
⊢ f a ≤ f c

tactic: exact (smul_le_smul_iff_of_pos yc₀).1 (le_of_add_le_add_left this)
state_before: case inr.intro.intro.intro.intro.intro.intro.intro
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
ya yc : ℝ
ya₀ : 0 ≤ ya
yc₀ : 0 < yc
yac : ya + yc = 1
hfy : f a ≤ f (ya * a + yc * c)
hy_ac : ya * a + yc * c ∈ Ioc a c
this : ya • f a + yc • f a ≤ ya • f a + yc • f c
⊢ f a ≤ f c

case this
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
ya yc : ℝ
ya₀ : 0 ≤ ya
yc₀ : 0 < yc
yac : ya + yc = 1
hfy : f a ≤ f (ya * a + yc * c)
hy_ac : ya * a + yc * c ∈ Ioc a c
⊢ ya • f a + yc • f a ≤ ya • f a + yc • f c

tactic: calc
  ya • f a + yc • f a = f a := by rw [← add_smul, yac, one_smul]
  _ ≤ f (ya * a + yc * c) := hfy
  _ ≤ ya • f a + yc • f c := h_conv.2 (left_mem_Icc.2 a_lt_b.le) hc ya₀ yc₀.le yac
state_before: case this
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
ya yc : ℝ
ya₀ : 0 ≤ ya
yc₀ : 0 < yc
yac : ya + yc = 1
hfy : f a ≤ f (ya * a + yc * c)
hy_ac : ya * a + yc * c ∈ Ioc a c
⊢ ya • f a + yc • f a ≤ ya • f a + yc • f c

tactic: exact le_rfl
state_before: case inl
E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
hc : a ∈ Icc a b
⊢ f a ≤ f a

tactic: rw [← add_smul, yac, one_smul]
state_before: E : Type ?u.1907
β : Type u_1
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : Module ℝ E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : ContinuousSMul ℝ E
inst✝² : OrderedAddCommGroup β
inst✝¹ : Module ℝ β
inst✝ : OrderedSMul ℝ β
s : Set E
f : ℝ → β
a b : ℝ
a_lt_b : a < b
h_local_min : IsMinFilter f (𝓝[Ici a] a) a
h_conv : ConvexOn ℝ (Icc a b) f
c : ℝ
hc : c ∈ Icc a b
a_lt_c : a < c
H₁ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, f a ≤ f y
H₂ : ∀ᶠ (y : ℝ) in 𝓝[Ioi a] a, y ∈ Ioc a c
ya yc : ℝ
ya₀ : 0 ≤ ya
yc₀ : 0 < yc
yac : ya + yc = 1
hfy : f a ≤ f (ya * a + yc * c)
hy_ac : ya * a + yc * c ∈ Ioc a c
⊢ ya • f a + yc • f a = f a