Re: empty intervals

*Bradley Lucier*29 Jul 2015 22:01 UTC> On Jul 29, 2015, at 4:56 PM, Per Bothner <xxxxxx@bothner.com> wrote: > > On 07/29/2015 01:21 PM, Bradley Lucier wrote: > >> (In set theory, yes. In some other theories, I don’t know.) > > APL-derived languages talk about "array theory" - which is different > from set theory. Of course different APL-derived languages have > different variations of array theory - and their support for > general lower bounds varies. Thanks for the pointer. My logic background is not strong enough to read quickly the papers I found. > >> I understand that the base case of no multiplicands gives one as an >> answer, because it’s useful. (That’s the same reason that $0^0=1$, >> that it’s a useful convention.) >> >> Perhaps if I understood the use of such things. We already have >> scalars, why do we need zero-dimensional arrays? > > In APL languages, a scalar is the same as 0-rank array. In Scheme, > I'd say a zero-dimensional array is the same as a box, in the SRFI-111 sense. Yes, I mis-spoke, I meant that we have boxes (or at least most schemes do). > >> Or arrays that >> can’t return any values, because their underlying domains are empty? > > Why do we need vectors or lists or strings that can't return any values, > because their underlying domains are empty? Strings, vectors, and lists all have a fixed “dimension” (of 1) and a fixed lower bound (of 0), so the only other thing that needs specifying is the upper bound. So it is perfectly reasonable to have only one empty vector, one empty string, one empty list, all of which have an “upper bound” of zero. In our case there could be many “empty” arrays, and they could be empty for any number of reasons. I’m not trying to disagree with you, just to talk around the subject. Brad