equal
deleted
inserted
replaced
414 |
414 |
415 fun trace_thm msg th = |
415 fun trace_thm msg th = |
416 (if !trace then (tracing msg; tracing (Display.string_of_thm th)) else (); th); |
416 (if !trace then (tracing msg; tracing (Display.string_of_thm th)) else (); th); |
417 |
417 |
418 fun trace_term ctxt msg t = |
418 fun trace_term ctxt msg t = |
419 (if !trace then tracing (cat_lines [msg, ProofContext.string_of_term ctxt t]) else (); t) |
419 (if !trace then tracing (cat_lines [msg, Syntax.string_of_term ctxt t]) else (); t) |
420 |
420 |
421 fun trace_msg msg = |
421 fun trace_msg msg = |
422 if !trace then tracing msg else (); |
422 if !trace then tracing msg else (); |
423 |
423 |
424 (* FIXME OPTIMIZE!!!! (partly done already) |
424 (* FIXME OPTIMIZE!!!! (partly done already) |
560 case hist of |
560 case hist of |
561 [] => () |
561 [] => () |
562 | (v, lineqs) :: hist' => |
562 | (v, lineqs) :: hist' => |
563 let |
563 let |
564 val frees = map Free params |
564 val frees = map Free params |
565 fun show_term t = ProofContext.string_of_term ctxt (subst_bounds (frees, t)) |
565 fun show_term t = Syntax.string_of_term ctxt (subst_bounds (frees, t)) |
566 val start = |
566 val start = |
567 if v = ~1 then (hist', findex0 discr n lineqs) |
567 if v = ~1 then (hist', findex0 discr n lineqs) |
568 else (hist, replicate n Rat.zero) |
568 else (hist, replicate n Rat.zero) |
569 val ex = SOME (produce_ex (map show_term atoms ~~ discr) |
569 val ex = SOME (produce_ex (map show_term atoms ~~ discr) |
570 (uncurry (fold (findex1 discr)) start)) |
570 (uncurry (fold (findex1 discr)) start)) |