summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/AkkTeX/akkmathproof.sty
blob: 02a642c7eff8dc2386bd42fcd40f6e55380bfb33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
%=====================================================================================================================================
% Package akkmathproof by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004, 2005
% Package providing utilities for typesetting mathematical proofs.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License (latest version).
%
% The latest version of this license can be found at
%     http://www.latex-project.org/lppl.txt
%
% This file may only be distributed together with the full 'AkkTeX' bundle.
%=====================================================================================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{akkmathproof}[2005/04/30 1.2.0 by Igor Akkerman (c) 2000, 2001, 2002, 2003, 2004, 2005 Package providing utilities for typesetting mathematical proofs]
%=====================================================================================================================================

\RequirePackage{ifthen}

\makeatletter

%------------------------------------------------------------------------------
% Universal proof utilities
%------------------------------------------------------------------------------
\newcommand \akk@prooflabel {Proof}

\newcommand \prooflabel[1] {\renewcommand \akk@prooflabel {#1}}

\newcommand \proofendsymbol {\ensuremath{\Box}}

\newboolean{proofended}

\newcommand \proofend {%
    \ifbool{mmode}{%
        \tag*{\proofendsymbol}%
    }{%
        \hspace*{\fill}\proofendsymbol%
    }%
    \global\proofendedtrue%
}

\newenvironment{proof}{%
    \unskip\par%
    \textit{\textbf{\akk@prooflabel:}}\\%
    \begin{proof*}%
}{%
    \end{proof*}%
    \par%
}

\newenvironment{Proof}{%
    \unskip\par%
    \textit{\textbf{\akk@prooflabel:}}%
    \begin{proof*}%
}{%
    \end{proof*}%
    \par%
}

\newenvironment{proof*}{%
    \setboolean{proofended}{false}%
}{
    \ifboolfalse{proofended}{%
        \proofend%
    }%
}

\prooflabel{Beweis}

\newenvironment {beweis} {%
    \begin{proof}%
}{%
    \end{proof}%
}

\newenvironment {Beweis} {%
    \begin{Proof}%
}{%
    \end{Proof}%
}

%------------------------------------------------------------------------------
% Induction environments
%------------------------------------------------------------------------------
\newcommand \vind[2]{\textit{Beweis mittels vollständiger Induktion über $#1$:}\\}
\newcommand \vindende {\indende{vollständige}}

\newcommand \sind {\textit{Beweis durch strukturelle Induktion:\\}}
\newcommand \sindende {\indende{strukturelle}}

\newcommand{\indanf}[2]
{Induktionsanfang ($#1=#2$):}

\newcommand{\indanfs}
{Induktionsanfang:}

\newcommand{\indvor}
{Induktionsvoraussetzung:}

\newcommand{\indschritt}
{Induktionsschritt:}

\newcommand{\indende}[1]
{Nach dem Prinzip der #1n Induktion folgt die Behauptung.\proofend}

%------------------------------------------------------------------------------
% equivalence and set equality proofs
%------------------------------------------------------------------------------
\newcommand \hinsymb       {\glqq$\mathbf{\Rightarrow}$\grqq}
\newcommand \ruecksymb     {\glqq$\mathbf{\Leftarrow}$\grqq}
\newcommand \sethinsymb    {\glqq$\mathbf{\subseteq}$\grqq}
\newcommand \setruecksymb  {\glqq$\mathbf{\supseteq}$\grqq}
\newcommand \ssethinsymb   {\glqq$\mathbf{\subset}$\grqq}
\newcommand \ssetruecksymb {\glqq$\mathbf{\supset}$\grqq}
\newcommand \hin           {\hinsymb \\*[2pt]}
\newcommand \rueck         {\ruecksymb \\*[2pt]}
\newcommand \sethin        {\sethinsymb \\*[2pt]}
\newcommand \setrueck      {\setruecksymb \\*[2pt]}
\newcommand \ssethin       {\ssethinsymb \\*[2pt]}
\newcommand \ssetrueck     {\ssetruecksymb \\*[2pt]}

\newenvironment{equivproof}{%
	\begin{proof}%
		\begin{equivproof**}%
}{%
		\proofend%
		\end{equivproof**}%
	\end{proof}%
}

\newenvironment{equivproof*}{%
	\begin{proof*}%
		\begin{equivproof**}%
}{%
		\proofend%
		\end{equivproof**}%
	\end{proof*}%
}

\newenvironment{equivproof**}{%
	\renewcommand \hin   {\item[\hinsymb]}%
	\renewcommand \rueck {\item[\ruecksymb]}%
	\begin{itemize}%
}{%
	\end{itemize}%
}

\newenvironment{setequalproof}{%
	\begin{proof}%
		\begin{setequalproof**}%
}{%
		\proofend%
		\end{setequalproof**}%
	\end{proof}%
}

\newenvironment{setequalproof*}{%
	\begin{proof*}%
		\begin{setequalproof**}%
}{%
		\proofend%
		\end{setequalproof**}%
	\end{proof*}%
}

\newenvironment{setequalproof**}{%
	\renewcommand \sethin   {\item[\sethinsymb]}%
	\renewcommand \setrueck {\item[\setruecksymb]}%
	\begin{itemize}%
}{%
	\end{itemize}%
}

% infer
\newcommand \dinfer[2] {\text{$\displaystyle\infer{#1}{#2}$}}

\makeatother