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

tactic: rw [@BorelSpace.measurable_eq G _ _]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
⊢ S ≤ OuterMeasure.caratheodory (Content.outerMeasure μ)

tactic: refine' MeasurableSpace.generateFrom_le _
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
⊢ borel G ≤ OuterMeasure.caratheodory (Content.outerMeasure μ)

tactic: intro U hU
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
⊢ ∀ (t : Set G), t ∈ {s | IsOpen s} → MeasurableSet t

tactic: rw [μ.outerMeasure_caratheodory]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
⊢ MeasurableSet U

tactic: intro U'
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
⊢ ∀ (U_1 : Opens G),
    ↑(Content.outerMeasure μ) (↑U_1 ∩ U) + ↑(Content.outerMeasure μ) (↑U_1 \ U) ≤ ↑(Content.outerMeasure μ) ↑U_1

tactic: rw [μ.outerMeasure_of_isOpen ((U' : Set G) ∩ U) (U'.isOpen.inter hU)]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
⊢ ↑(Content.outerMeasure μ) (↑U' ∩ U) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: simp only [innerContent, iSup_subtype']
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
⊢ innerContent μ { carrier := ↑U' ∩ U, is_open' := (_ : IsOpen (↑U' ∩ U)) } + ↑(Content.outerMeasure μ) (↑U' \ U) ≤
    ↑(Content.outerMeasure μ) ↑U'

tactic: rw [Opens.coe_mk]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
⊢ (⨆ (x : { i // ↑i ⊆ ↑{ carrier := ↑U' ∩ U, is_open' := (_ : IsOpen (↑U' ∩ U)) } }), ↑(toFun μ ↑x)) +
      ↑(Content.outerMeasure μ) (↑U' \ U) ≤
    ↑(Content.outerMeasure μ) ↑U'

tactic: haveI : Nonempty { L : Compacts G // (L : Set G) ⊆ U' ∩ U } := ⟨⟨⊥, empty_subset _⟩⟩
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
⊢ (⨆ (x : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑x)) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rw [ENNReal.iSup_add]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
⊢ (⨆ (x : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑x)) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: refine' iSup_le _
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
⊢ (⨆ (b : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑b) + ↑(Content.outerMeasure μ) (↑U' \ U)) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rintro ⟨L, hL⟩
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
⊢ ∀ (i : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑i) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: simp only [subset_inter_iff] at hL
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL : ↑L ⊆ ↑U' ∩ U
⊢ ↑(toFun μ ↑{ val := L, property := hL }) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: have : ↑U' \ U ⊆ U' \ L := diff_subset_diff_right hL.2
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: refine' le_trans (add_le_add_left (μ.outerMeasure.mono' this) _) _
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this : ↑U' \ U ⊆ ↑U' \ ↑L
⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \ U) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rw [μ.outerMeasure_of_isOpen (↑U' \ L) (IsOpen.sdiff U'.2 L.2.isClosed)]
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this : ↑U' \ U ⊆ ↑U' \ ↑L
⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \ ↑L) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: simp only [innerContent, iSup_subtype']
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this : ↑U' \ U ⊆ ↑U' \ ↑L
⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) +
      innerContent μ { carrier := ↑U' \ ↑L, is_open' := (_ : IsOpen (↑U' \ ↑L)) } ≤
    ↑(Content.outerMeasure μ) ↑U'

tactic: rw [Opens.coe_mk]
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this : ↑U' \ U ⊆ ↑U' \ ↑L
⊢ (↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑{ carrier := ↑U' \ ↑L, is_open' := (_ : IsOpen (↑U' \ ↑L)) } }), ↑(toFun μ ↑x)) ≤
    ↑(Content.outerMeasure μ) ↑U'

tactic: haveI : Nonempty { M : Compacts G // (M : Set G) ⊆ ↑U' \ L } := ⟨⟨⊥, empty_subset _⟩⟩
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this : ↑U' \ U ⊆ ↑U' \ ↑L
⊢ (↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑U' \ ↑L }), ↑(toFun μ ↑x)) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rw [ENNReal.add_iSup]
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
⊢ (↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑U' \ ↑L }), ↑(toFun μ ↑x)) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: refine' iSup_le _
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
⊢ (⨆ (b : { i // ↑i ⊆ ↑U' \ ↑L }), ↑(toFun μ L) + ↑(toFun μ ↑b)) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rintro ⟨M, hM⟩
state_before: case mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
⊢ ∀ (i : { i // ↑i ⊆ ↑U' \ ↑L }), ↑(toFun μ L) + ↑(toFun μ ↑i) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: simp only [subset_diff] at hM
state_before: case mk.mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM : ↑M ⊆ ↑U' \ ↑L
⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM }) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: have : (↑(L ⊔ M) : Set G) ⊆ U' := by
  simp only [union_subset_iff, Compacts.coe_sup, hM, hL, and_self_iff]
state_before: case mk.mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM✝ : ↑M ⊆ ↑U' \ ↑L
hM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L
⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: rw [μ.outerMeasure_of_isOpen (↑U') U'.2]
state_before: case mk.mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝¹ : ↑U' \ U ⊆ ↑U' \ ↑L
this✝ : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM✝ : ↑M ⊆ ↑U' \ ↑L
hM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L
this : ↑(L ⊔ M) ⊆ ↑U'
⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤ ↑(Content.outerMeasure μ) ↑U'

tactic: refine' le_trans (ge_of_eq _) (μ.le_innerContent _ _ this)
state_before: case mk.mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝¹ : ↑U' \ U ⊆ ↑U' \ ↑L
this✝ : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM✝ : ↑M ⊆ ↑U' \ ↑L
hM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L
this : ↑(L ⊔ M) ⊆ ↑U'
⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤
    innerContent μ { carrier := ↑U', is_open' := (_ : IsOpen U'.carrier) }

tactic: exact μ.sup_disjoint _ _ hM.2.symm
state_before: case mk.mk
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝¹ : ↑U' \ U ⊆ ↑U' \ ↑L
this✝ : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM✝ : ↑M ⊆ ↑U' \ ↑L
hM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L
this : ↑(L ⊔ M) ⊆ ↑U'
⊢ (fun s => ↑(toFun μ s)) (L ⊔ M) = ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ })

tactic: simp only [union_subset_iff, Compacts.coe_sup, hM, hL, and_self_iff]
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
S : MeasurableSpace G
inst✝ : BorelSpace G
U : Set G
hU : U ∈ {s | IsOpen s}
U' : Opens G
this✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }
L : Compacts G
hL✝ : ↑L ⊆ ↑U' ∩ U
hL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U
this✝ : ↑U' \ U ⊆ ↑U' \ ↑L
this : Nonempty { M // ↑M ⊆ ↑U' \ ↑L }
M : Compacts G
hM✝ : ↑M ⊆ ↑U' \ ↑L
hM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L
⊢ ↑(L ⊔ M) ⊆ ↑U'