l3lab/ntp-mathlib huggingface dataset:
instance : Subsingleton (LocallyFiniteOrderBot α) :=
  Subsingleton.intro fun h₀ h₁ => by
    cases' h₀ with h₀_finset_Iio h₀_finset_Iic h₀_finset_mem_Iic h₀_finset_mem_Iio
    cases' h₁ with h₁_finset_Iio h₁_finset_Iic h₁_finset_mem_Iic h₁_finset_mem_Iio
    have hIic : h₀_finset_Iic = h₁_finset_Iic := by
      ext a b
      rw [h₀_finset_mem_Iic, h₁_finset_mem_Iic]
    

Proof state:
case mk.mk
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
h₀_finset_Iio h₀_finset_Iic : α → Finset α
h₀_finset_mem_Iic : ∀ (a x : α), x ∈ h₀_finset_Iic a ↔ x ≤ a
h₀_finset_mem_Iio : ∀ (a x : α), x ∈ h₀_finset_Iio a ↔ x < a
h₁_finset_Iio h₁_finset_Iic : α → Finset α
h₁_finset_mem_Iic : ∀ (a x : α), x ∈ h₁_finset_Iic a ↔ x ≤ a
h₁_finset_mem_Iio : ∀ (a x : α), x ∈ h₁_finset_Iio a ↔ x < a
hIic : h₀_finset_Iic = h₁_finset_Iic
⊢ { finsetIio := h₀_finset_Iio, finsetIic := h₀_finset_Iic, finset_mem_Iic := h₀_finset_mem_Iic,
      finset_mem_Iio := h₀_finset_mem_Iio } =
    { finsetIio := h₁_finset_Iio, finsetIic := h₁_finset_Iic, finset_mem_Iic := h₁_finset_mem_Iic,
      finset_mem_Iio := h₁_finset_mem_Iio }

Next tactic:
have hIio : h₀_finset_Iio = h₁_finset_Iio := by
      ext a b
      rw [h₀_finset_mem_Iio, h₁_finset_mem_Iio]
instance : Subsingleton (LocallyFiniteOrderBot α) :=
  Subsingleton.intro fun h₀ h₁ => by
    cases' h₀ with h₀_finset_Iio h₀_finset_Iic h₀_finset_mem_Iic h₀_finset_mem_Iio
    cases' h₁ with h₁_finset_Iio h₁_finset_Iic h₁_finset_mem_Iic h₁_finset_mem_Iio
    have hIic : h₀_finset_Iic = h₁_finset_Iic := by
      ext a b
      rw [h₀_finset_mem_Iic, h₁_finset_mem_Iic]
    have hIio : h₀_finset_Iio = h₁_finset_Iio := by
      

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
h₀_finset_Iio h₀_finset_Iic : α → Finset α
h₀_finset_mem_Iic : ∀ (a x : α), x ∈ h₀_finset_Iic a ↔ x ≤ a
h₀_finset_mem_Iio : ∀ (a x : α), x ∈ h₀_finset_Iio a ↔ x < a
h₁_finset_Iio h₁_finset_Iic : α → Finset α
h₁_finset_mem_Iic : ∀ (a x : α), x ∈ h₁_finset_Iic a ↔ x ≤ a
h₁_finset_mem_Iio : ∀ (a x : α), x ∈ h₁_finset_Iio a ↔ x < a
hIic : h₀_finset_Iic = h₁_finset_Iic
⊢ h₀_finset_Iio = h₁_finset_Iio

Next tactic:
ext a b
instance : Subsingleton (LocallyFiniteOrderBot α) :=
  Subsingleton.intro fun h₀ h₁ => by
    cases' h₀ with h₀_finset_Iio h₀_finset_Iic h₀_finset_mem_Iic h₀_finset_mem_Iio
    cases' h₁ with h₁_finset_Iio h₁_finset_Iic h₁_finset_mem_Iic h₁_finset_mem_Iio
    have hIic : h₀_finset_Iic = h₁_finset_Iic := by
      ext a b
      rw [h₀_finset_mem_Iic, h₁_finset_mem_Iic]
    have hIio : h₀_finset_Iio = h₁_finset_Iio := by
      ext a b
      

