l3lab/ntp-mathlib huggingface dataset:
instance [IsWellOrder α r] [IsWellOrder β s] : IsWellOrder (α × β) (Prod.Lex r s) where
  trichotomous := fun ⟨a₁, a₂⟩ ⟨b₁, b₂⟩ =>
    match @trichotomous _ r _ a₁ b₁ with
    | Or.inl h₁ => Or.inl <| Prod.Lex.left _ _ h₁
    | Or.inr (Or.inr h₁) => Or.inr <| Or.inr <| Prod.Lex.left _ _ h₁
    | Or.inr (Or.inl (.refl _)) =>
        match @trichotomous _ s _ a₂ b₂ with
        | Or.inl h => Or.inl <| Prod.Lex.right _ h
        | Or.inr (Or.inr h) => Or.inr <| Or.inr <| Prod.Lex.right _ h
        | Or.inr (Or.inl (.refl _)) => Or.inr <| Or.inl rfl
  trans a b c h₁ h₂ := by
    cases' h₁ with a₁ a₂ b₁ b₂ ab a₁ b₁ b₂ ab <;> 

Proof state:
case right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : α × β
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
h₂ : Prod.Lex r s (a₁, b₂) c
⊢ Prod.Lex r s (a₁, b₁) c

Next tactic:
cases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc
instance [IsWellOrder α r] [IsWellOrder β s] : IsWellOrder (α × β) (Prod.Lex r s) where
  trichotomous := fun ⟨a₁, a₂⟩ ⟨b₁, b₂⟩ =>
    match @trichotomous _ r _ a₁ b₁ with
    | Or.inl h₁ => Or.inl <| Prod.Lex.left _ _ h₁
    | Or.inr (Or.inr h₁) => Or.inr <| Or.inr <| Prod.Lex.left _ _ h₁
    | Or.inr (Or.inl (.refl _)) =>
        match @trichotomous _ s _ a₂ b₂ with
        | Or.inl h => Or.inl <| Prod.Lex.right _ h
        | Or.inr (Or.inr h) => Or.inr <| Or.inr <| Prod.Lex.right _ h
        | Or.inr (Or.inl (.refl _)) => Or.inr <| Or.inl rfl
  trans a b c h₁ h₂ := by
    cases' h₁ with a₁ a₂ b₁ b₂ ab a₁ b₁ b₂ ab <;> cases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc
    

Proof state:
case left.left
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
a₂ : β
b₁ : α
b₂ : β
ab : r a₁ b₁
c₁ : α
c₂ : β
bc : r b₁ c₁
⊢ Prod.Lex r s (a₁, a₂) (c₁, c₂)
case left.right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
a₂ : β
b₁ : α
b₂ : β
ab : r a₁ b₁
c₂ : β
bc : s b₂ c₂
⊢ Prod.Lex r s (a₁, a₂) (b₁, c₂)
case right.left
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
c₁ : α
c₂ : β
bc : r a₁ c₁
⊢ Prod.Lex r s (a₁, b₁) (c₁, c₂)
case right.right
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
a₁ : α
b₁ b₂ : β
ab : s b₁ b₂
c₂ : β
bc : s b₂ c₂
⊢ Prod.Lex r s (a₁, b₁) (a₁, c₂)

Next tactic:
exacts [.left _ _ (_root_.trans ab bc), .left _ _ ab, .left _ _ bc,
      .right _ (_root_.trans ab bc)]
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
⊢ WellFounded fun x x_1 => x < x_1

Next tactic:
refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
⊢ Subrelation (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)

Next tactic:
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    

Proof state:
case mk.mk
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : (a₁, b₁) < (a₂, b₂)
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)

Next tactic:
simp only [Prod.mk_lt_mk] at w
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    

Proof state:
case mk.mk
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)

Next tactic:
rcases eq_or_ne a₁ a₂ with rfl | ha
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · 

Proof state:
case mk.mk.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ b₂ : β
w : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₁, b₂)

Next tactic:
right
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · right
      

Proof state:
case mk.mk.inl.h
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ b₂ : β
w : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂
⊢ b₁ < b₂

Next tactic:
simpa using w
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · right
      simpa using w
    · 

Proof state:
case mk.mk.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
ha : a₁ ≠ a₂
⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)

Next tactic:
left
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · right
      simpa using w
    · left
      

Proof state:
case mk.mk.inr.h
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
w : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
ha : a₁ ≠ a₂
⊢ a₁ < a₂

Next tactic:
rcases w with ⟨a_lt, _⟩ | ⟨a_le, _⟩
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · right
      simpa using w
    · left
      rcases w with ⟨a_lt, _⟩ | ⟨a_le, _⟩
      · 

