Theorem: ProbabilityTheory.measurableSet_isRatStieltjesPoint
File: Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean

tactic: have h1 : MeasurableSet {a | Monotone (f a)} := by
  change MeasurableSet {a | ∀ q r (_ : q ≤ r), f a q ≤ f a r}
  simp_rw [Set.setOf_forall]
  refine MeasurableSet.iInter (fun q ↦ ?_)
  refine MeasurableSet.iInter (fun r ↦ ?_)
  refine MeasurableSet.iInter (fun _ ↦ ?_)
  exact measurableSet_le hf.eval hf.eval
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}

tactic: have h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)} :=
  measurableSet_tendsto _ (fun q ↦ hf.eval)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}

tactic: have h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)} :=
  measurableSet_tendsto _ (fun q ↦ hf.eval)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}

tactic: have h4 : MeasurableSet {a | ∀ t : ℚ, ⨅ r : Ioi t, f a r = f a t} := by
  rw [Set.setOf_forall]
  refine MeasurableSet.iInter (fun q ↦ ?_)
  exact measurableSet_eq_fun (measurable_iInf fun _ ↦ hf.eval) hf.eval
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}

tactic: suffices {a | IsRatStieltjesPoint f a}
    = ({a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)}
      ∩ {a | ∀ t : ℚ, ⨅ r : Ioi t, f a r = f a t}) by
  rw [this]
  exact (((h1.inter h2).inter h3).inter h4)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ {a | IsRatStieltjesPoint f a} =
    {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}

tactic: ext a
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ {a | IsRatStieltjesPoint f a} =
    {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
⊢ a ∈ {a | IsRatStieltjesPoint f a} ↔
    a ∈
      {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
        {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}

tactic: simp only [mem_setOf_eq, mem_inter_iff]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
⊢ a ∈ {a | IsRatStieltjesPoint f a} ↔
    a ∈
      {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
        {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
⊢ IsRatStieltjesPoint f a ↔
    ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t

tactic: refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
⊢ IsRatStieltjesPoint f a ↔
    ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t
state_after: case h.refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
h : IsRatStieltjesPoint f a
⊢ ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t

case h.refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
h : ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t
⊢ IsRatStieltjesPoint f a

tactic: change MeasurableSet {a | ∀ q r (_ : q ≤ r), f a q ≤ f a r}
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet {a | Monotone (f a)}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet {a | ∀ (q r : ℚ), q ≤ r → f a q ≤ f a r}

tactic: simp_rw [Set.setOf_forall]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet {a | ∀ (q r : ℚ), q ≤ r → f a q ≤ f a r}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet (⋂ i, ⋂ i_1, ⋂ (_ : i ≤ i_1), {x | f x i ≤ f x i_1})

tactic: refine MeasurableSet.iInter (fun q ↦ ?_)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
⊢ MeasurableSet (⋂ i, ⋂ i_1, ⋂ (_ : i ≤ i_1), {x | f x i ≤ f x i_1})
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q : ℚ
⊢ MeasurableSet (⋂ i, ⋂ (_ : q ≤ i), {x | f x q ≤ f x i})

tactic: refine MeasurableSet.iInter (fun r ↦ ?_)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q : ℚ
⊢ MeasurableSet (⋂ i, ⋂ (_ : q ≤ i), {x | f x q ≤ f x i})
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q r : ℚ
⊢ MeasurableSet (⋂ (_ : q ≤ r), {x | f x q ≤ f x r})

tactic: refine MeasurableSet.iInter (fun _ ↦ ?_)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q r : ℚ
⊢ MeasurableSet (⋂ (_ : q ≤ r), {x | f x q ≤ f x r})
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q r : ℚ
x✝ : q ≤ r
⊢ MeasurableSet {x | f x q ≤ f x r}

tactic: exact measurableSet_le hf.eval hf.eval
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
q r : ℚ
x✝ : q ≤ r
⊢ MeasurableSet {x | f x q ≤ f x r}
state_after: no goals

tactic: rw [Set.setOf_forall]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
⊢ MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
⊢ MeasurableSet (⋂ i, {x | ⨅ r, f x ↑r = f x i})

tactic: refine MeasurableSet.iInter (fun q ↦ ?_)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
⊢ MeasurableSet (⋂ i, {x | ⨅ r, f x ↑r = f x i})
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
q : ℚ
⊢ MeasurableSet {x | ⨅ r, f x ↑r = f x q}

tactic: exact measurableSet_eq_fun (measurable_iInf fun _ ↦ hf.eval) hf.eval
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
q : ℚ
⊢ MeasurableSet {x | ⨅ r, f x ↑r = f x q}
state_after: no goals

tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
this :
  {a | IsRatStieltjesPoint f a} =
    {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ MeasurableSet {a | IsRatStieltjesPoint f a}
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
this :
  {a | IsRatStieltjesPoint f a} =
    {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ MeasurableSet
    ({a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t})

tactic: exact (((h1.inter h2).inter h3).inter h4)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
this :
  {a | IsRatStieltjesPoint f a} =
    {a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
⊢ MeasurableSet
    ({a | Monotone (f a)} ∩ {a | Tendsto (f a) atTop (𝓝 1)} ∩ {a | Tendsto (f a) atBot (𝓝 0)} ∩
      {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t})
state_after: no goals

tactic: exact ⟨⟨⟨h.mono, h.tendsto_atTop_one⟩, h.tendsto_atBot_zero⟩, h.iInf_rat_gt_eq⟩
state_before: case h.refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
h : IsRatStieltjesPoint f a
⊢ ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t
state_after: no goals

tactic: exact ⟨h.1.1.1, h.1.1.2, h.1.2, h.2⟩
state_before: case h.refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
h1 : MeasurableSet {a | Monotone (f a)}
h2 : MeasurableSet {a | Tendsto (f a) atTop (𝓝 1)}
h3 : MeasurableSet {a | Tendsto (f a) atBot (𝓝 0)}
h4 : MeasurableSet {a | ∀ (t : ℚ), ⨅ r, f a ↑r = f a t}
a : α
h : ((Monotone (f a) ∧ Tendsto (f a) atTop (𝓝 1)) ∧ Tendsto (f a) atBot (𝓝 0)) ∧ ∀ (t : ℚ), ⨅ r, f a ↑r = f a t
⊢ IsRatStieltjesPoint f a
state_after: no goals