equal
deleted
inserted
replaced
39 |
39 |
40 val get_rules = #1 o Data.get o Context.Proof; |
40 val get_rules = #1 o Data.get o Context.Proof; |
41 |
41 |
42 fun print_rules ctxt = |
42 fun print_rules ctxt = |
43 let |
43 let |
44 val pretty_thm = Display.pretty_thm_item ctxt; |
44 val pretty_thm = Thm.pretty_thm_item ctxt; |
45 val (trans, sym) = get_rules ctxt; |
45 val (trans, sym) = get_rules ctxt; |
46 in |
46 in |
47 [Pretty.big_list "transitivity rules:" (map pretty_thm (Item_Net.content trans)), |
47 [Pretty.big_list "transitivity rules:" (map pretty_thm (Item_Net.content trans)), |
48 Pretty.big_list "symmetry rules:" (map pretty_thm sym)] |
48 Pretty.big_list "symmetry rules:" (map pretty_thm sym)] |
49 end |> Pretty.writeln_chunks; |
49 end |> Pretty.writeln_chunks; |
135 (* also and finally *) |
135 (* also and finally *) |
136 |
136 |
137 fun calculate prep_rules final raw_rules int state = |
137 fun calculate prep_rules final raw_rules int state = |
138 let |
138 let |
139 val ctxt = Proof.context_of state; |
139 val ctxt = Proof.context_of state; |
140 val pretty_thm = Display.pretty_thm ctxt; |
140 val pretty_thm = Thm.pretty_thm ctxt; |
141 val pretty_thm_item = Display.pretty_thm_item ctxt; |
141 val pretty_thm_item = Thm.pretty_thm_item ctxt; |
142 |
142 |
143 val strip_assums_concl = Logic.strip_assums_concl o Thm.prop_of; |
143 val strip_assums_concl = Logic.strip_assums_concl o Thm.prop_of; |
144 val eq_prop = op aconv o apply2 (Envir.beta_eta_contract o strip_assums_concl); |
144 val eq_prop = op aconv o apply2 (Envir.beta_eta_contract o strip_assums_concl); |
145 fun check_projection ths th = |
145 fun check_projection ths th = |
146 (case find_index (curry eq_prop th) ths of |
146 (case find_index (curry eq_prop th) ths of |