Theorem: MeasureTheory.OuterMeasure.comap_boundedBy
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

tactic: refine (comap_ofFunction _ ?_).trans ?_
state_before: α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ (comap f) (boundedBy m) = boundedBy fun s => m (f '' s)
state_after: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ (Monotone fun s => ⨆ (_ : s.Nonempty), m s) ∨ Surjective f

case refine_2
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ OuterMeasure.ofFunction (fun s => ⨆ (_ : (f '' s).Nonempty), m (f '' s)) ⋯ = boundedBy fun s => m (f '' s)

tactic: refine h.imp (fun H s t hst => iSup_le fun hs => ?_) id
state_before: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ (Monotone fun s => ⨆ (_ : s.Nonempty), m s) ∨ Surjective f
state_after: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
H : Monotone fun s => m ↑s
s t : Set α
hst : s ≤ t
hs : s.Nonempty
⊢ m s ≤ (fun s => ⨆ (_ : s.Nonempty), m s) t

tactic: have ht : t.Nonempty := hs.mono hst
state_before: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
H : Monotone fun s => m ↑s
s t : Set α
hst : s ≤ t
hs : s.Nonempty
⊢ m s ≤ (fun s => ⨆ (_ : s.Nonempty), m s) t
state_after: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
H : Monotone fun s => m ↑s
s t : Set α
hst : s ≤ t
hs : s.Nonempty
ht : t.Nonempty
⊢ m s ≤ (fun s => ⨆ (_ : s.Nonempty), m s) t

tactic: exact (@H ⟨s, hs⟩ ⟨t, ht⟩ hst).trans (le_iSup (fun _ : t.Nonempty => m t) ht)
state_before: case refine_1
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
H : Monotone fun s => m ↑s
s t : Set α
hst : s ≤ t
hs : s.Nonempty
ht : t.Nonempty
⊢ m s ≤ (fun s => ⨆ (_ : s.Nonempty), m s) t
state_after: no goals

tactic: dsimp only [boundedBy]
state_before: case refine_2
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ OuterMeasure.ofFunction (fun s => ⨆ (_ : (f '' s).Nonempty), m (f '' s)) ⋯ = boundedBy fun s => m (f '' s)
state_after: case refine_2
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ OuterMeasure.ofFunction (fun s => ⨆ (_ : (f '' s).Nonempty), m (f '' s)) ⋯ =
    OuterMeasure.ofFunction (fun s => ⨆ (_ : s.Nonempty), m (f '' s)) ⋯

tactic: congr with s : 1
state_before: case refine_2
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
⊢ OuterMeasure.ofFunction (fun s => ⨆ (_ : (f '' s).Nonempty), m (f '' s)) ⋯ =
    OuterMeasure.ofFunction (fun s => ⨆ (_ : s.Nonempty), m (f '' s)) ⋯
state_after: case refine_2.e_m.h
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
s : Set β
⊢ ⨆ (_ : (f '' s).Nonempty), m (f '' s) = ⨆ (_ : s.Nonempty), m (f '' s)

tactic: rw [image_nonempty]
state_before: case refine_2.e_m.h
α : Type u_1
m : Set α → ℝ≥0∞
β : Type u_2
f : β → α
h : (Monotone fun s => m ↑s) ∨ Surjective f
s : Set β
⊢ ⨆ (_ : (f '' s).Nonempty), m (f '' s) = ⨆ (_ : s.Nonempty), m (f '' s)
state_after: no goals