Value sets - Representing multiple values in a single expression, without breaking math. If I have an equation,
$$ x^2 = 4 $$
Then this can be solved to give,
$$ x = 2 \vee x = -2 $$
Is their a way of representing multiple values for an expression, without breaking the rules of math.
I am thinking of something more general than just $ \pm 2 $.
For example, $ \pm 2 + \pm 2 $ could be 4, 0, or -4.
But if the $ \pm 2 $ where actually the same value from the same expression.
$$ x = \pm 2 $$
Then the 0 would be impossible. 
$$ x + x = 2*x = \pm 4 $$
So in general it is necessary to track where values came from.
So something that in general, manages and tracks where the values come from so as to avoid contradictions.
 A: I want to to represent both values in a single expression, without breaking the rules of math. I use this notation,
$$ [2::x=2, -2::x=-2] $$
this is defined to mean 2, if x = 2, or -2 , if x = -2.
Lets me abstract the details by naming the conditions $x=2$ and $x=-2$ as $x_1$ and $x_2$.
$$ [2::x_1, -2::x_2] $$
I call this a value set. Then we can manipulate these expressions, safely using some rules. For example I might want to add the value to itself.
$$ [2::x_1, -2::x_2] + [2::x_1, -2::x_2] $$
The rules for applying an operator or function to value sets are simple, but for brevity I will just give the result.
$$ [2+2::x_1 \wedge x_1, 2+-2::x_1 \wedge x_2, -2+2::x_2 \wedge x_1, -2+-2::x_2 \wedge x_2]$$
I could refer back to the definitions of $x_1$ and $x_2$. But I want to abstract away all the details of what the symbols mean. Instead I use the rules,
$$ x_n \wedge x_n = x_n $$
$$ n \ne m \implies x_n \wedge x_m = \text{false} $$
and this gives me,
$$ [2::x_1, -2::x_2] + [2::x_1, -2::x_2] = [4::x_1, 0::\text{false}, 0::\text{false}, -4::x_2]$$
and the false terms can be removed to give,
$$ [2::x_1, -2::x_2] + [2::x_1, -2::x_2] = [4::x_1, -4::x_2]$$
I have implemented these things, along with relational evaluation in some C++ classes as an embedded language it works fine, so far. I know it as narrowing, and it is similar to some techniques used in Constraint Logic Programming. 
But I am really interested in if this kind of method has been considered in math. My question is, is there a name for this. Is it a common technique? Do you see any problems or issues I should be aware of, from the mathematical point of view?
