On 10 April 2011 15:21, Viktor Cerovski <[email protected]> wrote:
> The dictionary entry for Insert is clear about one
> item arrays as well.  The relevant bit is:
>
>> [...] definition of insertion over an argument having zero items
>> extends partitioning identities of the form
>> u/y ↔ (u/k{.y) u (u/k}.y)
>> to the cases k e. 0,#y .
>>
> So for the one item y one should use this identity
> for k e. 0 1 to figure out what is the value of u/y.
> Since either 0{. or 1}. has zero items in this case,
> the identity function of u will be recalled and that way
> also defined the value of u/y.

To start off, the Dictionary entry only says that identities like
the cited one are extended to certain cases.  It does not say
whether that particular identity holds.  And of course, for most
values of u and y, the identity does *not* hold.  It is not a
general identity.

For the particular case of one-item y, witness:

   u=. -
   y=. 5
   u/y
5
   k=. 0
   (u/k{.y) u (u/k}.y)
_5
   k=. 1
   (u/k{.y) u (u/k}.y)
5

Even more:

   y=. 'z'
   u/y
z
   (u/k{.y) u (u/k}.y)
|domain error: u
|   (u/k{.y)    u(u/k}.y)

So, neither the `identity' holds, nor its r.h.s. is guaranteed
to be at least meaningful.

The very fact that we have to discuss the text of the Dictionary
in order to come to a conclusion over the semantics of /, and
that we can easily get wrong in interpreting it, is telling of its
clarity.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to