l3lab/ntp-mathlib huggingface dataset:
theorem _root_.Antitone.tendsto_set_integral (hsm : ∀ i, MeasurableSet (s i)) (h_anti : Antitone s)
    (hfi : IntegrableOn f (s 0) μ) :
    Tendsto (fun i => ∫ a in s i, f a ∂μ) atTop (𝓝 (∫ a in ⋂ n, s n, f a ∂μ)) := by
  let bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
  have h_int_eq : (fun i => ∫ a in s i, f a ∂μ) = fun i => ∫ a, (s i).indicator f a ∂μ :=
    funext fun i => (integral_indicator (hsm i)).symm
  rw [h_int_eq]
  rw [← integral_indicator (MeasurableSet.iInter hsm)]
  refine' tendsto_integral_of_dominated_convergence bound _ _ _ _
  · intro n
    rw [aestronglyMeasurable_indicator_iff (hsm n)]
    exact (IntegrableOn.mono_set hfi (h_anti (zero_le n))).1
  · rw [integrable_indicator_iff (hsm 0)]
    exact hfi.norm
  · simp_rw [norm_indicator_eq_indicator_norm]
    

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s : ℕ → Set α
f : α → E
hsm : ∀ (i : ℕ), MeasurableSet (s i)
h_anti : Antitone s
hfi : IntegrableOn f (s 0)
bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
h_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ
⊢ ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, indicator (s n) (fun a => ‖f a‖) a ≤ indicator (s 0) (fun a => ‖f a‖) a

Next tactic:
refine' fun n => eventually_of_forall fun x => _
theorem _root_.Antitone.tendsto_set_integral (hsm : ∀ i, MeasurableSet (s i)) (h_anti : Antitone s)
    (hfi : IntegrableOn f (s 0) μ) :
    Tendsto (fun i => ∫ a in s i, f a ∂μ) atTop (𝓝 (∫ a in ⋂ n, s n, f a ∂μ)) := by
  let bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
  have h_int_eq : (fun i => ∫ a in s i, f a ∂μ) = fun i => ∫ a, (s i).indicator f a ∂μ :=
    funext fun i => (integral_indicator (hsm i)).symm
  rw [h_int_eq]
  rw [← integral_indicator (MeasurableSet.iInter hsm)]
  refine' tendsto_integral_of_dominated_convergence bound _ _ _ _
  · intro n
    rw [aestronglyMeasurable_indicator_iff (hsm n)]
    exact (IntegrableOn.mono_set hfi (h_anti (zero_le n))).1
  · rw [integrable_indicator_iff (hsm 0)]
    exact hfi.norm
  · simp_rw [norm_indicator_eq_indicator_norm]
    refine' fun n => eventually_of_forall fun x => _
    

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s : ℕ → Set α
f : α → E
hsm : ∀ (i : ℕ), MeasurableSet (s i)
h_anti : Antitone s
hfi : IntegrableOn f (s 0)
bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
h_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ
n : ℕ
x : α
⊢ indicator (s n) (fun a => ‖f a‖) x ≤ indicator (s 0) (fun a => ‖f a‖) x

Next tactic:
exact indicator_le_indicator_of_subset (h_anti (zero_le n)) (fun a => norm_nonneg _) _
theorem _root_.Antitone.tendsto_set_integral (hsm : ∀ i, MeasurableSet (s i)) (h_anti : Antitone s)
    (hfi : IntegrableOn f (s 0) μ) :
    Tendsto (fun i => ∫ a in s i, f a ∂μ) atTop (𝓝 (∫ a in ⋂ n, s n, f a ∂μ)) := by
  let bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
  have h_int_eq : (fun i => ∫ a in s i, f a ∂μ) = fun i => ∫ a, (s i).indicator f a ∂μ :=
    funext fun i => (integral_indicator (hsm i)).symm
  rw [h_int_eq]
  rw [← integral_indicator (MeasurableSet.iInter hsm)]
  refine' tendsto_integral_of_dominated_convergence bound _ _ _ _
  · intro n
    rw [aestronglyMeasurable_indicator_iff (hsm n)]
    exact (IntegrableOn.mono_set hfi (h_anti (zero_le n))).1
  · rw [integrable_indicator_iff (hsm 0)]
    exact hfi.norm
  · simp_rw [norm_indicator_eq_indicator_norm]
    refine' fun n => eventually_of_forall fun x => _
    exact indicator_le_indicator_of_subset (h_anti (zero_le n)) (fun a => norm_nonneg _) _
  · 

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
s : ℕ → Set α
f : α → E
hsm : ∀ (i : ℕ), MeasurableSet (s i)
h_anti : Antitone s
hfi : IntegrableOn f (s 0)
bound : α → ℝ := indicator (s 0) fun a => ‖f a‖
h_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ
⊢ ∀ᵐ (a : α) ∂μ, Tendsto (fun n => indicator (s n) f a) atTop (𝓝 (indicator (⋂ b, s b) (fun a => f a) a))

