However, the lemma is true if you add the condition that A and B are compact (equivalent to closed and bounded for R).
I wish I had known someone like you when I was taking analysis at Penn State. Maybe I would have survived.
why thanks. This text was used in a course at Penn State actually. It's an introduction to p-adic analysis that was used in an undergraduate class. It's very good in some ways - very good exercises, well organized, etc. But I was facepalming over this flub in the text - it seems amazing that a math professor could believe the false lemma was true, even for a minute. I've been adding comments to the text as I go through it.
I was always curious about p-adic analysis - p-adics are an alternative metric completion for the rational numbers. Now I'm learning the basics of it.