[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
⊢ 𝓝ˢ (diagonal α) = 𝓤 α
[PROOFSTEP]
refine' nhdsSet_diagonal_le_uniformity.antisymm _
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
⊢ 𝓤 α ≤ 𝓝ˢ (diagonal α)
[PROOFSTEP]
have :
  (𝓤 (α × α)).HasBasis (fun U => U ∈ 𝓤 α) fun U =>
    (fun p : (α × α) × α × α => ((p.1.1, p.2.1), p.1.2, p.2.2)) ⁻¹' U ×ˢ U :=
  by
  rw [uniformity_prod_eq_comap_prod]
  exact (𝓤 α).basis_sets.prod_self.comap _
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
⊢ HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U
[PROOFSTEP]
rw [uniformity_prod_eq_comap_prod]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
⊢ HasBasis (Filter.comap (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) (𝓤 α ×ˢ 𝓤 α)) (fun U => U ∈ 𝓤 α)
    fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U
[PROOFSTEP]
exact (𝓤 α).basis_sets.prod_self.comap _
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
this :
  HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U
⊢ 𝓤 α ≤ 𝓝ˢ (diagonal α)
[PROOFSTEP]
refine' (isCompact_diagonal.nhdsSet_basis_uniformity this).ge_iff.2 fun U hU => _
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
this :
  HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U
U : Set (α × α)
hU : U ∈ 𝓤 α
⊢ ⋃ (x : α × α) (_ : x ∈ diagonal α), ball x ((fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U) ∈
    𝓤 α
[PROOFSTEP]
exact mem_of_superset hU fun ⟨x, y⟩ hxy => mem_iUnion₂.2 ⟨(x, x), rfl, refl_mem_uniformity hU, hxy⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
⊢ u = u'
[PROOFSTEP]
refine uniformSpace_eq ?_
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
⊢ 𝓤 γ = 𝓤 γ
[PROOFSTEP]
have : @CompactSpace γ u.toTopologicalSpace := by rwa [h]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
⊢ CompactSpace γ
[PROOFSTEP]
rwa [h]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
this : CompactSpace γ
⊢ 𝓤 γ = 𝓤 γ
[PROOFSTEP]
have : @CompactSpace γ u'.toTopologicalSpace := by rwa [h']
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
this : CompactSpace γ
⊢ CompactSpace γ
[PROOFSTEP]
rwa [h']
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
t : TopologicalSpace γ
inst✝ : CompactSpace γ
u u' : UniformSpace γ
h : toTopologicalSpace = t
h' : toTopologicalSpace = t
this✝ : CompactSpace γ
this : CompactSpace γ
⊢ 𝓤 γ = 𝓤 γ
[PROOFSTEP]
rw [@compactSpace_uniformity _ u, compactSpace_uniformity, h, h']
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
⊢ (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)
[PROOFSTEP]
set 𝓝Δ :=
  𝓝ˢ
    (diagonal γ)
      -- The filter of neighborhoods of Δ
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
⊢ (Filter.lift' 𝓝Δ fun s => s ○ s) ≤ 𝓝Δ
[PROOFSTEP]
set F := 𝓝Δ.lift' fun s : Set (γ × γ) => s ○ s
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
⊢ F ≤ 𝓝Δ
[PROOFSTEP]
rw [le_iff_forall_inf_principal_compl]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
⊢ ∀ (V : Set (γ × γ)), V ∈ 𝓝Δ → F ⊓ 𝓟 Vᶜ = ⊥
[PROOFSTEP]
intro V V_in
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
⊢ F ⊓ 𝓟 Vᶜ = ⊥
[PROOFSTEP]
by_contra H
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
⊢ False
[PROOFSTEP]
haveI : NeBot (F ⊓ 𝓟 Vᶜ) :=
  ⟨H⟩
    -- Hence compactness would give us a cluster point (x, y) for F ⊓ 𝓟 Vᶜ
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this : NeBot (F ⊓ 𝓟 Vᶜ)
⊢ False
[PROOFSTEP]
obtain ⟨⟨x, y⟩, hxy⟩ : ∃ p : γ × γ, ClusterPt p (F ⊓ 𝓟 Vᶜ) :=
  cluster_point_of_compact
    _
      -- In particular (x, y) is a cluster point of 𝓟 Vᶜ, hence is not in the interior of V,
          -- and a fortiori not in Δ, so x ≠ y
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
⊢ False
[PROOFSTEP]
have clV : ClusterPt (x, y) (𝓟 <| Vᶜ) := hxy.of_inf_right
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
⊢ False
[PROOFSTEP]
have : (x, y) ∉ interior V :=
  by
  have : (x, y) ∈ closure Vᶜ := by rwa [mem_closure_iff_clusterPt]
  rwa [closure_compl] at this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
⊢ ¬(x, y) ∈ interior V
[PROOFSTEP]
have : (x, y) ∈ closure Vᶜ := by rwa [mem_closure_iff_clusterPt]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
⊢ (x, y) ∈ closure Vᶜ
[PROOFSTEP]
rwa [mem_closure_iff_clusterPt]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this : (x, y) ∈ closure Vᶜ
⊢ ¬(x, y) ∈ interior V
[PROOFSTEP]
rwa [closure_compl] at this
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this : ¬(x, y) ∈ interior V
⊢ False
[PROOFSTEP]
have diag_subset : diagonal γ ⊆ interior V := subset_interior_iff_mem_nhdsSet.2 V_in
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
⊢ False
[PROOFSTEP]
have x_ne_y : x ≠ y := mt (@diag_subset (x, y)) this
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
⊢ False
[PROOFSTEP]
haveI : NormalSpace γ := normalOfCompactT2
[GOAL]
case intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
⊢ False
[PROOFSTEP]
obtain ⟨U₁, _, V₁, V₁_in, U₂, _, V₂, V₂_in, V₁_cl, V₂_cl, U₁_op, U₂_op, VU₁, VU₂, hU₁₂⟩ := disjoint_nested_nhds x_ne_y
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
⊢ False
[PROOFSTEP]
let U₃ := (V₁ ∪ V₂)ᶜ
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
⊢ False
[PROOFSTEP]
have U₃_op : IsOpen U₃ := (V₁_cl.union V₂_cl).isOpen_compl
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
⊢ False
[PROOFSTEP]
let W := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
⊢ False
[PROOFSTEP]
have W_in : W ∈ 𝓝Δ := by
  rw [mem_nhdsSet_iff_forall]
  rintro ⟨z, z'⟩ (rfl : z = z')
  refine' IsOpen.mem_nhds _ _
  · apply_rules [IsOpen.union, IsOpen.prod]
  · simp only [mem_union, mem_prod, and_self_iff]
    exact (_root_.em _).imp_left fun h => union_subset_union VU₁ VU₂ h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
⊢ W ∈ 𝓝Δ
[PROOFSTEP]
rw [mem_nhdsSet_iff_forall]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
⊢ ∀ (x : γ × γ), x ∈ diagonal γ → W ∈ 𝓝 x
[PROOFSTEP]
rintro ⟨z, z'⟩ (rfl : z = z')
[GOAL]
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
z : γ
⊢ W ∈ 𝓝 (z, z)
[PROOFSTEP]
refine' IsOpen.mem_nhds _ _
[GOAL]
case mk.refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
z : γ
⊢ IsOpen W
[PROOFSTEP]
apply_rules [IsOpen.union, IsOpen.prod]
[GOAL]
case mk.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
z : γ
⊢ (z, z) ∈ W
[PROOFSTEP]
simp only [mem_union, mem_prod, and_self_iff]
[GOAL]
case mk.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
z : γ
⊢ (z ∈ U₁ ∨ z ∈ U₂) ∨ z ∈ (V₁ ∪ V₂)ᶜ
[PROOFSTEP]
exact (_root_.em _).imp_left fun h => union_subset_union VU₁ VU₂ h
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
⊢ False
[PROOFSTEP]
have : W ○ W ∈ F := @mem_lift' _ _ _ (fun s => s ○ s) _ W_in
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝² : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝¹ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this✝ : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
this : W ○ W ∈ F
⊢ False
[PROOFSTEP]
have hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y) := prod_mem_nhds V₁_in V₂_in
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝² : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝¹ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this✝ : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
this : W ○ W ∈ F
hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)
⊢ False
[PROOFSTEP]
obtain ⟨⟨u, v⟩, ⟨u_in, v_in⟩, w, huw, hwv⟩ := clusterPt_iff.mp hxy.of_inf_left hV₁₂ this
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝² : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝¹ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this✝ : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
this : W ○ W ∈ F
hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)
u v : γ
u_in : (u, v).fst ∈ V₁
v_in : (u, v).snd ∈ V₂
w : γ
huw : ((u, v).fst, w) ∈ W
hwv : (w, (u, v).snd) ∈ W
⊢ False
[PROOFSTEP]
have uw_in : (u, w) ∈ U₁ ×ˢ U₁ :=
  (huw.resolve_right fun h => h.1 <| Or.inl u_in).resolve_right fun h =>
    hU₁₂.le_bot
      ⟨VU₁ u_in, h.1⟩
        -- Similarly, because v ∈ V₂, (w ,v) ∈ W forces (w, v) ∈ U₂ ×ˢ U₂.
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝² : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝¹ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this✝ : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
this : W ○ W ∈ F
hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)
u v : γ
u_in : (u, v).fst ∈ V₁
v_in : (u, v).snd ∈ V₂
w : γ
huw : ((u, v).fst, w) ∈ W
hwv : (w, (u, v).snd) ∈ W
uw_in : (u, w) ∈ U₁ ×ˢ U₁
⊢ False
[PROOFSTEP]
have wv_in : (w, v) ∈ U₂ ×ˢ U₂ :=
  (hwv.resolve_right fun h => h.2 <| Or.inr v_in).resolve_left fun h =>
    hU₁₂.le_bot
      ⟨h.2, VU₂ v_in⟩
        -- Hence w ∈ U₁ ∩ U₂ which is empty.
            -- So we have a contradiction
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)
F : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s
V : Set (γ × γ)
V_in : V ∈ 𝓝Δ
H : ¬F ⊓ 𝓟 Vᶜ = ⊥
this✝² : NeBot (F ⊓ 𝓟 Vᶜ)
x y : γ
hxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)
clV : ClusterPt (x, y) (𝓟 Vᶜ)
this✝¹ : ¬(x, y) ∈ interior V
diag_subset : diagonal γ ⊆ interior V
x_ne_y : x ≠ y
this✝ : NormalSpace γ
U₁ : Set γ
left✝¹ : U₁ ∈ 𝓝 x
V₁ : Set γ
V₁_in : V₁ ∈ 𝓝 x
U₂ : Set γ
left✝ : U₂ ∈ 𝓝 y
V₂ : Set γ
V₂_in : V₂ ∈ 𝓝 y
V₁_cl : IsClosed V₁
V₂_cl : IsClosed V₂
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
VU₁ : V₁ ⊆ U₁
VU₂ : V₂ ⊆ U₂
hU₁₂ : Disjoint U₁ U₂
U₃ : Set γ := (V₁ ∪ V₂)ᶜ
U₃_op : IsOpen U₃
W : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
W_in : W ∈ 𝓝Δ
this : W ○ W ∈ F
hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)
u v : γ
u_in : (u, v).fst ∈ V₁
v_in : (u, v).snd ∈ V₂
w : γ
huw : ((u, v).fst, w) ∈ W
hwv : (w, (u, v).snd) ∈ W
uw_in : (u, w) ∈ U₁ ×ˢ U₁
wv_in : (w, v) ∈ U₂ ×ˢ U₂
⊢ False
[PROOFSTEP]
exact hU₁₂.le_bot ⟨uw_in.2, wv_in.1⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
⊢ ∀ (s : Set γ),
    IsOpen s ↔
      ∀ (x : γ),
        x ∈ s →
          {p | p.fst = x → p.snd ∈ s} ∈
            { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),
                symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),
                comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity
