[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b = if a ≤ b then a else b
[PROOFSTEP]
rw [LinearOrder.min_def a]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ max a b = if a ≤ b then b else a
[PROOFSTEP]
rw [LinearOrder.max_def a]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b ≤ a
[PROOFSTEP]
if h : a ≤ b then simp [min_def, if_pos h, le_refl] else simp [min_def, if_neg h]; exact le_of_not_le h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b ≤ a
[PROOFSTEP]
simp [min_def, if_pos h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ min a b ≤ a
[PROOFSTEP]
simp [min_def, if_neg h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ a
[PROOFSTEP]
exact le_of_not_le h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b ≤ b
[PROOFSTEP]
if h : a ≤ b then simp [min_def, if_pos h]; exact h else simp [min_def, if_neg h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b ≤ b
[PROOFSTEP]
simp [min_def, if_pos h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ b
[PROOFSTEP]
exact h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ min a b ≤ b
[PROOFSTEP]
simp [min_def, if_neg h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
⊢ c ≤ min a b
[PROOFSTEP]
if h : a ≤ b then simp [min_def, if_pos h]; exact h₁ else simp [min_def, if_neg h]; exact h₂
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : a ≤ b
⊢ c ≤ min a b
[PROOFSTEP]
simp [min_def, if_pos h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : a ≤ b
⊢ c ≤ a
[PROOFSTEP]
exact h₁
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : ¬a ≤ b
⊢ c ≤ min a b
[PROOFSTEP]
simp [min_def, if_neg h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : ¬a ≤ b
⊢ c ≤ b
[PROOFSTEP]
exact h₂
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ a ≤ max a b
[PROOFSTEP]
if h : a ≤ b then simp [max_def, if_pos h]; exact h else simp [max_def, if_neg h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ max a b
[PROOFSTEP]
simp [max_def, if_pos h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ b
[PROOFSTEP]
exact h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ a ≤ max a b
[PROOFSTEP]
simp [max_def, if_neg h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ b ≤ max a b
[PROOFSTEP]
if h : a ≤ b then simp [max_def, if_pos h, le_refl] else simp [max_def, if_neg h]; exact le_of_not_le h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ b ≤ max a b
[PROOFSTEP]
simp [max_def, if_pos h, le_refl]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ max a b
[PROOFSTEP]
simp [max_def, if_neg h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ a
[PROOFSTEP]
exact le_of_not_le h
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
⊢ max a b ≤ c
[PROOFSTEP]
if h : a ≤ b then simp [max_def, if_pos h]; exact h₂ else simp [max_def, if_neg h]; exact h₁
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : a ≤ b
⊢ max a b ≤ c
[PROOFSTEP]
simp [max_def, if_pos h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : a ≤ b
⊢ b ≤ c
[PROOFSTEP]
exact h₂
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : ¬a ≤ b
⊢ max a b ≤ c
[PROOFSTEP]
simp [max_def, if_neg h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : ¬a ≤ b
⊢ a ≤ c
[PROOFSTEP]
exact h₁
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c = min a (min b c)
[PROOFSTEP]
apply eq_min
[GOAL]
case h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ a
[PROOFSTEP]
apply le_trans
[GOAL]
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ ?h₁.b
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₁.b ≤ a
case h₁.b α : Type u inst✝ : LinearOrder α a b c : α ⊢ α
[PROOFSTEP]
apply min_le_left
[GOAL]
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min a b ≤ a
[PROOFSTEP]
apply min_le_left
[GOAL]
case h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ min b c
[PROOFSTEP]
apply le_min
[GOAL]
case h₂.h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ b
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c
[PROOFSTEP]
apply le_trans
[GOAL]
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ ?h₂.h₁.b
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₂.h₁.b ≤ b
case h₂.h₁.b
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ α
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c
[PROOFSTEP]
apply min_le_left
[GOAL]
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min a b ≤ b
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c
[PROOFSTEP]
apply min_le_right
[GOAL]
case h₂.h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ c
[PROOFSTEP]
apply min_le_right
[GOAL]
case h₃
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ∀ {d : α}, d ≤ a → d ≤ min b c → d ≤ min (min a b) c
[PROOFSTEP]
intro d h₁ h₂
[GOAL]
case h₃
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ min (min a b) c
[PROOFSTEP]
apply le_min
[GOAL]
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ min a b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c
[PROOFSTEP]
apply le_min h₁
[GOAL]
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c
[PROOFSTEP]
apply le_trans h₂
[GOAL]
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ min b c ≤ b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c
[PROOFSTEP]
apply min_le_left
[GOAL]
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ c
[PROOFSTEP]
apply le_trans h₂
[GOAL]
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ min b c ≤ c
[PROOFSTEP]
apply min_le_right
[GOAL]
α : Type u
inst✝ : LinearOrder α
a : α
⊢ min a a = a
[PROOFSTEP]
simp [min_def]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b = a
[PROOFSTEP]
apply Eq.symm
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a = min a b
[PROOFSTEP]
apply eq_min (le_refl _) h
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ ∀ {d : α}, d ≤ a → d ≤ b → d ≤ a
[PROOFSTEP]
intros
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
d✝ : α
a✝¹ : d✝ ≤ a
a✝ : d✝ ≤ b
⊢ d✝ ≤ a
[PROOFSTEP]
assumption
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max (max a b) c = max a (max b c)
[PROOFSTEP]
apply eq_max
[GOAL]
case h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ a ≤ max (max a b) c
[PROOFSTEP]
apply le_trans
[GOAL]
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ a ≤ ?h₁.b
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₁.b ≤ max (max a b) c
case h₁.b α : Type u inst✝ : LinearOrder α a b c : α ⊢ α
[PROOFSTEP]
apply le_max_left a b
[GOAL]
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max a b ≤ max (max a b) c
[PROOFSTEP]
apply le_max_left
[GOAL]
case h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max b c ≤ max (max a b) c
[PROOFSTEP]
apply max_le
[GOAL]
case h₂.h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ b ≤ max (max a b) c
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c
[PROOFSTEP]
apply le_trans
[GOAL]
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ b ≤ ?h₂.h₁.b
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₂.h₁.b ≤ max (max a b) c
case h₂.h₁.b
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ α
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c
[PROOFSTEP]
apply le_max_right a b
[GOAL]
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max a b ≤ max (max a b) c
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c
[PROOFSTEP]
apply le_max_left
[GOAL]
case h₂.h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ c ≤ max (max a b) c
[PROOFSTEP]
apply le_max_right
[GOAL]
case h₃
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ∀ {d : α}, a ≤ d → max b c ≤ d → max (max a b) c ≤ d
[PROOFSTEP]
intro d h₁ h₂
[GOAL]
case h₃
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ max (max a b) c ≤ d
[PROOFSTEP]
apply max_le
[GOAL]
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ max a b ≤ d
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : a ≤ d h₂ : max b c ≤ d ⊢ c ≤ d
[PROOFSTEP]
apply max_le h₁
[GOAL]
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ b ≤ d
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : a ≤ d h₂ : max b c ≤ d ⊢ c ≤ d
[PROOFSTEP]
apply le_trans (le_max_left _ _) h₂
[GOAL]
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ c ≤ d
[PROOFSTEP]
apply le_trans (le_max_right _ _) h₂
[GOAL]
α : Type u
inst✝ : LinearOrder α
a : α
⊢ max a a = a
[PROOFSTEP]
simp [max_def]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ max a b = a
[PROOFSTEP]
apply Eq.symm
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ a = max a b
[PROOFSTEP]
apply eq_max (le_refl _) h
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ ∀ {d : α}, a ≤ d → b ≤ d → a ≤ d
[PROOFSTEP]
intros
[GOAL]
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
d✝ : α
a✝¹ : a ≤ d✝
a✝ : b ≤ d✝
⊢ a ≤ d✝
[PROOFSTEP]
assumption
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < b
h₂ : a < c
h : b ≤ c
⊢ a < min b c
[PROOFSTEP]
rwa [min_eq_left h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < b
h₂ : a < c
h : b > c
⊢ a < min b c
[PROOFSTEP]
rwa [min_eq_right_of_lt h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < c
h₂ : b < c
h : a ≤ b
⊢ max a b < c
[PROOFSTEP]
rwa [max_eq_right h]
[GOAL]
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < c
h₂ : b < c
h : a > b
⊢ max a b < c
[PROOFSTEP]
rwa [max_eq_left_of_lt h]