\documentclass[11pt]{article}

\usepackage[margin=1.6in]{geometry}
\usepackage{proof}
\usepackage{amsmath,amsthm,amssymb}

% 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}

\newcommand\pimp{\mathop{\supset}}
\newcommand\pand{\mathop{\wedge}}
\newcommand\por{\mathop{\vee}}
\newcommand\ptrue{\top}
\newcommand\pfalse{\bot}
\newcommand\pspades{\spadesuit}

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

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

\title{Constructive Logic (15-317), Fall 2009 \\
       Assignment 1: Natural Deduction}
\author{William Lovas \texttt{(wlovas@cs)}}
\date{Out: Thursday, September 3, 2009 \\
      Due: Thursday, September 10, 2009 (before class)}

\begin{document}
\maketitle

Welcome to 15-317, Fall 2009 edition!  In this, your first homework
assignment, you will practice essential logic skills like carrying
out proofs in natural deduction and verifying the harmony of logical
connectives.

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 hw01 <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 hw01
\end{verbatim}
If you have trouble running either of these commands, email William.

The written portion of your work (Sections~\ref{sec:bboard} and
\ref{sec:sdcp}) 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{Bulletin Board (3 points)}
\label{sec:bboard}

The course has an Andrew BBoard, \texttt{academic.cs.15-317}, which you are
expected to read.  We may occasionally post announcements, clarifications,
or corrections, so you should check the BBoard often.

You will find a current post on the BBoard entitled ``Homework 1'', and the
contents of that post will reveal to you a password.

\begin{task}[3 pts]
  What is the password?
\end{task}


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

\begin{task}[15 pts]
  Prove the following theorems using Tutch:
\begin{verbatim}
 proof K : A => B => A
 proof S : (A => B => C) => (A => B) => A => C
 proof orComm : A | B => B | A
 proof distribOrImp : (A | B => C) => (A => C) & (B => C)
 proof clue : (P => (C & K) | (D & L))
             => (~K => S)
             => (D | L)
             => (P => ~S) & (S => ~P)
             => (C => ~D) & (D => ~C)
             => (K => ~L) & (L => ~K)
             => ~P
\end{verbatim}
\end{task}

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

\section{Harmony and Derivability (22 points)}
\label{sec:sdcp}

\subsection{Conjunction revisited}
When we formulated elimination rules for conjunction, we said that given
a proof of $A \pand B \true$, you could conclude either $A \true$ or $B
\true$.  We could equally well have specified an elimination rule that
reasons toward a generic conclusion $C \true$ from hypotheses of $A \true$
and $B \true$.  We can illustrate this precisely by specifying a new
connective $A \times B$ with the same introduction rule as $A \pand B$ but
a new elimination rule.
\[
  \infer[{\times}I]
        {A \times B \true}
        {A \true & B \true}
  \quad\qquad
  \infer[{\times}E^{u,v}]
        {C \true}
        {A \times B \true
       & \deduce[\ddd]{C \true}
                      {\hyp{u}{A \true} \com \hyp{v}{B \true}} }
\]
In the elim rule's hypothetical proof of $C \true$, the hypotheses
$A \true$ and $B \true$ may each be used any number of times (including
zero).

\begin{task}[3 pts]
  Show that the rule ${\times}E^{u,v}$ is locally sound by giving an
  appropriate local reduction.
\end{task}

\begin{task}[3 pts]
  Show that the rule ${\times}E^{u,v}$ is locally complete by giving an
  appropriate local expansion.
\end{task}

Although showing local soundness and completeness for a set of elimination
rules gives us some confidence that they are sensibly harmonious with the
introduction rules, it does not tell us everything about the behavior of
those elimination rules.  We can justify the assertion that the new
elimination rule ${\times}E^{u,v}$ is equivalent to the original
conjunction elimination rules ${\pand}E_L$ and ${\pand}E_R$ by showing that
the two sets of rules are \textit{interderivable}.

\begin{task}[4 pts]
  Show that the following rules are derivable by providing derivations in
  terms of the rule ${\times}E^{u,v}$:
  \[
  \infer[{\times}E'_L]{A \true}{A \times B \true}
  \quad\qquad
  \infer[{\times}E'_R]{B \true}{A \times B \true}
  \]
\end{task}

\begin{task}[4 pts]
  Show that the corresponding new rule ${\pand}E'\,^{u,v}$ is derivable
  by showing how you could replace any subdeduction of the form
  \[
  \infer[{\pand}E'\,^{u,v}]
        {C \true}
        {\deduce[\DD]{A \pand B \true}{}
       & \deduce[\EE]{C \true}
                     {\hyp{u}{A \true} \com \hyp{v}{B \true}} }
  \]
  with one that uses only the rules ${\pand}E_L$ and ${\pand}E_R$.
  (\textbf{Hint}: think of the substitution principle!)
\end{task}

\subsection{To call a spade a spade}

Consider a new connective $\pspades(A, B, C)$ defined by the introduction
rule:
\[
  \infer[{\pspades}I^{u,v}]
        {\pspades(A, B, C) \true}
        {\deduce[\ddd]{C \true}{\hyp{u}{A \true}}
       & \deduce[\ddd]{C \true}{\hyp{v}{B \true}} }
\]
with the following candidate elimination rule:
\[
  \infer[{\pspades}E]
        {C \true}
        {\pspades(A, B, C) \true
       & A \true
       & B \true}
\]

\begin{task}[4 pts]
Is this elimination rule locally sound?  If so, give an appropriate local
reduction; otherwise, explain (informally) why no such reduction exists.
\end{task}

\begin{task}[4 pts]
Is this elimination rule locally complete?  If so, give an appropriate
local expansion; otherwise, explain (informally) why no such expansion
exists.
\end{task}

\end{document}
