l3lab/ntp-mathlib huggingface dataset:
theorem lt_iff_exists_coe {a b : WithTop α} : a < b ↔ ∃ p : α, a = p ∧ ↑p < b := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
a✝ b✝ : α
a b : WithTop α
⊢ a < b ↔ ∃ p, a = ↑p ∧ ↑p < b

Next tactic:
rw [← toDual_lt_toDual_iff, WithBot.lt_iff_exists_coe, OrderDual.exists]
theorem lt_iff_exists_coe {a b : WithTop α} : a < b ↔ ∃ p : α, a = p ∧ ↑p < b := by
  rw [← toDual_lt_toDual_iff, WithBot.lt_iff_exists_coe, OrderDual.exists]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
a✝ b✝ : α
a b : WithTop α
⊢ (∃ a_1, WithTop.toDual a = ↑(toDual a_1) ∧ WithTop.toDual b < ↑(toDual a_1)) ↔ ∃ p, a = ↑p ∧ ↑p < b

Next tactic:
exact exists_congr fun _ => and_congr_left' Iff.rfl
theorem coe_lt_iff {x : WithTop α} : ↑a < x ↔ ∀ b, x = ↑b → a < b := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
a b : α
x : WithTop α
⊢ ↑a < x ↔ ∀ (b : WithTop α), x = b → ↑a < b

Next tactic:
simp
instance preorder [Preorder α] : Preorder (WithTop α) where
  le := (· ≤ ·)
  lt := (· < ·)
  lt_iff_le_not_le := by simp [← toDual_lt_toDual_iff, lt_iff_le_not_le]
  le_refl _ := toDual_le_toDual_iff.mp le_rfl
  le_trans _ _ _ := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Preorder α
x✝² x✝¹ x✝ : WithTop α
⊢ x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝

Next tactic:
simp_rw [← toDual_le_toDual_iff]
instance preorder [Preorder α] : Preorder (WithTop α) where
  le := (· ≤ ·)
  lt := (· < ·)
  lt_iff_le_not_le := by simp [← toDual_lt_toDual_iff, lt_iff_le_not_le]
  le_refl _ := toDual_le_toDual_iff.mp le_rfl
  le_trans _ _ _ := by
    simp_rw [← toDual_le_toDual_iff]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Preorder α
x✝² x✝¹ x✝ : WithTop α
⊢ WithTop.toDual x✝¹ ≤ WithTop.toDual x✝² →
    WithTop.toDual x✝ ≤ WithTop.toDual x✝¹ → WithTop.toDual x✝ ≤ WithTop.toDual x✝²

Next tactic:
exact Function.swap le_trans
instance preorder [Preorder α] : Preorder (WithTop α) where
  le := (· ≤ ·)
  lt := (· < ·)
  lt_iff_le_not_le := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : Preorder α
⊢ ∀ (a b : WithTop α), a < b ↔ a ≤ b ∧ ¬b ≤ a

