(define (=in Gamma Program Type)
(=or (=var (Gamma_p)
(=and (== Gamma (list (list Program ': Type) Gamma_p))))
(=var (Gamma_p OtherProgram OtherType)
(=and (== Gamma (list (list OtherProgram ': OtherType) Gamma_p))
(=in Gamma_p Program Type)))))
(define (=typeof Gamma Program Type)
(=or (=and (== Program 'numConst)
(== Type 'num))
(=and (== Program 'boolConst)
(== Type 'bool))
(=var (Cond True False)
(=and (== Program (list 'if Cond True False))
(=typeof Gamma Cond 'bool)
(=typeof Gamma True Type)
(=typeof Gamma False Type)))
(=in Gamma Program Type)
(=var (V Body Dom Rng)
(=and (== Program (list 'lambda (list V) Body))
(== Type (list Dom '-> Rng))
(=typeof (list (list V ': Dom) Gamma) Body Rng)))
(=var (Fun Arg Dom Rng)
(=and (== Program (list Fun Arg))
(== Type Rng)
(=typeof Gamma Fun (list Dom '-> Rng))
(=typeof Gamma Arg Dom)))))
(=find-some 5 (Program Type)
(=typeof empty Program Type))