# Question 30678: Restricted Middle Domain with Original Pairing Preserved

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261011-advance-20261015-r04-composition-foundations/#q-20261011-advance-20261015-r04-composition-0028)

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.

R0060-30678 · q-20261011-advance-20261015-r04-composition-0028



## Original question and givens

First f, then g: Fin(3)={0,…,2}, middle=Fin(3)={0,…,2}, target=Fin(0)=∅. Complete f=[0, 1, 2]; g has original ordered dom=[] paired with g values=[]. Give ([n,m,k], sorted dom, allowed source indices, aligned outputs, rejected source indices); retain the original dom/g pairing.


- G001 — First f, then g: Fin(3)={0,…,2}, middle=Fin(3)={0,…,2}, target=Fin(0)=∅. Complete f=[0, 1, 2]; g has original ordered dom=[] paired with g values=[]. Give ([n,m,k], sorted dom, allowed source indices, aligned outputs, rejected source indices); retain the original dom/g pairing.





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





## Step-by-step derivation

S001 · impliesBefore

source roles = [qf-density15-composition-restricted-table-domain, density15_composition_restricted_table_domain, finite_explicit_composition_protocol]

After

derived = [[dimensions, sorted_dom, allowed_source_indices, aligned_outputs, rejected_source_indices]]

Conditions: none

density14/15 use FULL-prefix underscores;density17 uses LOCAL hyphens.The coordinate and circle frames differ.Retain THIS family ordered answer roles/types and all original bilingual JSON/status.

Step identifiers and dependenciesRule: R60_EXACT_perbank_operation_domain_FRAME_and_output_roles · Uses: G001





S002 · impliesBefore

source roles = [f, 3, 3, [0, 1, 2]]

After

derived = [[0, 1, 2]]

Conditions: none

Require the WHOLE declared table length to equal its source size and EVERY cell to lie in Fin(m),including unused cells.Even an empty outer source cannot waive this complete table typing obligation.

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





S003 · impliesBefore

source roles = [g ORIGINAL dom-slot table, 0, 0, []]

After

derived = [[]]

Conditions: none

Require the WHOLE declared table length to equal its source size and EVERY cell to lie in Fin(m),including unused cells.Even an empty outer source cannot waive this complete table typing obligation.

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





S004 · impliesBefore

source roles = [0, 0, [], [], 0]

After

derived = [No, not_evaluated]

Conditions: none

Build the lookup from ORIGINAL dom/g slot pairing,THEN test whether f(x) belongs to dom.Evaluate g ONLY inside its domain,without an outside default0.Display sorting never changes pairing or original source indices.

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





S005 · impliesBefore

source roles = [1, 1, [], [], 0]

After

derived = [No, not_evaluated]

Conditions: none

Build the lookup from ORIGINAL dom/g slot pairing,THEN test whether f(x) belongs to dom.Evaluate g ONLY inside its domain,without an outside default0.Display sorting never changes pairing or original source indices.

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





S006 · impliesBefore

source roles = [2, 2, [], [], 0]

After

derived = [No, not_evaluated]

Conditions: none

Build the lookup from ORIGINAL dom/g slot pairing,THEN test whether f(x) belongs to dom.Evaluate g ONLY inside its domain,without an outside default0.Display sorting never changes pairing or original source indices.

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





S007 · impliesBefore

source roles = [3, 3, 0, [0, 1, 2], [], []]

After

derived = [[], [], [], [0, 1, 2]]

Conditions: none

Retain the COMPLETE allowed/rejected partition of ORIGINAL source inputs,aligning outputs to allowed indices.An empty dom may reject every input;g length is the dom length,NOT m.

Step identifiers and dependenciesRule: Composition_restricted_COMPLETE_allowed_outputs_rejected_partition · Uses: G001, S006









## Reverse checks


- S007 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S006 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S005 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S004 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S003 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S002 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.
- S001 · premise_and_result_audit — Reverse-check using the ORIGINAL data,types,indices and premises.Consistency auditing does not claim the conclusion uniquely determines its inputs.Keep finite candidates,independent review,formal proof and publication separate.





## Result

([3, 3, 0], [], [], [], [0, 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: 6ee57bb21014845cf3035a2f0bc0605f7bc770dcc9a98da34710250659cd0e2f
- candidate record SHA-256: 07cf8103cea89c32248dc4fafd21fbc47d0698d427d4acee38dd60dad475c8fa
- semantic review receipt SHA-256: d6b5a409bf933281a46617cd715d8016fd5ca3d6fb76f77d179ac2ecd9d608bf
- question-first witness SHA-256: f80ecf598c6893a580af018e1a82849b33ee6887efb48a6a1d69569aa17f12e4
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261011-advance-20261015-r04-composition-0028.json)




