Functions are defined as using sets of ordered pairs. (fun S) is true if and only if the set S is a function. As a function, the set S contains ordered pairs mapping one number to another number. A set of ordered pairs forms a function when every input maps to a single output. Meaning that no two pairs in S share the same input and have different outputs.
The formal definition is here.