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).

To prove the statement "f = g if and only if dom f = dom g and for every x in dom f, f(x) = g(x)," we need to show that both the forward and backward implications hold.

Forward implication: f = g implies dom f = dom g and for every x in dom f, f(x) = g(x).
To prove this, we assume that f = g and aim to show that dom f = dom g and for every x in dom f, f(x) = g(x).

1. Suppose f = g. We start by showing that dom f = dom g.
- By definition, dom f denotes the domain of function f, which consists of all inputs x for which f(x) is defined.
- Similarly, dom g denotes the domain of function g, consisting of all inputs x for which g(x) is defined.
- Since f = g, it means that f(x) and g(x) are defined for the same inputs, as they are essentially the same function.
- Therefore, dom f and dom g must be identical, i.e., dom f = dom g.

2. Next, we aim to show that for every x in dom f, f(x) = g(x).
- Let x be an arbitrary element in dom f.
- From the previous step, we know that x is also in dom g, as dom f = dom g.
- Since f = g, it implies that f(x) = g(x) for every x in the shared domain.
- Therefore, for every x in dom f, f(x) = g(x).

By proving both (1) dom f = dom g and (2) f(x) = g(x) for every x in dom f, we have shown that f = g implies dom f = dom g and for every x in dom f, f(x) = g(x).

Backward implication: dom f = dom g and for every x in dom f, f(x) = g(x) implies f = g.
To prove this, we assume that dom f = dom g and for every x in dom f, f(x) = g(x), and aim to show that f = g.

1. Suppose dom f = dom g and for every x in dom f, f(x) = g(x).
- We need to show that f and g are the same function, which means they have the same definition for every input x.
- Let x be an arbitrary element in the shared domain dom f = dom g.
- Since dom f = dom g, it implies that f(x) and g(x) are both defined for x.
- By the given condition, we have f(x) = g(x) for every x in dom f.
- Therefore, f and g are identical for each element in their shared domain.

By proving that dom f = dom g and f(x) = g(x) for every x in dom f implies f = g, we have shown the backward implication.

Thus, we have proven that f = g if and only if dom f = dom g and for every x in dom f, f(x) = g(x).