equal
deleted
inserted
replaced
95 |
95 |
96 fun import [] ctxt = ([], ctxt) |
96 fun import [] ctxt = ([], ctxt) |
97 | import (thm :: thms) ctxt = |
97 | import (thm :: thms) ctxt = |
98 let |
98 let |
99 val fun_ct = strip_eq #> fst #> strip_comb #> fst #> Logic.mk_term |
99 val fun_ct = strip_eq #> fst #> strip_comb #> fst #> Logic.mk_term |
100 #> Proof_Context.cterm_of ctxt |
100 #> Thm.cterm_of ctxt |
101 val ct = fun_ct thm |
101 val ct = fun_ct thm |
102 val cts = map fun_ct thms |
102 val cts = map fun_ct thms |
103 val pairs = map (fn s => (s,ct)) cts |
103 val pairs = map (fn s => (s,ct)) cts |
104 val thms' = map (fn (th,p) => Thm.instantiate (Thm.match p) th) (thms ~~ pairs) |
104 val thms' = map (fn (th,p) => Thm.instantiate (Thm.match p) th) (thms ~~ pairs) |
105 in Variable.import true (thm :: thms') ctxt |> apfst snd end |
105 in Variable.import true (thm :: thms') ctxt |> apfst snd end |