l3lab/ntp-mathlib huggingface dataset:
theorem map_subtype_embedding_Ico : (Ico a b).map (Embedding.subtype p) = (Ico a b : Finset α) := by
  rw [subtype_Ico_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ico ↑a ↑b)) = Ico ↑a ↑b

Next tactic:
refine' Finset.subtype_map_of_mem fun x hx => _
theorem map_subtype_embedding_Ico : (Ico a b).map (Embedding.subtype p) = (Ico a b : Finset α) := by
  rw [subtype_Ico_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : x ∈ Ico ↑a ↑b
⊢ p x

Next tactic:
rw [mem_Ico] at hx
theorem map_subtype_embedding_Ico : (Ico a b).map (Embedding.subtype p) = (Ico a b : Finset α) := by
  rw [subtype_Ico_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  rw [mem_Ico] at hx
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : ↑a ≤ x ∧ x < ↑b
⊢ p x

Next tactic:
exact hp hx.1 hx.2.le a.prop b.prop
theorem map_subtype_embedding_Ioc : (Ioc a b).map (Embedding.subtype p) = (Ioc a b : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Ioc a b) = Ioc ↑a ↑b

Next tactic:
rw [subtype_Ioc_eq]
theorem map_subtype_embedding_Ioc : (Ioc a b).map (Embedding.subtype p) = (Ioc a b : Finset α) := by
  rw [subtype_Ioc_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ioc ↑a ↑b)) = Ioc ↑a ↑b

Next tactic:
refine' Finset.subtype_map_of_mem fun x hx => _
theorem map_subtype_embedding_Ioc : (Ioc a b).map (Embedding.subtype p) = (Ioc a b : Finset α) := by
  rw [subtype_Ioc_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : x ∈ Ioc ↑a ↑b
⊢ p x

Next tactic:
rw [mem_Ioc] at hx
theorem map_subtype_embedding_Ioc : (Ioc a b).map (Embedding.subtype p) = (Ioc a b : Finset α) := by
  rw [subtype_Ioc_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  rw [mem_Ioc] at hx
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : ↑a < x ∧ x ≤ ↑b
⊢ p x

Next tactic:
exact hp hx.1.le hx.2 a.prop b.prop
theorem map_subtype_embedding_Ioo : (Ioo a b).map (Embedding.subtype p) = (Ioo a b : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Ioo a b) = Ioo ↑a ↑b

Next tactic:
rw [subtype_Ioo_eq]
theorem map_subtype_embedding_Ioo : (Ioo a b).map (Embedding.subtype p) = (Ioo a b : Finset α) := by
  rw [subtype_Ioo_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ioo ↑a ↑b)) = Ioo ↑a ↑b

Next tactic:
refine' Finset.subtype_map_of_mem fun x hx => _
theorem map_subtype_embedding_Ioo : (Ioo a b).map (Embedding.subtype p) = (Ioo a b : Finset α) := by
  rw [subtype_Ioo_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : x ∈ Ioo ↑a ↑b
⊢ p x

Next tactic:
rw [mem_Ioo] at hx
theorem map_subtype_embedding_Ioo : (Ioo a b).map (Embedding.subtype p) = (Ioo a b : Finset α) := by
  rw [subtype_Ioo_eq]
  refine' Finset.subtype_map_of_mem fun x hx => _
  rw [mem_Ioo] at hx
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : ↑a < x ∧ x < ↑b
⊢ p x

Next tactic:
exact hp hx.1.le hx.2.le a.prop b.prop
theorem map_subtype_embedding_Ici : (Ici a).map (Embedding.subtype p) = (Ici a : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Ici a) = Ici ↑a

Next tactic:
rw [subtype_Ici_eq]
theorem map_subtype_embedding_Ici : (Ici a).map (Embedding.subtype p) = (Ici a : Finset α) := by
  rw [subtype_Ici_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ici ↑a)) = Ici ↑a

Next tactic:
exact Finset.subtype_map_of_mem fun x hx => hp (mem_Ici.1 hx) a.prop
theorem map_subtype_embedding_Ioi : (Ioi a).map (Embedding.subtype p) = (Ioi a : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Ioi a) = Ioi ↑a

Next tactic:
rw [subtype_Ioi_eq]
theorem map_subtype_embedding_Ioi : (Ioi a).map (Embedding.subtype p) = (Ioi a : Finset α) := by
  rw [subtype_Ioi_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ioi ↑a)) = Ioi ↑a

Next tactic:
exact Finset.subtype_map_of_mem fun x hx => hp (mem_Ioi.1 hx).le a.prop
theorem map_subtype_embedding_Iic : (Iic a).map (Embedding.subtype p) = (Iic a : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Iic a) = Iic ↑a

Next tactic:
rw [subtype_Iic_eq]
theorem map_subtype_embedding_Iic : (Iic a).map (Embedding.subtype p) = (Iic a : Finset α) := by
  rw [subtype_Iic_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Iic ↑a)) = Iic ↑a

