Re: Promotion of bare decorations & comparisons
Nate, Jürgen, Michel, P1788
Nate: on what you say (3 Jan, below) about Empty: P1788 agreed in Motion 3 that Empty *shall* be an interval, and we are not likely to change that now.
I partly agree with all that has been said about comparisons between bare decorations and intervals leading to apparent anomalies. Yes, they are dangerous, but IMO mainly because a more fundamental question hasn't been addressed:
On what basis should non-arithmetic operations (NAOs) on decorated intervals
be allowed to exist?
Forget for now the interval-valued NAOs -- intersection & convexHull -- because much e-ink HAS been expended on them.
I mean the boolean NAOs (mostly comparisons) and the numeric NAOs (midpoint, etc): the ones that can't possibly *propagate* a decoration. Here are 2 views we could take:
(A) A decorated interval is "really a bare interval" with
some graffiti on it, and these NAOs should just be a
shorthand for "ignore the decoration and apply the NAO
to the bare interval part".
(B) A decorated interval is very different from a bare one,
and its boolean/numeric NAOs should be custom-designed,
or possibly should not exist at all.
Motion 42, if it passes, specifies 80%-90% (at a guess) of the 1788 decoration system, in terms of the thinking one has to do. But we can't finalise the system, with lists of required & recommended operations on decorated intervals, until we have chosen view (A) or (B) or something else.
For *numeric* NAOs, I don't have a problem with view (A). I would be happy if mid, rad, inf, sup, ... just drop the decoration part. Probably ditto for the 1-argument boolean NAOs isEmpty() and isEntire().
But for the *2-argument boolean* NAOs (comparisons), view (A) isn't good enough.
The problem starts with isEqual(). Surely, isEqual(xx_dx, yy_dy) should be true iff the interval parts are equal *and* the decoration parts are equal.
Which BTW brings up the need for some comparison operations between bare decorations:
isEqual
containedIn for containment order
less and strictlyLess for propagation order
at the very least (we may prefer to give them different names).
Now, what about containedIn() for decorated intervals? For bare intervals (in the set-based flavor), it is more basic than isEqual, because equality is set equality, and two sets are defined to be equal iff each is contained in the other.
Since containedIn() for decorations is also set containment, regarding them as sets of (f,xx) pairs, a set purist might say we should define
containedIn(xx_dx, yy_dy) means
(containedIn(xx, yy) and containedIn(dx, dy)).
Would I go that far? I'm not sure, but I am *not* happy with the idea that containment of decorated intervals is just containment of their interval parts -- view(A) -- which is an unstated assumption of the exchanges between Nate and Michel about compressed intervals, over the last few days. Rather than that, I would prefer that boolean NAOs *do not exist* for decorated intervals, see view (B).
I have said enough to point out the problem. Please give some solutions to get the New Year off to a good start.
John Pryce
On 3 Jan 2013, at 23:42, Nathan T. Hayes wrote:
> Michel Hack wrote:
>> In reply to my example (assuming a threshold of "dac" for compressed
> intervals)
>> [1,2] \subseteq floor([0,6])
>> = [1,2] \subseteq ([0,6],def) // decorated result, below
> threshold
>> = [1,2] \subseteq def // compress decorated result
>> = [1,2] \subseteq Empty
>> = false
>> Nate Hayes wrote:
>>> So returning false in this example is exactly what the user expects,
>>> since [1,2] cannot be a subset of any defined and continuous interval
>>> range of floor([0,6]).
>>
>> Ok, so let's turn it around:
>> floor([0,6] \subseteq [8,9]
>> ...
>> = Empty \subseteq [8,9]
>> = true
>>
>> What is this supposed to mean?
>
> If Empty is not an interval, i. e., if Empty is not an element of the
> universal set of overline-IR, then all comparisons on Empty are unordered,
> similar to how all comparisons on NaN in IEEE 754 are unordered. In this
> case
> = Empty \subseteq [8,9]
> = false
> matches user expectations.
>
> Nate
>
> P.S. Similar to this idea is the Interval Overlapping Relation of Motion
> 21.2, for example, which is defined for two nonempty intervals and may
> detect if one or more operands is empty as an exceptional condition.