src/HOL/Nominal/nominal_inductive.ML
changeset 24571 a6d0428dea8e
parent 24570 621b60b1df00
child 24712 64ed05609568
equal deleted inserted replaced
24570:621b60b1df00 24571:a6d0428dea8e
   145     val ctxt = ProofContext.init thy;
   145     val ctxt = ProofContext.init thy;
   146     val ({names, ...}, {raw_induct, ...}) =
   146     val ({names, ...}, {raw_induct, ...}) =
   147       InductivePackage.the_inductive ctxt (Sign.intern_const thy s);
   147       InductivePackage.the_inductive ctxt (Sign.intern_const thy s);
   148     val raw_induct = atomize_induct raw_induct;
   148     val raw_induct = atomize_induct raw_induct;
   149     val monos = InductivePackage.get_monos ctxt;
   149     val monos = InductivePackage.get_monos ctxt;
   150     val eqvt_thms = NominalThmDecls.get_eqvt_thms thy;
   150     val eqvt_thms = NominalThmDecls.get_eqvt_thms ctxt;
   151     val _ = (case names \\ foldl (apfst prop_of #> add_term_consts) [] eqvt_thms of
   151     val _ = (case names \\ foldl (apfst prop_of #> add_term_consts) [] eqvt_thms of
   152         [] => ()
   152         [] => ()
   153       | xs => error ("Missing equivariance theorem for predicate(s): " ^
   153       | xs => error ("Missing equivariance theorem for predicate(s): " ^
   154           commas_quote xs));
   154           commas_quote xs));
   155     val induct_cases = map fst (fst (RuleCases.get (the
   155     val induct_cases = map fst (fst (RuleCases.get (the
   459            | xs => error ("No such atoms: " ^ commas xs);
   459            | xs => error ("No such atoms: " ^ commas xs);
   460          atoms)
   460          atoms)
   461       end;
   461       end;
   462     val perm_pi_simp = PureThy.get_thms thy (Name "perm_pi_simp");
   462     val perm_pi_simp = PureThy.get_thms thy (Name "perm_pi_simp");
   463     val eqvt_ss = HOL_basic_ss addsimps
   463     val eqvt_ss = HOL_basic_ss addsimps
   464       (NominalThmDecls.get_eqvt_thms thy @ perm_pi_simp) addsimprocs
   464       (NominalThmDecls.get_eqvt_thms ctxt @ perm_pi_simp) addsimprocs
   465       [mk_perm_bool_simproc names];
   465       [mk_perm_bool_simproc names];
   466     val t = Logic.unvarify (concl_of raw_induct);
   466     val t = Logic.unvarify (concl_of raw_induct);
   467     val pi = Name.variant (add_term_names (t, [])) "pi";
   467     val pi = Name.variant (add_term_names (t, [])) "pi";
   468     val ps = map (fst o HOLogic.dest_imp)
   468     val ps = map (fst o HOLogic.dest_imp)
   469       (HOLogic.dest_conj (HOLogic.dest_Trueprop t));
   469       (HOLogic.dest_conj (HOLogic.dest_Trueprop t));