Download data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWordPadding.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWordPadding.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWordPadding.lean
-
curl -L -o ClosedWordPadding.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Walks/ClosedWordPadding.lean
5.07 kB
| import OAI.NumberTheory.TwoPoint.Bounds.ActualPaddingProduct | |
| namespace OAI | |
| /-! Separate the actual closed matrix word into centered factors and its retained padding weight. -/ | |
| namespace TwoPointCorrelations | |
| open Finset | |
| open scoped Classical | |
| noncomputable def retainedEdgeDeparture (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (L K : β) | |
| (extra : SignedStep β β€ β Prop) (h : β) (t : SignedStep) (n : β€) : β := | |
| if t.padding β Q β§ eligible t t.padding β§ (t.padding : β€) β£ n β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) n β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) (n + t.displacement h) | |
| then L * u t.padding / (g n) ^ 2 else 0 | |
| lemma retainedEdgeDeparture_nonneg (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (L K : β) | |
| (extra : SignedStep β β€ β Prop) (h : β) (hL : 0 β€ L) (hu : β q, 0 β€ u q) | |
| (t : SignedStep) (n : β€) : | |
| 0 β€ retainedEdgeDeparture Q u eligible g L K extra h t n := by | |
| unfold retainedEdgeDeparture | |
| split_ifs | |
| Β· exact div_nonneg (mul_nonneg hL (hu _)) (sq_nonneg _) | |
| Β· exact le_rfl | |
| lemma retainedEdgeDeparture_le_atom (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (L K : β) | |
| (extra : SignedStep β β€ β Prop) (h : β) (hL : 0 β€ L) (hu : β q, 0 β€ u q) | |
| (t : SignedStep) (n : β€) : | |
| retainedEdgeDeparture Q u eligible g L K extra h t n β€ | |
| retainedPaddingAtom Q u (eligible t) g L K (extra t) n t.padding := by | |
| unfold retainedEdgeDeparture | |
| split_ifs with ht | |
| Β· have hs : eligible t t.padding β§ (t.padding : β€) β£ n β§ | |
| integerEdgeKeep Q u (eligible t) g L K (extra t) n := | |
| β¨ht.2.1, ht.2.2.1, ht.2.2.2.1β© | |
| simp only [retainedPaddingAtom, ite_eq_left hs, le_refl] | |
| Β· exact retainedPaddingAtom_nonneg Q u (eligible t) g L K (extra t) n t.padding hL (hu _) | |
| theorem closed_signed_word_factorization (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (center : SignedStep β β€ β β) | |
| (L K : β) (extra : SignedStep β β€ β Prop) (h : β) (n : β€) (word : 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 word = 0) : | |
| scalarWalkProduct h (fun t x => | |
| signedIntegerWeight Q u (eligible t) g (center t) L K (extra t) h t x) n word = | |
| scalarWalkProduct h (retainedEdgeDeparture Q u eligible g L K extra h) n word * | |
| scalarWalkProduct h center n word := by | |
| rw [signedIntegerWeight_closed_normalize Q u eligible g center L K extra h n word | |
| hg hperiod hclosed] | |
| rw [β scalarWalkProduct_mul] | |
| apply scalarWalkProduct_congr | |
| intro t x | |
| unfold retainedEdgeDeparture | |
| split_ifs <;> ring | |
| lemma scalarWalkProduct_nonneg (h : β) (weight : SignedStep β β€ β β) | |
| (hw : β t n, 0 β€ weight t n) (n : β€) (word : List SignedStep) : | |
| 0 β€ scalarWalkProduct h weight n word := by | |
| induction word generalizing n with | |
| | nil => exact zero_le_one | |
| | cons t word ih => exact mul_nonneg (hw t n) (ih _) | |
| lemma scalarWalkProduct_mono (h : β) (a b : SignedStep β β€ β β) | |
| (ha : β t n, 0 β€ a t n) (hab : β t n, a t n β€ b t n) | |
| (n : β€) (word : List SignedStep) : | |
| scalarWalkProduct h a n word β€ scalarWalkProduct h b n word := by | |
| induction word generalizing n with | |
| | nil => exact le_rfl | |
| | cons t word ih => | |
| exact mul_le_mul (hab t n) (ih _) (scalarWalkProduct_nonneg h a ha _ _) | |
| ((ha t n).trans (hab t n)) | |
| theorem closed_word_padding_majorant (Q : Finset β) (u : β β β) | |
| (eligible : SignedStep β β β Prop) (g : β€ β β) (L K : β) | |
| (extra : SignedStep β β€ β Prop) (h : β) (hL : 0 β€ L) (hu : β q, 0 β€ u q) | |
| (n : β€) (word : List SignedStep) : | |
| scalarWalkProduct h (retainedEdgeDeparture Q u eligible g L K extra h) n word β€ | |
| scalarWalkProduct h | |
| (fun t x => retainedPaddingAtom Q u (eligible t) g L K (extra t) x t.padding) n word := | |
| scalarWalkProduct_mono h _ _ (retainedEdgeDeparture_nonneg Q u eligible g L K extra h hL hu) | |
| (retainedEdgeDeparture_le_atom Q u eligible g L K extra h hL hu) n word | |
| theorem scalarWalkProduct_ofFn {m : β} (h : β) (weight : SignedStep β β€ β β) | |
| (step : Fin m β SignedStep) (n : β€) : | |
| scalarWalkProduct h weight n (List.ofFn step) = | |
| β i : Fin m, weight (step i) (n + wordDisplacement h ((List.ofFn step).take i.val)) := by | |
| induction m generalizing n with | |
| | zero => simp [scalarWalkProduct] | |
| | succ m ih => | |
| rw [List.ofFn_succ, scalarWalkProduct, ih, Fin.prod_univ_succ] | |
| simp only [Fin.val_zero, List.take_zero, wordDisplacement_nil, add_zero] | |
| congr 1 | |
| apply prod_congr rfl | |
| intro i _ | |
| simp only [Fin.val_succ, List.take_succ_cons, wordDisplacement_cons, | |
| add_assoc] | |
| end TwoPointCorrelations | |
| end OAI | |