Re: Constructors & decorations
Dan & P1788
I will try to get to grips with Dan's specific examples about decorations on 9 Feb.
For brevity I write V, D, C, B for the Valid, Defined, Continuous and Bounded attributes and + 0 - for the values "is", "possibly", "not". Then e.g., D0 means the same as possiblyDefined. And e.g.,
([1,2],V+,D0)
means interval [1,2] with its V attribute set to +, its D attribute set to 0, and not saying anything about its C and B attributes.
Response interspersed below.
On 9 Feb 2010, at 23:44, Dan Zuras Intervals wrote:
>> On 9 Feb 2010 22:24:56 +0000, John Pryce wrote
>> Dan
>> On 9 Feb 2010, at 21:54, Dan Zuras Intervals wrote:
>>> This may be a bit of a topic drift but what is the difference
>>> between Valid & Defined?
>> Ah. There are 3 conceptually different groups.
>>
>> isValid: The result of a valid constructor call, or of an operation =
>> whose inputs were isValid. So recursively, an interval value that makes =
>> sense, "not NaI".
>>
>> isDefined, isContinuous]: Only make sense in the context of evaluating =
>> the interval version yy=ff(xx1, ..., xxn) of a point function y=f(x1, =
>> ..., xn). If the original xx's are all isDefined [resp. isContinuous], =
>> and the resulting yy is isDefined [resp. isContinuous] then one has =
>> proved f is defined [resp. continuous] at each point of the input box =
>> (xx1 cross ... cross xxn) in R^n. (cross = cartesian product).
>>
>> isBounded: Unlike the others, not about history. Just says that xx is =
>> mathematically bounded even though a bound might have overflowed to oo.
> ...
> John,
>
> While all of this makes sense to me I'm not sure it answers
> my questions. Let me try some examples:
>
> Let f = sqrt(x^2 - 1)
>
> So, if I understand your argument correctly, the evaluation
> of yy = ff(xx) is,
>
> (1) Valid (Bounded) iff the input is Valid (Bounded),
Yes.
> (2) Defined (Continuous) for all Defined (Continuous) inputs
> except for xx such that xx \intersect (-1,1) is non-empty,
Yes again. I make it that if xx is D+ then yy is
D+ if xx \intersect (-1,1) is empty,
D- if xx \subseteq (-1,1),
D0 otherwise.
The situation for C is the same, in this example.
> Also ff could return possiblyBounded in the case where the
> input is Bounded but the intermediate expression x^2 overflows.
Ah, no! The whole point of Bounded, as I understand it, is to remember a _mathematical_ truth that floating-point may have forgotten. Suppose BIG is such that BIG^2 overflows. Then
yy=ff([1,BIG]) is evaluated as sqrt([1,BIG]^2-1) = sqrt([1,oo]-1) = sqrt([0,oo]) = [0,oo]
but the initial [1,BIG] is B+, and this is preserved all through, hence yy is B+.
This brings me to another point. When if ever should we use the B0 value? Suppose xx is an interval containing 0. Is yy=1/xx notBounded, or is it possiblyBounded? We believe that xx encloses some "true set of values" ss, and we don't know ss contains 0. So why should we assert yy is definitely B- ? It seems B0 is correct. Someone help me with semantics here.
Same with tan(xx) where xx contains \pi/2, say.
Dan continued:
> Now let f = 1/sqrt(x^2 - 1)
>
> I believe we have,
>
> (1) Valid iff the input is Valid,
> (2) Defined for all Defined inputs except for xx such that
> xx \intersect (-1,1) is non-empty,
> (3) Bounded (Continuous) for all inputs except for xx such
> that xx \intersect [-1,1] is non-empty,
I agree with you on all these, I think.
> Note that this last is [-1,1] rather than (-1,1).
Yes
> And that overflow cannot happen in this case.
Why not? With my BIG as above, let xx=[2,BIG], say. Doesn't floating point compute
ff(xx) = ... overflow ... = 1/[sqrt(3),oo] = [0,1/sqrt(3)]
(upper bounded rounded up of course)?
> Do I have that correct?
>
> Now, can you give me an example of an interval that is Defined
> but not Valid?
I believe not. I think the intention of Motion 8 is that once an interval is set notValid, _all_ its other attributes become meaningless. It has fallen into a black hole. So a V- interval is essentially the same as NaI. It follows that all query-functions on it should give results of maximum meaninglessness:
- Its other decorations should be D0 C0 B0.
- Its lower & upper bounds, midpoint, radius etc., should all return NaN.
> As for Bounded, it seems to me that any result interval with
> an infinite endpoint is notBounded only if it were evaluated
> over a pole of some kind. Otherwise, in the overflow case,
> I think possiblyBounded is the best answer.
Yes. And, because we only "do" outer enclosures, not inner ones, we can never (except for cases like 1/[0,0]) be sure that we _have_ evaluated over a pole; see above.
> I think I would like to explore these issues further in a
> discussion of propagation rules.
Thanks for raising these issues Dan. I also would like to look at them in more detail. If the semantics of decorations turn out to be too complicated to explain to the ordinary user, we need to re-think.
Regards
John