[Algebra] Proving equations involving modulo functions.

  • Context: Undergrad 
  • Thread starter Thread starter ellipsis
  • Start date Start date
  • Tags Tags
    Algebra Functions
Click For Summary
SUMMARY

This discussion focuses on proving equations involving modulo functions, specifically the relationship between the floor function and modulo operation. The equation $$ \Big{\lfloor} \frac{n}{d} \Big{\rfloor} = \frac{n - n \pmod d}{d} $$ is established through the substitution of the modulo definition, leading to a formal proof. The key property used is that $$ n \pmod d = n - d \Big{\lfloor} \frac{n}{d} \Big{\rfloor} $$, which simplifies the right-hand side to the left-hand side of the equation. This establishes a clear connection between the floor function and the modulo operation.

PREREQUISITES
  • Understanding of the floor function and its properties
  • Familiarity with modulo operations and their definitions
  • Basic knowledge of algebraic manipulation
  • Concept of integer division and its implications
NEXT STEPS
  • Study the properties of the floor function in detail
  • Explore the definition and applications of modulo functions
  • Investigate integer division and its relationship with real numbers
  • Learn formal proof techniques in algebra
USEFUL FOR

Mathematicians, students studying algebra, and anyone interested in formal proofs involving modulo functions and floor operations.

ellipsis
Messages
158
Reaction score
24
I would like to know some general properties of the modulo (remainder) function that I can use to rewrite expressions. For example, say we wanted to prove the following by rewriting the right-hand-side:

$$ \Big{\lfloor} \frac{n}{d} \Big{\rfloor} = \frac{n - n \pmod d}{d} $$

I have no idea how to prove this statement formally. Intuitively, ##n \pmod d## is the remainder of whatever ##\big{\lfloor} \frac{n}{d} \big{\rfloor}## is, and therefore

$$ n \pmod d = n - d \Big{\lfloor} \frac{n}{d} \Big{\rfloor}$$

Which, when we insert it into the right-hand side of what I'm trying to prove, results in:

$$ \frac{n - (n - d \big{\lfloor} \frac{n}{d} \big{\rfloor})}{d} $$

Which, thankfully, boils down to:

$$ \Big{\lfloor} \frac{n}{d} \Big{\rfloor} $$

What I want to know is: How do I formalize the beginning of this proof? Is there some general property or definition of the modulo function which I can invoke to justify that step?
 
Physics news on Phys.org
a = n mod d is defined as a number between 0 and d such that there exists an integer c such that n = cd+a.
When you take d*floor(n/d), you are essentially saying that floor(n/d) = c. That is, there is no integer larger than c such that cd is less than or equal to n.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K