(* * Copyright (c) 2009-2010, Andrew Appel, Robert Dockins and Aquinas Hobor. * *)
Local Open Scope pred.

(* Specifications: *)
Lemma conj_nonexpansive {A} `{ageable A} : forall (F G:pred A -> pred A),
nonexpansive F ->
nonexpansive G ->
nonexpansive (fun x:pred A => F x && G x).
Lemma conj_contractive {A} `{ageable A} : forall F G,
contractive F ->
contractive G ->
contractive (fun x => F x && G x).
Lemma impl_contractive {A} `{ageable A} : forall F G,
contractive F ->
contractive G ->
contractive (fun x => F x --> G x).
Lemma impl_nonexpansive {A} `{ageable A} : forall F G,
nonexpansive F ->
nonexpansive G ->
nonexpansive (fun x => F x --> G x).
Lemma forall_contractive {A} `{ageable A} : forall B (X : pred A -> B -> pred A),
(forall x, (contractive (fun y => X y x))) ->
contractive (fun x => (allp (X x))).
Lemma forall_nonexpansive {A} `{ageable A} : forall B (X : pred A -> B -> pred A),
(forall x, (nonexpansive (fun y => X y x))) ->
nonexpansive (fun x => (allp (X x))).
Lemma exists_contractive {A} `{ageable A} : forall B (X : pred A -> B -> pred A),
(forall x, (contractive (fun y => X y x))) ->
contractive (fun x => (exp (X x))).
Lemma exists_nonexpansive {A} `{ageable A} : forall B (X : pred A -> B -> pred A),
(forall x, (nonexpansive (fun y => X y x))) ->
nonexpansive (fun x => (exp (X x))).
Lemma later_contractive {A} `{ageable A} : forall F,
nonexpansive F ->
contractive (fun X => (|>(F X))).
Lemma const_nonexpansive {A: Type} {H: ageable A}: forall P: pred A,
nonexpansive (fun _ => P).
Lemma const_contractive {A: Type} {H: ageable A}: forall P: pred A,
contractive (fun _ => P).
Lemma identity_nonexpansive {A: Type} {H: ageable A}:
nonexpansive (fun P: pred A => P).
Lemma valid_rel_fashion {A} `{AG: ageable A} : valid_rel fashionR.
Definition fashionM {A} `{ageable A} : modality
:= exist _ fashionR valid_rel_fashion.