match_term : term -> term -> (term,term) subst * (hol_type,hol_type) subst
aconv (subst S (inst T pat)) ob.
> val th = REFL (Term `x:'a`); val th = |- x = x : thm > match_term (concl th) (Term `1 = 1`); val it = ([{redex = `x`, residue = `1`}], [{redex = `:'a`, residue = `:num`}]) : term subst * hol_type subst > INST_TY_TERM it th; val it = |- 1 = 1
> val _ = show_types := true; > val t = list_mk_comb(``f:'a -> 'b -> 'c``, [``x:'a``, ``x:'b``]); val t = ``(f : 'a -> 'b -> 'c) (x:'a) (x:'b)``; > val (tminst, tyinst) = match_term t ``(g: 'a -> 'a -> 'b) a b``; val tminst = [{redex = ``(f :'a -> 'a -> 'b)``, residue = ``(g :'a -> 'a -> 'b)``}, {redex = ``(x :'a)``, residue = ``(a :'a)``}, {redex = ``(x :'a)``, residue = ``(b :'a)``}]: (term, term) Term.subst val tyinst = [{redex = ``:'c``, residue = ``:'b``}, {redex = ``:'b``, residue = ``:'a``}]: (hol_type, hol_type) Term.subst