Download data/lean/OAI/NumberTheory/TwoPoint/Walks/BlockEdgeForm.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/BlockEdgeForm.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Walks/BlockEdgeForm.lean
-
curl -L -o BlockEdgeForm.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/BlockEdgeForm.lean
2.42 kB
| import OAI.NumberTheory.TwoPoint.Walks.BlockEndpointSum | |
| namespace OAI | |
| /-! The finite directed matrix form is the overlapping edge-block sum | |
| used in the prefix comparison, with no residual multiplicity assumption. -/ | |
| namespace TwoPointCorrelations | |
| open Finset | |
| open scoped Classical | |
| theorem directed_block_form_eq {E : Type*} [Fintype E] (r : E β β) | |
| (F : E β β€ β β€ β β) | |
| (hsupport : β (e : E) (n m : β€), m β n + r e β F e n m = 0) (M t : β) : | |
| (β e : E, β i : Fin M, β j : Fin M, | |
| F e ((i.val : β€) + (t + 2 : β)) ((j.val : β€) + (t + 2 : β))) = | |
| edgeBlockSum univ r (fun e n => F e n ((n : β€) + r e)) M t := by | |
| let g (i : β) := β e : E, if i + r e < M then | |
| F e ((i : β€) + (t + 2 : β)) ((i : β€) + (t + 2 : β) + r e) else 0 | |
| calc | |
| _ = β i : Fin M, β e : E, β j : Fin M, | |
| F e ((i.val : β€) + (t + 2 : β)) ((j.val : β€) + (t + 2 : β)) := sum_comm | |
| _ = β i : Fin M, g i.val := by | |
| apply sum_congr rfl | |
| intro i _ | |
| apply sum_congr rfl | |
| intro e _ | |
| exact block_supported_edge_sum M (r e) (t + 2 : β) (F e) (hsupport e) i | |
| _ = β i β range M, g i := Fin.sum_univ_eq_sum_range g M | |
| _ = _ := by | |
| unfold edgeBlockSum g | |
| apply sum_congr rfl | |
| intro i _ | |
| apply sum_congr rfl | |
| intro e _ | |
| have he : i + r e < M β i + 1 + r e β€ M := by omega | |
| simp only [he, Nat.cast_add, Nat.cast_ofNat] | |
| simp only [add_assoc, add_left_comm, add_comm] | |
| theorem directed_block_form_prefix_error {E : Type*} [Fintype E] | |
| (r : E β β) (F : E β β€ β β€ β β) | |
| (hsupport : β (e : E) (n m : β€), m β n + r e β F e n m = 0) | |
| (M R N : β) (hM : 0 < M) (hN : 0 < N) (D : β) (hD : 0 β€ D) | |
| (hr : β e, r e β€ R) | |
| (hrow : β n : β, 0 < n β (β e : E, βF e n ((n : β€) + r e)β) β€ D) : | |
| β((β t β range N, β e : E, β i : Fin M, β j : Fin M, | |
| F e ((i.val : β€) + (t + 2 : β)) ((j.val : β€) + (t + 2 : β))) / (M : β)) / (N : β) - | |
| positivePrefix (fun n => β e : E, F e n ((n : β€) + r e)) N / (N : β)β β€ | |
| (R : β) / M * D + 2 * (M : β) / N * D := by | |
| have hb := edgeBlockSum_prefix_error univ r (fun e n => F e n ((n : β€) + r e)) | |
| M R N hM hN D hD (fun e _ => hr e) hrow | |
| simpa only [directed_block_form_eq r F hsupport] using hb | |
| end TwoPointCorrelations | |
| end OAI | |