Proof state:
case mk.mk.inr.h.inl.intro
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
ha : a₁ ≠ a₂
a_lt : a₁ < a₂
right✝ : b₁ ≤ b₂
⊢ a₁ < a₂

Next tactic:
assumption
instance Prod.wellFoundedLT [PartialOrder α] [WellFoundedLT α] [Preorder β] [WellFoundedLT β] :
    WellFoundedLT (α × β) where
  wf := by
    refine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf
    rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w
    simp only [Prod.mk_lt_mk] at w
    rcases eq_or_ne a₁ a₂ with rfl | ha
    · right
      simpa using w
    · left
      rcases w with ⟨a_lt, _⟩ | ⟨a_le, _⟩
      · assumption
      · 

Proof state:
case mk.mk.inr.h.inr.intro
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝³ : PartialOrder α
inst✝² : WellFoundedLT α
inst✝¹ : Preorder β
inst✝ : WellFoundedLT β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
ha : a₁ ≠ a₂
a_le : a₁ ≤ a₂
right✝ : b₁ < b₂
⊢ a₁ < a₂

Next tactic:
exact Ne.lt_of_le ha a_le
@[simp]
theorem not_bounded_iff {r : α → α → Prop} (s : Set α) : ¬Bounded r s ↔ Unbounded r s := by
  

Proof state:
α : Type u
β : Type v
r✝ : α → α → Prop
s✝ : β → β → Prop
r : α → α → Prop
s : Set α
⊢ ¬Bounded r s ↔ Unbounded r s

Next tactic:
simp only [Bounded, Unbounded, not_forall, not_exists, exists_prop, not_and, not_not]
@[simp]
theorem not_unbounded_iff {r : α → α → Prop} (s : Set α) : ¬Unbounded r s ↔ Bounded r s := by
  

Proof state:
α : Type u
β : Type v
r✝ : α → α → Prop
s✝ : β → β → Prop
r : α → α → Prop
s : Set α
⊢ ¬Unbounded r s ↔ Bounded r s

Next tactic:
rw [not_iff_comm, not_bounded_iff]
lemma subset_of_eq_of_subset (hab : a = b) (hbc : b ⊆ c) : a ⊆ c := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSubset α
a b c : α
hab : a = b
hbc : b ⊆ c
⊢ a ⊆ c

Next tactic:
rwa [hab]
lemma subset_of_subset_of_eq (hab : a ⊆ b) (hbc : b = c) : a ⊆ c := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSubset α
a b c : α
hab : a ⊆ b
hbc : b = c
⊢ a ⊆ c

Next tactic:
rwa [← hbc]
lemma ssubset_of_eq_of_ssubset (hab : a = b) (hbc : b ⊂ c) : a ⊂ c := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSSubset α
a b c : α
hab : a = b
hbc : b ⊂ c
⊢ a ⊂ c

Next tactic:
rwa [hab]
lemma ssubset_of_ssubset_of_eq (hab : a ⊂ b) (hbc : b = c) : a ⊂ c := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : HasSSubset α
a b c : α
hab : a ⊂ b
hbc : b = c
⊢ a ⊂ c

Next tactic:
rwa [← hbc]
instance [LinearOrder α] : IsOrderConnected α (· < ·) := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsOrderConnected α fun x x_1 => x < x_1

Next tactic:
infer_instance
instance [LinearOrder α] : IsIncompTrans α (· < ·) := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsIncompTrans α fun x x_1 => x < x_1

Next tactic:
infer_instance
instance [LinearOrder α] : IsStrictWeakOrder α (· < ·) := by 

Proof state:
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝ : LinearOrder α
⊢ IsStrictWeakOrder α fun x x_1 => x < x_1

Next tactic:
infer_instance
instance isStrictWeakOrder_of_linearOrder : IsStrictWeakOrder α (· < ·) :=
  have : IsTotalPreorder α (· ≤ ·) := by 

Proof state:
α : Type u
inst✝ : LinearOrder α
⊢ IsTotalPreorder α fun x x_1 => x ≤ x_1

Next tactic:
infer_instance
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b = Ordering.lt ↔ a < b

Next tactic:
rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.lt ↔ a < b

Next tactic:
split_ifs
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ Ordering.lt = Ordering.lt ↔ a < b

Next tactic:
simp only [*, lt_irrefl]
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ False ↔ a < b

Next tactic:
simp only [*, lt_irrefl]
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a < b

Next tactic:
simp only [*, lt_irrefl]
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b = Ordering.gt ↔ a > b

Next tactic:
rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.gt ↔ a > b

Next tactic:
split_ifs
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a > b

