equal
deleted
inserted
replaced
1241 ? map_types (map_type_tvar freeze_tvar) |
1241 ? map_types (map_type_tvar freeze_tvar) |
1242 end |
1242 end |
1243 |
1243 |
1244 fun presimp_prop ctxt type_enc t = |
1244 fun presimp_prop ctxt type_enc t = |
1245 let |
1245 let |
1246 val thy = Proof_Context.theory_of ctxt |
|
1247 val t = t |> Envir.beta_eta_contract |
1246 val t = t |> Envir.beta_eta_contract |
1248 |> transform_elim_prop |
1247 |> transform_elim_prop |
1249 |> Object_Logic.atomize_term thy |
1248 |> Object_Logic.atomize_term ctxt |
1250 val need_trueprop = (fastype_of t = @{typ bool}) |
1249 val need_trueprop = (fastype_of t = @{typ bool}) |
1251 val is_ho = is_type_enc_higher_order type_enc |
1250 val is_ho = is_type_enc_higher_order type_enc |
1252 in |
1251 in |
1253 t |> need_trueprop ? HOLogic.mk_Trueprop |
1252 t |> need_trueprop ? HOLogic.mk_Trueprop |
1254 |> (if is_ho then unextensionalize_def |
1253 |> (if is_ho then unextensionalize_def |