equal
deleted
inserted
replaced
24 datatype |
24 datatype |
25 'a pl = false | var 'a ("#_" [1000]) | "->" "'a pl" "'a pl" (infixr 90) |
25 'a pl = false | var 'a ("#_" [1000]) | "->" "'a pl" "'a pl" (infixr 90) |
26 |
26 |
27 subsection {* The proof system *} |
27 subsection {* The proof system *} |
28 |
28 |
29 consts |
29 inductive |
30 thms :: "'a pl set => 'a pl set" |
30 thms :: "['a pl set, 'a pl] => bool" (infixl "|-" 50) |
31 |
31 for H :: "'a pl set" |
32 abbreviation |
32 where |
33 thm_rel :: "['a pl set, 'a pl] => bool" (infixl "|-" 50) where |
33 H [intro]: "p\<in>H ==> H |- p" |
34 "H |- p == p \<in> thms H" |
34 | K: "H |- p->q->p" |
35 |
35 | S: "H |- (p->q->r) -> (p->q) -> p->r" |
36 inductive "thms(H)" |
36 | DN: "H |- ((p->false) -> false) -> p" |
37 intros |
37 | MP: "[| H |- p->q; H |- p |] ==> H |- q" |
38 H [intro]: "p\<in>H ==> H |- p" |
|
39 K: "H |- p->q->p" |
|
40 S: "H |- (p->q->r) -> (p->q) -> p->r" |
|
41 DN: "H |- ((p->false) -> false) -> p" |
|
42 MP: "[| H |- p->q; H |- p |] ==> H |- q" |
|
43 |
38 |
44 subsection {* The semantics *} |
39 subsection {* The semantics *} |
45 |
40 |
46 subsubsection {* Semantics of propositional logic. *} |
41 subsubsection {* Semantics of propositional logic. *} |
47 |
42 |
78 |
73 |
79 |
74 |
80 subsection {* Proof theory of propositional logic *} |
75 subsection {* Proof theory of propositional logic *} |
81 |
76 |
82 lemma thms_mono: "G<=H ==> thms(G) <= thms(H)" |
77 lemma thms_mono: "G<=H ==> thms(G) <= thms(H)" |
83 apply (unfold thms.defs ) |
78 apply (rule predicate1I) |
84 apply (rule lfp_mono) |
79 apply (erule thms.induct) |
85 apply (assumption | rule basic_monos)+ |
80 apply (auto intro: thms.intros) |
86 done |
81 done |
87 |
82 |
88 lemma thms_I: "H |- p->p" |
83 lemma thms_I: "H |- p->p" |
89 -- {*Called @{text I} for Identity Combinator, not for Introduction. *} |
84 -- {*Called @{text I} for Identity Combinator, not for Introduction. *} |
90 by (best intro: thms.K thms.S thms.MP) |
85 by (best intro: thms.K thms.S thms.MP) |
92 |
87 |
93 subsubsection {* Weakening, left and right *} |
88 subsubsection {* Weakening, left and right *} |
94 |
89 |
95 lemma weaken_left: "[| G \<subseteq> H; G|-p |] ==> H|-p" |
90 lemma weaken_left: "[| G \<subseteq> H; G|-p |] ==> H|-p" |
96 -- {* Order of premises is convenient with @{text THEN} *} |
91 -- {* Order of premises is convenient with @{text THEN} *} |
97 by (erule thms_mono [THEN subsetD]) |
92 by (erule thms_mono [THEN predicate1D]) |
98 |
93 |
99 lemmas weaken_left_insert = subset_insertI [THEN weaken_left] |
94 lemmas weaken_left_insert = subset_insertI [THEN weaken_left] |
100 |
95 |
101 lemmas weaken_left_Un1 = Un_upper1 [THEN weaken_left] |
96 lemmas weaken_left_Un1 = Un_upper1 [THEN weaken_left] |
102 lemmas weaken_left_Un2 = Un_upper2 [THEN weaken_left] |
97 lemmas weaken_left_Un2 = Un_upper2 [THEN weaken_left] |