equal
deleted
inserted
replaced
545 end |
545 end |
546 end |
546 end |
547 |
547 |
548 fun rename_to_tnames ctxt term = |
548 fun rename_to_tnames ctxt term = |
549 let |
549 let |
550 fun all_typs (Const ("all", _) $ Abs (_, T, t)) = T :: all_typs t |
550 fun all_typs (Const (@{const_name Pure.all}, _) $ Abs (_, T, t)) = T :: all_typs t |
551 | all_typs _ = [] |
551 | all_typs _ = [] |
552 |
552 |
553 fun rename (Const ("all", T1) $ Abs (_, T2, t)) (new_name :: names) = |
553 fun rename (Const (@{const_name Pure.all}, T1) $ Abs (_, T2, t)) (new_name :: names) = |
554 (Const ("all", T1) $ Abs (new_name, T2, rename t names)) |
554 (Const (@{const_name Pure.all}, T1) $ Abs (new_name, T2, rename t names)) |
555 | rename t _ = t |
555 | rename t _ = t |
556 |
556 |
557 val (fixed_def_t, _) = yield_singleton (Variable.importT_terms) term ctxt |
557 val (fixed_def_t, _) = yield_singleton (Variable.importT_terms) term ctxt |
558 val new_names = Datatype_Prop.make_tnames (all_typs fixed_def_t) |
558 val new_names = Datatype_Prop.make_tnames (all_typs fixed_def_t) |
559 in |
559 in |