Definition EqPredType_trans r2 r1 r3 := @EqPredType_trans' r1 r2 r3.Definition SubPredType_trans r2 r1 r3 := @SubPredType_trans' r1 r2 r3.(* Declaration of relations *)

Add Parametric Relation T (pT : PredType T) : pT (@EqPredType _ pT)    
   reflexivity proved by (@EqPredType_refl _ _)                         
  symmetry proved by (@EqPredType_sym _ _)                              
  transitivity proved by (@EqPredType_trans' _ _) as EqPredType_rel.Add Parametric Relation T : (Simpl_Pred T) (@EqSimplPred _)
  reflexivity proved by (@EqPredType_refl _ _)
  symmetry proved by (@EqPredType_sym _ _)
  transitivity proved by (@EqPredType_trans' _ _) as EqSimplPred_rel.Add Parametric Relation T : (Simpl_Pred T) (@SubSimplPred _) 
  reflexivity proved by (@SubPredType_refl _ _)
  transitivity proved by (@SubPredType_trans' _ _) as SubSimplPred_rel.Add Parametric Relation T : (Mem_Pred T) (@EqMem T)
  reflexivity proved by (@EqPredType_refl _ _)
  symmetry proved by (@EqPredType_sym _ _)
  transitivity proved by (@EqPredType_trans' _ _) as EqMem_rel.Add Parametric Relation T : (Mem_Pred T) (@SubMem _) 
  reflexivity proved by (@SubPredType_refl _ _)
  transitivity proved by (@SubPredType_trans' _ _) as SubMem_rel.(* Declaring morphisms. *)

Add Parametric Morphism T : (@Pred_of_Simpl T) with signature
      @EqSimplPred _ ==> @EqPredType T (PredPredType T) as Pred_of_Simpl_morph.Add Parametric Morphism T (pT : PredType T) : (@EqPredType T pT) with signature 
    @EqPredType _ _ ==> @EqPredType _ _ ==> iff as EqPredType_morph.Add Parametric Morphism T (pT : PredType T) : (@SubPredType T pT) with signature
    @EqPredType _ _ ==> @EqPredType _ _ ==> iff as SubPred_morph.Add Parametric Morphism T : (@InMem T) with signature 
    @eq _ ==> @EqMem _ ==> iff as InMem_morph.Add Parametric Morphism T (pT : PredType T) : (@Mem T pT) with signature
  @EqPredType _ _ ==> @EqMem _ as Mem_morhp.Add Parametric Morphism T : (@PredU T) with signature 
    @EqPredType _ _ ==> @EqPredType _ _ ==> @EqSimplPred _ as predU_morph.Add Parametric Morphism T : (@PredI T) with signature 
    @EqPredType _ _ ==> @EqPredType _ _ ==> @EqPredType _ _ as predI_morph.Add Parametric Morphism T : (@PredC T) with signature 
    @EqPredType _ _ ==> @EqPredType _ _ as predC_morph.

(* Specifications: *)
Lemma orrI (r : Pred nat) : r +p r <~> r.
Lemma orrC (r1 r2 : Pred T) : r1 +p r2 <~> r2 +p r1.
Lemma orr0 (r : Pred T) : r +p Pred0 <~> r.
Lemma or0r (r : Pred T) : Pred0 +p r <~> r.
Lemma orrCA (r1 r2 r3 : Pred T) : r1 +p r2 +p r3 <~> r2 +p r1 +p r3.
Lemma orrAC (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> (r1 +p r3) +p r2.
Lemma orrA (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> r1 +p r2 +p r3.
Lemma orrAb (r1 a : Pred T) : r1 <~> r1 +p a <-> a ~> r1.
Lemma sub_orl (r1 r2 : Pred T) : r1 ~> r1 +p r2.
Lemma sub_orr (r1 r2 : Pred T) : r2 ~> r1 +p r2.
Lemma subp_refl (p : Pred T) : p <=p p.
Lemma subp_asym (p1 p2 : Pred T) : p1 <=p p2 -> p2 <=p p1 -> p1 =p p2.
Lemma subp_trans (p2 p1 p3 : Pred T) : p1 <=p p2 -> p2 <=p p3 -> p1 <=p p3.
Lemma subp_or (p1 p2 q : Pred T) : p1 <=p q /\ p2 <=p q <-> p1 +p p2 <=p q.
Lemma subp_and (p1 p2 q : Pred T) : q <=p p1 /\ q <=p p2 <-> q <=p p1 *p p2.
Lemma subp_orl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 +p q <=p p2 +p q.
Lemma subp_orr (p1 p2 q : Pred T) : p1 <=p p2 -> q +p p1 <=p q +p p2.
Lemma subp_andl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 *p q <=p p2 *p q.
Lemma subp_andr (p1 p2 q : Pred T) : p1 <=p p2 -> q *p p1 <=p q *p p2.