l3lab/ntp-mathlib huggingface dataset:
@[simp] lemma mem_primeFactors : p ∈ n.primeFactors ↔ p.Prime ∧ p ∣ n ∧ n ≠ 0 := by
  

Proof state:
a b k m n p : ℕ
⊢ p ∈ n.primeFactors ↔ Prime p ∧ p ∣ n ∧ n ≠ 0

Next tactic:
simp_rw [← toFinset_factors, List.mem_toFinset, mem_factors']
lemma mem_primeFactors_of_ne_zero (hn : n ≠ 0) : p ∈ n.primeFactors ↔ p.Prime ∧ p ∣ n := by
  

Proof state:
a b k m n p : ℕ
hn : n ≠ 0
⊢ p ∈ n.primeFactors ↔ Prime p ∧ p ∣ n

Next tactic:
simp [hn]
lemma primeFactors_mono (hmn : m ∣ n) (hn : n ≠ 0) : primeFactors m ⊆ primeFactors n := by
  

Proof state:
a b k m n p : ℕ
hmn : m ∣ n
hn : n ≠ 0
⊢ m.primeFactors ⊆ n.primeFactors

Next tactic:
simp only [subset_iff, mem_primeFactors, and_imp]
lemma primeFactors_mono (hmn : m ∣ n) (hn : n ≠ 0) : primeFactors m ⊆ primeFactors n := by
  simp only [subset_iff, mem_primeFactors, and_imp]
  

Proof state:
a b k m n p : ℕ
hmn : m ∣ n
hn : n ≠ 0
⊢ ∀ ⦃x : ℕ⦄, Prime x → x ∣ m → m ≠ 0 → Prime x ∧ x ∣ n ∧ n ≠ 0

Next tactic:
exact fun p hp hpm _ ↦ ⟨hp, hpm.trans hmn, hn⟩
lemma mem_primeFactors_iff_mem_factors : p ∈ n.primeFactors ↔ p ∈ n.factors := by
  

Proof state:
a b k m n p : ℕ
⊢ p ∈ n.primeFactors ↔ p ∈ factors n

Next tactic:
simp only [primeFactors, List.mem_toFinset]
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  

Proof state:
a b k m n p : ℕ
⊢ n.primeFactors = ∅ ↔ n = 0 ∨ n = 1

Next tactic:
constructor
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · 

Proof state:
case mp
a b k m n p : ℕ
⊢ n.primeFactors = ∅ → n = 0 ∨ n = 1

Next tactic:
contrapose!
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    

Proof state:
case mp
a b k m n p : ℕ
⊢ n ≠ 0 ∧ n ≠ 1 → n.primeFactors ≠ ∅

Next tactic:
rintro hn
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    rintro hn
    

Proof state:
case mp
a b k m n p : ℕ
hn : n ≠ 0 ∧ n ≠ 1
⊢ n.primeFactors ≠ ∅

Next tactic:
obtain ⟨p, hp, hpn⟩ := exists_prime_and_dvd hn.2
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    rintro hn
    obtain ⟨p, hp, hpn⟩ := exists_prime_and_dvd hn.2
    

Proof state:
case mp.intro.intro
a b k m n p✝ : ℕ
hn : n ≠ 0 ∧ n ≠ 1
p : ℕ
hp : Prime p
hpn : p ∣ n
⊢ n.primeFactors ≠ ∅

Next tactic:
exact Nonempty.ne_empty $ ⟨_, mem_primeFactors.2 ⟨hp, hpn, hn.1⟩⟩
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    rintro hn
    obtain ⟨p, hp, hpn⟩ := exists_prime_and_dvd hn.2
    exact Nonempty.ne_empty $ ⟨_, mem_primeFactors.2 ⟨hp, hpn, hn.1⟩⟩
  · 

Proof state:
case mpr
a b k m n p : ℕ
⊢ n = 0 ∨ n = 1 → n.primeFactors = ∅

Next tactic:
rintro (rfl | rfl)
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    rintro hn
    obtain ⟨p, hp, hpn⟩ := exists_prime_and_dvd hn.2
    exact Nonempty.ne_empty $ ⟨_, mem_primeFactors.2 ⟨hp, hpn, hn.1⟩⟩
  · rintro (rfl | rfl) <;> 

Proof state:
case mpr.inl
a b k m p : ℕ
⊢ 0.primeFactors = ∅

Next tactic:
simp
@[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
  constructor
  · contrapose!
    rintro hn
    obtain ⟨p, hp, hpn⟩ := exists_prime_and_dvd hn.2
    exact Nonempty.ne_empty $ ⟨_, mem_primeFactors.2 ⟨hp, hpn, hn.1⟩⟩
  · rintro (rfl | rfl) <;> 

Proof state:
case mpr.inr
a b k m p : ℕ
⊢ 1.primeFactors = ∅

Next tactic:
simp
@[simp] protected lemma Prime.primeFactors (hp : p.Prime) : p.primeFactors = {p} := by
  

Proof state:
a b k m n p : ℕ
hp : Prime p
⊢ p.primeFactors = {p}

Next tactic:
simp [Nat.primeFactors, factors_prime hp]
lemma primeFactors_mul (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * b).primeFactors = a.primeFactors ∪ b.primeFactors := by
  

Proof state:
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (a * b).primeFactors = a.primeFactors ∪ b.primeFactors

Next tactic:
ext
lemma primeFactors_mul (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * b).primeFactors = a.primeFactors ∪ b.primeFactors := by
  ext; 

Proof state:
case a
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
a✝ : ℕ
⊢ a✝ ∈ (a * b).primeFactors ↔ a✝ ∈ a.primeFactors ∪ b.primeFactors

Next tactic:
simp only [Finset.mem_union, mem_primeFactors_iff_mem_factors, mem_factors_mul ha hb]
lemma primeFactors_gcd (ha : a ≠ 0) (hb : b ≠ 0) :
    (a.gcd b).primeFactors = a.primeFactors ∩ b.primeFactors := by
  

Proof state:
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (gcd a b).primeFactors = a.primeFactors ∩ b.primeFactors

Next tactic:
ext
lemma primeFactors_gcd (ha : a ≠ 0) (hb : b ≠ 0) :
    (a.gcd b).primeFactors = a.primeFactors ∩ b.primeFactors := by
  ext; 

Proof state:
case a
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
a✝ : ℕ
⊢ a✝ ∈ (gcd a b).primeFactors ↔ a✝ ∈ a.primeFactors ∩ b.primeFactors

Next tactic:
simp [dvd_gcd_iff, ha, hb, gcd_ne_zero_left ha]
lemma primeFactors_gcd (ha : a ≠ 0) (hb : b ≠ 0) :
    (a.gcd b).primeFactors = a.primeFactors ∩ b.primeFactors := by
  ext; simp [dvd_gcd_iff, ha, hb, gcd_ne_zero_left ha]; 

Proof state:
case a
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
a✝ : ℕ
⊢ Prime a✝ ∧ a✝ ∣ a ∧ a✝ ∣ b ↔ (Prime a✝ ∧ a✝ ∣ a) ∧ Prime a✝ ∧ a✝ ∣ b

Next tactic:
aesop
@[simp] lemma disjoint_primeFactors (ha : a ≠ 0) (hb : b ≠ 0) :
    Disjoint a.primeFactors b.primeFactors ↔ Coprime a b := by
  

Proof state:
a b k m n p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ Disjoint a.primeFactors b.primeFactors ↔ Coprime a b

Next tactic:
simp [disjoint_iff_inter_eq_empty, coprime_iff_gcd_eq_one, ← primeFactors_gcd, gcd_ne_zero_left,
    ha, hb]
lemma primeFactors_pow_succ (n k : ℕ) : (n ^ (k + 1)).primeFactors = n.primeFactors := by
  

Proof state:
a b k✝ m n✝ p n k : ℕ
⊢ (n ^ (k + 1)).primeFactors = n.primeFactors

Next tactic:
rcases eq_or_ne n 0 with (rfl | hn)
lemma primeFactors_pow_succ (n k : ℕ) : (n ^ (k + 1)).primeFactors = n.primeFactors := by
  rcases eq_or_ne n 0 with (rfl | hn)
  · 

Proof state:
case inl
a b k✝ m n p k : ℕ
⊢ (0 ^ (k + 1)).primeFactors = 0.primeFactors

Next tactic:
simp
lemma primeFactors_pow_succ (n k : ℕ) : (n ^ (k + 1)).primeFactors = n.primeFactors := by
  rcases eq_or_ne n 0 with (rfl | hn)
  · simp
  

Proof state:
case inr
a b k✝ m n✝ p n k : ℕ
hn : n ≠ 0
⊢ (n ^ (k + 1)).primeFactors = n.primeFactors

Next tactic:
induction' k with k ih
lemma primeFactors_pow_succ (n k : ℕ) : (n ^ (k + 1)).primeFactors = n.primeFactors := by
  rcases eq_or_ne n 0 with (rfl | hn)
  · simp
  induction' k with k ih
  · 

Proof state:
case inr.zero
a b k m n✝ p n : ℕ
hn : n ≠ 0
⊢ (n ^ (zero + 1)).primeFactors = n.primeFactors

Next tactic:
simp
lemma primeFactors_pow_succ (n k : ℕ) : (n ^ (k + 1)).primeFactors = n.primeFactors := by
  rcases eq_or_ne n 0 with (rfl | hn)
  · simp
  induction' k with k ih
  · simp
  · 

Proof state:
case inr.succ
a b k✝ m n✝ p n : ℕ
hn : n ≠ 0
k : ℕ
ih : (n ^ (k + 1)).primeFactors = n.primeFactors
⊢ (n ^ (succ k + 1)).primeFactors = n.primeFactors

Next tactic:
rw [pow_succ', primeFactors_mul hn (pow_ne_zero _ hn), ih, Finset.union_idempotent]
lemma primeFactors_pow (n : ℕ) (hk : k ≠ 0) : (n ^ k).primeFactors = n.primeFactors := by
  

Proof state:
a b k m n✝ p n : ℕ
hk : k ≠ 0
⊢ (n ^ k).primeFactors = n.primeFactors

Next tactic:
cases k
lemma primeFactors_pow (n : ℕ) (hk : k ≠ 0) : (n ^ k).primeFactors = n.primeFactors := by
  cases k
  · 

Proof state:
case zero
a b m n✝ p n : ℕ
hk : zero ≠ 0
⊢ (n ^ zero).primeFactors = n.primeFactors

Next tactic:
simp at hk
lemma primeFactors_pow (n : ℕ) (hk : k ≠ 0) : (n ^ k).primeFactors = n.primeFactors := by
  cases k
  · simp at hk
  

Proof state:
case succ
a b m n✝¹ p n n✝ : ℕ
hk : succ n✝ ≠ 0
⊢ (n ^ succ n✝).primeFactors = n.primeFactors

Next tactic:
rw [primeFactors_pow_succ]
/-- The only prime divisor of positive prime power `p^k` is `p` itself -/
lemma primeFactors_prime_pow (hk : k ≠ 0) (hp : Prime p) :
    (p ^ k).primeFactors = {p} := by 

Proof state:
a b k m n p : ℕ
hk : k ≠ 0
hp : Prime p
⊢ (p ^ k).primeFactors = {p}

Next tactic:
simp [primeFactors_pow p hk, hp]
theorem Memℒp.snorm_mk_lt_top {α E : Type*} [MeasurableSpace α] {μ : Measure α}
    [NormedAddCommGroup E] {p : ℝ≥0∞} {f : α → E} (hfp : Memℒp f p μ) :
    snorm (AEEqFun.mk f hfp.1) p μ < ∞ := by 

Proof state:
α✝ : Type u_1
E✝ : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α✝
p✝ : ℝ≥0∞
q : ℝ
μ✝ ν : Measure α✝
inst✝⁴ : NormedAddCommGroup E✝
inst✝³ : NormedAddCommGroup F
inst✝² : NormedAddCommGroup G
α : Type u_5
E : Type u_6
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : α → E
hfp : Memℒp f p
⊢ snorm (↑(AEEqFun.mk f (_ : AEStronglyMeasurable f μ))) p μ < ⊤

Next tactic:
simp [hfp.2]
/-- Lp space -/
def Lp {α} (E : Type*) {m : MeasurableSpace α} [NormedAddCommGroup E] (p : ℝ≥0∞)
    (μ : Measure α := by volume_tac) : AddSubgroup (α →ₘ[μ] E) where
  carrier := { f | snorm f p μ < ∞ }
  zero_mem' := by simp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]
  add_mem' {f g} hf hg := by
    

Proof state:
α✝ : Type u_1
E✝ : Type u_2
F : Type u_3
G : Type u_4
m✝ m0 : MeasurableSpace α✝
p✝ : ℝ≥0∞
q : ℝ
μ✝ ν : Measure α✝
inst✝³ : NormedAddCommGroup E✝
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
α : Type ?u.1747
E : Type u_5
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
μ : autoParam (Measure α) _auto✝
f g : α →ₘ[μ] E
hf : f ∈ {f | snorm (↑f) p μ < ⊤}
hg : g ∈ {f | snorm (↑f) p μ < ⊤}
⊢ f + g ∈ {f | snorm (↑f) p μ < ⊤}

Next tactic:
simp [snorm_congr_ae (AEEqFun.coeFn_add f g),
      snorm_add_lt_top ⟨f.aestronglyMeasurable, hf⟩ ⟨g.aestronglyMeasurable, hg⟩]
/-- Lp space -/
def Lp {α} (E : Type*) {m : MeasurableSpace α} [NormedAddCommGroup E] (p : ℝ≥0∞)
    (μ : Measure α := by volume_tac) : AddSubgroup (α →ₘ[μ] E) where
  carrier := { f | snorm f p μ < ∞ }
  zero_mem' := by 

Proof state:
α✝ : Type u_1
E✝ : Type u_2
F : Type u_3
G : Type u_4
m✝ m0 : MeasurableSpace α✝
p✝ : ℝ≥0∞
q : ℝ
μ✝ ν : Measure α✝
inst✝³ : NormedAddCommGroup E✝
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
α : Type ?u.1747
E : Type u_5
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
μ : autoParam (Measure α) _auto✝
⊢ 0 ∈
    { carrier := {f | snorm (↑f) p μ < ⊤},
        add_mem' :=
          (_ :
            ∀ {f g : α →ₘ[μ] E},
              f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) }.carrier

Next tactic:
simp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]
/-- Lp space -/
def Lp {α} (E : Type*) {m : MeasurableSpace α} [NormedAddCommGroup E] (p : ℝ≥0∞)
    (μ : Measure α := by volume_tac) : AddSubgroup (α →ₘ[μ] E) where
  carrier := { f | snorm f p μ < ∞ }
  zero_mem' := by simp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]
  add_mem' {f g} hf hg := by
    simp [snorm_congr_ae (AEEqFun.coeFn_add f g),
      snorm_add_lt_top ⟨f.aestronglyMeasurable, hf⟩ ⟨g.aestronglyMeasurable, hg⟩]
  neg_mem' {f} hf := by 

Proof state:
α✝ : Type u_1
E✝ : Type u_2
F : Type u_3
G : Type u_4
m✝ m0 : MeasurableSpace α✝
p✝ : ℝ≥0∞
q : ℝ
μ✝ ν : Measure α✝
inst✝³ : NormedAddCommGroup E✝
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
α : Type ?u.1747
E : Type u_5
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
μ : autoParam (Measure α) _auto✝
f : α →ₘ[μ] E
hf :
  f ∈
    {
          toAddSubsemigroup :=
            { carrier := {f | snorm (↑f) p μ < ⊤},
              add_mem' :=
                (_ :
                  ∀ {f g : α →ₘ[μ] E},
                    f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) },
          zero_mem' := (_ : snorm (↑0) p μ < ⊤) }.toAddSubsemigroup.carrier
⊢ -f ∈
    {
          toAddSubsemigroup :=
            { carrier := {f | snorm (↑f) p μ < ⊤},
              add_mem' :=
                (_ :
                  ∀ {f g : α →ₘ[μ] E},
                    f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) },
          zero_mem' := (_ : snorm (↑0) p μ < ⊤) }.toAddSubsemigroup.carrier

Next tactic:
rwa [Set.mem_setOf_eq, snorm_congr_ae (AEEqFun.coeFn_neg f), snorm_neg]
theorem toLp_congr {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) (hfg : f =ᵐ[μ] g) :
    hf.toLp f = hg.toLp g := by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
hfg : f =ᵐ[μ] g
⊢ toLp f hf = toLp g hg

Next tactic:
simp [toLp, hfg]
@[simp]
theorem toLp_eq_toLp_iff {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    hf.toLp f = hg.toLp g ↔ f =ᵐ[μ] g := by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ toLp f hf = toLp g hg ↔ f =ᵐ[μ] g

Next tactic:
simp [toLp]
@[ext high]
theorem ext {f g : Lp E p μ} (h : f =ᵐ[μ] g) : f = g := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
h : ↑↑f =ᵐ[μ] ↑↑g
⊢ f = g

Next tactic:
cases f
@[ext high]
theorem ext {f g : Lp E p μ} (h : f =ᵐ[μ] g) : f = g := by
  cases f
  

Proof state:
case mk
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
g : ↥(Lp E p)
val✝ : α →ₘ[μ] E
property✝ : val✝ ∈ Lp E p
h : ↑↑{ val := val✝, property := property✝ } =ᵐ[μ] ↑↑g
⊢ { val := val✝, property := property✝ } = g

Next tactic:
cases g
@[ext high]
theorem ext {f g : Lp E p μ} (h : f =ᵐ[μ] g) : f = g := by
  cases f
  cases g
  

Proof state:
case mk.mk
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
val✝¹ : α →ₘ[μ] E
property✝¹ : val✝¹ ∈ Lp E p
val✝ : α →ₘ[μ] E
property✝ : val✝ ∈ Lp E p
h : ↑↑{ val := val✝¹, property := property✝¹ } =ᵐ[μ] ↑↑{ val := val✝, property := property✝ }
⊢ { val := val✝¹, property := property✝¹ } = { val := val✝, property := property✝ }

Next tactic:
simp only [Subtype.mk_eq_mk]
@[ext high]
theorem ext {f g : Lp E p μ} (h : f =ᵐ[μ] g) : f = g := by
  cases f
  cases g
  simp only [Subtype.mk_eq_mk]
  

Proof state:
case mk.mk
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
val✝¹ : α →ₘ[μ] E
property✝¹ : val✝¹ ∈ Lp E p
val✝ : α →ₘ[μ] E
property✝ : val✝ ∈ Lp E p
h : ↑↑{ val := val✝¹, property := property✝¹ } =ᵐ[μ] ↑↑{ val := val✝, property := property✝ }
⊢ val✝¹ = val✝

Next tactic:
exact AEEqFun.ext h
theorem ext_iff {f g : Lp E p μ} : f = g ↔ f =ᵐ[μ] g :=
  ⟨fun h => by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
h : f = g
⊢ ↑↑f =ᵐ[μ] ↑↑g

Next tactic:
rw [h]
theorem mem_Lp_iff_memℒp {f : α →ₘ[μ] E} : f ∈ Lp E p μ ↔ Memℒp f p μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α →ₘ[μ] E
⊢ f ∈ Lp E p ↔ Memℒp (↑f) p

Next tactic:
simp [mem_Lp_iff_snorm_lt_top, Memℒp, f.stronglyMeasurable.aestronglyMeasurable]
@[simp]
theorem toLp_coeFn (f : Lp E p μ) (hf : Memℒp f p μ) : hf.toLp f = f := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : ↥(Lp E p)
hf : Memℒp (↑↑f) p
⊢ Memℒp.toLp (↑↑f) hf = f

Next tactic:
cases f
@[simp]
theorem toLp_coeFn (f : Lp E p μ) (hf : Memℒp f p μ) : hf.toLp f = f := by
  cases f
  

Proof state:
case mk
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
val✝ : α →ₘ[μ] E
property✝ : val✝ ∈ Lp E p
hf : Memℒp (↑↑{ val := val✝, property := property✝ }) p
⊢ Memℒp.toLp (↑↑{ val := val✝, property := property✝ }) hf = { val := val✝, property := property✝ }

Next tactic:
simp [Memℒp.toLp]
@[simp]
theorem norm_toLp (f : α → E) (hf : Memℒp f p μ) : ‖hf.toLp f‖ = ENNReal.toReal (snorm f p μ) := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : Memℒp f p
⊢ ‖Memℒp.toLp f hf‖ = ENNReal.toReal (snorm f p μ)

Next tactic:
erw [norm_def, snorm_congr_ae (Memℒp.coeFn_toLp hf)]
theorem coe_nnnorm_toLp {f : α → E} (hf : Memℒp f p μ) : (‖hf.toLp f‖₊ : ℝ≥0∞) = snorm f p μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : Memℒp f p
⊢ ↑‖Memℒp.toLp f hf‖₊ = snorm f p μ

Next tactic:
rw [nnnorm_toLp f hf, ENNReal.coe_toNNReal hf.2.ne]
theorem dist_def (f g : Lp E p μ) : dist f g = (snorm (⇑f - ⇑g) p μ).toReal := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
⊢ dist f g = ENNReal.toReal (snorm (↑↑f - ↑↑g) p μ)

Next tactic:
simp_rw [dist, norm_def]
theorem dist_def (f g : Lp E p μ) : dist f g = (snorm (⇑f - ⇑g) p μ).toReal := by
  simp_rw [dist, norm_def]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
⊢ ENNReal.toReal (snorm (↑↑(f - g)) p μ) = ENNReal.toReal (snorm (↑↑f - ↑↑g) p μ)

Next tactic:
refine congr_arg _ ?_
theorem dist_def (f g : Lp E p μ) : dist f g = (snorm (⇑f - ⇑g) p μ).toReal := by
  simp_rw [dist, norm_def]
  refine congr_arg _ ?_
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
⊢ snorm (↑↑(f - g)) p μ = snorm (↑↑f - ↑↑g) p μ

Next tactic:
apply snorm_congr_ae (coeFn_sub _ _)
protected theorem edist_dist (f g : Lp E p μ) : edist f g = .ofReal (dist f g) := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : ↥(Lp E p)
⊢ edist f g = ENNReal.ofReal (dist f g)

Next tactic:
rw [edist_def, dist_def, ← snorm_congr_ae (coeFn_sub _ _),
    ENNReal.ofReal_toReal (snorm_ne_top (f - g))]
@[simp]
theorem edist_toLp_toLp (f g : α → E) (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    edist (hf.toLp f) (hg.toLp g) = snorm (f - g) p μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ edist (Memℒp.toLp f hf) (Memℒp.toLp g hg) = snorm (f - g) p μ

Next tactic:
rw [edist_def]
@[simp]
theorem edist_toLp_toLp (f g : α → E) (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    edist (hf.toLp f) (hg.toLp g) = snorm (f - g) p μ := by
  rw [edist_def]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ snorm (↑↑(Memℒp.toLp f hf) - ↑↑(Memℒp.toLp g hg)) p μ = snorm (f - g) p μ

Next tactic:
exact snorm_congr_ae (hf.coeFn_toLp.sub hg.coeFn_toLp)
@[simp]
theorem edist_toLp_zero (f : α → E) (hf : Memℒp f p μ) : edist (hf.toLp f) 0 = snorm f p μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : Memℒp f p
⊢ edist (Memℒp.toLp f hf) 0 = snorm f p μ

Next tactic:
convert edist_toLp_toLp f 0 hf zero_memℒp
@[simp]
theorem edist_toLp_zero (f : α → E) (hf : Memℒp f p μ) : edist (hf.toLp f) 0 = snorm f p μ := by
  convert edist_toLp_toLp f 0 hf zero_memℒp
  

Proof state:
case h.e'_3.h.e'_5
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : Memℒp f p
⊢ f = f - 0

Next tactic:
simp
@[simp]
theorem nnnorm_zero : ‖(0 : Lp E p μ)‖₊ = 0 := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ‖0‖₊ = 0

Next tactic:
rw [nnnorm_def]
@[simp]
theorem nnnorm_zero : ‖(0 : Lp E p μ)‖₊ = 0 := by
  rw [nnnorm_def]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ENNReal.toNNReal (snorm (↑↑0) p μ) = 0

Next tactic:
change (snorm (⇑(0 : α →ₘ[μ] E)) p μ).toNNReal = 0
@[simp]
theorem nnnorm_zero : ‖(0 : Lp E p μ)‖₊ = 0 := by
  rw [nnnorm_def]
  change (snorm (⇑(0 : α →ₘ[μ] E)) p μ).toNNReal = 0
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ENNReal.toNNReal (snorm (↑0) p μ) = 0

Next tactic:
simp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]
@[simp]
theorem norm_measure_zero (f : Lp E p (0 : MeasureTheory.Measure α)) : ‖f‖ = 0 := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : ↥(Lp E p)
⊢ ‖f‖ = 0

Next tactic:
simp [norm_def]
@[simp] theorem norm_exponent_zero (f : Lp E 0 μ) : ‖f‖ = 0 := by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : ↥(Lp E 0)
⊢ ‖f‖ = 0

Next tactic:
simp [norm_def]
theorem nnnorm_eq_zero_iff {f : Lp E p μ} (hp : 0 < p) : ‖f‖₊ = 0 ↔ f = 0 := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : ↥(Lp E p)
hp : 0 < p
⊢ ‖f‖₊ = 0 ↔ f = 0

Next tactic:
refine' ⟨fun hf => _, fun hf => by simp [hf]⟩
theorem nnnorm_eq_zero_iff {f : Lp E p μ} (hp : 0 < p) : ‖f‖₊ = 0 ↔ f = 0 := by
  refine' ⟨fun hf => _, fun hf => by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : ↥(Lp E p)
hp : 0 < p
hf : f = 0
⊢ ‖f‖₊ = 0

Next tactic:
simp [hf]