types number       = nat
      gate         = bool => bool => bool
      ('a,'b)alist = "('a * 'b)list"
