\documentclass[11pt]{article}
\usepackage{fullpage}
\usepackage{times}
\usepackage{amsmath,proof,amsthm,amssymb}

%% part of a problem
\newcommand{\task}[2]
  {\bigskip \noindent
   {\bf Task #1} (#2 pts).}

\newcommand{\ectask}[1]
  {\bigskip \noindent
   {\bf Task #1} (Extra Credit).}

\newcommand{\dsd}[1]{\ensuremath{\mathsf{#1}}}
\newcommand{\irl}[1]{\texttt{#1}}

\newcommand{\true}[1]{\ensuremath{#1 \, \dsd{true}}}

\title{Assignment 1: \\
       Natural Deduction}
\author{15-317: Constructive Logic}
\date{Out: Thursday, September 4, 2008 \\
Due: Thursday, September 11, 2008, before class}

\begin{document}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

\maketitle

Welcome to 15-317!  

\section{Bulletin Board (3 pts)}

You are responsible for all announcements posted to the bulletin board.
In particular, we may post clarifications and corrections to assignments
there.  You should check the bboard often.

The course bulletin board is
\begin{verbatim}
academic.cs.15-317
\end{verbatim}
You will find a ``magic number'' in a post there.

\task{1}{3} What is that number?

\section{Tutch Proofs (25 pts)}

Prove the following theorems using Tutch:

\begin{verbatim}
proof k : A => (B => A)
proof andcomm : (A & B) => B & A
proof curry : ((A & B) => C) => (A => B => C)
proof distribandor1 : ((A & B) | C) => (A | C) & (B | C)
proof clue : (G => (C & B) | (R & H)) 
           => (~B => S)
           => (R | H) 
           => ~(G & S) 
           => ~(R & C) 
           => ~(B & H) 
           => (~G)
\end{verbatim}

See the Recitation 1 notes for a paper proof of \verb|clue|, and see the
Recitation 2 notes for example Tutch proofs.  On Andrew machines, you
can check that you proved the right theorems by running

\begin{verbatim}
/afs/andrew/course/15/317/bin/tutch -r hw01.req <your file>
\end{verbatim}

This checks your work against the requirements file
\verb|/afs/andrew/course/15/317/req/hw01.req|.

\section{Local Soundness and Completeness (12 pts)}

See the Lecture 3 (Harmony) notes for a discussion of local soundness
and completeness.  

\newcommand{\spade}[2]{#1 \mathbin{\spadesuit} #2}
\newcommand{\heart}[2]{#1 \mathbin{\heartsuit} #2}
\newcommand{\club}[3]{\clubsuit(#1,#2,#3)}
\newcommand{\hypj}[3]{\deduce{#3}{\deduce{\vdots}{\infer[#1]{#2}{}}}}
\newcommand{\hypjt}[5]{\deduce{#5}{\deduce{\vdots}{\infer[#1]{#2}{} \:\:
      , \:\:\: \infer[#3]{#4}{}}}}

\subsection{Hearts}

Consider a connective defined by the following rules:

\[
\infer[\heartsuit I_L]
      {\true {\heart A B}}
      {\true A}
\qquad
\infer[\heartsuit I_R]
      {\true {\heart A B}}
      {\true B}
\qquad
\infer[\heartsuit E ^{u,v} ]
      {\true C}
      {\true {\heart A B} &
 	\hypjt{u}{\true{A}}{v}{\true{B}}{\true C} &
      }
\]

\task{3}{3} Is this connective locally sound?  If so, show the
reduction; if not, explain (informally) why no such reduction exists.

\task{4}{3} Is this connective locally complete?  If so, show the
expansion; if not, explain (informally) why no such expansion exists.

%% \subsection{Spades}

%% Consider a connective defined by the following rules:

%% \[
%% \infer[\spadesuit I]
%%       {\true {\spade A B}}
%%       {\true A&
%% 	\true B}
%% \qquad
%% \infer[\spadesuit E ^{u,v} ]
%%       {\true C}
%%       {\true {\spade A B} &
%%  	\hypj{u}{\true{A}}{\true C} &
%% 	\hypj{v}{\true{B}}{\true C}
%%       }
%% \]

%% \task{1}{3} Is this connective locally sound?  If so, show the
%% reduction; if not, explain (informally) why no such reduction exists.

%% \task{2}{3} Is this connective locally complete?  If so, show the
%% expansion; if not, explain (informally) why no such expansion exists.

\subsection{Clubs}

Consider a connective defined by the following rules:

\[
\infer[\clubsuit I_L^{u}]
      {\true {\club A B C}}
      {\hypj{u}{\true A}{\true B}}
\qquad
\infer[\clubsuit I_R^{u}]
      {\true {\club A B C}}
      {\hypj{u}{\true A}{\true C}}
\qquad
\infer[\clubsuit E ^{u,v} ]
      {\true D}
      {\true {\club A B C} &
	\true A &
 	\hypj{u}{\true{B}}{\true D} &
	\hypj{v}{\true{C}}{\true D}
      }
\]

\task{1}{3} Is this connective locally sound?  If so, show the
reduction; if not, explain (informally) why no such reduction exists.

\task{2}{3} Is this connective locally complete?  If so, show the
expansion; if not, explain (informally) why no such expansion exists.



\section{Handin Instructions}

\begin{itemize}
\item To submit your Tutch proofs, run

\begin{verbatim}
/afs/andrew/course/15/317/bin/submit -r hw01.req <your file>
\end{verbatim}

To check the status of your submission, you may run
\verb|/afs/andrew/course/15/317/bin/status hw01|.

If you get an error, it is probably because your submission directory
does not exist (because you were not registered for the course at the
time these directories were made); e-mail Dan (\texttt{drl@cs.cmu.edu}).

\item Submit your written work at the beginning of class.  
\end{itemize}

\end{document}
