l3lab/ntp-mathlib huggingface dataset:
instance lattice : Lattice (Interval α) :=
  { Interval.semilatticeSup with
    inf := fun s t =>
      match s, t with
      | ⊥, _ => ⊥
      | _, ⊥ => ⊥
      | some s, some t =>
        if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
          some
            ⟨⟨s.fst ⊔ t.fst, s.snd ⊓ t.snd⟩,
              sup_le (le_inf s.fst_le_snd h.1) <| le_inf h.2 t.fst_le_snd⟩
        else ⊥
    inf_le_left := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some _ => bot_le
      | some s, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
        · exact bot_le
    inf_le_right := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some t => bot_le
      | some _, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
        · exact bot_le
    le_inf := fun s t c =>
      match s, t, c with
      | ⊥, t, c => fun _ _ => bot_le
      | some s, t, c => fun hb hc => by
        lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
        lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
        change _ ≤ dite _ _ _
        -- Porting note: was `simp only` but that fails to use the second lemma.
        rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc
        simp only [WithBot.some_eq_coe, WithBot.coe_le_coe] -- at hb hc ⊢
        rw [dif_pos, WithBot.coe_le_coe]
        exact ⟨sup_le hb.1 hc.1, le_inf hb.2 hc.2⟩
        -- Porting note: had to add the next 6 lines including the changes because
        -- it seems that lean cannot automatically turn `NonemptyInterval.toDualProd s`
        -- into `s.toProd` anymore.
        rcases hb with ⟨hb₁, hb₂⟩
        rcases hc with ⟨hc₁, hc₂⟩
        

Proof state:
case intro.intro.hc.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ c✝ : Interval α
s t c : NonemptyInterval α
hb₁ : (NonemptyInterval.toDualProd s).1 ≤ (NonemptyInterval.toDualProd t).1
hb₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd t).2
hc₁ : (NonemptyInterval.toDualProd s).1 ≤ (NonemptyInterval.toDualProd c).1
hc₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd c).2
⊢ t.toProd.1 ≤ c.toProd.2 ∧ c.toProd.1 ≤ t.toProd.2

Next tactic:
change t.toProd.fst ≤ s.toProd.fst at hb₁
instance lattice : Lattice (Interval α) :=
  { Interval.semilatticeSup with
    inf := fun s t =>
      match s, t with
      | ⊥, _ => ⊥
      | _, ⊥ => ⊥
      | some s, some t =>
        if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
          some
            ⟨⟨s.fst ⊔ t.fst, s.snd ⊓ t.snd⟩,
              sup_le (le_inf s.fst_le_snd h.1) <| le_inf h.2 t.fst_le_snd⟩
        else ⊥
    inf_le_left := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some _ => bot_le
      | some s, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
        · exact bot_le
    inf_le_right := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some t => bot_le
      | some _, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
        · exact bot_le
    le_inf := fun s t c =>
      match s, t, c with
      | ⊥, t, c => fun _ _ => bot_le
      | some s, t, c => fun hb hc => by
        lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
        lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
        change _ ≤ dite _ _ _
        -- Porting note: was `simp only` but that fails to use the second lemma.
        rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc
        simp only [WithBot.some_eq_coe, WithBot.coe_le_coe] -- at hb hc ⊢
        rw [dif_pos, WithBot.coe_le_coe]
        exact ⟨sup_le hb.1 hc.1, le_inf hb.2 hc.2⟩
        -- Porting note: had to add the next 6 lines including the changes because
        -- it seems that lean cannot automatically turn `NonemptyInterval.toDualProd s`
        -- into `s.toProd` anymore.
        rcases hb with ⟨hb₁, hb₂⟩
        rcases hc with ⟨hc₁, hc₂⟩
        change t.toProd.fst ≤ s.toProd.fst at hb₁
        

Proof state:
case intro.intro.hc.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ c✝ : Interval α
s t c : NonemptyInterval α
hb₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd t).2
hc₁ : (NonemptyInterval.toDualProd s).1 ≤ (NonemptyInterval.toDualProd c).1
hc₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd c).2
hb₁ : t.toProd.1 ≤ s.toProd.1
⊢ t.toProd.1 ≤ c.toProd.2 ∧ c.toProd.1 ≤ t.toProd.2

