More on trits & tetrits... (long)
Folks,
I have been having some offline conversations with John
(on comparisons in V2.2) & Nate (on the clarity, or lack
of it, in my trit interpretations suggestion).
The outcome of those conversations is that this form of
interpretation of decorations may remove a problem that
John perceived in which the result of a comparison might
have depended on the decoration.
And a minor side effect would lead to an easy way to test
for empty intervals.
I thought I'd state that up front because I'm going to get
verbose now as I go into a long explanation of things.
You see, Nate has pointed out that my half baked idea was
in fact half baked when I first wrote about it so I want
to clear that up.
Let me begin with that.
First, I am not proposing that we gather up the results of
some propositions into the decorations. What I am proposing
is that we map existentially qualified propositions onto
subsets of the set {true, false}.
It might as well be the set {T, F}, it doesn't really matter.
What matters is that there are 4 subsets: {}, {T}, {F}, &
{T, F}. We can store them in 2 bits just as we were doing
before.
The way we set those bits is by evaluating the property we
are concerned with for that decoration & seeing if there are
points within the input interval which either have or don't
have that property.
An example is best.
For the decoration named 'domain' (or defined or valid, I don't
really care) we want to set 2 bits in the following way:
domainFalse = {There exists x in xx such that x is not
in the domain of f()}
domainTrue = {There exists x in xx such that x is in the
domain of f()}
Together, these two bits represent the element of the set of
subsets of {true, false} which is correct for this property
(domain) on this interval & this function.
Let me get still more concrete: Consider the function sqrt()
evaluated for the following intervals:
sqrt([-2,4]) = {[0,2],{domainFalse,domainTrue}}
The result is decorated with {T, F} for the
domain property because there are points
within the operand interval which are both
in & out of the domain of sqrt.
sqrt([0,4]) = {[0,2],{domainTrue}}
The result is decorated with domainTrue only
because there exist ONLY points within the
domain of sqrt for this operand.
sqrt([-2,-1]) = {[empty],{domainFalse}}
The result is decorated with domainFalse only
because there exist only points outside the
domain of sqrt in this case.
sqrt([empty]) = {[empty],{}}
The result is decorated with {} (the empty set)
because there exist no points of any flavor at
all in the operand.
This last is the cheap way to find empty intervals.
Nate raised some issue with this assignment of a decoration
value for the empty interval which is probably correct given
his interpretation of my half baked idea. But that was not my
intention.
Let me argue why this assignment should be the case. Indeed,
must be the case if we are to count on the fundamental theorem.
Its kind of a set theoretic fundamental theorem.
For this argument, let me use the string <<== for \contained.
If we are to count on the FTIA, we must have that
xx <<== yy implies that
decoration(xx) <<== decoration(yy)
In particular, since [empty] <<== xx <<== [entire] we must have
decoration([empty]) <<== decoration(xx) <<== decoration([entire])
for all intervals xx & for all decorations.
The only assignment of a decoration for [empty] (the empty
interval) that meets that requirement is {} (the empty set),
for all decorations.
Fortunately, this just falls out if one carefully defines the
the decorations. (Something I did not do well on my first
posting.)
Another thing falls out.
John pointed out a problem with comparisons & decorations.
His example concerned xx = {[0,oo],{bounded}} &
yy = {[0,oo],{not bounded}}. For these two intervals, we
might reasonably conclude that containedIn(xx,yy) is true &
containedIn(yy,xx) is false. The problem seems to be that
we are basing that conclusion on looking at the decoration
to settle the matter.
Well, under this new interpretation of trits (or, tetrits,
really), the problem goes away because it can't happen.
Let me explain.
For the decoration property 'bounded' we will have:
boundedFalse = {There exists x in xx such that f(x)
is infinite (rounds to infinity)}
boundedTrue = {There exists x in xx such that f(x)
is finite (rounds to finite number)}
Thus, if one evaluates, for example exp() in single precision
on the interval [0,100] the answer will be
{[1,oo],{boundedFalse,boundedTrue}}.
We do not know whether or not an actual pole was encountered.
The answer represents our range uncertainty about the result.
(It is exactly like precision uncertainty but in the exponent.)
The resolution to this uncertainty is to evaluate it in a
higher precision with a larger range of finite numbers that
can be represented.
In this case, when evaluated in double we get
exp([0,100]) = {[1,2.69e43],{boundedTrue}}
and any uncertainty in the range is cleared up.
I think the comparison problem goes away too. At least it is
not possible to have [0,oo] decorated with {boundedFalse} only.
It IS possible to have otherwise identical infinite intervals
with different decorations. The interval [maxpos,oo] could
be decorated with either {boundedFalse,boundedTrue} or just
{boundedFalse} depending on whether or not there were points
that would have rounded to maxpos anyway. But I would be
comfortable with having them be considered equal as far as
comparisons are concerned.
Well, that's the lot of it.
I supposed its a bit more than half baked now.
What do you think?
Dan