equal
deleted
inserted
replaced
117 (fn a => "Name of recursive set not declared as constant: " ^ a); |
117 (fn a => "Name of recursive set not declared as constant: " ^ a); |
118 |
118 |
119 val intr_tms = map (term_of o rd propT) sintrs; |
119 val intr_tms = map (term_of o rd propT) sintrs; |
120 |
120 |
121 local (*Checking the introduction rules*) |
121 local (*Checking the introduction rules*) |
122 val intr_sets = map (#2 o rule_concl) intr_tms; |
122 val intr_sets = map (#2 o rule_concl_msg sign) intr_tms; |
123 |
123 |
124 fun intr_ok set = |
124 fun intr_ok set = |
125 case head_of set of Const(a,recT) => a mem rec_names | _ => false; |
125 case head_of set of Const(a,recT) => a mem rec_names | _ => false; |
126 |
126 |
127 val dummy = assert_all intr_ok intr_sets |
127 val dummy = assert_all intr_ok intr_sets |
152 | chk_prem rec_hd (Const("op :",_) $ t $ X) = |
152 | chk_prem rec_hd (Const("op :",_) $ t $ X) = |
153 deny (rec_hd occs t) "Recursion term on left of member symbol" |
153 deny (rec_hd occs t) "Recursion term on left of member symbol" |
154 | chk_prem rec_hd t = |
154 | chk_prem rec_hd t = |
155 deny (rec_hd occs t) "Recursion term in side formula"; |
155 deny (rec_hd occs t) "Recursion term in side formula"; |
156 |
156 |
|
157 fun dest_tprop (Const("Trueprop",_) $ P) = P |
|
158 | dest_tprop Q = error ("Ill-formed premise of introduction rule: " ^ |
|
159 Sign.string_of_term sign Q); |
|
160 |
157 (*Makes a disjunct from an introduction rule*) |
161 (*Makes a disjunct from an introduction rule*) |
158 fun lfp_part intr = (*quantify over rule's free vars except parameters*) |
162 fun lfp_part intr = (*quantify over rule's free vars except parameters*) |
159 let val prems = map dest_tprop (strip_imp_prems intr) |
163 let val prems = map dest_tprop (strip_imp_prems intr) |
160 val dummy = seq (fn rec_hd => seq (chk_prem rec_hd) prems) rec_hds |
164 val dummy = seq (fn rec_hd => seq (chk_prem rec_hd) prems) rec_hds |
161 val exfrees = term_frees intr \\ rec_params |
165 val exfrees = term_frees intr \\ rec_params |
211 val big_rec_def::part_rec_defs = defs; |
215 val big_rec_def::part_rec_defs = defs; |
212 |
216 |
213 val prove = prove_term (sign_of thy); |
217 val prove = prove_term (sign_of thy); |
214 |
218 |
215 (********) |
219 (********) |
216 val dummy = writeln "Proving monotonocity..."; |
220 val dummy = writeln "Proving monotonicity..."; |
217 |
221 |
218 val bnd_mono = |
222 val bnd_mono = |
219 prove [] (mk_tprop (Fp.bnd_mono $ dom_sum $ lfp_abs), |
223 prove [] (mk_tprop (Fp.bnd_mono $ dom_sum $ lfp_abs), |
220 fn _ => |
224 fn _ => |
221 [rtac (Collect_subset RS bnd_monoI) 1, |
225 [rtac (Collect_subset RS bnd_monoI) 1, |