0

I'm learning math without a math professor. I need some feedback from community regarding my proof. Book : "Discrete Mathematics with Applications" by Susanna S. Epp, 5th edition. Exercise 17 from page 217. Please verify my proof.

Prove the statement or find a counterexample if the statement is false. For every integer n,

$$\lfloor n/3\rfloor = \frac{n}{3},\;\text{ if }\,n\text{ mod }3=0$$ $$\lfloor n/3\rfloor = \frac{(n-1)}{3},\;\text{ if }\,n\text{ mod }3=1$$ $$\lfloor n/3\rfloor = \frac{(n-2)}{3},\;\text{ if }\,n\text{ mod }3=2$$

In the proof I will use the following definitions:

  1. The definition of the "floor" operation: For every $x \in \Bbb R $, $ \lfloor x \rfloor = n \iff \exists n \in \Bbb Z, n \le x < n+1 $
  2. The definition of the "mod" operation: Given any $n \in \Bbb Z $ and $d \in \Bbb Z^+ $: $n\text{ mod }d= r \iff n = dq + r$, where $q \in \Bbb Z, r \in \Bbb Z$, and $0 \le r < d$

Proof. According to the given statement, the proof must contain three cases and each of them must be proved individually.

Case $\mathrm{I}$. $\lfloor n/3 \rfloor = \frac{n}{3}$, if $n\text{ mod }3 = 0$. From (2), $n\text{ mod }3 = 0 \iff \exists q \in \Bbb Z$ and $n = 3q + 0$. From (1), $$\lfloor n/3 \rfloor = \frac{n}{3} \\ \frac{n}{3} \le \frac{n}{3} < \frac{n}{3} + 1 \\ \frac{3q}{3} \le \frac{3q}{3} < \frac{3q}{3} + 1 \\ q \le q < q+1 $$

Case $\mathrm{II}$. $\lfloor n/3 \rfloor = \frac{n-1}{3}$, if $n\text{ mod }3 = 1$. From (2), $n\text{ mod }3 = 1 \iff \exists q \in \Bbb Z$ and $n = 3q + 1$. From (1), $$\lfloor n/3 \rfloor = \frac{n-1}{3} \\ \frac{n-1}{3} \le \frac{n-1}{3} < \frac{n-1}{3} + 1 \\ \frac{3q+1-1}{3} \le \frac{3q+1-1}{3} < \frac{3q+1-1}{3} + 1 \\ q \le q < q+1 $$

Case $\mathrm{III}$. $\lfloor n/3 \rfloor = \frac{n-2}{3}$, if $n\text{ mod }3 = 2$. From (2), $n\text{ mod }3 = 2 \iff \exists q \in \Bbb Z$ and $n = 3q + 2$. From (1), $$\lfloor n/3 \rfloor = \frac{n-2}{3} \\ \frac{n-2}{3} \le \frac{n-2}{3} < \frac{n-2}{3} + 1 \\ \frac{3q+2-2}{3} \le \frac{3q+2-2}{3} < \frac{3q+2-2}{3} + 1 \\ q \le q < q+1 \ \blacksquare $$

Angelo
  • 12,328
  • 1
    I think you got the idea right and your proof is quite good, maybe just add eqivalent signs $\iff$ in the lines to clarify that you "move" between equivalent statements and at the end it could make the proof slightly better to understand if you state again that $q$ is an integer, but that also depends on your style and how brief you want to be. And again nice job! – linkja Jan 22 '23 at 15:16
  • @linkja, you meant to use $\iff$ instead of $\to$, right ? – Robert Kadjinskii Jan 22 '23 at 15:24
  • I just meant between lines, for example $\frac{3q}{3}\le \frac{3q}{3} < \frac{3q}{3} +1 \iff q \le q < q+1$ as this makes it slightly more clear what you are doing, though it should be obvious from context and in the statement your proving it actually is an equivalence and not just an implication. – linkja Jan 22 '23 at 15:33
  • 1
    And i found a typo in the statement you have both $x$ and $n$ but would probably just want one of those – linkja Jan 22 '23 at 15:33
  • @linkja, in the original statement n must be and not x, in the book it is n and not x, and why should be x there ? – Robert Kadjinskii Jan 22 '23 at 15:47
  • Because else the statement doesn't make much sense as x and n are completely unrelated – linkja Jan 22 '23 at 15:48
  • From the definition of the floor function it follows immediately that $\lfloor m\rfloor=m;\forall;m\in\mathbb Z,.$ Then we are done. – Kurt G. Jan 22 '23 at 15:54
  • For a solution-verification question to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be an open-ended proof checking machine. – Bill Dubuque Jan 22 '23 at 18:28
  • It's easy using the universal property of floor as here, viz.
    $$\begin{align} k\ &\le\ n/3\ \iff\ \ 3k\ &\le\ n\ \iff \ \ 3k\ &\ \le n-(n\bmod 3)\ \iff\ \ \ \ k\ &\le (n-(n\bmod 3))/3\[.4em] {\rm so}\ \ \ \lfloor n/3] &= (n-(n\bmod 3))/3 \end{align}\qquad$$
    – Bill Dubuque Jan 22 '23 at 18:42

0 Answers0