Chapter 2: Problem 28
The second stage of the procedure to "push negations inward" started with a formula whose only logical connectives are \(\neg, v,\) and \(\wedge\) and constructed a tautologically equivalent formula with negations applied only to proposition letters. (a) Write an algorithm describing exactly what is done. The algorithm should work on formulas as strings of symbols. To avoid what in this case is irrelevant detail, the program should assume that all proposition letters are one character long and that any symbol encountered, except for \((.), \wedge, v,\) and \(\neg,\) is a proposition letter. Assume that the formula contains no blanks. (It is perhaps easiest to consider the program as a function that is passed the original formula - a string-as a parameter, and then returns the equivalent formula with all the negations pushed inward. It is casiest to use recursion to handle many subformulas.) (b) Prove that your program from part (a) works. (Hint: if your program in part (a) uses recursion to handle subformulas, it is natural to do this proof by induction on formulas. However, the induction may not be straightforward.)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.