On Wednesday, May 30, 2012 4:34:02 PM UTC+2, Barry Margolin wrote:
> In article <
c18b20cd-f9a4-41b2...@googlegroups.com>,
> colin howarth <
co...@howarth.de> wrote:
>
> > On Tuesday, May 29, 2012 3:30:07 PM UTC+2, Barry Margolin wrote:
> >
> > > The following should be true for any l1 and l2:
> > >
> > > (eqv? (lat? (append l1 l2))
> > > (and (lat? l1) (lat? l2)))
> > >
> > > What if l1 or l2 is the empty list, how can you ensure the tautology?
> >
> > OK, thanks. I can see that that's nice. But is the "should be true"
> > axiomatic?
>
> This is how the "identity" value of an associative function is typically
> defined. For example, 0 is the identity of + so that (+ (+) x y) == (+
> (+ x) y), and 1 is the identity of * so that (* (*) x y) == (* (* x) y).
Thanks, I was hoping it was something like that. TBH, I knew that stuff 25 yrs ago...
(sigh)
> > [...] Then you might [foolishly] expect
> >
> > (lol? M) == (not (lat? M)) (2)
> >
>
> Equation (2) is wrong, because both lat? and lol? should return #f for
> the list '(1 (2)), i.e. any list containing both atoms and lists.
ouch. Ok, I am shamed into accepting that '() can be considered an empty list of anything. Ie. an empty list of atoms as well as an empty list of lists, or whatever. But I'm pleased because now I'm happy with lat? and can carry on with TLS, along with its First Commandment :-)