src/Pure/Isar/locale.ML
changeset 18358 0a733e11021a
parent 18343 e36238ac5359
child 18377 0e1d025d57b3
equal deleted inserted replaced
18357:c5030cdbf8da 18358:0a733e11021a
  1587 
  1587 
  1588     val args = map Logic.mk_type extraTs @ map Free xs;
  1588     val args = map Logic.mk_type extraTs @ map Free xs;
  1589     val head = Term.list_comb (Const (name, predT), args);
  1589     val head = Term.list_comb (Const (name, predT), args);
  1590     val statement = ObjectLogic.ensure_propT thy head;
  1590     val statement = ObjectLogic.ensure_propT thy head;
  1591 
  1591 
  1592     val (defs_thy, [pred_def]) =
  1592     val ([pred_def], defs_thy) =
  1593       thy
  1593       thy
  1594       |> (if bodyT <> propT then I else
  1594       |> (if bodyT <> propT then I else
  1595         Theory.add_trfuns ([], [], map (aprop_tr' (length args)) (NameSpace.accesses' name), []))
  1595         Theory.add_trfuns ([], [], map (aprop_tr' (length args)) (NameSpace.accesses' name), []))
  1596       |> Theory.add_consts_i [(bname, predT, Syntax.NoSyn)]
  1596       |> Theory.add_consts_i [(bname, predT, Syntax.NoSyn)]
  1597       |> PureThy.add_defs_i false [((Thm.def_name bname, Logic.mk_equals (head, body)), [])];
  1597       |> PureThy.add_defs_i false [((Thm.def_name bname, Logic.mk_equals (head, body)), [])];