Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (09 Nov 2015 16:35 UTC)
Re: Comments on SRFI 128 Draft 5 (2015-11-08). John Cowan (09 Nov 2015 17:37 UTC)
Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (09 Nov 2015 22:09 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 15:05 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 15:14 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 16:03 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 16:57 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx (10 Nov 2015 20:40 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 21:16 UTC)
Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). Sudarshan S Chawathe (10 Nov 2015 21:17 UTC)

Re: Partial orders. Re: Comments on SRFI 128 Draft 5 (2015-11-08). taylanbayirli@xxxxxx 10 Nov 2015 15:14 UTC

"Sudarshan S Chawathe" <xxxxxx@eip10.org> writes:

> John Cowan wrote:
>
>> Sudarshan S Chawathe scripsit:
>>
>> >   (make-comparator exact-integer?
>> >   		   =
>> > 		   (lambda (i j)
>> >                      (and (even? i)
>> >                           (even? j)
>> >                           (< i j)))
>> > 		   number-hash)
>>
>> This clearly violates the programmer's responsibilities section, as
>> I said before.  The ordering predicate is required to be asymmetric.
>> An asymmetric predicate is one in which, for all values of a and b,
>> if (pred a b) is true than (pred b a) is false.  This is obviously not
>> true here, so what you have is a comparator whose behavior when passed
>> to standard routines is undefined.
>
> I agree that the SRFI requires the ordering predicate to be
> asymmetric.  I also agree with your definition of asymmetric
> predicates.
>
> However, I do not understand why you claim that the ordering predicate
> in the above example (let's call it 'e<') is not asymmetric.  Using
> your definition, could you please exhibit values of 'a' and 'b' for
> which (e< a b) is true and (e< a b) is not false?  (If your claim is
> true then at least one such pair a,b must exist.)
>
> I have similar comments about the other example in my earlier message,
> but perhaps it's best to focus on this one here.

For a 3 and b 5, (e< a b) is #f and (e< b a) is also #f.

You seem to have misread John's definition of asymmetry:

>> An asymmetric predicate is one in which, for all values of a and b,
>> if (pred a b) is true than (pred b a) is false.

Taylan