Download data/lean/OAI/Analysis/FreeGroupFactor/RankTwoCoefficients.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 28 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeGroupFactor/RankTwoCoefficients.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/FreeGroupFactor/RankTwoCoefficients.lean
-
curl -L -o RankTwoCoefficients.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeGroupFactor/RankTwoCoefficients.lean
28 kB
| import OAI.Analysis.FreeGroupFactor.RankTwoCounting | |
| namespace OAI | |
| noncomputable section | |
| universe uG uH uK uΞΉ | |
| open Set Metric Filter | |
| open scoped NNReal Topology BigOperators ContDiff | |
| attribute [local instance] Classical.propDecidable | |
| namespace FreeGroupFactorMain | |
| namespace RankTwo | |
| def tupleSphere (m l : β) : Finset (Fin l β Fin m) := | |
| Finset.univ.filter (fun x => List.ofFn x β Radial.sphere l) | |
| theorem tupleSphere_image (m l : β) : | |
| (tupleSphere m l).image List.ofFn = Radial.sphere l := by | |
| classical | |
| ext w | |
| constructor | |
| Β· intro hw | |
| obtain β¨x,hx,rflβ© := Finset.mem_image.mp hw | |
| exact (Finset.mem_filter.mp hx).2 | |
| Β· intro hw | |
| have hl := Radial.sphere_mem_length l hw | |
| subst l | |
| refine Finset.mem_image.mpr β¨w.get,?_,List.ofFn_get wβ© | |
| exact Finset.mem_filter.mpr β¨Finset.mem_univ _,by simpa only [List.ofFn_get] using hwβ© | |
| theorem shell_eq_tuple (m l : β) (b : Bool) : | |
| Radial.shell (ΞΉ := Fin m) b l = | |
| β x β tupleSphere m l, Finsupp.single (patternWord (alternating b l) x) (1 : β) := by | |
| classical | |
| unfold Radial.shell | |
| rw [β tupleSphere_image,Finset.sum_image (fun _ _ _ _ he => List.ofFn_injective he)] | |
| simp only [vertex_ofFn] | |
| theorem pair_push_pattern_le {m l k B r : β} (hB : m*(l+k) < B) (hb : 2 β€ B) | |
| (b : Fin l β Bool) (c : Fin k β Bool) | |
| (eP : Fin r β {i // pairColors b c i = true}) | |
| (eN : Fin r β {i // pairColors b c i = false}) | |
| (hc : β i, boolSign (b i) = β j, boolSign (c j)) | |
| (s : Finset (Fin l β Fin m)) (t : Finset (Fin k β Fin m)) : | |
| coefficientPair | |
| (pushCoefficients (prefixHom B m) (β x β s, Finsupp.single (patternWord b x) 1)) | |
| (pushCoefficients (prefixHom B m) (β y β t, Finsupp.single (patternWord c y) 1)) β€ | |
| (m : β)^r * r^r := by | |
| classical | |
| simp only [map_sum,pushCoefficients_single] | |
| rw [coefficientPair_shells] | |
| have hh := card_patternCollisions_le hB hb b c eP eN hc | |
| ((s ΓΛ’ t).filter (fun p => prefixHom B m (patternWord b p.1) = prefixHom B m (patternWord c p.2))) | |
| (fun p hp => (Finset.mem_filter.mp hp).2) | |
| convert (Nat.cast_le (Ξ± := β)).mpr hh using 1 | |
| all_goals push_cast | |
| all_goals (first | rfl | congr 4) | |
| theorem pair_push_pattern_le_free_add {m l k B r : β} (hB : m*(l+k) < B) (hb : 2 β€ B) | |
| (b : Fin l β Bool) (c : Fin k β Bool) | |
| (eP : Fin r β {i // pairColors b c i = true}) | |
| (eN : Fin r β {i // pairColors b c i = false}) | |
| (hc : β i, boolSign (b i) = β j, boolSign (c j)) | |
| (s : Finset (Fin l β Fin m)) (t : Finset (Fin k β Fin m)) : | |
| coefficientPair | |
| (pushCoefficients (prefixHom B m) (β x β s, Finsupp.single (patternWord b x) 1)) | |
| (pushCoefficients (prefixHom B m) (β y β t, Finsupp.single (patternWord c y) 1)) β€ | |
| coefficientPair (β x β s, Finsupp.single (patternWord b x) 1) | |
| (β y β t, Finsupp.single (patternWord c y) 1) + (r^2*r^r : β)*m^(r-1) := by | |
| classical | |
| simp only [map_sum,pushCoefficients_single] | |
| rw [coefficientPair_shells,coefficientPair_shells] | |
| convert (Nat.cast_le (Ξ± := β)).mpr (card_patternCollisions_le_free_add hB hb b c eP eN hc (s ΓΛ’ t)) using 1 | |
| all_goals push_cast | |
| all_goals (first | rfl | congr 4) | |
| theorem right_pairColors_card (k : β) (d : Bool) : | |
| Fintype.card {i // pairColors (alternating false (2*k+1)) (alternating false (2*k+1)) i = d} = | |
| 2*k+1 := by | |
| cases d | |
| Β· rw [card_pairColors_neg] | |
| simp only [card_alternating_pos,card_alternating_neg,positiveCount_odd,Bool.false_eq_true, | |
| βreduceIte,zero_add] | |
| omega | |
| Β· rw [card_pairColors_pos] | |
| simp only [card_alternating_pos,card_alternating_neg,positiveCount_odd,Bool.false_eq_true, | |
| βreduceIte,zero_add] | |
| omega | |
| theorem positiveCount_even_add_two (b : Bool) (k : β) : positiveCount b (2*k+2) = k+1 := by | |
| rw [positiveCount_two,positiveCount_even] | |
| omega | |
| theorem left_pairColors_card (k l : β) (d : Bool) : | |
| Fintype.card {i // pairColors (alternating true (2*k+2)) (alternating true (2*l+2)) i = d} = | |
| k+l+2 := by | |
| cases d | |
| Β· rw [card_pairColors_neg] | |
| simp only [card_alternating_pos,card_alternating_neg,positiveCount_even_add_two] | |
| omega | |
| Β· rw [card_pairColors_pos] | |
| simp only [card_alternating_pos,card_alternating_neg,positiveCount_even_add_two] | |
| omega | |
| theorem pair_shell_right_le {m k B : β} (hB : m*((2*k+1)+(2*k+1)) < B) (hb : 2 β€ B) : | |
| coefficientPair (pushCoefficients (prefixHom B m) (Radial.shell false (2*k+1))) | |
| (pushCoefficients (prefixHom B m) (Radial.shell false (2*k+1))) β€ | |
| (m : β)^(2*k+1) * (2*k+1 : β)^(2*k+1) := by | |
| let eP : Fin (2*k+1) β {i // pairColors (alternating false (2*k+1)) (alternating false (2*k+1)) i = true} := | |
| (Fintype.equivFinOfCardEq (right_pairColors_card k true)).symm | |
| let eN : Fin (2*k+1) β {i // pairColors (alternating false (2*k+1)) (alternating false (2*k+1)) i = false} := | |
| (Fintype.equivFinOfCardEq (right_pairColors_card k false)).symm | |
| rw [shell_eq_tuple m _ false] | |
| convert pair_push_pattern_le hB hb _ _ eP eN rfl (tupleSphere m _) (tupleSphere m _) using 1 | |
| all_goals push_cast | |
| all_goals rfl | |
| theorem pair_shell_left_le_free_add {m k l B : β} (hB : m*((2*k+2)+(2*l+2)) < B) (hb : 2 β€ B) : | |
| coefficientPair (pushCoefficients (prefixHom B m) (Radial.shell true (2*k+2))) | |
| (pushCoefficients (prefixHom B m) (Radial.shell true (2*l+2))) β€ | |
| coefficientPair (Radial.shell (ΞΉ := Fin m) true (2*k+2)) (Radial.shell true (2*l+2)) + | |
| ((k+l+2 : β)^2*(k+l+2 : β)^(k+l+2))*(m : β)^(k+l+1) := by | |
| let eP : Fin (k+l+2) β {i // pairColors (alternating true (2*k+2)) (alternating true (2*l+2)) i = true} := | |
| (Fintype.equivFinOfCardEq (left_pairColors_card k l true)).symm | |
| let eN : Fin (k+l+2) β {i // pairColors (alternating true (2*k+2)) (alternating true (2*l+2)) i = false} := | |
| (Fintype.equivFinOfCardEq (left_pairColors_card k l false)).symm | |
| have hc : β i, boolSign (alternating true (2*k+2) i) = β i, boolSign (alternating true (2*l+2) i) := by | |
| rw [alternating_charge,alternating_charge,positiveCount_even_add_two,positiveCount_even_add_two] | |
| push_cast | |
| ring | |
| rw [shell_eq_tuple m _ true,shell_eq_tuple m _ true] | |
| convert pair_push_pattern_le_free_add hB hb _ _ eP eN hc (tupleSphere m _) (tupleSphere m _) using 1 | |
| all_goals push_cast | |
| all_goals rfl | |
| end RankTwo | |
| theorem coefficientPair_nonneg {G : Type uG} (h k : G ββ β) | |
| (hh : β g, 0 β€ h g) (hk : β g, 0 β€ k g) : 0 β€ coefficientPair h k := by | |
| exact Finset.sum_nonneg (fun g _ => mul_nonneg (hh g) (hk g)) | |
| theorem coefficientPair_eq_zero_of_disjoint {G : Type uG} (h k : G ββ β) | |
| (hd : Disjoint h.support k.support) : coefficientPair h k = 0 := by | |
| classical | |
| apply Finset.sum_eq_zero | |
| intro g hg | |
| have hk : k g = 0 := by | |
| by_contra hn | |
| exact Finset.disjoint_left.mp hd hg (Finsupp.mem_support_iff.mpr hn) | |
| simp [hk] | |
| theorem pushCoefficients_nonneg {G : Type uG} {H : Type uH} [Group G] [Group H] | |
| (f : G β* H) (h : G ββ β) (hh : β g, 0 β€ h g) (a : H) : | |
| 0 β€ pushCoefficients f h a := by | |
| classical | |
| change 0 β€ Finsupp.mapDomain f h a | |
| rw [Finsupp.mapDomain,Finsupp.sum_apply] | |
| apply Finset.sum_nonneg | |
| intro g _ | |
| change 0 β€ Finsupp.single (f g) (h g) a | |
| rw [Finsupp.single_apply] | |
| split_ifs | |
| Β· exact hh g | |
| Β· rfl | |
| namespace RankTwo | |
| def shellWeight (m k : β) : β := 1 / ((m : β)*((m : β)-1)^k) | |
| theorem shellWeight_nonneg {m : β} (hm : 2 β€ m) (k : β) : 0 β€ shellWeight m k := by | |
| have hm' : (2 : β) β€ m := by exact_mod_cast hm | |
| have hq : 0 β€ (m : β)-1 := by linarith | |
| unfold shellWeight | |
| positivity | |
| theorem shellWeight_product_bound {m : β} (hm : 2 β€ m) (k l : β) : | |
| shellWeight m k * shellWeight m l * (m : β)^(k+l+1) β€ 2^(k+l)/(m : β) := by | |
| have hm' : (2 : β) β€ m := by exact_mod_cast hm | |
| have hp : (0 : β) < m := by linarith | |
| have hq : (0 : β) < (m : β)-1 := by linarith | |
| have he : shellWeight m k * shellWeight m l * (m : β)^(k+l+1) = | |
| ((m : β)/((m : β)-1))^(k+l)/(m : β) := by | |
| simp only [shellWeight,pow_succ,pow_add,div_pow] | |
| field_simp | |
| rw [he] | |
| apply div_le_div_of_nonneg_right _ hp.le | |
| apply pow_le_pow_leftβ (by positivity) | |
| apply (div_le_iffβ hq).mpr | |
| linarith | |
| def rightConstant (k : β) : β := 2^(2*k)*(2*k+1 : β)^(2*k+1) | |
| def leftConstant (k l : β) : β := 2^(k+l)*(k+l+2 : β)^2*(k+l+2 : β)^(k+l+2) | |
| theorem pair_rightShell_le {m k B : β} (hm : 2 β€ m) | |
| (hB : m*((2*k+1)+(2*k+1)) < B) (hb : 2 β€ B) : | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) (Radial.rightShell m k)) β€ | |
| rightConstant k / m := by | |
| rw [Radial.rightShell,map_smul,coefficientSqNorm_smul,β coefficientPair_self] | |
| change (shellWeight m k)^2 * _ β€ _ | |
| calc | |
| _ β€ (shellWeight m k)^2 * ((m : β)^(2*k+1)*(2*k+1 : β)^(2*k+1)) := | |
| mul_le_mul_of_nonneg_left (pair_shell_right_le hB hb) (sq_nonneg _) | |
| _ = (2*k+1 : β)^(2*k+1) * | |
| (shellWeight m k * shellWeight m k * (m : β)^(k+k+1)) := by | |
| rw [show k+k=2*k by omega]; ring | |
| _ β€ (2*k+1 : β)^(2*k+1) * (2^(k+k)/(m : β)) := | |
| mul_le_mul_of_nonneg_left (shellWeight_product_bound hm k k) (by positivity) | |
| _ = _ := by rw [show k+k=2*k by omega]; unfold rightConstant; ring | |
| theorem pair_leftShell_le_free_add {m k l B : β} (hm : 2 β€ m) | |
| (hB : m*((2*k+2)+(2*l+2)) < B) (hb : 2 β€ B) : | |
| coefficientPair (pushCoefficients (prefixHom B m) (Radial.leftShell m k)) | |
| (pushCoefficients (prefixHom B m) (Radial.leftShell m l)) β€ | |
| coefficientPair (Radial.leftShell m k) (Radial.leftShell m l) + leftConstant k l / m := by | |
| simp only [Radial.leftShell,map_smul,coefficientPair_smul_left,coefficientPair_smul_right] | |
| change shellWeight m l * (shellWeight m k * _) β€ | |
| shellWeight m l * (shellWeight m k * _) + _ | |
| have hh := mul_le_mul_of_nonneg_left (pair_shell_left_le_free_add hB hb) | |
| (mul_nonneg (shellWeight_nonneg hm k) (shellWeight_nonneg hm l)) | |
| have he := mul_le_mul_of_nonneg_left (shellWeight_product_bound hm k l) | |
| (show 0 β€ (k+l+2 : β)^2*(k+l+2 : β)^(k+l+2) by positivity) | |
| calc | |
| _ = (shellWeight m k * shellWeight m l) * _ := by ring | |
| _ β€ (shellWeight m k * shellWeight m l) * | |
| (coefficientPair (Radial.shell true (2*k+2)) (Radial.shell true (2*l+2)) + | |
| ((k+l+2 : β)^2*(k+l+2 : β)^(k+l+2))*(m : β)^(k+l+1)) := hh | |
| _ = shellWeight m l * (shellWeight m k * | |
| coefficientPair (Radial.shell true (2*k+2)) (Radial.shell true (2*l+2))) + | |
| ((k+l+2 : β)^2*(k+l+2 : β)^(k+l+2)) * | |
| (shellWeight m k * shellWeight m l * (m : β)^(k+l+1)) := by ring | |
| _ β€ shellWeight m l * (shellWeight m k * | |
| coefficientPair (Radial.shell true (2*k+2)) (Radial.shell true (2*l+2))) + | |
| ((k+l+2 : β)^2*(k+l+2 : β)^(k+l+2)) * (2^(k+l)/(m : β)) := add_le_add le_rfl he | |
| _ = _ := by unfold leftConstant; ring | |
| theorem pair_leftShell_free_le {m : β} (hm : 2 β€ m) (k l : β) : | |
| coefficientPair (Radial.leftShell m k) (Radial.leftShell m l) β€ if k=l then 1 else 0 := by | |
| classical | |
| by_cases h : k=l | |
| Β· subst l | |
| rw [ite_eq_left rfl,coefficientPair_self,Radial.sqNorm_leftShell m k hm] | |
| have hp : (0 : β) < m := by exact_mod_cast (by omega : 0 < m) | |
| apply (div_le_iffβ hp).mpr | |
| linarith | |
| Β· rw [ite_eq_right h,coefficientPair_eq_zero_of_disjoint _ _ (Radial.leftShell_disjoint m h)] | |
| theorem leftShell_nonneg {m : β} (hm : 2 β€ m) (k : β) (g : FreeGroup (Fin m)) : | |
| 0 β€ Radial.leftShell m k g := by | |
| change 0 β€ shellWeight m k * Radial.shell true (2*k+2) g | |
| apply mul_nonneg (shellWeight_nonneg hm k) | |
| rw [Radial.shell_apply] | |
| split_ifs <;> norm_num | |
| theorem pair_leftShell_push_nonneg {m B : β} (hm : 2 β€ m) (k l : β) : | |
| 0 β€ coefficientPair (pushCoefficients (prefixHom B m) (Radial.leftShell m k)) | |
| (pushCoefficients (prefixHom B m) (Radial.leftShell m l)) := by | |
| apply coefficientPair_nonneg | |
| Β· exact pushCoefficients_nonneg _ _ (leftShell_nonneg hm k) | |
| Β· exact pushCoefficients_nonneg _ _ (leftShell_nonneg hm l) | |
| def partialConstant (N : β) : β := (N : β)*β k β Finset.range N, rightConstant k | |
| def inverseConstant (N : β) : β := | |
| (1/(N+1 : β))^2*(N+1 : β)*β k β Finset.range (N+1), partialConstant (k+1) | |
| def residualConstant (N : β) : β := | |
| (1/(N+1 : β))^2*β k β Finset.range (N+1), β l β Finset.range (N+1), leftConstant k l | |
| theorem rightConstant_nonneg (k : β) : 0 β€ rightConstant k := by unfold rightConstant; positivity | |
| theorem leftConstant_nonneg (k l : β) : 0 β€ leftConstant k l := by unfold leftConstant; positivity | |
| theorem partialConstant_nonneg (N : β) : 0 β€ partialConstant N := by | |
| apply mul_nonneg (Nat.cast_nonneg _) | |
| exact Finset.sum_nonneg (fun k _ => rightConstant_nonneg k) | |
| theorem inverseConstant_nonneg (N : β) : 0 β€ inverseConstant N := by | |
| apply mul_nonneg (by positivity) | |
| exact Finset.sum_nonneg (fun k _ => partialConstant_nonneg _) | |
| theorem residualConstant_nonneg (N : β) : 0 β€ residualConstant N := by | |
| apply mul_nonneg (sq_nonneg _) | |
| exact Finset.sum_nonneg (fun k _ => Finset.sum_nonneg (fun l _ => leftConstant_nonneg k l)) | |
| theorem neg_one_pow_sq (k : β) : ((-1 : β)^k)^2 = 1 := by | |
| rw [β pow_mul,Nat.mul_comm,pow_mul] | |
| norm_num | |
| theorem sqNorm_push_partial_le {m N B : β} (hm : 2 β€ m) | |
| (hB : m*(4*N+4) < B) (hb : 2 β€ B) (j : β) (hj : j β€ N+1) : | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) (Radial.partialInverse m j)) β€ | |
| partialConstant j / m := by | |
| rw [Radial.partialInverse,map_sum] | |
| calc | |
| _ β€ ((Finset.range j).card : β)*β k β Finset.range j, | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) ((-1 : β)^k β’ Radial.rightShell m k)) := | |
| coefficientSqNorm_sum_le _ _ | |
| _ β€ (j : β)*β k β Finset.range j, rightConstant k / m := by | |
| rw [Finset.card_range] | |
| apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _) | |
| apply Finset.sum_le_sum | |
| intro k hk | |
| rw [map_smul,coefficientSqNorm_smul,neg_one_pow_sq,one_mul] | |
| apply pair_rightShell_le hm _ hb | |
| have hkN : k β€ N := by have := Finset.mem_range.mp hk; omega | |
| exact lt_of_le_of_lt (Nat.mul_le_mul_left m (by omega)) hB | |
| _ = _ := by rw [β Finset.sum_div]; unfold partialConstant; ring | |
| theorem sqNorm_push_inverse_le {m N B : β} (hm : 2 β€ m) | |
| (hB : m*(4*N+4) < B) (hb : 2 β€ B) : | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) (Radial.averagedInverse m N)) β€ | |
| inverseConstant N / m := by | |
| rw [Radial.averagedInverse,map_smul,coefficientSqNorm_smul,map_sum] | |
| calc | |
| _ β€ (1/(N+1 : β))^2 * (((Finset.range (N+1)).card : β)*β k β Finset.range (N+1), | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) (Radial.partialInverse m (k+1)))) := | |
| mul_le_mul_of_nonneg_left (coefficientSqNorm_sum_le _ _) (sq_nonneg _) | |
| _ β€ (1/(N+1 : β))^2 * ((N+1 : β)*β k β Finset.range (N+1), partialConstant (k+1)/m) := by | |
| simp only [Finset.card_range,Nat.cast_add,Nat.cast_one] | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| apply mul_le_mul_of_nonneg_left _ (by positivity) | |
| exact Finset.sum_le_sum (fun k hk => sqNorm_push_partial_le hm hB hb (k+1) | |
| (by have := Finset.mem_range.mp hk; omega)) | |
| _ = _ := by rw [β Finset.sum_div]; unfold inverseConstant; ring | |
| theorem signed_left_pair_le {m B k l : β} (hm : 2 β€ m) | |
| (hB : m*((2*k+2)+(2*l+2)) < B) (hb : 2 β€ B) : | |
| (-1 : β)^k * ((-1 : β)^l * | |
| coefficientPair (pushCoefficients (prefixHom B m) (Radial.leftShell m k)) | |
| (pushCoefficients (prefixHom B m) (Radial.leftShell m l))) β€ | |
| (if k=l then (1 : β) else 0) + leftConstant k l/m := by | |
| have hsign : (-1 : β)^k*(-1 : β)^l β€ 1 := by | |
| rw [β pow_add] | |
| rcases neg_one_pow_eq_or β (k+l) with h | h <;> simp [h] | |
| have hp := pair_leftShell_push_nonneg (B := B) hm k l | |
| have hsign' := mul_le_mul_of_nonneg_right hsign hp | |
| rw [mul_assoc,one_mul] at hsign' | |
| exact hsign'.trans ((pair_leftShell_le_free_add hm hB hb).trans | |
| (add_le_add (pair_leftShell_free_le hm k l) le_rfl)) | |
| theorem sqNorm_signed_left_sum_le {m N B : β} (hm : 2 β€ m) | |
| (hB : m*(4*N+4) < B) (hb : 2 β€ B) : | |
| coefficientSqNorm (β k β Finset.range (N+1), (-1 : β)^k β’ | |
| pushCoefficients (prefixHom B m) (Radial.leftShell m k)) β€ | |
| (N+1 : β) + (β k β Finset.range (N+1), β l β Finset.range (N+1), leftConstant k l)/m := by | |
| classical | |
| rw [β coefficientPair_self,coefficientPair_sum_left] | |
| simp_rw [coefficientPair_sum_right,coefficientPair_smul_left,coefficientPair_smul_right] | |
| calc | |
| _ β€ β k β Finset.range (N+1), β l β Finset.range (N+1), | |
| ((if k=l then (1 : β) else 0) + leftConstant k l / m) := by | |
| apply Finset.sum_le_sum | |
| intro k hk | |
| apply Finset.sum_le_sum | |
| intro l hl | |
| apply signed_left_pair_le hm (B := B) (k := k) (l := l) _ hb | |
| have hkN : k β€ N := by have := Finset.mem_range.mp hk; omega | |
| have hlN : l β€ N := by have := Finset.mem_range.mp hl; omega | |
| exact lt_of_le_of_lt (Nat.mul_le_mul_left m (by omega)) hB | |
| _ = _ := by | |
| simp only [Finset.sum_add_distrib,β Finset.sum_div] | |
| have hdiag : (β k β Finset.range (N+1), β l β Finset.range (N+1), | |
| if k=l then (1 : β) else 0) = N+1 := by | |
| calc | |
| _ = β _k β Finset.range (N+1), (1 : β) := by | |
| apply Finset.sum_congr rfl | |
| intro k hk | |
| simp [hk] | |
| _ = _ := by simp | |
| rw [hdiag] | |
| theorem sqNorm_push_residual_le {m N B : β} (hm : 2 β€ m) | |
| (hB : m*(4*N+4) < B) (hb : 2 β€ B) : | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) | |
| (Radial.sumShift (Radial.averagedInverse m N) - Finsupp.single 1 1)) β€ | |
| 1/(N+1 : β)+residualConstant N/m := by | |
| rw [Radial.sumShift_averagedInverse m N hm,map_smul,coefficientSqNorm_smul,map_sum] | |
| simp_rw [map_smul] | |
| calc | |
| _ β€ (1/(N+1 : β))^2 * ((N+1 : β) + | |
| (β k β Finset.range (N+1), β l β Finset.range (N+1), leftConstant k l)/m) := | |
| mul_le_mul_of_nonneg_left (sqNorm_signed_left_sum_le hm hB hb) (sq_nonneg _) | |
| _ = _ := by | |
| unfold residualConstant | |
| have hN : (N+1 : β) β 0 := by positivity | |
| field_simp | |
| theorem exists_small_pushed_inverse (Ξ΅ : β) (hΞ΅ : 0 < Ξ΅) : | |
| β m B : β, 2 β€ m β§ 2 β€ B β§ β h : FreeGroup (Fin m) ββ β, | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) h) < Ξ΅ β§ | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) | |
| (Radial.sumShift h-Finsupp.single 1 1)) < Ξ΅ := by | |
| obtain β¨N,hNβ© := exists_nat_one_div_lt (by positivity : 0 < Ξ΅/2) | |
| obtain β¨m,hmβ© := exists_nat_gt (max (2 : β) (max (2*inverseConstant N/Ξ΅) (2*residualConstant N/Ξ΅))) | |
| have hm2 : 2 β€ m := by exact_mod_cast ((le_max_left _ _).trans_lt hm).le | |
| have hmp : (0 : β) < m := by exact_mod_cast (by omega : 0 < m) | |
| have hmI : inverseConstant N/m < Ξ΅/2 := by | |
| apply (div_lt_iffβ hmp).mpr | |
| have hh := (le_max_left (2*inverseConstant N/Ξ΅) _).trans_lt ((le_max_right _ _).trans_lt hm) | |
| have hh' := (div_lt_iffβ hΞ΅).mp hh | |
| nlinarith | |
| have hmR : residualConstant N/m < Ξ΅/2 := by | |
| apply (div_lt_iffβ hmp).mpr | |
| have hh := (le_max_right _ (2*residualConstant N/Ξ΅)).trans_lt ((le_max_right _ _).trans_lt hm) | |
| have hh' := (div_lt_iffβ hΞ΅).mp hh | |
| nlinarith | |
| let B := m*(4*N+4)+2 | |
| have hB : m*(4*N+4)<B := by dsimp [B]; omega | |
| have hb : 2 β€ B := by dsimp [B]; omega | |
| refine β¨m,B,hm2,hb,Radial.averagedInverse m N,?_,?_β© | |
| Β· exact (sqNorm_push_inverse_le hm2 hB hb).trans_lt (hmI.trans (by linarith)) | |
| Β· exact (sqNorm_push_residual_le hm2 hB hb).trans_lt (by linarith) | |
| def twoGenerator (b : Bool) : FreeGroup (Fin 2) := FreeGroup.of (if b then 0 else 1) | |
| def realizeSummand (b : Bool) : Multiplicative β€ β* FreeGroup (Fin 2) where | |
| toFun z := twoGenerator b ^ Multiplicative.toAdd z | |
| map_one' := zpow_zero _ | |
| map_mul' z w := zpow_add _ (Multiplicative.toAdd z) (Multiplicative.toAdd w) | |
| def realize : SyllableGroup β* FreeGroup (Fin 2) := Monoid.CoprodI.lift realizeSummand | |
| @[simp] theorem realize_syllable (b : Bool) (z : β€) : realize (syllable b z) = twoGenerator b ^ z := by | |
| simp [realize,syllable,realizeSummand] | |
| def syllabify : FreeGroup (Fin 2) β* SyllableGroup := | |
| FreeGroup.lift (fun i => if i = 0 then syllable true 1 else syllable false 1) | |
| @[simp] theorem syllabify_generator (b : Bool) : syllabify (twoGenerator b) = syllable b 1 := by | |
| cases b <;> simp [syllabify,twoGenerator] | |
| @[simp] theorem syllable_zpow (b : Bool) (z : β€) : (syllable b 1)^z = syllable b z := by | |
| unfold syllable | |
| rw [β map_zpow] | |
| congr 1 | |
| change Multiplicative.ofAdd (z β’ (1 : β€)) = Multiplicative.ofAdd z | |
| simp | |
| theorem syllabify_realize : syllabify.comp realize = MonoidHom.id _ := by | |
| apply Monoid.CoprodI.ext_hom | |
| intro b | |
| apply DFunLike.ext | |
| intro z | |
| change syllabify (realize (syllable b (Multiplicative.toAdd z))) = syllable b (Multiplicative.toAdd z) | |
| rw [realize_syllable,map_zpow,syllabify_generator,syllable_zpow] | |
| theorem realize_injective : Function.Injective realize := by | |
| intro x y he | |
| have hh := congrArg syllabify he | |
| simpa only [β MonoidHom.comp_apply,syllabify_realize,MonoidHom.id_apply] using hh | |
| end RankTwo | |
| theorem pushCoefficients_comp {G : Type uG} {H : Type uH} {K : Type uK} [Group G] [Group H] [Group K] | |
| (f : G β* H) (g : H β* K) (h : G ββ β) : | |
| pushCoefficients (g.comp f) h = pushCoefficients g (pushCoefficients f h) := by | |
| induction h using Finsupp.induction_linear with | |
| | zero => simp | |
| | add h k ih ik => simp only [map_add,ih,ik] | |
| | single a c => simp | |
| theorem coefficientSqNorm_shift {G : Type uG} [Group G] (g : G) (h : Coeff G) : | |
| coefficientSqNorm (coefficientShift g h) = coefficientSqNorm h := by | |
| rw [coefficientShift,Finsupp.domCongr_apply,Finsupp.equivMapDomain_eq_mapDomain] | |
| exact Finsupp.sum_mapDomain_index_inj (Equiv.mulLeft g).injective | |
| theorem freeCocycle_zpow_of_zero {ΞΉ : Type uΞΉ} (h : ΞΉ β Coeff (FreeGroup ΞΉ)) | |
| (g : FreeGroup ΞΉ) (hg : freeCocycle h g = 0) (k : β€) : freeCocycle h (g^k) = 0 := by | |
| cases k with | |
| | ofNat k => simpa using freeCocycle_pow_of_zero h g hg k | |
| | negSucc k => simp only [zpow_negSucc,freeCocycle_inv,freeCocycle_pow_of_zero h g hg,map_zero,neg_zero] | |
| namespace RankTwo | |
| def concretePrefix (B j : β) : FreeGroup (Fin 2) := realize (segment (runExponent B) 0 j) | |
| def concreteWord (B m : β) : FreeGroup (Fin 2) := concretePrefix B (m+1) * twoGenerator true | |
| def concretePrefixHom (B m : β) : FreeGroup (Fin m) β* FreeGroup (Fin 2) := | |
| realize.comp (prefixHom B m) | |
| @[simp] theorem concretePrefixHom_of (B m : β) (i : Fin m) : | |
| concretePrefixHom B m (FreeGroup.of i) = concretePrefix B (i.val+2) := by | |
| simp [concretePrefixHom,prefixHom,concretePrefix] | |
| @[simp] theorem concretePrefix_zero (B : β) : concretePrefix B 0 = 1 := by simp [concretePrefix] | |
| @[simp] theorem concretePrefix_succ (B j : β) : | |
| concretePrefix B (j+1) = concretePrefix B j * | |
| (twoGenerator true * (twoGenerator false)^(runExponent B j)) := by | |
| simp only [concretePrefix,segment_succ,Nat.zero_add,map_mul,piece,realize_syllable,zpow_one] | |
| theorem cocycle_twoGenerator_true (h : Coeff (FreeGroup (Fin 2))) : | |
| freeCocycle (firstCoefficients h) (twoGenerator true) = h := by | |
| simp [twoGenerator,firstCoefficients] | |
| theorem cocycle_twoGenerator_false (h : Coeff (FreeGroup (Fin 2))) : | |
| freeCocycle (firstCoefficients h) (twoGenerator false) = 0 := by | |
| simp [twoGenerator,firstCoefficients] | |
| theorem cocycle_concretePrefix (B m : β) (h : Coeff (FreeGroup (Fin 2))) : | |
| freeCocycle (firstCoefficients h) (concretePrefix B m) = | |
| β j β Finset.range m, coefficientShift (concretePrefix B j) h := by | |
| induction m with | |
| | zero => simp | |
| | succ m ih => | |
| rw [concretePrefix_succ,freeCocycle_mul,freeCocycle_mul, | |
| cocycle_twoGenerator_true,freeCocycle_zpow_of_zero _ _ (cocycle_twoGenerator_false h)] | |
| simp only [map_zero,add_zero,ih,Finset.sum_range_succ] | |
| theorem cocycle_concreteWord (B m : β) (h : Coeff (FreeGroup (Fin 2))) : | |
| freeCocycle (firstCoefficients h) (concreteWord B m) = | |
| h + coefficientShift (concretePrefix B 1) h + | |
| β i : Fin m, coefficientShift (concretePrefix B (i.val+2)) h := by | |
| rw [concreteWord,freeCocycle_mul,cocycle_concretePrefix,cocycle_twoGenerator_true, | |
| β Finset.sum_range_succ] | |
| rw [Finset.sum_range_succ',Finset.sum_range_succ'] | |
| simp only [concretePrefix_zero,coefficientShift_one,Nat.zero_add] | |
| rw [Fin.sum_univ_eq_sum_range (fun k : β => coefficientShift (concretePrefix B (k+2)) h)] | |
| simpa only [Nat.add_assoc,Nat.one_add] using (by abel : | |
| (β j β Finset.range m, coefficientShift (concretePrefix B (j+1+1)) h) + | |
| coefficientShift (concretePrefix B 1) h + h = | |
| h + coefficientShift (concretePrefix B 1) h + | |
| (β j β Finset.range m, coefficientShift (concretePrefix B (j+2)) h)) | |
| theorem push_sumShift (B m : β) (h : FreeGroup (Fin m) ββ β) : | |
| pushCoefficients (concretePrefixHom B m) (Radial.sumShift h) = | |
| β i : Fin m, coefficientShift (concretePrefix B (i.val+2)) | |
| (pushCoefficients (concretePrefixHom B m) h) := by | |
| rw [Radial.sumShift_apply,map_sum] | |
| simp only [pushCoefficients_shift,concretePrefixHom_of] | |
| theorem rank_two_cocycle_identity (B m : β) (h : FreeGroup (Fin m) ββ β) : | |
| freeCocycle (firstCoefficients (pushCoefficients (concretePrefixHom B m) h)) (concreteWord B m) = | |
| pushCoefficients (concretePrefixHom B m) h + | |
| coefficientShift (concretePrefix B 1) (pushCoefficients (concretePrefixHom B m) h) + | |
| pushCoefficients (concretePrefixHom B m) (Radial.sumShift h) := by | |
| rw [cocycle_concreteWord,push_sumShift] | |
| theorem sqNorm_concrete_push (B m : β) (h : FreeGroup (Fin m) ββ β) : | |
| coefficientSqNorm (pushCoefficients (concretePrefixHom B m) h) = | |
| coefficientSqNorm (pushCoefficients (prefixHom B m) h) := by | |
| rw [concretePrefixHom,pushCoefficients_comp,sqNorm_pushCoefficients realize realize_injective] | |
| end RankTwo | |
| theorem smallCocycleTwo (Ξ· : β) (hΞ· : 0 < Ξ·) : | |
| β (w : FreeGroup (Fin 2)) (h : Coeff (FreeGroup (Fin 2))), | |
| coefficientNorm h < Ξ· β§ | |
| coefficientNorm (freeCocycle (firstCoefficients h) w-Finsupp.single 1 1) < Ξ· := by | |
| obtain β¨m,B,_hm,_hB,h,hh,hrβ© := RankTwo.exists_small_pushed_inverse (Ξ·^2/16) (by positivity) | |
| let f := RankTwo.concretePrefixHom B m | |
| let hβ := pushCoefficients f h | |
| have hsmall : coefficientSqNorm hβ < Ξ·^2/16 := by | |
| simpa only [hβ,f,RankTwo.sqNorm_concrete_push] using hh | |
| have hrsmall : coefficientSqNorm (pushCoefficients f (Radial.sumShift h-Finsupp.single 1 1)) < Ξ·^2/16 := by | |
| simpa only [f,RankTwo.sqNorm_concrete_push] using hr | |
| refine β¨RankTwo.concreteWord B m,hβ,?_,?_β© | |
| Β· apply (Real.sqrt_lt' hΞ·).mpr | |
| exact hsmall.trans (by nlinarith [sq_pos_of_pos hΞ·]) | |
| Β· apply (Real.sqrt_lt' hΞ·).mpr | |
| change coefficientSqNorm (freeCocycle (firstCoefficients hβ) (RankTwo.concreteWord B m)-_) < Ξ·^2 | |
| have hid : freeCocycle (firstCoefficients hβ) (RankTwo.concreteWord B m)-Finsupp.single 1 1 = | |
| (hβ+coefficientShift (RankTwo.concretePrefix B 1) hβ) + | |
| pushCoefficients f (Radial.sumShift h-Finsupp.single 1 1) := by | |
| dsimp only [hβ,f] | |
| rw [RankTwo.rank_two_cocycle_identity,map_sub] | |
| simp only [pushCoefficients_single,map_one] | |
| abel | |
| rw [hid] | |
| have hshift := coefficientSqNorm_shift (RankTwo.concretePrefix B 1) hβ | |
| have hsum := coefficientSqNorm_add_le hβ (coefficientShift (RankTwo.concretePrefix B 1) hβ) | |
| have htot := coefficientSqNorm_add_le (hβ+coefficientShift (RankTwo.concretePrefix B 1) hβ) | |
| (pushCoefficients f (Radial.sumShift h-Finsupp.single 1 1)) | |
| nlinarith | |
| end FreeGroupFactorMain | |
| end | |
| end OAI | |