Explore related knowledge and questions →

Question 2768: Area of a Union of Two Half-Open Integer Rectangles

On this page
  1. Original question and givens
  2. Definition and scope
  3. Step-by-step derivation
  4. Reverse checks
  5. Result
  6. This question review and source binding

Return to catalogue page 14

← Question derivation index · Original question batch

R0004-02768 · q-20261005-advance-20261006-r06-area-0093

Original question and givens

Use one equal-unit orthonormal Euclidean Cartesian frame. A=[0, 4)×[0, 5) and B=[0, 4)×[0, 5) are half-open rectangles. Find area(A∪B) in squared length units.

  • G001 — Use one equal-unit orthonormal Euclidean Cartesian frame. A=[0, 4)×[0, 5) and B=[0, 4)×[0, 5) are half-open rectangles. Find area(A∪B) in squared length units.

Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.

Step-by-step derivation

S001 · implies

Before

orthonormal equal-length coordinate units;half-open regions

After

area in squared length units

Conditions: none

Axes are orthogonal with equal length units;half-open boundaries make adjacent unit cells disjoint.Area uses squared units,not length units.

Step identifiers and dependencies

Rule: half_open_area_convention · Uses: G001

S002 · calculation

Before

A width := sub(4, 0)

After

A width = 4

Conditions: none

Right minus left is the nonnegative width;translation of the origin contributes no area.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S001

S003 · calculation

Before

A height := sub(5, 0)

After

A height = 5

Conditions: none

Top minus bottom is the nonnegative height,using endpoints of the same rectangle.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S002

S004 · calculation

Before

A area := mul(4, 5)

After

A area = 20

Conditions: none

Rectangle area is width times height;a zero side makes the half-open rectangle empty,with area0.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S003

S005 · calculation

Before

B width := sub(4, 0)

After

B width = 4

Conditions: none

Right minus left is the nonnegative width;translation of the origin contributes no area.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S004

S006 · calculation

Before

B height := sub(5, 0)

After

B height = 5

Conditions: none

Top minus bottom is the nonnegative height,using endpoints of the same rectangle.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S005

S007 · calculation

Before

B area := mul(4, 5)

After

B area = 20

Conditions: none

Rectangle area is width times height;a zero side makes the half-open rectangle empty,with area0.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S006

S008 · calculation

Before

overlap raw width := sub(4, 0)

After

overlap raw width = 4

Conditions: none

Use the smaller right endpoint and larger left endpoint for the intersection.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S007

S009 · calculation

Before

overlap raw height := sub(5, 0)

After

overlap raw height = 5

Conditions: none

Use the inner vertical endpoints in the same way.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S008

S010 · implies

Before

raw overlap widths=(4,5)

After

nonnegative overlap widths=(4,5)

Conditions: none

Disjoint or edge-touching rectangles have intersection area0;two negative raw widths must not create a fictitious positive area.

Step identifiers and dependencies

Rule: empty_intersection_clamp · Uses: G001, S009

S011 · calculation

Before

intersection area := mul(4, 5)

After

intersection area = 20

Conditions: none

Multiply the clamped nonnegative intersection lengths.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S010

S012 · calculation

Before

sum of rectangle areas := sum(20, 20)

After

sum of rectangle areas = 40

Conditions: none

First add the rectangle areas;the intersection is then counted twice.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S011

S013 · calculation

Before

union area := sub(40, 20)

After

union area = 20

Conditions: none

Finite inclusion-exclusion subtracts the intersection once,so each region is counted once.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S012

S014 · implies

Before

A∪B=(A\B) disjoint-union B

After

area(A∪B)=20

Conditions: none

The rule covers containment,equal or empty rectangles,disjointness and overlap;plain addition is invalid when positive-area overlap exists.

Step identifiers and dependencies

Rule: rectangle_union_inclusion_exclusion · Uses: G001, S013

Reverse checks

  • S014 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S013 · premise_and_result_audit — Recompute union area with exact rational arithmetic, not rounded decimals.
  • S012 · premise_and_result_audit — Recompute sum of rectangle areas with exact rational arithmetic, not rounded decimals.
  • S011 · premise_and_result_audit — Recompute intersection area with exact rational arithmetic, not rounded decimals.
  • S010 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S009 · premise_and_result_audit — Recompute overlap raw height with exact rational arithmetic, not rounded decimals.
  • S008 · premise_and_result_audit — Recompute overlap raw width with exact rational arithmetic, not rounded decimals.
  • S007 · premise_and_result_audit — Recompute B area with exact rational arithmetic, not rounded decimals.
  • S006 · premise_and_result_audit — Recompute B height with exact rational arithmetic, not rounded decimals.
  • S005 · premise_and_result_audit — Recompute B width with exact rational arithmetic, not rounded decimals.
  • S004 · premise_and_result_audit — Recompute A area with exact rational arithmetic, not rounded decimals.
  • S003 · premise_and_result_audit — Recompute A height with exact rational arithmetic, not rounded decimals.
  • S002 · premise_and_result_audit — Recompute A width with exact rational arithmetic, not rounded decimals.
  • S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.

Result

20

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.

This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
  • input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
  • original question SHA-256: 687aaa948f09663e8fb089ec3be3b59cd5d13cac6fc197a4b2a61ab1d83ef2dd
  • candidate record SHA-256: 8700765f95cbf340ce6aee1c9d43d88a2020610942ec6ed313c7ea526665b313
  • semantic review receipt SHA-256: 312ae86315346b8955842a547cb2d09246e1f826755f72c2a51f042e5c7d5c56
  • question-first witness SHA-256: 831f449ed41ff9144a290e534aa32adf7252d15b81c16ed5886a7dfd65dee70c
  • Lean: NOT_RUN · human review: NOT_PERFORMED
Same-source full JSON