Theorem: Set.OrdConnected.measurableSet
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: let u := ⋃ (x ∈ s) (y ∈ s), Ioo x y
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
⊢ MeasurableSet s

tactic: have huopen : IsOpen u := isOpen_biUnion fun _ _ => isOpen_biUnion fun _ _ => isOpen_Ioo
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
⊢ MeasurableSet s

tactic: have humeas : MeasurableSet u := huopen.measurableSet
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
huopen : IsOpen u
⊢ MeasurableSet s

tactic: have hfinite : (s \ u).Finite := s.finite_diff_iUnion_Ioo
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
huopen : IsOpen u
humeas : MeasurableSet u
⊢ MeasurableSet s

tactic: have : u ⊆ s := iUnion₂_subset fun x hx => iUnion₂_subset fun y hy =>
  Ioo_subset_Icc_self.trans (h.out hx hy)
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
huopen : IsOpen u
humeas : MeasurableSet u
hfinite : Set.Finite (s \ u)
⊢ MeasurableSet s

tactic: rw [← union_diff_cancel this]
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
huopen : IsOpen u
humeas : MeasurableSet u
hfinite : Set.Finite (s \ u)
this : u ⊆ s
⊢ MeasurableSet s

tactic: exact humeas.union hfinite.measurableSet
state_before: α : Type u_1
β : Type ?u.603118
γ : Type ?u.603121
γ₂ : Type ?u.603124
δ : Type ?u.603127
ι : Sort y
s t u✝ : Set α
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : MeasurableSpace α
inst✝¹⁴ : OpensMeasurableSpace α
inst✝¹³ : TopologicalSpace β
inst✝¹² : MeasurableSpace β
inst✝¹¹ : OpensMeasurableSpace β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : MeasurableSpace γ
inst✝⁸ : BorelSpace γ
inst✝⁷ : TopologicalSpace γ₂
inst✝⁶ : MeasurableSpace γ₂
inst✝⁵ : BorelSpace γ₂
inst✝⁴ : MeasurableSpace δ
α' : Type ?u.603220
inst✝³ : TopologicalSpace α'
inst✝² : MeasurableSpace α'
inst✝¹ : LinearOrder α
inst✝ : OrderClosedTopology α
a b x : α
h : OrdConnected s
u : Set α := ⋃ (x : α) (_ : x ∈ s) (y : α) (_ : y ∈ s), Ioo x y
huopen : IsOpen u
humeas : MeasurableSet u
hfinite : Set.Finite (s \ u)
this : u ⊆ s
⊢ MeasurableSet (u ∪ s \ u)