Next tactic:
simp [← toDual_lt_toDual_iff, lt_iff_le_not_le]
instance partialOrder [PartialOrder α] : PartialOrder (WithTop α) :=
  { WithTop.preorder with
    le_antisymm := fun _ _ => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : PartialOrder α
src✝ : Preorder (WithTop α) := preorder
x✝¹ x✝ : WithTop α
⊢ x✝¹ ≤ x✝ → x✝ ≤ x✝¹ → x✝¹ = x✝

Next tactic:
simp_rw [← toDual_le_toDual_iff]
instance partialOrder [PartialOrder α] : PartialOrder (WithTop α) :=
  { WithTop.preorder with
    le_antisymm := fun _ _ => by
      simp_rw [← toDual_le_toDual_iff]
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : PartialOrder α
src✝ : Preorder (WithTop α) := preorder
x✝¹ x✝ : WithTop α
⊢ WithTop.toDual x✝ ≤ WithTop.toDual x✝¹ → WithTop.toDual x✝¹ ≤ WithTop.toDual x✝ → x✝¹ = x✝

Next tactic:
exact Function.swap le_antisymm
@[simp]
theorem monotone_map_iff [Preorder α] [Preorder β] {f : α → β} :
    Monotone (WithTop.map f) ↔ Monotone f :=
  monotone_iff.trans <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ ((Monotone fun a => map f ↑a) ∧ ∀ (x : α), map f ↑x ≤ map f ⊤) ↔ Monotone f

Next tactic:
simp [Monotone]
@[simp]
theorem strictMono_map_iff [Preorder α] [Preorder β] {f : α → β} :
    StrictMono (WithTop.map f) ↔ StrictMono f :=
  strictMono_iff.trans <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ ((StrictMono fun a => map f ↑a) ∧ ∀ (x : α), map f ↑x < map f ⊤) ↔ StrictMono f

Next tactic:
simp [StrictMono, coe_lt_top]
theorem map_le_iff [Preorder α] [Preorder β] (f : α → β) (a b : WithTop α)
    (mono_iff : ∀ {a b}, f a ≤ f b ↔ a ≤ b) :
    a.map f ≤ b.map f ↔ a ≤ b := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
a b : WithTop α
mono_iff : ∀ {a b : α}, f a ≤ f b ↔ a ≤ b
⊢ map f a ≤ map f b ↔ a ≤ b

Next tactic:
erw [← toDual_le_toDual_iff, toDual_map, toDual_map, WithBot.map_le_iff, toDual_le_toDual_iff]
theorem map_le_iff [Preorder α] [Preorder β] (f : α → β) (a b : WithTop α)
    (mono_iff : ∀ {a b}, f a ≤ f b ↔ a ≤ b) :
    a.map f ≤ b.map f ↔ a ≤ b := by
  erw [← toDual_le_toDual_iff, toDual_map, toDual_map, WithBot.map_le_iff, toDual_le_toDual_iff]
  

Proof state:
case mono_iff
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
a b : WithTop α
mono_iff : ∀ {a b : α}, f a ≤ f b ↔ a ≤ b
⊢ ∀ {a b : αᵒᵈ}, (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) a ≤ (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) b ↔ a ≤ b

Next tactic:
simp [mono_iff]
theorem le_untop'_iff [LE α] {a : WithTop α} {b c : α} (h : a = ⊤ → c ≤ b) :
    c ≤ a.untop' b ↔ c ≤ a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LE α
a : WithTop α
b c : α
h : a = ⊤ → c ≤ b
⊢ c ≤ untop' b a ↔ ↑c ≤ a

Next tactic:
cases a
theorem le_untop'_iff [LE α] {a : WithTop α} {b c : α} (h : a = ⊤ → c ≤ b) :
    c ≤ a.untop' b ↔ c ≤ a := by
  cases a
  · 

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LE α
b c : α
h : none = ⊤ → c ≤ b
⊢ c ≤ untop' b none ↔ ↑c ≤ none

Next tactic:
simpa using h rfl
theorem le_untop'_iff [LE α] {a : WithTop α} {b c : α} (h : a = ⊤ → c ≤ b) :
    c ≤ a.untop' b ↔ c ≤ a := by
  cases a
  · simpa using h rfl
  · 

Proof state:
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LE α
b c val✝ : α
h : Option.some val✝ = ⊤ → c ≤ b
⊢ c ≤ untop' b (Option.some val✝) ↔ ↑c ≤ Option.some val✝

Next tactic:
simp [some_eq_coe]
theorem lt_untop'_iff [LT α] {a : WithTop α} {b c : α} (h : a = ⊤ → c < b) :
    c < a.untop' b ↔ c < a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
a : WithTop α
b c : α
h : a = ⊤ → c < b
⊢ c < untop' b a ↔ ↑c < a

Next tactic:
cases a
theorem lt_untop'_iff [LT α] {a : WithTop α} {b c : α} (h : a = ⊤ → c < b) :
    c < a.untop' b ↔ c < a := by
  cases a
  · 

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
b c : α
h : none = ⊤ → c < b
⊢ c < untop' b none ↔ ↑c < none

Next tactic:
simpa [none_eq_top, coe_lt_top] using h rfl
theorem lt_untop'_iff [LT α] {a : WithTop α} {b c : α} (h : a = ⊤ → c < b) :
    c < a.untop' b ↔ c < a := by
  cases a
  · simpa [none_eq_top, coe_lt_top] using h rfl
  · 

Proof state:
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : LT α
b c val✝ : α
h : Option.some val✝ = ⊤ → c < b
⊢ c < untop' b (Option.some val✝) ↔ ↑c < Option.some val✝

Next tactic:
simp [some_eq_coe]
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ : WithTop α
a : α
ha : a ∈ o₁
⊢ ∃ b, b ∈ o₁ ⊓ o₂ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; 

Proof state:
case refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₂ : WithTop α
a : α
⊢ ∃ b, b ∈ Option.some a ⊓ o₂ ∧ b ≤ a

Next tactic:
cases o₂
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> 

Proof state:
case refl.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
a : α
⊢ ∃ b, b ∈ Option.some a ⊓ none ∧ b ≤ a

Next tactic:
simp [Option.liftOrGet]
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> 

Proof state:
case refl.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
a val✝ : α
⊢ ∃ b, b ∈ Option.some a ⊓ Option.some val✝ ∧ b ≤ a

Next tactic:
simp [Option.liftOrGet]
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ : WithTop α
a : α
ha : a ∈ o₂
⊢ ∃ b, b ∈ o₁ ⊓ o₂ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; 

Proof state:
case refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a : α
⊢ ∃ b, b ∈ o₁ ⊓ Option.some a ∧ b ≤ a

Next tactic:
cases o₁
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> 

Proof state:
case refl.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
a : α
⊢ ∃ b, b ∈ none ⊓ Option.some a ∧ b ≤ a

Next tactic:
simp [Option.liftOrGet]
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> 

Proof state:
case refl.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
a val✝ : α
⊢ ∃ b, b ∈ Option.some val✝ ⊓ Option.some a ∧ b ≤ a

Next tactic:
simp [Option.liftOrGet]
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ o₃ : WithTop α
h₁ : o₁ ≤ o₂
h₂ : o₁ ≤ o₃
a : α
ha : a ∈ o₂ ⊓ o₃
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases' o₂ with b
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> 

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₃ : WithTop α
h₂ : o₁ ≤ o₃
a : α
h₁ : o₁ ≤ none
ha : a ∈ none ⊓ o₃
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases' o₃ with c
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> 

Proof state:
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₃ : WithTop α
h₂ : o₁ ≤ o₃
a b : α
h₁ : o₁ ≤ Option.some b
ha : a ∈ Option.some b ⊓ o₃
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases' o₃ with c
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> 

Proof state:
case none.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a : α
h₁ h₂ : o₁ ≤ none
ha : a ∈ none ⊓ none
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> 

Proof state:
case none.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a : α
h₁ : o₁ ≤ none
c : α
h₂ : o₁ ≤ Option.some c
ha : a ∈ none ⊓ Option.some c
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> 

Proof state:
case some.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a b : α
h₁ : o₁ ≤ Option.some b
h₂ : o₁ ≤ none
ha : a ∈ Option.some b ⊓ none
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> 

Proof state:
case some.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a b : α
h₁ : o₁ ≤ Option.some b
c : α
h₂ : o₁ ≤ Option.some c
ha : a ∈ Option.some b ⊓ Option.some c
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> cases ha
      · 

Proof state:
case none.some.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a : α
h₁ : o₁ ≤ none
h₂ : o₁ ≤ Option.some a
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
exact h₂ a rfl
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> cases ha
      · exact h₂ a rfl

      · 

Proof state:
case some.none.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
a : α
h₂ : o₁ ≤ none
h₁ : o₁ ≤ Option.some a
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
exact h₁ a rfl
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> cases ha
      · exact h₂ a rfl

      · exact h₁ a rfl

      · 

Proof state:
case some.some.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ : WithTop α
b : α
h₁ : o₁ ≤ Option.some b
c : α
h₂ : o₁ ≤ Option.some c
⊢ ∃ b_1, b_1 ∈ o₁ ∧ b_1 ≤ (fun x x_1 => x ⊓ x_1) b c

Next tactic:
rcases h₁ b rfl with ⟨d, ⟨⟩, h₁'⟩
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> cases ha
      · exact h₂ a rfl

      · exact h₁ a rfl

      · rcases h₁ b rfl with ⟨d, ⟨⟩, h₁'⟩
        

Proof state:
case some.some.refl.intro.intro.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
b c d : α
h₁' : d ≤ b
h₁ : Option.some d ≤ Option.some b
h₂ : Option.some d ≤ Option.some c
⊢ ∃ b_1, b_1 ∈ Option.some d ∧ b_1 ≤ (fun x x_1 => x ⊓ x_1) b c

Next tactic:
simp at h₂
instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) :=
  { WithTop.partialOrder with
    inf := Option.liftOrGet (· ⊓ ·),
    inf_le_left := fun o₁ o₂ a ha => by cases ha; cases o₂ <;> simp [Option.liftOrGet],
    inf_le_right := fun o₁ o₂ a ha => by cases ha; cases o₁ <;> simp [Option.liftOrGet],
    le_inf := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases' o₂ with b <;> cases' o₃ with c <;> cases ha
      · exact h₂ a rfl

      · exact h₁ a rfl

      · rcases h₁ b rfl with ⟨d, ⟨⟩, h₁'⟩
        simp at h₂
        

Proof state:
case some.some.refl.intro.intro.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeInf α
src✝ : PartialOrder (WithTop α) := partialOrder
b c d : α
h₁' : d ≤ b
h₁ : Option.some d ≤ Option.some b
h₂ : d ≤ c
⊢ ∃ b_1, b_1 ∈ Option.some d ∧ b_1 ≤ (fun x x_1 => x ⊓ x_1) b c

Next tactic:
exact ⟨d, rfl, le_inf h₁' h₂⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ : WithTop α
a : α
ha : a ∈ o₁ ⊔ o₂
⊢ ∃ b, b ∈ o₁ ∧ b ≤ a

Next tactic:
rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      

Proof state:
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
a b : α
ha : a ⊔ b ∈ Option.some a ⊔ Option.some b
⊢ ∃ b_1, b_1 ∈ Option.some a ∧ b_1 ≤ a ⊔ b

Next tactic:
exact ⟨_, rfl, le_sup_left⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_left⟩,
    le_sup_right := fun o₁ o₂ a ha => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ : WithTop α
a : α
ha : a ∈ o₁ ⊔ o₂
⊢ ∃ b, b ∈ o₂ ∧ b ≤ a

Next tactic:
rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_left⟩,
    le_sup_right := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      

Proof state:
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
a b : α
ha : a ⊔ b ∈ Option.some a ⊔ Option.some b
⊢ ∃ b_1, b_1 ∈ Option.some b ∧ b_1 ≤ a ⊔ b

Next tactic:
exact ⟨_, rfl, le_sup_right⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_left⟩,
    le_sup_right := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_right⟩,
    sup_le := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ o₃ : WithTop α
h₁ : o₁ ≤ o₃
h₂ : o₂ ≤ o₃
a : α
ha : a ∈ o₃
⊢ ∃ b, b ∈ o₁ ⊔ o₂ ∧ b ≤ a

Next tactic:
cases ha
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_left⟩,
    le_sup_right := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_right⟩,
    sup_le := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases ha
      

Proof state:
case refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
o₁ o₂ : WithTop α
a : α
h₁ : o₁ ≤ Option.some a
h₂ : o₂ ≤ Option.some a
⊢ ∃ b, b ∈ o₁ ⊔ o₂ ∧ b ≤ a

Next tactic:
rcases h₁ a rfl with ⟨b, ⟨⟩, ab⟩
instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) :=
  { WithTop.partialOrder with
    sup := Option.map₂ (· ⊔ ·),
    le_sup_left := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_left⟩,
    le_sup_right := fun o₁ o₂ a ha => by
      rcases Option.mem_map₂_iff.1 ha with ⟨a, b, (rfl : _ = _), (rfl : _ = _), rfl⟩
      exact ⟨_, rfl, le_sup_right⟩,
    sup_le := fun o₁ o₂ o₃ h₁ h₂ a ha => by
      cases ha
      rcases h₁ a rfl with ⟨b, ⟨⟩, ab⟩
      

Proof state:
case refl.intro.intro.refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : SemilatticeSup α
src✝ : PartialOrder (WithTop α) := partialOrder
o₂ : WithTop α
a : α
h₂ : o₂ ≤ Option.some a
b : α
ab : b ≤ a
h₁ : Option.some b ≤ Option.some a
⊢ ∃ b_1, b_1 ∈ Option.some b ⊔ o₂ ∧ b_1 ≤ a

Next tactic:
rcases h₂ a rfl with ⟨c, ⟨⟩, ac⟩