Skip to content

add(calc-001): nested floor–ceiling integral with bilingual solution#8

Merged
izolyte merged 2 commits into
mainfrom
problem/calc-001-nested-floor-ceil-integral
Jun 20, 2026
Merged

add(calc-001): nested floor–ceiling integral with bilingual solution#8
izolyte merged 2 commits into
mainfrom
problem/calc-001-nested-floor-ceil-integral

Conversation

@izolyte

@izolyte izolyte commented Jun 20, 2026

Copy link
Copy Markdown
Owner

What & why

Adds the first problem: a six-term nested floor/ceiling integral from MIT
Integration Bee 2026. Includes a full ish and a
Thai sibling, with six CeTZ diagrams, emphasis markup, and a triangular-number
generalisation in the reflection.

Closes #7

Checklist

  • Compiles: make compile P=calc-001 (both EN and TH)
  • Index in sync: ran make index
  • Meets the authoring standard in docs/AUTHORING.md
  • Every result used-but-not-proveded [ref?] markers
  • Source set in metadata: source + source_url + source_license: "All rights reserved"

Bilingual

  • Thai file calc-001-nested-floor-ceil-integral-th.typ shares the English number, both compile

Notes

Reviewer: open the compiled PDFs to check diagram layout and emphasis rendering
(#strong/#emph) — these can't be vThe norasi
font warning is expected on Windows (font not installed locally); CI renders
correctly.

Summary by CodeRabbit

  • New Features

    • Added Problem 001: “A Nested Floor–Ceiling Integral” with complete solutions and diagram support.
    • Included both English and Thai write-ups, featuring step-by-step derivations and verification.
  • Documentation

    • Updated the generated problem index to include Problem 001 (tags, source link, solved date).
    • Refreshed the progress section to reflect 1 solved problem and the covered topics list.

@izolyte izolyte added the enhancement New feature or request label Jun 20, 2026
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f6bef4bf-9831-4cf7-956b-0787fd5bbf91

📥 Commits

Reviewing files that changed from the base of the PR and between 0fe1fb8 and f304de5.

📒 Files selected for processing (2)
  • problems/calc-001-nested-floor-ceil-integral-th.typ
  • problems/calc-001-nested-floor-ceil-integral.typ
🚧 Files skipped from review as they are similar to previous changes (2)
  • problems/calc-001-nested-floor-ceil-integral-th.typ
  • problems/calc-001-nested-floor-ceil-integral.typ

📝 Walkthrough

Walkthrough

Two new Typst documents (calc-001-nested-floor-ceil-integral.typ in English and calc-001-nested-floor-ceil-integral-th.typ in Thai) are added, each presenting a complete solution to a nested floor/ceiling definite integral over [0, 1000] from MIT Integration Bee 2026. README.md is updated to register the problem in the generated index and increment the solved-problems count.

Changes

calc-001 Problem Addition

Layer / File(s) Summary
README index and progress update
README.md
Problem 001 entry added to the index with topics, source, and solved date; progress counters updated from 0 to 1 problem solved.
Document metadata, problem statement, and notation setup
problems/calc-001-nested-floor-ceil-integral.typ, problems/calc-001-nested-floor-ceil-integral-th.typ
Both documents declare imports, doc-level metadata (title, tags, prerequisites, resources), state the integral and final answer, define floor/ceil/fractional-part notation, and establish foundational properties with annotated diagrams.
Solution derivation and series computation
problems/calc-001-nested-floor-ceil-integral.typ, problems/calc-001-nested-floor-ceil-integral-th.typ
Both documents formalize the step-by-step integrand reduction to a piecewise-constant staircase on unit intervals, sum the resulting arithmetic series, and conclude the integral equals 1,001,000.
Verification, reflection, and general formula
problems/calc-001-nested-floor-ceil-integral.typ, problems/calc-001-nested-floor-ceil-integral-th.typ
Both documents independently verify via separate integration of floor(x), ceil(x), and constant terms; discuss the ceil({x}) asymmetry trap with a "missing area" diagram; address measure-zero boundary behavior; and state the general N(N+1) formula.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 A rabbit hops from 0 to 1000 with glee,
Floors and ceilings stacked high as can be.
Each unit step holds a secret inside—
An arithmetic stair on a triangular ride.
One million, one thousand: the answer rings true,
In English and Thai, for both me and for you! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly summarizes the main change: adding a nested floor-ceiling integral problem (calc-001) with solutions in both English and Thai.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #7: adds both English and Thai problem files with complete solutions and updates the README index.
Out of Scope Changes check ✅ Passed All changes are within scope—only problem files and README were modified, with no unexpected changes to source code or scripts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch problem/calc-001-nested-floor-ceil-integral

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@problems/calc-001-nested-floor-ceil-integral-th.typ`:
- Around line 248-250: The general formula N(N+1) presented in the integral
derivation needs to explicitly state its domain constraints. Add a clarification
that N must be a non-negative integer when introducing the formula "integral_0^N
(dots.c) dif x = N(N+1)" to prevent ambiguity and avoid readers mistakenly
assuming this formula applies to all real values of N. This can be done by
adding a note or condition immediately following or preceding the formula
statement.

In `@problems/calc-001-nested-floor-ceil-integral.typ`:
- Around line 249-251: The general formula presented for the integral (where the
result equals N(N+1)) currently lacks specification of its domain restrictions.
Add a clear statement that this closed form is valid only for non-negative
integers N (N ∈ ℤ≥0) in the context of the staircase-sum framing. This should be
included in the paragraph or formula block around line 249-251 to prevent
misinterpretation that this formula applies to arbitrary real values of N.
- Line 220: In the trap explanation paragraph starting with "If one
misinterprets...", change the reference from "sixth term" to "fifth term"
because the ceiling function term being discussed is actually the fifth term in
the derivation, not the sixth. This correction ensures the trap description
accurately aligns with which term creates the deceptive symmetric pairing with
the floor term.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c0e8f4e-f843-44a3-9d56-4b1f65a17b17

📥 Commits

Reviewing files that changed from the base of the PR and between b42defb and 0fe1fb8.

📒 Files selected for processing (3)
  • README.md
  • problems/calc-001-nested-floor-ceil-integral-th.typ
  • problems/calc-001-nested-floor-ceil-integral.typ

Comment thread problems/calc-001-nested-floor-ceil-integral-th.typ Outdated
Comment thread problems/calc-001-nested-floor-ceil-integral.typ Outdated
Comment thread problems/calc-001-nested-floor-ceil-integral.typ Outdated
@izolyte izolyte merged commit 0aac680 into main Jun 20, 2026
3 checks passed
@izolyte izolyte deleted the problem/calc-001-nested-floor-ceil-integral branch June 20, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add(calc-001): nested floor–ceiling integral from MIT Integration Bee 2026

1 participant