theorem extracted_formal_statement_11.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ¬↑i < n)
  (this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1)
  (h_original_goal : Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) :
  Measurable fun c => c.1 := sorry

State before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ¬↑i < n
this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1
⊢ Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1

Tactic: rw [this]

State after:
[Ω : Type u
 inst✝ : MeasurableSpace Ω
 n : ℕ
 i : Fin (n + 1)
 h : ¬↑i < n
 this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1
 ⊢ Measurable fun c => c.1]

Relevant lemmas: