Consider
ic3 =: [: , [: j./&>/ [: i:&.> +.
ic3 1j2
_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2
Verb ic3 can be read aloud as "the , of the j./&./ of the i:&.> of +." .
(That is, [: g h is read "the g of h".) We have just read ic3 left to right.
We can explore the parts right to left. The idioms &.> "each" and &> "every"
are familiar.
+. 1j2
1 2
i:&.> +. 1j2
+------+-----------+
|_1 0 1|_2 _1 0 1 2|
+------+-----------+
j./&>/ i:&.> +. 1j2
_1j_2 _1j_1 _1 _1j1 _1j2
0j_2 0j_1 0 0j1 0j2
1j_2 1j_1 1 1j1 1j2
, j./&>/ i:&.> +. 1j2
_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2
Kip Murray
Sent from my iPad
On Jan 21, 2013, at 1:07 PM, "Dan Bron" <[email protected]> wrote:
> Linda wrote:
>> ic
>> [: , ([: i: 9&o.) j./ [: i: 11&o.
>> ic2
>> [: , j./&i:/@+.
>> f
>> [: , [: j./&i:/ +.
>> g
>> [: j./ [: i: +.
>
> It appears to me that as you move from ic2 to f to g, you are simply
> deleting words (the kind that you don't like).
>
> If you go back to the email where ic2 was developed from ic, you'll see that
> each of the words in ic2 was introduced deliberately, and none of the words
> is superfluous. In fact, it was the very words you arbitrarily deleted
> which the email specifically introduced in order to simplify ic to ic2,
> without losing functionality. So, if you want to remove those words, you
> must do it carefully. In fact, if you take care to do this properly, and
> gradually expand the definition of ic2 until it has your preferred,
> conjunction-free form, the result will be ic! In effect, you'll end up
> working through the ic->ic2 transformation backwards.
>
> You can't have it both ways: the ic2 form is simpler and cleaner, but
> requires you to use conjunctions. The ic form is composed solely of verb
> trains, but is not as concise, and can't be read left-to-right or executed
> right-to-left. That was the point of my original post: that conjunctions
> have their benefits, and perhaps it's worth reconsidering your aversion to
> them.
>
> Anyway, arbitrarily deleting words you don't like is akin to translating a
> sentence from Chinese to English by transliterating the words you know, and
> simply ignoring the ones that you don't (or don't have a simple, direct
> translation). That won't work.
>
> And, while it is good that you tested your changes along the way, given the
> verbs' infinite domain, no amount of tests will ever prove their
> correctness. As you discovered, it only takes one counterexample to destroy
> the equivalence. You need to bring some theory to the table.
>
> Let me give you an example. If you look at ic, Kip's original:
>
> 13 : ',(i: 9 o. y) j./ i: 11 o. y'
> [: , ([: i: 9 o. ]) j./ [: i: 11 o. ]
>
> It's quite clear - even just visually - that his j./ has two arguments: one
> on the left, and one on the right. Whereas, if you look at your g:
>
> 13 :'j./ i:+.y'
> [: j./ [: i: +.
>
> it's evident that your j./ only has one argument, on the right. So g can't
> be doing the same thing as ic (or, by implication, ic2).
>
> This is the kind of analysis you need to do if you want to simplify J verbs
> or phrases. You can't just randomly delete words you don't like. But
> moreover, it may be worth your while to reconsider eschewing these words in
> the first place. I noticed you picked up on ic2, rather than ic, to use as a
> basis for your own approach, even though the former is conjunction-rich and
> the latter conjunction-free. And furthermore, while you deleted the / that
> followed i:, you retained the / following j. - apparently because you
> thought it expressed some concept clearly.
>
> -Dan
>
> PS:
>
> Linda also wrote:
>> However, I do not understand how ic and ic2 agree when they don't!
>
> In fact, they do. If you want to understand how, then [1] walks through
> that in some detail.
>
> This is despite the observation Raul made earlier:
>
>> I will agree that they do not agree [at rank 1 and higher]
>
> Which was specifically called out in the original email:
>
>> NB. But...
>> (ic2 -: ic) 1 2 1j2 0j2
>> 0
>>
>> NB. When we move beyond the original scope of a single,
>> NB. scalar input the answers differ. What gives?
>> NB. Left as an exercise for the reader.
>
> And in the follow-ups, e.g. from Kip:
>
>> About your closing question, consider
>> (ic2"0 -: ic"0) 1 2 1j2 0j2
>> 1
>>
>> Monadic i: has rank 0 and for reasonable behavior
>> I think ic and ic2 should be used with rank 0 on vector arguments.
>
> [1] Development of ic2 from ic:
> http://www.jsoftware.com/pipermail/programming/2013-January/031131.html
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm