Download data/lean/OAI/Combinatorics/MatrixRemoval/CopyBoundFixed.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatrixRemoval/CopyBoundFixed.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/MatrixRemoval/CopyBoundFixed.lean
-
curl -L -o CopyBoundFixed.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatrixRemoval/CopyBoundFixed.lean
3.34 kB
| import OAI.Combinatorics.MatrixRemoval.Model | |
| import OAI.Combinatorics.MatrixRemoval.CopyBound | |
| namespace OAI | |
| namespace Problem348 | |
| /-- Ordered-copy specialization of the generic constrained-cell bound. -/ | |
| theorem copyCount_le_of_cell_mem {k n : β} | |
| (H : BinaryMatrix (k + 1)) (A : BinaryMatrix n) | |
| (i j : Fin (k + 1)) (L : Finset (Fin n Γ Fin n)) | |
| (hL : β rc β orderedCopies H A, (rc.1.val i, rc.2.val j) β L) : | |
| copyCount H A β€ L.card * n ^ (2 * k) := | |
| CopyBound.card_le_card_mul_pow (orderedCopies H A) i j L hL | |
| /-- Locate the top-left body entry (zero-based index 64) to count fixed-H copies. -/ | |
| theorem fixedCopyCount_le_of_body_cell_mem {n : β} | |
| (A : BinaryMatrix n) (L : Finset (Fin n Γ Fin n)) | |
| (hL : β rc β orderedCopies fixedH A, (rc.1.val 64, rc.2.val 64) β L) : | |
| copyCount fixedH A β€ L.card * n ^ 130 := | |
| copyCount_le_of_cell_mem fixedH A 64 64 L hL | |
| /-- The copy bound reduced to concrete leaf localization. -/ | |
| theorem fixedCopyDensity_le_of_body_cell_mem {d m : β} | |
| (hd : 0 < d) (hm : 0 < m) (A : BinaryMatrix (d * m)) | |
| (L : Finset (Fin (d * m) Γ Fin (d * m))) (hcard : L.card β€ m) | |
| (hL : β rc β orderedCopies fixedH A, (rc.1.val 64, rc.2.val 64) β L) : | |
| (copyCount fixedH A : β) / (((d * m : β) : β) ^ 132) β€ | |
| (1 / ((d : β) ^ 2)) * (1 / (m : β)) := by | |
| apply CopyBound.normalized_count_le hd hm | |
| exact (fixedCopyCount_le_of_body_cell_mem A L hL).trans | |
| (Nat.mul_le_mul_right _ hcard) | |
| /-- The exact numerical upper bound appearing in counterexample_sequence. -/ | |
| theorem sequenceCopyDensity_le_of_body_cell_mem (h : β) | |
| (A : BinaryMatrix ((386 * h + 2) * 2 ^ h)) | |
| (L : Finset | |
| (Fin ((386 * h + 2) * 2 ^ h) Γ Fin ((386 * h + 2) * 2 ^ h))) | |
| (hcard : L.card β€ 2 ^ h) | |
| (hL : β rc β orderedCopies fixedH A, (rc.1.val 64, rc.2.val 64) β L) : | |
| (copyCount fixedH A : β) / ((((386 * h + 2) * 2 ^ h : β) : β) ^ 132) β€ | |
| (1 / (((386 * h + 2 : β) : β) ^ 2)) * (1 / ((2 : β) ^ h)) := by | |
| simpa only [Nat.cast_pow, Nat.cast_ofNat] using | |
| fixedCopyDensity_le_of_body_cell_mem (by omega : 0 < 386 * h + 2) | |
| (by positivity : 0 < 2 ^ h) A L hcard hL | |
| /-- A localization witness is enough; no separate leaf-cell set or injectivity | |
| proof is required for the upper bound. Images can only decrease cardinality. -/ | |
| theorem sequenceCopyDensity_le_of_leaf_witness (h : β) | |
| (A : BinaryMatrix ((386 * h + 2) * 2 ^ h)) | |
| (rowLeaf colLeaf : Fin (2 ^ h) β Fin ((386 * h + 2) * 2 ^ h)) | |
| (hloc : β r c : IncreasingMap 66 ((386 * h + 2) * 2 ^ h), | |
| (β i j, A (r.val i) (c.val j) = fixedH i j) β | |
| β z, r.val 64 = rowLeaf z β§ c.val 64 = colLeaf z) : | |
| (copyCount fixedH A : β) / ((((386 * h + 2) * 2 ^ h : β) : β) ^ 132) β€ | |
| (1 / (((386 * h + 2 : β) : β) ^ 2)) * (1 / ((2 : β) ^ h)) := by | |
| classical | |
| let L := Finset.univ.image (fun z => (rowLeaf z, colLeaf z)) | |
| apply sequenceCopyDensity_le_of_body_cell_mem h A L | |
| Β· exact Finset.card_image_le.trans (by simp) | |
| Β· intro rc hrc | |
| have hentries : β i j, A (rc.1.val i) (rc.2.val j) = fixedH i j := | |
| (Finset.mem_filter.mp hrc).2 | |
| obtain β¨z, hrow, hcolβ© := hloc rc.1 rc.2 hentries | |
| exact Finset.mem_image.mpr β¨z, Finset.mem_univ _, by simp [hrow, hcol]β© | |
| end Problem348 | |
| end OAI | |