OAI/Combinatorics/ContingencyTables/Machines/BinaryExchangeProgram.lean
19 declarations, 0 contain sorry, 0 declared as axioms
Polynomial enumeration of exchanges of a binary profile
The program scans at most the square of the list length. It retains only an absent receiving coordinate and a present donating coordinate, so every retained natural-number update is again a binary profile.
- def
OAI.ContingencyTables.ProfilePrograms.binaryExchangeTestline 17 - def
OAI.ContingencyTables.ProfilePrograms.binaryExchangeTestRealizerline 20 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_binaryExchangeTestline 32 - def
OAI.ContingencyTables.ProfilePrograms.binaryExchangeIndicesline 46 - def
OAI.ContingencyTables.ProfilePrograms.binaryExchangeIndicesRealizerline 49 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_binaryExchangeIndicesline 53 - theorem
OAI.ContingencyTables.ProfilePrograms.mem_binaryExchangeIndicesline 58 - lemma
OAI.ContingencyTables.ProfilePrograms.cellPairs_nodupline 65 - theorem
OAI.ContingencyTables.ProfilePrograms.binaryExchangeIndices_nodupline 76 - def
OAI.ContingencyTables.ProfilePrograms.binaryExchangesline 79 - def
OAI.ContingencyTables.ProfilePrograms.binaryExchangesRealizerline 82 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_binaryExchangesline 85 - def
OAI.ContingencyTables.ProfilePrograms.setProfileline 89 - lemma
OAI.ContingencyTables.ProfilePrograms.setProfile_injectiveline 92 - theorem
OAI.ContingencyTables.ProfilePrograms.exchange_setProfileline 100Source documentation
On an absent/present coordinate pair, the natural update is exactly set removal followed by set insertion.
theorem exchange_setProfile {n : ℕ} (S : Set (Fin n)) (i j : Fin n) (hi : i∉S) (hj : j∈S) : IntegerWeightedTransport.exchangeTarget (setProfile S) i j= setProfile (insert i (S\{j})) := by …Mentions: OAI.ContingencyTables.IntegerWeightedTransport.exchangeTarget, OAI.ContingencyTables.ProfilePrograms.setProfile
- theorem
OAI.ContingencyTables.ProfilePrograms.mem_binaryExchanges_setProfileline 117Source documentation
Every program output is a genuine binary exchange, and all such exchanges are listed. No enumeration of the set of states is involved.
theorem mem_binaryExchanges_setProfile {n : ℕ} (S : Set (Fin n)) (ys : List ℕ) : ys∈binaryExchanges (List.ofFn (setProfile S)) ↔ ∃ i j : Fin n,i∉S ∧ j∈S ∧ ys=List.ofFn (setProfile (insert i (S\{j}))) := by …Mentions: OAI.ContingencyTables.ProfilePrograms.binaryExchanges, OAI.ContingencyTables.ProfilePrograms.setProfile
- lemma
OAI.ContingencyTables.ProfilePrograms.getD_setProfileline 152 - lemma
OAI.ContingencyTables.ProfilePrograms.binaryIndex_specsline 157 - theorem
OAI.ContingencyTables.ProfilePrograms.binaryExchanges_nodupline 176Source documentation
Distinct eligible coordinate pairs give distinct binary profiles.
theorem binaryExchanges_nodup {n : ℕ} (S : Set (Fin n)) : (binaryExchanges (List.ofFn (setProfile S))).Nodup := by …Mentions: OAI.ContingencyTables.ProfilePrograms.binaryExchanges, OAI.ContingencyTables.ProfilePrograms.setProfile