MHB Prove Relations: $e,b,d\in \mathbb{Z},d\neq 0$

  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Relations
AI Thread Summary
The discussion centers on proving the relationships between integer division and the floor and ceiling functions for integers e, b, and d, where d is non-zero. It establishes that if d is positive, then e div d equals the floor of e divided by d, while if d is negative, e div d equals the ceiling of e divided by d. Participants highlight the need for clear definitions of e div d, the floor function, and the ceiling function, noting variations in their interpretations. The conversation emphasizes that the definitions of e div d may vary depending on the context, particularly between mathematics and computer science. Overall, precise definitions are crucial for understanding the differences in behavior based on the sign of d.
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)Let $e,b \in \mathbb{Z}, d \neq 0$.
How could we prove the following? Could you maybe give me a hint?

  • If $d>0$ then $e \text{ div } d = \lfloor \frac{e}{d} \rfloor$
    $$$$
  • If $d<0$ then $e \text{ div } d = \lceil \frac{e}{d} \rceil $

Could we show the above, using the definitions? (Thinking)

$$\lfloor x \rfloor =max \{ m \in \mathbb{Z}: m \leq x \}$$

$$\lceil x \rceil=\min \{ l \in \mathbb{Z}: l \geq x\}$$
 
Physics news on Phys.org
What are the definitions of $e\text{ div }d$, $\lfloor x\rfloor$ and $\lceil x\rceil$?
 
Evgeny.Makarov said:
What are the definitions of $e\text{ div }d$, $\lfloor x\rfloor$ and $\lceil x\rceil$?

If $d>0$ it is $e=k \cdot d+r, r<d$ where $k=e\text{ div }d=\lfloor \frac{e}{d} \rfloor$, right? (Thinking)

And if $d<0$, is it then like that? (Thinking)

$e=k \cdot d+r, r<d$ where $k=e\text{ div }d=\lceil \frac{e}{d} \rceil$
 
evinda said:
If $d>0$ it is $e=k \cdot d+r, r<d$ where $k=e\text{ div }d=\lfloor \frac{e}{d} \rfloor$, right? (Thinking)

And if $d<0$, is it then like that? (Thinking)

$e=k \cdot d+r, r<d$ where $k=e\text{ div }d=\lceil \frac{e}{d} \rceil$
I don't know because $e\text{ div }d$ does not have a universally accepted definition. You have to go with the one used in your book or course. In contrast, $\lfloor x\rfloor$ is pretty unambiguous, but even then there are variations: for example, W|A rounds negative values up instead of down even though "integer part" is usually considered a synonym of "floor function".

Also, I assume that $\lfloor \frac{e}{d} \rfloor$ and $\lceil \frac{e}{d} \rceil$ are not part of the definition of $e\text{ div }d$. Then what is the difference between the two clauses for $d>0$ and $d<0$ in your post? And are there are no other restrictions on $r$, such as $0\le r$? In short, it would be nice if you wrote complete and precise definitions.
 
Here's some information on "a div b". I think in mathematics, method 2 or 3 below is used most often, while in CS, method 1 is usually the case.

9jfzas.png

xeg95z.png
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...
Back
Top