[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : LE α
s✝ t✝ s t : NonemptyInterval α
h : s.toProd = t.toProd
⊢ s = t
[PROOFSTEP]
cases s
[GOAL]
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : LE α
s t✝ t : NonemptyInterval α
toProd✝ : α × α
fst_le_snd✝ : toProd✝.fst ≤ toProd✝.snd
h : { toProd := toProd✝, fst_le_snd := fst_le_snd✝ }.toProd = t.toProd
⊢ { toProd := toProd✝, fst_le_snd := fst_le_snd✝ } = t
[PROOFSTEP]
cases t
[GOAL]
case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : LE α
s t : NonemptyInterval α
toProd✝¹ : α × α
fst_le_snd✝¹ : toProd✝¹.fst ≤ toProd✝¹.snd
toProd✝ : α × α
fst_le_snd✝ : toProd✝.fst ≤ toProd✝.snd
h : { toProd := toProd✝¹, fst_le_snd := fst_le_snd✝¹ }.toProd = { toProd := toProd✝, fst_le_snd := fst_le_snd✝ }.toProd
⊢ { toProd := toProd✝¹, fst_le_snd := fst_le_snd✝¹ } = { toProd := toProd✝, fst_le_snd := fst_le_snd✝ }
[PROOFSTEP]
congr
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : Preorder γ
inst✝¹ : Preorder δ
s : NonemptyInterval α
x : α × α
a : α
inst✝ : Nonempty α
⊢ Nonempty α
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : NonemptyInterval α
x : α × α
a b : α
⊢ b ∈ pure a ↔ b = a
[PROOFSTEP]
rw [← SetLike.mem_coe, coe_pure, mem_singleton_iff]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α →o β
s : Interval α
⊢ ↑dual (map f s) = map (↑OrderHom.dual f) (↑dual s)
[PROOFSTEP]
cases s
[GOAL]
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α →o β
⊢ ↑dual (map f none) = map (↑OrderHom.dual f) (↑dual none)
[PROOFSTEP]
rfl
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α →o β
val✝ : NonemptyInterval α
⊢ ↑dual (map f (some val✝)) = map (↑OrderHom.dual f) (↑dual (some val✝))
[PROOFSTEP]
exact WithBot.map_comm rfl _
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s✝ t : Interval α
a b : α
s : Interval α
⊢ ↑(↑dual s) = ↑ofDual ⁻¹' ↑s
[PROOFSTEP]
cases s with
| none => rfl
| some s₀ => exact NonemptyInterval.coe_dual s₀
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s✝ t : Interval α
a b : α
s : Interval α
⊢ ↑(↑dual s) = ↑ofDual ⁻¹' ↑s
[PROOFSTEP]
cases s with
| none => rfl
| some s₀ => exact NonemptyInterval.coe_dual s₀
[GOAL]
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
⊢ ↑(↑dual none) = ↑ofDual ⁻¹' ↑none
[PROOFSTEP]

| none => rfl
[GOAL]
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
⊢ ↑(↑dual none) = ↑ofDual ⁻¹' ↑none
[PROOFSTEP]
rfl
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
s₀ : NonemptyInterval α
⊢ ↑(↑dual (some s₀)) = ↑ofDual ⁻¹' ↑(some s₀)
[PROOFSTEP]

| some s₀ => exact NonemptyInterval.coe_dual s₀
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
s₀ : NonemptyInterval α
⊢ ↑(↑dual (some s₀)) = ↑ofDual ⁻¹' ↑(some s₀)
[PROOFSTEP]
exact NonemptyInterval.coe_dual s₀
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
f : α →o β
⊢ ↑f '' ↑⊥ ⊆ ↑(map f ⊥)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
⊢ b ∈ pure a ↔ b = a
[PROOFSTEP]
rw [← SetLike.mem_coe, coe_pure, mem_singleton_iff]
[GOAL]
α : 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✝ : Interval α
s t : NonemptyInterval α
⊢ some s ⊓ some t ≤ some s
[PROOFSTEP]
change dite _ _ _ ≤ _
[GOAL]
α : 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✝ : Interval α
s t : NonemptyInterval α
⊢ (if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
      some
        { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
          fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) }
    else ⊥) ≤
    some s
[PROOFSTEP]
split_ifs
[GOAL]
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
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ : Interval α
s t : NonemptyInterval α
h✝ : s.fst ≤ t.snd ∧ t.fst ≤ s.snd
⊢ some
      { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
        fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) } ≤
    some s
[PROOFSTEP]
exact WithBot.some_le_some.2 ⟨le_sup_left, inf_le_left⟩
[GOAL]
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
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ : Interval α
s t : NonemptyInterval α
h✝ : ¬(s.fst ≤ t.snd ∧ t.fst ≤ s.snd)
⊢ ⊥ ≤ some s
[PROOFSTEP]
exact bot_le
[GOAL]
α : 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✝ : Interval α
s t : NonemptyInterval α
⊢ some s ⊓ some t ≤ some t
[PROOFSTEP]
change dite _ _ _ ≤ _
[GOAL]
α : 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✝ : Interval α
s t : NonemptyInterval α
⊢ (if h : s.fst ≤ t.snd ∧ t.fst ≤ s.snd then
      some
        { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
          fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) }
    else ⊥) ≤
    some t
