src/Pure/drule.ML
changeset 23439 8c7da8649f2f
parent 23423 b2d64f86d21b
child 23537 ecf487dce798
equal deleted inserted replaced
23438:dd824e86fa8a 23439:8c7da8649f2f
   363 
   363 
   364 (*Squash a theorem's flexflex constraints provided it can be done uniquely.
   364 (*Squash a theorem's flexflex constraints provided it can be done uniquely.
   365   This step can lose information.*)
   365   This step can lose information.*)
   366 fun flexflex_unique th =
   366 fun flexflex_unique th =
   367   if null (tpairs_of th) then th else
   367   if null (tpairs_of th) then th else
   368     case Seq.chop 2 (flexflex_rule th) of
   368     case distinct Thm.eq_thm (Seq.list_of (flexflex_rule th)) of
   369       ([th],_) => th
   369       [th] => th
   370     | ([],_)   => raise THM("flexflex_unique: impossible constraints", 0, [th])
   370     | []   => raise THM("flexflex_unique: impossible constraints", 0, [th])
   371     |      _   => raise THM("flexflex_unique: multiple unifiers", 0, [th]);
   371     |  _   => raise THM("flexflex_unique: multiple unifiers", 0, [th]);
   372 
   372 
   373 fun close_derivation thm =
   373 fun close_derivation thm =
   374   if Thm.get_name thm = "" then Thm.put_name "" thm
   374   if Thm.get_name thm = "" then Thm.put_name "" thm
   375   else thm;
   375   else thm;
   376 
   376