Skip to content

Commit

Permalink
feat: add minimum_le_coe_iff for List.minimum (#5845)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
  • Loading branch information
semorrison and semorrison committed Jul 13, 2023
1 parent e7b874f commit 228477b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Mathlib/Data/List/MinMax.lean
Expand Up @@ -391,6 +391,18 @@ theorem minimum_eq_coe_iff : minimum l = m ↔ m ∈ l ∧ ∀ a ∈ l, m ≤ a
@maximum_eq_coe_iff αᵒᵈ _ _ _
#align list.minimum_eq_coe_iff List.minimum_eq_coe_iff

theorem coe_le_maximum_iff : a ≤ l.maximum ↔ ∃ b, b ∈ l ∧ a ≤ b := by
induction l with
| nil => simp
| cons h t ih =>
simp [List.maximum_cons, ih]

theorem minimum_le_coe_iff : l.minimum ≤ a ↔ ∃ b, b ∈ l ∧ b ≤ a := by
induction l with
| nil => simp
| cons h t ih =>
simp [List.minimum_cons, ih]

end LinearOrder

end MaximumMinimum
Expand Down

0 comments on commit 228477b

Please sign in to comment.