Instance bind_dec m x v : Dec (bind m x v) :=
{| dec := _ |}.
Fixpoint lookup (Gamma : context) (i : id) : option ty :=
match Gamma with
| nil => None
| cons (i',T) Gamma' =>
if beq_id i i' then Some T
else lookup Gamma' i
end.

(* Specifications: *)
Theorem beq_id_true_iff : forall x y : id,
beq_id x y = true <-> x = y.