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".
Definitions #
Monotone f
: A functionf
between two preorders is monotone ifa ≤ b
impliesf a ≤ f b
.Antitone f
: A functionf
between two preorders is antitone ifa ≤ b
impliesf b ≤ f a
.MonotoneOn f s
: Same asMonotone f
, but for alla, b ∈ s
.AntitoneOn f s
: Same asAntitone f
, but for alla, b ∈ s
.StrictMono f
: A functionf
between two preorders is strictly monotone ifa < b
impliesf a < f b
.StrictAnti f
: A functionf
between two preorders is strictly antitone ifa < b
impliesf b < f a
.StrictMonoOn f s
: Same asStrictMono f
, but for alla, b ∈ s
.StrictAntiOn f s
: Same asStrictAnti f
, but for alla, b ∈ s
.
Main theorems #
monotone_nat_of_le_succ
,monotone_int_of_le_succ
: Iff : ℕ → α
orf : ℤ → α
andf n ≤ f (n + 1)
for alln
, thenf
is monotone.antitone_nat_of_succ_le
,antitone_int_of_succ_le
: Iff : ℕ → α
orf : ℤ → α
andf (n + 1) ≤ f n
for alln
, thenf
is antitone.strictMono_nat_of_lt_succ
,strictMono_int_of_lt_succ
: Iff : ℕ → α
orf : ℤ → α
andf n < f (n + 1)
for alln
, thenf
is strictly monotone.strictAnti_nat_of_succ_lt
,strictAnti_int_of_succ_lt
: Iff : ℕ → α
orf : ℤ → α
andf (n + 1) < f n
for alln
, thenf
is 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
Equations
- instDecidableMonotoneOnOfForallForallMemSetForallForallForallLe = i
Equations
- instDecidableAntitoneOnOfForallForallMemSetForallForallForallLe = i
Equations
- instDecidableStrictMonoOnOfForallForallMemSetForallForallForallLt = i
Equations
- instDecidableStrictAntiOnOfForallForallMemSetForallForallForallLt = i
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.
Alias of the reverse direction of antitone_comp_ofDual_iff
.
Alias of the reverse direction of monotone_comp_ofDual_iff
.
Alias of the reverse direction of antitone_toDual_comp_iff
.
Alias of the reverse direction of monotone_toDual_comp_iff
.
Alias of the reverse direction of antitoneOn_comp_ofDual_iff
.
Alias of the reverse direction of monotoneOn_comp_ofDual_iff
.
Alias of the reverse direction of antitoneOn_toDual_comp_iff
.
Alias of the reverse direction of monotoneOn_toDual_comp_iff
.
Alias of the reverse direction of strictAnti_comp_ofDual_iff
.
Alias of the reverse direction of strictMono_comp_ofDual_iff
.
Alias of the reverse direction of strictAnti_toDual_comp_iff
.
Alias of the reverse direction of strictMono_toDual_comp_iff
.
Alias of the reverse direction of strictAntiOn_comp_ofDual_iff
.
Alias of the reverse direction of strictMonoOn_comp_ofDual_iff
.
Alias of the reverse direction of strictAntiOn_toDual_comp_iff
.
Alias of the reverse direction of strictMonoOn_toDual_comp_iff
.
Alias of the reverse direction of monotoneOn_dual_iff
.
Alias of the reverse direction of antitoneOn_dual_iff
.
Alias of the reverse direction of strictMono_dual_iff
.
Alias of the reverse direction of strictAnti_dual_iff
.
Alias of the reverse direction of strictMonoOn_dual_iff
.
Alias of the reverse direction of strictAntiOn_dual_iff
.
Monotonicity in function spaces #
Monotonicity hierarchy #
These four lemmas are there to strip off the semi-implicit arguments ⦃a b : α⦄
. This is useful
when you do not want to apply a Monotone
assumption (i.e. your goal is a ≤ b → f a ≤ f b
).
However if you find yourself writing hf.imp h
, then you should have written hf h
instead.
Monotonicity from and to subsingletons #
Miscellaneous monotonicity results #
Monotonicity under composition #
Monotonicity in linear orders #
If a monotone function is equal at two points, it is equal between all of them
If an antitone function is equal at two points, it is equal between all of them
A function between linear orders which is neither monotone nor antitone makes a dent upright or downright.
A function between linear orders which is neither monotone nor antitone makes a dent upright or downright.
Monotonicity in ℕ
and ℤ
#
If α
is a preorder with no maximal elements, then there exists a strictly monotone function
ℕ → α
with any prescribed value of f 0
.
If α
is a preorder with no maximal elements, then there exists a strictly antitone function
ℕ → α
with any prescribed value of f 0
.
If α
is a nonempty preorder with no maximal elements, then there exists a strictly monotone
function ℕ → α
.
If α
is a nonempty preorder with no minimal elements, then there exists a strictly antitone
function ℕ → α
.
If α
is a nonempty preorder with no minimal or maximal elements, then there exists a strictly
monotone function f : ℤ → α
.
If α
is a nonempty preorder with no minimal or maximal elements, then there exists a strictly
antitone function f : ℤ → α
.
Pi types #
Alias of the forward direction of monotone_iff_apply₂
.
Alias of the reverse direction of monotone_iff_apply₂
.
Alias of the forward direction of antitone_iff_apply₂
.
Alias of the reverse direction of antitone_iff_apply₂
.