Next tactic:
exact Finset.subtype_map_of_mem fun x hx => hp (mem_Iic.1 hx) a.prop
theorem map_subtype_embedding_Iio : (Iio a).map (Embedding.subtype p) = (Iio a : Finset α) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Iio a) = Iio ↑a

Next tactic:
rw [subtype_Iio_eq]
theorem map_subtype_embedding_Iio : (Iio a).map (Embedding.subtype p) = (Iio a : Finset α) := by
  rw [subtype_Iio_eq]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderBot α
a : Subtype p
hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Iio ↑a)) = Iio ↑a

Next tactic:
exact Finset.subtype_map_of_mem fun x hx => hp (mem_Iio.1 hx).le a.prop
theorem Set.finite_iff_bddAbove [SemilatticeSup α] [LocallyFiniteOrder α] [OrderBot α] :
    s.Finite ↔ BddAbove s :=
  ⟨fun h ↦ ⟨h.toFinset.sup id, fun x hx ↦ Finset.le_sup (f := id) (by 

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : SemilatticeSup α
inst✝¹ : LocallyFiniteOrder α
inst✝ : OrderBot α
h : Set.Finite s
x : α
hx : x ∈ s
⊢ x ∈ Finite.toFinset h

Next tactic:
simpa
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
⊢ Set.Finite s ↔ BddBelow s ∧ BddAbove s

Next tactic:
obtain (rfl | hs) := s.eq_empty_or_nonempty
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · 

Proof state:
case inl
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
⊢ Set.Finite ∅ ↔ BddBelow ∅ ∧ BddAbove ∅

Next tactic:
simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
  

Proof state:
case inr
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
hs : Set.Nonempty s
⊢ Set.Finite s ↔ BddBelow s ∧ BddAbove s

Next tactic:
exact ⟨fun h ↦ ⟨⟨h.toFinset.inf' (by simpa) id, fun x hx ↦ Finset.inf'_le id (by simpa)⟩,
    ⟨h.toFinset.sup' (by simpa) id, fun x hx ↦ Finset.le_sup' id (by simpa)⟩⟩,
    fun ⟨⟨a,ha⟩,⟨b,hb⟩⟩ ↦ (Set.finite_Icc a b).subset (fun x hx ↦ ⟨ha hx,hb hx⟩ )⟩
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
  exact ⟨fun h ↦ ⟨⟨h.toFinset.inf' (by 

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
hs : Set.Nonempty s
h : Set.Finite s
⊢ Finset.Nonempty (Finite.toFinset h)

Next tactic:
simpa
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
  exact ⟨fun h ↦ ⟨⟨h.toFinset.inf' (by simpa) id, fun x hx ↦ Finset.inf'_le id (by 

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
hs : Set.Nonempty s
h : Set.Finite s
x : α
hx : x ∈ s
⊢ x ∈ Finite.toFinset h

Next tactic:
simpa
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
  exact ⟨fun h ↦ ⟨⟨h.toFinset.inf' (by simpa) id, fun x hx ↦ Finset.inf'_le id (by simpa)⟩,
    ⟨h.toFinset.sup' (by 

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
hs : Set.Nonempty s
h : Set.Finite s
⊢ Finset.Nonempty (Finite.toFinset h)

Next tactic:
simpa
theorem Set.finite_iff_bddBelow_bddAbove [Nonempty α] [Lattice α] [LocallyFiniteOrder α] :
    s.Finite ↔ BddBelow s ∧ BddAbove s := by
  obtain (rfl | hs) := s.eq_empty_or_nonempty
  · simp only [Set.finite_empty, bddBelow_empty, bddAbove_empty, and_self]
  exact ⟨fun h ↦ ⟨⟨h.toFinset.inf' (by simpa) id, fun x hx ↦ Finset.inf'_le id (by simpa)⟩,
    ⟨h.toFinset.sup' (by simpa) id, fun x hx ↦ Finset.le_sup' id (by 

Proof state:
α✝ : Type u_1
β : Type u_2
inst✝⁴ : Preorder α✝
p : α✝ → Prop
inst✝³ : DecidablePred p
α : Type u_3
s : Set α
inst✝² : Nonempty α
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
hs : Set.Nonempty s
h : Set.Finite s
x : α
hx : x ∈ s
⊢ x ∈ Finite.toFinset h

Next tactic:
simpa
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a : { x // x ≤ y }
⊢ y ≤ y

Next tactic:
rfl
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by rfl⟩
  finsetIci a := Finset.Icc a ⟨y, by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a : { x // x ≤ y }
⊢ y ≤ y

Next tactic:
rfl
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by rfl⟩
  finsetIci a := Finset.Icc a ⟨y, by rfl⟩
  finset_mem_Ici a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x ≤ y }
⊢ b ∈ (fun a => Icc a { val := y, property := (_ : y ≤ y) }) a ↔ a ≤ b

Next tactic:
simp only [Finset.mem_Icc, and_iff_left_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by rfl⟩
  finsetIci a := Finset.Icc a ⟨y, by rfl⟩
  finset_mem_Ici a b := by
    simp only [Finset.mem_Icc, and_iff_left_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x ≤ y }
⊢ a ≤ b → b ≤ { val := y, property := (_ : y ≤ y) }

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by rfl⟩
  finsetIci a := Finset.Icc a ⟨y, by rfl⟩
  finset_mem_Ici a b := by
    simp only [Finset.mem_Icc, and_iff_left_iff_imp]
    exact fun _ => b.property
  finset_mem_Ioi a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x ≤ y }
⊢ b ∈ (fun a => Ioc a { val := y, property := (_ : y ≤ y) }) a ↔ a < b

Next tactic:
simp only [Finset.mem_Ioc, and_iff_left_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x ≤ y } where
  finsetIoi a := Finset.Ioc a ⟨y, by rfl⟩
  finsetIci a := Finset.Icc a ⟨y, by rfl⟩
  finset_mem_Ici a b := by
    simp only [Finset.mem_Icc, and_iff_left_iff_imp]
    exact fun _ => b.property
  finset_mem_Ioi a b := by
    simp only [Finset.mem_Ioc, and_iff_left_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x ≤ y }
⊢ a < b → b ≤ { val := y, property := (_ : y ≤ y) }

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x < y } where
  finsetIoi a := (Finset.Ioo ↑a y).subtype _
  finsetIci a := (Finset.Ico ↑a y).subtype _
  finset_mem_Ici a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x < y }
⊢ b ∈ (fun a => Finset.subtype (fun x => x < y) (Ico (↑a) y)) a ↔ a ≤ b

Next tactic:
simp only [Finset.mem_subtype, Finset.mem_Ico, Subtype.coe_le_coe, and_iff_left_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x < y } where
  finsetIoi a := (Finset.Ioo ↑a y).subtype _
  finsetIci a := (Finset.Ico ↑a y).subtype _
  finset_mem_Ici a b := by
    simp only [Finset.mem_subtype, Finset.mem_Ico, Subtype.coe_le_coe, and_iff_left_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x < y }
⊢ a ≤ b → ↑b < y

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x < y } where
  finsetIoi a := (Finset.Ioo ↑a y).subtype _
  finsetIci a := (Finset.Ico ↑a y).subtype _
  finset_mem_Ici a b := by
    simp only [Finset.mem_subtype, Finset.mem_Ico, Subtype.coe_le_coe, and_iff_left_iff_imp]
    exact fun _ => b.property
  finset_mem_Ioi a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x < y }
