Still puzzled about Flat
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: Still puzzled about Flat
- From: Michael Albert <ma1q+ at andrew.cmu.edu>
- Date: Fri, 19 Oct 90 09:25:56 -0400 (EDT)
I had tried using OneIdentity, but this still seems to cause problems, as the following session indicates. In[1] := Clear[Int] Attributes[Int] = {Flat, OneIdentity, Orderless, Listable} ?Int Out[1] = Int Attributes[Int] = {Flat, Listable, OneIdentity, Orderless} In[2]:= Clear[x,y] Int[x,y] Out[2] = Int[x, y] In[3]:= Int[x_] := x In[4]:= Int[a] Out{4}= a In[4]:= Int[a,b] General::recursion: Recursion depth of 256 exceeded. Hold[Int[a,b]] Out[4]= Hold[Int[a,b]] Obviously it is trrying to do something very clever, and simplify a function with two arguments, when the only rule it knows applies only in the case of a single argument ... unfortunately, it doesn't seem to get anywhere!