Explore related knowledge and questions →

Question 8287: Stable Rational Sort with Original Index Witnesses

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 42

← Question derivation index · Original question batch

R0015-08287 · q-20261012-advance-20261017-r04-order-relation-0012

Original question and givens

Use the usual total order on R, restricted to exact rational inputs whose original denominators are positive. Output reduced fractions with positive denominators, retaining /1; do not extrapolate to arbitrary partial orders or complex numbers. Ordered inputs=[-1/3, 1/2, -1/4]. Give (normalized inputs, stable sorted original indices, sorted values, adjacent comparison symbols). Equal values retain their original index order.

  • G001 — Use the usual total order on R, restricted to exact rational inputs whose original denominators are positive. Output reduced fractions with positive denominators, retaining /1; do not extrapolate to arbitrary partial orders or complex numbers. Ordered inputs=[-1/3, 1/2, -1/4]. Give (normalized inputs, stable sorted original indices, sorted values, adjacent comparison symbols). Equal values retain their original index order.

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

usual total order on R;all original denominators positive

After

closed endpoints included;negative scaling reverses;zero collapses

Conditions: none

These exact rationals use the usual real total order,not complex numbers or an arbitrary partial order.Original denominators must be positive;normalizing a negative input denominator does not waive that contract.

Step identifiers and dependencies

Rule: real_rational_order_scope · Uses: G001

S002 · calculation

Before

original pair0,1 left cross := mul(-1, 2)

After

original pair0,1 left cross = -2

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S001

S003 · calculation

Before

original pair0,1 right cross := mul(1, 3)

After

original pair0,1 right cross = 3

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S002

S004 · calculation

Before

original pair0,1 cross residual := sub(-2, 3)

After

original pair0,1 cross residual = -5

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S003

S005 · implies

Before

original pair0,1:fractions=[-1/3, 1/2]

After

cross residual=-5;comparison=<

Conditions: none

Reduced denominators are positive,so the cross-difference sign determines order.Retain equality and use original indices separately to break equal-value sorting ties.

Step identifiers and dependencies

Rule: rational_positive_denominator_comparison · Uses: G001, S004

S006 · calculation

Before

original pair0,2 left cross := mul(-1, 4)

After

original pair0,2 left cross = -4

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S005

S007 · calculation

Before

original pair0,2 right cross := mul(-1, 3)

After

original pair0,2 right cross = -3

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S006

S008 · calculation

Before

original pair0,2 cross residual := sub(-4, -3)

After

original pair0,2 cross residual = -1

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S007

S009 · implies

Before

original pair0,2:fractions=[-1/3, -1/4]

After

cross residual=-1;comparison=<

Conditions: none

Reduced denominators are positive,so the cross-difference sign determines order.Retain equality and use original indices separately to break equal-value sorting ties.

Step identifiers and dependencies

Rule: rational_positive_denominator_comparison · Uses: G001, S008

S010 · calculation

Before

original pair1,2 left cross := mul(1, 4)

After

original pair1,2 left cross = 4

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S009

S011 · calculation

Before

original pair1,2 right cross := mul(-1, 2)

After

original pair1,2 right cross = -2

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S010

S012 · calculation

Before

original pair1,2 cross residual := sub(4, -2)

After

original pair1,2 cross residual = 6

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S011

S013 · implies

Before

original pair1,2:fractions=[1/2, -1/4]

After

cross residual=6;comparison=>

Conditions: none

Reduced denominators are positive,so the cross-difference sign determines order.Retain equality and use original indices separately to break equal-value sorting ties.

Step identifiers and dependencies

Rule: rational_positive_denominator_comparison · Uses: G001, S012

S014 · calculation

Before

sorted adjacent0 left cross := mul(-1, 4)

After

sorted adjacent0 left cross = -4

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S013

S015 · calculation

Before

sorted adjacent0 right cross := mul(-1, 3)

After

sorted adjacent0 right cross = -3

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S014

S016 · calculation

Before

sorted adjacent0 cross residual := sub(-4, -3)

After

sorted adjacent0 cross residual = -1

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S015

S017 · implies

Before

sorted adjacent0:fractions=[-1/3, -1/4]

After

cross residual=-1;comparison=<

Conditions: none

