128 |
128 |
129 (*Strips assumptions in goal yielding ( [x1,...,xm], [H1,...,Hn], B ) |
129 (*Strips assumptions in goal yielding ( [x1,...,xm], [H1,...,Hn], B ) |
130 H1,...,Hn are the hypotheses; x1...xm are variants of the parameters. |
130 H1,...,Hn are the hypotheses; x1...xm are variants of the parameters. |
131 Main difference from strip_assums concerns parameters: |
131 Main difference from strip_assums concerns parameters: |
132 it replaces the bound variables by free variables. *) |
132 it replaces the bound variables by free variables. *) |
133 fun strip_context_aux (params, Hs, Const ("==>", _) $ H $ B) = |
133 fun strip_context_aux (params, Hs, Const (@{const_name Pure.imp}, _) $ H $ B) = |
134 strip_context_aux (params, H :: Hs, B) |
134 strip_context_aux (params, H :: Hs, B) |
135 | strip_context_aux (params, Hs, Const ("all",_) $ Abs (a, T, t)) = |
135 | strip_context_aux (params, Hs, Const (@{const_name Pure.all},_) $ Abs (a, T, t)) = |
136 let val (b, u) = Syntax_Trans.variant_abs (a, T, t) |
136 let val (b, u) = Syntax_Trans.variant_abs (a, T, t) |
137 in strip_context_aux ((b, T) :: params, Hs, u) end |
137 in strip_context_aux ((b, T) :: params, Hs, u) end |
138 | strip_context_aux (params, Hs, B) = (rev params, rev Hs, B); |
138 | strip_context_aux (params, Hs, B) = (rev params, rev Hs, B); |
139 |
139 |
140 fun strip_context A = strip_context_aux ([], [], A); |
140 fun strip_context A = strip_context_aux ([], [], A); |