Explore related knowledge and questions →

Question 4738: Outer and Lexically Shadowed Values

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 24

← Question derivation index · Original question batch

R0008-04738 · q-20261008-advance-20261011-r03-variable-expression-0063

Original question and givens

All operations and evaluations are exact in Q, not truncated natural-number arithmetic. Outer x=0, locally shadowing inner x=-11, c=-2. Give (outer x+c, inner x+c) as integers; the inner binding does not mutate the outer one.

  • G001 — All operations and evaluations are exact in Q, not truncated natural-number arithmetic. Outer x=0, locally shadowing inner x=-11, c=-2. Give (outer x+c, inner x+c) as integers; the inner binding does not mutate the outer one.

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

typed rational expression and explicitly given environment

After

evaluation,not solving an equation

Conditions: none

Evaluating an expression is not solving an equation;substitute only the supplied environment without inventing roots or changing bindings.

Step identifiers and dependencies

Rule: expression_environment_scope · Uses: G001

S002 · calculation

Before

outer x+c := sum(0, -2)

After

outer x+c = -2

Conditions: none

The outer expression uses its own x binding.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S001

S003 · calculation

Before

inner x+c := sum(-11, -2)

After

inner x+c = -13

Conditions: none

The inner expression uses its local shadowing binding.

Step identifiers and dependencies

Rule: exact_rational_arithmetic · Uses: G001, S002

S004 · implies

Before

outer x=0;local inner x=-11

After

outer x after inner evaluation=0

Conditions: none

Local shadowing is not assignment to the outer variable;the original outer binding survives the inner evaluation.

Step identifiers and dependencies

Rule: lexical_shadow_no_outer_mutation · Uses: G001, S003

Reverse checks

  • S004 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
  • S003 · premise_and_result_audit — Recompute inner x+c with exact rational arithmetic, not rounded decimals.
  • S002 · premise_and_result_audit — Recompute outer x+c 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

(-2, -13)

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: 00c85adb40f3ea4ec2f33c9e67e2037bba07fd6beee99d5a62abca9ce74cae09
  • candidate record SHA-256: 14d856c8342dceaaaeade6154c9cdaa512145aac8e4737c9c749a79bf171cf56
  • semantic review receipt SHA-256: b6e05a3e8193a93db505dbf337528fca72e2e41528b1e92b698a3f0683d74289
  • question-first witness SHA-256: caa8693baf0b91acd09a20215d1aa6954ae513fc0b0814f26ac1c8c834b60d67
  • Lean: NOT_RUN · human review: NOT_PERFORMED
Same-source full JSON