\DOC wordn_CASES_TAC \TYPE {wordn_CASES_TAC : term -> thm_tactic} \LIBRARY wordn \SYNOPSIS Instantiates variables of type {:wordn} with a list of bits. \DESCRIBE The tactic {wordn_CASES_TAC} instantiates occurrences of a variable of type {:wordn} in the goal with a list of bits. It takes, as its arguments, a term which indicates which variable is to be instantiated and a theorem which should in the form returned by {prove_wordn_cases}. The specification of {wordn_CASES_TAC} is: { A ?- t[w] =============================== wordn_CASES_TAC "w" wordn_CASES A ?- t[WORDn[b0';...;bn-1']/w] } where {wordn_CASES} is the following theorem: { |- !w. ?b0...bn-1. w = WORDn[b0;...bn-1] } This function specializes the universally quantified variable in the theorem {wordn_CASES} with the given term which should match the variable required to be instantiated in the goal. It then eliminaates the existentially quantified vairables {b0},...,{bn-1} by choosing some variants which are not free in the assumptions; normally these are just {b0},...,{bn-1}. It then substitutes the right-hand side of the equation for the occurrences of the variable {w} in the goal. \FAILURE Fails if the substitution cannot be performed due to no matching variable of the correct type is found or other reasons as given in the failure conditions of {CHOOSE_TAC} and {SUBST1_TAC}. \EXAMPLE Suppose that one wants to solve the following goal: { "!w. LENGTH(BITS3 w) = 3" } The tactic {GEN_TAC THEN wordn_CASES_TAC "w" word3_CASES} may be used to transform it to { "LENGTH(BITS3(WORD3[b0;b1;b2])) = 3" } \SEEALSO {wordn_X_CASES_TAC}, {prove_wordn_cases_thm}, {CHOOSE_TAC}, {SUBST1_TAC}. \ENDDOC