Download data/lean/OAI/MeasureTheory/Falconer/Recursion/BlockLeafCounts.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.06 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/Falconer/Recursion/BlockLeafCounts.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MeasureTheory/Falconer/Recursion/BlockLeafCounts.lean
-
curl -L -o BlockLeafCounts.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/Falconer/Recursion/BlockLeafCounts.lean
5.06 kB
| import OAI.MeasureTheory.Falconer.Recursion.BlockRegularization | |
| import OAI.MeasureTheory.Falconer.Recursion.PrefixCounting | |
| namespace OAI | |
| namespace PlanarFalconer | |
| noncomputable def blockBin (L : Finset CellPath) (F : CellPath β List β) | |
| (N B i : β) (p : CellPath) : β := | |
| 2 ^ Nat.log 2 (labeledChildren L F (blockDepth N B (i+1)) (blockDepth N B i) p).card | |
| noncomputable def blockProduct (L : Finset CellPath) (F : CellPath β List β) | |
| (N B i : β) (p : CellPath) : β := β j β Finset.range i, blockBin L F N B j p | |
| theorem blockBin_pos (L : Finset CellPath) (F : CellPath β List β) | |
| (N B i : β) (p : CellPath) : 0 < blockBin L F N B i p := by | |
| unfold blockBin; positivity | |
| theorem blockProduct_pos (L : Finset CellPath) (F : CellPath β List β) | |
| (N B i : β) (p : CellPath) : 0 < blockProduct L F N B i p := by | |
| exact Finset.prod_pos (fun j _ => blockBin_pos L F N B j p) | |
| theorem blockBin_le {N : β} {L : Finset CellPath} (hL : L β dyadicPaths N) | |
| (F : CellPath β List β) (B i : β) (p : CellPath) : | |
| blockBin L F N B i p β€ 4 ^ (blockDepth N B i-blockDepth N B (i+1)) := by | |
| have hlog := child_bin_le (blockDepth_antitone N B (Nat.le_succ i)) (Nat.sub_le _ _) hL F p | |
| have hp := Nat.pow_le_pow_right (by omega : 0 < 2) hlog | |
| simpa only [pow_mul, show (2:β)^2 = 4 by norm_num, blockBin] using hp | |
| theorem blockClass_child_bounds (L : Finset CellPath) (N B : β) (f : CellPath β List β) | |
| {K i : β} (hi : i < K) (p : CellPath) | |
| {P : CellPath} | |
| (hP : P β (classLeaves L (blockLabel L N B f K) (blockLabel L N B f K p)).image | |
| (List.take (blockDepth N B (i+1)))) : | |
| let F := blockLabel L N B f K | |
| let C := classLeaves L F (F p) | |
| blockBin L F N B i p β€ (prefixChildren C (blockDepth N B (i+1)) (blockDepth N B i) P).card β§ | |
| (prefixChildren C (blockDepth N B (i+1)) (blockDepth N B i) P).card β€ 2*blockBin L F N B i p := by | |
| classical | |
| dsimp only | |
| obtain β¨q,hq,rflβ© := Finset.mem_image.mp hP | |
| rw [prefixChildren_class_eq L _ _ _ hq] | |
| have hqL := (Finset.mem_filter.mp hq).1 | |
| have hclass := (Finset.mem_filter.mp hq).2 | |
| unfold blockBin | |
| rw [block_final_bin_eq L N B f hi hclass.symm] | |
| have hpos := Finset.card_pos.mpr (labeledChildren_nonempty | |
| (blockLabel L N B f K) (blockDepth N B (i+1)) (blockDepth N B i) hqL) | |
| refine β¨Nat.pow_log_le_self 2 (Nat.ne_of_gt hpos), ?_β© | |
| have hu := Nat.lt_pow_succ_log_self (by decide : 1 < 2) | |
| (labeledChildren L (blockLabel L N B f K) (blockDepth N B (i+1)) (blockDepth N B i) q).card | |
| simpa only [pow_succ, Nat.mul_comm] using hu.le | |
| theorem blockClass_leaf_count {N : β} {L : Finset CellPath} (hL : L β dyadicPaths N) | |
| (B : β) (f : CellPath β List β) (K : β) (p : CellPath) | |
| {i : β} (hi : i β€ K) {P : CellPath} | |
| (hP : P β (classLeaves L (blockLabel L N B f K) (blockLabel L N B f K p)).image | |
| (List.take (blockDepth N B i))) : | |
| let F := blockLabel L N B f K | |
| let C := classLeaves L F (F p) | |
| blockProduct L F N B i p β€ (prefixFiber C (blockDepth N B i) P).card β§ | |
| (prefixFiber C (blockDepth N B i) P).card β€ 2^i * blockProduct L F N B i p := by | |
| classical | |
| let F := blockLabel L N B f K | |
| let C := classLeaves L F (F p) | |
| have hC : C β dyadicPaths N := fun q hq => hL (Finset.mem_filter.mp hq).1 | |
| change blockProduct L F N B i p β€ (prefixFiber C (blockDepth N B i) P).card β§ | |
| (prefixFiber C (blockDepth N B i) P).card β€ 2^i * blockProduct L F N B i p | |
| change P β C.image (List.take (blockDepth N B i)) at hP | |
| induction i generalizing P with | |
| | zero => | |
| obtain β¨q,hq,rflβ© := Finset.mem_image.mp hP | |
| have hlen : q.length = N := (mem_dyadicPaths _ _).mp (hC hq) | |
| simp only [blockDepth, Nat.zero_mul, Nat.sub_zero, β hlen, List.take_length] | |
| rw [show q.length = N from hlen, prefixFiber_leaf hC hq] | |
| simp [blockProduct] | |
| | succ i ih => | |
| have hb := blockClass_child_bounds L N B f (by omega : i < K) p hP | |
| have hc := prefixFiber_count_bounds (blockDepth_antitone N B (Nat.le_succ i)) P hb | |
| (fun c hc => ih (by omega) (prefixChildren_mem_image hc)) | |
| dsimp only [blockProduct] at hc β’ | |
| rw [Finset.prod_range_succ] | |
| constructor | |
| Β· simpa only [Nat.mul_comm] using hc.1 | |
| Β· have hh := hc.2 | |
| convert hh using 1 | |
| ring | |
| theorem blockClass_root_count {N : β} {L : Finset CellPath} (hL : L β dyadicPaths N) | |
| {B : β} (hB : 0 < B) (f : CellPath β List β) {p : CellPath} (hp : p β L) : | |
| let K := N/B+1 | |
| let F := blockLabel L N B f K | |
| let C := classLeaves L F (F p) | |
| blockProduct L F N B K p β€ C.card β§ C.card β€ 2^K * blockProduct L F N B K p := by | |
| classical | |
| have hpC : p β classLeaves L (blockLabel L N B f (N/B+1)) (blockLabel L N B f (N/B+1) p) := by | |
| simp [classLeaves,hp] | |
| have hc := blockClass_leaf_count hL B f (N/B+1) p (le_refl (N/B+1)) | |
| (P := []) (by rw [blockDepth_terminal N hB]; exact Finset.mem_image.mpr β¨p,hpC,rflβ©) | |
| simpa only [blockDepth_terminal N hB, prefixFiber_zero] using hc | |
| end PlanarFalconer | |
| end OAI | |