Next tactic:
filter_upwards [] with a using le_trans (h_anti.tendsto_indicator _ _ _) (pure_le_nhds _)
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =
    Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)

Next tactic:
ext1
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) =ᵐ[Measure.restrict μ s]
    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))

Next tactic:
refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(f + g) x = (↑↑f + ↑↑g) x →
      ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =
        ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x

Next tactic:
refine'
    (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s))
          (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
  refine'
    (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s))
          (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =
        (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →
      ↑↑(f + g) x = (↑↑f + ↑↑g) x →
        ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =
          ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x

Next tactic:
refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
  refine'
    (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s))
          (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →
      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =
          (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →
        ↑↑(f + g) x = (↑↑f + ↑↑g) x →
          ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =
            ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x

Next tactic:
refine' (Memℒp.coeFn_toLp ((Lp.memℒp g).restrict s)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
  refine'
    (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s))
          (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp g).restrict s)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x = ↑↑g x →
      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →
        ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =
            (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →
          ↑↑(f + g) x = (↑↑f + ↑↑g) x →
            ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =
              ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x

Next tactic:
refine' (Memℒp.coeFn_toLp ((Lp.memℒp (f + g)).restrict s)).mono fun x hx1 hx2 hx3 hx4 hx5 => _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is additive. -/
theorem Lp_toLp_restrict_add (f g : Lp E p μ) (s : Set α) :
    ((Lp.memℒp (f + g)).restrict s).toLp (⇑(f + g)) =
      ((Lp.memℒp f).restrict s).toLp f + ((Lp.memℒp g).restrict s).toLp g := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _
  refine'
    (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s))
          (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp g).restrict s)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp (f + g)).restrict s)).mono fun x hx1 hx2 hx3 hx4 hx5 => _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : Set α
x : α
hx1 : ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x = ↑↑(f + g) x
hx2 : ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x = ↑↑g x
hx3 : ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x
hx4 :
  ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =
    (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x
hx5 : ↑↑(f + g) x = (↑↑f + ↑↑g) x
⊢ ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =
    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x

Next tactic:
rw [hx4, hx1, Pi.add_apply, hx2, hx3, hx5, Pi.add_apply]
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
⊢ Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)

Next tactic:
ext1
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  ext1
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
⊢ ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) =ᵐ[Measure.restrict μ s] ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))

Next tactic:
refine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(c • f) x = (c • ↑↑f) x →
      ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x

Next tactic:
refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →
      ↑↑(c • f) x = (c • ↑↑f) x →
        ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x

Next tactic:
refine' (Memℒp.coeFn_toLp ((Lp.memℒp (c • f)).restrict s)).mp _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp (c • f)).restrict s)).mp _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,
    ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • f) x →
      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →
        ↑↑(c • f) x = (c • ↑↑f) x →
          ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x

Next tactic:
refine'
    (Lp.coeFn_smul c (Memℒp.toLp f ((Lp.memℒp f).restrict s))).mono fun x hx1 hx2 hx3 hx4 => _
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map commutes with scalar multiplication. -/
theorem Lp_toLp_restrict_smul (c : 𝕜) (f : Lp F p μ) (s : Set α) :
    ((Lp.memℒp (c • f)).restrict s).toLp (⇑(c • f)) = c • ((Lp.memℒp f).restrict s).toLp f := by
  ext1
  refine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _
  refine' (Memℒp.coeFn_toLp ((Lp.memℒp (c • f)).restrict s)).mp _
  refine'
    (Lp.coeFn_smul c (Memℒp.toLp f ((Lp.memℒp f).restrict s))).mono fun x hx1 hx2 hx3 hx4 => _
  

Proof state:
case h
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
c : 𝕜
f : ↥(Lp F p)
s : Set α
x : α
hx1 : ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = (c • ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) x
hx2 : ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • f) x
hx3 : ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x
hx4 : ↑↑(c • f) x = (c • ↑↑f) x
⊢ ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x

Next tactic:
rw [hx2, hx1, Pi.smul_apply, hx3, hx4, Pi.smul_apply]
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is non-expansive. -/
theorem norm_Lp_toLp_restrict_le (s : Set α) (f : Lp E p μ) :
    ‖((Lp.memℒp f).restrict s).toLp f‖ ≤ ‖f‖ := by
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
s : Set α
f : ↥(Lp E p)
⊢ ‖Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)‖ ≤ ‖f‖

