[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : Preorder α
h : ∀ {a b : α}, a ≤ b → IsCompact (Icc a b)
a b : α
hab : ¬a ≤ b
⊢ IsCompact (Icc a b)
[PROOFSTEP]
rw [Icc_eq_empty hab]
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : Preorder α
h : ∀ {a b : α}, a ≤ b → IsCompact (Icc a b)
a b : α
hab : ¬a ≤ b
⊢ IsCompact ∅
[PROOFSTEP]
exact isCompact_empty
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PartialOrder α
h : ∀ {a b : α}, a < b → IsCompact (Icc a b)
a✝ b✝ : α
hab : a✝ ≤ b✝
⊢ a✝ = b✝ → IsCompact (Icc a✝ b✝)
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PartialOrder α
h : ∀ {a b : α}, a < b → IsCompact (Icc a b)
a✝ : α
hab : a✝ ≤ a✝
⊢ IsCompact (Icc a✝ a✝)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
⊢ CompactIccSpace α
[PROOFSTEP]
refine' .mk'' fun {a b} hlt => ?_
[GOAL]
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
⊢ IsCompact (Icc a b)
[PROOFSTEP]
cases' le_or_lt a b with hab hab
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
⊢ IsCompact (Icc a b)
case inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : b < a
⊢ IsCompact (Icc a b)
[PROOFSTEP]
swap
[GOAL]
case inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : b < a
⊢ IsCompact (Icc a b)
[PROOFSTEP]
simp [hab]
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
⊢ IsCompact (Icc a b)
[PROOFSTEP]
refine' isCompact_iff_ultrafilter_le_nhds.2 fun f hf => _
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ↑f ≤ 𝓟 (Icc a b)
⊢ ∃ a_1, a_1 ∈ Icc a b ∧ ↑f ≤ 𝓝 a_1
[PROOFSTEP]
contrapose! hf
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
⊢ ¬↑f ≤ 𝓟 (Icc a b)
[PROOFSTEP]
rw [le_principal_iff]
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have hpt : ∀ x ∈ Icc a b, { x } ∉ f := fun x hx hxf => hf x hx ((le_pure_iff.2 hxf).trans (pure_le_nhds x))
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
set s := {x ∈ Icc a b | Icc a x ∉ f}
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have hsb : b ∈ upperBounds s := fun x hx => hx.1.2
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have sbd : BddAbove s := ⟨b, hsb⟩
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have ha : a ∈ s := by simp [hpt, hab]
[GOAL]
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
⊢ a ∈ s
[PROOFSTEP]
simp [hpt, hab]
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
rcases hab.eq_or_lt with (rfl | _hlt)
[GOAL]
case inl.inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a : α
f : Ultrafilter α
hlt : a < a
hab : a ≤ a
hf : ∀ (a_1 : α), a_1 ∈ Icc a a → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a a → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a a ∧ ¬Icc a x ∈ f}
hsb : a ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
⊢ ¬Icc a a ∈ ↑f
[PROOFSTEP]
exact
  ha.2
    -- porting note: the `obtain` below was instead
      -- `set c := Sup s`
      -- `have hsc : IsLUB s c := isLUB_csSup ⟨a, ha⟩ sbd`
