l3lab/ntp-mathlib huggingface dataset:
theorem iSup_sInfGen_nonempty {m : Set (OuterMeasure α)} (h : m.Nonempty) (t : Set α) :
    ⨆ _ : t.Nonempty, sInfGen m t = ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ t := by
  rcases t.eq_empty_or_nonempty with (rfl | ht)
  · rcases h with ⟨μ, hμ⟩
    rw [eq_false Set.not_nonempty_empty, iSup_false, eq_comm]
    simp_rw [empty']
    

Proof state:
case inl.intro
α : Type u_1
m : Set (OuterMeasure α)
μ : OuterMeasure α
hμ : μ ∈ m
⊢ ⨅ μ ∈ m, 0 = ⊥

Next tactic:
apply bot_unique
theorem iSup_sInfGen_nonempty {m : Set (OuterMeasure α)} (h : m.Nonempty) (t : Set α) :
    ⨆ _ : t.Nonempty, sInfGen m t = ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ t := by
  rcases t.eq_empty_or_nonempty with (rfl | ht)
  · rcases h with ⟨μ, hμ⟩
    rw [eq_false Set.not_nonempty_empty, iSup_false, eq_comm]
    simp_rw [empty']
    apply bot_unique
    

Proof state:
case inl.intro.h
α : Type u_1
m : Set (OuterMeasure α)
μ : OuterMeasure α
hμ : μ ∈ m
⊢ ⨅ μ ∈ m, 0 ≤ ⊥

Next tactic:
refine' iInf_le_of_le μ (iInf_le _ hμ)
theorem iSup_sInfGen_nonempty {m : Set (OuterMeasure α)} (h : m.Nonempty) (t : Set α) :
    ⨆ _ : t.Nonempty, sInfGen m t = ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ t := by
  rcases t.eq_empty_or_nonempty with (rfl | ht)
  · rcases h with ⟨μ, hμ⟩
    rw [eq_false Set.not_nonempty_empty, iSup_false, eq_comm]
    simp_rw [empty']
    apply bot_unique
    refine' iInf_le_of_le μ (iInf_le _ hμ)
  · 

Proof state:
case inr
α : Type u_1
m : Set (OuterMeasure α)
h : Set.Nonempty m
t : Set α
ht : Set.Nonempty t
⊢ ⨆ (_ : Set.Nonempty t), sInfGen m t = ⨅ μ ∈ m, ↑μ t

Next tactic:
simp [ht, sInfGen_def]
/-- The value of the Infimum of a nonempty set of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem sInf_apply {m : Set (OuterMeasure α)} {s : Set α} (h : m.Nonempty) :
    sInf m s =
      ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ (t n) :=
  by 

Proof state:
α : Type u_1
m : Set (OuterMeasure α)
s : Set α
h : Set.Nonempty m
⊢ ↑(sInf m) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ μ ∈ m, ↑μ (t n)

Next tactic:
simp_rw [sInf_eq_boundedBy_sInfGen, boundedBy_apply, iSup_sInfGen_nonempty h]
/-- The value of the Infimum of a set of outer measures on a nonempty set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem sInf_apply' {m : Set (OuterMeasure α)} {s : Set α} (h : s.Nonempty) :
    sInf m s =
      ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ (t n) :=
  m.eq_empty_or_nonempty.elim (fun hm => by 

Proof state:
α : Type u_1
m : Set (OuterMeasure α)
s : Set α
h : Set.Nonempty s
hm : m = ∅
⊢ ↑(sInf m) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ μ ∈ m, ↑μ (t n)

Next tactic:
simp [hm, h]
/-- The value of the Infimum of a nonempty family of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem iInf_apply {ι} [Nonempty ι] (m : ι → OuterMeasure α) (s : Set α) :
    (⨅ i, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i, m i (t n) := by
  

Proof state:
α : Type u_1
ι : Sort u_2
inst✝ : Nonempty ι
m : ι → OuterMeasure α
s : Set α
⊢ ↑(⨅ i, m i) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (t n)

Next tactic:
rw [iInf, sInf_apply (range_nonempty m)]
/-- The value of the Infimum of a nonempty family of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem iInf_apply {ι} [Nonempty ι] (m : ι → OuterMeasure α) (s : Set α) :
    (⨅ i, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i, m i (t n) := by
  rw [iInf, sInf_apply (range_nonempty m)]
  

Proof state:
α : Type u_1
ι : Sort u_2
inst✝ : Nonempty ι
m : ι → OuterMeasure α
s : Set α
⊢ ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ μ ∈ range m, ↑μ (t n) =
    ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (t n)

Next tactic:
simp only [iInf_range]
/-- The value of the Infimum of a family of outer measures on a nonempty set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem iInf_apply' {ι} (m : ι → OuterMeasure α) {s : Set α} (hs : s.Nonempty) :
    (⨅ i, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i, m i (t n) := by
  

Proof state:
α : Type u_1
ι : Sort u_2
m : ι → OuterMeasure α
s : Set α
hs : Set.Nonempty s
⊢ ↑(⨅ i, m i) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (t n)

Next tactic:
rw [iInf, sInf_apply' hs]
/-- The value of the Infimum of a family of outer measures on a nonempty set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem iInf_apply' {ι} (m : ι → OuterMeasure α) {s : Set α} (hs : s.Nonempty) :
    (⨅ i, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i, m i (t n) := by
  rw [iInf, sInf_apply' hs]
  

Proof state:
α : Type u_1
ι : Sort u_2
m : ι → OuterMeasure α
s : Set α
hs : Set.Nonempty s
⊢ ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ μ ∈ range fun i => m i, ↑μ (t n) =
    ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (t n)

Next tactic:
simp only [iInf_range]
/-- The value of the Infimum of a nonempty family of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem biInf_apply {ι} {I : Set ι} (hI : I.Nonempty) (m : ι → OuterMeasure α) (s : Set α) :
    (⨅ i ∈ I, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i ∈ I, m i (t n) := by
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
hI : Set.Nonempty I
m : ι → OuterMeasure α
s : Set α
⊢ ↑(⨅ i ∈ I, m i) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i ∈ I, ↑(m i) (t n)

Next tactic:
haveI := hI.to_subtype
/-- The value of the Infimum of a nonempty family of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem biInf_apply {ι} {I : Set ι} (hI : I.Nonempty) (m : ι → OuterMeasure α) (s : Set α) :
    (⨅ i ∈ I, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i ∈ I, m i (t n) := by
  haveI := hI.to_subtype
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
hI : Set.Nonempty I
m : ι → OuterMeasure α
s : Set α
this : Nonempty ↑I
⊢ ↑(⨅ i ∈ I, m i) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i ∈ I, ↑(m i) (t n)

Next tactic:
simp only [← iInf_subtype'', iInf_apply]
/-- The value of the Infimum of a nonempty family of outer measures on a set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem biInf_apply' {ι} (I : Set ι) (m : ι → OuterMeasure α) {s : Set α} (hs : s.Nonempty) :
    (⨅ i ∈ I, m i) s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ i ∈ I, m i (t n) := by
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
m : ι → OuterMeasure α
s : Set α
hs : Set.Nonempty s
⊢ ↑(⨅ i ∈ I, m i) s = ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i ∈ I, ↑(m i) (t n)

Next tactic:
simp only [← iInf_subtype'', iInf_apply' _ hs]
theorem comap_iInf {ι β} (f : α → β) (m : ι → OuterMeasure β) :
    comap f (⨅ i, m i) = ⨅ i, comap f (m i) := by
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
m : ι → OuterMeasure β
⊢ (comap f) (⨅ i, m i) = ⨅ i, (comap f) (m i)

Next tactic:
refine' ext_nonempty fun s hs => _
theorem comap_iInf {ι β} (f : α → β) (m : ι → OuterMeasure β) :
    comap f (⨅ i, m i) = ⨅ i, comap f (m i) := by
  refine' ext_nonempty fun s hs => _
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
m : ι → OuterMeasure β
s : Set α
hs : Set.Nonempty s
⊢ ↑((comap f) (⨅ i, m i)) s = ↑(⨅ i, (comap f) (m i)) s

Next tactic:
refine' ((comap_mono f).map_iInf_le s).antisymm _
theorem comap_iInf {ι β} (f : α → β) (m : ι → OuterMeasure β) :
    comap f (⨅ i, m i) = ⨅ i, comap f (m i) := by
  refine' ext_nonempty fun s hs => _
  refine' ((comap_mono f).map_iInf_le s).antisymm _
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
m : ι → OuterMeasure β
s : Set α
hs : Set.Nonempty s
⊢ ↑(⨅ i, (comap f) (m i)) s ≤ ↑((comap f) (⨅ i, m i)) s

Next tactic:
simp only [comap_apply, iInf_apply' _ hs, iInf_apply' _ (hs.image _), le_iInf_iff,
    Set.image_subset_iff, preimage_iUnion]
theorem comap_iInf {ι β} (f : α → β) (m : ι → OuterMeasure β) :
    comap f (⨅ i, m i) = ⨅ i, comap f (m i) := by
  refine' ext_nonempty fun s hs => _
  refine' ((comap_mono f).map_iInf_le s).antisymm _
  simp only [comap_apply, iInf_apply' _ hs, iInf_apply' _ (hs.image _), le_iInf_iff,
    Set.image_subset_iff, preimage_iUnion]
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
m : ι → OuterMeasure β
s : Set α
hs : Set.Nonempty s
⊢ ∀ (i : ℕ → Set β),
    s ⊆ ⋃ i_1, f ⁻¹' i i_1 →
      ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (f '' t n) ≤ ∑' (n : ℕ), ⨅ i_2, ↑(m i_2) (i n)

Next tactic:
refine' fun t ht => iInf_le_of_le _ (iInf_le_of_le ht <| ENNReal.tsum_le_tsum fun k => _)
theorem comap_iInf {ι β} (f : α → β) (m : ι → OuterMeasure β) :
    comap f (⨅ i, m i) = ⨅ i, comap f (m i) := by
  refine' ext_nonempty fun s hs => _
  refine' ((comap_mono f).map_iInf_le s).antisymm _
  simp only [comap_apply, iInf_apply' _ hs, iInf_apply' _ (hs.image _), le_iInf_iff,
    Set.image_subset_iff, preimage_iUnion]
  refine' fun t ht => iInf_le_of_le _ (iInf_le_of_le ht <| ENNReal.tsum_le_tsum fun k => _)
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
m : ι → OuterMeasure β
s : Set α
hs : Set.Nonempty s
t : ℕ → Set β
ht : s ⊆ ⋃ i, f ⁻¹' t i
k : ℕ
⊢ ⨅ i, ↑(m i) (f '' (f ⁻¹' t k)) ≤ ⨅ i, ↑(m i) (t k)

Next tactic:
exact iInf_mono fun i => (m i).mono (image_preimage_subset _ _)
theorem map_iInf {ι β} {f : α → β} (hf : Injective f) (m : ι → OuterMeasure α) :
    map f (⨅ i, m i) = restrict (range f) (⨅ i, map f (m i)) := by
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
hf : Injective f
m : ι → OuterMeasure α
⊢ (map f) (⨅ i, m i) = (restrict (range f)) (⨅ i, (map f) (m i))

Next tactic:
refine' Eq.trans _ (map_comap _ _)
theorem map_iInf {ι β} {f : α → β} (hf : Injective f) (m : ι → OuterMeasure α) :
    map f (⨅ i, m i) = restrict (range f) (⨅ i, map f (m i)) := by
  refine' Eq.trans _ (map_comap _ _)
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
f : α → β
hf : Injective f
m : ι → OuterMeasure α
⊢ (map f) (⨅ i, m i) = (map f) ((comap f) (⨅ i, (map f) (m i)))

Next tactic:
simp only [comap_iInf, comap_map hf]
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
⊢ (map f) (⨅ i, (comap f) (m i)) = ⨅ i, (map f) ((comap f) (m i))

Next tactic:
refine' (map_iInf_le _ _).antisymm fun s => _
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
⊢ ↑(⨅ i, (map f) ((comap f) (m i))) s ≤ ↑((map f) (⨅ i, (comap f) (m i))) s

Next tactic:
simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  

Proof state:
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
⊢ ∀ (i : ℕ → Set α),
    f ⁻¹' s ⊆ iUnion i →
      ⨅ t, ⨅ (_ : s ⊆ iUnion t), ∑' (n : ℕ), ⨅ i, ↑(m i) (f '' (f ⁻¹' t n)) ≤ ∑' (n : ℕ), ⨅ i_2, ↑(m i_2) (f '' i n)

Next tactic:
refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
  · 

Proof state:
case refine'_1
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ s ⊆ ⋃ n, f '' t n ∪ (range f)ᶜ

Next tactic:
rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
      image_preimage_eq_inter_range]
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
  · rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
      image_preimage_eq_inter_range]
    

Proof state:
case refine'_1
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ f '' (f ⁻¹' s) ⊆ f '' ⋃ i, t i

Next tactic:
exact image_subset _ ht
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
  · rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
      image_preimage_eq_inter_range]
    exact image_subset _ ht
  · 

Proof state:
case refine'_2
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
⊢ ∑' (n : ℕ), ⨅ i, ↑(m i) (f '' (f ⁻¹' (fun n => f '' t n ∪ (range f)ᶜ) n)) ≤ ∑' (n : ℕ), ⨅ i, ↑(m i) (f '' t n)

Next tactic:
refine' ENNReal.tsum_le_tsum fun n => iInf_mono fun i => (m i).mono _
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
  · rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
      image_preimage_eq_inter_range]
    exact image_subset _ ht
  · refine' ENNReal.tsum_le_tsum fun n => iInf_mono fun i => (m i).mono _
    

Proof state:
case refine'_2
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
n : ℕ
i : ι
⊢ f '' (f ⁻¹' (fun n => f '' t n ∪ (range f)ᶜ) n) ⊆ f '' t n

Next tactic:
simp only [preimage_union, preimage_compl, preimage_range, compl_univ, union_empty,
      image_subset_iff]
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i)) := by
  refine' (map_iInf_le _ _).antisymm fun s => _
  simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]
  refine' fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le _ _)
  · rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
      image_preimage_eq_inter_range]
    exact image_subset _ ht
  · refine' ENNReal.tsum_le_tsum fun n => iInf_mono fun i => (m i).mono _
    simp only [preimage_union, preimage_compl, preimage_range, compl_univ, union_empty,
      image_subset_iff]
    

Proof state:
case refine'_2
α : Type u_1
ι : Sort u_2
β : Type u_3
inst✝ : Nonempty ι
f : α → β
m : ι → OuterMeasure β
s : Set β
t : ℕ → Set α
ht : f ⁻¹' s ⊆ iUnion t
n : ℕ
i : ι
⊢ f ⁻¹' (f '' t n) ⊆ f ⁻¹' (f '' t n)

Next tactic:
exact subset_refl _
theorem map_biInf_comap {ι β} {I : Set ι} (hI : I.Nonempty) {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i ∈ I, comap f (m i)) = ⨅ i ∈ I, map f (comap f (m i)) := by
  

Proof state:
α : Type u_1
ι : Type u_2
β : Type u_3
I : Set ι
hI : Set.Nonempty I
f : α → β
m : ι → OuterMeasure β
⊢ (map f) (⨅ i ∈ I, (comap f) (m i)) = ⨅ i ∈ I, (map f) ((comap f) (m i))

Next tactic:
haveI := hI.to_subtype
theorem map_biInf_comap {ι β} {I : Set ι} (hI : I.Nonempty) {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i ∈ I, comap f (m i)) = ⨅ i ∈ I, map f (comap f (m i)) := by
  haveI := hI.to_subtype
  

Proof state:
α : Type u_1
ι : Type u_2
β : Type u_3
I : Set ι
hI : Set.Nonempty I
f : α → β
m : ι → OuterMeasure β
this : Nonempty ↑I
⊢ (map f) (⨅ i ∈ I, (comap f) (m i)) = ⨅ i ∈ I, (map f) ((comap f) (m i))

Next tactic:
rw [← iInf_subtype'', ← iInf_subtype'']
theorem map_biInf_comap {ι β} {I : Set ι} (hI : I.Nonempty) {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i ∈ I, comap f (m i)) = ⨅ i ∈ I, map f (comap f (m i)) := by
  haveI := hI.to_subtype
  rw [← iInf_subtype'', ← iInf_subtype'']
  

Proof state:
α : Type u_1
ι : Type u_2
β : Type u_3
I : Set ι
hI : Set.Nonempty I
f : α → β
m : ι → OuterMeasure β
this : Nonempty ↑I
⊢ (map f) (⨅ i, (comap f) (m ↑i)) = ⨅ i, (map f) ((comap f) (m ↑i))

Next tactic:
exact map_iInf_comap _
theorem restrict_iInf_restrict {ι} (s : Set α) (m : ι → OuterMeasure α) :
    restrict s (⨅ i, restrict s (m i)) = restrict s (⨅ i, m i) :=
  calc
    restrict s (⨅ i, restrict s (m i)) = restrict (range ((↑) : s → α)) (⨅ i, restrict s (m i)) :=
      by 

Proof state:
α : Type u_1
ι : Sort u_2
s : Set α
m : ι → OuterMeasure α
⊢ (restrict s) (⨅ i, (restrict s) (m i)) = (restrict (range Subtype.val)) (⨅ i, (restrict s) (m i))

Next tactic:
rw [Subtype.range_coe]
theorem restrict_biInf {ι} {I : Set ι} (hI : I.Nonempty) (s : Set α) (m : ι → OuterMeasure α) :
    restrict s (⨅ i ∈ I, m i) = ⨅ i ∈ I, restrict s (m i) := by
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
hI : Set.Nonempty I
s : Set α
m : ι → OuterMeasure α
⊢ (restrict s) (⨅ i ∈ I, m i) = ⨅ i ∈ I, (restrict s) (m i)

Next tactic:
haveI := hI.to_subtype
theorem restrict_biInf {ι} {I : Set ι} (hI : I.Nonempty) (s : Set α) (m : ι → OuterMeasure α) :
    restrict s (⨅ i ∈ I, m i) = ⨅ i ∈ I, restrict s (m i) := by
  haveI := hI.to_subtype
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
hI : Set.Nonempty I
s : Set α
m : ι → OuterMeasure α
this : Nonempty ↑I
⊢ (restrict s) (⨅ i ∈ I, m i) = ⨅ i ∈ I, (restrict s) (m i)

Next tactic:
rw [← iInf_subtype'', ← iInf_subtype'']
theorem restrict_biInf {ι} {I : Set ι} (hI : I.Nonempty) (s : Set α) (m : ι → OuterMeasure α) :
    restrict s (⨅ i ∈ I, m i) = ⨅ i ∈ I, restrict s (m i) := by
  haveI := hI.to_subtype
  rw [← iInf_subtype'', ← iInf_subtype'']
  

Proof state:
α : Type u_1
ι : Type u_2
I : Set ι
hI : Set.Nonempty I
s : Set α
m : ι → OuterMeasure α
this : Nonempty ↑I
⊢ (restrict s) (⨅ i, m ↑i) = ⨅ i, (restrict s) (m ↑i)

Next tactic:
exact restrict_iInf _ _
/-- This proves that Inf and restrict commute for outer measures, so long as the set of
outer measures is nonempty. -/
theorem restrict_sInf_eq_sInf_restrict (m : Set (OuterMeasure α)) {s : Set α} (hm : m.Nonempty) :
    restrict s (sInf m) = sInf (restrict s '' m) := by
  

Proof state:
α : Type u_1
m : Set (OuterMeasure α)
s : Set α
hm : Set.Nonempty m
⊢ (restrict s) (sInf m) = sInf (⇑(restrict s) '' m)

Next tactic:
simp only [sInf_eq_iInf, restrict_biInf, hm, iInf_image]
theorem extend_eq {s : α} (h : P s) : extend m s = m s h := by 

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ extend m s = m s h

Next tactic:
simp [extend, h]
theorem extend_eq_top {s : α} (h : ¬P s) : extend m s = ∞ := by 

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : ¬P s
⊢ extend m s = ⊤

Next tactic:
simp [extend, h]
theorem smul_extend {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] {c : R} (hc : c ≠ 0) :
    c • extend m = extend fun s h => c • m s h := by
  

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
R : Type u_2
inst✝³ : Zero R
inst✝² : SMulWithZero R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : NoZeroSMulDivisors R ℝ≥0∞
c : R
hc : c ≠ 0
⊢ c • extend m = extend fun s h => c • m s h

Next tactic:
ext1 s
theorem smul_extend {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] {c : R} (hc : c ≠ 0) :
    c • extend m = extend fun s h => c • m s h := by
  ext1 s
  

Proof state:
case h
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
R : Type u_2
inst✝³ : Zero R
inst✝² : SMulWithZero R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : NoZeroSMulDivisors R ℝ≥0∞
c : R
hc : c ≠ 0
s : α
⊢ (c • extend m) s = extend (fun s h => c • m s h) s

Next tactic:
dsimp [extend]
theorem smul_extend {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] {c : R} (hc : c ≠ 0) :
    c • extend m = extend fun s h => c • m s h := by
  ext1 s
  dsimp [extend]
  

Proof state:
case h
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
R : Type u_2
inst✝³ : Zero R
inst✝² : SMulWithZero R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : NoZeroSMulDivisors R ℝ≥0∞
c : R
hc : c ≠ 0
s : α
⊢ c • ⨅ (h : P s), m s h = ⨅ (h : P s), c • m s h

Next tactic:
by_cases h : P s
theorem smul_extend {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] {c : R} (hc : c ≠ 0) :
    c • extend m = extend fun s h => c • m s h := by
  ext1 s
  dsimp [extend]
  by_cases h : P s
  · 

Proof state:
case pos
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
R : Type u_2
inst✝³ : Zero R
inst✝² : SMulWithZero R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : NoZeroSMulDivisors R ℝ≥0∞
c : R
hc : c ≠ 0
s : α
h : P s
⊢ c • ⨅ (h : P s), m s h = ⨅ (h : P s), c • m s h

Next tactic:
simp [h]
theorem smul_extend {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] {c : R} (hc : c ≠ 0) :
    c • extend m = extend fun s h => c • m s h := by
  ext1 s
  dsimp [extend]
  by_cases h : P s
  · simp [h]
  · 

Proof state:
case neg
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
R : Type u_2
inst✝³ : Zero R
inst✝² : SMulWithZero R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : NoZeroSMulDivisors R ℝ≥0∞
c : R
hc : c ≠ 0
s : α
h : ¬P s
⊢ c • ⨅ (h : P s), m s h = ⨅ (h : P s), c • m s h

Next tactic:
simp [h, ENNReal.smul_top, hc]
theorem le_extend {s : α} (h : P s) : m s h ≤ extend m s := by
  

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ m s h ≤ extend m s

Next tactic:
simp only [extend, le_iInf_iff]
theorem le_extend {s : α} (h : P s) : m s h ≤ extend m s := by
  simp only [extend, le_iInf_iff]
  

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ ∀ (i : P s), m s h ≤ m s i

Next tactic:
intro
theorem le_extend {s : α} (h : P s) : m s h ≤ extend m s := by
  simp only [extend, le_iInf_iff]
  intro
  

Proof state:
α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h i✝ : P s
⊢ m s h ≤ m s i✝

Next tactic:
rfl