[PROOFSTEP]
split_ifs
[GOAL]
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
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ : Interval α
s t : NonemptyInterval α
h✝ : s.fst ≤ t.snd ∧ t.fst ≤ s.snd
⊢ some
      { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
        fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) } ≤
    some t
[PROOFSTEP]
exact WithBot.some_le_some.2 ⟨le_sup_right, inf_le_right⟩
[GOAL]
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
src✝ : SemilatticeSup (Interval α) := semilatticeSup
s✝ t✝ : Interval α
s t : NonemptyInterval α
h✝ : ¬(s.fst ≤ t.snd ∧ t.fst ≤ s.snd)
⊢ ⊥ ≤ some t
[PROOFSTEP]
exact bot_le
[GOAL]
α : 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 : NonemptyInterval α
t c : Interval α
hb : some s ≤ t
hc : some s ≤ c
⊢ some s ≤ t ⊓ c
[PROOFSTEP]
lift t to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hb
[GOAL]
case 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 : NonemptyInterval α
c : Interval α
hc : some s ≤ c
t : NonemptyInterval α
hb : some s ≤ ↑t
⊢ some s ≤ ↑t ⊓ c
[PROOFSTEP]
lift c to NonemptyInterval α using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hc
[GOAL]
case 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 : NonemptyInterval α
hb : some s ≤ ↑t
c : NonemptyInterval α
hc : some s ≤ ↑c
⊢ some s ≤ ↑t ⊓ ↑c
[PROOFSTEP]
change
  _ ≤
    dite _ _
      _
        -- Porting note: was `simp only` but that fails to use the second lemma.
[GOAL]
case 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 : NonemptyInterval α
hb : some s ≤ ↑t
c : NonemptyInterval α
hc : some s ≤ ↑c
⊢ some s ≤
    if h : t.fst ≤ c.snd ∧ c.fst ≤ t.snd then
      some
        { toProd := (t.fst ⊔ c.fst, t.snd ⊓ c.snd),
          fst_le_snd := (_ : t.fst ⊔ c.fst ≤ (t.fst ⊔ c.fst, t.snd ⊓ c.snd).snd) }
    else ⊥
[PROOFSTEP]
rw [WithBot.some_eq_coe, WithBot.coe_le_coe] at hb hc 
[GOAL]
case 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ some s ≤
    if h : t.fst ≤ c.snd ∧ c.fst ≤ t.snd then
      some
        { toProd := (t.fst ⊔ c.fst, t.snd ⊓ c.snd),
          fst_le_snd := (_ : t.fst ⊔ c.fst ≤ (t.fst ⊔ c.fst, t.snd ⊓ c.snd).snd) }
    else ⊥
[PROOFSTEP]
simp only [WithBot.some_eq_coe, WithBot.coe_le_coe]
  -- at hb hc ⊢
[GOAL]
case 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ ↑s ≤
    if h : t.fst ≤ c.snd ∧ c.fst ≤ t.snd then
      ↑{ toProd := (t.fst ⊔ c.fst, t.snd ⊓ c.snd),
          fst_le_snd := (_ : t.fst ⊔ c.fst ≤ (t.fst ⊔ c.fst, t.snd ⊓ c.snd).snd) }
    else ⊥
[PROOFSTEP]
rw [dif_pos, WithBot.coe_le_coe]
[GOAL]
case 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ s ≤
    { toProd := (t.fst ⊔ c.fst, t.snd ⊓ c.snd), fst_le_snd := (_ : t.fst ⊔ c.fst ≤ (t.fst ⊔ c.fst, t.snd ⊓ c.snd).snd) }
