EXISTS_LEFT : term list -> thm -> thm
h1, h2, h3 |- t --------------------- EXISTS_LEFT [``x``] ?x. h1 /\ h3, h2 |- t
EXISTS_LEFT [fvx, fvy] th is [p, q, ?y. (?x. g x /\ f x y) /\ h y] |- r
EXISTS_LEFT [fvy, fvx] th is [p, q, ?x. (?y. h y /\ f x y) /\ g x] |- r
Where trans_thm is [] |- !x y z. (x = y) ==> (y = z) ==> (x = z) the same result could of course be achieved by rewriting it with AND_IMP_INTRO. But more generally, EXISTS_LEFT could be used as a building-block for a more flexible tactic. In this instance, one might start with
val trans_thm_h = UNDISCH_ALL (SPEC_ALL trans_thm) ; EXISTS_LEFT (thm_frees trans_thm_h) trans_thm_h ;