TITLE: If two measures agree on generating sets, do they agree on all measurable sets?
QUESTION [15 upvotes]: Here's the problem that insprired my question: 
Suppose $X$ is the set of real numbers, $\mathcal B$ is the Borel $\sigma$-algebra, and $m$ and $n$ are two measures on $(X, \mathcal B)$ such that $m((a,b)) = n((a,b)) < \infty$ whenever $-\infty < a< b < \infty$. Prove that $m(A) = n(A)$ whenever $A \in \mathcal B$.
When I look at this, I want to say that this problem is essentially trivial, but I can't convince myself that it actually is.  I want to say that since these measures agree on sets that generate $\mathcal B$, and every $\mathcal B$-measurable set can be formed by taking countable intersections and unions of these types of sets, then the result follows from the fact that these are both measures.
So my questions are: 

Can we actually say that every Borel measurable set can be written as a countable union or intersection of these finite open intervals? 
Does the result immediately follow from properties of measures?

REPLY [2 votes]: The Borel sigma algebra on $\mathbb R$ has various equivalent generating sets: obviously the open intervals $(a, c)$ and also the half open intervals $[b, c)$ . The half open intervals are a semi-ring, and by Carathéodory a sigma finite measure (which you have here since each (finite) open interval has finite measure) defined on a semi-ring extends uniquely to a measure on the sigma-algebra generated from it.
So, if $m = n$ for each half open interval you are done.
For any half open interval $[b, c)$ there is $a \in \mathbb R $ with $a < b$.
Then $[b, c) = (a, c)\setminus (a, b)$ and $(a, b)\subset (a, c)$
So for any measure $\mu$ where $\mu( (a, b)  ) $ is finite $\mu( [b, c)) = \mu((a, c)) - \mu((a, b))$
And since $m = n$ for each open interval they therefore agree on the half open intervals. $\blacksquare$