*To*: cl-isabelle-users at lists.cam.ac.uk*Subject*: Re: [isabelle] Simpler theorem statements, and proofs for them [Re: Started auction theory toolbox; announcement, next steps, and questions]*From*: Christian Sternagel <c-sterna at jaist.ac.jp>*Date*: Thu, 01 Nov 2012 11:25:46 +0900*In-reply-to*: <5091CE53.6020006@cs.bham.ac.uk>*References*: <50916DB3.4030707@cs.bham.ac.uk> <B342CF2B-EEC3-4932-A98D-193702F57A14@cam.ac.uk> <5091CE53.6020006@cs.bham.ac.uk>*User-agent*: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

Dear Christoph, Consider the proofs: lemma 1: "ALL i. i < length xs --> xs ! i = hd (drop i xs)" proof fix i show "i < length xs --> xs ! i = hd (drop i xs)" proof assume "i < length xs" then show "xs ! i = hd (drop i xs)" by (induct i arbitrary: xs) (case_tac xs, simp_all)+ qed qed thm 1 thm 1 [rule_format] lemma 2: "!!i. i < length xs ==> xs ! i = hd (drop i xs)" proof - fix i assume "i < length xs" then show "xs ! i = hd (drop i xs)" by (induct i arbitrary: xs) (case_tac xs, simp_all)+ qed thm 2 lemma 3: assumes "i < length xs" shows "xs ! i = hd (drop i xs)" using assms by (induct i arbitrary: xs) (case_tac xs, simp_all)+ thm 3

hope that helps, chris On 11/01/2012 10:20 AM, Christoph LANGE wrote:

2012-10-31 20:09 Lawrence Paulson:On 31 Oct 2012, at 18:28, Christoph LANGE <c.lange at cs.bham.ac.uk> wrote:* In statements such as "!x. p x --> q x" it is tedious (and always the same) to break their structure down to a level where the actually interesting work starts.It is almost never necessary or helpful to state a theorem in that format.Thanks for your advice! However simply changing my statements to …I suggest lemma "p x ==> q x" for a straightforward proof, or lemma assumes "p x" shows "q x" for a more complicated structured proof.… such a structure doesn't always work; I think the proofs will also need some adaptation. The following lemma (reduced to the structural outline) has a (anti-)pattern that is typical for my formalisation: lemma skip_index_keeps_non_negativity : fixes n::nat and v::real_vector assumes non_empty: "n > 0" and non_negative: "non_negative_real_vector n v" shows "\<forall>i::nat . in_range n i \<longrightarrow> non_negative_real_vector (n-(1::nat)) (skip_index v i)" proof fix i::nat show "in_range n i \<longrightarrow> non_negative_real_vector (n-(1::nat)) (skip_index v i)" proof assume "in_range n i" ... show "non_negative_real_vector (n-(1::nat)) (skip_index v i)" sorry qed qed How would I have to adapt the proof when rephrasing the statement as shows "in_range n i \<Longrightarrow> ..." ? (I'll be happy to accept "RTFM" as an answer, if you could give me a pointer.) Cheers, and thanks, Christoph

**References**:

- Previous by Date: Re: [isabelle] Started auction theory toolbox; announcement, next steps, and questions
- Next by Date: [isabelle] attribute: rule_format
- Previous by Thread: [isabelle] Simpler theorem statements, and proofs for them [Re: Started auction theory toolbox; announcement, next steps, and questions]
- Next by Thread: Re: [isabelle] Simpler theorem statements, and proofs for them [Re: Started auction theory toolbox; announcement, next steps, and questions]
- Cl-isabelle-users November 2012 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list