Next tactic:
change s.toProd.snd ≤ t.toProd.snd at hb₂
instance lattice : Lattice (Interval α) :=
  { Interval.semilatticeSup with
    inf := fun s t =>
      match s, t with
      | ⊥, _ => ⊥
      | _, ⊥ => ⊥
      | some s, some t =>
        if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
          some
            ⟨⟨s.fst ⊔ t.fst, s.snd ⊓ t.snd⟩,
              sup_le (le_inf s.fst_le_snd h.1) <| le_inf h.2 t.fst_le_snd⟩
        else ⊥
    inf_le_left := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some _ => bot_le
      | some s, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
        · exact bot_le
    inf_le_right := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some t => bot_le
      | some _, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
        · exact bot_le
    le_inf := fun s t c =>
      match s, t, c with
      | ⊥, t, c => fun _ _ => bot_le
      | some s, t, c => fun hb hc => by
        lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
        lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
        change _ ≤ dite _ _ _
        -- Porting note: was `simp only` but that fails to use the second lemma.
        rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc
        simp only [WithBot.some_eq_coe, WithBot.coe_le_coe] -- at hb hc ⊢
        rw [dif_pos, WithBot.coe_le_coe]
        exact ⟨sup_le hb.1 hc.1, le_inf hb.2 hc.2⟩
        -- Porting note: had to add the next 6 lines including the changes because
        -- it seems that lean cannot automatically turn `NonemptyInterval.toDualProd s`
        -- into `s.toProd` anymore.
        rcases hb with ⟨hb₁, hb₂⟩
        rcases hc with ⟨hc₁, hc₂⟩
        change t.toProd.fst ≤ s.toProd.fst at hb₁
        change s.toProd.snd ≤ t.toProd.snd at hb₂
        

Proof state:
case intro.intro.hc.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ c✝ : Interval α
s t c : NonemptyInterval α
hc₁ : (NonemptyInterval.toDualProd s).1 ≤ (NonemptyInterval.toDualProd c).1
hc₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd c).2
hb₁ : t.toProd.1 ≤ s.toProd.1
hb₂ : s.toProd.2 ≤ t.toProd.2
⊢ t.toProd.1 ≤ c.toProd.2 ∧ c.toProd.1 ≤ t.toProd.2

