Debian Codegraph @

contrib/wordn/help/ENTRIES/wordn_CASES_TAC.doc

raw
1 \DOC wordn_CASES_TAC
2
3 \TYPE {wordn_CASES_TAC : term -> thm_tactic}
4
5 \LIBRARY wordn
6
7 \SYNOPSIS
8 Instantiates variables of type {:wordn} with a list of bits.
9
10 \DESCRIBE
11 The tactic {wordn_CASES_TAC} instantiates occurrences of a variable of
12 type {:wordn} in the goal with a list of bits. It takes, as its
13 arguments, a term which indicates which variable is to be instantiated
14 and a theorem which should in the form returned by
15 {prove_wordn_cases}. The specification of {wordn_CASES_TAC} is:
16 {
17 A ?- t[w]
18 =============================== wordn_CASES_TAC "w" wordn_CASES
19 A ?- t[WORDn[b0';...;bn-1']/w]
20 }
21 where {wordn_CASES} is the following theorem:
22 {
23 |- !w. ?b0...bn-1. w = WORDn[b0;...bn-1]
24 }
25
26 This function specializes the universally quantified variable in the
27 theorem {wordn_CASES} with the given term which should match the
28 variable required to be instantiated in the goal. It then eliminaates
29 the existentially quantified vairables {b0},...,{bn-1} by choosing some
30 variants which are not free in the assumptions; normally these are
31 just {b0},...,{bn-1}. It then substitutes the right-hand side of the
32 equation for the occurrences of the variable {w} in the goal.
33
34 \FAILURE
35 Fails if the substitution cannot be performed due to no matching
36 variable of the correct type is found or other reasons as given in the
37 failure conditions of {CHOOSE_TAC} and {SUBST1_TAC}.
38
39 \EXAMPLE
40 Suppose that one wants to solve the following goal:
41 {
42 "!w. LENGTH(BITS3 w) = 3"
43 }
44 The tactic {GEN_TAC THEN wordn_CASES_TAC "w" word3_CASES}
45 may be used to transform it to
46 {
47 "LENGTH(BITS3(WORD3[b0;b1;b2])) = 3"
48 }
49
50 \SEEALSO
51 {wordn_X_CASES_TAC}, {prove_wordn_cases_thm},
52 {CHOOSE_TAC}, {SUBST1_TAC}.
53
54 \ENDDOC