src/HOL/Tools/inductive_set.ML
changeset 33368 b1cf34f1855c
parent 33278 ba9f52f56356
child 33458 ae1f5d89b082
equal deleted inserted replaced
33367:2912bf1871ba 33368:b1cf34f1855c
   341     thm |>
   341     thm |>
   342     Thm.instantiate ([], insts) |>
   342     Thm.instantiate ([], insts) |>
   343     Simplifier.full_simplify (HOL_basic_ss addsimprocs
   343     Simplifier.full_simplify (HOL_basic_ss addsimprocs
   344       [to_pred_simproc (mem_Collect_eq :: split_conv :: to_pred_simps)]) |>
   344       [to_pred_simproc (mem_Collect_eq :: split_conv :: to_pred_simps)]) |>
   345     eta_contract_thm (is_pred pred_arities) |>
   345     eta_contract_thm (is_pred pred_arities) |>
   346     RuleCases.save thm
   346     Rule_Cases.save thm
   347   end;
   347   end;
   348 
   348 
   349 val to_pred_att = Thm.rule_attribute o to_pred;
   349 val to_pred_att = Thm.rule_attribute o to_pred;
   350     
   350     
   351 
   351 
   372   in
   372   in
   373     thm |>
   373     thm |>
   374     Thm.instantiate ([], insts) |>
   374     Thm.instantiate ([], insts) |>
   375     Simplifier.full_simplify (HOL_basic_ss addsimps to_set_simps
   375     Simplifier.full_simplify (HOL_basic_ss addsimps to_set_simps
   376         addsimprocs [strong_ind_simproc pred_arities, collect_mem_simproc]) |>
   376         addsimprocs [strong_ind_simproc pred_arities, collect_mem_simproc]) |>
   377     RuleCases.save thm
   377     Rule_Cases.save thm
   378   end;
   378   end;
   379 
   379 
   380 val to_set_att = Thm.rule_attribute o to_set;
   380 val to_set_att = Thm.rule_attribute o to_set;
   381 
   381 
   382 
   382 
   520     val raw_induct' = to_set [] (Context.Proof ctxt3) raw_induct;
   520     val raw_induct' = to_set [] (Context.Proof ctxt3) raw_induct;
   521     val (intrs', elims', induct, ctxt4) =
   521     val (intrs', elims', induct, ctxt4) =
   522       Inductive.declare_rules kind rec_name coind no_ind cnames
   522       Inductive.declare_rules kind rec_name coind no_ind cnames
   523       (map (to_set [] (Context.Proof ctxt3)) intrs) intr_names intr_atts
   523       (map (to_set [] (Context.Proof ctxt3)) intrs) intr_names intr_atts
   524       (map (fn th => (to_set [] (Context.Proof ctxt3) th,
   524       (map (fn th => (to_set [] (Context.Proof ctxt3) th,
   525          map fst (fst (RuleCases.get th)))) elims)
   525          map fst (fst (Rule_Cases.get th)))) elims)
   526       raw_induct' ctxt3
   526       raw_induct' ctxt3
   527   in
   527   in
   528     ({intrs = intrs', elims = elims', induct = induct,
   528     ({intrs = intrs', elims = elims', induct = induct,
   529       raw_induct = raw_induct', preds = map fst defs},
   529       raw_induct = raw_induct', preds = map fst defs},
   530      ctxt4)
   530      ctxt4)