l3lab/ntp-mathlib huggingface dataset:
/-- A family of continuous functions yields a continuous family of functions. -/
@[simps]
def flip {α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ where
  toFun x y := f y x
  monotone' x y h a := (f a).monotone h
  cont := by intro _; ext x; 

Proof state:
case h
α✝ : Type u
α' : Type u_1
β : Type v
β' : Type u_2
γ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α✝
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
α : Type u_5
f : α → β →𝒄 γ
c✝ : Chain β
x : α
⊢ { toFun := fun x y => (f y) x, monotone' := (_ : ∀ (x y : β), x ≤ y → ∀ (a : α), (f a) x ≤ (f a) y) } (ωSup c✝) x =
    ωSup
      (Chain.map c✝
        { toFun := fun x y => (f y) x, monotone' := (_ : ∀ (x y : β), x ≤ y → ∀ (a : α), (f a) x ≤ (f a) y) })
      x

Next tactic:
change f _ _ = _
/-- A family of continuous functions yields a continuous family of functions. -/
@[simps]
def flip {α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ where
  toFun x y := f y x
  monotone' x y h a := (f a).monotone h
  cont := by intro _; ext x; change f _ _ = _; 

Proof state:
case h
α✝ : Type u
α' : Type u_1
β : Type v
β' : Type u_2
γ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α✝
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
α : Type u_5
f : α → β →𝒄 γ
c✝ : Chain β
x : α
⊢ (f x) (ωSup c✝) =
    ωSup
      (Chain.map c✝
        { toFun := fun x y => (f y) x, monotone' := (_ : ∀ (x y : β), x ≤ y → ∀ (a : α), (f a) x ≤ (f a) y) })
      x

Next tactic:
rw [(f _).continuous]
/-- A family of continuous functions yields a continuous family of functions. -/
@[simps]
def flip {α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ where
  toFun x y := f y x
  monotone' x y h a := (f a).monotone h
  cont := by intro _; ext x; change f _ _ = _; rw [(f _).continuous]; 

Proof state:
case h
α✝ : Type u
α' : Type u_1
β : Type v
β' : Type u_2
γ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α✝
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
α : Type u_5
f : α → β →𝒄 γ
c✝ : Chain β
x : α
⊢ ωSup (Chain.map c✝ ↑(f x)) =
    ωSup
      (Chain.map c✝
        { toFun := fun x y => (f y) x, monotone' := (_ : ∀ (x y : β), x ≤ y → ∀ (a : α), (f a) x ≤ (f a) y) })
      x

Next tactic:
rfl
/-- `Part.bind` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def bind {β γ : Type v} (f : α →𝒄 Part β) (g : α →𝒄 β → Part γ) : α →𝒄 Part γ :=
  .mk (OrderHom.bind f g.toOrderHom) fun c => by
    

Proof state:
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α →𝒄 Part β
g : α →𝒄 β → Part γ
c : Chain α
⊢ (OrderHom.bind (↑f) g.toOrderHom) (ωSup c) = ωSup (Chain.map c (OrderHom.bind (↑f) g.toOrderHom))

Next tactic:
rw [ωSup_bind, ← f.continuous, g.toOrderHom_eq_coe, ← g.continuous]
/-- `Part.bind` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def bind {β γ : Type v} (f : α →𝒄 Part β) (g : α →𝒄 β → Part γ) : α →𝒄 Part γ :=
  .mk (OrderHom.bind f g.toOrderHom) fun c => by
    rw [ωSup_bind, ← f.continuous, g.toOrderHom_eq_coe, ← g.continuous]
    

Proof state:
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α →𝒄 Part β
g : α →𝒄 β → Part γ
c : Chain α
⊢ (OrderHom.bind ↑f ↑g) (ωSup c) = f (ωSup c) >>= g (ωSup c)

Next tactic:
rfl
/-- `Part.map` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def map {β γ : Type v} (f : β → γ) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f <$> g x) (bind g (const (pure ∘ f))) <| by
    

Proof state:
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : β → γ
g : α →𝒄 Part β
⊢ (fun x => f <$> g x) = ⇑(bind g (const (pure ∘ f)))

Next tactic:
ext1
/-- `Part.map` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def map {β γ : Type v} (f : β → γ) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f <$> g x) (bind g (const (pure ∘ f))) <| by
    ext1
    

Proof state:
case h
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : β → γ
g : α →𝒄 Part β
x✝ : α
⊢ f <$> g x✝ = (bind g (const (pure ∘ f))) x✝

Next tactic:
simp only [map_eq_bind_pure_comp, bind, coe_mk, OrderHom.bind_coe, coe_apply, coe_toOrderHom,
      const_apply]
/-- `Part.seq` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def seq {β γ : Type v} (f : α →𝒄 Part (β → γ)) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f x <*> g x) (bind f <| flip <| _root_.flip map g) <| by
      

Proof state:
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α →𝒄 Part (β → γ)
g : α →𝒄 Part β
⊢ (fun x => Seq.seq (f x) fun x_1 => g x) = ⇑(bind f (flip (_root_.flip map g)))

Next tactic:
ext
/-- `Part.seq` as a continuous function. -/
@[simps! apply] --Porting note: removed `(config := { rhsMd := reducible })`
noncomputable def seq {β γ : Type v} (f : α →𝒄 Part (β → γ)) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f x <*> g x) (bind f <| flip <| _root_.flip map g) <| by
      ext
      

Proof state:
case h.H
α : Type u
α' : Type u_1
β✝ : Type v
β' : Type u_2
γ✝ : Type u_3
φ : Type u_4
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α →𝒄 Part (β → γ)
g : α →𝒄 Part β
x✝ : α
a✝ : γ
⊢ (a✝ ∈ Seq.seq (f x✝) fun x => g x✝) ↔ a✝ ∈ (bind f (flip (_root_.flip map g))) x✝

Next tactic:
simp only [seq_eq_bind_map, Part.bind_eq_bind, Part.mem_bind_iff, flip_apply, _root_.flip,
        map_apply, bind_apply]
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
⊢ hitting u s n m ω = m

Next tactic:
simp_rw [hitting]
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
⊢ (if ∃ j ∈ Set.Icc n m, u j ω ∈ s then sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) else m) = m

Next tactic:
have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    intro j
    rw [Set.Icc_eq_empty_of_lt h]
    simp only [Set.mem_empty_iff_false, IsEmpty.forall_iff]
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
⊢ ¬∃ j, ∃ (_ : j ∈ Set.Icc n m), u j ω ∈ s

Next tactic:
push_neg
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
⊢ ∀ j ∈ Set.Icc n m, u j ω ∉ s

Next tactic:
intro j
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    intro j
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
j : ι
⊢ j ∈ Set.Icc n m → u j ω ∉ s

Next tactic:
rw [Set.Icc_eq_empty_of_lt h]
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    intro j
    rw [Set.Icc_eq_empty_of_lt h]
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
j : ι
⊢ j ∈ ∅ → u j ω ∉ s

Next tactic:
simp only [Set.mem_empty_iff_false, IsEmpty.forall_iff]
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    intro j
    rw [Set.Icc_eq_empty_of_lt h]
    simp only [Set.mem_empty_iff_false, IsEmpty.forall_iff]
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
h_not : ¬∃ j, ∃ (_ : j ∈ Set.Icc n m), u j ω ∈ s
⊢ (if ∃ j ∈ Set.Icc n m, u j ω ∈ s then sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) else m) = m

Next tactic:
simp only [exists_prop] at h_not
/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m := by
  simp_rw [hitting]
  have h_not : ¬∃ (j : ι) (_ : j ∈ Set.Icc n m), u j ω ∈ s := by
    push_neg
    intro j
    rw [Set.Icc_eq_empty_of_lt h]
    simp only [Set.mem_empty_iff_false, IsEmpty.forall_iff]
  simp only [exists_prop] at h_not
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h : m < n
h_not : ¬∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ (if ∃ j ∈ Set.Icc n m, u j ω ∈ s then sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) else m) = m

Next tactic:
simp only [h_not, if_false]
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
⊢ hitting u s n m ω ≤ m

Next tactic:
simp only [hitting]
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  simp only [hitting]
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
⊢ (if ∃ j ∈ Set.Icc n m, u j ω ∈ s then sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) else m) ≤ m

Next tactic:
split_ifs with h
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  simp only [hitting]
  split_ifs with h
  · 

Proof state:
case pos
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
h : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ≤ m

Next tactic:
obtain ⟨j, hj₁, hj₂⟩ := h
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  simp only [hitting]
  split_ifs with h
  · obtain ⟨j, hj₁, hj₂⟩ := h
    

Proof state:
case pos.intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : u j ω ∈ s
⊢ sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ≤ m

Next tactic:
change j ∈ {i | u i ω ∈ s} at hj₂
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  simp only [hitting]
  split_ifs with h
  · obtain ⟨j, hj₁, hj₂⟩ := h
    change j ∈ {i | u i ω ∈ s} at hj₂
    

Proof state:
case pos.intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : j ∈ {i | u i ω ∈ s}
⊢ sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ≤ m

Next tactic:
exact (csInf_le (BddBelow.inter_of_left bddBelow_Icc) (Set.mem_inter hj₁ hj₂)).trans hj₁.2
theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m := by
  simp only [hitting]
  split_ifs with h
  · obtain ⟨j, hj₁, hj₂⟩ := h
    change j ∈ {i | u i ω ∈ s} at hj₂
    exact (csInf_le (BddBelow.inter_of_left bddBelow_Icc) (Set.mem_inter hj₁ hj₂)).trans hj₁.2
  · 

Proof state:
case neg
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
ω : Ω
h : ¬∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ m ≤ m

Next tactic:
exact le_rfl
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
⊢ u k ω ∉ s

Next tactic:
classical
  intro h
  have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
  refine' ⟨k, ⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
  refine' not_le.2 hk₁ _
  simp_rw [hitting, if_pos hexists]
  exact csInf_le bddBelow_Icc.inter_of_left ⟨⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
⊢ u k ω ∉ s

Next tactic:
intro h
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  intro h
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
⊢ False

Next tactic:
have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  intro h
  have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
  

Proof state:
case hexists
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
⊢ ∃ j ∈ Set.Icc n m, u j ω ∈ s
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ False

Next tactic:
refine' ⟨k, ⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  intro h
  have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
  refine' ⟨k, ⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ False

Next tactic:
refine' not_le.2 hk₁ _
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  intro h
  have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
  refine' ⟨k, ⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
  refine' not_le.2 hk₁ _
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ hitting u s n m ω ≤ k

Next tactic:
simp_rw [hitting, if_pos hexists]
theorem not_mem_of_lt_hitting {m k : ι} (hk₁ : k < hitting u s n m ω) (hk₂ : n ≤ k) :
    u k ω ∉ s := by
  classical
  intro h
  have hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
  refine' ⟨k, ⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
  refine' not_le.2 hk₁ _
  simp_rw [hitting, if_pos hexists]
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m k : ι
hk₁ : k < hitting u s n m ω
hk₂ : n ≤ k
h : u k ω ∈ s
hexists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ≤ k

Next tactic:
exact csInf_le bddBelow_Icc.inter_of_left ⟨⟨hk₂, le_trans hk₁.le <| hitting_le _⟩, h⟩
theorem hitting_eq_end_iff {m : ι} : hitting u s n m ω = m ↔
    (∃ j ∈ Set.Icc n m, u j ω ∈ s) → sInf (Set.Icc n m ∩ {i : ι | u i ω ∈ s}) = m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
⊢ hitting u s n m ω = m ↔ (∃ j ∈ Set.Icc n m, u j ω ∈ s) → sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) = m

Next tactic:
rw [hitting, ite_eq_right_iff]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
hmn : m ≤ n
⊢ hitting u s n m ω = m

Next tactic:
obtain rfl | h := le_iff_eq_or_lt.1 hmn
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · 

Proof state:
case inl
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
⊢ hitting u s m m ω = m

Next tactic:
rw [hitting, ite_eq_right_iff, forall_exists_index]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    

Proof state:
case inl
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
⊢ ∀ (x : ι), x ∈ Set.Icc m m ∧ u x ω ∈ s → sInf (Set.Icc m m ∩ {i | u i ω ∈ s}) = m

Next tactic:
conv => intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
| ∀ (x : ι), x ∈ Set.Icc m m ∧ u x ω ∈ s → sInf (Set.Icc m m ∩ {i | u i ω ∈ s}) = m

Next tactic:
intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
| ∀ (x : ι), x ∈ Set.Icc m m ∧ u x ω ∈ s → sInf (Set.Icc m m ∩ {i | u i ω ∈ s}) = m

Next tactic:
intro
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => intro; 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
x✝ : ι
| x✝ ∈ Set.Icc m m ∧ u x✝ ω ∈ s → sInf (Set.Icc m m ∩ {i | u i ω ∈ s}) = m

Next tactic:
rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
    

Proof state:
case inl
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i : ι
ω : Ω
m : ι
hmn : m ≤ m
⊢ ∀ (x : ι), m ≤ x → x ≤ m → u x ω ∈ s → sInf ({m} ∩ {i | u i ω ∈ s}) = m

Next tactic:
intro i hi₁ hi₂ hi
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
    intro i hi₁ hi₂ hi
    

Proof state:
case inl
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i✝ : ι
ω : Ω
m : ι
hmn : m ≤ m
i : ι
hi₁ : m ≤ i
hi₂ : i ≤ m
hi : u i ω ∈ s
⊢ sInf ({m} ∩ {i | u i ω ∈ s}) = m

Next tactic:
rw [Set.inter_eq_left.2, csInf_singleton]
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
    intro i hi₁ hi₂ hi
    rw [Set.inter_eq_left.2, csInf_singleton]
    

Proof state:
case inl
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
i✝ : ι
ω : Ω
m : ι
hmn : m ≤ m
i : ι
hi₁ : m ≤ i
hi₂ : i ≤ m
hi : u i ω ∈ s
⊢ {m} ⊆ {i | u i ω ∈ s}

Next tactic:
exact Set.singleton_subset_iff.2 (le_antisymm hi₂ hi₁ ▸ hi)
theorem hitting_of_le {m : ι} (hmn : m ≤ n) : hitting u s n m ω = m := by
  obtain rfl | h := le_iff_eq_or_lt.1 hmn
  · rw [hitting, ite_eq_right_iff, forall_exists_index]
    conv => intro; rw [Set.mem_Icc, Set.Icc_self, and_imp, and_imp]
    intro i hi₁ hi₂ hi
    rw [Set.inter_eq_left.2, csInf_singleton]
    exact Set.singleton_subset_iff.2 (le_antisymm hi₂ hi₁ ▸ hi)
  · 

Proof state:
case inr
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
hmn : m ≤ n
h : m < n
⊢ hitting u s n m ω = m

Next tactic:
exact hitting_of_lt h
theorem le_hitting {m : ι} (hnm : n ≤ m) (ω : Ω) : n ≤ hitting u s n m ω := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω✝ : Ω
m : ι
hnm : n ≤ m
ω : Ω
⊢ n ≤ hitting u s n m ω

Next tactic:
simp only [hitting]