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
 
Hello, I'm joining this forum to ask two questions which have nagged me for some time. They both are presumed obvious, yet don't make sense to me. Nobody will explain their positions, which is...uh...aka science. I also have a thread for the other question. But this one involves probability, known as the Monty Hall Problem. Please see any number of YouTube videos on this for an explanation, I'll leave it to them to explain it. I question the predicate of all those who answer this...
I'm taking a look at intuitionistic propositional logic (IPL). Basically it exclude Double Negation Elimination (DNE) from the set of axiom schemas replacing it with Ex falso quodlibet: ⊥ → p for any proposition p (including both atomic and composite propositions). In IPL, for instance, the Law of Excluded Middle (LEM) p ∨ ¬p is no longer a theorem. My question: aside from the logic formal perspective, is IPL supposed to model/address some specific "kind of world" ? Thanks.
I was reading a Bachelor thesis on Peano Arithmetic (PA). PA has the following axioms (not including the induction schema): $$\begin{align} & (A1) ~~~~ \forall x \neg (x + 1 = 0) \nonumber \\ & (A2) ~~~~ \forall xy (x + 1 =y + 1 \to x = y) \nonumber \\ & (A3) ~~~~ \forall x (x + 0 = x) \nonumber \\ & (A4) ~~~~ \forall xy (x + (y +1) = (x + y ) + 1) \nonumber \\ & (A5) ~~~~ \forall x (x \cdot 0 = 0) \nonumber \\ & (A6) ~~~~ \forall xy (x \cdot (y + 1) = (x \cdot y) + x) \nonumber...
Back
Top