File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,13 @@ theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm
142142 eq_of_perm_of_sorted ((σ.ofFn_comp_perm f).trans (τ.ofFn_comp_perm f).symm)
143143 hfσ.ofFn_sorted hfτ.ofFn_sorted
144144
145+ /-- If two permutations of a tuple `f` are both antitone, then they are equal. -/
146+ theorem unique_antitone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm (Fin n)}
147+ (hfσ : Antitone (f ∘ σ)) (hfτ : Antitone (f ∘ τ)) : f ∘ σ = f ∘ τ :=
148+ ofFn_injective <|
149+ eq_of_perm_of_sorted ((σ.ofFn_comp_perm f).trans (τ.ofFn_comp_perm f).symm)
150+ hfσ.ofFn_sorted hfτ.ofFn_sorted
151+
145152variable [LinearOrder α] {f : Fin n → α} {σ : Equiv.Perm (Fin n)}
146153
147154/-- A permutation `σ` equals `sort f` if and only if the map `i ↦ (f (σ i), σ i)` is
Original file line number Diff line number Diff line change @@ -182,13 +182,24 @@ variable [Preorder α]
182182strictly monotone. -/
183183@[simp] theorem sorted_lt_ofFn_iff : (ofFn f).Sorted (· < ·) ↔ StrictMono f := sorted_ofFn_iff
184184
185+ /-- The list `List.ofFn f` is strictly sorted with respect to `(· ≥ ·)` if and only if `f` is
186+ strictly antitone. -/
187+ @[simp] theorem sorted_gt_ofFn_iff : (ofFn f).Sorted (· > ·) ↔ StrictAnti f := sorted_ofFn_iff
188+
185189/-- The list `List.ofFn f` is sorted with respect to `(· ≤ ·)` if and only if `f` is monotone. -/
186190@[simp] theorem sorted_le_ofFn_iff : (ofFn f).Sorted (· ≤ ·) ↔ Monotone f :=
187191 sorted_ofFn_iff.trans monotone_iff_forall_lt.symm
188192
189193/-- The list obtained from a monotone tuple is sorted. -/
190194alias ⟨_, _root_.Monotone.ofFn_sorted⟩ := sorted_le_ofFn_iff
191195
196+ /-- The list `List.ofFn f` is sorted with respect to `(· ≥ ·)` if and only if `f` is antitone. -/
197+ @[simp] theorem sorted_ge_ofFn_iff : (ofFn f).Sorted (· ≥ ·) ↔ Antitone f :=
198+ sorted_ofFn_iff.trans antitone_iff_forall_lt.symm
199+
200+ /-- The list obtained from an antitone tuple is sorted. -/
201+ alias ⟨_, _root_.Antitone.ofFn_sorted⟩ := sorted_ge_ofFn_iff
202+
192203end Monotone
193204
194205end List
You can’t perform that action at this time.
0 commit comments