equal
deleted
inserted
replaced
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 |