(** ** Definition of recognisable classes *)
Definition recognisable p :=
exists u, proc u /\ forall s, p s <-> eva (u (tenc s)).
(* * Complement, intersection and union of predicates *)
Definition complement p := fun t => ~ p t.
Definition intersection p q := fun t => p t /\ q t.
Definition union p q := fun t => p t \/ q t.
(** ** Decidable classes are closed under union, intersection and complement *)
Definition tcompl (u : term) : term := .\"x"; (!u "x") !F !T.
Definition tintersection u v : term := .\"x"; (!u "x") (!v "x") !F.
Definition tunion u v : term := .\"x"; (!u "x") !T (!v "x").

Lemma decidable_intersection p q : decidable p -> decidable q -> decidable (intersection p q).