Proof state:
case h.a
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
h₀_finset_Iio h₀_finset_Iic : α → Finset α
h₀_finset_mem_Iic : ∀ (a x : α), x ∈ h₀_finset_Iic a ↔ x ≤ a
h₀_finset_mem_Iio : ∀ (a x : α), x ∈ h₀_finset_Iio a ↔ x < a
h₁_finset_Iio h₁_finset_Iic : α → Finset α
h₁_finset_mem_Iic : ∀ (a x : α), x ∈ h₁_finset_Iic a ↔ x ≤ a
h₁_finset_mem_Iio : ∀ (a x : α), x ∈ h₁_finset_Iio a ↔ x < a
hIic : h₀_finset_Iic = h₁_finset_Iic
a b : α
⊢ b ∈ h₀_finset_Iio a ↔ b ∈ h₁_finset_Iio a

Next tactic:
rw [h₀_finset_mem_Iio, h₁_finset_mem_Iio]
instance : Subsingleton (LocallyFiniteOrderBot α) :=
  Subsingleton.intro fun h₀ h₁ => by
    cases' h₀ with h₀_finset_Iio h₀_finset_Iic h₀_finset_mem_Iic h₀_finset_mem_Iio
    cases' h₁ with h₁_finset_Iio h₁_finset_Iic h₁_finset_mem_Iic h₁_finset_mem_Iio
    have hIic : h₀_finset_Iic = h₁_finset_Iic := by
      ext a b
      rw [h₀_finset_mem_Iic, h₁_finset_mem_Iic]
    have hIio : h₀_finset_Iio = h₁_finset_Iio := by
      ext a b
      rw [h₀_finset_mem_Iio, h₁_finset_mem_Iio]
    

Proof state:
case mk.mk
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
h₀_finset_Iio h₀_finset_Iic : α → Finset α
h₀_finset_mem_Iic : ∀ (a x : α), x ∈ h₀_finset_Iic a ↔ x ≤ a
h₀_finset_mem_Iio : ∀ (a x : α), x ∈ h₀_finset_Iio a ↔ x < a
h₁_finset_Iio h₁_finset_Iic : α → Finset α
h₁_finset_mem_Iic : ∀ (a x : α), x ∈ h₁_finset_Iic a ↔ x ≤ a
h₁_finset_mem_Iio : ∀ (a x : α), x ∈ h₁_finset_Iio a ↔ x < a
hIic : h₀_finset_Iic = h₁_finset_Iic
hIio : h₀_finset_Iio = h₁_finset_Iio
⊢ { finsetIio := h₀_finset_Iio, finsetIic := h₀_finset_Iic, finset_mem_Iic := h₀_finset_mem_Iic,
      finset_mem_Iio := h₀_finset_mem_Iio } =
    { finsetIio := h₁_finset_Iio, finsetIic := h₁_finset_Iic, finset_mem_Iic := h₁_finset_mem_Iic,
      finset_mem_Iio := h₁_finset_mem_Iio }

