Talk:Partition representations

From APL Wiki
Jump to navigation Jump to search

"We consider two partitions of a vector to be identical if they match, ignoring prototypes."

If two arrays match, their prototypes also match.

If the final phrase has any non-trivial meaning that must be one of:

  • "ignoring zero-length divisions"
  • "ignoring divisions of any length that match their own prototypes."

In neither case do they coincide with the prototype of the partition itself unless the first division is itself one or other of them. The second could be formed from a blank length of the original vector so could not be ignored.

I suggest using "zero-length divisions". --Phil Last (talk) 16:02, 27 January 2020 (UTC)

Couldn't a division be empty without being zero-length? Adám Brudzewsky (talk)

Certainly it could if by "empty" you mean my second case above "match their own prototype". Inserted divisions would necessarily be of zero length. A non-zero-length division matching its prototype must therefore contain some of the original data. And if my assertion of necessity is questionable then no divisions can be ignored as no distinction can be made between data and insertions.

But to return to the main point. The original sentence is either a tautology or ambiguous. The word "prototype" does not belong there. Phil Last (talk) 23:32, 27 January 2020 (UTC)

I see. Go ahead and change it. Adám Brudzewsky (talk)

I meant that match should be taken to ignore prototypes recursively (this is the case in some array languages, such as J). Maybe this is unclear, but "ignoring zero-length divisions" is also unclear: if two partitions differ only in that one has an extra zero-length division at the end, should they be the same?

Since we're partitioning vectors, only zero-length divisions can be empty. I've clarified also that a partition can't be empty.

Part of the problem is that you seem to be using prototype to mean Type. The prototype of an array A has the same structure as A, so only simple scalars can match their own prototypes. It doesn't make sense to call an array a prototype in isolation: an array has a prototype but no array is a prototype.

Not at all. I've understood prototypes since 1982 or 83. "If two arrays match their prototypes also match" is unquestionable. What I found questionable was the the phrase "ignoring prototypes". Does it refer to sivisions that happen to be identical to the prototype of the partition, which may or may not be of zero-length depending on whether the first element of ⍺ is greater than one or not, or does it actually mean a zero-length -division? i.e. one "inserted" Phil Last (talk) 14:25, 30 January 2020 (UTC)

There's no such thing as an "inserted division". --Marshall (talk) 15:34, 28 January 2020 (UTC)

If the representation you were advocating contains a two in ⍺ rather than a one I should describe the division immediately prior to that which contains the datum in ⍵ corresponding to that two as having been "inserted".Phil Last (talk) 14:25, 30 January 2020 (UTC)

"should they be the same?" Your question, which you don't answer. I should say NO!

I apologise to you both Adam and Marshall for wasting your time and mine. I should be more careful to examine the worth of a sentence in its wider context before worrying about its minutiae. The sentence I mentioned is only the first of a paragraph whose only meaningful content is "The partition representations discussed below are ways of encoding structure;". The rest can safely be ignored. Phil Last (talk) 14:41, 30 January 2020 (UTC)