# HG changeset patch # User Adam Chlipala # Date 1222713501 14400 # Node ID 1946586b9da797986f1db196022972efe6469248 # Parent 6f7142e082c0f75a7ebbe51b043f61b8949a2feb First two exercises diff -r 6f7142e082c0 -r 1946586b9da7 src/Predicates.v --- a/src/Predicates.v Sun Sep 28 13:52:23 2008 -0400 +++ b/src/Predicates.v Mon Sep 29 14:38:21 2008 -0400 @@ -855,3 +855,24 @@ (* end thide *) (* end hide *) + + +(** * Exercises *) + +(** %\begin{enumerate}%#
    # + +%\item%#
  1. # Prove these tautologies of propositional logic, using only the tactics [apply], [assumption], [constructor], [destruct], [intro], [intros], [left], [right], [split], and [unfold]. + %\begin{enumerate}%#
      # + %\item%#
    1. # [(True \/ False) /\ (False \/ True)]#
    2. # + %\item%#
    3. # [P -> ~ ~P]#
    4. # + %\item%#
    5. # [P /\ (Q \/ R) -> (P /\ Q) \/ (P /\ R)]#
    6. # + #
  2. #%\end{enumerate}% *) + +(** remove printing exists*) +(** %\item%#
  3. # Prove the following tautology of first-order logic, using only the tactics [apply], [assert], [assumption], [destruct], [eapply], [eassumption], and [exists]. You will probably find [assert] useful for stating and proving an intermediate lemma, enabling a kind of "forward reasoning," in contrast to the "backward reasoning" that is the default for Coq tactics. [eassumption] is a version of [assumption] that will do matching of unification variables. Let some variable [T] of type [Set] be the set of individuals. [x] is a constant symbol, [p] is a unary predicate symbol, [q] is a binary predicate symbol, and [f] is a unary function symbol. **) +(** printing exists $\exists$ *) +(** %\begin{enumerate}%#
      # + %\item%#
    1. # [p x -> (forall x, p x -> exists y, q x y) -> (forall x y, q x y -> q y (f y)) -> exists z, q z (f z)]#
    2. # + #
  4. #%\end{enumerate}% + +#
#%\end{enumerate}% *)