Theorem: Measurable.simpleFunc_add
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: induction' f using SimpleFunc.induction with c s hs f f' hff' hf hf'
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f : α →ₛ E
⊢ Measurable (↑f + g)
state_after: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (↑(piecewise s hs (const α c) (const α 0)) + g)

case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
⊢ Measurable (↑(f + f') + g)

tactic: simp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_const,
  SimpleFunc.coe_zero]
state_before: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (↑(piecewise s hs (const α c) (const α 0)) + g)
state_after: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (s.piecewise (Function.const α c) 0 + g)

tactic: rw [← s.piecewise_same g, ← piecewise_add]
state_before: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (s.piecewise (Function.const α c) 0 + g)
state_after: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (s.piecewise (Function.const α c + g) (0 + g))

tactic: exact Measurable.piecewise hs (hg.const_add _) (hg.const_add _)
state_before: case h_ind
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
c : E
s : Set α
hs : MeasurableSet s
⊢ Measurable (s.piecewise (Function.const α c + g) (0 + g))
state_after: no goals

tactic: rw [this]
state_before: case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
this : ↑(f + f') + g = (support ↑f).piecewise (↑f + g) (↑f' + g)
⊢ Measurable (↑(f + f') + g)
state_after: case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
this : ↑(f + f') + g = (support ↑f).piecewise (↑f + g) (↑f' + g)
⊢ Measurable ((support ↑f).piecewise (↑f + g) (↑f' + g))

tactic: exact Measurable.piecewise f.measurableSet_support hf hf'
state_before: case h_add
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
this : ↑(f + f') + g = (support ↑f).piecewise (↑f + g) (↑f' + g)
⊢ Measurable ((support ↑f).piecewise (↑f + g) (↑f' + g))
state_after: no goals

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
⊢ ↑(f + f') + g = (support ↑f).piecewise (↑f + g) (↑f' + g)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x

tactic: by_cases hx : x ∈ Function.support f
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
hx : x ∈ support ↑f
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
hx : x ∉ support ↑f
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x

tactic: simpa only [coe_add, Pi.add_apply, Function.mem_support, ne_eq, not_not,
  Set.piecewise_eq_of_mem _ _ _ hx, _root_.add_left_inj, add_right_eq_self]
  using Set.disjoint_left.1 hff' hx
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
hx : x ∈ support ↑f
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x
state_after: no goals

tactic: simpa only [SimpleFunc.coe_add, Pi.add_apply, Function.mem_support, ne_eq, not_not,
  Set.piecewise_eq_of_not_mem _ _ _ hx, _root_.add_left_inj, add_left_eq_self] using hx
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
E : Type u_5
x✝ : MeasurableSpace α
inst✝² : MeasurableSpace E
inst✝¹ : AddGroup E
inst✝ : MeasurableAdd E
g : α → E
hg : Measurable g
f f' : α →ₛ E
hff' : Disjoint (support ↑f) (support ↑f')
hf : Measurable (↑f + g)
hf' : Measurable (↑f' + g)
x : α
hx : x ∉ support ↑f
⊢ (↑(f + f') + g) x = (support ↑f).piecewise (↑f + g) (↑f' + g) x
state_after: no goals