Theorem: AEMeasurable.sum_measure
File: Mathlib/MeasureTheory/Measure/AEMeasurable.lean

tactic: nontriviality β
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
⊢ AEMeasurable f

tactic: inhabit β
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
⊢ AEMeasurable f

tactic: set s : ι → Set α := fun i => toMeasurable (μ i) { x | f x ≠ (h i).mk f x }
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
⊢ AEMeasurable f

tactic: have hsμ : ∀ i, μ i (s i) = 0 := by
  intro i
  rw [measure_toMeasurable]
  exact (h i).ae_eq_mk
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ AEMeasurable f

tactic: have hsm : MeasurableSet (⋂ i, s i) :=
  MeasurableSet.iInter fun i => measurableSet_toMeasurable _ _
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
⊢ AEMeasurable f

tactic: have hs : ∀ i x, x ∉ s i → f x = (h i).mk f x := by
  intro i x hx
  contrapose! hx
  exact subset_toMeasurable _ _ hx
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
⊢ AEMeasurable f

tactic: set g : α → β := (⋂ i, s i).piecewise (const α default) f
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
⊢ AEMeasurable f

tactic: refine' ⟨g, measurable_of_restrict_of_restrict_compl hsm _ _, ae_sum_iff.mpr fun i => _⟩
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ AEMeasurable f

tactic: intro i
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ ∀ (i : ι), ↑↑(μ i) (s i) = 0

tactic: rw [measure_toMeasurable]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
i : ι
⊢ ↑↑(μ i) (s i) = 0

tactic: exact (h i).ae_eq_mk
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
i : ι
⊢ ↑↑(μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x} = 0

tactic: intro i x hx
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
⊢ ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x

tactic: contrapose! hx
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
i : ι
x : α
hx : ¬x ∈ s i
⊢ f x = mk f (_ : AEMeasurable f) x

tactic: exact subset_toMeasurable _ _ hx
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
i : ι
x : α
hx : f x ≠ mk f (_ : AEMeasurable f) x
⊢ x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i

tactic: rw [restrict_piecewise]
state_before: case refine'_1
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ Measurable (Set.restrict (⋂ (i : ι), s i) g)

tactic: simp only [Set.restrict, const]
state_before: case refine'_1
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ Measurable (Set.restrict (⋂ (i : ι), s i) (const α default))

tactic: exact measurable_const
state_before: case refine'_1
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ Measurable fun x => default

tactic: rw [restrict_piecewise_compl, compl_iInter]
state_before: case refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ Measurable (Set.restrict ((⋂ (i : ι), s i)ᶜ) g)

tactic: intro t ht
state_before: case refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
⊢ Measurable (Set.restrict (⋃ (i : ι), s iᶜ) f)

tactic: refine'
  ⟨⋃ i, (h i).mk f ⁻¹' t ∩ s iᶜ,
    MeasurableSet.iUnion fun i =>
      (measurable_mk _ ht).inter (measurableSet_toMeasurable _ _).compl,
    _⟩
state_before: case refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
⊢ MeasurableSet (Set.restrict (⋃ (i : ι), s iᶜ) f ⁻¹' t)

tactic: ext ⟨x, hx⟩
state_before: case refine'_2
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
⊢ (Subtype.val ⁻¹' ⋃ (i : ι), mk f (_ : AEMeasurable f) ⁻¹' t ∩ s iᶜ) = Set.restrict (⋃ (i : ι), s iᶜ) f ⁻¹' t

tactic: simp only [mem_preimage, mem_iUnion, Subtype.coe_mk, Set.restrict, mem_inter_iff,
  mem_compl_iff] at hx⊢
state_before: case refine'_2.h.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
hx : x ∈ ⋃ (i : ι), s iᶜ
⊢ ({ val := x, property := hx } ∈ Subtype.val ⁻¹' ⋃ (i : ι), mk f (_ : AEMeasurable f) ⁻¹' t ∩ s iᶜ) ↔
    { val := x, property := hx } ∈ Set.restrict (⋃ (i : ι), s iᶜ) f ⁻¹' t

tactic: constructor
state_before: case refine'_2.h.mk
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
hx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ (∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) ↔ f x ∈ t

tactic: rintro ⟨i, hxt, hxs⟩
state_before: case refine'_2.h.mk.mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
hx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ (∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) → f x ∈ t

tactic: rwa [hs _ _ hxs]
state_before: case refine'_2.h.mk.mp.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
hx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
i : ι
hxt : mk f (_ : AEMeasurable f) x ∈ t
hxs : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ f x ∈ t

tactic: rcases hx with ⟨i, hi⟩
state_before: case refine'_2.h.mk.mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
hx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ f x ∈ t → ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}

tactic: rw [hs _ _ hi]
state_before: case refine'_2.h.mk.mpr.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
i : ι
hi : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ f x ∈ t → ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}

tactic: exact fun h => ⟨i, h, hi⟩
state_before: case refine'_2.h.mk.mpr.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
t : Set β
ht : MeasurableSet t
x : α
i : ι
hi : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
⊢ mk f (_ : AEMeasurable f) x ∈ t →
    ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}

tactic: refine' measure_mono_null (fun x (hx : f x ≠ g x) => _) (hsμ i)
state_before: case refine'_3
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
i : ι
⊢ ∀ᵐ (x : α) ∂μ i, f x = g x

tactic: contrapose! hx
state_before: case refine'_3
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
i : ι
x : α
hx : f x ≠ g x
⊢ x ∈ s i

tactic: refine' (piecewise_eq_of_not_mem _ _ _ _).symm
state_before: case refine'_3
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
i : ι
x : α
hx : ¬x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i
⊢ f x = piecewise (⋂ (i : ι), s i) (const α default) f x

tactic: exact fun h => hx (mem_iInter.1 h i)
state_before: case refine'_3
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type ?u.987471
δ : Type ?u.987474
R : Type ?u.987477
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : MeasurableSpace γ
inst✝¹ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
inst✝ : Countable ι
μ : ι → MeasureTheory.Measure α
h : ∀ (i : ι), AEMeasurable f
✝ : Nontrivial β
inhabited_h : Inhabited β
s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}
hsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0
hsm : MeasurableSet (⋂ (i : ι), s i)
hs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x
g : α → β := piecewise (⋂ (i : ι), s i) (const α default) f
i : ι
x : α
hx : ¬x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i
⊢ ¬x ∈ ⋂ (i : ι), s i