The areas / V04. Order and lattices
Mathlib.Order.Monotone.Basic
139 declarations. Mathlib docs · Source
Monotonicity
This file defines (strictly) monotone/antitone functions. Contrary to standard mathematical usage, "monotone"/"mono" here means "increasing", not "increasing or decreasing". We use "antitone"/"anti" to mean "decreasing".
Main theorems
monotone_nat_of_le_succ,monotone_int_of_le_succ: Iff : ℕ → αorf : ℤ → αandf n ≤ f (n + 1)for alln, thenfis monotone.antitone_nat_of_succ_le,antitone_int_of_succ_le: Iff : ℕ → αorf : ℤ → αandf (n + 1) ≤ f nfor alln, thenfis antitone.strictMono_nat_of_lt_succ,strictMono_int_of_lt_succ: Iff : ℕ → αorf : ℤ → αandf n < f (n + 1)for alln, thenfis strictly monotone.strictAnti_nat_of_succ_lt,strictAnti_int_of_succ_lt: Iff : ℕ → αorf : ℤ → αandf (n + 1) < f nfor alln, thenfis strictly antitone.
Implementation notes
Some of these definitions used to only require LE α or LT α. The advantage of this is
unclear and it led to slight elaboration issues. Now, everything requires Preorder α and seems to
work fine. Related Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Order.20diamond/near/254353352.
TODO
The above theorems are also true in ℕ+, Fin n... To make that work, we need SuccOrder α
and IsSuccArchimedean α.
Tags
monotone, strictly monotone, antitone, strictly antitone, increasing, strictly increasing, decreasing, strictly decreasing
Monotonicity on the dual order
Strictly, many of the *On.dual lemmas in this section should use ofDual ⁻¹' s instead of s,
but right now this is not possible as Set.preimage is not defined yet, and importing it creates
an import cycle.
Often, you should not need the rewriting lemmas. Instead, you probably want to add .dual,
.dual_left or .dual_right to your Monotone/Antitone hypothesis.
Miscellaneous monotonicity results
Monotonicity in linear orders
Strictly monotone functions and cmp
Monotonicity in ℕ and ℤ
theorem monotone_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone (f ∘ ⇑OrderDual.ofDual) ↔ Antitone f
theorem antitone_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone (f ∘ ⇑OrderDual.ofDual) ↔ Monotone f
theorem monotone_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone (⇑OrderDual.toDual ∘ f) ↔ Antitone f
theorem antitone_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone (⇑OrderDual.toDual ∘ f) ↔ Monotone f
theorem isStable_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] {f : α → β} (σ : α → α),
IsStable (⇑OrderDual.toDual ∘ f) σ ↔ IsStable f σ
Stability of σ for f is unchanged by reversing the order on the codomain of f, since it
only uses equality there.
theorem monotoneOn_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn (f ∘ ⇑OrderDual.ofDual) s ↔ AntitoneOn f s
theorem antitoneOn_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn (f ∘ ⇑OrderDual.ofDual) s ↔ MonotoneOn f s
theorem monotoneOn_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn (⇑OrderDual.toDual ∘ f) s ↔ AntitoneOn f s
theorem antitoneOn_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn (⇑OrderDual.toDual ∘ f) s ↔ MonotoneOn f s
theorem strictMono_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono (f ∘ ⇑OrderDual.ofDual) ↔ StrictAnti f
theorem strictAnti_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti (f ∘ ⇑OrderDual.ofDual) ↔ StrictMono f
theorem strictMono_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono (⇑OrderDual.toDual ∘ f) ↔ StrictAnti f
theorem strictAnti_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti (⇑OrderDual.toDual ∘ f) ↔ StrictMono f
theorem strictMonoOn_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn (f ∘ ⇑OrderDual.ofDual) s ↔ StrictAntiOn f s
theorem strictAntiOn_comp_ofDual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn (f ∘ ⇑OrderDual.ofDual) s ↔ StrictMonoOn f s
theorem strictMonoOn_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn (⇑OrderDual.toDual ∘ f) s ↔ StrictAntiOn f s
theorem strictAntiOn_toDual_comp_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn (⇑OrderDual.toDual ∘ f) s ↔ StrictMonoOn f s
theorem monotone_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ Monotone f
theorem antitone_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ Antitone f
theorem monotoneOn_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s ↔ MonotoneOn f s
theorem antitoneOn_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s ↔ AntitoneOn f s
theorem strictMono_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ StrictMono f
theorem strictAnti_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ StrictAnti f
theorem strictMonoOn_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s ↔ StrictMonoOn f s
theorem strictAntiOn_dual_iff E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s ↔ StrictAntiOn f s
theorem Monotone.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone f → Antitone (f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of antitone_comp_ofDual_iff.
theorem Antitone.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone f → Monotone (f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of monotone_comp_ofDual_iff.
theorem Monotone.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone f → Antitone (⇑OrderDual.toDual ∘ f)
Alias of the reverse direction of antitone_toDual_comp_iff.
theorem Antitone.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone f → Monotone (⇑OrderDual.toDual ∘ f)
Alias of the reverse direction of monotone_toDual_comp_iff.
theorem MonotoneOn.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn f s → AntitoneOn (f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of antitoneOn_comp_ofDual_iff.
theorem AntitoneOn.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn f s → MonotoneOn (f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of monotoneOn_comp_ofDual_iff.
theorem MonotoneOn.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn f s → AntitoneOn (⇑OrderDual.toDual ∘ f) s
Alias of the reverse direction of antitoneOn_toDual_comp_iff.
theorem AntitoneOn.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn f s → MonotoneOn (⇑OrderDual.toDual ∘ f) s
Alias of the reverse direction of monotoneOn_toDual_comp_iff.
theorem StrictMono.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → StrictAnti (f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of strictAnti_comp_ofDual_iff.
theorem StrictAnti.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → StrictMono (f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of strictMono_comp_ofDual_iff.
theorem StrictMono.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → StrictAnti (⇑OrderDual.toDual ∘ f)
Alias of the reverse direction of strictAnti_toDual_comp_iff.
theorem StrictAnti.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → StrictMono (⇑OrderDual.toDual ∘ f)
Alias of the reverse direction of strictMono_toDual_comp_iff.
theorem StrictMonoOn.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → StrictAntiOn (f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of strictAntiOn_comp_ofDual_iff.
theorem StrictAntiOn.dual_left E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → StrictMonoOn (f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of strictMonoOn_comp_ofDual_iff.
theorem StrictMonoOn.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → StrictAntiOn (⇑OrderDual.toDual ∘ f) s
Alias of the reverse direction of strictAntiOn_toDual_comp_iff.
theorem StrictAntiOn.dual_right E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → StrictMonoOn (⇑OrderDual.toDual ∘ f) s
Alias of the reverse direction of strictMonoOn_toDual_comp_iff.
theorem Monotone.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Monotone f → Monotone (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of monotone_dual_iff.
theorem Antitone.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
Antitone f → Antitone (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of antitone_dual_iff.
theorem MonotoneOn.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
MonotoneOn f s → MonotoneOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of monotoneOn_dual_iff.
theorem AntitoneOn.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
AntitoneOn f s → AntitoneOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of antitoneOn_dual_iff.
theorem StrictMono.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → StrictMono (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of strictMono_dual_iff.
theorem StrictAnti.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → StrictAnti (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual)
Alias of the reverse direction of strictAnti_dual_iff.
theorem StrictMonoOn.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → StrictMonoOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of strictMonoOn_dual_iff.
theorem StrictAntiOn.dual E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → StrictAntiOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s
Alias of the reverse direction of strictAntiOn_dual_iff.
theorem StrictMono.wellFoundedGT E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} [WellFoundedGT β],
StrictMono f → WellFoundedGT α
theorem StrictMono.wellFoundedLT E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} [WellFoundedLT β],
StrictMono f → WellFoundedLT α
theorem StrictAnti.wellFoundedLT E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} [WellFoundedGT β],
StrictAnti f → WellFoundedLT α
theorem StrictAnti.wellFoundedGT E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} [WellFoundedLT β],
StrictAnti f → WellFoundedGT α
theorem MonotoneOn.strictMonoOn_of_injOn E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : PartialOrder β] {f : α → β} {s : Set α},
MonotoneOn f s → Set.InjOn f s → StrictMonoOn f s
theorem AntitoneOn.strictAntiOn_of_injOn E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : PartialOrder β] {f : α → β} {s : Set α},
AntitoneOn f s → Set.InjOn f s → StrictAntiOn f s
theorem StrictMono.isMin_of_apply E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {a : α},
StrictMono f → IsMin (f a) → IsMin a
theorem StrictMono.isMax_of_apply E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {a : α},
StrictMono f → IsMax (f a) → IsMax a
theorem StrictAnti.isMin_of_apply E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {a : α},
StrictAnti f → IsMax (f a) → IsMin a
theorem StrictAnti.isMax_of_apply E0 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β} {a : α},
StrictAnti f → IsMin (f a) → IsMax a
theorem StrictMono.add_le_nat E1 #
∀ {f : ℕ → ℕ}, StrictMono f → ∀ (m n : ℕ), m + f n ≤ f (m + n)
theorem StrictMono.ite' E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f g : α → β},
StrictMono f →
StrictMono g →
∀ {p : α → Prop} [inst_2 : DecidablePred p],
(∀ ⦃x y : α⦄, x < y → p y → p x) →
(∀ ⦃x y : α⦄, p x → ¬p y → x < y → f x < g y) → StrictMono fun x ↦ if p x then f x else g x
theorem StrictMono.ite E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f g : α → β},
StrictMono f →
StrictMono g →
∀ {p : α → Prop} [inst_2 : DecidablePred p],
(∀ ⦃x y : α⦄, x < y → p y → p x) → (∀ (x : α), f x ≤ g x) → StrictMono fun x ↦ if p x then f x else g x
theorem StrictAnti.ite' E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f g : α → β},
StrictAnti f →
StrictAnti g →
∀ {p : α → Prop} [inst_2 : DecidablePred p],
(∀ ⦃x y : α⦄, x < y → p y → p x) →
(∀ ⦃x y : α⦄, p x → ¬p y → x < y → g y < f x) → StrictAnti fun x ↦ if p x then f x else g x
theorem StrictAnti.ite E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] [inst_1 : Preorder β] {f g : α → β},
StrictAnti f →
StrictAnti g →
∀ {p : α → Prop} [inst_2 : DecidablePred p],
(∀ ⦃x y : α⦄, x < y → p y → p x) → (∀ (x : α), g x ≤ f x) → StrictAnti fun x ↦ if p x then f x else g x
theorem List.foldl_monotone E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] {f : α → β → α},
(∀ (b : β), Monotone fun a ↦ f a b) → ∀ (l : List β), Monotone fun a ↦ List.foldl f a l
theorem List.foldr_monotone E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder β] {f : α → β → β},
(∀ (a : α), Monotone (f a)) → ∀ (l : List α), Monotone fun b ↦ List.foldr f b l
theorem List.foldl_strictMono E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder α] {f : α → β → α},
(∀ (b : β), StrictMono fun a ↦ f a b) → ∀ (l : List β), StrictMono fun a ↦ List.foldl f a l
theorem List.foldr_strictMono E1 #
∀ {α : Type u} {β : Type v} [inst : Preorder β] {f : α → β → β},
(∀ (a : α), StrictMono (f a)) → ∀ (l : List α), StrictMono fun b ↦ List.foldr f b l
theorem StrictMonoOn.le_iff_le E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → (f a ≤ f b ↔ a ≤ b)
theorem StrictAntiOn.le_iff_ge E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → (f a ≤ f b ↔ b ≤ a)
theorem StrictMonoOn.lt_iff_lt E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → (f a < f b ↔ a < b)
theorem StrictAntiOn.lt_iff_gt E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → (f a < f b ↔ b < a)
theorem StrictMono.le_iff_le E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → ∀ {a b : α}, f a ≤ f b ↔ a ≤ b
theorem StrictAnti.le_iff_ge E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → ∀ {a b : α}, f a ≤ f b ↔ b ≤ a
theorem StrictMono.lt_iff_lt E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → ∀ {a b : α}, f a < f b ↔ a < b
theorem StrictAnti.lt_iff_gt E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → ∀ {a b : α}, f a < f b ↔ b < a
theorem StrictMonoOn.compares E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → ∀ {o : Ordering}, o.Compares (f a) (f b) ↔ o.Compares a b
theorem StrictAntiOn.compares E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → ∀ {a b : α}, a ∈ s → b ∈ s → ∀ {o : Ordering}, o.Compares (f a) (f b) ↔ o.Compares b a
theorem StrictMono.compares E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → ∀ {a b : α} {o : Ordering}, o.Compares (f a) (f b) ↔ o.Compares a b
theorem StrictAnti.compares E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → ∀ {a b : α} {o : Ordering}, o.Compares (f a) (f b) ↔ o.Compares b a
theorem StrictMono.injective E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → Function.Injective f
theorem StrictAnti.injective E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → Function.Injective f
theorem StrictMonoOn.injOn E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictMonoOn f s → Set.InjOn f s
theorem StrictAntiOn.injOn E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β} {s : Set α},
StrictAntiOn f s → Set.InjOn f s
theorem StrictMono.maximal_of_maximal_image E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → ∀ {a : α}, (∀ (p : β), p ≤ f a) → ∀ (x : α), x ≤ a
theorem StrictMono.minimal_of_minimal_image E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictMono f → ∀ {a : α}, (∀ (p : β), f a ≤ p) → ∀ (x : α), a ≤ x
theorem StrictAnti.minimal_of_maximal_image E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → ∀ {a : α}, (∀ (p : β), p ≤ f a) → ∀ (x : α), a ≤ x
theorem StrictAnti.maximal_of_minimal_image E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : Preorder β] {f : α → β},
StrictAnti f → ∀ {a : α}, (∀ (p : β), f a ≤ p) → ∀ (x : α), x ≤ a
theorem Monotone.strictMono_iff_injective E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : PartialOrder β] {f : α → β},
Monotone f → (StrictMono f ↔ Function.Injective f)
theorem Antitone.strictAnti_iff_injective E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : PartialOrder β] {f : α → β},
Antitone f → (StrictAnti f ↔ Function.Injective f)
theorem MonotoneOn.strictMonoOn_iff_injOn E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : PartialOrder β] {f : α → β} {s : Set α},
MonotoneOn f s → (StrictMonoOn f s ↔ Set.InjOn f s)
theorem AntitoneOn.strictAnti_iff_injOn E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : PartialOrder β] {f : α → β} {s : Set α},
AntitoneOn f s → (StrictAntiOn f s ↔ Set.InjOn f s)
theorem not_monotone_not_antitone_iff_exists_le_le E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
¬Monotone f ∧ ¬Antitone f ↔ ∃ a b c, a ≤ b ∧ b ≤ c ∧ (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)
A function between linear orders which is neither monotone nor antitone makes a dent upright or downright.
theorem not_monotone_not_antitone_iff_exists_lt_lt E1 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
¬Monotone f ∧ ¬Antitone f ↔ ∃ a b c, a < b ∧ b < c ∧ (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)
A function between linear orders which is neither monotone nor antitone makes a dent upright or downright.
theorem StrictMonoOn.cmp_map_eq E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {x y : α},
StrictMonoOn f s → x ∈ s → y ∈ s → cmp (f x) (f y) = cmp x y
theorem StrictMono.cmp_map_eq E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
StrictMono f → ∀ (x y : α), cmp (f x) (f y) = cmp x y
theorem StrictAntiOn.cmp_map_eq E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β} {s : Set α} {x y : α},
StrictAntiOn f s → x ∈ s → y ∈ s → cmp (f x) (f y) = cmp y x
theorem StrictAnti.cmp_map_eq E0 #
∀ {α : Type u} {β : Type v} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
StrictAnti f → ∀ (x y : α), cmp (f x) (f y) = cmp y x
theorem Nat.rel_of_forall_rel_succ_of_le_of_lt E1 #
∀ {β : Type v} (r : β → β → Prop) [IsTrans β r] {f : ℕ → β} {a : ℕ},
(∀ (n : ℕ), a ≤ n → r (f n) (f (n + 1))) → ∀ ⦃b c : ℕ⦄, a ≤ b → b < c → r (f b) (f c)
theorem Nat.rel_of_forall_rel_succ_of_le_of_le E1 #
∀ {β : Type v} (r : β → β → Prop) [Std.Refl r] [IsTrans β r] {f : ℕ → β} {a : ℕ},
(∀ (n : ℕ), a ≤ n → r (f n) (f (n + 1))) → ∀ ⦃b c : ℕ⦄, a ≤ b → b ≤ c → r (f b) (f c)
theorem Nat.rel_of_forall_rel_succ_of_lt E1 #
∀ {β : Type v} (r : β → β → Prop) [IsTrans β r] {f : ℕ → β},
(∀ (n : ℕ), r (f n) (f (n + 1))) → ∀ ⦃a b : ℕ⦄, a < b → r (f a) (f b)
theorem Nat.rel_of_forall_rel_succ_of_le E1 #
∀ {β : Type v} (r : β → β → Prop) [Std.Refl r] [IsTrans β r] {f : ℕ → β},
(∀ (n : ℕ), r (f n) (f (n + 1))) → ∀ ⦃a b : ℕ⦄, a ≤ b → r (f a) (f b)
theorem monotone_nat_of_le_succ E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, (∀ (n : ℕ), f n ≤ f (n + 1)) → Monotone f
theorem monotone_nat_iff E0 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, Monotone f ↔ ∀ (n : ℕ), f n ≤ f (n + 1)
theorem monotone_add_nat_of_le_succ E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (∀ n ≥ k, f n ≤ f (n + 1)) → Monotone fun n ↦ f (n + k)
theorem monotoneOn_nat_Ici_of_le_succ E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (∀ n ≥ k, f n ≤ f (n + 1)) → MonotoneOn f {x | k ≤ x}
theorem monotone_add_nat_iff_monotoneOn_nat_Ici E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (Monotone fun n ↦ f (n + k)) ↔ MonotoneOn f {x | k ≤ x}
theorem antitone_nat_of_succ_le E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, (∀ (n : ℕ), f (n + 1) ≤ f n) → Antitone f
theorem antitone_nat_iff E0 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, Antitone f ↔ ∀ (n : ℕ), f (n + 1) ≤ f n
theorem antitone_add_nat_of_succ_le E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (∀ n ≥ k, f (n + 1) ≤ f n) → Antitone fun n ↦ f (n + k)
theorem antitoneOn_nat_Ici_of_succ_le E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (∀ n ≥ k, f (n + 1) ≤ f n) → AntitoneOn f {x | k ≤ x}
theorem antitone_add_nat_iff_antitoneOn_nat_Ici E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α} {k : ℕ}, (Antitone fun n ↦ f (n + k)) ↔ AntitoneOn f {x | k ≤ x}
theorem strictMono_nat_of_lt_succ E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, (∀ (n : ℕ), f n < f (n + 1)) → StrictMono f
theorem strictAnti_nat_of_succ_lt E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, (∀ (n : ℕ), f (n + 1) < f n) → StrictAnti f
theorem strictMono_nat_iff E0 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, StrictMono f ↔ ∀ (n : ℕ), f n < f (n + 1)
theorem strictAnti_nat_iff E0 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α}, StrictAnti f ↔ ∀ (n : ℕ), f (n + 1) < f n
theorem Nat.exists_strictMono' E1 #
∀ {α : Type u} [inst : Preorder α] [NoMaxOrder α] (a : α), ∃ f, StrictMono f ∧ f 0 = a
If α is a preorder with no maximal elements, then there exists a strictly monotone function
ℕ → α with any prescribed value of f 0.
theorem Nat.exists_strictAnti' E1 #
∀ {α : Type u} [inst : Preorder α] [NoMinOrder α] (a : α), ∃ f, StrictAnti f ∧ f 0 = a
If α is a preorder with no maximal elements, then there exists a strictly antitone function
ℕ → α with any prescribed value of f 0.
theorem Nat.exists_strictMono_subsequence E1 #
∀ {P : ℕ → Prop}, (∀ (N : ℕ), ∃ n > N, P n) → ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P (φ n)
theorem Nat.exists_strictMono E1 #
∀ (α : Type u) [inst : Preorder α] [Nonempty α] [NoMaxOrder α], ∃ f, StrictMono f
If α is a nonempty preorder with no maximal elements, then there exists a strictly monotone
function ℕ → α.
theorem Nat.exists_strictAnti E1 #
∀ (α : Type u) [inst : Preorder α] [Nonempty α] [NoMinOrder α], ∃ f, StrictAnti f
If α is a nonempty preorder with no minimal elements, then there exists a strictly antitone
function ℕ → α.
theorem Nat.pow_self_mono E1 #
Monotone fun n ↦ n ^ n
theorem Nat.pow_monotoneOn E1 #
MonotoneOn (fun p ↦ p.1 ^ p.2) {p | p.1 ≠ 0}
theorem Nat.pow_self_strictMonoOn E1 #
StrictMonoOn (fun n ↦ n ^ n) {n | n ≠ 0}
theorem Int.rel_of_forall_rel_succ_of_lt E1 #
∀ {β : Type v} (r : β → β → Prop) [IsTrans β r] {f : ℤ → β},
(∀ (n : ℤ), r (f n) (f (n + 1))) → ∀ ⦃a b : ℤ⦄, a < b → r (f a) (f b)
theorem Int.rel_of_forall_rel_succ_of_le E1 #
∀ {β : Type v} (r : β → β → Prop) [Std.Refl r] [IsTrans β r] {f : ℤ → β},
(∀ (n : ℤ), r (f n) (f (n + 1))) → ∀ ⦃a b : ℤ⦄, a ≤ b → r (f a) (f b)
theorem monotone_int_of_le_succ E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α}, (∀ (n : ℤ), f n ≤ f (n + 1)) → Monotone f
theorem antitone_int_of_succ_le E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α}, (∀ (n : ℤ), f (n + 1) ≤ f n) → Antitone f
theorem strictMono_int_of_lt_succ E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α}, (∀ (n : ℤ), f n < f (n + 1)) → StrictMono f
theorem strictAnti_int_of_succ_lt E3 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α}, (∀ (n : ℤ), f (n + 1) < f n) → StrictAnti f
theorem Int.exists_strictMono E1 #
∀ (α : Type u) [inst : Preorder α] [Nonempty α] [NoMinOrder α] [NoMaxOrder α], ∃ f, StrictMono f
If α is a nonempty preorder with no minimal or maximal elements, then there exists a strictly
monotone function f : ℤ → α.
theorem Int.exists_strictAnti E1 #
∀ (α : Type u) [inst : Preorder α] [Nonempty α] [NoMinOrder α] [NoMaxOrder α], ∃ f, StrictAnti f
If α is a nonempty preorder with no minimal or maximal elements, then there exists a strictly
antitone function f : ℤ → α.
theorem Monotone.ne_of_lt_of_lt_nat E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α},
Monotone f → ∀ (n : ℕ) {x : α}, f n < x → x < f (n + 1) → ∀ (a : ℕ), f a ≠ x
If f is a monotone function from ℕ to a preorder such that x lies between f n and
f (n + 1), then x doesn't lie in the range of f.
theorem Antitone.ne_of_lt_of_lt_nat E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℕ → α},
Antitone f → ∀ (n : ℕ) {x : α}, f (n + 1) < x → x < f n → ∀ (a : ℕ), f a ≠ x
If f is an antitone function from ℕ to a preorder such that x lies between f (n + 1) and
f n, then x doesn't lie in the range of f.
theorem Monotone.ne_of_lt_of_lt_int E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α},
Monotone f → ∀ (n : ℤ) {x : α}, f n < x → x < f (n + 1) → ∀ (a : ℤ), f a ≠ x
If f is a monotone function from ℤ to a preorder and x lies between f n and
f (n + 1), then x doesn't lie in the range of f.
theorem Antitone.ne_of_lt_of_lt_int E1 #
∀ {α : Type u} [inst : Preorder α] {f : ℤ → α},
Antitone f → ∀ (n : ℤ) {x : α}, f (n + 1) < x → x < f n → ∀ (a : ℤ), f a ≠ x
If f is an antitone function from ℤ to a preorder and x lies between f (n + 1) and
f n, then x doesn't lie in the range of f.
theorem Nat.stabilises_of_monotone E1 #
∀ {f : ℕ → ℕ} {b n : ℕ},
Monotone f → (∀ (m : ℕ), f m ≤ b) → (∀ (m : ℕ), f m = f (m + 1) → f (m + 1) = f (m + 2)) → b ≤ n → f n = f b
A monotone function f : ℕ → ℕ bounded by b, which is constant after stabilising for the
first time, stabilises in at most b steps.
theorem Nat.stabilises_of_antitone E1 #
∀ {f : ℕ → ℕ},
Antitone f → (∀ (m : ℕ), f m = f (m + 1) → f (m + 1) = f (m + 2)) → ∃ n ≤ f 0, ∀ (m : ℕ), n ≤ m → f m = f n
An antitone function f : ℕ → ℕ which is constant after stabilising for the first time,
stabilises in at most f 0 steps.
Compared to WellFoundedLT.antitone_chain_condition, this lemma requires the extra hypothesis
hfstab and only applies to ℕ-valued functions, but in return it gives an explicit bound on the
stabilisation index.
theorem converges_of_monotone_of_bounded E1 #
∀ {f : ℕ → ℕ}, Monotone f → ∀ {c : ℕ}, (∀ (n : ℕ), f n ≤ c) → ∃ b N, ∀ n ≥ N, f n = b
A bounded monotone function ℕ → ℕ converges.