src/HOL/Tools/Ctr_Sugar/ctr_sugar.ML
changeset 58289 eb93bc67d361
parent 58284 f9b6af3017fd
child 58317 21fac057681e
equal deleted inserted replaced
58288:87b59745dd6d 58289:eb93bc67d361
   289     Long_Name.map_base_name (prefix notN) (name_of_disc t')
   289     Long_Name.map_base_name (prefix notN) (name_of_disc t')
   290   | Abs (_, _, Const (@{const_name HOL.eq}, _) $ Bound 0 $ t') =>
   290   | Abs (_, _, Const (@{const_name HOL.eq}, _) $ Bound 0 $ t') =>
   291     Long_Name.map_base_name (prefix isN) (name_of_disc t')
   291     Long_Name.map_base_name (prefix isN) (name_of_disc t')
   292   | Abs (_, _, @{const Not} $ (Const (@{const_name HOL.eq}, _) $ Bound 0 $ t')) =>
   292   | Abs (_, _, @{const Not} $ (Const (@{const_name HOL.eq}, _) $ Bound 0 $ t')) =>
   293     Long_Name.map_base_name (prefix (notN ^ isN)) (name_of_disc t')
   293     Long_Name.map_base_name (prefix (notN ^ isN)) (name_of_disc t')
   294   | t' => name_of_const "discriminator" domain_type t');
   294   | t' => name_of_const "discriminator" (perhaps (try domain_type)) t');
   295 
   295 
   296 val base_name_of_ctr = Long_Name.base_name o name_of_ctr;
   296 val base_name_of_ctr = Long_Name.base_name o name_of_ctr;
   297 
   297 
   298 fun dest_ctr ctxt s t =
   298 fun dest_ctr ctxt s t =
   299   let val (f, args) = Term.strip_comb t in
   299   let val (f, args) = Term.strip_comb t in