Next tactic:
change c.toProd.fst ≤ s.toProd.fst at hc₁
instance lattice : Lattice (Interval α) :=
  { Interval.semilatticeSup with
    inf := fun s t =>
      match s, t with
      | ⊥, _ => ⊥
      | _, ⊥ => ⊥
      | some s, some t =>
        if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
          some
            ⟨⟨s.fst ⊔ t.fst, s.snd ⊓ t.snd⟩,
              sup_le (le_inf s.fst_le_snd h.1) <| le_inf h.2 t.fst_le_snd⟩
        else ⊥
    inf_le_left := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some _ => bot_le
      | some s, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
        · exact bot_le
    inf_le_right := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some t => bot_le
      | some _, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
        · exact bot_le
    le_inf := fun s t c =>
      match s, t, c with
      | ⊥, t, c => fun _ _ => bot_le
      | some s, t, c => fun hb hc => by
        lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
        lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
        change _ ≤ dite _ _ _
        -- Porting note: was `simp only` but that fails to use the second lemma.
        rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc
        simp only [WithBot.some_eq_coe, WithBot.coe_le_coe] -- at hb hc ⊢
        rw [dif_pos, WithBot.coe_le_coe]
        exact ⟨sup_le hb.1 hc.1, le_inf hb.2 hc.2⟩
        -- Porting note: had to add the next 6 lines including the changes because
        -- it seems that lean cannot automatically turn `NonemptyInterval.toDualProd s`
        -- into `s.toProd` anymore.
        rcases hb with ⟨hb₁, hb₂⟩
        rcases hc with ⟨hc₁, hc₂⟩
        change t.toProd.fst ≤ s.toProd.fst at hb₁
        change s.toProd.snd ≤ t.toProd.snd at hb₂
        change c.toProd.fst ≤ s.toProd.fst at hc₁
        

Proof state:
case intro.intro.hc.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ c✝ : Interval α
s t c : NonemptyInterval α
hc₂ : (NonemptyInterval.toDualProd s).2 ≤ (NonemptyInterval.toDualProd c).2
hb₁ : t.toProd.1 ≤ s.toProd.1
hb₂ : s.toProd.2 ≤ t.toProd.2
hc₁ : c.toProd.1 ≤ s.toProd.1
⊢ t.toProd.1 ≤ c.toProd.2 ∧ c.toProd.1 ≤ t.toProd.2

Next tactic:
change s.toProd.snd ≤ c.toProd.snd at hc₂
instance lattice : Lattice (Interval α) :=
  { Interval.semilatticeSup with
    inf := fun s t =>
      match s, t with
      | ⊥, _ => ⊥
      | _, ⊥ => ⊥
      | some s, some t =>
        if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
          some
            ⟨⟨s.fst ⊔ t.fst, s.snd ⊓ t.snd⟩,
              sup_le (le_inf s.fst_le_snd h.1) <| le_inf h.2 t.fst_le_snd⟩
        else ⊥
    inf_le_left := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some _ => bot_le
      | some s, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
        · exact bot_le
    inf_le_right := fun s t =>
      match s, t with
      | ⊥, ⊥ => bot_le
      | ⊥, some t => bot_le
      | some _, ⊥ => bot_le
      | some s, some t => by
        change dite _ _ _ ≤ _
        split_ifs
        · exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
        · exact bot_le
    le_inf := fun s t c =>
      match s, t, c with
      | ⊥, t, c => fun _ _ => bot_le
      | some s, t, c => fun hb hc => by
        lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
        lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
        change _ ≤ dite _ _ _
        -- Porting note: was `simp only` but that fails to use the second lemma.
        rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc
        simp only [WithBot.some_eq_coe, WithBot.coe_le_coe] -- at hb hc ⊢
        rw [dif_pos, WithBot.coe_le_coe]
        exact ⟨sup_le hb.1 hc.1, le_inf hb.2 hc.2⟩
        -- Porting note: had to add the next 6 lines including the changes because
        -- it seems that lean cannot automatically turn `NonemptyInterval.toDualProd s`
        -- into `s.toProd` anymore.
        rcases hb with ⟨hb₁, hb₂⟩
        rcases hc with ⟨hc₁, hc₂⟩
        change t.toProd.fst ≤ s.toProd.fst at hb₁
        change s.toProd.snd ≤ t.toProd.snd at hb₂
        change c.toProd.fst ≤ s.toProd.fst at hc₁
        change s.toProd.snd ≤ c.toProd.snd at hc₂
        -- Porting note: originally it just had `hb.1` etc. in this next line
        

Proof state:
case intro.intro.hc.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ c✝ : Interval α
s t c : NonemptyInterval α
hb₁ : t.toProd.1 ≤ s.toProd.1
hb₂ : s.toProd.2 ≤ t.toProd.2
hc₁ : c.toProd.1 ≤ s.toProd.1
hc₂ : s.toProd.2 ≤ c.toProd.2
⊢ t.toProd.1 ≤ c.toProd.2 ∧ c.toProd.1 ≤ t.toProd.2

Next tactic:
exact ⟨hb₁.trans <| s.fst_le_snd.trans hc₂, hc₁.trans <| s.fst_le_snd.trans hb₂⟩
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : Interval α
⊢ ↑(s ⊓ t) = ↑s ∩ ↑t

Next tactic:
cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · rfl
      · exact (Icc_eq_empty fun H =>
          h ⟨le_sup_left.trans <| H.trans inf_le_right,
          le_sup_right.trans <| H.trans inf_le_left⟩).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
t : Interval α
⊢ ↑(none ⊓ t) = ↑none ∩ ↑t

Next tactic:
| none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
t : Interval α
⊢ ↑(none ⊓ t) = ↑none ∩ ↑t

Next tactic:
rw [WithBot.none_eq_bot, bot_inf_eq]
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    

Proof state:
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
t : Interval α
⊢ ↑⊥ = ↑⊥ ∩ ↑t

Next tactic:
exact (empty_inter _).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  

Proof state:
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
t : Interval α
s : NonemptyInterval α
⊢ ↑(some s ⊓ t) = ↑(some s) ∩ ↑t

Next tactic:
| some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · rfl
      · exact (Icc_eq_empty fun H =>
          h ⟨le_sup_left.trans <| H.trans inf_le_right,
          le_sup_right.trans <| H.trans inf_le_left⟩).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    

Proof state:
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
t : Interval α
s : NonemptyInterval α
⊢ ↑(some s ⊓ t) = ↑(some s) ∩ ↑t

Next tactic:
cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · rfl
      · exact (Icc_eq_empty fun H =>
          h ⟨le_sup_left.trans <| H.trans inf_le_right,
          le_sup_right.trans <| H.trans inf_le_left⟩).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    

Proof state:
case some.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : NonemptyInterval α
⊢ ↑(some s ⊓ none) = ↑(some s) ∩ ↑none

Next tactic:
| none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      

Proof state:
case some.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : NonemptyInterval α
⊢ ↑(some s ⊓ none) = ↑(some s) ∩ ↑none

Next tactic:
rw [WithBot.none_eq_bot, inf_bot_eq]
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      

Proof state:
case some.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : NonemptyInterval α
⊢ ↑⊥ = ↑(some s) ∩ ↑⊥

Next tactic:
exact (inter_empty _).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    

Proof state:
case some.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : NonemptyInterval α
⊢ ↑(some s ⊓ some t) = ↑(some s) ∩ ↑(some t)

Next tactic:
| some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · rfl
      · exact (Icc_eq_empty fun H =>
          h ⟨le_sup_left.trans <| H.trans inf_le_right,
          le_sup_right.trans <| H.trans inf_le_left⟩).symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      

Proof state:
case some.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : NonemptyInterval α
⊢ ↑(some s ⊓ some t) = ↑(some s) ∩ ↑(some t)

Next tactic:
refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      

Proof state:
case some.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : NonemptyInterval α
⊢ ↑(if h : s.toProd.1 ≤ t.toProd.2 ∧ t.toProd.1 ≤ s.toProd.2 then
        some
          { toProd := (s.toProd.1 ⊔ t.toProd.1, s.toProd.2 ⊓ t.toProd.2),
            fst_le_snd := (_ : s.toProd.1 ⊔ t.toProd.1 ≤ (s.toProd.1 ⊔ t.toProd.1, s.toProd.2 ⊓ t.toProd.2).2) }
      else ⊥) =
    Icc (s.toProd.1 ⊔ t.toProd.1) (s.toProd.2 ⊓ t.toProd.2)

Next tactic:
split_ifs with h
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : NonemptyInterval α
h : s.toProd.1 ≤ t.toProd.2 ∧ t.toProd.1 ≤ s.toProd.2
⊢ ↑(some
        { toProd := (s.toProd.1 ⊔ t.toProd.1, s.toProd.2 ⊓ t.toProd.2),
          fst_le_snd := (_ : s.toProd.1 ⊔ t.toProd.1 ≤ (s.toProd.1 ⊔ t.toProd.1, s.toProd.2 ⊓ t.toProd.2).2) }) =
    Icc (s.toProd.1 ⊔ t.toProd.1) (s.toProd.2 ⊓ t.toProd.2)

Next tactic:
rfl
@[simp, norm_cast]
theorem coe_inf (s t : Interval α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t := by
  cases s with
  | none =>
    rw [WithBot.none_eq_bot, bot_inf_eq]
    exact (empty_inter _).symm
  | some s =>
    cases t with
    | none =>
      rw [WithBot.none_eq_bot, inf_bot_eq]
      exact (inter_empty _).symm
    | some t =>
      refine' (_ : setLike.coe (dite
        -- Porting note: Needed to fill this first `_` explicitly.
        (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd)
        _ _) = _).trans Icc_inter_Icc.symm
      split_ifs with h
      · rfl
      · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : Lattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : NonemptyInterval α
h : ¬(s.toProd.1 ≤ t.toProd.2 ∧ t.toProd.1 ≤ s.toProd.2)
⊢ ↑⊥ = Icc (s.toProd.1 ⊔ t.toProd.1) (s.toProd.2 ⊓ t.toProd.2)

Next tactic:
exact (Icc_eq_empty fun H =>
          h ⟨le_sup_left.trans <| H.trans inf_le_right,
          le_sup_right.trans <| H.trans inf_le_left⟩).symm
@[simp, norm_cast]
theorem disjoint_coe (s t : Interval α) : Disjoint (s : Set α) t ↔ Disjoint s t := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : Lattice α
s t : Interval α
⊢ Disjoint ↑s ↑t ↔ Disjoint s t

Next tactic:
classical
    rw [disjoint_iff_inf_le, disjoint_iff_inf_le, ← coe_subset_coe, coe_inf]
    rfl