develooper Front page | perl.perl6.language | Postings from March 2009

Re: Junction Algebra

Thread Previous | Thread Next
From:
Damian Conway
Date:
March 29, 2009 13:58
Subject:
Re: Junction Algebra
Message ID:
832f158a0903291357j10d75b44g2ba09a9bcc45127e@mail.gmail.com
Richard Hainsworth conjectured:

> 1) Is the following true for an any junction?
> any( ... , any('foo','bar')) === any(...,'foo','bar')
>
> If yes, then
> if an 'any' junction is contained in an outer 'any', the inner 'any' can be
> factored out?

Yes. More precisely, an 'any' that is directly nested inside another
'any' can be flattened.
By "directly", I mean with no intervening levels of non-'any'
junctions. That is, not like:  any(...,all(...,any('foo', 'bar')))


> 2) Also, is the following true for nested 'all' junctions? viz.
> all(... , all('foo', 'bar')) === all(...,'foo','bar')

Yes, with a similiar "directly" caveat, as above.


> 3) Conjecture: The following is true of all junction types, eg.,
> junc(..., junc(...)) === junc(..., ...)

No. As Patrick so ably pointed out, this is not true for 'one' nor for 'none'


Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About