[isabelle] Simpler theorem statements, and proofs for them [Re: Started auction theory toolbox; announcement, next steps, and questions]

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)"
  fix i::nat
show "in_range n i \<longrightarrow> non_negative_real_vector (n-(1::nat)) (skip_index v i)"
    assume "in_range n i"
    show "non_negative_real_vector (n-(1::nat)) (skip_index v i)" sorry

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 Lange, School of Computer Science, University of Birmingham
http://cs.bham.ac.uk/~langec, Skype duke4701

→ Enabling Domain Experts to use Formalised Reasoning @ AISB 2013
  2–5 April 2013, Exeter, UK.  Deadlines 10 Dec (stage 1), 14 Jan (st. 2)

This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.