3

I usually think of also have as working like this:

have "P r Q1" by simp
also have "... r Q2" by simp
also have "... r Q3" by simp
...
also have "... r Qn" by simp
finally have "P r Qn+1" by simp

where "... r Qm" means "Qm-1 r Qm" and r is some transitive relation.

With r meaning = this seems to really be the case, however, when using I have found a counterexample to this description:

...
have  "1- 1/(2^(n+1))≥1/(2::real)" by simp
also have "... ≥ 0" (* here when I check the 'output' it seems to be 
considering  "0 ≤ 1 - 1 / 2 ^ (n + 1)" which in the previous notation 
would be Qn r Qn+2 !*)

My question is, how does also have work, in particular, how do I predict what ... is going to refer to?

IIM
  • 533
  • 3
  • 11

1 Answers1

2

AFAIR, a ≥ b is an abbreviation for b ≤ a. With this in mind, you see that this does not fit the pattern expected by also.

I suggest that you state your chain of inequations the other way, from lowest to highest. You can still state the final result using if you want – after all, it is just an abbreviation.

Joachim Breitner
  • 25,395
  • 6
  • 78
  • 139
  • Thanks for pointing that out. `have "0 ≤ 1/(2::real)" by simp also have "…≤1- 1/(2^(n+1))" by simp finally have "0 ≤ 1- 1/(2^(n+1))"` – IIM Dec 28 '16 at 10:19
  • ... is what I changed it to, but what rule could I use to prove the last step? `simp` does not seem to work. – IIM Dec 28 '16 at 10:20
  • Oh, it's because I forgot to put `(0::real)`. – IIM Dec 28 '16 at 10:35