-- Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
theorem map_iInf_comap {ι β} [Nonempty ι] {f : α → β} (m : ι → OuterMeasure β) :
    map f (⨅ i, comap f (m i)) = ⨅ i, map f (comap f (m i))

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)

Tactic:
exact subset_refl _

Result:
no goals

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

Tactic:
simp only [map_apply, comap_apply, iInf_apply, le_iInf_iff]

Result:
α : 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)

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)ᶜ

Tactic:
rw [← iUnion_union, Set.union_comm, ← inter_subset, ← image_iUnion, ←
  image_preimage_eq_inter_range]

Result:
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

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

Tactic:
simp only [preimage_union, preimage_compl, preimage_range, compl_univ, union_empty,
  image_subset_iff]

Result:
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)

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))

Tactic:
refine (map_iInf_le _ _).antisymm fun s => ?_

Result:
α : 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

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)

Tactic:
refine ENNReal.tsum_le_tsum fun n => iInf_mono fun i => (m i).mono ?_

Result:
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

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)

Tactic:
refine fun t ht => iInf_le_of_le (fun n => f '' t n ∪ (range f)ᶜ) (iInf_le_of_le ?_ ?_)

Result:
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)ᶜ

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)

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

Tactic:
exact image_subset _ ht

Result:
no goals