Suppose f and g are partial functions from integers to integers. I want to define other functions in terms of f and g, for example:
p(x,y) = f(x) + g(y)
Now if f(x) and f(y) are defined then p(x,y) is too. But what if f(x) is defined but g(y) is not? What I want is that p(x,y) is then also undefined. But can I take it as given that "f(x) + undefined" equals undefined? Or should I define different cases to handle this?
A similar problem arises with a function such as
q(x,y,z) = min(f(z) + x, g(z) + y).
Can I take it as given that min(n, undefined) is undefined?
Of course there is also
r(x) = f(g(x))
where I guess it's super obvious that r(x) is undefined if g(x) is undefined. But even on this I can't find any definite advice in the text books.
So my question is mostly about how to present my definitions. Do I have to consider each case of undefined terms separately? I hope not because that would seriously clutter up the text that I'm writing.