rzach / multlog

M. Ultlog, the genius many-valued logic expert
https://logic.at/multlog
8 stars 1 forks source link

Interactive mode to explore logics #14

Open rzach opened 3 years ago

rzach commented 3 years ago

Since MUltlog offers a convenient way of converting different specifications of finite-valued logics to an internal representation that can then be manipulated by Prolog, it would be nice to have a way to run MUltlog interactively to do things like:

rzach commented 3 years ago

Started on this -- it's in ml/ml_interactive.pl

loadLogic('goedel.lgc', gl) loads & checks an LGC file and makes it available using gl.

Then you can do things like :- isTaut(gl, imp(X,X)). to check if X -> X is a tautology.

It would be better/standard practice to have the gl as the last argument, right?

Formulas are terms possibly with variables, so that you can use Prolog to search for truth values etc.

I tried but failed to make a generator for formulas of a given logic. isFormula(gl,X) will just list all the formulas you can form from neg, true, and false, and never list the ones involving and, or, imp, etc. I mucked around with different ways of forcing breadth-first search, by working with polish notation as a list, but didn't get far.

Why? I wanted to be able to have a way of saying findTaut(X) and then have Prolog find all the tautologies. isTaut(X) doesn't work for this because it forces all variables to be truth values. What's the best way of doing that?

rzach commented 3 years ago

BTW to activate interactive mode just say multlog.