.he 'LOGIC''Page %'
.fo'Aaron Sloman'%'March 1978'
.hy 0
.mh
A PROGRAM TO TEACH PROPOSITIONAL LOGIC
= ======= == ===== ============= =====
.hm

To play with the logic programs, log in by typing
 	LOGIC
.br
on a terminal.

End your command by pressing the button marked "CR", or "linefeed",
or "return", depending which terminal you use.
Remember to press this button at the end of every subsequent command.
Until you've pressed one of these buttons the computer will not pay
attention to your commands.

When you log in, the computer will run the POP11 system, which will
"compile" the logic programs. This can take a few minutes. Please be
patient.

The machine will print out a dictionary of known logical operators, and
other information.

NOTE:
.in+5
If you've done this before and want to avoid the introductory printing
then you should log in as QLOGIC, rather than as LOGIC. The "Q" stands
for "quiet"!
.in-5

When the program is ready it will print out
 	type a command or formula :
.br
You should not type anything
until prompted with the colon, like that.

The program always operates on a "current formula". To give it a
current formula you can type in a formula
e.g.
 	p and q or r
 	if p then not q
 	p & q v r
 	p -> -q

You can then give a command to do something with this formula, such as
print it out, or print a truth-table. You can ask for practice in
evaluating the formula.

The program knows how to read in logical expressions in a variety of
forms, e.g.
 	A AND B
 	A & B
 	P -> Q
 	P AND NOT NOT Q
 	P & --Q
 	NOT P IMPLIES P OR Q
 	-P -> P V Q
 	-P -> (P V Q)
 	IF NOT P THEN P OR Q
.br
It treats the last four of these as equivalent.
Note that this involves following the usual conventions about where
brackets should be understood.

If you type in a formula which is not well-formed, the program
will complain, and ask you to begin again. In this way, you can
get practice at telling the difference between well-formed
and ill-formed formulas.

The program also knows how to print formulas out. If, instead of typing in a formula, you
give the command:
 	P	(abbreviation for PRINT)
.br
the "current formula" is printed out in a symbolic form,
using symbols like:
 	->	-	<->	&	v

 	S	(abbreviation for SAY)
.br
prints out the current formula using English words like "not", "and", "or", instead of
the symbols, as in the examples above.
However, instead of "IF-AND-ONLY-IF", it says "IFF", symbolised
as <-> by the P command.

Try typing in some of the above formulas, following them with the
P or S command.
If the formula you type in has something wrong with it
you'll get a complaint from the computer, otherwise it says the formula is OK.

You can ask the computer to print out a truth-table for the
current formula (e.g. the last formula you typed in), by giving
the command
 	: TB		(abbreviation for TABLE)

If instead, you use the command HT (help-table) the computer will not
print out the complete table. Instead it asks you to type the final
entry in each row, and tells you if you've got it wrong.

Closely related to this is the command EV, which says you want to
practice evaluating the current formula, for various combinations of
truth-values of its variables. E.g. if the formula is
 	-p -> q v r
.br
(i.e. if not p then q or r) then the EV command says you want to give values for
p q and r, and then work out whether the whole formula is true or false.
The computer will check your answer.

The LOGIC program can also generate its own formulas. By giving the
command:
 	: NF		(abbrevation for NEWFORMULA)
.br
you ask the computer to create a formula (at random) and make that
the current formula. You can then print it out, using P or S.
Or you can use the TB, or EV commands, as above.

Alternatively you can try to guess what the new formula is is, using the G
command (see below).

The formulas generated by the NF command grow gradually more complex.
The command RS (restart) makes them return to the initial degree of
complexity. So if you find the formulas produced by NF too complex,
then type RS.

Some of the commands cause the computer to print out instructions
and questions. If you are asked to type in truth-values use
"T" or "1" for TRUE and "F" or "0" for FALSE. Separate them with spaces. If you
type something different you will be asked to correct it.

Each of the commands is exactly one word.
If you type more than one word when a command is expected, it will be assumed
that you are trying to type in a new formula, not a command.
.mh
SUMMARY OF COMMANDS
-------------------
.hm


.in+4

.ti-4
P		(Print)
 Print out current formula using symbols.

.ti-4
S		(Say)
 Print out current formula using words.

.ti-4
NF		(New Formula)
 Create a new formula, and make it the current formula.

.ti-4
RS		(ReStart)
 Make NF go back to producing simpler formulas.

.ti-4
TB		(TaBle)
 Print out a truthtable for the current formula.

.ti-4
HT		(Help Table)
 Asks the computer to help you build a truth-table
for the current formula. The computer will print out the
heading and start each row of the table. You complete the row.
If you make a mistake it will tell you, and explain why the
truth-value you typed in was wrong.

.ti-4
TA		(TAutology?)
 Asks computer if current formula is a tautology.

.ti-4
In		(INconsistent?)
 Asks computer if current formula is inconsistent.

.ti-4
CO		(COntingent?)
 Asks computer if current formula is contingent.

.ti-4
EV		(EValuate)
 Tells the computer you want to evaluate the current
formula. It will ask you to type in truth-values for the
variables, then it will ask you to say what you think the
value for the whole formula is. If you get it wrong, you'll
get an explanation. The process is repeated until you type STOP.

.ti-4
G		(Guessing game)
.fi
 This says you want to guess the current formula (e.g.
after you've given the NF command). The computer will type out
instructions.

.ti -4
EQ		(EQivalent formulas)
 The computer will generate a formula, print it out, and ask you to
construct an equilvalent one. It may be quite complex, but will never
contain more than two different variables.

.ti-4
VAL		(VALidity testing)
 This asks the computer to construct an example of an inference, which
you can then check for validity. The computer asks you how many premisses
you'd like it to have, and it gives you the option of printing out their
individual truth-tables before you try to work out whether the inference
is valid.

.ti-4
BYE		(Log out)
 Type this when you've finished. It will log you out.

.ti-4
STOP
 Stop the current activity. You'll then be asked again to
type in a formula or a command.
Pressing the button marked CTRL and then typing X has the same effect.
.in 0

Reading:
.br
-------

 	I.M. Copi: INTRODUCTION TO LOGIC, chapter 1 and chapter 8
