Introduction to value sets
A Value set is an object, which represents the set of values a variable may have. The value set behaves mathematically as a single value, while internally representing multiple values. To achieve this the the Value Set tracks the value along with the context, or world, in which they occurred.
Multiple solutions to an equation
In mathematics, an expression must represent a single value. For example consider the equation,
![{\displaystyle x^{2}=4}](https://wikimedia.org/api/rest_v1/media/math/render/svg/217ecaac737ee742f39cfaf66414e50119ec712f)
which implies,
![{\displaystyle x=2\lor x=-2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/02a96cb4a56bcf1fd4d1a6286a10f4f868f6e4a3)
But this is a bit long winded, and it does not allow us to work with multiple values at the same time. If further conditions or constraints are added to x we would like to consider each value to see if it matches the constraint. So naively we would like to write,
![{\displaystyle x=\pm 2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/108e0bbaa344d385e95ac7172e8a891c4fbf430a)
Naively then,
![{\displaystyle x+x\in 2,0,-2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/378d2057cfd7d220ec739ba66464eae437d0b92d)
but this is wrong. Each x must represent a single value in the expression. Either x is 2 or x = -2. This can be resolved by keeping track of the two values so that we make sure that the values are used consistently, and this is what a value set does.
Representation
The value set for 'x' is written as,
![{\displaystyle V(\{2::x_{1},-2::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/aa2df7fcac59c5bf8595e95aad845b51fe136eb6)
It is container V which has a set of tag, value pairs,
![{\displaystyle 2::x_{1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/89c2a67923d47b177cc8b64d7f4ab13f16f831ab)
![{\displaystyle -2::x_{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/279e7c604d0a619a15631178b55931ff593838ef)
The value 2 is associated with the possible world
. The value -2 is associated with the possible world
. This means that the value cannot be both 2 and -2 at the same time. In the world
the value of the value set must be 2. In the world
the value of the value set must be -2.
The solution of the equation,
![{\displaystyle x^{2}=4}](https://wikimedia.org/api/rest_v1/media/math/render/svg/217ecaac737ee742f39cfaf66414e50119ec712f)
is,
![{\displaystyle x=V(\{2::x_{1},-2::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c5045f995f4aada8c6bfb44ae952b087073e2858)
World Sets
A world set is a set of possible worlds that represent all possibilities. So
is a world set as either x = 2 (in world
) or x= -2 (in world
). There are no other possibilities.
Worlds from the same world set are mutually exclusive, so it is not possible that the propositions for both worlds
and
are true at the same time.
![{\displaystyle (x=2\land x=-2)={\text{false}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c0859a734e00dbb6197130784b4fcc0716b8a563)
Application of functions
The rule for the application of functions to value sets is,
![{\displaystyle V(M)\ V(N)=V(\{(m_{v}\ n_{v},m_{l}\cap n_{l}):m_{v}::m_{l}\in M\land n_{v}::n_{l}\in N\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4e70fc92e5e118f1f432bdc23611f5d095a3c64c)
For example,
![{\displaystyle x+x=V(\{2::x_{1},-2::x_{2}\})+V(\{2::x_{1},-2::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1006d27ee1767a49a81f4d5d72e3d1311788d230)
is,
![{\displaystyle =V(\{-2+-2::x_{1}\cap x_{1},-2+2::x_{1}\cap x_{2},2+-2::x_{1}\cap x_{2},2+2::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c1121c98109cf8460a34958e34b77d647924dbbe)
![{\displaystyle =V(\{-4::x_{1}\cap x_{1},0::x_{1}\cap x_{2},0::x_{2}\land x_{1},2+2::x_{2}\cap x_{1}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2975fe30a7a68294f04843c9c8997b9ed5a8af57)
The intersection of the possible world with itself is the possible world,
![{\displaystyle x_{1}\cap x_{1}=x_{1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0fb909c90f42cd02f840268bc4d068c0a127a090)
![{\displaystyle x_{2}\cap x_{2}=x_{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c01b26c1e450317c8e184bfb3aae1853a0d2358e)
The intersection of the possible world with another possible world from the same world set is empty,
![{\displaystyle x_{1}\cap x_{2}=\{\}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/caea5f9e4e0076eee87ab77aebd2e26e3bb4abac)
![{\displaystyle x_{2}\cap x_{1}=\{\}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/80e7c0610100a42038b88de2abd87bb4ad70f6e8)
So,
![{\displaystyle =V(\{-4::x_{1},0::\{\},0::\{\},4::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a06fb0c7a17745915c57db6dcbccf0715e6e22e0)
The empty worlds rule allows tagged values from empty worlds to be dropped
![{\displaystyle V(K)=V(\{(v,l):(v,l)\in K\land l\neq \{\}\}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/916b57a83b3d18d65490ad56d13d94c096431839)
giving,
![{\displaystyle =V(\{-4::x_{1},4::x_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c00b592b29c33e3716b7e1323af65100dd6185f5)
Giving the result that
is either -4 or 4, as expected.
Application to Booleans
![{\displaystyle a\land b}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ff8a40f76f4fd75aa92b1a78e44fb7f76ab6ed70)
Is a relationship between a, b and true that implies that both a and b must be true.
![{\displaystyle a\lor b}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a07a2a1dfb9a1620c981095b788e4113d2ae2ed5)
Allows multiple values for a and b. If a is,
![{\displaystyle a=V(\{\operatorname {false} ::a_{1},\operatorname {true} ::a_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9510f3a50c250ab0e0c8688bb4861dd6302151e7)
then for b
![{\displaystyle b=V(\{\operatorname {true} ::a_{1},\operatorname {false} ::a_{2},\operatorname {true} ::a_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5ed5cf5e176c05a65669da2e52c71668c7484a63)
This means that if a is false then b must be true.
Now consider,
![{\displaystyle x=2\lor x=-2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/02a96cb4a56bcf1fd4d1a6286a10f4f868f6e4a3)
gives,
![{\displaystyle x=V(\{\_::a_{1},2::a_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/69f6a5e7ba8337a9aeba27ef66db88b93f6cd5b6)
and
![{\displaystyle x=V(\{-2::a_{1},\_::a_{2},-2::a_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dc6c19a7fcc21c7d428369323fbb1c5497f6e413)
unifying these two value sets gives,
![{\displaystyle x=V(\{-2::a_{1},2::a_{2}\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3970664f90e12f37147bcfe17495148691f0b047)
The pair
is dropped because of the "assert equal" rule,
![{\displaystyle \forall m_{v}\forall m_{l}\forall n_{v}\forall n_{l}((m_{v},m_{l})\in M\land (n_{v},n_{l})\in N)\to (m_{v}\neq n_{v}\to m_{l}\cap n_{l}=\{\})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/92ac43f5744a8b1c105d255cff46957cb1ffd391)
Its value
did not match with
.