Buckets:
| import OAI.Combinatorics.LowSpaceSubsetSum.Representation.RepresentationKeys | |
| import OAI.Combinatorics.LowSpaceSubsetSum.Representation.RepresentationSamplerCoupling | |
| namespace OAI | |
| /-! # Reading the sampled sign bits into a bounded stored mask -/ | |
| namespace LowSpaceSubsetSum.SignMaskExecution | |
| def run (n : ℕ) (bits : Fin n → Bool) : IndexedMask n × ℕ := | |
| let indices := (List.finRange n).filter bits | |
| (⟨indices, by | |
| simpa only [List.length_finRange] using List.length_filter_le bits (List.finRange n)⟩, | |
| 4 * n + 2) | |
| theorem value (n : ℕ) (bits : Fin n → Bool) : | |
| (run n bits).1.semantic = bitsSubsetEquiv n bits := by | |
| ext i | |
| simp only [run, IndexedMask.semantic, List.mem_toFinset, List.mem_filter, | |
| List.mem_finRange, true_and, bitsSubsetEquiv, Equiv.coe_fn_mk, Finset.mem_filter, | |
| Finset.mem_univ] | |
| theorem work (n : ℕ) (bits : Fin n → Bool) : (run n bits).2 = 4 * n + 2 := rfl | |
| def cells (n : ℕ) (bits : Fin n → Bool) : ℕ := | |
| n + (run n bits).1.indices.length + 4 | |
| theorem cells_le (n : ℕ) (bits : Fin n → Bool) : cells n bits ≤ 2 * n + 4 := by | |
| have h := (run n bits).1.length_le | |
| unfold cells | |
| omega | |
| end LowSpaceSubsetSum.SignMaskExecution | |
| end OAI | |
Xet Storage Details
- Size:
- 1.21 kB
- Xet hash:
- 59481683279f42400c2fd9fd54a9ea8e0fd9e38ed86860eec3abbf4846995df9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.