next up previous contents
Next: Walking About a Proof Up: The Nuprl Proof Development Previous: Well-Formedness of Terms

Running Tactics 2

Type-checking subgoals for basic propositional and predicate logic can always be dealt with automatically, and we have a tactic Auto for that purpose.

Return to the proof editor window using \framebox {\rule[-.2ex]{0em}{1.5ex}\sc mouse-left}
, and click \framebox {\rule[-.2ex]{0em}{1.5ex}\sc mouse-right}
on the tactic D 0 which you just typed in. A term-editor window opens up again. Click \framebox {\rule[-.2ex]{0em}{1.5ex}\sc mouse-left}
after the 0 and enter:





\begin{parbox}
{25em}
{\tt \hspace{.2em}\lower.2ex\hbox{
\framebox {\rule[-.2ex]{0em}{1.5ex}\sc return}
}\hspace{.2em}{}THENW Auto}\end{parbox}




The rule window should look like:

EDIT rule of not_over_and
 
D 0
THENW Auto
 

To run the tactic, enter $\langle$C-Z$\rangle$. The rule window closes and once the tactic has executed, the proof window should look like:

EDIT THM not_over_and
# top
$\vdash$ $\forall$A:${\Bbb{P}}${i}. $\forall$B:${\Bbb{P}}${i}. $\neg$(A $\wedge$ B) $\Longleftrightarrow$ $\neg$A $\vee$ $\neg$B
 
D 0
THENW Auto
 
1# 1. A: ${\Bbb{P}}${i}
$\vdash$ $\forall$B:${\Bbb{P}}${i}. $\neg$(A $\wedge$B) $\Longleftrightarrow$ $\neg$A $\vee$$\neg$B
 
 
 

THENW is a tactical, a combinator for composing tactics. It has been declared to be an ML infix function, so one argument comes before and one after. Nearly all ML infix functions have names of more than one character, with all upper-case characters. To look at its type, enter





\begin{parbox}
{25em}
{\tt \$THENW\hspace{.2em}\lower.2ex\hbox{
\framebox {\rule[-.2ex]{0em}{1.5ex}\sc return}
}\hspace{.2em}}\end{parbox}




in the ML Top Loop. $THENW is a version of THENW which behaves like other ML functions in that all its arguments are placed to its right. What gets printed out should be:




M> $THENW;;
- : tactic -> tactic -> tactic
M> \framebox [0.5em]{\rule{0em}{1ex}}
 
 



THENW is a sequencing tactical; The tactic T1 THENW T2 first runs T1 on some goal, and then runs T2 on any well-formedness subgoals generated by T2 . When doing Nuprl proofs you should add THENW Auto after any other tactics which generate well-formedness subgoals. Well-formedness subgoals are pretty easy to recognize; they always have a conclusion of form $\ulcorner$e $\in$T $\urcorner$where e is some expression, and T is a type. The type universes $\Bbb{U}${i}are themselves considered types. Other examples of types which you will encounter later are $\Bbb{Z}$, the integers, and $\Bbb{B}$, the booleans.

The first time you run a new tactic, or an existing tactic which might act in a new way, it is worth running it without the THENW Auto just to see how it works. Thereafter, always use the THENW Auto. From here on in the tutorial, we always include the THENW Auto if it is necessary, but feel free to try leaving it out first.


next up previous contents
Next: Walking About a Proof Up: The Nuprl Proof Development Previous: Well-Formedness of Terms
Dora Abdullah, 12/4/97