[plt-scheme] first order predicate calculus

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Fri Dec 7 23:23:30 EST 2007

Dan,

Your question isn't quite clear.

If all you want to do is *represent* the statement, you can do that in
minutes.  Just define a datatype for the grammar of first-order logic,
and then translate your sentence into instances of that datatype.

I suspect what you want is more than that.  So here is a non-Scheme
recommendation.

Check out the Alloy Analyzer (alloy.mit.edu).  You will get an elegant
ASCII notation for first-order logic, as well as a tool to determine
(up to certain bounds) whether there are errors in your assertions.
It takes a little while to get used to Alloy, but once you do it is
quite valuable and repays the investment.  Think of it as a
lightweight way to explore designs over discrete, uninterpreted
domains, akin to calculators over numeric domains that you are used to
as an engineer.

(Kathi and I have a prototype of a tool that will connect Scheme to
the back-end of Alloy.  If you are willing to suffer some pain, ask us
at the end of December and we'll send you the latest version.)

Shriram


Posted on the users mailing list.