openAI-math-dataset / lean /OAI /Combinatorics /ContingencyTables /Transport /BooleanCountTransport.lean
Download lean/OAI/Combinatorics/ContingencyTables/Transport/BooleanCountTransport.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/ContingencyTables/Transport/BooleanCountTransport.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Combinatorics/ContingencyTables/Transport/BooleanCountTransport.lean
-
curl -L -o BooleanCountTransport.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/ContingencyTables/Transport/BooleanCountTransport.lean
905 Bytes
| import OAI.Combinatorics.ContingencyTables.Sampling.ProfileTransitionCount | |
| namespace OAI | |
| /-! # A completion-coordinate change in the finite transition count -/ | |
| namespace ContingencyTables.IntegerLaw | |
| open scoped BigOperators Classical | |
| noncomputable section | |
| lemma booleanFinish_equiv_count {A B C : Type*} [Fintype A] [Fintype B] [Fintype C] | |
| [DecidableEq C] {s f Q : ℕ} (p : IntegerLaw A (2^f)) (q : IntegerLaw B Q) | |
| (e : A ≃ B) (M : ℕ) (finish : (Fin s → Bool) → B → C) | |
| (h : ∀ a,p.count a=q.count (e a)*M) (c : C) : | |
| (booleanFinish p (fun bits a => finish bits (e a))).count c= | |
| ∑ bits : Fin s → Bool,∑ b,if finish bits b=c then q.count b*M else 0 := by | |
| rw [booleanFinish_count] | |
| simp_rw [h] | |
| apply Finset.sum_congr rfl | |
| intro bits _ | |
| exact e.sum_comp (fun b : B => if finish bits b=c then q.count b*M else 0) | |
| end | |
| end ContingencyTables.IntegerLaw | |
| end OAI | |