SUBS_OCCS : ((int list # thm) list -> thm -> thm)
(l1,A1|-t1=v1) ... (ln,An|-tn=vn) A|-t ------------------------------------------- SUBS_OCCS[(l1,A1|-t1=v1);...; A1 u ... An u A |- t[v1,...,vn/t1,...,tn] (ln,An|-tn=vn)] (A|-t)
#let thm = SPECL ["m:num"; "n:num"] ADD_SYM;; thm = |- m + n = n + mcan be used for substituting only the second occurrence of the subterm m + n
#SUBS_OCCS [([2],thm)] (ASSUME "(n + m) + (m + n) = (m + n) + (m + n)");; . |- (n + m) + (m + n) = (n + m) + (m + n)