Is it possible to give my own names to the variables generated when using case analysis or induction?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using structured proofs (starting with the
proofkeyword), you can use thecasekeywoard to select the case you want to prove and give names to the variables created by case analysis / induction:Here
case (Cons x xs)tells Isabelle that you want to prove the case where a list consists of a start element and a remaining list (i.e., the induction step) and name the variablesxandxs.In the proof block, you can see the list of cases with the
print_casescommand.If on the other hand you are using
apply-style, there is no direct way to name these variables (also, in this case you are likely to needcase_tacinstead ofcases, as you will have to deal with bound variables instead of free variables). There is the methodrename_tacwhich can be used to rename the outermost meta-quantified variables.For most projects (with the notable exception of program verification, like in the L4.verified project), the common proof style is to use mostly structured proofs. Unstructured proofs are used for exploration and become seldom so complex that it is necessary to rename your variables.