In principle, and in general, the problem of determining whether two
(arbitrary given) verbs would produce the same result for an (arbitrary
given) argument is non-computable; otherwise, it would imply that the
halting problem is decidable (as far as I know and I can see).

In practice, I use a conjunction similar conceptually to the adverb
myadverb to verify that two tacit verbs have essentially the same
definition (i.e., apart from cosmetic differences (e.g., redundant
parentheses or proverbs)).  I also use occasionally an adverb to transform
tacit verbs defined in terms of caps to the equivalent verbs in terms of
ats (@:) (this is basically term rewriting).

I hope it helps.

On Tue, May 3, 2022 at 9:38 AM Raul Miller <rauldmil...@gmail.com> wrote:

> There isn't really a better way to do that test.
>
> Conceptually, what you want is a test that determines whether two
> verbs would always produce the same results for the same arguments,
> but that's a problem involving infinities. It's proof territory.
>
> That said, typically we solve this kind of problem by hand, rather
> than using a test on the structure of the verb.
>
> Good luck,
>
> --
> Raul
>
> On Tue, May 3, 2022 at 5:20 AM Ric Sherlock <tikk...@gmail.com> wrote:
> >
> > I want to test if a particular verb was provided to my adverb.
> > I came up with the solution below. Is there a better way?
> >
> > myadverb = {{
> >   res=. u {:y
> >   if. theverb f.`'' -:  u f.`'' do.
> >     res=. ({.y) ,: res
> >   end.
> >   res
> > }}
> > ----------------------------------------------------------------------
> > 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

Reply via email to