Download data/lean/OAI/Analysis/HardSphere/Allocation/FinsetSeparatedNet.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.51 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Allocation/FinsetSeparatedNet.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Allocation/FinsetSeparatedNet.lean
-
curl -L -o FinsetSeparatedNet.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Allocation/FinsetSeparatedNet.lean
4.51 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.PathBounds.LatticeExponentialSum | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology BigOperators | |
| open scoped BigOperators ComplexConjugate | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory ProbabilityTheory Real Complex | |
| open scoped ENNReal ComplexConjugate | |
| open ProbabilityTheory | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal Topology | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| namespace HardSphere | |
| open MeasureTheory Set Filter | |
| lemma finset_separated_net {ΞΉ : Type*} [DecidableEq ΞΉ] (A : Finset ΞΉ) (d : ΞΉ β ΞΉ β β) | |
| (hd : β i j, d i j=d j i) (hdiag : β i, d i i=0) {R : β} (hR : 0<R) : | |
| β B : Finset ΞΉ, BβA β§ (β iβB, β jβB, iβ j β Rβ€d i j) β§ | |
| β iβA, β jβB, d i j<R := by | |
| classical | |
| let P : Finset ΞΉ β Prop := fun B β¦ β iβB, β jβB, iβ j β Rβ€d i j | |
| let S := A.powerset.filter P | |
| have hS : S.Nonempty := β¨β ,by simp [S,P]β© | |
| obtain β¨B,hBS,hmaxβ© := S.exists_max_image Finset.card hS | |
| have hBA : BβA := Finset.mem_powerset.mp (Finset.mem_filter.mp hBS).1 | |
| have hBP : P B := (Finset.mem_filter.mp hBS).2 | |
| refine β¨B,hBA,hBP,?_β© | |
| intro i hi | |
| by_contra hn | |
| have hall : β jβB, Rβ€d i j := by | |
| intro j hj | |
| by_contra hlt | |
| exact hn β¨j,hj,lt_of_not_ge hltβ© | |
| have hin : iβB := by | |
| intro hiB | |
| have hh := hall i hiB | |
| rw [hdiag] at hh | |
| exact (not_le_of_gt hR) hh | |
| have hPi : P (insert i B) := by | |
| intro j hj k hk hjk | |
| rcases Finset.mem_insert.mp hj with hji | hjB | |
| Β· subst j | |
| rcases Finset.mem_insert.mp hk with hki | hkB | |
| Β· exact (hjk hki.symm).elim | |
| Β· exact hall k hkB | |
| Β· rcases Finset.mem_insert.mp hk with hki | hkB | |
| Β· subst k | |
| rw [hd j i] | |
| exact hall j hjB | |
| Β· exact hBP j hjB k hkB hjk | |
| have hmem : insert i BβS := Finset.mem_filter.mpr β¨Finset.mem_powerset.mpr (Finset.insert_subset hi hBA),hPiβ© | |
| have hh := hmax (insert i B) hmem | |
| rw [Finset.card_insert_of_notMem hin] at hh | |
| omega | |
| theorem unitGrid_separated_subset : β Q : β, 0<Q β§ | |
| β (K : β) (L : Length), L.val=(K:β) β β A : Finset (CubeCell K), | |
| β B : Finset (CubeCell K), BβA β§ | |
| (β vβB, β wβB, vβ w β 20β€torusDistance L (unitCenter L v) (unitCenter L w)) β§ | |
| (A.card:β)β€(Q:β)*(B.card:β) := by | |
| obtain β¨C,hC,hboundβ© := unitGrid_exponential_bound | |
| let Q : β := βReal.exp 20*Cββ+1 | |
| have hQ : 0<Q := Nat.succ_pos _ | |
| have hQB : Real.exp 20*Cβ€(Q:β) := by | |
| exact (Nat.le_ceil _).trans (by dsimp [Q]; push_cast; linarith) | |
| refine β¨Q,hQ,?_β© | |
| intro K L hL A | |
| obtain β¨B,hBA,hB,hcoverβ© := finset_separated_net A | |
| (fun v w β¦ torusDistance L (unitCenter L v) (unitCenter L w)) | |
| (fun v w β¦ torusDistance_comm L _ _) (fun v β¦ by simp [torusDistance]) (by norm_num : (0:β)<20) | |
| refine β¨B,hBA,hB,?_β© | |
| have hpoint (v : CubeCell K) (hv : vβA) : | |
| 1β€Real.exp 20*β wβB, Real.exp (-torusDistance L (unitCenter L v) (unitCenter L w)) := by | |
| obtain β¨w,hw,hdβ© := hcover v hv | |
| calc | |
| _ β€ Real.exp (20-torusDistance L (unitCenter L v) (unitCenter L w)) := | |
| Real.one_le_exp (by linarith only [hd]) | |
| _ = Real.exp 20*Real.exp (-torusDistance L (unitCenter L v) (unitCenter L w)) := by | |
| rw [sub_eq_add_neg,Real.exp_add] | |
| _ β€ _ := mul_le_mul_of_nonneg_left | |
| (Finset.single_le_sum (f:=fun w : CubeCell K β¦ Real.exp (-torusDistance L (unitCenter L v) (unitCenter L w))) | |
| (fun _ _ β¦ (Real.exp_pos _).le) hw) (Real.exp_pos 20).le | |
| calc | |
| _ = β _vβA, (1:β) := by simp | |
| _ β€ β vβA, Real.exp 20*β wβB, Real.exp (-torusDistance L (unitCenter L v) (unitCenter L w)) := | |
| Finset.sum_le_sum hpoint | |
| _ = Real.exp 20*β wβB, β vβA, Real.exp (-torusDistance L (unitCenter L v) (unitCenter L w)) := by | |
| rw [βFinset.mul_sum,Finset.sum_comm] | |
| _ β€ Real.exp 20*β _wβB, C := by | |
| apply mul_le_mul_of_nonneg_left _ (Real.exp_pos 20).le | |
| apply Finset.sum_le_sum | |
| intro w _ | |
| exact (Finset.sum_le_univ_sum_of_nonneg (fun v : CubeCell K β¦ (Real.exp_pos (-torusDistance L (unitCenter L v) (unitCenter L w))).le)).trans (hbound K L hL _) | |
| _ = (Real.exp 20*C)*(B.card:β) := by simp; ring | |
| _ β€ _ := mul_le_mul_of_nonneg_right hQB (Nat.cast_nonneg _) | |
| end HardSphere | |
| end | |
| end OAI | |