*To*: cl-isabelle-users at lists.cam.ac.uk*Subject*: Re: [isabelle] Beginner question: Symmetry of equality in proofs?*From*: Lars Noschinski <noschinl at in.tum.de>*Date*: Mon, 13 Dec 2010 08:10:03 +0100*In-reply-to*: <AANLkTimNW5ZsmUnqtpNhnY40UL5zDCzAywkzFUJwBofZ@mail.gmail.com>*References*: <AANLkTimNW5ZsmUnqtpNhnY40UL5zDCzAywkzFUJwBofZ@mail.gmail.com>*User-agent*: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10

On 13.12.2010 05:58, Jason Dagit wrote:

lemma length_suc: "Suc (length list) = length (list ++ a # [])" apply(induct_tac list) apply(auto) done

[...]

lemma "length (rev xs) = length xs" apply(induct_tac xs) apply(simp, simp) oops (* apply(simp add: length_suc) done *) \end{code} What I noticed was that between the last two lemmas, the direction of the equality makes a huge difference when proving the lemma. The lemma"length xs = length (rev xs)" is easy to prove but lemma "length (rev xs) =length xs" is much harder to prove (for me at least).

I would expect "=" to be symmetric. Is that not the case? Is there something else going on here?

A proof easily succeeds by apply(simp add: length_suc[symmetric])

-- Lars

**References**:**[isabelle] Beginner question: Symmetry of equality in proofs?***From:*Jason Dagit

- Previous by Date: [isabelle] Beginner question: Symmetry of equality in proofs?
- Next by Date: [isabelle] PhD position in Computational Logic at the University of Innsbruck
- Previous by Thread: [isabelle] Beginner question: Symmetry of equality in proofs?
- Next by Thread: Re: [isabelle] Beginner question: Symmetry of equality in proofs?
- Cl-isabelle-users December 2010 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