Records are Sheaves of Types. Let us define a record type as being given by a type \(X\) of keys and an interpretation function \(F\) which maps every key \(x:X\) to a type. We assume the existence of a powerset functor \(\mathcal{P}: \mathbf{Type}\to\mathbf{Type}\) , which endows the discrete topology on \(X\) . Then a record type is the product of the image of \(F\) over a subset of \(X\) : \[ \