equal
deleted
inserted
replaced
1221 then SOME @{thm Let_def} |
1221 then SOME @{thm Let_def} |
1222 else |
1222 else |
1223 let |
1223 let |
1224 val n = case f of (Abs (x, _, _)) => x | _ => "x"; |
1224 val n = case f of (Abs (x, _, _)) => x | _ => "x"; |
1225 val cx = Thm.cterm_of thy x; |
1225 val cx = Thm.cterm_of thy x; |
1226 val {T = xT, ...} = Thm.rep_cterm cx; |
1226 val xT = Thm.typ_of_cterm cx; |
1227 val cf = Thm.cterm_of thy f; |
1227 val cf = Thm.cterm_of thy f; |
1228 val fx_g = Simplifier.rewrite ctxt (Thm.apply cf cx); |
1228 val fx_g = Simplifier.rewrite ctxt (Thm.apply cf cx); |
1229 val (_ $ _ $ g) = Thm.prop_of fx_g; |
1229 val (_ $ _ $ g) = Thm.prop_of fx_g; |
1230 val g' = abstract_over (x,g); |
1230 val g' = abstract_over (x,g); |
1231 val abs_g'= Abs (n,xT,g'); |
1231 val abs_g'= Abs (n,xT,g'); |