Debian Codegraph @

texmf-dist/doc/metapost/drv/sample/coq-sample.tex

raw
1 % Any piece of code related to font selection in the following preambule
2 % (document class, font package, font selection commands ...) should be
3 % reported in `coq-sample.mp'.
4
5 \documentclass[8pt]{beamer}
6 \usetheme{Warsaw}
7
8 \usepackage[T1]{fontenc}
9 \usepackage{amsmath}
10 \usepackage[varg]{txfonts}
11
12 \usepackage{graphicx}
13 \makeatletter
14 \def\Gin@def@bp#1\relax#2#3{\gdef#2{#3}}
15 \newsavebox{\graphicsbox}
16 \newcommand*{\drv}[1]{%
17 \sbox{\graphicsbox}{\includegraphics{#1}}%
18 \raisebox{\Gin@lly bp}%
19 {\usebox{\graphicsbox}}}
20 \makeatother
21
22 \title{Une construction de preuve en logique minimale}
23 \institute{INF462 -- Master S\&T Informatique -- Bordeaux 1}
24 \date{}
25
26 \begin{document}
27
28 \begin{frame}
29 \titlepage
30 \end{frame}
31
32 \ttfamily
33 \itshape
34 \small
35
36 \begin{frame}
37 \begin{block}{}
38 %
39 % coq-tex output
40 %
41 \begin{overlayarea}{\textwidth}{.5\textheight}
42 \only<1>{%
43 \textup{Coq~{<}~Variables~P~Q~R~:~Prop.}\\
44 P~is~assumed\\
45 Q~is~assumed\\
46 R~is~assumed\\
47 \medskip
48 \textup{%
49 Coq~{<}~Lemma~imp\_perm~:~(P~-{>}~(Q~-{>}~R))~-{>}~(Q~-{>}~(P~-{>}~R)).}\\
50 1~subgoal\\
51 ~~\\
52 ~~P~:~Prop\\
53 ~~Q~:~Prop\\
54 ~~R~:~Prop\\
55 ~~============================\\
56 ~~~\textcolor{blue}{(P~-{>}~Q~-{>}~R)~-{>}~Q~-{>}~P~-{>}~R}\\
57 \medskip
58 \textup{Coq~{<}~Proof.}\\
59 \medskip
60 \textup{Coq~{<}}}
61 \only<2>{%
62 \textup{Coq~{<}~Variables~P~Q~R~:~Prop.}\\
63 P~is~assumed\\
64 Q~is~assumed\\
65 R~is~assumed\\
66 \medskip
67 \textup{%
68 Coq~{<}~Lemma~imp\_perm~:~(P~-{>}~(Q~-{>}~R))~-{>}~(Q~-{>}~(P~-{>}~R)).}\\
69 1~subgoal\\
70 ~~\\
71 ~~P~:~Prop\\
72 ~~Q~:~Prop\\
73 ~~R~:~Prop\\
74 ~~============================\\
75 ~~~\textcolor{blue}{(P~-{>}~Q~-{>}~R)~-{>}~Q~-{>}~P~-{>}~R}\\
76 \medskip
77 \textup{Coq~{<}~Proof.}\\
78 \medskip
79 \textup{Coq~{<}~~~intro~H.}}
80 \only<3>{%
81 \textup{Coq~{<}~~~intro~H.}\\
82 1~subgoal\\
83 ~~\\
84 ~~P~:~Prop\\
85 ~~Q~:~Prop\\
86 ~~R~:~Prop\\
87 ~~H~:~P~-{>}~Q~-{>}~R\\
88 ~~============================\\
89 ~~~\textcolor{blue}{Q~-{>}~P~-{>}~R}\\
90 \medskip
91 \textup{Coq~{<}}}
92 \only<4>{%
93 \textup{Coq~{<}~~~intro~H.}\\
94 1~subgoal\\
95 ~~\\
96 ~~P~:~Prop\\
97 ~~Q~:~Prop\\
98 ~~R~:~Prop\\
99 ~~H~:~P~-{>}~Q~-{>}~R\\
100 ~~============================\\
101 ~~~\textcolor{blue}{Q~-{>}~P~-{>}~R}\\
102 \medskip
103 \textup{Coq~{<}~~~intro~q.}}
104 \only<5>{%
105 \textup{Coq~{<}~~~intro~q.}\\
106 1~subgoal\\
107 ~~\\
108 ~~P~:~Prop\\
109 ~~Q~:~Prop\\
110 ~~R~:~Prop\\
111 ~~H~:~P~-{>}~Q~-{>}~R\\
112 ~~q~:~Q\\
113 ~~============================\\
114 ~~~\textcolor{blue}{P~-{>}~R}\\
115 \medskip
116 \textup{Coq~{<}}}
117 \only<6>{%
118 \textup{Coq~{<}~~~intro~q.}\\
119 1~subgoal\\
120 ~~\\
121 ~~P~:~Prop\\
122 ~~Q~:~Prop\\
123 ~~R~:~Prop\\
124 ~~H~:~P~-{>}~Q~-{>}~R\\
125 ~~q~:~Q\\
126 ~~============================\\
127 ~~~\textcolor{blue}{P~-{>}~R}\\
128 \medskip
129 \textup{Coq~{<}~~~intro~p.}}
130 \only<7>{%
131 \textup{Coq~{<}~~~intro~p.}\\
132 1~subgoal\\
133 ~~\\
134 ~~P~:~Prop\\
135 ~~Q~:~Prop\\
136 ~~R~:~Prop\\
137 ~~H~:~P~-{>}~Q~-{>}~R\\
138 ~~q~:~Q\\
139 ~~p~:~P\\
140 ~~============================\\
141 ~~~\textcolor{blue}{R}\\
142 \medskip
143 \textup{Coq~{<}}}
144 \only<8>{%
145 \textup{Coq~{<}~~~intro~p.}\\
146 1~subgoal\\
147 ~~\\
148 ~~P~:~Prop\\
149 ~~Q~:~Prop\\
150 ~~R~:~Prop\\
151 ~~H~:~P~-{>}~Q~-{>}~R\\
152 ~~q~:~Q\\
153 ~~p~:~P\\
154 ~~============================\\
155 ~~~\textcolor{blue}{R}\\
156 \medskip
157 \textup{Coq~{<}~~~apply~H.}}
158 \only<9>{%
159 \textup{Coq~{<}~~~apply~H.}\\
160 2~subgoals\\
161 ~~\\
162 ~~P~:~Prop\\
163 ~~Q~:~Prop\\
164 ~~R~:~Prop\\
165 ~~H~:~P~-{>}~Q~-{>}~R\\
166 ~~q~:~Q\\
167 ~~p~:~P\\
168 ~~============================\\
169 ~~~\textcolor{blue}{P}\\
170 subgoal~2~is:\\
171 ~\textcolor{blue}{Q}\\
172 \medskip
173 \textup{Coq~{<}}}
174 \only<10>{%
175 \textup{Coq~{<}~~~apply~H.}\\
176 2~subgoals\\
177 ~~\\
178 ~~P~:~Prop\\
179 ~~Q~:~Prop\\
180 ~~R~:~Prop\\
181 ~~H~:~P~-{>}~Q~-{>}~R\\
182 ~~q~:~Q\\
183 ~~p~:~P\\
184 ~~============================\\
185 ~~~\textcolor{blue}{P}\\
186 subgoal~2~is:\\
187 ~\textcolor{blue}{Q}\\
188 \medskip
189 \textup{Coq~{<}~~~assumption.}}
190 \only<11>{%
191 \textup{Coq~{<}~~~assumption.}\\
192 1~subgoal\\
193 ~~\\
194 ~~P~:~Prop\\
195 ~~Q~:~Prop\\
196 ~~R~:~Prop\\
197 ~~H~:~P~-{>}~Q~-{>}~R\\
198 ~~q~:~Q\\
199 ~~p~:~P\\
200 ~~============================\\
201 ~~~\textcolor{blue}{Q}\\
202 \medskip
203 \textup{Coq~{<}}}
204 \only<12>{%
205 \textup{Coq~{<}~~~assumption.}\\
206 1~subgoal\\
207 ~~\\
208 ~~P~:~Prop\\
209 ~~Q~:~Prop\\
210 ~~R~:~Prop\\
211 ~~H~:~P~-{>}~Q~-{>}~R\\
212 ~~q~:~Q\\
213 ~~p~:~P\\
214 ~~============================\\
215 ~~~\textcolor{blue}{Q}\\
216 \medskip
217 \textup{Coq~{<}~~~assumption.}}
218 \only<13>{%
219 \textup{Coq~{<}~~~assumption.}\\
220 Proof~completed.\\
221 \medskip
222 \textup{Coq~{<}}}
223 \only<14>{%
224 \textup{Coq~{<}~~~assumption.}\\
225 Proof~completed.\\
226 \medskip
227 \textup{Coq~{<}~Qed.}}
228 \only<15>{%
229 \textup{Coq~{<}~Qed.}\\
230 intro~H.\\
231 intro~q.\\
232 intro~p.\\
233 apply~H.\\
234 assumption.\\
235 assumption.\\
236 imp\_perm~is~defined\\
237 \medskip
238 \textup{Coq~{<}~}}
239 \end{overlayarea}
240 \end{block}
241 \begin{block}{}
242 %
243 % derivation tree
244 %
245 \begin{overprint}
246 \begin{gather*}
247 \only<1-2> {\drv{coq-sample.0}}
248 \only<3-4> {\drv{coq-sample.1}}
249 \only<5-6> {\drv{coq-sample.2}}
250 \only<7-8> {\drv{coq-sample.3}}
251 \only<9-10> {\drv{coq-sample.4}}
252 \only<11-12> {\drv{coq-sample.5}}
253 \only<13-15> {\drv{coq-sample.6}}
254 \end{gather*}
255 \end{overprint}
256 \end{block}
257 \end{frame}
258 \end{document}