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?