case intro.intro.hc
α : 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
case intro.intro.hc
α : 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
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.
[GOAL]
case intro.intro.hc
α : 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
case intro.intro.hc
α : 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 : NonemptyInterval α
hb : s ≤ t
c : NonemptyInterval α
hc : s ≤ c
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
rcases hb with ⟨hb₁, hb₂⟩
[GOAL]
case intro.intro.hc.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 : s ≤ c
hb₁ : (NonemptyInterval.toDualProd s).fst ≤ (NonemptyInterval.toDualProd t).fst
hb₂ : (NonemptyInterval.toDualProd s).snd ≤ (NonemptyInterval.toDualProd t).snd
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
rcases hc with ⟨hc₁, hc₂⟩
[GOAL]
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).fst ≤ (NonemptyInterval.toDualProd t).fst
hb₂ : (NonemptyInterval.toDualProd s).snd ≤ (NonemptyInterval.toDualProd t).snd
hc₁ : (NonemptyInterval.toDualProd s).fst ≤ (NonemptyInterval.toDualProd c).fst
hc₂ : (NonemptyInterval.toDualProd s).snd ≤ (NonemptyInterval.toDualProd c).snd
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
change t.toProd.fst ≤ s.toProd.fst at hb₁ 
[GOAL]
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).snd ≤ (NonemptyInterval.toDualProd t).snd
hc₁ : (NonemptyInterval.toDualProd s).fst ≤ (NonemptyInterval.toDualProd c).fst
hc₂ : (NonemptyInterval.toDualProd s).snd ≤ (NonemptyInterval.toDualProd c).snd
hb₁ : t.fst ≤ s.fst
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
change s.toProd.snd ≤ t.toProd.snd at hb₂ 
[GOAL]
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).fst ≤ (NonemptyInterval.toDualProd c).fst
hc₂ : (NonemptyInterval.toDualProd s).snd ≤ (NonemptyInterval.toDualProd c).snd
hb₁ : t.fst ≤ s.fst
hb₂ : s.snd ≤ t.snd
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
change c.toProd.fst ≤ s.toProd.fst at hc₁ 
[GOAL]
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).snd ≤ (NonemptyInterval.toDualProd c).snd
hb₁ : t.fst ≤ s.fst
hb₂ : s.snd ≤ t.snd
hc₁ : c.fst ≤ s.fst
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
change s.toProd.snd ≤ c.toProd.snd at hc₂ 
[GOAL]
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.fst ≤ s.fst
hb₂ : s.snd ≤ t.snd
hc₁ : c.fst ≤ s.fst
hc₂ : s.snd ≤ c.snd
⊢ t.fst ≤ c.snd ∧ c.fst ≤ t.snd
[PROOFSTEP]
exact ⟨hb₁.trans <| s.fst_le_snd.trans hc₂, hc₁.trans <| s.fst_le_snd.trans hb₂⟩
[GOAL]
α : 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
[PROOFSTEP]
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 (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
[GOAL]
α : 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
[PROOFSTEP]
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 (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
[GOAL]
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
[PROOFSTEP]

| none =>
  rw [WithBot.none_eq_bot, bot_inf_eq]
  exact (empty_inter _).symm
[GOAL]
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
[PROOFSTEP]
rw [WithBot.none_eq_bot, bot_inf_eq]
[GOAL]
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
[PROOFSTEP]
exact (empty_inter _).symm
[GOAL]
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
[PROOFSTEP]

| some s =>
  cases t with
  | none =>
    rw [WithBot.none_eq_bot, inf_bot_eq]
    exact (inter_empty _).symm
  |
    some t =>
    refine'
      (_ : setLike.coe (dite (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
[GOAL]
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
[PROOFSTEP]
cases t with
| none =>
  rw [WithBot.none_eq_bot, inf_bot_eq]
  exact (inter_empty _).symm
|
  some t =>
  refine'
    (_ : setLike.coe (dite (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
[GOAL]
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
[PROOFSTEP]
cases t with
| none =>
  rw [WithBot.none_eq_bot, inf_bot_eq]
  exact (inter_empty _).symm
|
  some t =>
  refine'
    (_ : setLike.coe (dite (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
[GOAL]
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
[PROOFSTEP]

| none =>
  rw [WithBot.none_eq_bot, inf_bot_eq]
  exact (inter_empty _).symm
[GOAL]
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
[PROOFSTEP]
rw [WithBot.none_eq_bot, inf_bot_eq]
[GOAL]
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) ∩ ↑⊥
[PROOFSTEP]
exact (inter_empty _).symm
[GOAL]
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)
[PROOFSTEP]

|
  some t =>
  refine'
    (_ : setLike.coe (dite (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
[GOAL]
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)
[PROOFSTEP]
refine'
  (_ : setLike.coe (dite (s.toProd.fst ≤ t.toProd.snd ∧ t.toProd.fst ≤ s.toProd.snd) _ _) = _).trans Icc_inter_Icc.symm
[GOAL]
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.fst ≤ t.snd ∧ t.fst ≤ s.snd then
        some
          { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
            fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) }
      else ⊥) =
    Icc (s.fst ⊔ t.fst) (s.snd ⊓ t.snd)
[PROOFSTEP]
split_ifs with h
[GOAL]
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.fst ≤ t.snd ∧ t.fst ≤ s.snd
⊢ ↑(some
        { toProd := (s.fst ⊔ t.fst, s.snd ⊓ t.snd),
          fst_le_snd := (_ : s.fst ⊔ t.fst ≤ (s.fst ⊔ t.fst, s.snd ⊓ t.snd).snd) }) =
    Icc (s.fst ⊔ t.fst) (s.snd ⊓ t.snd)
[PROOFSTEP]
rfl
[GOAL]
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.fst ≤ t.snd ∧ t.fst ≤ s.snd)
⊢ ↑⊥ = Icc (s.fst ⊔ t.fst) (s.snd ⊓ t.snd)
[PROOFSTEP]
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
[GOAL]
α : 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
[PROOFSTEP]
classical
rw [disjoint_iff_inf_le, disjoint_iff_inf_le, ← coe_subset_coe, coe_inf]
rfl
[GOAL]
α : 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
[PROOFSTEP]
rw [disjoint_iff_inf_le, disjoint_iff_inf_le, ← coe_subset_coe, coe_inf]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : Lattice α
s t : Interval α
⊢ ↑s ⊓ ↑t ≤ ⊥ ↔ ↑s ∩ ↑t ⊆ ↑⊥
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝ : Preorder α
s : NonemptyInterval α
a : α
⊢ ↑s = Interval.pure a ↔ s = pure a
[PROOFSTEP]
rw [← Interval.coe_inj, coe_pure_interval]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
⊢ CompleteLattice (Interval α)
[PROOFSTEP]
classical exact
  { Interval.lattice,
    Interval.boundedOrder with
    sSup := fun S =>
      if h : S ⊆ {⊥} then ⊥
      else
        some
          ⟨⟨⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd⟩,
            by
            obtain ⟨s, hs, ha⟩ := not_subset.1 h
            lift s to NonemptyInterval α using ha
            exact iInf₂_le_of_le s hs (le_iSup₂_of_le s hs s.fst_le_snd)⟩
    le_sSup := fun s s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · exact (h ha).le
      cases s
      · exact bot_le
      ·
        -- Porting note: This case was
                    -- `exact WithBot.some_le_some.2 ⟨iInf₂_le _ ha, le_iSup₂_of_le _ ha le_rfl⟩`
                    -- but there seems to be a defEq-problem at `iInf₂_le` that lean cannot resolve yet.
        apply WithBot.some_le_some.2
        constructor
        · apply iInf₂_le
          exact ha
        · exact le_iSup₂_of_le _ ha le_rfl
    sSup_le := fun s s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · exact bot_le
      obtain ⟨b, hs, hb⟩ := not_subset.1 h
      lift s to NonemptyInterval α using ne_bot_of_le_ne_bot hb (ha _ hs)
      exact
        WithBot.coe_le_coe.2
          ⟨le_iInf₂ fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).1,
            iSup₂_le fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).2⟩
    sInf := fun S =>
      if h : ⊥ ∉ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd then
        some
          ⟨⟨⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd⟩,
            iSup₂_le fun s hs => le_iInf₂ <| h.2 hs⟩
      else ⊥
    sInf_le := fun s₁ s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · lift s to NonemptyInterval α using
          ne_of_mem_of_not_mem ha
            h.1
              -- Porting note: Lean failed to figure out the function `f` by itself,
                          -- so I added it through manually
        let f := fun (s : NonemptyInterval α) (_ : ↑s ∈ s₁) => s.toProd.fst
        exact WithBot.coe_le_coe.2 ⟨le_iSup₂ (f := f) s ha, iInf₂_le s ha⟩
      · exact bot_le
    le_sInf := by
      intro S s ha
      cases s with
      | none => exact bot_le
      |
        some s =>
        dsimp
          -- Porting note: added
        split_ifs with h
        ·
          exact
            WithBot.some_le_some.2
              ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1,
                le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
        · rw [not_and_or, not_not] at h 
          rcases h with h | h
          · exact ha _ h
          ·
            -- Porting note: ungolfed, due to identification problems
                            -- between `toProd` and `toDualProd`. Original mathport output:
                            -- cases h fun t hb c hc =>
                            --   (WithBot.coe_le_coe.1 <| ha _ hb).1.trans <|
                            --     s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2 }
            exfalso
            apply h
            intro b hb c hc
            have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
            repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
            rw [OrderDual.toDual_le_toDual] at h₁ 
            exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2) }
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
⊢ CompleteLattice (Interval α)
[PROOFSTEP]
exact
  { Interval.lattice,
    Interval.boundedOrder with
    sSup := fun S =>
      if h : S ⊆ {⊥} then ⊥
      else
        some
          ⟨⟨⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd⟩,
            by
            obtain ⟨s, hs, ha⟩ := not_subset.1 h
            lift s to NonemptyInterval α using ha
            exact iInf₂_le_of_le s hs (le_iSup₂_of_le s hs s.fst_le_snd)⟩
    le_sSup := fun s s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · exact (h ha).le
      cases s
      · exact bot_le
      ·
        -- Porting note: This case was
                    -- `exact WithBot.some_le_some.2 ⟨iInf₂_le _ ha, le_iSup₂_of_le _ ha le_rfl⟩`
                    -- but there seems to be a defEq-problem at `iInf₂_le` that lean cannot resolve yet.
        apply WithBot.some_le_some.2
        constructor
        · apply iInf₂_le
          exact ha
        · exact le_iSup₂_of_le _ ha le_rfl
    sSup_le := fun s s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · exact bot_le
      obtain ⟨b, hs, hb⟩ := not_subset.1 h
      lift s to NonemptyInterval α using ne_bot_of_le_ne_bot hb (ha _ hs)
      exact
        WithBot.coe_le_coe.2
          ⟨le_iInf₂ fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).1,
            iSup₂_le fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).2⟩
    sInf := fun S =>
      if h : ⊥ ∉ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd then
        some
          ⟨⟨⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd⟩,
            iSup₂_le fun s hs => le_iInf₂ <| h.2 hs⟩
      else ⊥
    sInf_le := fun s₁ s ha =>
      by
      dsimp only
        -- Porting note: added
      split_ifs with h
      · lift s to NonemptyInterval α using
          ne_of_mem_of_not_mem ha
            h.1
              -- Porting note: Lean failed to figure out the function `f` by itself,
                          -- so I added it through manually
        let f := fun (s : NonemptyInterval α) (_ : ↑s ∈ s₁) => s.toProd.fst
        exact WithBot.coe_le_coe.2 ⟨le_iSup₂ (f := f) s ha, iInf₂_le s ha⟩
      · exact bot_le
    le_sInf := by
      intro S s ha
      cases s with
      | none => exact bot_le
      |
        some s =>
        dsimp
          -- Porting note: added
        split_ifs with h
        ·
          exact
            WithBot.some_le_some.2
              ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1,
                le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
        · rw [not_and_or, not_not] at h 
          rcases h with h | h
          · exact ha _ h
          ·
            -- Porting note: ungolfed, due to identification problems
                            -- between `toProd` and `toDualProd`. Original mathport output:
                            -- cases h fun t hb c hc =>
                            --   (WithBot.coe_le_coe.1 <| ha _ hb).1.trans <|
                            --     s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2 }
            exfalso
            apply h
            intro b hb c hc
            have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
            repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
            rw [OrderDual.toDual_le_toDual] at h₁ 
            exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2) }
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
h : ¬S ⊆ {⊥}
⊢ (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).fst ≤
    (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd
[PROOFSTEP]
obtain ⟨s, hs, ha⟩ := not_subset.1 h
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
h : ¬S ⊆ {⊥}
s : Interval α
hs : s ∈ S
ha : ¬s ∈ {⊥}
⊢ (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).fst ≤
    (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd
[PROOFSTEP]
lift s to NonemptyInterval α using ha
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
h : ¬S ⊆ {⊥}
s : NonemptyInterval α
hs : ↑s ∈ S
⊢ (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).fst ≤
    (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd
[PROOFSTEP]
exact iInf₂_le_of_le s hs (le_iSup₂_of_le s hs s.fst_le_snd)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : s ∈ s✝
⊢ s ≤ sSup s✝
[PROOFSTEP]
dsimp only
  -- Porting note: added
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : s ∈ s✝
⊢ s ≤
    if h : s✝ ⊆ {⊥} then ⊥
    else
      some
        { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
          fst_le_snd :=
            (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) }
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : s ∈ s✝
h : s✝ ⊆ {⊥}
⊢ s ≤ ⊥
[PROOFSTEP]
exact (h ha).le
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : s ∈ s✝
h : ¬s✝ ⊆ {⊥}
⊢ s ≤
    some
      { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
        fst_le_snd :=
          (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) }
[PROOFSTEP]
cases s
[GOAL]
case neg.none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
ha : none ∈ s
⊢ none ≤
    some
      {
        toProd :=
          (⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst, ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd),
        fst_le_snd :=
          (_ :
            ⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst ≤
              ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd) }
[PROOFSTEP]
exact bot_le
[GOAL]
case neg.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
val✝ : NonemptyInterval α
ha : some val✝ ∈ s
⊢ some val✝ ≤
    some
      {
        toProd :=
          (⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst, ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd),
        fst_le_snd :=
          (_ :
            ⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst ≤
              ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd) }
[PROOFSTEP]
apply WithBot.some_le_some.2
[GOAL]
case neg.some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
val✝ : NonemptyInterval α
ha : some val✝ ∈ s
⊢ val✝ ≤
    {
      toProd :=
        (⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst, ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd),
      fst_le_snd :=
        (_ :
          ⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst ≤ ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd) }
[PROOFSTEP]
constructor
[GOAL]
case neg.some.left
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
val✝ : NonemptyInterval α
ha : some val✝ ∈ s
⊢ (NonemptyInterval.toDualProd val✝).fst ≤
    (NonemptyInterval.toDualProd
        {
          toProd :=
            (⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst,
              ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd),
          fst_le_snd :=
            (_ :
              ⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst ≤
                ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd) }).fst
[PROOFSTEP]
apply iInf₂_le
[GOAL]
case neg.some.left.j
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
val✝ : NonemptyInterval α
ha : some val✝ ∈ s
⊢ ↑val✝ ∈ s
[PROOFSTEP]
exact ha
[GOAL]
case neg.some.right
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s : Set (Interval α)
h : ¬s ⊆ {⊥}
val✝ : NonemptyInterval α
ha : some val✝ ∈ s
⊢ (NonemptyInterval.toDualProd val✝).snd ≤
    (NonemptyInterval.toDualProd
        {
          toProd :=
            (⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst,
              ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd),
          fst_le_snd :=
            (_ :
              ⨅ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.fst ≤
                ⨆ (s_1 : NonemptyInterval α) (_ : ↑s_1 ∈ s), s_1.snd) }).snd
[PROOFSTEP]
exact le_iSup₂_of_le _ ha le_rfl
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ s
⊢ sSup s✝ ≤ s
[PROOFSTEP]
dsimp only
  -- Porting note: added
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ s
⊢ (if h : s✝ ⊆ {⊥} then ⊥
    else
      some
        { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
          fst_le_snd :=
            (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) }) ≤
    s
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ s
h : s✝ ⊆ {⊥}
⊢ ⊥ ≤ s
[PROOFSTEP]
exact bot_le
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ s
h : ¬s✝ ⊆ {⊥}
⊢ some
      { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
        fst_le_snd :=
          (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) } ≤
    s
[PROOFSTEP]
obtain ⟨b, hs, hb⟩ := not_subset.1 h
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ s
h : ¬s✝ ⊆ {⊥}
b : Interval α
hs : b ∈ s✝
hb : ¬b ∈ {⊥}
⊢ some
      { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
        fst_le_snd :=
          (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) } ≤
    s
[PROOFSTEP]
lift s to NonemptyInterval α using ne_bot_of_le_ne_bot hb (ha _ hs)
[GOAL]
case neg.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s✝ : Set (Interval α)
h : ¬s✝ ⊆ {⊥}
b : Interval α
hs : b ∈ s✝
hb : ¬b ∈ {⊥}
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ s✝ → b ≤ ↑s
⊢ some
      { toProd := (⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst, ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd),
        fst_le_snd :=
          (_ : ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.fst ≤ ⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s✝), s.snd) } ≤
    ↑s
[PROOFSTEP]
exact
  WithBot.coe_le_coe.2
    ⟨le_iInf₂ fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).1, iSup₂_le fun c hc => (WithBot.coe_le_coe.1 <| ha _ hc).2⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
s : Interval α
ha : s ∈ s₁
⊢ sInf s₁ ≤ s
[PROOFSTEP]
dsimp only
  -- Porting note: added
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
s : Interval α
ha : s ∈ s₁
⊢ (if h : ¬⊥ ∈ s₁ ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ s₁ → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ s₁ → s.fst ≤ t.snd then
      some
        { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd),
          fst_le_snd :=
            (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ s₁), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd) }
    else ⊥) ≤
    s
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
s : Interval α
ha : s ∈ s₁
h : ¬⊥ ∈ s₁ ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ s₁ → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ s₁ → s.fst ≤ t.snd
⊢ some
      { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd),
        fst_le_snd :=
          (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ s₁), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd) } ≤
    s
