Let f and g be functions between A and B. Prove that f = g if and only if dom f = dom g and for every x in dom f, f(x) = g(x).