Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. 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.
(** * Uniform Structures *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Truncations.Core.Require Import Spaces.Nat.Core.LocalOpen Scope nat_scope.(** ** [nat]-graded uniform structures *)(** A uniform structure on a type consists of an equivalence relation for every natural number, each one being stronger than its predecessor. *)ClassUStructure (us_type : Type) := {
us_rel : nat -> Relation us_type;
us_reflexive :: foralln : nat, Reflexive (us_rel n);
us_symmetric :: foralln : nat, Symmetric (us_rel n);
us_transitive :: foralln : nat, Transitive (us_rel n);
us_pred : forall (n : nat) (xy : us_type), us_rel n.+1 x y -> us_rel n x y
}.Notation"u =[ n ] v" := (us_rel n u v)
(at level70, format"u =[ n ] v").
X: Type struct: UStructure X m, n: nat hm: m <= n u, v: X h: u =[n] v
u =[m] v
X: Type struct: UStructure X m, n: nat hm: m <= n u, v: X h: u =[n] v
u =[m] v
X: Type struct: UStructure X m: nat u, v: X h: u =[m] v
u =[m] v
X: Type struct: UStructure X m, m0: nat hm: m <= m0 u, v: X h: u =[m0.+1] v IHhm: u =[m0] v -> u =[m] v
u =[m] v
X: Type struct: UStructure X m: nat u, v: X h: u =[m] v
u =[m] v
assumption.
X: Type struct: UStructure X m, m0: nat hm: m <= m0 u, v: X h: u =[m0.+1] v IHhm: u =[m0] v -> u =[m] v
u =[m] v
X: Type struct: UStructure X m, m0: nat hm: m <= m0 u, v: X h: u =[m0.+1] v IHhm: u =[m0] v -> u =[m] v
u =[m0] v
byapply us_pred.Defined.(** Every type admits the trivial uniform structure with the standard identity type on every level. *)
X: Type
UStructure X
X: Type
UStructure X
X: Type
forall (n : nat) (xy : X),
(fun (_ : nat) (x0y0 : X) => x0 = y0) n.+1 x y ->
(fun (_ : nat) (x0y0 : X) => x0 = y0) n x y
exact (fun___ => idmap).Defined.(** Example of a uniform structures based on truncations, with the relation being the [n-2]-truncation of the identity type. *)
forall (n : nat) (xy : X),
(fun (n0 : nat) (x0y0 : X) =>
Tr (trunc_index_inc (-2) n0) (x0 = y0)) n.+1 x y ->
(fun (n0 : nat) (x0y0 : X) =>
Tr (trunc_index_inc (-2) n0) (x0 = y0)) n x y
X: Type n: nat x, y: X h: x = y
Tr (trunc_index_inc (-2) n) (x = y)
exact (tr h).Defined.(** ** Continuity *)(** Definition of a continuous function depending on two uniform structures. *)DefinitionIsContinuous
{XY : Type} {usX : UStructure X} {usY : UStructure Y} (p : X -> Y)
:= forall (u : X) (m : nat),
{n : nat & forallv : X, u =[n] v -> p u =[m] p v}.Definitionuniformly_continuous {XY : Type}
{usX : UStructure X} {usY : UStructure Y} (p : X -> Y)
:= forall (m : nat),
{n : nat & foralluv : X, u =[n] v -> p u =[m] p v}.(** In the case that the target has the trivial uniform structure, it is useful to state uniform continuity by providing the specific modulus, which now only depends on the function. *)Definitionis_modulus_of_uniform_continuity {XY : Type} {usX : UStructure X}
(n : nat) (p : X -> Y)
:= foralluv : X, u =[n] v -> p u = p v.Definitionuniformly_continuous_has_modulus {XY :Type} {usX : UStructure X}
{p : X -> Y} {n : nat} (c : is_modulus_of_uniform_continuity n p)
: uniformly_continuous p
:= funm => (n; c).Definitioniscontinuous_uniformly_continuous {XY : Type}
{usX : UStructure X} {usY : UStructure Y} (p : X -> Y)
: uniformly_continuous p -> IsContinuous p
:= funucum => ((uc m).1 ; funv => (uc m).2 u v).