[PROOFSTEP]
lift s to NonemptyInterval α using
  ne_of_mem_of_not_mem ha
    h.1
      -- Porting note: Lean failed to figure out the function `f` by itself,
                  -- so I added it through manually
[GOAL]
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
h : ¬⊥ ∈ s₁ ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ s₁ → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ s₁ → s.fst ≤ t.snd
s : NonemptyInterval α
ha : ↑s ∈ s₁
⊢ some
      { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd),
        fst_le_snd :=
          (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ s₁), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd) } ≤
    ↑s
[PROOFSTEP]
let f := fun (s : NonemptyInterval α) (_ : ↑s ∈ s₁) => s.toProd.fst
[GOAL]
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
h : ¬⊥ ∈ s₁ ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ s₁ → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ s₁ → s.fst ≤ t.snd
s : NonemptyInterval α
ha : ↑s ∈ s₁
f : (s : NonemptyInterval α) → ↑s ∈ s₁ → α := fun s x => s.fst
⊢ some
      { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd),
        fst_le_snd :=
          (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ s₁), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ s₁), s.snd) } ≤
    ↑s
[PROOFSTEP]
exact WithBot.coe_le_coe.2 ⟨le_iSup₂ (f := f) s ha, iInf₂_le s ha⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
s₁ : Set (Interval α)
s : Interval α
ha : s ∈ s₁
h : ¬(¬⊥ ∈ s₁ ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ s₁ → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ s₁ → s.fst ≤ t.snd)
⊢ ⊥ ≤ s
[PROOFSTEP]
exact bot_le
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
⊢ ∀ (s : Set (Interval α)) (a : Interval α), (∀ (b : Interval α), b ∈ s → a ≤ b) → a ≤ sInf s
[PROOFSTEP]
intro S s ha
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ S → s ≤ b
⊢ s ≤ sInf S
[PROOFSTEP]
cases s with
| none => exact bot_le
|
  some s =>
  dsimp
    -- Porting note: added
  split_ifs with h
  ·
    exact
      WithBot.some_le_some.2
        ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1,
          le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
  · rw [not_and_or, not_not] at h 
    rcases h with h | h
    · exact ha _ h
    ·
      -- Porting note: ungolfed, due to identification problems
                      -- between `toProd` and `toDualProd`. Original mathport output:
                      -- cases h fun t hb c hc =>
                      --   (WithBot.coe_le_coe.1 <| ha _ hb).1.trans <|
                      --     s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2 }
      exfalso
      apply h
      intro b hb c hc
      have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
      repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
      rw [OrderDual.toDual_le_toDual] at h₁ 
      exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : Interval α
