Download data/lean/OAI/Probability/InvariantIsing/Arrays/MonomialEnumeration.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.42 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/MonomialEnumeration.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/InvariantIsing/Arrays/MonomialEnumeration.lean
-
curl -L -o MonomialEnumeration.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/MonomialEnumeration.lean
3.42 kB
| import OAI.Probability.InvariantIsing.Arrays.PerturbationWeights | |
| namespace OAI | |
| /-! A concrete complete enumeration of the spectral/tree monomials with linear degree cap. -/ | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace InvariantIsing | |
| def multidegreeDecode : (m : β) β β β Fin m β β | |
| | 0, _ => Fin.elim0 | |
| | m + 1, j => Fin.cases (Nat.unpair j).1 (multidegreeDecode m (Nat.unpair j).2) | |
| def multidegreeEncode : (m : β) β (Fin m β β) β β | |
| | 0, _ => 0 | |
| | m + 1, d => Nat.pair (d 0) (multidegreeEncode m (Fin.tail d)) | |
| lemma multidegreeDecode_encode (m : β) (d : Fin m β β) : | |
| multidegreeDecode m (multidegreeEncode m d) = d := by | |
| induction m with | |
| | zero => exact Subsingleton.elim _ _ | |
| | succ m ih => | |
| funext i | |
| induction i using Fin.cases with | |
| | zero => simp only [multidegreeDecode, multidegreeEncode, Nat.unpair_pair, Fin.cases_zero] | |
| | succ i => | |
| simpa only [multidegreeDecode, multidegreeEncode, Nat.unpair_pair, Fin.cases_succ, | |
| Fin.tail] using congrFun (ih (Fin.tail d)) i | |
| lemma multidegreeDecode_sum_le (m j : β) : | |
| (β i, multidegreeDecode m j i) β€ j := by | |
| induction m generalizing j with | |
| | zero => simp | |
| | succ m ih => | |
| rw [Fin.sum_univ_succ] | |
| simp only [multidegreeDecode, Fin.cases_zero, Fin.cases_succ] | |
| exact (Nat.add_le_add_left (ih (Nat.unpair j).2) _).trans (Nat.unpair_add_le j) | |
| /-- First `m` coordinates are spectral degrees; the final coordinate is | |
| the tree degree. The constant kernel can be retained harmlessly. -/ | |
| def enumeratedSpectralDegree (m j : β) (a : Fin m) : β := | |
| multidegreeDecode (m + 1) (j + 1) a.castSucc | |
| def enumeratedTreeDegree (m j : β) : β := | |
| multidegreeDecode (m + 1) (j + 1) (Fin.last m) | |
| lemma enumeratedMonomial_degree_le (m j : β) : | |
| (β a, enumeratedSpectralDegree m j a) + enumeratedTreeDegree m j β€ j + 1 := by | |
| simpa only [Fin.sum_univ_castSucc, enumeratedSpectralDegree, enumeratedTreeDegree] using | |
| multidegreeDecode_sum_le (m + 1) (j + 1) | |
| lemma enumeratedSpectralDegree_real_sum_le (m j : β) : | |
| (β a, (enumeratedSpectralDegree m j a : β)) β€ (j : β) + 1 := by | |
| have h := (Nat.le_add_right (β a, enumeratedSpectralDegree m j a) | |
| (enumeratedTreeDegree m j)).trans (enumeratedMonomial_degree_le m j) | |
| exact_mod_cast h | |
| /-- Every nonconstant joint spectral/tree monomial occurs at a fixed | |
| finite index, hence eventually occurs in the truncation through `N`. -/ | |
| theorem enumeratedMonomial_surjective (m : β) (d : Fin m β β) (r : β) | |
| (h : 1 β€ (β a, d a) + r) : | |
| β j, (β a, enumeratedSpectralDegree m j a = d a) β§ enumeratedTreeDegree m j = r := by | |
| let v : Fin (m + 1) β β := Fin.lastCases r d | |
| let c := multidegreeEncode (m + 1) v | |
| have hc : 1 β€ c := by | |
| have hs := multidegreeDecode_sum_le (m + 1) c | |
| rw [multidegreeDecode_encode] at hs | |
| rw [Fin.sum_univ_castSucc] at hs | |
| simp only [v, Fin.lastCases_castSucc, Fin.lastCases_last] at hs | |
| exact h.trans hs | |
| refine β¨c - 1, ?_, ?_β© | |
| Β· intro a | |
| have he := congrFun (multidegreeDecode_encode (m + 1) v) a.castSucc | |
| simpa only [enumeratedSpectralDegree, Nat.sub_add_cancel hc, v, Fin.lastCases_castSucc] using he | |
| Β· have he := congrFun (multidegreeDecode_encode (m + 1) v) (Fin.last m) | |
| simpa only [enumeratedTreeDegree, Nat.sub_add_cancel hc, v, Fin.lastCases_last] using he | |
| end InvariantIsing | |
| end | |
| end OAI | |