\documentstyle[12pt,twoside]{article}
\begin{document}

\section{Question}
(a) 

   i) Write the negation of:
\begin{flushleft}
\ \ \ (P) \ \ \ \ \ \ $\forall x \forall y (x < y \rightarrow 
\exists z (x < z < y))$
\end{flushleft}
without using the connective $\neg$. You may however use $\le$.

   ii) Determine whether or not P is true if the universe of
discourse is Z.
(b) Show that S does not logically imply Q where
\begin{flushleft}
\ \ \ (S) \ \ \ \ \ \ $\forall x \exists y (f(y)=x)$\\
\ \ \ \ (Q) \ \ \ \ \ \ $\forall w \exists z (f(g(z))=w)$
\end{flushleft}
by finding a non-empty domain and definitions of
functions f and g which make S true and Q false.\\
(c) Express the following two of Hilbert's axioms for Euclidean
plane geometry into formal logic notation:

i) Every line has at least two distinct points.

ii) There are at least three points not on the same line.\\
You may use the following definitions:\\
P = set of points\\
L = set of lines\\
for l $\in$ L, x $\in$ P, l(x) denotes that point x lies on line l.
%\end{section}

\section{Solution}
(a) 

i) $\exists x \exists y ((x<y) \wedge \forall z ((z\le x) \vee
(y\le z)))$

ii) False. Take x=3, y=4.\\
(b) $D=\{0,1\}, \ f(x)=x \ \forall x\in D, \ g(x) = 0 \ 
\forall x\in
D$, then S is true and Q is false [let w=1, then $1\neq
0=f(g(0))$ and $1\neq 0=f(g(1))$]\\
(c)

(i) $\forall l\in L \exists x\in P \exists y \in P(x\neq y \wedge
l(x) \wedge l(y))$

(ii) $\exists x\in P \exists y\in P \exists z\in P (x\neq y \wedge
x\neq z \wedge y\neq z \wedge \forall l\in L(l(x) \wedge l(y)
\rightarrow \neg l(z)))$

%\end{section}

\end{document}