154 val _ = warning "Obsolete goal command encountered"; |
154 val _ = warning "Obsolete goal command encountered"; |
155 val {thy, t=horn,...} = rep_cterm chorn; |
155 val {thy, t=horn,...} = rep_cterm chorn; |
156 val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg; |
156 val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg; |
157 val (As, B) = Logic.strip_horn horn; |
157 val (As, B) = Logic.strip_horn horn; |
158 val atoms = atomic andalso |
158 val atoms = atomic andalso |
159 forall (fn t => not(Logic.is_implies t orelse Logic.is_all t)) As; |
159 forall (fn t => not (can Logic.dest_implies t orelse Logic.is_all t)) As; |
160 val (As,B) = if atoms then ([],horn) else (As,B); |
160 val (As,B) = if atoms then ([],horn) else (As,B); |
161 val cAs = map (cterm_of thy) As; |
161 val cAs = map (cterm_of thy) As; |
162 val prems = map (rewrite_rule rths o forall_elim_vars 0 o Thm.assume) cAs; |
162 val prems = map (rewrite_rule rths o forall_elim_vars 0 o Thm.assume) cAs; |
163 val cB = cterm_of thy B; |
163 val cB = cterm_of thy B; |
164 val st0 = let val st = Goal.init cB |> fold Thm.weaken cAs |
164 val st0 = let val st = Goal.init cB |> fold Thm.weaken cAs |