equal
deleted
inserted
replaced
371 val forall_elim_vars = PureThy.forall_elim_vars; |
371 val forall_elim_vars = PureThy.forall_elim_vars; |
372 |
372 |
373 fun outer_params t = |
373 fun outer_params t = |
374 let |
374 let |
375 val vs = Term.strip_all_vars t; |
375 val vs = Term.strip_all_vars t; |
376 val clean_name = perhaps (try Syntax.dest_skolem) #> perhaps (try Syntax.dest_internal); |
376 val clean_name = perhaps (try Term.dest_skolem) #> perhaps (try Term.dest_internal); |
377 in Term.variantlist (map (clean_name o #1) vs, []) ~~ map #2 vs end; |
377 in Term.variantlist (map (clean_name o #1) vs, []) ~~ map #2 vs end; |
378 |
378 |
379 (*generalize outermost parameters*) |
379 (*generalize outermost parameters*) |
380 fun gen_all th = |
380 fun gen_all th = |
381 let |
381 let |
1086 fun tvars_intr_list tfrees thm = |
1086 fun tvars_intr_list tfrees thm = |
1087 apfst (map (fn ((s, S), ixn) => (s, (ixn, S)))) (Thm.varifyT' |
1087 apfst (map (fn ((s, S), ixn) => (s, (ixn, S)))) (Thm.varifyT' |
1088 (gen_rems (op = o apfst fst) (tfrees_of thm, tfrees)) thm); |
1088 (gen_rems (op = o apfst fst) (tfrees_of thm, tfrees)) thm); |
1089 |
1089 |
1090 |
1090 |
1091 (* increment var indexes *) |
1091 (* var indexes *) |
1092 |
1092 |
1093 fun incr_indexes th = Thm.incr_indexes (Thm.maxidx_of th + 1); |
1093 fun incr_indexes th = Thm.incr_indexes (Thm.maxidx_of th + 1); |
1094 |
1094 |
1095 fun incr_indexes2 th1 th2 = |
1095 fun incr_indexes2 th1 th2 = |
1096 Thm.incr_indexes (Int.max (Thm.maxidx_of th1, Thm.maxidx_of th2) + 1); |
1096 Thm.incr_indexes (Int.max (Thm.maxidx_of th1, Thm.maxidx_of th2) + 1); |