equal
deleted
inserted
replaced
1072 end |
1072 end |
1073 *} |
1073 *} |
1074 |
1074 |
1075 |
1075 |
1076 ML {* |
1076 ML {* |
1077 fun lift_thm lthy qty qty_name rsp_thms defs rthm = let |
1077 fun lift_thm lthy qty qty_name rsp_thms defs rthm = |
|
1078 let |
1078 val _ = tracing ("raw theorem:\n" ^ Syntax.string_of_term lthy (prop_of rthm)) |
1079 val _ = tracing ("raw theorem:\n" ^ Syntax.string_of_term lthy (prop_of rthm)) |
1079 |
1080 |
1080 val (rty, rel, rel_refl, rel_eqv) = lookup_quot_data lthy qty; |
1081 val (rty, rel, rel_refl, rel_eqv) = lookup_quot_data lthy qty; |
1081 val (trans2, reps_same, absrep, quot) = lookup_quot_thms lthy qty_name; |
1082 val (trans2, reps_same, absrep, quot) = lookup_quot_thms lthy qty_name; |
1082 val consts = lookup_quot_consts defs; |
1083 val consts = lookup_quot_consts defs; |
1131 in |
1132 in |
1132 Thm.varifyT t_rv |
1133 Thm.varifyT t_rv |
1133 end |
1134 end |
1134 *} |
1135 *} |
1135 |
1136 |
1136 |
|
1137 ML {* |
1137 ML {* |
1138 fun lift_thm_note qty qty_name rsp_thms defs thm name lthy = |
1138 fun lift_thm_note qty qty_name rsp_thms defs thm name lthy = |
1139 let |
1139 let |
1140 val lifted_thm = lift_thm lthy qty qty_name rsp_thms defs thm; |
1140 val lifted_thm = lift_thm lthy qty qty_name rsp_thms defs thm; |
1141 val (_, lthy2) = note (name, lifted_thm) lthy; |
1141 val (_, lthy2) = note (name, lifted_thm) lthy; |
1142 in |
1142 in |
1143 lthy2 |
1143 lthy2 |
1144 end |
1144 end |
1145 *} |
1145 *} |
1146 |
1146 |
1147 |
1147 ML {* |
1148 |
1148 fun my_lift qtrm rthm lthy = |
|
1149 let |
|
1150 val thy = ProofContext.theory_of lthy |
|
1151 |
|
1152 val a_rthm = atomize_thm rthm |
|
1153 val a_qtrm = ObjectLogic.atomize_term thy qtrm |
|
1154 |
|
1155 val _ = Syntax.string_of_term lthy (prop_of a_rthm) |> writeln |
|
1156 val _ = Syntax.string_of_term lthy a_qtrm |> writeln |
|
1157 in |
|
1158 (a_rthm, a_qtrm) |
1149 end |
1159 end |
1150 |
1160 *} |
|
1161 |
|
1162 end |
|
1163 |