The inductive step of the
The correct answer to Question 1 in logic-knowledge-taken-for-granted is Choice (iv).
The Induction Step of the inductive proof of
(implies (true-listp z) (equal (rev (rev z)) z))
for an induction on the linear list
Induction Step: (implies (and (not (endp z)) (implies (true-listp (cdr z)) (equal (rev (rev (cdr z))) (cdr z)))) (implies (true-listp z) (equal (rev (rev z)) z)))
The second hypothesis above is the induction hypothesis. The
conclusion above is the formula we are trying to prove. Each induction
hypothesis is always an
If you thought the right answer was
Induction Step -- Choice (i): (implies (not (endp z)) (implies (true-listp z) (equal (rev (rev z)) z)))
then perhaps you didn't understand that we're doing an inductive proof.
Certainly if you prove the Base Case already discussed and you prove Choice
(i) above, then you will have proved the goal conjecture, but you would
have done it by simple case analysis: prove it when
If you thought the right answer was:
Induction Step -- Choice (ii): (implies (true-listp (cdr z)) (equal (rev (rev (cdr z))) (cdr z)))
then perhaps you misunderstand the difference between the Induction Step and the Induction Hypothesis. The Induction Step is the ``other half'' of the main proof, balancing the Base Case. The Induction Hypothesis is just a hypothesis you get to use during the Induction Step. The question Q1 asked what is the Induction Step.
If you thought the right answer was:
Induction Step -- Choice (iii): (implies (and (not (endp z)) (equal (rev (rev (cdr x))) (cdr x))) ; ``induction hyp'' (implies (true-listp z) (equal (rev (rev z)) z)))
then you are making the most common mistake newcomers make to induction.
You are giving yourself an ``induction hypothesis'' that is not an instance of
the conjecture you're proving. This alleged induction hypothesis says that
If this doesn't make sense, perhaps you should read about
When you understand why Choice (iv) is the correct answer, use your browser's Back Button to return to logic-knowledge-taken-for-granted and go to question Q2.