AreOrderComparable🔗
Check that
left and right can be compared by order.
The operands need to be comparable for (in)equality (see
are_equality_comparable), but booleans can not be ordered.
See: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.2/query-language.html#_json_schema
Code
return (
are_equality_comparable(left, right)
and not isinstance(left, (Boolean_literal, Boolean_cast))
and not isinstance(right, (Boolean_literal, Boolean_cast))
)