ha : ∀ (b : Interval α), b ∈ S → s ≤ b
⊢ s ≤ sInf S
[PROOFSTEP]
cases s with
| none => exact bot_le
|
  some s =>
  dsimp
    -- Porting note: added
  split_ifs with h
  ·
    exact
      WithBot.some_le_some.2
        ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1,
          le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
  · rw [not_and_or, not_not] at h 
    rcases h with h | h
    · exact ha _ h
    ·
      -- Porting note: ungolfed, due to identification problems
                      -- between `toProd` and `toDualProd`. Original mathport output:
                      -- cases h fun t hb c hc =>
                      --   (WithBot.coe_le_coe.1 <| ha _ hb).1.trans <|
                      --     s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2 }
      exfalso
      apply h
      intro b hb c hc
      have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
      repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
      rw [OrderDual.toDual_le_toDual] at h₁ 
      exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2)
[GOAL]
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
ha : ∀ (b : Interval α), b ∈ S → none ≤ b
⊢ none ≤ sInf S
[PROOFSTEP]

| none => exact bot_le
[GOAL]
case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
ha : ∀ (b : Interval α), b ∈ S → none ≤ b
⊢ none ≤ sInf S
[PROOFSTEP]
exact bot_le
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
⊢ some s ≤ sInf S
[PROOFSTEP]

