l3lab/ntp-mathlib huggingface dataset:
/-- Consider two functions `f` and `g` which coincide on a set `s` and are continuous there.
Then there is an open neighborhood of `s` on which `f` and `g` are uniformly close. -/
lemma exists_is_open_mem_uniformity_of_forall_mem_eq
    [TopologicalSpace β] {r : Set (α × α)} {s : Set β}
    {f g : β → α} (hf : ∀ x ∈ s, ContinuousAt f x) (hg : ∀ x ∈ s, ContinuousAt g x)
    (hfg : s.EqOn f g) (hr : r ∈ 𝓤 α) :
    ∃ t, IsOpen t ∧ s ⊆ t ∧ ∀ x ∈ t, (f x, g x) ∈ r := by
  have A : ∀ x ∈ s, ∃ t, IsOpen t ∧ x ∈ t ∧ ∀ z ∈ t, (f z, g z) ∈ r := by
    intro x hx
    obtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr
    have A : {z | (f x, f z) ∈ t} ∈ 𝓝 x := (hf x hx).preimage_mem_nhds (mem_nhds_left (f x) ht)
    have B : {z | (g x, g z) ∈ t} ∈ 𝓝 x := (hg x hx).preimage_mem_nhds (mem_nhds_left (g x) ht)
    rcases _root_.mem_nhds_iff.1 (inter_mem A B) with ⟨u, hu, u_open, xu⟩
    refine ⟨u, u_open, xu, fun y hy ↦ ?_⟩
    have I1 : (f y, f x) ∈ t :=  (htsymm.mk_mem_comm).2 (hu hy).1
    have I2 : (g x, g y) ∈ t := (hu hy).2
    rw [hfg hx] at I1
    exact htr (prod_mk_mem_compRel I1 I2)
  choose! t t_open xt ht using A
  refine ⟨⋃ x ∈ s, t x, isOpen_biUnion t_open, fun x hx ↦ mem_biUnion hx (xt x hx), ?_⟩
  rintro x hx
  simp only [mem_iUnion, exists_prop] at hx
  

Proof state:
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : TopologicalSpace β
r : Set (α × α)
s : Set β
f g : β → α
hf : ∀ x ∈ s, ContinuousAt f x
hg : ∀ x ∈ s, ContinuousAt g x
hfg : EqOn f g s
hr : r ∈ 𝓤 α
t : β → Set β
t_open : ∀ x ∈ s, IsOpen (t x)
xt : ∀ x ∈ s, x ∈ t x
ht : ∀ x ∈ s, ∀ z ∈ t x, (f z, g z) ∈ r
x : β
hx : ∃ i ∈ s, x ∈ t i
⊢ (f x, g x) ∈ r

Next tactic:
rcases hx with ⟨y, ys, hy⟩
/-- Consider two functions `f` and `g` which coincide on a set `s` and are continuous there.
Then there is an open neighborhood of `s` on which `f` and `g` are uniformly close. -/
lemma exists_is_open_mem_uniformity_of_forall_mem_eq
    [TopologicalSpace β] {r : Set (α × α)} {s : Set β}
    {f g : β → α} (hf : ∀ x ∈ s, ContinuousAt f x) (hg : ∀ x ∈ s, ContinuousAt g x)
    (hfg : s.EqOn f g) (hr : r ∈ 𝓤 α) :
    ∃ t, IsOpen t ∧ s ⊆ t ∧ ∀ x ∈ t, (f x, g x) ∈ r := by
  have A : ∀ x ∈ s, ∃ t, IsOpen t ∧ x ∈ t ∧ ∀ z ∈ t, (f z, g z) ∈ r := by
    intro x hx
    obtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr
    have A : {z | (f x, f z) ∈ t} ∈ 𝓝 x := (hf x hx).preimage_mem_nhds (mem_nhds_left (f x) ht)
    have B : {z | (g x, g z) ∈ t} ∈ 𝓝 x := (hg x hx).preimage_mem_nhds (mem_nhds_left (g x) ht)
    rcases _root_.mem_nhds_iff.1 (inter_mem A B) with ⟨u, hu, u_open, xu⟩
    refine ⟨u, u_open, xu, fun y hy ↦ ?_⟩
    have I1 : (f y, f x) ∈ t :=  (htsymm.mk_mem_comm).2 (hu hy).1
    have I2 : (g x, g y) ∈ t := (hu hy).2
    rw [hfg hx] at I1
    exact htr (prod_mk_mem_compRel I1 I2)
  choose! t t_open xt ht using A
  refine ⟨⋃ x ∈ s, t x, isOpen_biUnion t_open, fun x hx ↦ mem_biUnion hx (xt x hx), ?_⟩
  rintro x hx
  simp only [mem_iUnion, exists_prop] at hx
  rcases hx with ⟨y, ys, hy⟩
  

Proof state:
case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : TopologicalSpace β
r : Set (α × α)
s : Set β
f g : β → α
hf : ∀ x ∈ s, ContinuousAt f x
hg : ∀ x ∈ s, ContinuousAt g x
hfg : EqOn f g s
hr : r ∈ 𝓤 α
t : β → Set β
t_open : ∀ x ∈ s, IsOpen (t x)
xt : ∀ x ∈ s, x ∈ t x
ht : ∀ x ∈ s, ∀ z ∈ t x, (f z, g z) ∈ r
x y : β
ys : y ∈ s
hy : x ∈ t y
⊢ (f x, g x) ∈ r

Next tactic:
exact ht y ys x hy
/-- A composition induces a partition (just convert the list to a multiset). -/
@[simps]
def ofComposition (n : ℕ) (c : Composition n) : Partition n where
  parts := c.blocks
  parts_pos hi := c.blocks_pos hi
  parts_sum := by 

Proof state:
n : ℕ
c : Composition n
⊢ sum ↑c.blocks = n

Next tactic:
rw [Multiset.coe_sum, c.blocks_sum]
theorem ofComposition_surj {n : ℕ} : Function.Surjective (ofComposition n) := by
  

Proof state:
n : ℕ
⊢ Function.Surjective (ofComposition n)

Next tactic:
rintro ⟨b, hb₁, hb₂⟩
theorem ofComposition_surj {n : ℕ} : Function.Surjective (ofComposition n) := by
  rintro ⟨b, hb₁, hb₂⟩
  

Proof state:
case mk
n : ℕ
b : Multiset ℕ
hb₁ : ∀ {i : ℕ}, i ∈ b → 0 < i
hb₂ : sum b = n
⊢ ∃ a, ofComposition n a = { parts := b, parts_pos := hb₁, parts_sum := hb₂ }

Next tactic:
rcases Quotient.exists_rep b with ⟨b, rfl⟩
theorem ofComposition_surj {n : ℕ} : Function.Surjective (ofComposition n) := by
  rintro ⟨b, hb₁, hb₂⟩
  rcases Quotient.exists_rep b with ⟨b, rfl⟩
  

Proof state:
case mk.intro
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ ⟦b⟧ → 0 < i
hb₂ : sum ⟦b⟧ = n
⊢ ∃ a, ofComposition n a = { parts := ⟦b⟧, parts_pos := hb₁, parts_sum := hb₂ }

Next tactic:
exact ⟨⟨b, hb₁, by simpa using hb₂⟩, Partition.ext _ _ rfl⟩
theorem ofComposition_surj {n : ℕ} : Function.Surjective (ofComposition n) := by
  rintro ⟨b, hb₁, hb₂⟩
  rcases Quotient.exists_rep b with ⟨b, rfl⟩
  exact ⟨⟨b, hb₁, by 

Proof state:
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ ⟦b⟧ → 0 < i
hb₂ : sum ⟦b⟧ = n
⊢ List.sum b = n

Next tactic:
simpa using hb₂
/-- Given a multiset which sums to `n`, construct a partition of `n` with the same multiset, but
without the zeros.
-/
@[simps]
def ofSums (n : ℕ) (l : Multiset ℕ) (hl : l.sum = n) : Partition n where
  parts := l.filter (· ≠ 0)
  parts_pos hi := (of_mem_filter hi).bot_lt
  parts_sum := by
    

