Section type_reification.
Inductive term :Type :=
Fun : term -> term -> term
| Prod : term -> term -> term
| Bool : term
| SET :term
| PROP :term
| TYPE :term
| Var : Type -> term.
Fixpoint interp (t:term) :=
match t with
Bool => bool
| SET => Set
| PROP => Prop
| TYPE => Type
| Fun a b => interp a -> interp b
| Prod a b => interp a * interp b
| Var x => x
end.
Record interp_pair :Type :=
{ repr:>term;
abs:>Type;
link: abs = interp repr }.
Canonical Structure ProdCan (a b:interp_pair) :=
Build_interp_pair (Prod a b) (a * b) (prod_interp a b).
Canonical Structure FunCan (a b:interp_pair) :=
Build_interp_pair (Fun a b) (a -> b) (fun_interp a b).
Canonical Structure BoolCan :=
Build_interp_pair Bool bool (refl_equal _).
Canonical Structure VarCan (x:Type) :=
Build_interp_pair (Var x) x (refl_equal _).
Canonical Structure SetCan :=
Build_interp_pair SET Set (refl_equal _).
Canonical Structure PropCan :=
Build_interp_pair PROP Prop (refl_equal _).
Canonical Structure TypeCan :=
Build_interp_pair TYPE Type (refl_equal _).
(* Print Canonical Projections. *)
Variable A:Type.
Variable Inhabited: term -> Prop.
Variable Inhabited_correct: forall p, Inhabited (repr p)  -> abs p.

Lemma L : Prop * A -> bool * (Type -> Set) .