Exercise · Volume 1 · 1.2.4-7
Exercise 1.2.4-7
proved in Lean solution written
| Rating | M15 |
|---|---|
| Markers | M (mathematical) |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory |
The task
Show that , find when equality holds, and give the analogous statement for ceilings.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Split each number into its integer part and its fractional part .
Hint 2
The integer parts can be taken out of the floor. What is left is the floor of a sum of two numbers in .
Solution
Show the solution
Write and with and , so . Then . An integer can leave the floor, so
Since , the last floor is if and if . So , with equality if and only if , that is .
For ceilings, apply the result to and and use (Exercise 1.2.4-4). This gives , that is . So
with equality if and only if . The inequality goes the other way.
Check
For : , and is not below . For , : both sides are , and . For ceilings with : , and for both, with sum .
Remarks
The floor of a sum is at least the sum of the floors, so the floor is superadditive. The ceiling is subadditive.
This solution is checked, and a person has not reviewed it yet. The source.
In Lean
proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.
- Problem:
TAOCP.S1_2_4.Ex7.statementaxioms: Classical.choice, Quot.sound, propext - Solution:
TAOCP.S1_2_4.Ex7.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.