equal
deleted
inserted
replaced
115 subsection {* Lemmas and proof tools *} |
115 subsection {* Lemmas and proof tools *} |
116 |
116 |
117 setup Simplifier.setup |
117 setup Simplifier.setup |
118 use "IFOL_lemmas.ML" |
118 use "IFOL_lemmas.ML" |
119 |
119 |
120 declare impE [Pure.elim] iffD1 [Pure.elim] iffD2 [Pure.elim] |
120 declare impE [Pure.elim?] iffD1 [Pure.elim?] iffD2 [Pure.elim?] |
121 |
121 |
122 use "fologic.ML" |
122 use "fologic.ML" |
123 use "hypsubstdata.ML" |
123 use "hypsubstdata.ML" |
124 setup hypsubst_setup |
124 setup hypsubst_setup |
125 use "intprover.ML" |
125 use "intprover.ML" |
|
126 |
|
127 |
|
128 lemma impE': |
|
129 (assumes 1: "P --> Q" and 2: "Q ==> R" and 3: "P --> Q ==> P") R |
|
130 proof - |
|
131 from 3 and 1 have P . |
|
132 with 1 have Q .. |
|
133 with 2 show R . |
|
134 qed |
|
135 |
|
136 lemma allE': |
|
137 (assumes 1: "ALL x. P(x)" and 2: "P(x) ==> ALL x. P(x) ==> Q") Q |
|
138 proof - |
|
139 from 1 have "P(x)" by (rule spec) |
|
140 from this and 1 show Q by (rule 2) |
|
141 qed |
|
142 |
|
143 lemma notE': (assumes 1: "~ P" and 2: "~ P ==> P") R |
|
144 proof - |
|
145 from 2 and 1 have P . |
|
146 with 1 show R by (rule notE) |
|
147 qed |
|
148 |
|
149 lemmas [Pure.elim!] = disjE iffE FalseE conjE exE |
|
150 and [Pure.intro!] = iffI conjI impI TrueI notI allI refl |
|
151 and [Pure.elim 2] = allE notE' impE' |
|
152 and [Pure.intro] = exI disjI2 disjI1 |
|
153 |
|
154 ML_setup {* |
|
155 Context.>> (RuleContext.addSWrapper (fn tac => hyp_subst_tac' ORELSE' tac)); |
|
156 *} |
126 |
157 |
127 |
158 |
128 subsection {* Atomizing meta-level rules *} |
159 subsection {* Atomizing meta-level rules *} |
129 |
160 |
130 lemma atomize_all [atomize]: "(!!x. P(x)) == Trueprop (ALL x. P(x))" |
161 lemma atomize_all [atomize]: "(!!x. P(x)) == Trueprop (ALL x. P(x))" |
189 back_subst |
220 back_subst |
190 rev_mp |
221 rev_mp |
191 mp |
222 mp |
192 trans |
223 trans |
193 |
224 |
194 lemmas [Pure.elim] = sym |
225 lemmas [Pure.elim?] = sym |
195 |
226 |
196 end |
227 end |