Theorem: MeasureTheory.Content.innerContent_iSup_nat
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: refine' iSup₂_le fun K hK => _
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
⊢ innerContent μ (⨆ (i : ℕ), U i) ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: obtain ⟨t, ht⟩ :=
  K.isCompact.elim_finite_subcover _ (fun i => (U i).isOpen) (by rwa [← Opens.coe_iSup])
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: rcases K.isCompact.finite_compact_cover t (SetLike.coe ∘ U) (fun i _ => (U i).isOpen) ht with
  ⟨K', h1K', h2K', h3K'⟩
state_before: case intro
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: let L : ℕ → Compacts G := fun n => ⟨K' n, h1K' n⟩
state_before: case intro.intro.intro.intro
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: convert le_trans (h3 t L) _
state_before: case intro.intro.intro.intro
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: refine' le_trans (Finset.sum_le_sum _) (ENNReal.sum_le_tsum t)
state_before: case intro.intro.intro.intro.convert_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ (Finset.sum t fun i => (fun s => ↑(toFun μ s)) (L i)) ≤ ∑' (i : ℕ), innerContent μ (U i)

tactic: intro i _
state_before: case intro.intro.intro.intro.convert_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ ∀ (i : ℕ), i ∈ t → (fun s => ↑(toFun μ s)) (L i) ≤ innerContent μ (U i)

tactic: refine' le_trans _ (le_iSup _ (L i))
state_before: case intro.intro.intro.intro.convert_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
i : ℕ
a✝ : i ∈ t
⊢ (fun s => ↑(toFun μ s)) (L i) ≤ innerContent μ (U i)

tactic: refine' le_trans _ (le_iSup _ (h2K' i))
state_before: case intro.intro.intro.intro.convert_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
i : ℕ
a✝ : i ∈ t
⊢ (fun s => ↑(toFun μ s)) (L i) ≤ ⨆ (_ : ↑(L i) ⊆ ↑(U i)), (fun s => ↑(toFun μ s)) (L i)

tactic: rfl
state_before: case intro.intro.intro.intro.convert_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
i : ℕ
a✝ : i ∈ t
⊢ (fun s => ↑(toFun μ s)) (L i) ≤ (fun s => ↑(toFun μ s)) (L i)

tactic: intro t K
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
⊢ ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)

tactic: refine' Finset.induction_on t _ _
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
t : Finset ℕ
K : ℕ → Compacts G
⊢ (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)

tactic: simp only [μ.empty, nonpos_iff_eq_zero, Finset.sum_empty, Finset.sup_empty]
state_before: case refine'_1
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
t : Finset ℕ
K : ℕ → Compacts G
⊢ (fun s => ↑(toFun μ s)) (Finset.sup ∅ K) ≤ Finset.sum ∅ fun i => (fun s => ↑(toFun μ s)) (K i)

tactic: intro n s hn ih
state_before: case refine'_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
t : Finset ℕ
K : ℕ → Compacts G
⊢ ∀ ⦃a : ℕ⦄ {s : Finset ℕ},
    ¬a ∈ s →
      ((fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)) →
        (fun s => ↑(toFun μ s)) (Finset.sup (insert a s) K) ≤
          Finset.sum (insert a s) fun i => (fun s => ↑(toFun μ s)) (K i)

tactic: rw [Finset.sup_insert, Finset.sum_insert hn]
state_before: case refine'_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
t : Finset ℕ
K : ℕ → Compacts G
n : ℕ
s : Finset ℕ
hn : ¬n ∈ s
ih : (fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)
⊢ (fun s => ↑(toFun μ s)) (Finset.sup (insert n s) K) ≤ Finset.sum (insert n s) fun i => (fun s => ↑(toFun μ s)) (K i)

tactic: exact le_trans (μ.sup_le _ _) (add_le_add_left ih _)
state_before: case refine'_2
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
t : Finset ℕ
K : ℕ → Compacts G
n : ℕ
s : Finset ℕ
hn : ¬n ∈ s
ih : (fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)
⊢ (fun s => ↑(toFun μ s)) (K n ⊔ Finset.sup s K) ≤
    (fun s => ↑(toFun μ s)) (K n) + Finset.sum s fun x => (fun s => ↑(toFun μ s)) (K x)

tactic: rwa [← Opens.coe_iSup]
state_before: G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
⊢ ↑K ⊆ ⋃ (i : ℕ), ↑(U i)

tactic: ext1
state_before: case h.e'_3.h.e'_1
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ K = Finset.sup t L

tactic: rw [Compacts.coe_finset_sup, Finset.sup_eq_iSup]
state_before: case h.e'_3.h.e'_1.h
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ ↑K = ↑(Finset.sup t L)

tactic: exact h3K'
state_before: case h.e'_3.h.e'_1.h
G : Type w
inst✝¹ : TopologicalSpace G
μ : Content G
inst✝ : T2Space G
U : ℕ → Opens G
h3 :
  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),
    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)
K : Compacts G
hK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)
t : Finset ℕ
ht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)
K' : ℕ → Set G
h1K' : ∀ (i : ℕ), IsCompact (K' i)
h2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i
h3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i
L : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }
⊢ ↑K = ⨆ (a : ℕ) (_ : a ∈ t), ↑(L a)