Reduced denominators are positive,so the cross-difference sign determines order.Retain equality and use original indices separately to break equal-value sorting ties.

Step identifiers and dependencies

Rule: rational_positive_denominator_comparison · Uses: G001, S016

S018 · calculation

Before

sorted adjacent1 left cross := mul(-1, 2)

After

sorted adjacent1 left cross = -2

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S017

S019 · calculation

Before

sorted adjacent1 right cross := mul(1, 4)

After

sorted adjacent1 right cross = 4

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S018

S020 · calculation

Before

sorted adjacent1 cross residual := sub(-2, 4)

After

sorted adjacent1 cross residual = -6

Conditions: none

Substitute the source data exactly in the stated operand order;division requires a nonzero denominator.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S019

S021 · implies

Before

sorted adjacent1:fractions=[-1/4, 1/2]

After

cross residual=-6;comparison=<

Conditions: none

Reduced denominators are positive,so the cross-difference sign determines order.Retain equality and use original indices separately to break equal-value sorting ties.

Step identifiers and dependencies

Rule: rational_positive_denominator_comparison · Uses: G001, S020

S022 · implies

Before

normalized original values=[-1/3, 1/2, -1/4]

After

stable original indices=[0, 2, 1];sorted values=[-1/3, -1/4, 1/2]

Conditions: none

Preserve original index order when values tie.Repeated values remain separate entries rather than being deduplicated as a set.

Step identifiers and dependencies

Rule: stable_rational_original_index_sort · Uses: G001, S021

Reverse checks

  • S022 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S021 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S020 · premise_and_result_audit — Recompute sorted adjacent1 cross residual with exact rational arithmetic, not rounded decimals.
  • S019 · premise_and_result_audit — Recompute sorted adjacent1 right cross with exact rational arithmetic, not rounded decimals.
  • S018 · premise_and_result_audit — Recompute sorted adjacent1 left cross with exact rational arithmetic, not rounded decimals.
  • S017 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S016 · premise_and_result_audit — Recompute sorted adjacent0 cross residual with exact rational arithmetic, not rounded decimals.
  • S015 · premise_and_result_audit — Recompute sorted adjacent0 right cross with exact rational arithmetic, not rounded decimals.
  • S014 · premise_and_result_audit — Recompute sorted adjacent0 left cross with exact rational arithmetic, not rounded decimals.
  • S013 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S012 · premise_and_result_audit — Recompute original pair1,2 cross residual with exact rational arithmetic, not rounded decimals.
  • S011 · premise_and_result_audit — Recompute original pair1,2 right cross with exact rational arithmetic, not rounded decimals.
  • S010 · premise_and_result_audit — Recompute original pair1,2 left cross with exact rational arithmetic, not rounded decimals.
  • S009 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S008 · premise_and_result_audit — Recompute original pair0,2 cross residual with exact rational arithmetic, not rounded decimals.
  • S007 · premise_and_result_audit — Recompute original pair0,2 right cross with exact rational arithmetic, not rounded decimals.
  • S006 · premise_and_result_audit — Recompute original pair0,2 left cross with exact rational arithmetic, not rounded decimals.
  • S005 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S004 · premise_and_result_audit — Recompute original pair0,1 cross residual with exact rational arithmetic, not rounded decimals.
  • S003 · premise_and_result_audit — Recompute original pair0,1 right cross with exact rational arithmetic, not rounded decimals.
  • S002 · premise_and_result_audit — Recompute original pair0,1 left cross 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

([-1/3, 1/2, -1/4], [0, 2, 1], [-1/3, -1/4, 1/2], [<, <])

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: 48ccacc15535f73deec263d9d34c0e5cb76947980df634b6186de06cc3013ca8
  • candidate record SHA-256: 8e6c6072a77c627287319734734db8974cc0b8679d25eb25b974bf2af5e04943
  • semantic review receipt SHA-256: 6ecad9d909199221a07e923f87425e80b3bdec3eed46fe5910d04fca694cae18
  • question-first witness SHA-256: e8f00458977a09493b5f9f05ab9e6feec72debaf4c7d1c609d1fc95900a35a1b
  • Lean: NOT_RUN · human review: NOT_PERFORMED
Same-source full JSON