SUBST_TAC : (thm list -> tactic)
Given a list of theorems A1|-u1=v1,...,An|-un=vn and a goal (A,t),
SUBST_TAC rewrites the term t into the term t[v1,...,vn/u1,...,un] by
simultaneously substituting vi for each occurrence of ui in t with vi:
A ?- t
============================= SUBST_TAC [A1|-u1=v1,...,An|-un=vn]
A ?- t[v1,...,vn/u1,...,un]
The assumptions of the theorems used to substitute with are not added
to the assumptions A of the goal, while they are recorded in the proof. If
any Ai is not a subset of A (up to alpha-conversion), then
SUBST_TAC [A1|-u1=v1,...,An|-un=vn] results in an invalid tactic.
SUBST_TAC automatically renames bound variables to prevent free variables in vi becoming bound after substitution.
?- (n + 0) + (0 + m) = m + nby substituting with the theorems
#let thm1 = SPECL ["m:num"; "n:num"] ADD_SYM #and thm2 = CONJUNCT1 ADD_CLAUSES;; thm1 = |- m + n = n + m thm2 = |- 0 + m = mapplying SUBST_TAC [thm1; thm2] results in the goal
?- (n + 0) + m = n + m