l3lab/ntp-mathlib huggingface dataset:
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
⊢ ↑↑((fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v)) =ᵐ[μ]
    ↑↑((fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
          (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v)

Next tactic:
filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
⊢ ∀ (a : α),
    ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a = f a • ↑↑u a →
      ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) a = f a • ↑↑v a →
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) a = f a • ↑↑(u + v) a →
          ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
                      Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
                a =
              (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
                  ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
                a →
            (↑(f a) ≠ 0 → ↑↑(u + v) a = (↑↑u + ↑↑v) a) →
              ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) a =
                ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
                        Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
                  a

Next tactic:
intro x hu hv huv h' h''
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
x : α
hu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x
hv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x
huv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x
h' :
  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x =
    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
      x
h'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x
⊢ ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x =
    ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x

Next tactic:
rw [huv, h', Pi.add_apply, hu, hv]
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
x : α
hu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x
hv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x
huv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x
h' :
  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x =
    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
      x
h'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x
⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x

Next tactic:
rcases eq_or_ne (f x) 0 with (hx | hx)
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · 

Proof state:
case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
x : α
hu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x
hv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x
huv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x
h' :
  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x =
    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
      x
h'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x
hx : f x = 0
⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x

Next tactic:
simp only [hx, zero_smul, add_zero]
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · 

Proof state:
case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
x : α
hu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x
hv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x
huv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x
h' :
  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x =
    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
      x
h'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x
hx : f x ≠ 0
⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x

Next tactic:
rw [h'' _, Pi.add_apply, smul_add]
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · rw [h'' _, Pi.add_apply, smul_add]
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
u v : ↥(Lp E 1)
x : α
hu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x
hv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x
huv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x
h' :
  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +
            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))
      x =
    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +
        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))
      x
h'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x
hx : f x ≠ 0
⊢ ↑(f x) ≠ 0

Next tactic:
simpa only [Ne.def, ENNReal.coe_eq_zero] using hx
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · rw [h'' _, Pi.add_apply, smul_add]
      simpa only [Ne.def, ENNReal.coe_eq_zero] using hx
  map_smul' := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
⊢ ∀ (r : ℝ) (x : ↥(Lp E 1)),
    AddHom.toFun
        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
          map_add' :=
            (_ :
              ∀ (u v : ↥(Lp E 1)),
                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
        (r • x) =
      (RingHom.id ℝ) r •
        AddHom.toFun
          { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
            map_add' :=
              (_ :
                ∀ (u v : ↥(Lp E 1)),
                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
          x

Next tactic:
intro r u
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · rw [h'' _, Pi.add_apply, smul_add]
      simpa only [Ne.def, ENNReal.coe_eq_zero] using hx
  map_smul' := by
    intro r u
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
r : ℝ
u : ↥(Lp E 1)
⊢ AddHom.toFun
      { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
        map_add' :=
          (_ :
            ∀ (u v : ↥(Lp E 1)),
              (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
      (r • u) =
    (RingHom.id ℝ) r •
      AddHom.toFun
        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
          map_add' :=
            (_ :
              ∀ (u v : ↥(Lp E 1)),
                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
        u

Next tactic:
ext1
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · rw [h'' _, Pi.add_apply, smul_add]
      simpa only [Ne.def, ENNReal.coe_eq_zero] using hx
  map_smul' := by
    intro r u
    ext1
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
r : ℝ
u : ↥(Lp E 1)
⊢ ↑↑(AddHom.toFun
          { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
            map_add' :=
              (_ :
                ∀ (u v : ↥(Lp E 1)),
                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
          (r • u)) =ᵐ[μ]
    ↑↑((RingHom.id ℝ) r •
          AddHom.toFun
            { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),
              map_add' :=
                (_ :
                  ∀ (u v : ↥(Lp E 1)),
                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =
                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +
                        (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }
            u)

Next tactic:
filter_upwards [(ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_smul r u),
      (memℒ1_smul_of_L1_withDensity f_meas (r • u)).coeFn_toLp,
      Lp.coeFn_smul r ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _),
      (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp]
/-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/
noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) :
    Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where
  toFun u := (memℒ1_smul_of_L1_withDensity f_meas u).toLp _
  map_add' := by
    intro u v
    ext1
    filter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,
      (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,
      Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _)
        ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),
      (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]
    intro x hu hv huv h' h''
    rw [huv, h', Pi.add_apply, hu, hv]
    rcases eq_or_ne (f x) 0 with (hx | hx)
    · simp only [hx, zero_smul, add_zero]
    · rw [h'' _, Pi.add_apply, smul_add]
      simpa only [Ne.def, ENNReal.coe_eq_zero] using hx
  map_smul' := by
    intro r u
    ext1
    filter_upwards [(ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_smul r u),
      (memℒ1_smul_of_L1_withDensity f_meas (r • u)).coeFn_toLp,
      Lp.coeFn_smul r ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _),
      (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp]
    

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_5
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ≥0
f_meas : Measurable f
r : ℝ
u : ↥(Lp E 1)
⊢ ∀ (a : α),
    (↑(f a) ≠ 0 → ↑↑(r • u) a = (r • ↑↑u) a) →
      ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) a = f a • ↑↑(r • u) a →
        ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a =
            (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) a →
          ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a = f a • ↑↑u a →
            ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) a =
              ↑↑((RingHom.id ℝ) r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a

Next tactic:
intro x h h' h'' h'''