307 Const (@{const_name Ex}, Tex) $ Abs (s, T, t) => |
307 Const (@{const_name Ex}, Tex) $ Abs (s, T, t) => |
308 (let |
308 (let |
309 val (eq, eT, nT, swap) = mkeq (dest_sel_eq t) 0; |
309 val (eq, eT, nT, swap) = mkeq (dest_sel_eq t) 0; |
310 val prop = |
310 val prop = |
311 list_all ([("n", nT), ("x", eT)], |
311 list_all ([("n", nT), ("x", eT)], |
312 Logic.mk_equals (Const (@{const_name Ex}, Tex) $ Abs (s, T, eq), HOLogic.true_const)); |
312 Logic.mk_equals (Const (@{const_name Ex}, Tex) $ Abs (s, T, eq), @{term True})); |
313 val thm = Drule.export_without_context (prove prop); |
313 val thm = Drule.export_without_context (prove prop); |
314 val thm' = if swap then swap_ex_eq OF [thm] else thm |
314 val thm' = if swap then swap_ex_eq OF [thm] else thm |
315 in SOME thm' end handle TERM _ => NONE) |
315 in SOME thm' end handle TERM _ => NONE) |
316 | _ => NONE) |
316 | _ => NONE) |
317 end handle Option.Option => NONE); |
317 end handle Option.Option => NONE); |