Is %i an integer? - Adding more facts to the database



On 6/28/09, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> On Sun, Jun 28, 2009 at 5:53 PM, Leo Butler <l.butler at ed.ac.uk> wrote:
>
>> ...It seems to me that there is a convention and it is reasonable:
>> if x is declared to be in a set, but not explicitly declared to be
>> in a subset, then it is assumed not to be in the subset.
>
> I think that would be a *terrible* convention and it conflicts with standard
> mathematics: writing x ? *C** never* implies x ? *R *in mathematics.

I agree that's terrible as stated, but it makes more sense
if the test function (at present featurep(x, foo)) means only
"I can demonstrate x has feature foo".
Returning false means only that the demonstration fails,
not that the negation can be demonstrated.

For that reason we need noninteger, irrational, etc since
not featurep(x, foo) is not the same as featurep(x, complement(foo)).
Maybe if we had a more expressive notation, we could dispense
with noninteger, irrational, etc. Can we extend "is" to handle it? e.g.
is(x in (reals less rationals)).

I'm pretty strongly in favor of extending "is" and "maybe" to handle
set-membership predicates, and cutting the membership
inference stuff out of featurep, which is better just a property-list
test.

FWIW & all the best.

Robert Dodier