Occasionally, in the *goals* window, there is a large number of assumptions over the horizontal bar. Some of them are unnecessary to prove the current goal, and we can use the clear tactic to remove them.
For example, consider the following lemma:
Lemma for_example :
forall A B : Prop,
A -> B -> A.
Proof.
intros A B H_A H_B.
At that point, the *goals* window reads:
A, B : Prop
H_A : A
H_B : B
============================
A
Among these assumptions, H_B is unnecessary to prove A. We can clear it away from the assumptions using the clear tactic:
clear H_B.
The *goals* window then reads:
A, B : Prop
H_A : A
============================
A
(As can be observed, H_B no longer occurs among the assumptions.)
We can then conclude the proof:
exact H_A.
Qed.
Let us revisit the food for thought from Week 01:
Definition specification_of_foo_in_Week_01 (foo : nat -> nat) :=
(foo O = 0)
/\
(forall n' : nat,
foo (S n') = S (S (foo n'))).
Lemma twice_S :
forall n : nat,
2 * S n = S (S (2 * n)).
Proof.
Admitted.
Theorem about_foo :
forall foo : nat -> nat,
specification_of_foo_in_Week_01 foo ->
forall a b : nat,
foo a = b ->
b = 2 * a.
The .v file for the present lecture note contain six attempts at proving Theorem about_foo, one of which is unsuccessful:
Halcyon (thoughtfully): To light is to delight.Pablito (wondering): The Delight of Inductil?Bong-sun (facepalming): ...