α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet {x | Nat.findGreatest (p x) N = k}
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
⊢ Measurable fun x => Nat.findGreatest (p x) N
refine' measurable_findGreatest' fun k hk => _
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet ({a | k ≤ N} ∩ ((⋂ (_ : k ≠ 0), {x | p x k}) ∩ ⋂ (i : ℕ) (_ : k < i) (_ : i ≤ N), {a | p a i}ᶜ))
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet {x | Nat.findGreatest (p x) N = k}
simp only [Nat.findGreatest_eq_iff, setOf_and, setOf_forall, ← compl_setOf]
no goals
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet ({a | k ≤ N} ∩ ((⋂ (_ : k ≠ 0), {x | p x k}) ∩ ⋂ (i : ℕ) (_ : k < i) (_ : i ≤ N), {a | p a i}ᶜ))
repeat' apply_rules [MeasurableSet.inter, MeasurableSet.const, MeasurableSet.iInter,
  MeasurableSet.compl, hN] <;> try intros
no goals
case h₂.h₂
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝² : ℕ
b✝¹ : k < b✝²
b✝ : b✝² ≤ N
⊢ MeasurableSet ({a | p a b✝²}ᶜ)
apply_rules [MeasurableSet.inter, MeasurableSet.const, MeasurableSet.iInter,
MeasurableSet.compl, hN] <;> try intros
case h₂.h₂
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝² : ℕ
b✝¹ : k < b✝²
b✝ : b✝² ≤ N
⊢ MeasurableSet ({a | p a b✝²}ᶜ)
case h₂.h₂
α : Type u_1
β : Type ?u.52344
γ : Type ?u.52347
δ : Type ?u.52350
δ' : Type ?u.52353
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ (k : ℕ), k ≤ N → MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝¹ : ℕ
b✝ : k < b✝¹
⊢ b✝¹ ≤ N → MeasurableSet ({a | p a b✝¹}ᶜ)
intros