Proof state:
n : ℕ
l : Multiset ℕ
hl : sum l = n
⊢ sum (filter (fun x => x ≠ 0) l) = n

Next tactic:
have lz : (l.filter (· = 0)).sum = 0 := by simp [sum_eq_zero_iff]
/-- Given a multiset which sums to `n`, construct a partition of `n` with the same multiset, but
without the zeros.
-/
@[simps]
def ofSums (n : ℕ) (l : Multiset ℕ) (hl : l.sum = n) : Partition n where
  parts := l.filter (· ≠ 0)
  parts_pos hi := (of_mem_filter hi).bot_lt
  parts_sum := by
    have lz : (l.filter (· = 0)).sum = 0 := by 

Proof state:
n : ℕ
l : Multiset ℕ
hl : sum l = n
⊢ sum (filter (fun x => x = 0) l) = 0

Next tactic:
simp [sum_eq_zero_iff]
/-- Given a multiset which sums to `n`, construct a partition of `n` with the same multiset, but
without the zeros.
-/
@[simps]
def ofSums (n : ℕ) (l : Multiset ℕ) (hl : l.sum = n) : Partition n where
  parts := l.filter (· ≠ 0)
  parts_pos hi := (of_mem_filter hi).bot_lt
  parts_sum := by
    have lz : (l.filter (· = 0)).sum = 0 := by simp [sum_eq_zero_iff]
    

Proof state:
n : ℕ
l : Multiset ℕ
hl : sum l = n
lz : sum (filter (fun x => x = 0) l) = 0
⊢ sum (filter (fun x => x ≠ 0) l) = n

Next tactic:
rwa [← filter_add_not (· = 0) l, sum_add, lz, zero_add] at hl
@[simp] lemma indiscrete_parts {n : ℕ} (hn : n ≠ 0) : (indiscrete n).parts = {n} := by
  

Proof state:
n : ℕ
hn : n ≠ 0
⊢ (indiscrete n).parts = {n}

Next tactic:
simp [indiscrete, filter_eq_self, hn]
instance UniquePartitionZero : Unique (Partition 0) where
  uniq _ := Partition.ext _ _ <| by 

Proof state:
x✝ : Partition 0
⊢ x✝.parts = default.parts

Next tactic:
simp
@[simp] lemma partition_one_parts (p : Partition 1) : p.parts = {1} := by
  

Proof state:
p : Partition 1
⊢ p.parts = {1}

Next tactic:
have h : p.parts = replicate (card p.parts) 1 := eq_replicate_card.2 fun x hx =>
    ((le_sum_of_mem hx).trans_eq p.parts_sum).antisymm (p.parts_pos hx)
@[simp] lemma partition_one_parts (p : Partition 1) : p.parts = {1} := by
  have h : p.parts = replicate (card p.parts) 1 := eq_replicate_card.2 fun x hx =>
    ((le_sum_of_mem hx).trans_eq p.parts_sum).antisymm (p.parts_pos hx)
  

Proof state:
p : Partition 1
h : p.parts = replicate (card p.parts) 1
⊢ p.parts = {1}

Next tactic:
have h' : card p.parts = 1 := by simpa using (congrArg sum h.symm).trans p.parts_sum
@[simp] lemma partition_one_parts (p : Partition 1) : p.parts = {1} := by
  have h : p.parts = replicate (card p.parts) 1 := eq_replicate_card.2 fun x hx =>
    ((le_sum_of_mem hx).trans_eq p.parts_sum).antisymm (p.parts_pos hx)
  have h' : card p.parts = 1 := by 

Proof state:
p : Partition 1
h : p.parts = replicate (card p.parts) 1
⊢ card p.parts = 1

