Skip to content

Commit

Permalink
add minimum_of_length_pos_mem (#7974)
Browse files Browse the repository at this point in the history
add `minimum_of_length_pos_mem` to `Mathlib/Data/List`

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
  • Loading branch information
Seasawher and eric-wieser committed Oct 27, 2023
1 parent 02b5c76 commit 7a2492c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Mathlib/Data/List/MinMax.lean
Expand Up @@ -449,6 +449,15 @@ theorem minimum_of_length_pos_le_iff (h : 0 < l.length) :
minimum_of_length_pos h ≤ b ↔ l.minimum ≤ b :=
le_maximum_of_length_pos_iff (α := αᵒᵈ) h

theorem maximum_of_length_pos_mem (h : 0 < l.length) :
maximum_of_length_pos h ∈ l := by
apply maximum_mem
simp only [coe_maximum_of_length_pos]

theorem minimum_of_length_pos_mem (h : 0 < l.length) :
minimum_of_length_pos h ∈ l :=
maximum_of_length_pos_mem (α := αᵒᵈ) h

theorem le_maximum_of_length_pos_of_mem (h : a ∈ l) (w : 0 < l.length) :
a ≤ l.maximum_of_length_pos w := by
simp only [le_maximum_of_length_pos_iff]
Expand Down

0 comments on commit 7a2492c

Please sign in to comment.