Definition covariant {B A : Type} (F: (B -> pred A) -> (B -> pred A)) : Prop :=
forall (P Q: B -> pred A), (forall x, P x |-- Q x) -> (forall x, F P x |-- F Q x).
Definition corec {B A: Type}  (F: (B -> pred A) -> (B -> pred A)) : B -> pred A :=
fun x w => forall P: B -> pred A, (forall x, F P x |-- P x) -> P x w.

(* Specifications: *)
Lemma corec_fold_unfold {B A}:
forall {F: (B -> pred A) -> (B -> pred A)},
covariant F ->
corec F = F (corec F).
Lemma corec_least_fixpoint {B A}:
forall {F: (B -> pred A) -> (B -> pred A)}, forall {P : B -> pred A},
P = F P ->
forall b, corec F b |-- P b.
Lemma covariant_sepcon {B}{A} {JA: Join A}{PA: Perm_alg A}:
forall P Q : (B -> pred A) -> (B -> pred A),
covariant P -> covariant Q ->
covariant (fun (x : B -> pred A) b => P x b * Q x b)%pred.
Lemma covariant_const {B A}:    forall P : B -> pred A, covariant (fun _ => P).
Lemma covariant_orp {B A}:  forall P Q: (B -> pred A)-> (B -> pred A),
covariant P -> covariant Q -> covariant (fun x b => P x b || Q x b)%pred.
Lemma covariant_andp {B A}:  forall P Q: (B -> pred A) -> (B -> pred A),
covariant P -> covariant Q -> covariant (fun x b => P x b && Q x b)%pred.
Lemma covariant_exp {C B A}: forall F: C -> (B -> pred A) -> (B -> pred A),
(forall c, covariant (F c)) ->
covariant (fun P b => EX c:C, F c P b)%pred.
Lemma covariant_id {B A}: covariant (fun F: B -> pred A => F).
Lemma covariant_const' {B A}:
forall c:B,  covariant (fun (P: B -> pred A) _ => P c).