⊢ b ∈ (fun a => Finset.subtype (fun x => x < y) (Ioo (↑a) y)) a ↔ a < b

Next tactic:
simp only [Finset.mem_subtype, Finset.mem_Ioo, Subtype.coe_lt_coe, and_iff_left_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderTop { x : α // x < y } where
  finsetIoi a := (Finset.Ioo ↑a y).subtype _
  finsetIci a := (Finset.Ico ↑a y).subtype _
  finset_mem_Ici a b := by
    simp only [Finset.mem_subtype, Finset.mem_Ico, Subtype.coe_le_coe, and_iff_left_iff_imp]
    exact fun _ => b.property
  finset_mem_Ioi a b := by
    simp only [Finset.mem_subtype, Finset.mem_Ioo, Subtype.coe_lt_coe, and_iff_left_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // x < y }
⊢ a < b → ↑b < y

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a : { x // y ≤ x }
⊢ y ≤ y

Next tactic:
rfl
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by rfl⟩ a
  finsetIic a := Finset.Icc ⟨y, by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a : { x // y ≤ x }
⊢ y ≤ y

Next tactic:
rfl
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by rfl⟩ a
  finsetIic a := Finset.Icc ⟨y, by rfl⟩ a
  finset_mem_Iic a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y ≤ x }
⊢ b ∈ (fun a => Icc { val := y, property := (_ : y ≤ y) } a) a ↔ b ≤ a

Next tactic:
simp only [Finset.mem_Icc, and_iff_right_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by rfl⟩ a
  finsetIic a := Finset.Icc ⟨y, by rfl⟩ a
  finset_mem_Iic a b := by
    simp only [Finset.mem_Icc, and_iff_right_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y ≤ x }
⊢ b ≤ a → { val := y, property := (_ : y ≤ y) } ≤ b

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by rfl⟩ a
  finsetIic a := Finset.Icc ⟨y, by rfl⟩ a
  finset_mem_Iic a b := by
    simp only [Finset.mem_Icc, and_iff_right_iff_imp]
    exact fun _ => b.property
  finset_mem_Iio a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y ≤ x }
⊢ b ∈ (fun a => Ico { val := y, property := (_ : y ≤ y) } a) a ↔ b < a

Next tactic:
simp only [Finset.mem_Ico, and_iff_right_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) ≤ ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y ≤ x } where
  finsetIio a := Finset.Ico ⟨y, by rfl⟩ a
  finsetIic a := Finset.Icc ⟨y, by rfl⟩ a
  finset_mem_Iic a b := by
    simp only [Finset.mem_Icc, and_iff_right_iff_imp]
    exact fun _ => b.property
  finset_mem_Iio a b := by
    simp only [Finset.mem_Ico, and_iff_right_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y ≤ x }
⊢ b < a → { val := y, property := (_ : y ≤ y) } ≤ b

Next tactic:
exact fun _ => b.property
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y < x } where
  finsetIio a := (Finset.Ioo y ↑a).subtype _
  finsetIic a := (Finset.Ioc y ↑a).subtype _
  finset_mem_Iic a b := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y < x }
⊢ b ∈ (fun a => Finset.subtype (fun x => y < x) (Ioc y ↑a)) a ↔ b ≤ a

Next tactic:
simp only [Finset.mem_subtype, Finset.mem_Ioc, Subtype.coe_le_coe, and_iff_right_iff_imp]
instance (priority := low) [Preorder α] [DecidableRel ((· : α) < ·)] [LocallyFiniteOrder α] :
    LocallyFiniteOrderBot { x : α // y < x } where
  finsetIio a := (Finset.Ioo y ↑a).subtype _
  finsetIic a := (Finset.Ioc y ↑a).subtype _
  finset_mem_Iic a b := by
    simp only [Finset.mem_subtype, Finset.mem_Ioc, Subtype.coe_le_coe, and_iff_right_iff_imp]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
p : α → Prop
inst✝³ : DecidablePred p
y : α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : LocallyFiniteOrder α
a b : { x // y < x }
⊢ b ≤ a → y < ↑b

Next tactic:
exact fun _ => b.property