Next tactic:
simp_rw [hIic, hIio]
/-- Given an order embedding `α ↪o β`, pulls back the `LocallyFiniteOrder` on `β` to `α`. -/
protected noncomputable def OrderEmbedding.locallyFiniteOrder [LocallyFiniteOrder β] (f : α ↪o β) :
    LocallyFiniteOrder α where
  finsetIcc a b := (Icc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIco a b := (Ico (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoc a b := (Ioc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoo a b := (Ioo (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finset_mem_Icc a b x := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder β
f : α ↪o β
a b x : α
⊢ x ∈ (fun a b => preimage (Icc (f a) (f b)) ⇑f (_ : Set.InjOn (⇑f.toEmbedding) (⇑f ⁻¹' ↑(Icc (f a) (f b))))) a b ↔
    a ≤ x ∧ x ≤ b

Next tactic:
rw [mem_preimage, mem_Icc, f.le_iff_le, f.le_iff_le]
/-- Given an order embedding `α ↪o β`, pulls back the `LocallyFiniteOrder` on `β` to `α`. -/
protected noncomputable def OrderEmbedding.locallyFiniteOrder [LocallyFiniteOrder β] (f : α ↪o β) :
    LocallyFiniteOrder α where
  finsetIcc a b := (Icc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIco a b := (Ico (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoc a b := (Ioc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoo a b := (Ioo (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finset_mem_Icc a b x := by rw [mem_preimage, mem_Icc, f.le_iff_le, f.le_iff_le]
  finset_mem_Ico a b x := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder β
f : α ↪o β
a b x : α
⊢ x ∈ (fun a b => preimage (Ico (f a) (f b)) ⇑f (_ : Set.InjOn (⇑f.toEmbedding) (⇑f ⁻¹' ↑(Ico (f a) (f b))))) a b ↔
    a ≤ x ∧ x < b

Next tactic:
rw [mem_preimage, mem_Ico, f.le_iff_le, f.lt_iff_lt]
/-- Given an order embedding `α ↪o β`, pulls back the `LocallyFiniteOrder` on `β` to `α`. -/
protected noncomputable def OrderEmbedding.locallyFiniteOrder [LocallyFiniteOrder β] (f : α ↪o β) :
    LocallyFiniteOrder α where
  finsetIcc a b := (Icc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIco a b := (Ico (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoc a b := (Ioc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoo a b := (Ioo (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finset_mem_Icc a b x := by rw [mem_preimage, mem_Icc, f.le_iff_le, f.le_iff_le]
  finset_mem_Ico a b x := by rw [mem_preimage, mem_Ico, f.le_iff_le, f.lt_iff_lt]
  finset_mem_Ioc a b x := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder β
f : α ↪o β
a b x : α
⊢ x ∈ (fun a b => preimage (Ioc (f a) (f b)) ⇑f (_ : Set.InjOn (⇑f.toEmbedding) (⇑f ⁻¹' ↑(Ioc (f a) (f b))))) a b ↔
    a < x ∧ x ≤ b

Next tactic:
rw [mem_preimage, mem_Ioc, f.lt_iff_lt, f.le_iff_le]
/-- Given an order embedding `α ↪o β`, pulls back the `LocallyFiniteOrder` on `β` to `α`. -/
protected noncomputable def OrderEmbedding.locallyFiniteOrder [LocallyFiniteOrder β] (f : α ↪o β) :
    LocallyFiniteOrder α where
  finsetIcc a b := (Icc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIco a b := (Ico (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoc a b := (Ioc (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finsetIoo a b := (Ioo (f a) (f b)).preimage f (f.toEmbedding.injective.injOn _)
  finset_mem_Icc a b x := by rw [mem_preimage, mem_Icc, f.le_iff_le, f.le_iff_le]
  finset_mem_Ico a b x := by rw [mem_preimage, mem_Ico, f.le_iff_le, f.lt_iff_lt]
  finset_mem_Ioc a b x := by rw [mem_preimage, mem_Ioc, f.lt_iff_lt, f.le_iff_le]
  finset_mem_Ioo a b x := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder β
f : α ↪o β
a b x : α
⊢ x ∈ (fun a b => preimage (Ioo (f a) (f b)) ⇑f (_ : Set.InjOn (⇑f.toEmbedding) (⇑f ⁻¹' ↑(Ioo (f a) (f b))))) a b ↔
    a < x ∧ x < b

Next tactic:
rw [mem_preimage, mem_Ioo, f.lt_iff_lt, f.lt_iff_lt]
theorem Icc_toDual : Icc (toDual a) (toDual b) = (Icc b a).map toDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Icc (toDual a) (toDual b) = map (Equiv.toEmbedding toDual) (Icc b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Icc_toDual : Icc (toDual a) (toDual b) = (Icc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Icc (toDual a) (toDual b) = Icc b a

Next tactic:
ext c
theorem Icc_toDual : Icc (toDual a) (toDual b) = (Icc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ c ∈ Icc (toDual a) (toDual b) ↔ c ∈ Icc b a

Next tactic:
rw [mem_Icc, mem_Icc (α := α)]
theorem Icc_toDual : Icc (toDual a) (toDual b) = (Icc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Icc, mem_Icc (α := α)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ toDual a ≤ c ∧ c ≤ toDual b ↔ b ≤ c ∧ c ≤ a

Next tactic:
exact and_comm
theorem Ico_toDual : Ico (toDual a) (toDual b) = (Ioc b a).map toDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ico (toDual a) (toDual b) = map (Equiv.toEmbedding toDual) (Ioc b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ico_toDual : Ico (toDual a) (toDual b) = (Ioc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ico (toDual a) (toDual b) = Ioc b a

Next tactic:
ext c
theorem Ico_toDual : Ico (toDual a) (toDual b) = (Ioc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ c ∈ Ico (toDual a) (toDual b) ↔ c ∈ Ioc b a

Next tactic:
rw [mem_Ico, mem_Ioc (α := α)]
theorem Ico_toDual : Ico (toDual a) (toDual b) = (Ioc b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ico, mem_Ioc (α := α)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ toDual a ≤ c ∧ c < toDual b ↔ b < c ∧ c ≤ a

Next tactic:
exact and_comm
theorem Ioc_toDual : Ioc (toDual a) (toDual b) = (Ico b a).map toDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ioc (toDual a) (toDual b) = map (Equiv.toEmbedding toDual) (Ico b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ioc_toDual : Ioc (toDual a) (toDual b) = (Ico b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ioc (toDual a) (toDual b) = Ico b a

Next tactic:
ext c
theorem Ioc_toDual : Ioc (toDual a) (toDual b) = (Ico b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ c ∈ Ioc (toDual a) (toDual b) ↔ c ∈ Ico b a

Next tactic:
rw [mem_Ioc, mem_Ico (α := α)]
theorem Ioc_toDual : Ioc (toDual a) (toDual b) = (Ico b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ioc, mem_Ico (α := α)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ toDual a < c ∧ c ≤ toDual b ↔ b ≤ c ∧ c < a

Next tactic:
exact and_comm
theorem Ioo_toDual : Ioo (toDual a) (toDual b) = (Ioo b a).map toDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ioo (toDual a) (toDual b) = map (Equiv.toEmbedding toDual) (Ioo b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ioo_toDual : Ioo (toDual a) (toDual b) = (Ioo b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
⊢ Ioo (toDual a) (toDual b) = Ioo b a

Next tactic:
ext c
theorem Ioo_toDual : Ioo (toDual a) (toDual b) = (Ioo b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ c ∈ Ioo (toDual a) (toDual b) ↔ c ∈ Ioo b a

Next tactic:
rw [mem_Ioo, mem_Ioo (α := α)]
theorem Ioo_toDual : Ioo (toDual a) (toDual b) = (Ioo b a).map toDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ioo, mem_Ioo (α := α)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a b : α
c : αᵒᵈ
⊢ toDual a < c ∧ c < toDual b ↔ b < c ∧ c < a

Next tactic:
exact and_comm
theorem Icc_ofDual (a b : αᵒᵈ) : Icc (ofDual a) (ofDual b) = (Icc b a).map ofDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Icc (ofDual a) (ofDual b) = map (Equiv.toEmbedding ofDual) (Icc b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Icc_ofDual (a b : αᵒᵈ) : Icc (ofDual a) (ofDual b) = (Icc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Icc (ofDual a) (ofDual b) = Icc b a

Next tactic:
ext c
theorem Icc_ofDual (a b : αᵒᵈ) : Icc (ofDual a) (ofDual b) = (Icc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ c ∈ Icc (ofDual a) (ofDual b) ↔ c ∈ Icc b a

Next tactic:
rw [mem_Icc, mem_Icc (α := αᵒᵈ)]
theorem Icc_ofDual (a b : αᵒᵈ) : Icc (ofDual a) (ofDual b) = (Icc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Icc, mem_Icc (α := αᵒᵈ)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ ofDual a ≤ c ∧ c ≤ ofDual b ↔ b ≤ c ∧ c ≤ a

Next tactic:
exact and_comm
theorem Ico_ofDual (a b : αᵒᵈ) : Ico (ofDual a) (ofDual b) = (Ioc b a).map ofDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ico (ofDual a) (ofDual b) = map (Equiv.toEmbedding ofDual) (Ioc b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ico_ofDual (a b : αᵒᵈ) : Ico (ofDual a) (ofDual b) = (Ioc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ico (ofDual a) (ofDual b) = Ioc b a

Next tactic:
ext c
theorem Ico_ofDual (a b : αᵒᵈ) : Ico (ofDual a) (ofDual b) = (Ioc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ c ∈ Ico (ofDual a) (ofDual b) ↔ c ∈ Ioc b a

Next tactic:
rw [mem_Ico, mem_Ioc (α := αᵒᵈ)]
theorem Ico_ofDual (a b : αᵒᵈ) : Ico (ofDual a) (ofDual b) = (Ioc b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ico, mem_Ioc (α := αᵒᵈ)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ ofDual a ≤ c ∧ c < ofDual b ↔ b < c ∧ c ≤ a

Next tactic:
exact and_comm
theorem Ioc_ofDual (a b : αᵒᵈ) : Ioc (ofDual a) (ofDual b) = (Ico b a).map ofDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioc (ofDual a) (ofDual b) = map (Equiv.toEmbedding ofDual) (Ico b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ioc_ofDual (a b : αᵒᵈ) : Ioc (ofDual a) (ofDual b) = (Ico b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioc (ofDual a) (ofDual b) = Ico b a

Next tactic:
ext c
theorem Ioc_ofDual (a b : αᵒᵈ) : Ioc (ofDual a) (ofDual b) = (Ico b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ c ∈ Ioc (ofDual a) (ofDual b) ↔ c ∈ Ico b a

Next tactic:
rw [mem_Ioc, mem_Ico (α := αᵒᵈ)]
theorem Ioc_ofDual (a b : αᵒᵈ) : Ioc (ofDual a) (ofDual b) = (Ico b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ioc, mem_Ico (α := αᵒᵈ)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ ofDual a < c ∧ c ≤ ofDual b ↔ b ≤ c ∧ c < a

Next tactic:
exact and_comm
theorem Ioo_ofDual (a b : αᵒᵈ) : Ioo (ofDual a) (ofDual b) = (Ioo b a).map ofDual.toEmbedding := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioo (ofDual a) (ofDual b) = map (Equiv.toEmbedding ofDual) (Ioo b a)

Next tactic:
refine' Eq.trans _ map_refl.symm
theorem Ioo_ofDual (a b : αᵒᵈ) : Ioo (ofDual a) (ofDual b) = (Ioo b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioo (ofDual a) (ofDual b) = Ioo b a

Next tactic:
ext c
theorem Ioo_ofDual (a b : αᵒᵈ) : Ioo (ofDual a) (ofDual b) = (Ioo b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ c ∈ Ioo (ofDual a) (ofDual b) ↔ c ∈ Ioo b a

Next tactic:
rw [mem_Ioo, mem_Ioo (α := αᵒᵈ)]
theorem Ioo_ofDual (a b : αᵒᵈ) : Ioo (ofDual a) (ofDual b) = (Ioo b a).map ofDual.toEmbedding := by
  refine' Eq.trans _ map_refl.symm
  ext c
  rw [mem_Ioo, mem_Ioo (α := αᵒᵈ)]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : α
⊢ ofDual a < c ∧ c < ofDual b ↔ b < c ∧ c < a

Next tactic:
exact and_comm
instance [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrder (α × β) :=
  LocallyFiniteOrder.ofIcc' (α × β) (fun a b => Icc a.fst b.fst ×ˢ Icc a.snd b.snd) fun a b x => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrder α
inst✝¹ : LocallyFiniteOrder β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a b x : α × β
⊢ x ∈ (fun a b => Icc a.1 b.1 ×ˢ Icc a.2 b.2) a b ↔ a ≤ x ∧ x ≤ b

Next tactic:
rw [mem_product, mem_Icc, mem_Icc, and_and_and_comm]
instance [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrder (α × β) :=
  LocallyFiniteOrder.ofIcc' (α × β) (fun a b => Icc a.fst b.fst ×ˢ Icc a.snd b.snd) fun a b x => by
    rw [mem_product, mem_Icc, mem_Icc, and_and_and_comm]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrder α
inst✝¹ : LocallyFiniteOrder β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a b x : α × β
⊢ (a.1 ≤ x.1 ∧ a.2 ≤ x.2) ∧ x.1 ≤ b.1 ∧ x.2 ≤ b.2 ↔ a ≤ x ∧ x ≤ b

Next tactic:
rfl
instance [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrderTop (α × β) :=
  LocallyFiniteOrderTop.ofIci' (α × β) (fun a => Ici a.fst ×ˢ Ici a.snd) fun a x => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrderTop α
inst✝¹ : LocallyFiniteOrderTop β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a x : α × β
⊢ x ∈ (fun a => Ici a.1 ×ˢ Ici a.2) a ↔ a ≤ x

Next tactic:
rw [mem_product, mem_Ici, mem_Ici]
instance [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrderTop (α × β) :=
  LocallyFiniteOrderTop.ofIci' (α × β) (fun a => Ici a.fst ×ˢ Ici a.snd) fun a x => by
    rw [mem_product, mem_Ici, mem_Ici]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrderTop α
inst✝¹ : LocallyFiniteOrderTop β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a x : α × β
⊢ a.1 ≤ x.1 ∧ a.2 ≤ x.2 ↔ a ≤ x

Next tactic:
rfl
instance [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrderBot (α × β) :=
  LocallyFiniteOrderBot.ofIic' (α × β) (fun a => Iic a.fst ×ˢ Iic a.snd) fun a x => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrderBot α
inst✝¹ : LocallyFiniteOrderBot β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a x : α × β
⊢ x ∈ (fun a => Iic a.1 ×ˢ Iic a.2) a ↔ x ≤ a

Next tactic:
rw [mem_product, mem_Iic, mem_Iic]
instance [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] : LocallyFiniteOrderBot (α × β) :=
  LocallyFiniteOrderBot.ofIic' (α × β) (fun a => Iic a.fst ×ˢ Iic a.snd) fun a x => by
    rw [mem_product, mem_Iic, mem_Iic]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : Preorder β
inst✝² : LocallyFiniteOrderBot α
inst✝¹ : LocallyFiniteOrderBot β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
a x : α × β
⊢ x.1 ≤ a.1 ∧ x.2 ≤ a.2 ↔ x ≤ a

Next tactic:
rfl
private lemma aux (x : α) (p : α → Prop) :
    (∃ a : α, p a ∧ Option.some a = Option.some x) ↔ p x := by
  -- Porting note: `simp [Option.some_inj]` has no effect
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : PartialOrder α
inst✝¹ : OrderTop α
inst✝ : LocallyFiniteOrder α
x : α
p : α → Prop
⊢ (∃ a, p a ∧ Option.some a = Option.some x) ↔ p x

Next tactic:
constructor
private lemma aux (x : α) (p : α → Prop) :
    (∃ a : α, p a ∧ Option.some a = Option.some x) ↔ p x := by
  -- Porting note: `simp [Option.some_inj]` has no effect
  constructor
  · 

Proof state:
case mp
α : Type u_1
β : Type u_2
inst✝² : PartialOrder α
inst✝¹ : OrderTop α
inst✝ : LocallyFiniteOrder α
x : α
p : α → Prop
⊢ (∃ a, p a ∧ Option.some a = Option.some x) → p x

Next tactic:
rintro ⟨x', hx, hx'⟩
private lemma aux (x : α) (p : α → Prop) :
    (∃ a : α, p a ∧ Option.some a = Option.some x) ↔ p x := by
  -- Porting note: `simp [Option.some_inj]` has no effect
  constructor
  · rintro ⟨x', hx, hx'⟩
    

Proof state:
case mp.intro.intro
α : Type u_1
β : Type u_2
inst✝² : PartialOrder α
inst✝¹ : OrderTop α
inst✝ : LocallyFiniteOrder α
x : α
p : α → Prop
x' : α
hx : p x'
hx' : Option.some x' = Option.some x
⊢ p x

Next tactic:
obtain rfl := Option.some_inj.mp hx'