Next tactic:
simp only [*, lt_irrefl, not_lt_of_gt]
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ False ↔ a > b

Next tactic:
simp only [*, lt_irrefl, not_lt_of_gt]
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ Ordering.gt = Ordering.gt ↔ a > b

Next tactic:
simp only [*, lt_irrefl, not_lt_of_gt]
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> simp only [*, lt_irrefl, not_lt_of_gt]
  

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ True ↔ a > b

Next tactic:
case _ h₁ h₂ =>
    have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂
    exact true_iff_iff.2 h
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> simp only [*, lt_irrefl, not_lt_of_gt]
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h₁ : ¬a < b
h₂ : ¬a = b
⊢ True ↔ a > b

Next tactic:
case _ h₁ h₂ =>
    have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂
    exact true_iff_iff.2 h
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> simp only [*, lt_irrefl, not_lt_of_gt]
  case _ h₁ h₂ =>
    

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h₁ : ¬a < b
h₂ : ¬a = b
⊢ True ↔ a > b

Next tactic:
have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂
theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> simp only [*, lt_irrefl, not_lt_of_gt]
  case _ h₁ h₂ =>
    have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂
    

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h₁ : ¬a < b
h₂ : ¬a = b
h : b < a
⊢ True ↔ a > b

Next tactic:
exact true_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b = Ordering.eq ↔ a = b

Next tactic:
rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.eq ↔ a = b

Next tactic:
split_ifs
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a = b

Next tactic:
try simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a = b

Next tactic:
simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ Ordering.eq = Ordering.eq ↔ a = b

Next tactic:
try simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try 

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ Ordering.eq = Ordering.eq ↔ a = b

Next tactic:
simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> 

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

Next tactic:
try simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try 

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

Next tactic:
simp only []
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a = b
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b
case neg α : Type u inst✝ : LinearOrder α a b : α h✝¹ : ¬a < b h✝ : ¬a = b ⊢ False ↔ a = b

Next tactic:
case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a < b
⊢ False ↔ a = b

Next tactic:
case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a < b
⊢ False ↔ a = b

Next tactic:
exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  

Proof state:
case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b
case neg α : Type u inst✝ : LinearOrder α a b : α h✝¹ : ¬a < b h✝ : ¬a = b ⊢ False ↔ a = b

Next tactic:
case _ _ h => exact true_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : a = b
⊢ True ↔ a = b

Next tactic:
case _ _ h => exact true_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  case _ _ h => 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : a = b
⊢ True ↔ a = b

Next tactic:
exact true_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  case _ _ h => exact true_iff_iff.2 h
  

Proof state:
case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

Next tactic:
case _ _ h => exact false_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  case _ _ h => exact true_iff_iff.2 h
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : ¬a = b
⊢ False ↔ a = b

Next tactic:
case _ _ h => exact false_iff_iff.2 h
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b := by
  rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
  split_ifs <;> try simp only []
  case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
  case _ _ h => exact true_iff_iff.2 h
  case _ _ h => 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : ¬a = b
⊢ False ↔ a = b

Next tactic:
exact false_iff_iff.2 h
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b ≠ Ordering.gt ↔ a ≤ b

Next tactic:
cases h : compare a b
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> 

Proof state:
case lt
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.lt
⊢ Ordering.lt ≠ Ordering.gt ↔ a ≤ b

Next tactic:
simp
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> 

Proof state:
case eq
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.eq
⊢ Ordering.eq ≠ Ordering.gt ↔ a ≤ b

Next tactic:
simp
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> 

Proof state:
case gt
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.gt
⊢ Ordering.gt ≠ Ordering.gt ↔ a ≤ b

Next tactic:
simp
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> simp
  · 

Proof state:
case lt
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.lt
⊢ a ≤ b

Next tactic:
exact le_of_lt <| compare_lt_iff_lt.1 h
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> simp
  · exact le_of_lt <| compare_lt_iff_lt.1 h
  · 

Proof state:
case eq
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.eq
⊢ a ≤ b

Next tactic:
exact le_of_eq <| compare_eq_iff_eq.1 h
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b := by
  cases h : compare a b <;> simp
  · exact le_of_lt <| compare_lt_iff_lt.1 h
  · exact le_of_eq <| compare_eq_iff_eq.1 h
  · 

Proof state:
case gt
α : Type u
inst✝ : LinearOrder α
a b : α
h : compare a b = Ordering.gt
⊢ b < a

Next tactic:
exact compare_gt_iff_gt.1 h
theorem compare_ge_iff_ge {a b : α} : (compare a b ≠ .lt) ↔ a ≥ b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b ≠ Ordering.lt ↔ a ≥ b

Next tactic:
cases h : compare a b