|
  some s =>
  dsimp
    -- Porting note: added
  split_ifs with h
  ·
    exact
      WithBot.some_le_some.2
        ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1,
          le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
  · rw [not_and_or, not_not] at h 
    rcases h with h | h
    · exact ha _ h
    ·
      -- Porting note: ungolfed, due to identification problems
                      -- between `toProd` and `toDualProd`. Original mathport output:
                      -- cases h fun t hb c hc =>
                      --   (WithBot.coe_le_coe.1 <| ha _ hb).1.trans <|
                      --     s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2 }
      exfalso
      apply h
      intro b hb c hc
      have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
      repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
      rw [OrderDual.toDual_le_toDual] at h₁ 
      exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2)
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
⊢ some s ≤ sInf S
[PROOFSTEP]
dsimp
  -- Porting note: added
[GOAL]
case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
⊢ some s ≤
    if h : ¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd then
      some
        { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd),
          fst_le_snd :=
            (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ S), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd) }
    else ⊥
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ some s ≤
    some
      { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd),
        fst_le_snd :=
          (_ : ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ S), i.fst ≤ ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd) }
[PROOFSTEP]
exact
  WithBot.some_le_some.2
    ⟨iSup₂_le fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).1, le_iInf₂ fun t hb => (WithBot.coe_le_coe.1 <| ha _ hb).2⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬(¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd)
