Download data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWalkNormalization.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.48 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWalkNormalization.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWalkNormalization.lean
-
curl -L -o ClosedWalkNormalization.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWalkNormalization.lean
4.48 kB
| import OAI.NumberTheory.TwoPoint.Bounds.IntegerShiftGeometry | |
| namespace OAI | |
| /-! Exact normalization of a closed numerical word, counting repeated visits. -/ | |
| namespace TwoPointCorrelations | |
| open scoped Classical | |
| /-- Multiply departure-indexed edge coefficients along the actual integer walk. -/ | |
| noncomputable def scalarWalkProduct (h : β) (weight : SignedStep β β€ β β) | |
| (n : β€) : List SignedStep β β | |
| | [] => 1 | |
| | a :: w => weight a n * scalarWalkProduct h weight (n + a.displacement h) w | |
| lemma scalarWalkProduct_mul (h : β) (a b : SignedStep β β€ β β) | |
| (n : β€) (w : List SignedStep) : | |
| scalarWalkProduct h (fun t x => a t x * b t x) n w = | |
| scalarWalkProduct h a n w * scalarWalkProduct h b n w := by | |
| induction w generalizing n with | |
| | nil => simp [scalarWalkProduct] | |
| | cons t w ih => simp only [scalarWalkProduct, ih]; ring | |
| lemma scalarWalkProduct_congr (h : β) {a b : SignedStep β β€ β β} | |
| (hab : β t x, a t x = b t x) (n : β€) (w : List SignedStep) : | |
| scalarWalkProduct h a n w = scalarWalkProduct h b n w := by | |
| have he : a = b := funext (fun t => funext (hab t)) | |
| rw [he] | |
| /-- Each visit contributes its denominator once at departure and once | |
| at arrival; the only uncancelled factors lie at the two endpoints. -/ | |
| theorem scalarWalkProduct_normalize (h : β) (a : SignedStep β β€ β β) | |
| (g : β€ β β) (hg : β n, g n β 0) (n : β€) (w : List SignedStep) : | |
| scalarWalkProduct h (fun t x => a t x / (g x * g (x + t.displacement h))) n w = | |
| scalarWalkProduct h (fun t x => a t x / (g x) ^ 2) n w * | |
| g n / g (n + wordDisplacement h w) := by | |
| induction w generalizing n with | |
| | nil => simp [scalarWalkProduct, hg] | |
| | cons t w ih => | |
| rw [scalarWalkProduct, ih, scalarWalkProduct, wordDisplacement_cons] | |
| rw [β add_assoc] | |
| field_simp [hg n, hg (n + t.displacement h), | |
| hg (n + t.displacement h + wordDisplacement h w)] | |
| /-- On a closed word, the exact original edge denominators become the | |
| product of departure weights. Repeated sites remain repeated factors. -/ | |
| theorem scalarWalkProduct_closed_normalize (h : β) (a : SignedStep β β€ β β) | |
| (g : β€ β β) (hg : β n, g n β 0) (n : β€) (w : List SignedStep) | |
| (hclosed : wordDisplacement h w = 0) : | |
| scalarWalkProduct h (fun t x => a t x / (g x * g (x + t.displacement h))) n w = | |
| scalarWalkProduct h (fun t x => a t x / (g x) ^ 2) n w := by | |
| rw [scalarWalkProduct_normalize h a g hg, hclosed, add_zero, mul_div_cancel_rightβ _ (hg n)] | |
| /-- Keep every arithmetic, vertex, and orientation condition while moving | |
| the exact matrix denominator to the departure site. -/ | |
| theorem signedIntegerWeight_closed_normalize (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (center : SignedStep β β€ β β) (L K : β) | |
| (extra : SignedStep β β€ β Prop) (h : β) (n : β€) (w : List SignedStep) | |
| (hg : β n, g n β 0) | |
| (hperiod : β t, β q β Q, β z, center t (z + (h * q * t.tuple : β)) = center t z) | |
| (hclosed : wordDisplacement h w = 0) : | |
| scalarWalkProduct h (fun t x => | |
| signedIntegerWeight Q u (eligible t) g (center t) L K (extra t) h t x) n w = | |
| scalarWalkProduct h (fun t x => | |
| if t.padding β Q β§ eligible t t.padding β§ (t.padding : β€) β£ x β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) x β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) (x + t.displacement h) | |
| then L * u t.padding * center t x / (g x) ^ 2 else 0) n w := by | |
| let a : SignedStep β β€ β β := fun t x => | |
| if t.padding β Q β§ eligible t t.padding β§ (t.padding : β€) β£ x β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) x β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) (x + t.displacement h) | |
| then L * u t.padding * center t x else 0 | |
| calc | |
| _ = scalarWalkProduct h (fun t x => a t x / (g x * g (x + t.displacement h))) n w := by | |
| apply scalarWalkProduct_congr | |
| intro t x | |
| rw [signedIntegerWeight_departure Q u (eligible t) g (center t) L K (extra t) h t x | |
| (hperiod t)] | |
| dsimp only [a] | |
| split_ifs <;> simp | |
| _ = scalarWalkProduct h (fun t x => a t x / (g x) ^ 2) n w := | |
| scalarWalkProduct_closed_normalize h a g hg n w hclosed | |
| _ = _ := by | |
| apply scalarWalkProduct_congr | |
| intro t x | |
| dsimp only [a] | |
| split_ifs <;> simp | |
| end TwoPointCorrelations | |
| end OAI | |