Help with functions (compositional semantics)

36 Views Asked by At

So, I need to know whether the following is a function or not. "The mapping from any natural number $n$ to a set that only contains multiples of $n$."

Intuitively, this is a total function because the input will always produce a unique set. However, I'm confused because outputs are only meant to have one unique output, so would this not be a function because lots of different numbers are produced (all the numbers that are the multiples of $n$)

Could someone clarify whether it matters if multiple numbers are produced as the output?

1

There are 1 best solutions below

0
On BEST ANSWER

Look at the wording again: The mapping from any natural number $n$ to a set that only contains multiples of $n$.

It does not specify which multiples of $n$ are in the output set.

Consider $n = 2$. The set of even natural numbers certainly satisfies the criterion that the output only contains multiples of $2$. However, the set of even integers and the set of natural numbers that are multiples of $4$ also satisfy the criterion. Therefore, the output of the mapping is not uniquely specified. Consequently, the mapping does not define a function.