[PROOFSTEP]
suffices ∀ x : γ, Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x
  by
  intro s
  simp_rw [isOpen_iff_mem_nhds, ← mem_comap_prod_mk, this]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
this : ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x
⊢ ∀ (s : Set γ),
    IsOpen s ↔
      ∀ (x : γ),
        x ∈ s →
          {p | p.fst = x → p.snd ∈ s} ∈
            { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),
                symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),
                comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity
[PROOFSTEP]
intro s
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
this : ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x
s : Set γ
⊢ IsOpen s ↔
    ∀ (x : γ),
      x ∈ s →
        {p | p.fst = x → p.snd ∈ s} ∈
          { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),
              symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),
              comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity
[PROOFSTEP]
simp_rw [isOpen_iff_mem_nhds, ← mem_comap_prod_mk, this]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
⊢ ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x
[PROOFSTEP]
intro x
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x : γ
⊢ Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x
[PROOFSTEP]
simp_rw [nhdsSet_diagonal, comap_iSup, nhds_prod_eq, comap_prod, (· ∘ ·), comap_id']
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x : γ
⊢ ⨆ (i : γ), Filter.comap (fun x_1 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x
[PROOFSTEP]
rw [iSup_split_single _ x, comap_const_of_mem fun V => mem_of_mem_nhds]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x : γ
⊢ ⊤ ⊓ 𝓝 x ⊔ ⨆ (i : γ) (_ : i ≠ x), Filter.comap (fun x_2 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x
[PROOFSTEP]
suffices ∀ (y) (_ : y ≠ x), comap (fun _ : γ => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x by simpa
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x : γ
this : ∀ (y : γ), y ≠ x → Filter.comap (fun x_2 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x
⊢ ⊤ ⊓ 𝓝 x ⊔ ⨆ (i : γ) (_ : i ≠ x), Filter.comap (fun x_2 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x
[PROOFSTEP]
simpa
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x : γ
⊢ ∀ (y : γ), y ≠ x → Filter.comap (fun x_2 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x
[PROOFSTEP]
intro y hxy
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : CompactSpace γ
inst✝ : T2Space γ
x y : γ
hxy : y ≠ x
⊢ Filter.comap (fun x_1 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x
[PROOFSTEP]
simp [comap_const_of_not_mem (compl_singleton_mem_nhds hxy) (Classical.not_not.2 rfl)]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
f : α → β
h : Continuous f
⊢ map (Prod.map f f) (𝓤 α) = map (Prod.map f f) (𝓝ˢ (diagonal α))
[PROOFSTEP]
rw [nhdsSet_diagonal_eq_uniformity]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set α
f : α → β
hs : IsCompact s
hf : ContinuousOn f s
⊢ UniformContinuousOn f s
[PROOFSTEP]
rw [uniformContinuousOn_iff_restrict]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set α
f : α → β
hs : IsCompact s
hf : ContinuousOn f s
⊢ UniformContinuous (restrict s f)
[PROOFSTEP]
rw [isCompact_iff_compactSpace] at hs
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set α
f : α → β
hs : CompactSpace ↑s
hf : ContinuousOn f s
⊢ UniformContinuous (restrict s f)
[PROOFSTEP]
rw [continuousOn_iff_continuous_restrict] at hf
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
s : Set α
f : α → β
hs : CompactSpace ↑s
hf : Continuous (restrict s f)
⊢ UniformContinuous (restrict s f)
[PROOFSTEP]
exact CompactSpace.uniformContinuous_of_continuous hf
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
obtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
choose U hU T hT hb using fun a ha =>
  exists_mem_nhds_ball_subset_of_mem_nhds ((hf a ha).preimage_mem_nhds <| mem_nhds_left _ ht)
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
obtain ⟨fs, hsU⟩ := hs.elim_nhds_subcover' U hU
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
apply mem_of_superset ((biInter_finset_mem fs).2 fun a _ => hT a a.2)
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
⊢ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s) ⊆ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
rintro ⟨a₁, a₂⟩ h h₁
[GOAL]
case intro.intro.intro.intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
a₁ a₂ : α
h : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)
h₁ : (a₁, a₂).fst ∈ s
⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ r
[PROOFSTEP]
obtain ⟨a, ha, haU⟩ := Set.mem_iUnion₂.1 (hsU h₁)
[GOAL]
case intro.intro.intro.intro.mk.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
a₁ a₂ : α
h : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)
h₁ : (a₁, a₂).fst ∈ s
a : ↑s
ha : a ∈ fs
haU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)
⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ r
[PROOFSTEP]
apply htr
[GOAL]
case intro.intro.intro.intro.mk.intro.intro.a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
a₁ a₂ : α
h : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)
h₁ : (a₁, a₂).fst ∈ s
a : ↑s
ha : a ∈ fs
haU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)
⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ t ○ t
[PROOFSTEP]
refine' ⟨f a, htsymm.mk_mem_comm.1 (hb _ _ _ haU _), hb _ _ _ haU _⟩
[GOAL]
case intro.intro.intro.intro.mk.intro.intro.a.refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
a₁ a₂ : α
h : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)
h₁ : (a₁, a₂).fst ∈ s
a : ↑s
ha : a ∈ fs
haU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)
⊢ (a₁, a₂).fst ∈ ball (a₁, a₂).fst (T ↑a (_ : ↑a ∈ s))
case intro.intro.intro.intro.mk.intro.intro.a.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
r : Set (β × β)
s : Set α
hs : IsCompact s
f : α → β
hf : ∀ (a : α), a ∈ s → ContinuousAt f a
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
U : (a : α) → a ∈ s → Set α
hU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a
T : (a : α) → a ∈ s → Set (α × α)
hT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α
hb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}
fs : Finset ↑s
hsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)
a₁ a₂ : α
h : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)
h₁ : (a₁, a₂).fst ∈ s
a : ↑s
ha : a ∈ fs
haU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)
⊢ (a₁, a₂).snd ∈ ball (a₁, a₂).fst (T ↑a (_ : ↑a ∈ s))
[PROOFSTEP]
exacts [mem_ball_self _ (hT a a.2), mem_iInter₂.1 h a ha]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
obtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
obtain ⟨s, hs, hst⟩ := mem_cocompact.1 (hx <| mem_nhds_left _ ht)
[GOAL]
case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α
[PROOFSTEP]
apply
  mem_of_superset
    (symmetrize_mem_uniformity <|
      (hs.uniformContinuousAt_of_continuousAt f fun _ _ => h_cont.continuousAt) <| symmetrize_mem_uniformity hr)