Next tactic:
simpa using (congrArg sum h.symm).trans p.parts_sum
@[simp] lemma partition_one_parts (p : Partition 1) : p.parts = {1} := by
  have h : p.parts = replicate (card p.parts) 1 := eq_replicate_card.2 fun x hx =>
    ((le_sum_of_mem hx).trans_eq p.parts_sum).antisymm (p.parts_pos hx)
  have h' : card p.parts = 1 := by simpa using (congrArg sum h.symm).trans p.parts_sum
  

Proof state:
p : Partition 1
h : p.parts = replicate (card p.parts) 1
h' : card p.parts = 1
⊢ p.parts = {1}

Next tactic:
rw [h, h', replicate_one]
instance UniquePartitionOne : Unique (Partition 1) where
  uniq _ := Partition.ext _ _ <| by 

Proof state:
x✝ : Partition 1
⊢ x✝.parts = default.parts

Next tactic:
simp
/-- When `α` is `Finite`, every `f : PreLp E p` satisfies `Memℓp f p`. -/
theorem Memℓp.all [Finite α] (f : ∀ i, E i) : Memℓp f p := by
  

Proof state:
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f p

Next tactic:
rcases p.trichotomy with (rfl | rfl | _h)
/-- When `α` is `Finite`, every `f : PreLp E p` satisfies `Memℓp f p`. -/
theorem Memℓp.all [Finite α] (f : ∀ i, E i) : Memℓp f p := by
  rcases p.trichotomy with (rfl | rfl | _h)
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f 0

Next tactic:
exact memℓp_zero_iff.mpr { i : α | f i ≠ 0 }.toFinite
/-- When `α` is `Finite`, every `f : PreLp E p` satisfies `Memℓp f p`. -/
theorem Memℓp.all [Finite α] (f : ∀ i, E i) : Memℓp f p := by
  rcases p.trichotomy with (rfl | rfl | _h)
  · exact memℓp_zero_iff.mpr { i : α | f i ≠ 0 }.toFinite
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Finite α
f : (i : α) → E i
⊢ Memℓp f ⊤

Next tactic:
exact memℓp_infty_iff.mpr (Set.Finite.bddAbove (Set.range fun i : α => ‖f i‖).toFinite)
/-- When `α` is `Finite`, every `f : PreLp E p` satisfies `Memℓp f p`. -/
theorem Memℓp.all [Finite α] (f : ∀ i, E i) : Memℓp f p := by
  rcases p.trichotomy with (rfl | rfl | _h)
  · exact memℓp_zero_iff.mpr { i : α | f i ≠ 0 }.toFinite
  · exact memℓp_infty_iff.mpr (Set.Finite.bddAbove (Set.range fun i : α => ‖f i‖).toFinite)
  · 

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < ENNReal.toReal p
⊢ Memℓp f p

Next tactic:
cases nonempty_fintype α
/-- When `α` is `Finite`, every `f : PreLp E p` satisfies `Memℓp f p`. -/
theorem Memℓp.all [Finite α] (f : ∀ i, E i) : Memℓp f p := by
  rcases p.trichotomy with (rfl | rfl | _h)
  · exact memℓp_zero_iff.mpr { i : α | f i ≠ 0 }.toFinite
  · exact memℓp_infty_iff.mpr (Set.Finite.bddAbove (Set.range fun i : α => ‖f i‖).toFinite)
  · cases nonempty_fintype α; 

Proof state:
case inr.inr.intro
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Finite α
f : (i : α) → E i
_h : 0 < ENNReal.toReal p
val✝ : Fintype α
⊢ Memℓp f p

Next tactic:
exact memℓp_gen ⟨Finset.univ.sum _, hasSum_fintype _⟩
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  

Proof state:
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Fintype α
f : ↥(lp E p)
⊢ ‖Equiv.lpPiLp f‖ = ‖f‖

Next tactic:
rcases p.trichotomy with (rfl | rfl | h)
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | h)
  · 

Proof state:
case inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Fintype α
f : ↥(lp E 0)
⊢ ‖Equiv.lpPiLp f‖ = ‖f‖

Next tactic:
simp [Equiv.lpPiLp, PiLp.norm_eq_card, lp.norm_eq_card_dsupport]
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | h)
  · simp [Equiv.lpPiLp, PiLp.norm_eq_card, lp.norm_eq_card_dsupport]
  · 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Fintype α
