File: Example.thy

package info (click to toggle)
proofgeneral 3.7-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 9,328 kB
  • ctags: 4,317
  • sloc: lisp: 49,786; makefile: 466; sh: 339; perl: 205; ansic: 43
file content (42 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (2)
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
(*
      Example proof document for Isabelle/Isar Proof General.
   
      Example.thy,v 9.0 2008/01/30 15:22:18 da Exp
*)

theory Example imports Main begin

text {* Proper proof text -- \textit{naive version}. *}

theorem and_comms: "A & B --> B & A"
proof
  assume "A & B"
  then show "B & A"
  proof
    assume B and A
    then
   show ?thesis ..
 qed
qed

text {* Proper proof text -- \textit{advanced version}. *}

theorem "A & B --> B & A"
proof
  assume "A & B"
  then obtain B and A ..
  then show "B & A" ..
qed


text {* Unstructured proof script. *}

theorem "A & B --> B & A"
  apply (rule impI)
  apply (erule conjE)
  apply (rule conjI)
  apply assumption
  apply assumption
done

end