From 40a536083f6008cc3e3a5ba47802851667feeb8e Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Tue, 27 Oct 2015 19:44:41 +0100
Subject: Correctness proofs

---
 Practical1/report/report.tex | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

(limited to 'Practical1/report/report.tex')

diff --git a/Practical1/report/report.tex b/Practical1/report/report.tex
index 9ce7df9..6229121 100644
--- a/Practical1/report/report.tex
+++ b/Practical1/report/report.tex
@@ -1,5 +1,7 @@
 \documentclass[10pt,a4paper]{article}
 
+\usepackage[margin=30mm]{geometry}
+
 % textcomp package is not available everywhere, and we only need the Copyright symbol
 % taken from http://tex.stackexchange.com/a/1677/23992
 \DeclareTextCommandDefault{\textregistered}{\textcircled{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
@@ -26,19 +28,23 @@
 
 \providecommand*{\lemmaautorefname}{Lemma}
 \newtheorem{lemma}{Lemma}
-
-\newenvironment{lemmaproof}[2][]{%
-    \begin{lemma}%
-        \def\temp{#1}\ifx\temp\empty\else\label{lem:#1}\fi%
-        #2%
-    \end{lemma}%
+\newtheorem{theorem}{Theorem}
+\numberwithin{lemma}{subsection}
+\numberwithin{theorem}{subsection}
+
+\newenvironment{thmproof}[3][]{%
+    \begin{#2}%
+        \def\templabel{#1}%
+        \def\tempname{#2}%
+        \def\temptheorem{theorem}%
+        \ifx\templabel\empty\else\ifx\tempname\temptheorem\label{thm:#1}\else\label{lem:#1}\fi\fi%
+        #3%
+    \end{#2}%
     \begin{proof}%
 }{\end{proof}}
 
 \newcommand{\refeq}[2][]{\begin{equation}\label{eq:#1}#2\end{equation}}
 
-\numberwithin{lemma}{subsection}
-
 \usepackage{algorithm}
 \usepackage{algorithmic}
 \providecommand*{\algorithmautorefname}{Algorithm}
-- 
cgit v1.2.3

