Set Implicit Arguments.
From Undecidability.HOU Require Import calculus.calculus unification.unification second_order.diophantine_equations.
(* * Second-Order Realisation *)
(* ** Goldfarb Numerals *)
Definition ag : Const :=
{|
const_type := option (option False);
ctype :=  fun o =>
match o with
| None => alpha → alpha → alpha
| Some None => alpha
| Some (Some f) => match f with end
end;
|}.
Notation g := (@const ag None).
Notation a := (@const ag (Some None)).

Lemma typing_a Gamma: Gamma ⊢(2) a : alpha.