4 ms·
Ah, so partial functions aren't onto (i.e. surjective).
by a_wild_dandan 6y ago
Ah, so partial functions aren't onto (i.e. surjective).
- deleted 6y ago[deleted]
- curtisf 6y agoNo, they are not functions in the mathematical sense. It's not that they don't cover the output space, they don't cover the input space.
- wetmore 6y agoNot exactly, partial functions can be surjective, eg f :: Int -> Bool f 0 = True f 1 = False f n = f (n + 1) is surjective onto Bool but also partial (doesn't return for n > 1). In Haskell we say that when a function doesn't return, the output is bottom, written as ⊥. You could say that a function f : A -> B is partial if f^{-1}(B \ ⊥) is surjective.
- deleted 6y ago[deleted]