⊢ some s ≤ ⊥
[PROOFSTEP]
rw [not_and_or, not_not] at h 
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ⊥ ∈ S ∨ ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ some s ≤ ⊥
[PROOFSTEP]
rcases h with h | h
[GOAL]
case neg.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ⊥ ∈ S
⊢ some s ≤ ⊥
[PROOFSTEP]
exact ha _ h
[GOAL]
case neg.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ some s ≤ ⊥
[PROOFSTEP]
exfalso
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ False
[PROOFSTEP]
apply h
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
[PROOFSTEP]
intro b hb c hc
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
⊢ b.fst ≤ c.snd
[PROOFSTEP]
have h₁ := (WithBot.coe_le_coe.1 <| ha _ hb).1
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : (NonemptyInterval.toDualProd s).fst ≤ (NonemptyInterval.toDualProd b).fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
repeat rw [NonemptyInterval.toDualProd_apply] at h₁ 
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : (NonemptyInterval.toDualProd s).fst ≤ (NonemptyInterval.toDualProd b).fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
rw [NonemptyInterval.toDualProd_apply] at h₁ 
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : (↑toDual s.fst, s.snd).fst ≤ (NonemptyInterval.toDualProd b).fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
rw [NonemptyInterval.toDualProd_apply] at h₁ 
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : (↑toDual s.fst, s.snd).fst ≤ (↑toDual b.fst, b.snd).fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
rw [NonemptyInterval.toDualProd_apply] at h₁ 
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : (↑toDual s.fst, s.snd).fst ≤ (↑toDual b.fst, b.snd).fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
rw [OrderDual.toDual_le_toDual] at h₁ 
[GOAL]
case neg.inr.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : Lattice (Interval α) := lattice
src✝ : BoundedOrder (Interval α) := boundedOrder
S : Set (Interval α)
s : NonemptyInterval α
ha : ∀ (b : Interval α), b ∈ S → some s ≤ b
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
b : NonemptyInterval α
hb : ↑b ∈ S
c : NonemptyInterval α
hc : ↑c ∈ S
h₁ : b.fst ≤ s.fst
⊢ b.fst ≤ c.snd
[PROOFSTEP]
exact h₁.trans (s.fst_le_snd.trans (WithBot.coe_le_coe.1 <| ha _ hc).2)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
⊢ ↑(sInf S) = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
classical
  -- Porting note: added
    -- Porting note: this `change` was
    -- change ↑ (dite _ _ _) = _
