RealsBooleans
RealsBooleans is a term used in theoretical computer science and language design to describe a composite data type that unifies real numbers and boolean values into a single value domain. Formally, it can be modeled as a tagged union of the real numbers R and the boolean set {true, false}, sometimes written as R ⊎ {true, false}. A value of this type is either a real number or a boolean, and the two kinds of values carry distinct tags to allow runtime or compile-time distinction.
Semantics and operations are typically defined to respect the separation between the two branches. Arithmetic and
Programming language implementations may use realsBooleans as a variant or sum type, enabling pattern matching to
Relation to other concepts includes sum types and variant types, option types, and dynamic typing systems that