equal
deleted
inserted
replaced
29 val Goal: string -> thm list |
29 val Goal: string -> thm list |
30 val Goalw: thm list -> string -> thm list |
30 val Goalw: thm list -> string -> thm list |
31 val by: tactic -> unit |
31 val by: tactic -> unit |
32 val back: unit -> unit |
32 val back: unit -> unit |
33 val choplev: int -> unit |
33 val choplev: int -> unit |
34 val chop: unit -> unit |
|
35 val undo: unit -> unit |
34 val undo: unit -> unit |
36 val bind_thm: string * thm -> unit |
35 val bind_thm: string * thm -> unit |
37 val bind_thms: string * thm list -> unit |
36 val bind_thms: string * thm list -> unit |
38 val qed: string -> unit |
37 val qed: string -> unit |
39 val qed_goal: string -> theory -> string -> (thm list -> tactic list) -> unit |
38 val qed_goal: string -> theory -> string -> (thm list -> tactic list) -> unit |
42 val qed_spec_mp: string -> unit |
41 val qed_spec_mp: string -> unit |
43 val qed_goal_spec_mp: string -> theory -> string -> (thm list -> tactic list) -> unit |
42 val qed_goal_spec_mp: string -> theory -> string -> (thm list -> tactic list) -> unit |
44 val qed_goalw_spec_mp: string -> theory -> thm list -> string |
43 val qed_goalw_spec_mp: string -> theory -> thm list -> string |
45 -> (thm list -> tactic list) -> unit |
44 -> (thm list -> tactic list) -> unit |
46 val no_qed: unit -> unit |
45 val no_qed: unit -> unit |
47 val thms_containing: xstring list -> (string * thm) list |
|
48 end; |
46 end; |
49 |
47 |
50 signature OLD_GOALS = |
48 signature OLD_GOALS = |
51 sig |
49 sig |
52 include GOALS |
50 include GOALS |
53 val legacy: bool ref |
51 val legacy: bool ref |
54 type proof |
52 type proof |
|
53 val chop: unit -> unit |
55 val reset_goals: unit -> unit |
54 val reset_goals: unit -> unit |
56 val result_error_fn: (thm -> string -> thm) ref |
55 val result_error_fn: (thm -> string -> thm) ref |
57 val print_sign_exn: theory -> exn -> 'a |
56 val print_sign_exn: theory -> exn -> 'a |
58 val prove_goalw_cterm: thm list->cterm->(thm list->tactic list)->thm |
57 val prove_goalw_cterm: thm list->cterm->(thm list->tactic list)->thm |
59 val prove_goalw_cterm_nocheck: thm list->cterm->(thm list->tactic list)->thm |
58 val prove_goalw_cterm_nocheck: thm list->cterm->(thm list->tactic list)->thm |
500 fun fd rl = fds [rl]; |
499 fun fd rl = fds [rl]; |
501 |
500 |
502 fun fa() = by (FIRSTGOAL (trace_goalno_tac assume_tac)); |
501 fun fa() = by (FIRSTGOAL (trace_goalno_tac assume_tac)); |
503 |
502 |
504 |
503 |
505 (** theorem database operations **) |
504 (** theorem database **) |
506 |
|
507 (* store *) |
|
508 |
505 |
509 fun bind_thm (name, thm) = ThmDatabase.ml_store_thm (name, standard thm); |
506 fun bind_thm (name, thm) = ThmDatabase.ml_store_thm (name, standard thm); |
510 fun bind_thms (name, thms) = ThmDatabase.ml_store_thms (name, map standard thms); |
507 fun bind_thms (name, thms) = ThmDatabase.ml_store_thms (name, map standard thms); |
511 |
508 |
512 fun qed name = ThmDatabase.ml_store_thm (name, result ()); |
509 fun qed name = ThmDatabase.ml_store_thm (name, result ()); |
520 fun qed_goalw_spec_mp name thy defs s p = |
517 fun qed_goalw_spec_mp name thy defs s p = |
521 bind_thm (name, ObjectLogic.rulify_no_asm (prove_goalw thy defs s p)); |
518 bind_thm (name, ObjectLogic.rulify_no_asm (prove_goalw thy defs s p)); |
522 |
519 |
523 fun no_qed () = (); |
520 fun no_qed () = (); |
524 |
521 |
525 |
|
526 (* retrieve *) |
|
527 |
|
528 fun thms_containing raw_consts = |
|
529 let |
|
530 val thy = Thm.theory_of_thm (topthm ()); |
|
531 val consts = map (Sign.intern_const thy) raw_consts; |
|
532 in |
|
533 (case List.filter (is_none o Sign.const_type thy) consts of |
|
534 [] => () |
|
535 | cs => error ("thms_containing: undeclared consts " ^ commas_quote cs)); |
|
536 PureThy.thms_containing_consts thy consts |
|
537 end; |
|
538 |
|
539 end; |
522 end; |
540 |
523 |
541 structure Goals: GOALS = OldGoals; |
524 structure Goals: GOALS = OldGoals; |
542 open Goals; |
525 open Goals; |