Original question and givens
First f, then g: Fin(5)={0,…,4}, middle=Fin(3)={0,…,2}, target=Fin(3)={0,…,2}. Complete f=[0, 2, 0, 0, 2]; g has original ordered dom=[2, 0] paired with g values=[1, 2]. 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(5)={0,…,4}, middle=Fin(3)={0,…,2}, target=Fin(3)={0,…,2}. Complete f=[0, 2, 0, 0, 2]; g has original ordered dom=[2, 0] paired with g values=[1, 2]. Give ([n,m,k], sorted dom, allowed source indices, aligned outputs, rejected source indices); retain the original dom/g pairing.
Step-by-step derivation
S001 · implies
Before
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 dependencies
Rule: R60_EXACT_perbank_operation_domain_FRAME_and_output_roles · Uses: G001
S002 · implies
Before
source roles = [f, 5, 3, [0, 2, 0, 0, 2]]
After
derived = [[0, 2, 0, 0, 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 dependencies
Rule: Composition_WHOLE_typed_table_ALL_cells_including_unused · Uses: G001, S001
S003 · implies
Before
source roles = [g ORIGINAL dom-slot table, 2, 3, [1, 2]]
After
derived = [[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 dependencies
Rule: Composition_WHOLE_typed_table_ALL_cells_including_unused · Uses: G001, S002
S004 · implies
Before
source roles = [0, 0, [2, 0], [1, 2], 3]
After
derived = [Yes, 2]
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 dependencies
Rule: Composition_restricted_EACH_source_guard_ORIGINAL_dom_g_pairing · Uses: G001, S003
S005 · implies
Before
source roles = [1, 2, [2, 0], [1, 2], 3]
After
derived = [Yes, 1]
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 dependencies
Rule: Composition_restricted_EACH_source_guard_ORIGINAL_dom_g_pairing · Uses: G001, S004
S006 · implies
Before
source roles = [2, 0, [2, 0], [1, 2], 3]
After
derived = [Yes, 2]
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 dependencies
Rule: Composition_restricted_EACH_source_guard_ORIGINAL_dom_g_pairing · Uses: G001, S005
S007 · implies
Before
source roles = [3, 0, [2, 0], [1, 2], 3]
After
derived = [Yes, 2]
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 dependencies
Rule: Composition_restricted_EACH_source_guard_ORIGINAL_dom_g_pairing · Uses: G001, S006
S008 · implies
Before
source roles = [4, 2, [2, 0], [1, 2], 3]
After
derived = [Yes, 1]
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 dependencies
Rule: Composition_restricted_EACH_source_guard_ORIGINAL_dom_g_pairing · Uses: G001, S007
S009 · implies
Before
source roles = [5, 3, 3, [0, 2, 0, 0, 2], [2, 0], [1, 2]]
After
derived = [[0, 2], [0, 1, 2, 3, 4], [2, 1, 2, 2, 1], []]
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 dependencies
Rule: Composition_restricted_COMPLETE_allowed_outputs_rejected_partition · Uses: G001, S008
Result
([5, 3, 3], [0, 2], [0, 1, 2, 3, 4], [2, 1, 2, 2, 1], [])
The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.