When I see "$f\colon A \rightarrow B$" does this mean (a), or does this mean (b), where:
(a) There is a function f with domain (all of) A and range (all of) B.
(b) There is a function f with domain that is a subset of A and range that is a subset of B.
$f:A$$ \to$$B$ means there is a function with name $f$ with domain $A$.
Now everytime it's domain is whole $A$ when it is defined that f goes from $A$ to $B$ .
it's Codomain is $B$ .Codomain and range is different .The set $f(A)$ is the range of $f$.but it is not always equal to $B$ .when they are equal then the function is called surjective.