Built with Alectryon, running Coq+SerAPI v8.20.0+0.20.0. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file ssrmatching_plugin.cmxs (using legacy method) ... done]
[Loading ML file ssreflect_plugin.cmxs (using legacy method) ... done]
[Loading ML file ring_plugin.cmxs (using legacy method) ... done]
Serlib plugin: coq-elpi.elpi is not available: serlib support is missing.
Incremental checking for commands in this plugin will be impacted.
[Loading ML file coq-elpi.elpi ... done]
Notation"_ + _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ - _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ <= _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ < _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ >= _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ > _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
Notation"_ <= _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing,default]
Notation"_ < _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing,default]
Notation"_ <= _ < _" was already used in scope
nat_scope. [notation-overridden,parsing,default]
Notation"_ < _ < _" was already used in scope
nat_scope. [notation-overridden,parsing,default]
Notation"_ * _" was already used in scope nat_scope.
[notation-overridden,parsing,default]
(** In this section, we define and prove facts about subadditivity and subadditive functions. The definition of subadditivity presented here slightly differs from the standard one ([f (a + b) <= f a + f b] for any [a] and [b]), but it is proven to be equivalent to it. *)SectionSubadditivity.(** First, we define subadditivity as a point-wise property; i.e., [f] is subadditive at [h] if standard subadditivity holds for any pair [(a,b)] that sums to [h]. *)Definitionsubadditive_atfh :=
forallab,
a + b = h ->
f h <= f a + f b.(** Second, we define the concept of partial subadditivity until a certain horizon [h]. This definition is useful when dealing with finite sequences. *)Definitionsubadditive_untilfh :=
forallx,
x < h ->
subadditive_at f x.(** Finally, give a definition of subadditive function: [f] is subadditive when it is subadditive at any point [h].*)Definitionsubadditivef :=
forallh,
subadditive_at f h.(** In this section, we show that the proposed definition of subadditivity is equivalent to the standard one. *)SectionEquivalenceWithStandardDefinition.(** First, we give a standard definition of subadditivity. *)Definitionsubadditive_standardf :=
forallab,
f (a + b) <= f a + f b.(** Then, we prove that the two definitions are implied by each other. *)
forallf : nat -> nat,
subadditive f <-> subadditive_standard f
forallf : nat -> nat,
subadditive f <-> subadditive_standard f
f: nat -> nat
subadditive f -> subadditive_standard f
f: nat -> nat
subadditive_standard f -> subadditive f
f: nat -> nat
subadditive f -> subadditive_standard f
f: nat -> nat
subadditive_standard f -> subadditive f
f: nat -> nat SUB: subadditive f a, b: nat
f (a + b) <= f a + f b
f: nat -> nat
subadditive_standard f -> subadditive f
f: nat -> nat
subadditive_standard f -> subadditive f
f: nat -> nat
subadditive_standard f -> subadditive f
f: nat -> nat SUB: subadditive_standard f h, a, b: nat AB: a + b = h
f h <= f a + f b
f: nat -> nat SUB: subadditive_standard f h, a, b: nat AB: a + b = h
f (a + b) <= f a + f b
byapply SUB.Qed.EndEquivalenceWithStandardDefinition.(** In the following section, we prove some useful facts about subadditivity. *)SectionFacts.(** Consider a function [f]. *)Variablef : nat -> nat.(** In this section, we show some of the properties of subadditive functions. *)SectionSubadditiveFunctions.(** Assume that [f] is subadditive. *)Hypothesish_subadditive : subadditive f.(** Then, we prove that moving any non-zero factor [m] outside of the arguments of [f] leads to a bigger or equal number. *)
f: nat -> nat h_subadditive: subadditive f
forallnm : nat, 0 < m -> f (m * n) <= m * f n
f: nat -> nat h_subadditive: subadditive f
forallnm : nat, 0 < m -> f (m * n) <= m * f n
f: nat -> nat h_subadditive: subadditive f n, m: nat
f (m.+1 * n) <= m.+1 * f n
f: nat -> nat h_subadditive: subadditive f n, m: nat IHm: f (m.+1 * n) <= m.+1 * f n
f (m.+2 * n) <= m.+2 * f n
f: nat -> nat h_subadditive: subadditive f n, m: nat IHm: f (m.+1 * n) <= m.+1 * f n
f (m.+1 * n + n) <= m.+1 * f n + f n
f: nat -> nat h_subadditive: subadditive f n, m: nat
f (m.+1 * n) + f n <= m.+1 * f n + f n ->
f (m.+1 * n + n) <= m.+1 * f n + f n