It is worth noting that we cannot simplify
(or (integer 0 0) (integer 2 2) (integer 4 4))
into eg.
(integer 0 4)
in general, because
(not (or (integer 0 0) (integer 2 2) (integer 4 4)))
=> (or (intger * -1) (integer 1 1) (integer 3 3) (integer 5 *))
whereas
(not (integer 0 4))
=> (or (integer * -1) (integer 5 *))
...so the place to make these simplification decisions is in the compiler, which hopefully has enough contextual knowledge to figure out when it is safe -- and not the type system.
It is worth noting that we cannot simplify
(or (integer 0 0) (integer 2 2) (integer 4 4))
into eg.
(integer 0 4)
in general, because
(not (or (integer 0 0) (integer 2 2) (integer 4 4)))
=> (or (intger * -1) (integer 1 1) (integer 3 3) (integer 5 *))
whereas
(not (integer 0 4))
=> (or (integer * -1) (integer 5 *))
...so the place to make these simplification decisions is in the compiler, which hopefully has enough contextual knowledge to figure out when it is safe -- and not the type system.