Zsban Ambrus <[EMAIL PROTECTED]> wrote:
> On Sat, 1 Jul 2006, Mark D. Niemiec wrote:
> > I know there are some functions that have both identities, and in which the
> > two are different, but I can't think of any at the moment.
>
> In fact, there aren't any in the mathematical sense because if x is a
> left identity of u and y is a right identity then x u y is equal to both x
> and y so they must be equal.  This sort of makes my statement irrelevant.

Duh! I should have thought of this!

> However, J verbs shouldn't of course be treated functions in the
> mathematical sense, so such an anomaly can happen.  It probably won't
> happen in practice though that you want to use both inverses of such a
> function and expect J to find them.  Let me show an example.
>
>    u =: (^ + ])"0

This J expression IS a mathematical function in the most basic sense:
  f(x,y) = x^y + y

> This verb has 0 as its left identity (at least if the right argument is
> positive) and 1 as its right identity.

It is true that 0 is the left identity (0^y + y = 0 + y = y for all y>:0)
(In fact, in J, it seems to work for all complex numbers except for
non-positive reals:
   0 ^ 1 r. 1p1
_
   0 ^ 1 r. 1p1 - 1e_15
0

However, 1 is not the right identity. (x^1 + 1) is 1 larger than x
for all x. It is only an identity if x e. _ __ _.

-- Mark D. Niemiec <[EMAIL PROTECTED]>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to