181 val intr_ts = maps (fn ((_, (_, _, constrs)), rep_set_name) => |
181 val intr_ts = maps (fn ((_, (_, _, constrs)), rep_set_name) => |
182 map (make_intr rep_set_name (length constrs)) |
182 map (make_intr rep_set_name (length constrs)) |
183 ((1 upto (length constrs)) ~~ constrs)) (descr' ~~ rep_set_names'); |
183 ((1 upto (length constrs)) ~~ constrs)) (descr' ~~ rep_set_names'); |
184 |
184 |
185 val ({raw_induct = rep_induct, intrs = rep_intrs, ...}, thy2) = |
185 val ({raw_induct = rep_induct, intrs = rep_intrs, ...}, thy2) = |
186 InductivePackage.add_inductive_global (serial_string ()) |
186 Inductive.add_inductive_global (serial_string ()) |
187 {quiet_mode = #quiet config, verbose = false, kind = Thm.internalK, |
187 {quiet_mode = #quiet config, verbose = false, kind = Thm.internalK, |
188 alt_name = Binding.name big_rec_name, coind = false, no_elim = true, no_ind = false, |
188 alt_name = Binding.name big_rec_name, coind = false, no_elim = true, no_ind = false, |
189 skip_mono = true, fork_mono = false} |
189 skip_mono = true, fork_mono = false} |
190 (map (fn s => ((Binding.name s, UnivT'), NoSyn)) rep_set_names') [] |
190 (map (fn s => ((Binding.name s, UnivT'), NoSyn)) rep_set_names') [] |
191 (map (fn x => (Attrib.empty_binding, x)) intr_ts) [] thy1; |
191 (map (fn x => (Attrib.empty_binding, x)) intr_ts) [] thy1; |
193 (********************************* typedef ********************************) |
193 (********************************* typedef ********************************) |
194 |
194 |
195 val (typedefs, thy3) = thy2 |> |
195 val (typedefs, thy3) = thy2 |> |
196 parent_path (#flat_names config) |> |
196 parent_path (#flat_names config) |> |
197 fold_map (fn ((((name, mx), tvs), c), name') => |
197 fold_map (fn ((((name, mx), tvs), c), name') => |
198 TypedefPackage.add_typedef false (SOME (Binding.name name')) (name, tvs, mx) |
198 Typedef.add_typedef false (SOME (Binding.name name')) (name, tvs, mx) |
199 (Collect $ Const (c, UnivT')) NONE |
199 (Collect $ Const (c, UnivT')) NONE |
200 (rtac exI 1 THEN rtac CollectI 1 THEN |
200 (rtac exI 1 THEN rtac CollectI 1 THEN |
201 QUIET_BREADTH_FIRST (has_fewer_prems 1) |
201 QUIET_BREADTH_FIRST (has_fewer_prems 1) |
202 (resolve_tac rep_intrs 1))) |
202 (resolve_tac rep_intrs 1))) |
203 (types_syntax ~~ tyvars ~~ |
203 (types_syntax ~~ tyvars ~~ |