> Hello,
> 
> Do junctions have a direct representation as predicate logic statements? 

Yes.  Damian and I have already worked them out in a link I have
already posted today:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=3DF2FE76.6050602%40conway.org&rnum=2

>   In particular, do the following logic statements correspond directly 
> to the following perl6 junctions:
> 
> LOGIC                   PERL6 JUNCTION (DESCRIP)
> =====                   ========================
> (forall x)(x is true)   all      (conjunction)
> (exists x)(x is true)   any      (disjunction)
> (forall x)(x is false)  none     (injunction)
> (exists x)(x is false)  one      (abjunction)
>
> I don't have a really clear understanding of junctions (which is why I'm 
> posting this message, to try to clarify junctions in relation to a topic 
> I'm more familiar with), but it seems that the fourth type of junction, 
> "one" is inconsistent with the logic definition.
> 
> Maybe "one" should be named "one_isnt", or the logic statement should 
> become (exists a single x)(x is true).

Yeah, the latter.  The thing about one_isnt is that it is exactly the
same as all() except for its behavior when given no arguments.  I
don't see that as particularly useful...

> Either way, maybe another junction is needed!

Don't think so.

I think it's important to make it easy to add new junctive types,
however.  So perhaps Junction is an abstract class which requires the
definition of the two methods prefix:? () and states().  Then, to make
one_isnt:

    class Indisjunction is Junction {
        method prefix:? () {
            ? grep { !$_ } self.args
        }
        method states () {
            die "Not smart enough to write this one"
        }
    }

    sub one_isnt([EMAIL PROTECTED]) {
        new Nondisjunction: @args
    }

Luke

> 
> Derek Ross.

Reply via email to