change ((dite _ _ _ : Interval α) : Set α) = ⋂ (s : Interval α) (_ : s ∈ S), (s : Set α)
split_ifs with h
· ext
  simp [WithBot.some_eq_coe, Interval.forall, h.1, ← forall_and, ← NonemptyInterval.mem_def]
simp_rw [not_and_or, Classical.not_not] at h 
rcases h with h | h
· refine' (eq_empty_of_subset_empty _).symm
  exact iInter₂_subset_of_subset _ h Subset.rfl
· refine' (not_nonempty_iff_eq_empty.1 _).symm
  rintro ⟨x, hx⟩
  rw [mem_iInter₂] at hx 
  exact h fun s ha t hb => (hx _ ha).1.trans (hx _ hb).2
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
⊢ ↑(sInf S) = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
change ((dite _ _ _ : Interval α) : Set α) = ⋂ (s : Interval α) (_ : s ∈ S), (s : Set α)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
⊢ ↑(if h : ¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd then
        some
          { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd),
            fst_le_snd :=
              (_ :
                ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ S), i.fst ≤
                  (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst,
                      ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd) }
      else ⊥) =
    ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ ↑(some
        { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd),
          fst_le_snd :=
            (_ :
              ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ S), i.fst ≤
                (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst,
                    ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd) }) =
    ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
ext
[GOAL]
case pos.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
x✝ : α
⊢ x✝ ∈
      ↑(some
          { toProd := (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst, ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd),
            fst_le_snd :=
              (_ :
                ⨆ (i : NonemptyInterval α) (_ : ↑i ∈ S), i.fst ≤
                  (⨆ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.fst,
                      ⨅ (s : NonemptyInterval α) (_ : ↑s ∈ S), s.snd).snd) }) ↔
    x✝ ∈ ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
simp [WithBot.some_eq_coe, Interval.forall, h.1, ← forall_and, ← NonemptyInterval.mem_def]
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬(¬⊥ ∈ S ∧ ∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd)
⊢ ↑⊥ = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
simp_rw [not_and_or, Classical.not_not] at h 
[GOAL]
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ⊥ ∈ S ∨ ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ ↑⊥ = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
rcases h with h | h
[GOAL]
case neg.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ⊥ ∈ S
⊢ ↑⊥ = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
refine' (eq_empty_of_subset_empty _).symm
[GOAL]
case neg.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ⊥ ∈ S
⊢ ⋂ (s : Interval α) (_ : s ∈ S), ↑s ⊆ ∅
[PROOFSTEP]
exact iInter₂_subset_of_subset _ h Subset.rfl
[GOAL]
case neg.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ ↑⊥ = ⋂ (s : Interval α) (_ : s ∈ S), ↑s
[PROOFSTEP]
refine' (not_nonempty_iff_eq_empty.1 _).symm
[GOAL]
case neg.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
⊢ ¬Set.Nonempty (⋂ (s : Interval α) (_ : s ∈ S), ↑s)
[PROOFSTEP]
rintro ⟨x, hx⟩
[GOAL]
case neg.inr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
x : α
hx : x ∈ ⋂ (s : Interval α) (_ : s ∈ S), ↑s
⊢ False
[PROOFSTEP]
rw [mem_iInter₂] at hx 
[GOAL]
case neg.inr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
S : Set (Interval α)
h : ¬∀ ⦃s : NonemptyInterval α⦄, ↑s ∈ S → ∀ ⦃t : NonemptyInterval α⦄, ↑t ∈ S → s.fst ≤ t.snd
x : α
hx : ∀ (i : Interval α), i ∈ S → x ∈ ↑i
⊢ False
[PROOFSTEP]
exact h fun s ha t hb => (hx _ ha).1.trans (hx _ hb).2
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
f : ι → Interval α
⊢ ↑(⨅ (i : ι), f i) = ⋂ (i : ι), ↑(f i)
[PROOFSTEP]
simp [iInf]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : CompleteLattice α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
f : (i : ι) → κ i → Interval α
⊢ ↑(⨅ (i : ι) (j : κ i), f i j) = ⋂ (i : ι) (j : κ i), ↑(f i j)
[PROOFSTEP]
simp_rw [coe_iInf]