[GOAL]
case inl.inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
obtain ⟨c, hsc⟩ : ∃ c, IsLUB s c := ⟨sSup s, isLUB_csSup ⟨a, ha⟩ ⟨b, hsb⟩⟩
[GOAL]
case inl.inr.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have hc : c ∈ Icc a b := ⟨hsc.1 ha, hsc.2 hsb⟩
[GOAL]
case inl.inr.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hf : ∀ (a_1 : α), a_1 ∈ Icc a b → ¬↑f ≤ 𝓝 a_1
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
specialize hf c hc
[GOAL]
case inl.inr.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
have hcs : c ∈ s := by
  rcases hc.1.eq_or_lt with (rfl | hlt); · assumption
  refine' ⟨hc, fun hcf => hf fun U hU => _⟩
  rcases(mem_nhdsWithin_Iic_iff_exists_Ioc_subset' hlt).1 (mem_nhdsWithin_of_mem_nhds hU) with ⟨x, hxc, hxU⟩
  rcases((hsc.frequently_mem ⟨a, ha⟩).and_eventually (Ioc_mem_nhdsWithin_Iic ⟨hxc, le_rfl⟩)).exists with
    ⟨y, ⟨_hyab, hyf⟩, hy⟩
  refine' mem_of_superset (f.diff_mem_iff.2 ⟨hcf, hyf⟩) (Subset.trans _ hxU)
  rw [diff_subset_iff]
  exact Subset.trans Icc_subset_Icc_union_Ioc <| union_subset_union Subset.rfl <| Ioc_subset_Ioc_left hy.1.le
[GOAL]
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
⊢ c ∈ s
[PROOFSTEP]
rcases hc.1.eq_or_lt with (rfl | hlt)
[GOAL]
case inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
hsc : IsLUB s a
hc : a ∈ Icc a b
hf : ¬↑f ≤ 𝓝 a
⊢ a ∈ s
[PROOFSTEP]
assumption
[GOAL]
case inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
⊢ c ∈ s
[PROOFSTEP]
refine' ⟨hc, fun hcf => hf fun U hU => _⟩
[GOAL]
case inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hcf : Icc a c ∈ f
U : Set α
hU : U ∈ 𝓝 c
⊢ U ∈ ↑f
[PROOFSTEP]
rcases(mem_nhdsWithin_Iic_iff_exists_Ioc_subset' hlt).1 (mem_nhdsWithin_of_mem_nhds hU) with ⟨x, hxc, hxU⟩
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hcf : Icc a c ∈ f
U : Set α
hU : U ∈ 𝓝 c
x : α
hxc : x ∈ Iio c
hxU : Ioc x c ⊆ U
⊢ U ∈ ↑f
[PROOFSTEP]
rcases((hsc.frequently_mem ⟨a, ha⟩).and_eventually (Ioc_mem_nhdsWithin_Iic ⟨hxc, le_rfl⟩)).exists with
  ⟨y, ⟨_hyab, hyf⟩, hy⟩
[GOAL]
case inr.intro.intro.intro.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hcf : Icc a c ∈ f
U : Set α
hU : U ∈ 𝓝 c
x : α
hxc : x ∈ Iio c
hxU : Ioc x c ⊆ U
y : α
hy : x < y ∧ y ≤ c
_hyab : y ∈ Icc a b
hyf : ¬Icc a y ∈ f
⊢ U ∈ ↑f
[PROOFSTEP]
refine' mem_of_superset (f.diff_mem_iff.2 ⟨hcf, hyf⟩) (Subset.trans _ hxU)
[GOAL]
case inr.intro.intro.intro.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hcf : Icc a c ∈ f
U : Set α
hU : U ∈ 𝓝 c
x : α
hxc : x ∈ Iio c
hxU : Ioc x c ⊆ U
y : α
hy : x < y ∧ y ≤ c
_hyab : y ∈ Icc a b
hyf : ¬Icc a y ∈ f
⊢ Icc a c \ Icc a y ⊆ Ioc x c
[PROOFSTEP]
rw [diff_subset_iff]
[GOAL]
case inr.intro.intro.intro.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hcf : Icc a c ∈ f
U : Set α
hU : U ∈ 𝓝 c
x : α
hxc : x ∈ Iio c
hxU : Ioc x c ⊆ U
y : α
hy : x < y ∧ y ≤ c
_hyab : y ∈ Icc a b
hyf : ¬Icc a y ∈ f
⊢ Icc a c ⊆ Icc a y ∪ Ioc x c
[PROOFSTEP]
exact Subset.trans Icc_subset_Icc_union_Ioc <| union_subset_union Subset.rfl <| Ioc_subset_Ioc_left hy.1.le
[GOAL]
case inl.inr.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hcs : c ∈ s
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
rcases hc.2.eq_or_lt with (rfl | hlt)
[GOAL]
case inl.inr.intro.inl
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a : α
f : Ultrafilter α
c : α
hf : ¬↑f ≤ 𝓝 c
hlt : a < c
hab : a ≤ c
hpt : ∀ (x : α), x ∈ Icc a c → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a c ∧ ¬Icc a x ∈ f}
hsb : c ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < c
hsc : IsLUB s c
hc : c ∈ Icc a c
hcs : c ∈ s
⊢ ¬Icc a c ∈ ↑f
[PROOFSTEP]
exact hcs.2
[GOAL]
case inl.inr.intro.inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hf : ¬↑f ≤ 𝓝 c
hcs : c ∈ s
hlt : c < b
⊢ ¬Icc a b ∈ ↑f
[PROOFSTEP]
contrapose! hf
[GOAL]
case inl.inr.intro.inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
⊢ ↑f ≤ 𝓝 c
[PROOFSTEP]
intro U hU
[GOAL]
case inl.inr.intro.inr
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
U : Set α
hU : U ∈ 𝓝 c
⊢ U ∈ ↑f
[PROOFSTEP]
rcases(mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset hlt).1 (mem_nhdsWithin_of_mem_nhds hU) with ⟨y, hxy, hyU⟩
[GOAL]
case inl.inr.intro.inr.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
U : Set α
hU : U ∈ 𝓝 c
y : α
hxy : y ∈ Ioc c b
hyU : Ico c y ⊆ U
⊢ U ∈ ↑f
[PROOFSTEP]
refine' mem_of_superset _ hyU
[GOAL]
case inl.inr.intro.inr.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
U : Set α
hU : U ∈ 𝓝 c
y : α
hxy : y ∈ Ioc c b
hyU : Ico c y ⊆ U
⊢ Ico c y ∈ ↑f
[PROOFSTEP]
clear! U
[GOAL]
case inl.inr.intro.inr.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
⊢ Ico c y ∈ ↑f
[PROOFSTEP]
have hy : y ∈ Icc a b := ⟨hc.1.trans hxy.1.le, hxy.2⟩
[GOAL]
case inl.inr.intro.inr.intro.intro
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
hy : y ∈ Icc a b
⊢ Ico c y ∈ ↑f
[PROOFSTEP]
by_cases hay : Icc a y ∈ f
[GOAL]
case pos
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
hy : y ∈ Icc a b
hay : Icc a y ∈ f
⊢ Ico c y ∈ ↑f
[PROOFSTEP]
refine' mem_of_superset (f.diff_mem_iff.2 ⟨f.diff_mem_iff.2 ⟨hay, hcs.2⟩, hpt y hy⟩) _
[GOAL]
case pos
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
hy : y ∈ Icc a b
hay : Icc a y ∈ f
⊢ (Icc a y \ Icc a c) \ {y} ⊆ Ico c y
[PROOFSTEP]
rw [diff_subset_iff, union_comm, Ico_union_right hxy.1.le, diff_subset_iff]
[GOAL]
case pos
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
hy : y ∈ Icc a b
hay : Icc a y ∈ f
⊢ Icc a y ⊆ Icc a c ∪ Icc c y
[PROOFSTEP]
exact Icc_subset_Icc_union_Icc
[GOAL]
case neg
α : Type u_1
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
a b : α
hlt✝ : a < b
hab : a ≤ b
f : Ultrafilter α
hpt : ∀ (x : α), x ∈ Icc a b → ¬{x} ∈ f
s : Set α := {x | x ∈ Icc a b ∧ ¬Icc a x ∈ f}
hsb : b ∈ upperBounds s
sbd : BddAbove s
ha : a ∈ s
_hlt : a < b
c : α
hsc : IsLUB s c
hc : c ∈ Icc a b
hcs : c ∈ s
hlt : c < b
hf : Icc a b ∈ ↑f
y : α
hxy : y ∈ Ioc c b
hy : y ∈ Icc a b
hay : ¬Icc a y ∈ f
⊢ Ico c y ∈ ↑f
[PROOFSTEP]
exact ((hsc.1 ⟨hy, hay⟩).not_lt hxy.1).elim
[GOAL]
α : Type u_1
inst✝² : CompleteLinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderTopology α
⊢ IsCompact univ
[PROOFSTEP]
simp only [← Icc_bot_top, isCompact_Icc]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
⊢ ∃ x, IsLeast s x
[PROOFSTEP]
haveI : Nonempty s := ne_s.to_subtype
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
⊢ ∃ x, IsLeast s x
[PROOFSTEP]
suffices : (s ∩ ⋂ x ∈ s, Iic x).Nonempty
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this✝ : Nonempty ↑s
this : Set.Nonempty (s ∩ ⋂ (x : α) (_ : x ∈ s), Iic x)
⊢ ∃ x, IsLeast s x
[PROOFSTEP]
exact ⟨this.choose, this.choose_spec.1, mem_iInter₂.mp this.choose_spec.2⟩
[GOAL]
case this
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
⊢ Set.Nonempty (s ∩ ⋂ (x : α) (_ : x ∈ s), Iic x)
[PROOFSTEP]
rw [biInter_eq_iInter]
[GOAL]
case this
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
⊢ Set.Nonempty (s ∩ ⋂ (x : ↑s), Iic ↑x)
[PROOFSTEP]
by_contra H
[GOAL]
case this
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
H : ¬Set.Nonempty (s ∩ ⋂ (x : ↑s), Iic ↑x)
⊢ False
[PROOFSTEP]
rw [not_nonempty_iff_eq_empty] at H
[GOAL]
case this
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
H : s ∩ ⋂ (x : ↑s), Iic ↑x = ∅
⊢ False
[PROOFSTEP]
rcases hs.elim_directed_family_closed (fun x : s => Iic ↑x) (fun x => isClosed_Iic) H
    (directed_of_inf fun _ _ h => Iic_subset_Iic.mpr h) with
  ⟨x, hx⟩
[GOAL]
case this.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set α
hs : IsCompact s
ne_s : Set.Nonempty s
this : Nonempty ↑s
H : s ∩ ⋂ (x : ↑s), Iic ↑x = ∅
x : ↑s
hx : s ∩ Iic ↑x = ∅
⊢ False
[PROOFSTEP]
exact not_nonempty_iff_eq_empty.mpr hx ⟨x, x.2, le_rfl⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
hs : IsCompact s
ne_s : Set.Nonempty s
f : β → α
hf : ContinuousOn f s
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
rcases(hs.image_of_continuousOn hf).exists_isLeast (ne_s.image f) with ⟨_, ⟨x, hxs, rfl⟩, hx⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
hs : IsCompact s
ne_s : Set.Nonempty s
f : β → α
hf : ContinuousOn f s
x : β
hxs : x ∈ s
hx : f x ∈ lowerBounds (f '' s)
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
exact ⟨x, hxs, ball_image_iff.1 hx⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
rcases(hasBasis_cocompact.inf_principal _).eventually_iff.1 hc with ⟨K, hK, hKf⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
have hsub : insert x₀ (K ∩ s) ⊆ s := insert_subset_iff.2 ⟨h₀, inter_subset_right _ _⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
hsub : insert x₀ (K ∩ s) ⊆ s
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
obtain ⟨x, hx, hxf⟩ : ∃ x ∈ insert x₀ (K ∩ s), ∀ y ∈ insert x₀ (K ∩ s), f x ≤ f y :=
  ((hK.inter_right hsc).insert x₀).exists_forall_le (insert_nonempty _ _) (hf.mono hsub)
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
hsub : insert x₀ (K ∩ s) ⊆ s
x : β
hx : x ∈ insert x₀ (K ∩ s)
hxf : ∀ (y : β), y ∈ insert x₀ (K ∩ s) → f x ≤ f y
⊢ ∃ x, x ∈ s ∧ IsMinOn f s x
[PROOFSTEP]
refine' ⟨x, hsub hx, fun y hy => _⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
hsub : insert x₀ (K ∩ s) ⊆ s
x : β
hx : x ∈ insert x₀ (K ∩ s)
hxf : ∀ (y : β), y ∈ insert x₀ (K ∩ s) → f x ≤ f y
y : β
hy : y ∈ s
⊢ y ∈ {x_1 | (fun x_2 => f x ≤ f x_2) x_1}
[PROOFSTEP]
by_cases hyK : y ∈ K
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
hsub : insert x₀ (K ∩ s) ⊆ s
x : β
hx : x ∈ insert x₀ (K ∩ s)
hxf : ∀ (y : β), y ∈ insert x₀ (K ∩ s) → f x ≤ f y
y : β
hy : y ∈ s
hyK : y ∈ K
⊢ y ∈ {x_1 | (fun x_2 => f x ≤ f x_2) x_1}
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
s : Set β
f : β → α
hf : ContinuousOn f s
hsc : IsClosed s
x₀ : β
h₀ : x₀ ∈ s
hc : ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x
K : Set β
hK : IsCompact K
hKf : ∀ ⦃x : β⦄, x ∈ Kᶜ ∩ s → f x₀ ≤ f x
hsub : insert x₀ (K ∩ s) ⊆ s
x : β
hx : x ∈ insert x₀ (K ∩ s)
hxf : ∀ (y : β), y ∈ insert x₀ (K ∩ s) → f x ≤ f y
y : β
hy : y ∈ s
hyK : ¬y ∈ K
⊢ y ∈ {x_1 | (fun x_2 => f x ≤ f x_2) x_1}
[PROOFSTEP]
exacts [hxf _ (Or.inr ⟨hyK, hy⟩), (hxf _ (Or.inl rfl)).trans (hKf ⟨hyK, hy⟩)]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : LinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIicTopology α
f : β → α
hf : Continuous f
x₀ : β
h : ∀ᶠ (x : β) in cocompact β, f x₀ ≤ f x
⊢ ∀ᶠ (x : β) in cocompact β ⊓ 𝓟 univ, f x₀ ≤ f x
[PROOFSTEP]
rwa [principal_univ, inf_top_eq]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty β
f : β → α
hf : Continuous f
hlim : Tendsto f (cocompact β) atTop
⊢ ∃ x, ∀ (y : β), f x ≤ f y
[PROOFSTEP]
inhabit β
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty β
f : β → α
hf : Continuous f
hlim : Tendsto f (cocompact β) atTop
inhabited_h : Inhabited β
⊢ ∃ x, ∀ (y : β), f x ≤ f y
[PROOFSTEP]
exact hf.exists_forall_le' default (hlim.eventually <| eventually_ge_atTop _)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : ClosedIicTopology α
inst✝¹ : Nonempty β
inst✝ : One α
f : β → α
hf : Continuous f
h : HasCompactMulSupport f
⊢ ∃ x, ∀ (y : β), f x ≤ f y
[PROOFSTEP]
obtain ⟨_, ⟨x, rfl⟩, hx⟩ := (h.isCompact_range hf).exists_isLeast (range_nonempty _)
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : ClosedIicTopology α
inst✝¹ : Nonempty β
inst✝ : One α
f : β → α
hf : Continuous f
h : HasCompactMulSupport f
x : β
hx : f x ∈ lowerBounds (range f)
⊢ ∃ x, ∀ (y : β), f x ≤ f y
[PROOFSTEP]
rw [mem_lowerBounds, forall_range_iff] at hx
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : LinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : ClosedIicTopology α
inst✝¹ : Nonempty β
inst✝ : One α
f : β → α
hf : Continuous f
h : HasCompactMulSupport f
x : β
hx : ∀ (i : β), f x ≤ f i
⊢ ∃ x, ∀ (y : β), f x ≤ f y
[PROOFSTEP]
exact ⟨x, hx⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty α
s : Set α
hs : IsCompact s
⊢ BddBelow s
[PROOFSTEP]
rcases s.eq_empty_or_nonempty with rfl | hne
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty α
hs : IsCompact ∅
⊢ BddBelow ∅
[PROOFSTEP]
exact bddBelow_empty
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty α
s : Set α
hs : IsCompact s
hne : Set.Nonempty s
⊢ BddBelow s
[PROOFSTEP]
obtain ⟨a, -, has⟩ := hs.exists_isLeast hne
[GOAL]
case inr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁵ : LinearOrder α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : ClosedIicTopology α
inst✝ : Nonempty α
s : Set α
hs : IsCompact s
hne : Set.Nonempty s
a : α
has : a ∈ lowerBounds s
⊢ BddBelow s
[PROOFSTEP]
exact ⟨a, has⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIciTopology α
f : β → α
K : Set β
hK : IsCompact K
h0K : Set.Nonempty K
hf : ContinuousOn f K
y : α
⊢ sSup (f '' K) < y ↔ ∀ (x : β), x ∈ K → f x < y
[PROOFSTEP]
refine' ⟨fun h x hx => (le_csSup (hK.bddAbove_image hf) <| mem_image_of_mem f hx).trans_lt h, fun h => _⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIciTopology α
f : β → α
K : Set β
hK : IsCompact K
h0K : Set.Nonempty K
hf : ContinuousOn f K
y : α
h : ∀ (x : β), x ∈ K → f x < y
⊢ sSup (f '' K) < y
[PROOFSTEP]
obtain ⟨x, hx, h2x⟩ := hK.exists_forall_ge h0K hf
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIciTopology α
f : β → α
K : Set β
hK : IsCompact K
h0K : Set.Nonempty K
hf : ContinuousOn f K
y : α
h : ∀ (x : β), x ∈ K → f x < y
x : β
hx : x ∈ K
h2x : ∀ (y : β), y ∈ K → f y ≤ f x
⊢ sSup (f '' K) < y
[PROOFSTEP]
refine' (csSup_le (h0K.image f) _).trans_lt (h x hx)
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIciTopology α
f : β → α
K : Set β
hK : IsCompact K
h0K : Set.Nonempty K
hf : ContinuousOn f K
y : α
h : ∀ (x : β), x ∈ K → f x < y
x : β
hx : x ∈ K
h2x : ∀ (y : β), y ∈ K → f y ≤ f x
⊢ ∀ (b : α), b ∈ f '' K → b ≤ f x
[PROOFSTEP]
rintro _ ⟨x', hx', rfl⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : ClosedIciTopology α
f : β → α
K : Set β
hK : IsCompact K
h0K : Set.Nonempty K
hf : ContinuousOn f K
y : α
h : ∀ (x : β), x ∈ K → f x < y
x : β
hx : x ∈ K
h2x : ∀ (y : β), y ∈ K → f y ≤ f x
x' : β
hx' : x' ∈ K
⊢ f x' ≤ f x
[PROOFSTEP]
exact h2x x' hx'
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
⊢ Continuous fun x => sSup (f x '' K)
[PROOFSTEP]
rcases eq_empty_or_nonempty K with (rfl | h0K)
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
hf : Continuous ↿f
hK : IsCompact ∅
⊢ Continuous fun x => sSup (f x '' ∅)
[PROOFSTEP]
simp_rw [image_empty]
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
hf : Continuous ↿f
hK : IsCompact ∅
⊢ Continuous fun x => sSup ∅
[PROOFSTEP]
exact continuous_const
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
⊢ Continuous fun x => sSup (f x '' K)
[PROOFSTEP]
rw [continuous_iff_continuousAt]
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
⊢ ∀ (x : γ), ContinuousAt (fun x => sSup (f x '' K)) x
[PROOFSTEP]
intro x
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
⊢ ContinuousAt (fun x => sSup (f x '' K)) x
[PROOFSTEP]
obtain ⟨y, hyK, h2y, hy⟩ :=
  hK.exists_sSup_image_eq_and_ge h0K (show Continuous fun y => f x y from hf.comp <| Continuous.Prod.mk x).continuousOn
[GOAL]
case inr.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
⊢ ContinuousAt (fun x => sSup (f x '' K)) x
[PROOFSTEP]
rw [ContinuousAt, h2y, tendsto_order]
[GOAL]
case inr.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
⊢ (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < sSup (f b '' K)) ∧
    ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < a'
[PROOFSTEP]
have :=
  tendsto_order.mp ((show Continuous fun x => f x y from hf.comp <| continuous_id.prod_mk continuous_const).tendsto x)
[GOAL]
case inr.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
⊢ (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < sSup (f b '' K)) ∧
    ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < a'
[PROOFSTEP]
refine' ⟨fun z hz => _, fun z hz => _⟩
[GOAL]
case inr.intro.intro.intro.refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z < f x y
⊢ ∀ᶠ (b : γ) in 𝓝 x, z < sSup (f b '' K)
[PROOFSTEP]
refine' (this.1 z hz).mono fun x' hx' => hx'.trans_le <| le_csSup _ <| mem_image_of_mem (f x') hyK
[GOAL]
case inr.intro.intro.intro.refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z < f x y
x' : γ
hx' : z < f x' y
⊢ BddAbove (f x' '' K)
[PROOFSTEP]
exact hK.bddAbove_image (hf.comp <| Continuous.Prod.mk x').continuousOn
[GOAL]
case inr.intro.intro.intro.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z
[PROOFSTEP]
have h : ({ x } : Set γ) ×ˢ K ⊆ ↿f ⁻¹' Iio z :=
  by
  rintro ⟨x', y'⟩ ⟨(rfl : x' = x), hy'⟩
  exact (hy y' hy').trans_lt hz
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
⊢ {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
[PROOFSTEP]
rintro ⟨x', y'⟩ ⟨(rfl : x' = x), hy'⟩
[GOAL]
case mk.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
y : β
hyK : y ∈ K
z : α
x' : γ
y' : β
hy' : (x', y').snd ∈ K
h2y : sSup ((fun y => f x' y) '' K) = f x' y
hy : ∀ (y_1 : β), y_1 ∈ K → f x' y_1 ≤ f x' y
this :
  (∀ (a' : α), a' < f x' y → ∀ᶠ (b : γ) in 𝓝 x', a' < f b y) ∧ ∀ (a' : α), a' > f x' y → ∀ᶠ (b : γ) in 𝓝 x', f b y < a'
hz : z > f x' y
⊢ (x', y') ∈ ↿f ⁻¹' Iio z
[PROOFSTEP]
exact (hy y' hy').trans_lt hz
[GOAL]
case inr.intro.intro.intro.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z
[PROOFSTEP]
obtain ⟨u, v, hu, _, hxu, hKv, huv⟩ := generalized_tube_lemma isCompact_singleton hK (isOpen_Iio.preimage hf) h
[GOAL]
case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z
[PROOFSTEP]
refine' eventually_of_mem (hu.mem_nhds (singleton_subset_iff.mp hxu)) fun x' hx' => _
[GOAL]
case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
x' : γ
hx' : x' ∈ u
⊢ sSup (f x' '' K) < z
[PROOFSTEP]
rw [hK.sSup_lt_iff_of_continuous h0K (show Continuous (f x') from hf.comp <| Continuous.Prod.mk x').continuousOn]
[GOAL]
case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
x' : γ
hx' : x' ∈ u
⊢ ∀ (x : β), x ∈ K → f x' x < z
[PROOFSTEP]
exact fun y' hy' => huv (mk_mem_prod hx' (hKv hy'))
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ f '' [[a, b]] = [[sInf (f '' [[a, b]]), sSup (f '' [[a, b]])]]
[PROOFSTEP]
refine' h.image_uIcc_eq_Icc.trans (uIcc_of_le _).symm
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ sInf (f '' [[a, b]]) ≤ sSup (f '' [[a, b]])
[PROOFSTEP]
refine' csInf_le_csSup _ _ (nonempty_uIcc.image _)
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ BddBelow (f '' [[a, b]])
[PROOFSTEP]
rw [h.image_uIcc_eq_Icc]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ BddAbove (f '' [[a, b]])
[PROOFSTEP]
rw [h.image_uIcc_eq_Icc]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ BddBelow (Icc (sInf (f '' [[a, b]])) (sSup (f '' [[a, b]])))
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f [[a, b]]
⊢ BddAbove (Icc (sInf (f '' [[a, b]])) (sSup (f '' [[a, b]])))
[PROOFSTEP]
exacts [bddBelow_Icc, bddAbove_Icc]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
⊢ sInf (f '' Icc a b) ≤ f c
[PROOFSTEP]
have := mem_image_of_mem f hc
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ f '' Icc a b
⊢ sInf (f '' Icc a b) ≤ f c
[PROOFSTEP]
rw [h.image_Icc (hc.1.trans hc.2)] at this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ Icc (sInf (f '' Icc a b)) (sSup (f '' Icc a b))
⊢ sInf (f '' Icc a b) ≤ f c
[PROOFSTEP]
exact this.1
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
⊢ f c ≤ sSup (f '' Icc a b)
[PROOFSTEP]
have := mem_image_of_mem f hc
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ f '' Icc a b
⊢ f c ≤ sSup (f '' Icc a b)
[PROOFSTEP]
rw [h.image_Icc (hc.1.trans hc.2)] at this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : DenselyOrdered α
inst✝¹ : ConditionallyCompleteLinearOrder β
inst✝ : OrderTopology β
f : α → β
a b c : α
h : ContinuousOn f (Icc a b)
hc : c ∈ Icc a b
this : f c ∈ Icc (sInf (f '' Icc a b)) (sSup (f '' Icc a b))
⊢ f c ≤ sSup (f '' Icc a b)
[PROOFSTEP]
exact this.2


[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
i : ℕ
⊢ coeff (scaleRoots p s) i = coeff p i * s ^ (natDegree p - i)
[PROOFSTEP]
simp (config := { contextual := true }) [scaleRoots, coeff_monomial]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
⊢ coeff (scaleRoots p s) (natDegree p) = leadingCoeff p
[PROOFSTEP]
rw [leadingCoeff, coeff_scaleRoots, tsub_self, pow_zero, mul_one]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
s : R
⊢ scaleRoots 0 s = 0
[PROOFSTEP]
ext
[GOAL]
case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
s : R
n✝ : ℕ
⊢ coeff (scaleRoots 0 s) n✝ = coeff 0 n✝
[PROOFSTEP]
simp
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
s : R
⊢ scaleRoots p s ≠ 0
[PROOFSTEP]
intro h
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
s : R
h : scaleRoots p s = 0
⊢ False
[PROOFSTEP]
have : p.coeff p.natDegree ≠ 0 := mt leadingCoeff_eq_zero.mp hp
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
s : R
h : scaleRoots p s = 0
this : coeff p (natDegree p) ≠ 0
⊢ False
[PROOFSTEP]
have : (scaleRoots p s).coeff p.natDegree = 0 := congr_fun (congr_arg (coeff : R[X] → ℕ → R) h) p.natDegree
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
s : R
h : scaleRoots p s = 0
this✝ : coeff p (natDegree p) ≠ 0
this : coeff (scaleRoots p s) (natDegree p) = 0
⊢ False
[PROOFSTEP]
rw [coeff_scaleRoots_natDegree] at this
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
s : R
h : scaleRoots p s = 0
this✝ : coeff p (natDegree p) ≠ 0
this : leadingCoeff p = 0
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
⊢ support (scaleRoots p s) ≤ support p
[PROOFSTEP]
intro
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
a✝ : ℕ
⊢ a✝ ∈ support (scaleRoots p s) → a✝ ∈ support p
[PROOFSTEP]
simpa using left_ne_zero_of_mul
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
⊢ support p ≤ support (scaleRoots p s)
[PROOFSTEP]
intro i
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
⊢ i ∈ support p → i ∈ support (scaleRoots p s)
[PROOFSTEP]
simp only [coeff_scaleRoots, Polynomial.mem_support_iff]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
⊢ coeff p i ≠ 0 → coeff p i * s ^ (natDegree p - i) ≠ 0
[PROOFSTEP]
intro p_ne_zero ps_zero
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
p_ne_zero : coeff p i ≠ 0
ps_zero : coeff p i * s ^ (natDegree p - i) = 0
⊢ False
[PROOFSTEP]
have := pow_mem hs (p.natDegree - i) _ ps_zero
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
p_ne_zero : coeff p i ≠ 0
ps_zero : coeff p i * s ^ (natDegree p - i) = 0
this : coeff p i = 0
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
⊢ degree (scaleRoots p s) = degree p
[PROOFSTEP]
haveI := Classical.propDecidable
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
⊢ degree (scaleRoots p s) = degree p
[PROOFSTEP]
by_cases hp : p = 0
[GOAL]
case pos
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
hp : p = 0
⊢ degree (scaleRoots p s) = degree p
[PROOFSTEP]
rw [hp, zero_scaleRoots]
[GOAL]
case neg
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
hp : ¬p = 0
⊢ degree (scaleRoots p s) = degree p
[PROOFSTEP]
refine' le_antisymm (Finset.sup_mono (support_scaleRoots_le p s)) (degree_le_degree _)
[GOAL]
case neg
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
hp : ¬p = 0
⊢ coeff (scaleRoots p s) (natDegree p) ≠ 0
[PROOFSTEP]
rw [coeff_scaleRoots_natDegree]
[GOAL]
case neg
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
hp : ¬p = 0
⊢ leadingCoeff p ≠ 0
[PROOFSTEP]
intro h
[GOAL]
case neg
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this : (a : Prop) → Decidable a
hp : ¬p = 0
h : leadingCoeff p = 0
⊢ False
[PROOFSTEP]
have := leadingCoeff_eq_zero.mp h
[GOAL]
case neg
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
this✝ : (a : Prop) → Decidable a
hp : ¬p = 0
h : leadingCoeff p = 0
this : p = 0
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
⊢ natDegree (scaleRoots p s) = natDegree p
[PROOFSTEP]
simp only [natDegree, degree_scaleRoots]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
s : R
⊢ Monic (scaleRoots p s) ↔ Monic p
[PROOFSTEP]
simp only [Monic, leadingCoeff, natDegree_scaleRoots, coeff_scaleRoots_natDegree]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
x : R
f : R →+* S
h : ↑f (leadingCoeff p) ≠ 0
⊢ map f (scaleRoots p x) = scaleRoots (map f p) (↑f x)
[PROOFSTEP]
ext
[GOAL]
case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
p : R[X]
x : R
f : R →+* S
h : ↑f (leadingCoeff p) ≠ 0
n✝ : ℕ
⊢ coeff (map f (scaleRoots p x)) n✝ = coeff (scaleRoots (map f p) (↑f x)) n✝
[PROOFSTEP]
simp [Polynomial.natDegree_map_of_leadingCoeff_ne_zero _ h]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
⊢ eval₂ f (↑f s * r) (scaleRoots p s) =
    ∑ i in support (scaleRoots p s), ↑f (coeff p i * s ^ (natDegree p - i)) * (↑f s * r) ^ i
[PROOFSTEP]
simp [eval₂_eq_sum, sum_def]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
_hi : i ∈ support p
hi' : ¬i ∈ support (scaleRoots p s)
⊢ ↑f (coeff p i * s ^ (natDegree p - i)) * (↑f s * r) ^ i = 0
[PROOFSTEP]
let this : coeff p i * s ^ (p.natDegree - i) = 0 := by simpa using hi'
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
_hi : i ∈ support p
hi' : ¬i ∈ support (scaleRoots p s)
⊢ coeff p i * s ^ (natDegree p - i) = 0
[PROOFSTEP]
simpa using hi'
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
_hi : i ∈ support p
hi' : ¬i ∈ support (scaleRoots p s)
this : coeff p i * s ^ (natDegree p - i) = 0 :=
  Eq.mp
    (Eq.trans
      (congrArg Not
        (Eq.trans Mathlib.Data.Polynomial.Basic._auxLemma.17 (congrFun (congrArg Ne (coeff_scaleRoots p s i)) 0)))
      Mathlib.Logic.Basic._auxLemma.9)
    hi'
⊢ ↑f (coeff p i * s ^ (natDegree p - i)) * (↑f s * r) ^ i = 0
[PROOFSTEP]
simp [this]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
_hi : i ∈ support p
⊢ ↑f (coeff p i * s ^ (natDegree p - i)) * (↑f s * r) ^ i = ↑f (coeff p i) * ↑f s ^ (natDegree p - i + i) * r ^ i
[PROOFSTEP]
simp_rw [f.map_mul, f.map_pow, pow_add, mul_pow, mul_assoc]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
hi : i ∈ support p
⊢ ↑f (coeff p i) * ↑f s ^ (natDegree p - i + i) * r ^ i = ↑f s ^ natDegree p * (↑f (coeff p i) * r ^ i)
[PROOFSTEP]
rw [mul_assoc, mul_left_comm, tsub_add_cancel_of_le]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
i : ℕ
hi : i ∈ support p
⊢ i ≤ natDegree p
[PROOFSTEP]
exact le_natDegree_of_ne_zero (Polynomial.mem_support_iff.mp hi)
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
⊢ ↑f s ^ natDegree p * ∑ i in support p, ↑f (coeff p i) * r ^ i = ↑f s ^ natDegree p * eval₂ f r p
[PROOFSTEP]
simp [eval₂_eq_sum, sum_def]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* R
r : R
s : S
hr : eval₂ f r p = 0
⊢ eval₂ f (↑f s * r) (scaleRoots p s) = 0
[PROOFSTEP]
rw [scaleRoots_eval₂_mul, hr, mul_zero]
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* K
hf : Function.Injective ↑f
r s : S
hr : eval₂ f (↑f r / ↑f s) p = 0
hs : s ∈ nonZeroDivisors S
⊢ eval₂ f (↑f r) (scaleRoots p s) = 0
[PROOFSTEP]
nontriviality S using Subsingleton.eq_zero
[GOAL]
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* K
hf : Function.Injective ↑f
r s : S
hr : eval₂ f (↑f r / ↑f s) p = 0
hs : s ∈ nonZeroDivisors S
✝ : Nontrivial S
⊢ eval₂ f (↑f r) (scaleRoots p s) = 0
[PROOFSTEP]
convert @scaleRoots_eval₂_eq_zero _ _ _ _ p f _ s hr
[GOAL]
case h.e'_2.h.e'_6
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* K
hf : Function.Injective ↑f
r s : S
hr : eval₂ f (↑f r / ↑f s) p = 0
hs : s ∈ nonZeroDivisors S
✝ : Nontrivial S
⊢ ↑f r = ↑f s * (↑f r / ↑f s)
[PROOFSTEP]
rw [← mul_div_assoc, mul_comm, mul_div_cancel]
[GOAL]
case h.e'_2.h.e'_6.h
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Field K
p : S[X]
f : S →+* K
hf : Function.Injective ↑f
r s : S
hr : eval₂ f (↑f r / ↑f s) p = 0
hs : s ∈ nonZeroDivisors S
✝ : Nontrivial S
⊢ ↑f s ≠ 0
[PROOFSTEP]
exact map_ne_zero_of_mem_nonZeroDivisors _ hf hs


[GOAL]
R✝ : Type ?u.74090
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : Ring R
a b : R
⊢ a * -b = -(a * b)
[PROOFSTEP]
simp
[GOAL]
R : Type u_1
inst✝ : CommSemiring R
⊢ Nat.rawCast 0 = 0
[PROOFSTEP]
simp
[GOAL]
R : Type u_1
inst✝ : CommSemiring R
⊢ Nat.rawCast 1 = 1
[PROOFSTEP]
simp
[GOAL]
R✝ : Type ?u.76702
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : Ring R
⊢ Int.rawCast (Int.negOfNat 1) = -1
[PROOFSTEP]
simp [Int.negOfNat_eq]
[GOAL]
R✝ : Type ?u.78211
inst✝² : CommSemiring R✝
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : Nat.AtLeastTwo n
⊢ Int.rawCast (Int.negOfNat n) = -OfNat.ofNat n
[PROOFSTEP]
simp [Int.negOfNat_eq, OfNat.ofNat]
[GOAL]
R✝ : Type ?u.80333
inst✝¹ : CommSemiring R✝
n : ℤ
d : ℕ
R : Type u_1
inst✝ : DivisionRing R
⊢ Rat.rawCast n d = ↑n / ↑d
[PROOFSTEP]
simp