[GOAL]
case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
⊢ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r} ⊆ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
rintro ⟨b₁, b₂⟩ h
[GOAL]
case intro.intro.intro.intro.intro.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
by_cases h₁ : b₁ ∈ s
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
h₁ : b₁ ∈ s
⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
exact (h.1 h₁).1
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
h₁ : ¬b₁ ∈ s
⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
by_cases h₂ : b₂ ∈ s
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
h₁ : ¬b₁ ∈ s
h₂ : b₂ ∈ s
⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
exact (h.2 h₂).2
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
h₁ : ¬b₁ ∈ s
h₂ : ¬b₂ ∈ s
⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}
[PROOFSTEP]
apply htr
[GOAL]
case neg.a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
f : α → β
x : β
h_cont : Continuous f
hx : Tendsto f (cocompact α) (𝓝 x)
r : Set (β × β)
hr : r ∈ 𝓤 β
t : Set (β × β)
ht : t ∈ 𝓤 β
htsymm : SymmetricRel t
htr : t ○ t ⊆ r
s : Set α
hs : IsCompact s
hst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}
b₁ b₂ : α
h : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}
h₁ : ¬b₁ ∈ s
h₂ : ¬b₂ ∈ s
⊢ (f (b₁, b₂).fst, f (b₁, b₂).snd) ∈ t ○ t
[PROOFSTEP]
exact ⟨x, htsymm.mk_mem_comm.1 (hst h₁), hst h₂⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
⊢ Tendsto f (cocompact α) (𝓝 1)
[PROOFSTEP]
intro N hN
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
⊢ N ∈ map f (cocompact α)
[PROOFSTEP]
rw [mem_map, mem_cocompact']
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
⊢ ∃ t, IsCompact t ∧ (f ⁻¹' N)ᶜ ⊆ t
[PROOFSTEP]
refine' ⟨mulTSupport f, h.isCompact, _⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
⊢ (f ⁻¹' N)ᶜ ⊆ mulTSupport f
[PROOFSTEP]
rw [compl_subset_comm]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
⊢ (mulTSupport f)ᶜ ⊆ f ⁻¹' N
[PROOFSTEP]
intro v hv
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
v : α
hv : v ∈ (mulTSupport f)ᶜ
⊢ v ∈ f ⁻¹' N
[PROOFSTEP]
rw [mem_preimage, image_eq_one_of_nmem_mulTSupport hv]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
f : α → γ
inst✝¹ : TopologicalSpace γ
inst✝ : One γ
h : HasCompactMulSupport f
N : Set γ
hN : N ∈ 𝓝 1
v : α
hv : v ∈ (mulTSupport f)ᶜ
⊢ 1 ∈ N
[PROOFSTEP]
exact mem_of_mem_nhds hN
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
⊢ TendstoUniformly f (f x) (𝓝 x)
[PROOFSTEP]
rcases LocallyCompactSpace.local_compact_nhds _ _ hxU with ⟨K, hxK, hKU, hK⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
K : Set α
hxK : K ∈ 𝓝 x
hKU : K ⊆ U
hK : IsCompact K
⊢ TendstoUniformly f (f x) (𝓝 x)
[PROOFSTEP]
have : UniformContinuousOn (↿f) (K ×ˢ univ) :=
  IsCompact.uniformContinuousOn_of_continuous (hK.prod isCompact_univ) (h.mono <| prod_mono hKU Subset.rfl)
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
K : Set α
hxK : K ∈ 𝓝 x
hKU : K ⊆ U
hK : IsCompact K
this : UniformContinuousOn (↿f) (K ×ˢ univ)
⊢ TendstoUniformly f (f x) (𝓝 x)
[PROOFSTEP]
exact this.tendstoUniformly hxK
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Equicontinuous F
⊢ UniformEquicontinuous F
[PROOFSTEP]
rw [equicontinuous_iff_continuous] at h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (↑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformEquicontinuous F
[PROOFSTEP]
rw [uniformEquicontinuous_iff_uniformContinuous]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (↑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformContinuous (↑UniformFun.ofFun ∘ Function.swap F)
[PROOFSTEP]
exact CompactSpace.uniformContinuous_of_continuous h


[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
⊢ (g₁ * g₂).support ⊆ g₁.support ∩ g₂.support
[PROOFSTEP]
intro a h
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : a ∈ (g₁ * g₂).support
⊢ a ∈ g₁.support ∩ g₂.support
[PROOFSTEP]
simp only [mul_apply, mem_support_iff] at h
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
⊢ a ∈ g₁.support ∩ g₂.support
[PROOFSTEP]
simp only [mem_support_iff, mem_inter, Ne.def]
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
⊢ ¬↑g₁ a = 0 ∧ ¬↑g₂ a = 0
[PROOFSTEP]
rw [← not_or]
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
⊢ ¬(↑g₁ a = 0 ∨ ↑g₂ a = 0)
[PROOFSTEP]
intro w
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₁ a = 0 ∨ ↑g₂ a = 0
⊢ False
[PROOFSTEP]
apply h
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₁ a = 0 ∨ ↑g₂ a = 0
⊢ ↑g₁ a * ↑g₂ a = 0
[PROOFSTEP]
cases' w with w w
[GOAL]
case inl
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₁ a = 0
⊢ ↑g₁ a * ↑g₂ a = 0
[PROOFSTEP]
rw [w]
[GOAL]
case inl
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₁ a = 0
⊢ 0 * ↑g₂ a = 0
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₂ a = 0
⊢ ↑g₁ a * ↑g₂ a = 0
[PROOFSTEP]
rw [w]
[GOAL]
case inr
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝¹ : MulZeroClass β
inst✝ : DecidableEq α
g₁ g₂ : α →₀ β
a : α
h : ↑g₁ a * ↑g₂ a ≠ 0
w : ↑g₂ a = 0
⊢ ↑g₁ a * 0 = 0
[PROOFSTEP]
simp
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝ : Semiring β
f : α → β
g : α →₀ β
⊢ Set.Finite (Function.support fun a => f a • ↑g a)
[PROOFSTEP]
apply Set.Finite.subset g.finite_support
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝ : Semiring β
f : α → β
g : α →₀ β
⊢ (Function.support fun a => f a • ↑g a) ⊆ Function.support ↑g
[PROOFSTEP]
simp only [Function.support_subset_iff, Finsupp.mem_support_iff, Ne.def, Finsupp.fun_support_eq, Finset.mem_coe]
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝ : Semiring β
f : α → β
g : α →₀ β
⊢ ∀ (x : α), ¬f x • ↑g x = 0 → ¬↑g x = 0
[PROOFSTEP]
intro x hx h
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝ : Semiring β
f : α → β
g : α →₀ β
x : α
hx : ¬f x • ↑g x = 0
h : ↑g x = 0
⊢ False
[PROOFSTEP]
apply hx
[GOAL]
α : Type u₁
β : Type u₂
γ : Type u₃
δ : Type u₄
ι : Type u₅
inst✝ : Semiring β
f : α → β
g : α →₀ β
x : α
hx : ¬f x • ↑g x = 0
h : ↑g x = 0
⊢ f x • ↑g x = 0
[PROOFSTEP]
rw [h, smul_zero]


[GOAL]
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)
[PROOFSTEP]
rcases s.eq_empty_or_nonempty with (rfl | hs)
[GOAL]
case inl
ι : Type u
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ ∅ → 0 ≤ f a
⊢ (∑ x in ∅, f x) ^ (n + 1) / ↑(card ∅) ^ n ≤ ∑ x in ∅, f x ^ (n + 1)
[PROOFSTEP]
simp_rw [Finset.sum_empty, zero_pow' _ (Nat.succ_ne_zero n), zero_div]
[GOAL]
case inl
ι : Type u
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ ∅ → 0 ≤ f a
⊢ 0 ≤ 0
[PROOFSTEP]
rfl
[GOAL]
case inr
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)
[PROOFSTEP]
have hs0 : 0 < (s.card : ℝ) := Nat.cast_pos.2 hs.card_pos
[GOAL]
case inr
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)
[PROOFSTEP]
suffices (∑ x in s, f x / s.card) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / s.card by
  rwa [← Finset.sum_div, ← Finset.sum_div, div_pow, pow_succ' (s.card : ℝ), ← div_div, div_le_iff hs0, div_mul,
    div_self hs0.ne', div_one] at this
[GOAL]
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
this : (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)
⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)
[PROOFSTEP]
rwa [← Finset.sum_div, ← Finset.sum_div, div_pow, pow_succ' (s.card : ℝ), ← div_div, div_le_iff hs0, div_mul,
  div_self hs0.ne', div_one] at this
[GOAL]
case inr
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
⊢ (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)
[PROOFSTEP]
have :=
  @ConvexOn.map_sum_le ℝ ℝ ℝ ι _ _ _ _ _ _ (Set.Ici 0) (fun x => x ^ (n + 1)) s (fun _ => 1 / s.card) ((↑) ∘ f)
    (convexOn_pow (n + 1)) ?_ ?_ fun i hi => Set.mem_Ici.2 (hf i hi)
[GOAL]
case inr.refine_3
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
this :
  (fun x => x ^ (n + 1)) (∑ i in s, (fun x => 1 / ↑(card s)) i • ((fun x => x) ∘ f) i) ≤
    ∑ i in s, (fun x => 1 / ↑(card s)) i • (fun x => x ^ (n + 1)) (((fun x => x) ∘ f) i)
⊢ (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)
[PROOFSTEP]
simpa only [inv_mul_eq_div, one_div, Algebra.id.smul_eq_mul] using this
[GOAL]
case inr.refine_1
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
⊢ ∀ (i : ι), i ∈ s → 0 ≤ (fun x => 1 / ↑(card s)) i
[PROOFSTEP]
simp only [one_div, inv_nonneg, Nat.cast_nonneg, imp_true_iff]
[GOAL]
case inr.refine_2
ι : Type u
s : Finset ι
f : ι → ℝ
n : ℕ
hf : ∀ (a : ι), a ∈ s → 0 ≤ f a
hs : Finset.Nonempty s
hs0 : 0 < ↑(card s)
⊢ ∑ i in s, (fun x => 1 / ↑(card s)) i = 1
[PROOFSTEP]
simpa only [one_div, Finset.sum_const, nsmul_eq_mul] using mul_inv_cancel hs0.ne'
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
have : 0 < p := by positivity
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
⊢ 0 < p
[PROOFSTEP]
positivity
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
rw [← rpow_le_rpow_iff _ _ this, ← rpow_mul, one_div_mul_cancel (ne_of_gt this), rpow_one]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i ^ p
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
exact rpow_arith_mean_le_arith_mean_rpow s w z hw hw' hz hp
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i ^ p
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
all_goals
  apply_rules [sum_nonneg, rpow_nonneg_of_nonneg]
  intro i hi
  apply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
apply_rules [sum_nonneg, rpow_nonneg_of_nonneg]
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i ^ p
[PROOFSTEP]
intro i hi
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
i : ι
hi : i ∈ s
⊢ 0 ≤ w i * z i ^ p
[PROOFSTEP]
apply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ ∑ i in s, w i * z i
[PROOFSTEP]
apply_rules [sum_nonneg, rpow_nonneg_of_nonneg]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i
[PROOFSTEP]
intro i hi
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
i : ι
hi : i ∈ s
⊢ 0 ≤ w i * z i
[PROOFSTEP]
apply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
apply_rules [sum_nonneg, rpow_nonneg_of_nonneg]
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i ^ p
[PROOFSTEP]
intro i hi
[GOAL]
case hx
ι : Type u
s : Finset ι
w z : ι → ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
p : ℝ
hp : 1 ≤ p
this : 0 < p
hw'_symm : 1 = ∑ i in s, w i
i : ι
hi : i ∈ s
⊢ 0 ≤ w i * z i ^ p
[PROOFSTEP]
apply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
n : ℕ
⊢ (∑ i in s, w i * z i) ^ n ≤ ∑ i in s, w i * z i ^ n
[PROOFSTEP]
exact_mod_cast
  Real.pow_arith_mean_le_arith_mean_pow s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw')
    (fun i _ => (z i).coe_nonneg) n
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
n : ℕ
⊢ ∑ i in s, ↑(w i) = 1
[PROOFSTEP]
exact_mod_cast hw'
[GOAL]
ι : Type u
s : Finset ι
f : ι → ℝ≥0
n : ℕ
⊢ ↑((∑ x in s, f x) ^ (n + 1)) / ↑(card s) ^ n ≤ ↑(∑ x in s, f x ^ (n + 1))
[PROOFSTEP]
simpa only [← NNReal.coe_le_coe, NNReal.coe_sum, Nonneg.coe_div, NNReal.coe_pow] using
  @Real.pow_sum_div_card_le_sum_pow ι s (((↑) : ℝ≥0 → ℝ) ∘ f) n fun _ _ => NNReal.coe_nonneg _
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
exact_mod_cast
  Real.rpow_arith_mean_le_arith_mean_rpow s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw')
    (fun i _ => (z i).coe_nonneg) hp
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i in s, ↑(w i) = 1
[PROOFSTEP]
exact_mod_cast hw'
[GOAL]
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
[PROOFSTEP]
have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp
[GOAL]
case refine_2
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
h :
  (∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i) ^ p ≤
    ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i ^ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
[PROOFSTEP]
simpa [Fin.sum_univ_succ] using h
[GOAL]
case refine_1
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i = 1
[PROOFSTEP]
simp [hw', Fin.sum_univ_succ]
[GOAL]
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)
[PROOFSTEP]
rcases eq_or_lt_of_le hp with (rfl | h'p)
[GOAL]
case inl
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
hp : 1 ≤ 1
⊢ (z₁ + z₂) ^ 1 ≤ 2 ^ (1 - 1) * (z₁ ^ 1 + z₂ ^ 1)
[PROOFSTEP]
simp only [rpow_one, sub_self, rpow_zero, one_mul]
[GOAL]
case inl
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
hp : 1 ≤ 1
⊢ z₁ + z₂ ≤ z₁ + z₂
[PROOFSTEP]
rfl
[GOAL]
case inr
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)
[PROOFSTEP]
convert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (add_halves 1) hp using 1
[GOAL]
case h.e'_3
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ (z₁ + z₂) ^ p = (1 / 2 * (2 * z₁) + 1 / 2 * (2 * z₂)) ^ p
[PROOFSTEP]
simp only [one_div, inv_mul_cancel_left₀, Ne.def, mul_eq_zero, two_ne_zero, one_ne_zero, not_false_iff]
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p
[PROOFSTEP]
have A : p - 1 ≠ 0 := ne_of_gt (sub_pos.2 h'p)
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
A : p - 1 ≠ 0
⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p
[PROOFSTEP]
simp only [mul_rpow, rpow_sub' _ A, div_eq_inv_mul, rpow_one, mul_one]
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
A : p - 1 ≠ 0
⊢ 2⁻¹ * 2 ^ p * (z₁ ^ p + z₂ ^ p) = 2⁻¹ * (2 ^ p * z₁ ^ p) + 2⁻¹ * (2 ^ p * z₂ ^ p)
[PROOFSTEP]
ring
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)
[PROOFSTEP]
exact_mod_cast
  Real.arith_mean_le_rpow_mean s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw') (fun i _ => (z i).coe_nonneg)
    hp
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i in s, ↑(w i) = 1
[PROOFSTEP]
exact_mod_cast hw'
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hab : a + b ≤ 1
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ 1
[PROOFSTEP]
have h_le_one : ∀ x : ℝ≥0, x ≤ 1 → x ^ p ≤ x := fun x hx => rpow_le_self_of_le_one hx hp1
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hab : a + b ≤ 1
hp1 : 1 ≤ p
h_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x
⊢ a ^ p + b ^ p ≤ 1
[PROOFSTEP]
have ha : a ≤ 1 := (self_le_add_right a b).trans hab
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hab : a + b ≤ 1
hp1 : 1 ≤ p
h_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x
ha : a ≤ 1
⊢ a ^ p + b ^ p ≤ 1
[PROOFSTEP]
have hb : b ≤ 1 := (self_le_add_left b a).trans hab
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hab : a + b ≤ 1
hp1 : 1 ≤ p
h_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x
ha : a ≤ 1
hb : b ≤ 1
⊢ a ^ p + b ^ p ≤ 1
[PROOFSTEP]
exact (add_le_add (h_le_one a ha) (h_le_one b hb)).trans hab
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have hp_pos : 0 < p := by positivity
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ 0 < p
[PROOFSTEP]
positivity
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
by_cases h_zero : a + b = 0
[GOAL]
case pos
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : a + b = 0
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
simp [add_eq_zero_iff.mp h_zero, hp_pos.ne']
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have h_nonzero : ¬(a = 0 ∧ b = 0) := by rwa [add_eq_zero_iff] at h_zero
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
⊢ ¬(a = 0 ∧ b = 0)
[PROOFSTEP]
rwa [add_eq_zero_iff] at h_zero
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have h_add : a / (a + b) + b / (a + b) = 1 := by rw [div_add_div_same, div_self h_zero]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
⊢ a / (a + b) + b / (a + b) = 1
[PROOFSTEP]
rw [div_add_div_same, div_self h_zero]
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have h := add_rpow_le_one_of_add_le_one (a / (a + b)) (b / (a + b)) h_add.le hp1
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : (a / (a + b)) ^ p + (b / (a + b)) ^ p ≤ 1
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
rw [div_rpow a (a + b), div_rpow b (a + b)] at h
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have hab_0 : (a + b) ^ p ≠ 0 := by simp [hp_pos, h_nonzero]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
⊢ (a + b) ^ p ≠ 0
[PROOFSTEP]
simp [hp_pos, h_nonzero]
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
hab_0 : (a + b) ^ p ≠ 0
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have hab_0' : 0 < (a + b) ^ p := zero_lt_iff.mpr hab_0
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
hab_0 : (a + b) ^ p ≠ 0
hab_0' : 0 < (a + b) ^ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have h_mul : (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p :=
  by
  nth_rw 4 [← mul_one ((a + b) ^ p)]
  exact (mul_le_mul_left hab_0').mpr h
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
hab_0 : (a + b) ^ p ≠ 0
hab_0' : 0 < (a + b) ^ p
⊢ (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p
[PROOFSTEP]
nth_rw 4 [← mul_one ((a + b) ^ p)]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
hab_0 : (a + b) ^ p ≠ 0
hab_0' : 0 < (a + b) ^ p
⊢ (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p * 1
[PROOFSTEP]
exact (mul_le_mul_left hab_0').mpr h
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
hp_pos : 0 < p
h_zero : ¬a + b = 0
h_nonzero : ¬(a = 0 ∧ b = 0)
h_add : a / (a + b) + b / (a + b) = 1
h : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1
hab_0 : (a + b) ^ p ≠ 0
hab_0' : 0 < (a + b) ^ p
h_mul : (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
rwa [div_eq_mul_inv, div_eq_mul_inv, mul_add, mul_comm (a ^ p), mul_comm (b ^ p), ← mul_assoc, ← mul_assoc,
  mul_inv_cancel hab_0, one_mul, one_mul] at h_mul
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ (a ^ p + b ^ p) ^ (1 / p) ≤ a + b
[PROOFSTEP]
rw [← @NNReal.le_rpow_one_div_iff _ _ (1 / p) (by simp [lt_of_lt_of_le zero_lt_one hp1])]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ 0 < 1 / p
[PROOFSTEP]
simp [lt_of_lt_of_le zero_lt_one hp1]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ (1 / (1 / p))
[PROOFSTEP]
rw [one_div_one_div]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
exact add_rpow_le_rpow_add _ _ hp1
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
have h_rpow : ∀ a : ℝ≥0, a ^ q = (a ^ p) ^ (q / p) := fun a => by
  rw [← NNReal.rpow_mul, div_eq_inv_mul, ← mul_assoc, _root_.mul_inv_cancel hp_pos.ne.symm, one_mul]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a✝ b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
a : ℝ≥0
⊢ a ^ q = (a ^ p) ^ (q / p)
[PROOFSTEP]
rw [← NNReal.rpow_mul, div_eq_inv_mul, ← mul_assoc, _root_.mul_inv_cancel hp_pos.ne.symm, one_mul]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
have h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p :=
  by
  refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _
  rwa [one_le_div hp_pos]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
[PROOFSTEP]
refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)
⊢ 1 ≤ q / p
[PROOFSTEP]
rwa [one_le_div hp_pos]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
rw [h_rpow a, h_rpow b, NNReal.le_rpow_one_div_iff hp_pos, ← NNReal.rpow_mul, mul_comm, mul_one_div]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p
[PROOFSTEP]
rwa [one_div_div] at h_rpow_add_rpow_le_add
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rcases hp.eq_or_lt with (rfl | hp_pos)
[GOAL]
case inl
ι : Type u
s : Finset ι
a b : ℝ≥0
hp : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ (a + b) ^ 0 ≤ a ^ 0 + b ^ 0
[PROOFSTEP]
simp
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
have h := rpow_add_rpow_le a b hp_pos hp1
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [one_div_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
repeat' rw [NNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [NNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a ^ 1 + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [NNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [NNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [NNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
exact (NNReal.le_rpow_one_div_iff hp_pos).mp h
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
have hp_pos : 0 < p
[GOAL]
case hp_pos
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
⊢ 0 < p
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
positivity
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
have hp_nonneg : 0 ≤ p
[GOAL]
case hp_nonneg
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
⊢ 0 ≤ p
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
positivity
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
have hp_not_neg : ¬p < 0 := by simp [hp_nonneg]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
⊢ ¬p < 0
[PROOFSTEP]
simp [hp_nonneg]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
have h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤) := by
  simp [ENNReal.mul_eq_top, hp_pos, hp_nonneg, hp_not_neg]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
⊢ ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
[PROOFSTEP]
simp [ENNReal.mul_eq_top, hp_pos, hp_nonneg, hp_not_neg]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p
[PROOFSTEP]
refine' le_of_top_imp_top_of_toNNReal_le _ _
[GOAL]
case refine'_1
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
⊢ (∑ i in s, w i * z i) ^ p = ⊤ → ∑ i in s, w i * z i ^ p = ⊤
[PROOFSTEP]
rw [rpow_eq_top_iff, sum_eq_top_iff, sum_eq_top_iff]
[GOAL]
case refine'_1
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
⊢ ∑ i in s, w i * z i = 0 ∧ p < 0 ∨ (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p → ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤
[PROOFSTEP]
intro h
[GOAL]
case refine'_1
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h : ∑ i in s, w i * z i = 0 ∧ p < 0 ∨ (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p
⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤
[PROOFSTEP]
simp only [and_false_iff, hp_not_neg, false_or_iff] at h
[GOAL]
case refine'_1
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p
⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤
[PROOFSTEP]
rcases h.left with ⟨a, H, ha⟩
[GOAL]
case refine'_1.intro.intro
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p
a : ι
H : a ∈ s
ha : w a * z a = ⊤
⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤
[PROOFSTEP]
use a, H
[GOAL]
case right
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p
a : ι
H : a ∈ s
ha : w a * z a = ⊤
⊢ w a * z a ^ p = ⊤
[PROOFSTEP]
rwa [← h_top_iff_rpow_top a H]
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
⊢ (∑ i in s, w i * z i) ^ p ≠ ⊤ →
    ∑ i in s, w i * z i ^ p ≠ ⊤ →
      ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)
[PROOFSTEP]
intro h_top_rpow_sum
  _
    -- show hypotheses needed to put the `.toNNReal` inside the sums.
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)
[PROOFSTEP]
have h_top : ∀ a : ι, a ∈ s → w a * z a ≠ ⊤ :=
  haveI h_top_sum : ∑ i : ι in s, w i * z i ≠ ⊤ := by
    intro h
    rw [h, top_rpow_of_pos hp_pos] at h_top_rpow_sum
    exact h_top_rpow_sum rfl
  fun a ha => (lt_top_of_sum_ne_top h_top_sum ha).ne
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
⊢ ∑ i in s, w i * z i ≠ ⊤
[PROOFSTEP]
intro h
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h : ∑ i in s, w i * z i = ⊤
⊢ False
[PROOFSTEP]
rw [h, top_rpow_of_pos hp_pos] at h_top_rpow_sum
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : ⊤ ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h : ∑ i in s, w i * z i = ⊤
⊢ False
[PROOFSTEP]
exact h_top_rpow_sum rfl
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)
[PROOFSTEP]
have h_top_rpow : ∀ a : ι, a ∈ s → w a * z a ^ p ≠ ⊤ :=
  by
  intro i hi
  specialize h_top i hi
  rwa [Ne.def, ← h_top_iff_rpow_top i hi]
    -- put the `.toNNReal` inside the sums.
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
⊢ ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
[PROOFSTEP]
intro i hi
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
i : ι
hi : i ∈ s
⊢ w i * z i ^ p ≠ ⊤
[PROOFSTEP]
specialize h_top i hi
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
i : ι
hi : i ∈ s
h_top : w i * z i ≠ ⊤
⊢ w i * z i ^ p ≠ ⊤
[PROOFSTEP]
rwa [Ne.def, ← h_top_iff_rpow_top i hi]
  -- put the `.toNNReal` inside the sums.
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)
[PROOFSTEP]
simp_rw [toNNReal_sum h_top_rpow, ← toNNReal_rpow, toNNReal_sum h_top, toNNReal_mul, ← toNNReal_rpow]
  -- use corresponding nnreal result
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
⊢ (∑ x in s, ENNReal.toNNReal (w x) * ENNReal.toNNReal (z x)) ^ p ≤
    ∑ x in s, ENNReal.toNNReal (w x) * ENNReal.toNNReal (z x) ^ p
[PROOFSTEP]
refine' NNReal.rpow_arith_mean_le_arith_mean_rpow s (fun i => (w i).toNNReal) (fun i => (z i).toNNReal) _ hp
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
⊢ ∑ i in s, (fun i => ENNReal.toNNReal (w i)) i = 1
[PROOFSTEP]
have h_sum_nnreal : ∑ i in s, w i = ↑(∑ i in s, (w i).toNNReal) :=
  by
  rw [coe_finset_sum]
  refine' sum_congr rfl fun i hi => (coe_toNNReal _).symm
  refine' (lt_top_of_sum_ne_top _ hi).ne
  exact hw'.symm ▸ ENNReal.one_ne_top
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
⊢ ∑ i in s, w i = ↑(∑ i in s, ENNReal.toNNReal (w i))
[PROOFSTEP]
rw [coe_finset_sum]
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
⊢ ∑ i in s, w i = ∑ a in s, ↑(ENNReal.toNNReal (w a))
[PROOFSTEP]
refine' sum_congr rfl fun i hi => (coe_toNNReal _).symm
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
i : ι
hi : i ∈ s
⊢ w i ≠ ⊤
[PROOFSTEP]
refine' (lt_top_of_sum_ne_top _ hi).ne
[GOAL]
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
i : ι
hi : i ∈ s
⊢ ∑ x in s, w x ≠ ⊤
[PROOFSTEP]
exact hw'.symm ▸ ENNReal.one_ne_top
[GOAL]
case refine'_2
ι : Type u
s : Finset ι
w z : ι → ℝ≥0∞
hw' : ∑ i in s, w i = 1
p : ℝ
hp : 1 ≤ p
hp_pos : 0 < p
hp_nonneg : 0 ≤ p
hp_not_neg : ¬p < 0
h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)
h_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤
a✝ : ∑ i in s, w i * z i ^ p ≠ ⊤
h_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤
h_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤
h_sum_nnreal : ∑ i in s, w i = ↑(∑ i in s, ENNReal.toNNReal (w i))
⊢ ∑ i in s, (fun i => ENNReal.toNNReal (w i)) i = 1
[PROOFSTEP]
rwa [← coe_eq_coe, ← h_sum_nnreal]
[GOAL]
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0∞
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
[PROOFSTEP]
have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp
[GOAL]
case refine_2
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0∞
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
h :
  (∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i) ^ p ≤
    ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i ^ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
[PROOFSTEP]
simpa [Fin.sum_univ_succ] using h
[GOAL]
case refine_1
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0∞
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i = 1
[PROOFSTEP]
simp [hw', Fin.sum_univ_succ]
[GOAL]
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)
[PROOFSTEP]
rcases eq_or_lt_of_le hp with (rfl | h'p)
[GOAL]
case inl
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
hp : 1 ≤ 1
⊢ (z₁ + z₂) ^ 1 ≤ 2 ^ (1 - 1) * (z₁ ^ 1 + z₂ ^ 1)
[PROOFSTEP]
simp only [rpow_one, sub_self, rpow_zero, one_mul, le_refl]
[GOAL]
case inr
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)
[PROOFSTEP]
convert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (ENNReal.add_halves 1) hp using 1
[GOAL]
case h.e'_3
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ (z₁ + z₂) ^ p = (1 / 2 * (2 * z₁) + 1 / 2 * (2 * z₂)) ^ p
[PROOFSTEP]
simp [← mul_assoc, ENNReal.inv_mul_cancel two_ne_zero two_ne_top]
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p
[PROOFSTEP]
have _ : p - 1 ≠ 0 := ne_of_gt (sub_pos.2 h'p)
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
x✝ : p - 1 ≠ 0
⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p
[PROOFSTEP]
simp only [mul_rpow_of_nonneg _ _ (zero_le_one.trans hp), rpow_sub _ _ two_ne_zero two_ne_top, ENNReal.div_eq_inv_mul,
  rpow_one, mul_one]
[GOAL]
case h.e'_4
ι : Type u
s : Finset ι
z₁ z₂ : ℝ≥0∞
p : ℝ
hp : 1 ≤ p
h'p : 1 < p
x✝ : p - 1 ≠ 0
⊢ 2⁻¹ * 2 ^ p * (z₁ ^ p + z₂ ^ p) = 2⁻¹ * (2 ^ p * z₁ ^ p) + 2⁻¹ * (2 ^ p * z₂ ^ p)
[PROOFSTEP]
ring
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
have hp_pos : 0 < p := by positivity
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ 0 < p
[PROOFSTEP]
positivity
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
by_cases h_top : a + b = ⊤
[GOAL]
case pos
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
h_top : a + b = ⊤
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
rw [← @ENNReal.rpow_eq_top_iff_of_pos (a + b) p hp_pos] at h_top
[GOAL]
case pos
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
h_top : (a + b) ^ p = ⊤
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
rw [h_top]
[GOAL]
case pos
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
h_top : (a + b) ^ p = ⊤
⊢ a ^ p + b ^ p ≤ ⊤
[PROOFSTEP]
exact le_top
[GOAL]
case neg
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
h_top : ¬a + b = ⊤
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
obtain ⟨ha_top, hb_top⟩ := add_ne_top.mp h_top
[GOAL]
case neg.intro
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
h_top : ¬a + b = ⊤
ha_top : a ≠ ⊤
hb_top : b ≠ ⊤
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
lift a to ℝ≥0 using ha_top
[GOAL]
case neg.intro.intro
ι : Type u
s : Finset ι
p : ℝ
b : ℝ≥0∞
hp1 : 1 ≤ p
hp_pos : 0 < p
hb_top : b ≠ ⊤
a : ℝ≥0
h_top : ¬↑a + b = ⊤
⊢ ↑a ^ p + b ^ p ≤ (↑a + b) ^ p
[PROOFSTEP]
lift b to ℝ≥0 using hb_top
[GOAL]
case neg.intro.intro.intro
ι : Type u
s : Finset ι
p : ℝ
hp1 : 1 ≤ p
hp_pos : 0 < p
a b : ℝ≥0
h_top : ¬↑a + ↑b = ⊤
⊢ ↑a ^ p + ↑b ^ p ≤ (↑a + ↑b) ^ p
[PROOFSTEP]
simpa [← ENNReal.coe_rpow_of_nonneg _ hp_pos.le] using ENNReal.coe_le_coe.2 (NNReal.add_rpow_le_rpow_add a b hp1)
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ (a ^ p + b ^ p) ^ (1 / p) ≤ a + b
[PROOFSTEP]
rw [← @ENNReal.le_rpow_one_div_iff _ _ (1 / p) (by simp [lt_of_lt_of_le zero_lt_one hp1])]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ 0 < 1 / p
[PROOFSTEP]
simp [lt_of_lt_of_le zero_lt_one hp1]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ (1 / (1 / p))
[PROOFSTEP]
rw [one_div_one_div]
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp1 : 1 ≤ p
⊢ a ^ p + b ^ p ≤ (a + b) ^ p
[PROOFSTEP]
exact add_rpow_le_rpow_add _ _ hp1
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
have h_rpow : ∀ a : ℝ≥0∞, a ^ q = (a ^ p) ^ (q / p) := fun a => by
  rw [← ENNReal.rpow_mul, _root_.mul_div_cancel' _ hp_pos.ne']
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a✝ b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
a : ℝ≥0∞
⊢ a ^ q = (a ^ p) ^ (q / p)
[PROOFSTEP]
rw [← ENNReal.rpow_mul, _root_.mul_div_cancel' _ hp_pos.ne']
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
have h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p :=
  by
  refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _
  rwa [one_le_div hp_pos]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
[PROOFSTEP]
refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
⊢ 1 ≤ q / p
[PROOFSTEP]
rwa [one_le_div hp_pos]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
[PROOFSTEP]
rw [h_rpow a, h_rpow b, ENNReal.le_rpow_one_div_iff hp_pos, ← ENNReal.rpow_mul, mul_comm, mul_one_div]
[GOAL]
ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p
[PROOFSTEP]
rwa [one_div_div] at h_rpow_add_rpow_le_add
[GOAL]
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rcases hp.eq_or_lt with (rfl | hp_pos)
[GOAL]
case inl
ι : Type u
s : Finset ι
a b : ℝ≥0∞
hp : 0 ≤ 0
hp1 : 0 ≤ 1
⊢ (a + b) ^ 0 ≤ a ^ 0 + b ^ 0
[PROOFSTEP]
simp
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
have h := rpow_add_rpow_le a b hp_pos hp1
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [one_div_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
repeat' rw [ENNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [ENNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a ^ 1 + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [ENNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [ENNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
rw [ENNReal.rpow_one] at h
[GOAL]
case inr
ι : Type u
s : Finset ι
p : ℝ
a b : ℝ≥0∞
hp : 0 ≤ p
hp1 : p ≤ 1
hp_pos : 0 < p
h : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)
⊢ (a + b) ^ p ≤ a ^ p + b ^ p
[PROOFSTEP]
exact (ENNReal.le_rpow_one_div_iff hp_pos).mp h