As has been written here several times, when the Dictionary says u&.v y ↔ vi u v y
it is wrong. [Others hold that it is right but that the statement needs to be viewed in light of the ranks shown in the Dictionary.] Either way, you just can't make that substitution and get right results. You can either use the forms that I have given, or you can understand rank as Kip, Dan, Raul, & others have proposed. If you are appealing to the false equivalence shown above (or the similar ones for @ and &), when you get wrong results it's because those equivalences do not take rank into account. Henry Rich On 1/22/2013 2:07 AM, Linda Alvord wrote: > Here’s another puzzle for me: > > NB. u&.v y ↔ vi u v y > i:&.> +. 1j2 > ┌──────┬───────────┐ > │_1 0 1│_2 _1 0 1 2│ > └──────┴───────────┘ > > ]A=:+.1j2 > 1 2 > <i:> A > ┌───────────┐ > │_1 0 1 0 0│ > │_2 _1 0 1 2│ > └───────────┘ > > I must be using the definition incorrectly. > > Linda > > -----Original Message----- > From: [email protected] [mailto:programming- > [email protected]] On Behalf Of David Ward Lambert > Sent: Monday, January 21, 2013 10:45 AM > To: programming > Subject: Re: [Jprogramming] [Jprogrammingou Hermitian from triangular > > Interrupting may be a bad idea. > > NB. -------- Use 13 : correctly. > NB. f=: 13 :',j./&i:/+.y' NB. no. > NB. f=: 13 : '([: , j./&i:/@+.) y' NB. yes. > > ic2 =: [: , j./&i:/@+. > > NB. Using a proverb is as if its definition > NB. were inserted with parenthesis. > NB. Copy ic2 definition verbatim, > NB. Surround with parentheses. > NB. Put in the arguments, then fix quotes. > > 13 : '([: , j./&i:/@+.) y' > [: , j./&i:/@+. > > NB. The definition was tacit, > NB. 13 : returns this tacit verb unchanged > > > > NB. -------- Equivalence of ic and ic2 > NB."However, I do not understand how ic and ic2 agree when they don't!" > > ic =: [: , ([: i: 9&o.) j./ [: i: 11&o. > > ic2 =: [: , j./&i:/@+. > > NB. ic and ic2 are identical at rank 0 > (ic -: ic2)&>1j2 0j2 > 1 1 > > ([: < ic)"0 ] 1j2 0j2 > +----------------------------------------------------------------+---------- > ---------+ > |_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2|0j_2 > 0j_1 0 0j1 0j2| > +----------------------------------------------------------------+---------- > ---------+ > ([: < ic2)"0 ] 1j2 0j2 > +----------------------------------------------------------------+---------- > ---------+ > |_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2|0j_2 > 0j_1 0 0j1 0j2| > +----------------------------------------------------------------+---------- > ---------+ > > > >> Date: Mon, 21 Jan 2013 03:58:24 -0500 >> From: "Linda Alvord" <[email protected]> >> To: <[email protected]> >> Subject: Re: [Jprogramming] [Jprogrammingou Hermitian from triangular >> Message-ID: <001d01cdf7b5$78a4cd20$69ee6760$@net> >> Content-Type: text/plain; charset="koi8-r" >> >> Since this has a mistake it is hard to reconstruct what I did wrong. > This >> represents what I was doing: >> >> >> >> ic2=: [: , j./&i:/@+. >> >> ic2 >> >> [: , j./&i:/@+. >> >> ([: , j./&i:/@+.)2 >> >> _2 _1 0 1 2 >> >> f=: 13 :',j./&i:/+.y' >> ................ >> >> ic 1j2 0j2 >> >> _1j_2 _1j_1 _1 _1j1 _1j2 _1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 > 0j_2 >> 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2 1j_2 1j_1 1 1j1 1j2 0j_2 0j_1 0 0j1 > 0j2 >> 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 > 0j1 >> 0j2 0j_2 0j_1 0 0j1 0j2 >> >> >> >> ic2 1j2 0j2 >> >> _1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2 0j_2 > 0j_1 0 >> 0j1 0j2 0 0 0 0 0 0 0 0 0 0 >> >> >> >> (ic-:ic2)&>1j2 0j2 >> >> 1 1 >> >> >> >> However, I do not understand how ic and ic2 agree when they don't! > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
