I was quite disconcerted at this, since in mathematics - correct me if
I'm wrong - it is usual to regard integers as a subset of rational
numbers.
Though thinking it over, it arguably makes sense if you consider that
the TPTP, like other higher-order logic systems today, is statically
typed. In statically typed languages that provide rational numbers,
e.g. F# in the standard library or C++ with GMP, the rational number
2/1 is not the same thing as the integer 2. That's quite different
from e.g. Lisp where the rational number 2/1 is indeed the same thing
as the integer 2.
So if we hope for a system that is fundamentally dynamically typed,
arguably we should then aim to end up having the integers indeed be a
subtype of the rational numbers. I think this is reasonably
uncontroversial so far, someone please correct me if I'm wrong?
Now consider Boolean. A logic system that is not statically typed,
does still have to have a notion of the Boolean type, apart from
anything else to license inferences like ~~x = x.
And of course, in the statically typed lambda calculus, Boolean is
disjoint from all other types. Which makes sense, this being the most
obvious way to do it with static typing.
But if we are aiming for a system that is fundamentally dynamically
typed, is there any reason why we can't make Boolean a subtype of
integer?
Apart from anything else, it would also allow us to say that Boolean
is a subtype of probability, which is a subtype of the real numbers.
That feels intuitively right. Of course we still can't feed
probabilities into the crisp Boolean operators, but we can do the
reverse, e.g. have a probabilistic not operator pnot(x) = 1-x defined
on [0..1], which can also accept crisp Boolean values.
Are there any caveats I'm missing?
--
You received this message because you are subscribed to the Google Groups "One Logic" group.
To post to this group, send email to one-...@googlegroups.com.
To unsubscribe from this group, send email to one-logic+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/one-logic?hl=en.
But efficiency considerations alone dictate that in practice we
implement numbers in the usual binary format. (Specifically, I'm using
GMP.) Am I missing something?