Next tactic:
rw [Lp.norm_def, Lp.norm_def, ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _)]
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is non-expansive. -/
theorem norm_Lp_toLp_restrict_le (s : Set α) (f : Lp E p μ) :
    ‖((Lp.memℒp f).restrict s).toLp f‖ ≤ ‖f‖ := by
  rw [Lp.norm_def, Lp.norm_def, ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _)]
  

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
s : Set α
f : ↥(Lp E p)
⊢ snorm (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) p (Measure.restrict μ s) ≤ snorm (↑↑f) p μ

Next tactic:
refine' (le_of_eq _).trans (snorm_mono_measure _ Measure.restrict_le_self)
/-- For `f : Lp E p μ`, we can define an element of `Lp E p (μ.restrict s)` by
`(Lp.memℒp f).restrict s).toLp f`. This map is non-expansive. -/
theorem norm_Lp_toLp_restrict_le (s : Set α) (f : Lp E p μ) :
    ‖((Lp.memℒp f).restrict s).toLp f‖ ≤ ‖f‖ := by
  rw [Lp.norm_def, Lp.norm_def, ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _)]
  refine' (le_of_eq _).trans (snorm_mono_measure _ Measure.restrict_le_self)
  

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
s : Set α
f : ↥(Lp E p)
⊢ snorm (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) p (Measure.restrict μ s) =
    snorm (↑↑f) p (Measure.restrict μ ?refine'_2)
case refine'_2
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : ℝ≥0∞
μ : Measure α
s : Set α
f : ↥(Lp E p)
⊢ Set α

Next tactic:
exact snorm_congr_ae (Memℒp.coeFn_toLp _)
/-- Continuous linear map sending a function of `Lp F p μ` to the same function in
`Lp F p (μ.restrict s)`. -/
def LpToLpRestrictCLM (μ : Measure α) (p : ℝ≥0∞) [hp : Fact (1 ≤ p)] (s : Set α) :
    Lp F p μ →L[𝕜] Lp F p (μ.restrict s) :=
  @LinearMap.mkContinuous 𝕜 𝕜 (Lp F p μ) (Lp F p (μ.restrict s)) _ _ _ _ _ _ (RingHom.id 𝕜)
    ⟨⟨fun f => Memℒp.toLp f ((Lp.memℒp f).restrict s), fun f g => Lp_toLp_restrict_add f g s⟩,
      fun c f => Lp_toLp_restrict_smul c f s⟩
    1 (by 

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p✝ : ℝ≥0∞
μ✝ μ : Measure α
p : ℝ≥0∞
hp : Fact (1 ≤ p)
s : Set α
⊢ ∀ (x : ↥(Lp F p)),
    ‖{
            toAddHom :=
              { toFun := fun f => Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p),
                map_add' :=
                  (_ :
                    ∀ (f g : ↥(Lp F p)),
                      Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =
                        Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) },
            map_smul' :=
              (_ :
                ∀ (c : 𝕜) (f : ↥(Lp F p)),
                  Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) }
          x‖ ≤
      1 * ‖x‖

Next tactic:
intro f
/-- Continuous linear map sending a function of `Lp F p μ` to the same function in
`Lp F p (μ.restrict s)`. -/
def LpToLpRestrictCLM (μ : Measure α) (p : ℝ≥0∞) [hp : Fact (1 ≤ p)] (s : Set α) :
    Lp F p μ →L[𝕜] Lp F p (μ.restrict s) :=
  @LinearMap.mkContinuous 𝕜 𝕜 (Lp F p μ) (Lp F p (μ.restrict s)) _ _ _ _ _ _ (RingHom.id 𝕜)
    ⟨⟨fun f => Memℒp.toLp f ((Lp.memℒp f).restrict s), fun f g => Lp_toLp_restrict_add f g s⟩,
      fun c f => Lp_toLp_restrict_smul c f s⟩
    1 (by intro f; 

Proof state:
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
𝕜 : Type u_5
inst✝² : NormedField 𝕜
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p✝ : ℝ≥0∞
μ✝ μ : Measure α
p : ℝ≥0∞
hp : Fact (1 ≤ p)
s : Set α
f : ↥(Lp F p)
⊢ ‖{
          toAddHom :=
            { toFun := fun f => Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p),
              map_add' :=
                (_ :
                  ∀ (f g : ↥(Lp F p)),
                    Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =
                      Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) },
          map_smul' :=
            (_ :
              ∀ (c : 𝕜) (f : ↥(Lp F p)),
                Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) }
        f‖ ≤
    1 * ‖f‖

Next tactic:
rw [one_mul]