\documentclass[11pt]{article}

\usepackage[margin=1.45in]{geometry}
\usepackage{proof}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[raiselinks=false,colorlinks=true,citecolor=blue,urlcolor=blue,linkcolor=blue,bookmarksopen=true,dvips]{hyperref}

% font{
\usepackage{pxfonts}
%% fix sans serif
\renewcommand\sfdefault{cmss}
\DeclareMathAlphabet{\mathsf}{OT1}{cmss}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{OT1}{cmss}{b}{n}
% }font

\theoremstyle{definition}
\newtheorem{task}{Task}
\newtheorem{ectask}{Extra Credit Task}

\newcommand\pimp{\mathrel{\supset}}
\newcommand\pand{\mathrel{\wedge}}
\newcommand\por{\mathrel{\vee}}
\newcommand\ptrue{\top}
\newcommand\pfalse{\bot}
\newcommand\pnot{\neg}
\newcommand\pspades{\spadesuit}
\newcommand\pforall[3]{\forall #1{:}#2.\, #3}
\newcommand\pexists[3]{\exists #1{:}#2.\, #3}
\newcommand\qtri\blacktriangledown
\newcommand\ptri[3]{\qtri #1{:}#2.\, #3}

\newcommand\eqn{\mathrel{=_N}}
\newcommand\z{\mathsf{0}}
\newcommand\s{\mathsf{s}}
\newcommand\Cases{\mathit{Cases}}

\newcommand\true{\;\textit{true}}
\newcommand\false{\;\textit{false}}
\newcommand\contra{\#}
\newcommand\ddd{\raisebox{0.2em}[1.3em]{$\vdots$}}
\newcommand\com{\raisebox{0.3em}{$\ ,\ \ $}}
\newcommand\hyp[2][]{\infer[#1]{#2}{}}
\newcommand\sub[3]{\infer[#2]{#3}{#1}}

\newcommand{\lred}{\mathrel{\raisebox{0.5em}{$\Longrightarrow_R$}}}
\newcommand{\lexp}{\mathrel{\raisebox{0.5em}{$\Longrightarrow_E$}}}

\newcommand{\DD}{\mathcal{D}}
\newcommand{\EE}{\mathcal{E}}
\newcommand{\FF}{\mathcal{F}}
\newcommand{\GG}{\mathcal{G}}

% some URLs used below
\newcommand\tutchGuideURL{http://www.cs.cmu.edu/~fp/courses/15317-f09/software/tutch/doc/html/tutch_ovr.html}
\newcommand\tutchProofTermsURL{http://www.cs.cmu.edu/~fp/courses/15317-f09/software/tutch/doc/html/tutch_4.html\#SEC18}
\newcommand\tutchProofTermsRefURL{http://www.cs.cmu.edu/~fp/courses/15317-f09/software/tutch/doc/html/tutch_9.html\#SEC28}
\newcommand\tutchArithmeticURL{http://www.cs.cmu.edu/~fp/courses/15317-f09/software/tutch/doc/html/tutch_7.html\#SEC21}

\title{Constructive Logic (15-317), Fall 2009 \\
       Assignment 4: Classical and Intuitionistic Logic}
\author{William Lovas \texttt{(wlovas@cs)}}
\date{Out: Thursday, September 24, 2009 \\
      Due: Thursday, October 1, 2009 (before class)}

\begin{document}
\maketitle

The goal of this assignment is to give you a bit of intuition about the
relationship between classical and intuitionistic reasoning.  You'll
explore the boundaries between the two, seeing just where intuitionistic
reasoning makes more distinctions, and you'll work with the double-negation
translation that embeds classical logic into intuitionistic logic.

This assignment is a bit shorter than usual to allow you time to prepare
for the midterm on Thursday, October 1.  If you hand this homework in
during lecture on Tuesday, we will grade and return it the following day in
recitation so you can have feedback before the midterm.

The Tutch portion of your work (Section~\ref{sec:tutch}) should be submitted
electronically using the command
\begin{verbatim}
  $ /afs/andrew/course/15/317/bin/submit -r hw04 <files...>
\end{verbatim}
from any Andrew server.  You may check the status of your submission by
running the command
\begin{verbatim}
  $ /afs/andrew/course/15/317/bin/status hw04
\end{verbatim}
If you have trouble running either of these commands, email William.

The written portion of your work (Section~\ref{sec:dnt}) should be
submitted at the beginning of class.  If you are familiar with \LaTeX, you
are encouraged to use this document as a template for typesetting your
solutions, but you may alternatively write your solutions \textit{neatly}
by hand.

\section{Tutch Proofs (28 points)}
\label{sec:tutch}

Tutch allows you to do classical proofs by employing a non-judgemental
analogue of our $PBC^k$ rule:
    \[
    \infer[\mathit{PBC}_\mathit{Tutch}^u]
          {A \true}
          {\deduce[\ddd]{\pfalse \true}{\pnot A \true}}
    \]
Classical proofs must be declared with \verb'classical proof'.  Here's an
example, proving double-negation elimination:
\begin{verbatim}
  classical proof dne : ~~A => A =
  begin
    [ ~~A;
      % prove A by contradiction:
      [ ~A;
        F ];
      A ];
    ~~A => A
  end;
\end{verbatim}

\begin{task}[28 pts]
Which of the following propositions are provable intuitionistically?
Classically?  Prove them in Tutch intuitionistically if possible,
classically if necessary.
\begin{verbatim}
  proof deMorganNotOr : ~(A | B) => ~A & ~B
  proof deMorganOrNot : (~A | ~B) => ~(A & B)
  proof deMorganNotAnd : ~(A & B) => ~A | ~B
  proof deMorganAndNot : (~A & ~B) => ~(A | B)

  proof deMorganNotEx : ~(?x:t. A(x)) => !x:t. ~A(x)
  proof deMorganExNot : (?x:t. ~A(x)) => ~!x:t. A(x)
  proof deMorganNotAll : ~(!x:t. A(x)) => ?x:t. ~A(x)
  proof deMorganAllNot : (!x:t. ~A(x)) => ~?x:t. A(x)
\end{verbatim}
\end{task}

On Andrew machines, you can check your progress against the requirements
file \texttt{/afs/andrew/course/15/317/req/hw04.req} by running the command
\begin{verbatim}
  $ /afs/andrew/course/15/317/bin/tutch -r hw04 <files...>
\end{verbatim}

\section{Double-Negation Translation (12 points)}
\label{sec:dnt}

Recall from lecture the double-negation translation $A^*$ embedding
classical logic into intuitionistic logic:
\begin{align*}
  P^* &= \pnot \pnot P      \qquad (P \text{ atomic}) \\
  \ptrue^* &= \ptrue  \\
  (A \pand B)^* &= A^* \pand B^* \\
  \pfalse^* &= \pfalse \\
  (A \por B)^* &= \pnot \pnot (A^* \por B^*) \\
  (\pnot A)^* &= \pnot (A^*)
\end{align*}
It is a theorem that if $A \true$ is derivable classically, then $A^*
\true$ is derivable intuitionistically.  The key lemma in the proof of this
theorem is that double-negation elimination holds on the target of the
translation:
\begin{quote}
  \textbf{Lemma:} For every $A$, the rule
    \[
    \infer[\mathit{DNE}_A]{A^* \true}{\pnot \pnot A^* \true}
    \]
  is intuitionistically derivable.
\end{quote}
This lemma can be proven by structural induction on $A$.

\begin{task}[6 pts]
Prove the case for conjunction.  That is, show that the rule
    \[
    \infer[\mathit{DNE}_{A \pand B}]
          {(A \pand B)^* \true}
          {\pnot \pnot (A \pand B)^* \true}
    \]
is derivable, assuming the following new rules:
    \[
    \infer[\mathit{I.H.}_A]
          {A^* \true}
          {\pnot \pnot A^* \true}
    \qquad\quad
    \infer[\mathit{I.H.}_B]
          {B^* \true}
          {\pnot \pnot B^* \true}
    \]
\end{task}

\begin{task}[6 pts]
Prove the case for disjunction.  That is, show that the rule
    \[
    \infer[\mathit{DNE}_{A \por B}]
          {(A \por B)^* \true}
          {\pnot \pnot (A \por B)^* \true}
    \]
is derivable.
\end{task}

For both problems, you may choose to treat negation $\pnot A$ as a
notational definition $A \pimp \pfalse$ or using the direct definition
given in the
\href{http://www.cs.cmu.edu/~fp/courses/15317-f09/lectures/07-classical.pdf}
{Lecture Notes on Classical Logic}, whichever you are more comfortable with.

\end{document}
