# Question 7246: One Output Replacement and Range Additions/Removals

[Return to catalogue page 37](https://ocme.evemisslab.com/en/questions/page/37/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261011-advance-20261015-r03-domain-codomain-range-foundations/#q-20261011-advance-20261015-r03-domain-codomain-range-0071)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0013-07246 · q-20261011-advance-20261015-r03-domain-codomain-range-0071



## Original question and givens

Fin(3)={0,…,2} is the source and Fin(8)={0,…,7} the codomain; complete typed images=[4, 2, 5] are indexed from 0. All entries must be typed, even unused ones. Replace at=0 by new value=7, after checking the whole original table. Give (old output, new table, new range, disappeared values, added values, m).


- G001 — Fin(3)={0,…,2} is the source and Fin(8)={0,…,7} the codomain; complete typed images=[4, 2, 5] are indexed from 0. All entries must be typed, even unused ones. Replace at=0 by new value=7, after checking the whole original table. Give (old output, new table, new range, disappeared values, added values, m).





## 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.


- [mko-domain-codomain-range](https://ocme.evemisslab.com/en/mko/mko-domain-codomain-range/)





## Step-by-step derivation

S001 · impliesBefore

declared types Fin(3)→Fin(8);0-based source labels

After

domain,codomain and actual range remain distinct

Conditions: none

Fin(0) is empty;a complete total table is not a partial program function,and its actual range need not equal its declared codomain.This audits finite data,not general infinite-set theorems.

Step identifiers and dependenciesRule: typed_domain_codomain_data_scope · Uses: G001





S002 · impliesBefore

source index=0∈Fin(3)

After

image[0]=4∈Fin(8)

Conditions: none

First type-check every cell of the complete original table,not only cells queried later.

Step identifiers and dependenciesRule: typed_complete_original_table_row · Uses: G001, S001





S003 · impliesBefore

source index=1∈Fin(3)

After

image[1]=2∈Fin(8)

Conditions: none

First type-check every cell of the complete original table,not only cells queried later.

Step identifiers and dependenciesRule: typed_complete_original_table_row · Uses: G001, S002





S004 · impliesBefore

source index=2∈Fin(3)

After

image[2]=5∈Fin(8)

Conditions: none

First type-check every cell of the complete original table,not only cells queried later.

Step identifiers and dependenciesRule: typed_complete_original_table_row · Uses: G001, S003





S005 · impliesBefore

old table=[4, 2, 5];at=0;new value=7

After

old output=4;new table=[7, 2, 5]

Conditions: none

Replace only the designated original cell and retain all others.An identical replacement changes nothing;the original source data are not mutated in place.

Step identifiers and dependenciesRule: typed_single_output_replacement · Uses: G001, S004





S006 · impliesBefore

old range=[2, 4, 5];new range=[2, 5, 7]

After

lost=[4];added=[7];declared m=8

Conditions: none

An old value remains if another input still hits it;a replacement value already hit is not new.The declared codomain size m does not change.

Step identifiers and dependenciesRule: typed_replacement_range_difference · Uses: G001, S005









## Reverse checks


- S006 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- 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 — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S003 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.





## Result

(4, [7, 2, 5], [2, 5, 7], [4], [7], 8)

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: f43d7bfa94a769262bacca2a7066b0e254a47edad9caf9a5a84da63e7bc905cb
- candidate record SHA-256: 508e23b3865745b4e8bf943317f7a0e8a32e89fd6b07bf571382d04799c1e743
- semantic review receipt SHA-256: e89fc6d4a50a4a7fc942c6c8939a92f835e30105a9a5850e37dd198f31c1ed59
- question-first witness SHA-256: 0e1039f4cf022bf35af4e5531651c9a2b7ca7a5fdacac34fb1e4bcd9a81f6299
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261011-advance-20261015-r03-domain-codomain-range-0071.json)




