Extend such type checker to the language defined in Lecture 11, namely the language with terms defined by the following grammar:
Term ::= Var | \Var. Term | Term Term pure lambda terms | (Term,Term) | fst Term | snd Term pairs and projections | inl Term | inr Term injections | case(Term, \Var.Term, \Var.Term) case constructand types defined by the following grammar:
Type ::= TVar | Type -> Type | Type * Type | Type + TypeDefining the suitable representation in lambda Prolog of terms and types is part of the exercise.