f : ↥(lp E ⊤)
⊢ ‖Equiv.lpPiLp f‖ = ‖f‖

Next tactic:
rw [PiLp.norm_eq_ciSup, lp.norm_eq_ciSup]
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | h)
  · simp [Equiv.lpPiLp, PiLp.norm_eq_card, lp.norm_eq_card_dsupport]
  · rw [PiLp.norm_eq_ciSup, lp.norm_eq_ciSup]; 

Proof state:
case inr.inl
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
inst✝ : Fintype α
f : ↥(lp E ⊤)
⊢ ⨆ i, ‖Equiv.lpPiLp f i‖ = ⨆ i, ‖↑f i‖

Next tactic:
rfl
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | h)
  · simp [Equiv.lpPiLp, PiLp.norm_eq_card, lp.norm_eq_card_dsupport]
  · rw [PiLp.norm_eq_ciSup, lp.norm_eq_ciSup]; rfl
  · 

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Fintype α
f : ↥(lp E p)
h : 0 < ENNReal.toReal p
⊢ ‖Equiv.lpPiLp f‖ = ‖f‖

Next tactic:
rw [PiLp.norm_eq_sum h, lp.norm_eq_tsum_rpow h, tsum_fintype]
theorem equiv_lpPiLp_norm (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖ := by
  rcases p.trichotomy with (rfl | rfl | h)
  · simp [Equiv.lpPiLp, PiLp.norm_eq_card, lp.norm_eq_card_dsupport]
  · rw [PiLp.norm_eq_ciSup, lp.norm_eq_ciSup]; rfl
  · rw [PiLp.norm_eq_sum h, lp.norm_eq_tsum_rpow h, tsum_fintype]; 

Proof state:
case inr.inr
α : Type u_1
E : α → Type u_2
inst✝¹ : (i : α) → NormedAddCommGroup (E i)
p : ℝ≥0∞
inst✝ : Fintype α
f : ↥(lp E p)
h : 0 < ENNReal.toReal p
⊢ (Finset.sum Finset.univ fun i => ‖Equiv.lpPiLp f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p) =
    (Finset.sum Finset.univ fun b => ‖↑f b‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p)

Next tactic:
rfl
/-- The canonical map between `lp (fun _ : α ↦ E) ∞` and `α →ᵇ E` as a `LinearIsometryEquiv`. -/
noncomputable def lpBcfₗᵢ : lp (fun _ : α => E) ∞ ≃ₗᵢ[𝕜] α →ᵇ E :=
  { AddEquiv.lpBcf with
    map_smul' := fun k f => rfl
    norm_map' := fun f => by 

Proof state:
α : Type u_1
E : Type u_2
R : Type u_3
A : Type u_4
𝕜 : Type u_5
inst✝⁸ : TopologicalSpace α
inst✝⁷ : DiscreteTopology α
inst✝⁶ : NormedRing A
inst✝⁵ : NormOneClass A
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAlgebra 𝕜 A
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NonUnitalNormedRing R
src✝ : ↥(lp (fun x => E) ⊤) ≃+ (α →ᵇ E) := AddEquiv.lpBcf
f : ↥(lp (fun x => E) ⊤)
⊢ ‖{
          toLinearMap :=
            {
              toAddHom :=
                { toFun := src✝.toFun,
                  map_add' :=
                    (_ :
                      ∀ (x y : ↥(lp (fun x => E) ⊤)),
                        Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) },
              map_smul' :=
                (_ :
                  ∀ (k : 𝕜) (f : ↥(lp (fun x => E) ⊤)),
                    AddHom.toFun
                        { toFun := src✝.toFun,
                          map_add' :=
                            (_ :
                              ∀ (x y : ↥(lp (fun x => E) ⊤)),
                                Equiv.toFun src✝.toEquiv (x + y) =
                                  Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }
                        (k • f) =
                      AddHom.toFun
                        { toFun := src✝.toFun,
                          map_add' :=
                            (_ :
                              ∀ (x y : ↥(lp (fun x => E) ⊤)),
                                Equiv.toFun src✝.toEquiv (x + y) =
                                  Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }
                        (k • f)) },
          invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        f‖ =
    ‖f‖

Next tactic:
simp only [norm_eq_iSup_norm, lp.norm_eq_ciSup]
/-- The canonical map between `lp (fun _ : α ↦ E) ∞` and `α →ᵇ E` as a `LinearIsometryEquiv`. -/
noncomputable def lpBcfₗᵢ : lp (fun _ : α => E) ∞ ≃ₗᵢ[𝕜] α →ᵇ E :=
  { AddEquiv.lpBcf with
    map_smul' := fun k f => rfl
    norm_map' := fun f => by simp only [norm_eq_iSup_norm, lp.norm_eq_ciSup]; 

Proof state:
α : Type u_1
E : Type u_2
R : Type u_3
A : Type u_4
𝕜 : Type u_5
inst✝⁸ : TopologicalSpace α
inst✝⁷ : DiscreteTopology α
inst✝⁶ : NormedRing A
inst✝⁵ : NormOneClass A
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAlgebra 𝕜 A
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NonUnitalNormedRing R
src✝ : ↥(lp (fun x => E) ⊤) ≃+ (α →ᵇ E) := AddEquiv.lpBcf
f : ↥(lp (fun x => E) ⊤)
⊢ ⨆ x,
      ‖({
              toLinearMap :=
                {
                  toAddHom :=
                    { toFun := AddEquiv.lpBcf.toEquiv.toFun,
                      map_add' :=
                        (_ :
                          ∀ (x y : ↥(lp (fun x => E) ⊤)),
                            Equiv.toFun src✝.toEquiv (x + y) =
                              Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) },
                  map_smul' :=
                    (_ :
                      ∀ (k : 𝕜) (f : ↥(lp (fun x => E) ⊤)),
                        AddHom.toFun
                            { toFun := src✝.toFun,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ↥(lp (fun x => E) ⊤)),
                                    Equiv.toFun src✝.toEquiv (x + y) =
                                      Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }
                            (k • f) =
                          AddHom.toFun
                            { toFun := src✝.toFun,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ↥(lp (fun x => E) ⊤)),
                                    Equiv.toFun src✝.toEquiv (x + y) =
                                      Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }
                            (k • f)) },
              invFun := AddEquiv.lpBcf.toEquiv.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
            f)
          x‖ =
    ⨆ i, ‖↑f i‖

Next tactic:
rfl
@[simp]
theorem coeff_add (p q : R[X]) (n : ℕ) : coeff (p + q) n = coeff p n + coeff q n := by
  

Proof state:
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q✝ r p q : R[X]
n : ℕ
⊢ coeff (p + q) n = coeff p n + coeff q n

Next tactic:
rcases p with ⟨⟩
@[simp]
theorem coeff_add (p q : R[X]) (n : ℕ) : coeff (p + q) n = coeff p n + coeff q n := by
  rcases p with ⟨⟩
  

Proof state:
case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q✝ r q : R[X]
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ coeff ({ toFinsupp := toFinsupp✝ } + q) n = coeff { toFinsupp := toFinsupp✝ } n + coeff q n

Next tactic:
rcases q with ⟨⟩
@[simp]
theorem coeff_add (p q : R[X]) (n : ℕ) : coeff (p + q) n = coeff p n + coeff q n := by
  rcases p with ⟨⟩
  rcases q with ⟨⟩
  

Proof state:
case ofFinsupp.ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
toFinsupp✝¹ toFinsupp✝ : R[ℕ]
⊢ coeff ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }) n =
    coeff { toFinsupp := toFinsupp✝¹ } n + coeff { toFinsupp := toFinsupp✝ } n

Next tactic:
simp_rw [← ofFinsupp_add, coeff]
@[simp]
theorem coeff_add (p q : R[X]) (n : ℕ) : coeff (p + q) n = coeff p n + coeff q n := by
  rcases p with ⟨⟩
  rcases q with ⟨⟩
  simp_rw [← ofFinsupp_add, coeff]
  

Proof state:
case ofFinsupp.ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
toFinsupp✝¹ toFinsupp✝ : R[ℕ]
⊢ (toFinsupp✝¹ + toFinsupp✝) n = toFinsupp✝¹ n + toFinsupp✝ n

Next tactic:
exact Finsupp.add_apply _ _ _
set_option linter.deprecated false in
@[simp]
theorem coeff_bit0 (p : R[X]) (n : ℕ) : coeff (bit0 p) n = bit0 (coeff p n) := by 

Proof state:
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
⊢ coeff (bit0 p) n = bit0 (coeff p n)

Next tactic:
simp [bit0]
@[simp]
theorem coeff_smul [SMulZeroClass S R] (r : S) (p : R[X]) (n : ℕ) :
    coeff (r • p) n = r • coeff p n := by
  

Proof state:
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p✝ q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
p : R[X]
n : ℕ
⊢ coeff (r • p) n = r • coeff p n

Next tactic:
rcases p with ⟨⟩
@[simp]
theorem coeff_smul [SMulZeroClass S R] (r : S) (p : R[X]) (n : ℕ) :
    coeff (r • p) n = r • coeff p n := by
  rcases p with ⟨⟩
  

Proof state:
case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ coeff (r • { toFinsupp := toFinsupp✝ }) n = r • coeff { toFinsupp := toFinsupp✝ } n

Next tactic:
simp_rw [← ofFinsupp_smul, coeff]
@[simp]
theorem coeff_smul [SMulZeroClass S R] (r : S) (p : R[X]) (n : ℕ) :
    coeff (r • p) n = r • coeff p n := by
  rcases p with ⟨⟩
  simp_rw [← ofFinsupp_smul, coeff]
  

Proof state:
case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ (r • toFinsupp✝) n = r • toFinsupp✝ n

Next tactic:
exact Finsupp.smul_apply _ _ _
theorem support_smul [Monoid S] [DistribMulAction S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p := by
  

Proof state:
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝² : Semiring R
p✝ q r✝ : R[X]
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
r : S
p : R[X]
⊢ support (r • p) ⊆ support p

Next tactic:
intro i hi
theorem support_smul [Monoid S] [DistribMulAction S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p := by
  intro i hi
  

Proof state:
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝² : Semiring R
p✝ q r✝ : R[X]
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
r : S
p : R[X]
i : ℕ
hi : i ∈ support (r • p)
⊢ i ∈ support p

Next tactic:
simp? [mem_support_iff] at hi ⊢ says simp only [mem_support_iff, coeff_smul, ne_eq] at hi ⊢
theorem support_smul [Monoid S] [DistribMulAction S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p := by
  intro i hi
  simp? [mem_support_iff] at hi ⊢ says 

Proof state:
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝² : Semiring R
p✝ q r✝ : R[X]
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
r : S
p : R[X]
i : ℕ
hi : i ∈ support (r • p)
⊢ i ∈ support p

Next tactic:
simp only [mem_support_iff, coeff_smul, ne_eq] at hi ⊢
theorem support_smul [Monoid S] [DistribMulAction S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p := by
  intro i hi
  simp? [mem_support_iff] at hi ⊢ says simp only [mem_support_iff, coeff_smul, ne_eq] at hi ⊢
  

Proof state:
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝² : Semiring R
p✝ q r✝ : R[X]
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
r : S
p : R[X]
i : ℕ
hi : ¬r • coeff p i = 0
⊢ ¬coeff p i = 0

Next tactic:
contrapose! hi
theorem support_smul [Monoid S] [DistribMulAction S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p := by
  intro i hi
  simp? [mem_support_iff] at hi ⊢ says simp only [mem_support_iff, coeff_smul, ne_eq] at hi ⊢
  contrapose! hi
  

Proof state:
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝² : Semiring R
p✝ q r✝ : R[X]
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
r : S
p : R[X]
i : ℕ
hi : coeff p i = 0
⊢ r • coeff p i = 0

Next tactic:
simp [hi]