Skip to content

Exercise 4.1 solved#71

Merged
arademaker merged 1 commit into
arademaker:mainfrom
jhorn26:ex-41-fixed
Jul 25, 2026
Merged

Exercise 4.1 solved#71
arademaker merged 1 commit into
arademaker:mainfrom
jhorn26:ex-41-fixed

Conversation

@GabrielJP314

Copy link
Copy Markdown
Contributor

Proving that $\left(a < (a+b)\;/\;2 \;\land\; (a+b)\;/\;2 < b\right)\leftrightarrow\;a + 1 < b$ for integers $a$ and $b$, and that $\left\lceil \log_2(n + 1) \right\rceil \le h$ for integer $h$ and $n < 2^h$.

@GabrielJP314

Copy link
Copy Markdown
Contributor Author

Now it's correct!

@arademaker
arademaker merged commit 8bfdc0d into arademaker:main Jul 25, 2026
@arademaker

Copy link
Copy Markdown
Owner

Hi @GabrielJP314, take a look at my commit message here. First, your rcase was doing a case analysis; the exercise explicitly said not to do it. Second, the theorems were supposed to use the rule of floors/rule of ceilings. They are already in Mathlib as Int.le_floor and Int.ceil_le, so both proofs
now appeal to them directly instead of reasoning around them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants