Download data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/BucketProgramRank.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.72 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/BucketProgramRank.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/BucketProgramRank.lean
-
curl -L -o BucketProgramRank.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/BucketProgramRank.lean
2.72 kB
| import OAI.Algorithms.SubexponentialSAT.LeanCompat | |
| import OAI.Algorithms.SubexponentialSAT.SqrtLog.BucketProgramAttained | |
| import OAI.Algorithms.SubexponentialSAT.SqrtLog.LayoutRankSignature | |
| namespace OAI.Algorithms | |
| /-! Rank bounds the number of actual stored buckets. The primitive machine | |
| still processes all rows and its serialization costs use their full count. -/ | |
| namespace SubexponentialSAT.SqrtLog.BucketProgram | |
| theorem attainedKeys_signed_length_le_rank {h d : β} | |
| (W : List Bool) (pairs : Fin d β Fin h β SignedWord) (A : Fin d β Fin h β β€) | |
| {ys : List (List (List Bool))} (js : List β) (n H : β) | |
| (hy : List.Forallβ (List.Forallβ (shiftedWord W)) | |
| (List.ofFn (fun j => List.ofFn (pairs j))) ys) | |
| (hN : β j i,SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).2 β€ SubexponentialSAT.BinaryArithmetic.toNat W) | |
| (hA : β j i,(SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).1 : β€)- | |
| (SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).2 : β€)=A j i) | |
| (hbound : β j i,|A j i| β€ (H:β€)) : | |
| (attainedKeys (Label.labelled W ys js n (assignments h))).length β€ | |
| (2*h*H+1)^LayoutRank.rowRank A := by | |
| have hc := attainedKeys_signed_length_le_signature_range W pairs A js n hy hN hA | |
| have hr := LayoutSignatureBound.card_range_boolSignature_le_rank A H hbound | |
| exact hc.trans (by simpa using hr) | |
| /-- This is the exact list passed to the stored bucket encoder by Controller: | |
| all labelled assignments in forward order, with deduplicated keys obtained | |
| from reverse record order. Its length obeys the rational rank bound. -/ | |
| theorem storedTable_length_le_rank {h d : β} | |
| (W : List Bool) (pairs : Fin d β Fin h β SignedWord) (A : Fin d β Fin h β β€) | |
| {ys : List (List (List Bool))} (js : List β) (n H : β) | |
| (hy : List.Forallβ (List.Forallβ (shiftedWord W)) | |
| (List.ofFn (fun j => List.ofFn (pairs j))) ys) | |
| (hN : β j i,SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).2 β€ SubexponentialSAT.BinaryArithmetic.toNat W) | |
| (hA : β j i,(SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).1 : β€)- | |
| (SubexponentialSAT.BinaryArithmetic.toNat (pairs j i).2 : β€)=A j i) | |
| (hbound : β j i,|A j i| β€ (H:β€)) : | |
| (SubexponentialSAT.Subexp.PackingBucketTable.table | |
| (Label.labelled W ys js n (assignments h)) | |
| (attainedKeys (Label.labelled W ys js n (assignments h)).reverse)).length β€ | |
| (2*h*H+1)^LayoutRank.rowRank A := by | |
| simp only [SubexponentialSAT.Subexp.PackingBucketTable.table,List.length_map,attainedKeys_reverse_length] | |
| exact attainedKeys_signed_length_le_rank W pairs A js n H hy hN hA hbound | |
| end SubexponentialSAT.SqrtLog.BucketProgram | |
| end OAI.Algorithms | |