# Question 5523: Typed Candidate Evaluation of a Total Map

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261008-advance-20261012-r07-function-mapping-foundations/#q-20261008-advance-20261012-r07-function-mapping-0073)

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.

R0010-05523 · q-20261008-advance-20261012-r07-function-mapping-0073



## Original question and givens

The complete total map f:Fin(2)→Fin(2) has images=[0, 1] indexed from 0; Fin(2)={0,…,1}. Every table entry must lie in the target type. Ordered queries=[100, 1, 1]. Give (legal-source-type mask, outputs for typed queries or ill-typed); do not evaluate f outside its source type.


- G001 — The complete total map f:Fin(2)→Fin(2) has images=[0, 1] indexed from 0; Fin(2)={0,…,1}. Every table entry must lie in the target type. Ordered queries=[100, 1, 1]. Give (legal-source-type mask, outputs for typed queries or ill-typed); do not evaluate f outside its source type.





## 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-function-mapping](https://ocme.evemisslab.com/en/mko/mko-function-mapping/)





## Step-by-step derivation

S001 · impliesBefore

f:Fin(2)→Fin(2);source indices start at0

After

complete total map,not a partial program function

Conditions: none

Every legal source element has one codomain value.Fin(0) is empty;an outside query is ill-typed,not a hole of a partial function at a legal input.

Step identifiers and dependenciesRule: total_finite_mapping_scope · Uses: G001





S002 · impliesBefore

f input=0∈Fin(2)

After

f(0)=0∈Fin(2)

Conditions: none

Audit source and codomain eligibility for every entry;an unqueried entry may not be illegal.

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





S003 · impliesBefore

f input=1∈Fin(2)

After

f(1)=1∈Fin(2)

Conditions: none

Audit source and codomain eligibility for every entry;an unqueried entry may not be illegal.

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





S004 · impliesBefore

query=100;0≤query<2=No

After

value=type mismatch

Conditions: none

Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value.

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





S005 · impliesBefore

query=1;0≤query<2=Yes

After

value=1

Conditions: none

Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value.

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





S006 · impliesBefore

query=1;0≤query<2=Yes

After

value=1

Conditions: none

Check source typing before table access;a negative index may not read the last entry,and an outside index may not acquire an invented f-value.

Step identifiers and dependenciesRule: mapping_query_type_guard · 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

([No, Yes, Yes], [ill-typed, 1, 1])

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: e2973ad9bd6be5b17b28b5b6ec8ddee3f12ba5370a23a5da9741f842f74c7a55
- candidate record SHA-256: fabc63e781f14a7843d52aa0acf671c8398d3e59999ed5092c34130341f35127
- semantic review receipt SHA-256: 0328166a2e335aac7a5fb34556e68c80ba7d16612e822b3999c8ac348a9ca06f
- question-first witness SHA-256: 0da18e4e6cf71ece5ec5f00dd0cd161217b6d251672bc0b46d79fe7e6253f5fc
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261008-advance-20261012-r07-function-mapping-0073.json)




