Buckets:
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace FiniteConstruction | |
| variable {Ξ± Ξ² π½ : Type} [Fintype Ξ±] [DecidableEq Ξ±] | |
| [Field π½] | |
| variable (B : Ξ² β Finset Ξ±) | |
| def monomial (s : Finset Ξ±) : Ξ² β π½ := fun b => if s β B b then 1 else 0 | |
| def smallSets (Ξ± : Type) [Fintype Ξ±] [DecidableEq Ξ±] (d : β) : Finset (Finset Ξ±) := | |
| (Finset.range (d+1)).biUnion (fun j => Finset.univ.powersetCard j) | |
| lemma mem_smallSets (s : Finset Ξ±) (d : β) : s β smallSets Ξ± d β s.card β€ d := by | |
| simp only [smallSets,Finset.mem_biUnion,Finset.mem_range,Finset.mem_powersetCard, | |
| Finset.subset_univ,true_and] | |
| constructor | |
| Β· rintro β¨j,hj,heβ© | |
| omega | |
| Β· intro hs | |
| exact β¨s.card,by omega,rflβ© | |
| def lowDegree (d : β) : Submodule π½ (Ξ² β π½) := | |
| Submodule.span π½ (monomial (π½ := π½) B '' (smallSets Ξ± d : Set (Finset Ξ±))) | |
| lemma monomial_mem {s : Finset Ξ±} {d : β} (hs : s.card β€ d) : | |
| monomial (π½ := π½) B s β lowDegree B d := by | |
| exact Submodule.subset_span β¨s,(mem_smallSets s d).mpr hs,rflβ© | |
| omit [Fintype Ξ±] in | |
| lemma monomial_empty : monomial (π½ := π½) B β =1 := by ext b; simp [monomial] | |
| omit [Fintype Ξ±] in | |
| lemma monomial_mul (s t : Finset Ξ±) : | |
| monomial (π½ := π½) B s * monomial B t=monomial B (s βͺ t) := by | |
| ext b | |
| by_cases hs : s β B b <;> by_cases ht : t β B b <;> | |
| simp [monomial,Finset.union_subset_iff,hs,ht] | |
| lemma coordinate_mul_mem {d : β} {f : Ξ² β π½} (hf : f β lowDegree B d) (a : Ξ±) : | |
| monomial B {a} * f β lowDegree B (d+1) := by | |
| induction hf using Submodule.span_induction with | |
| | mem x hx => | |
| obtain β¨s,hs,rflβ© := hx | |
| rw [monomial_mul] | |
| apply monomial_mem | |
| have hc := (Finset.card_union_le ({a} : Finset Ξ±) s) | |
| have hd := (mem_smallSets s d).mp hs | |
| simp only [Finset.card_singleton] at hc | |
| omega | |
| | zero => simp | |
| | add x y hx hy ihx ihy => simpa only [mul_add] using Submodule.add_mem _ ihx ihy | |
| | smul c x hx ih => simpa only [mul_smul_comm] using Submodule.smul_mem _ c ih | |
| lemma sum_power_mem (A : Finset Ξ±) (d : β) : | |
| (β a β A, monomial (π½ := π½) B {a})^d β lowDegree B d := by | |
| induction d with | |
| | zero => simpa only [pow_zero,monomial_empty] using | |
| (monomial_mem (π½ := π½) B (s := β ) (d := 0) (by simp)) | |
| | succ d ih => | |
| rw [pow_succ',Finset.sum_mul] | |
| exact Submodule.sum_mem _ (fun a _ => coordinate_mul_mem B ih a) | |
| variable [Fintype Ξ²] [DecidableEq Ξ²] | |
| lemma interpolation_dimension_bound (d : β) | |
| (h : β b : Ξ², Pi.single b (1 : π½) β lowDegree B d) : | |
| Fintype.card Ξ² β€ β j β Finset.range (d+1), (Fintype.card Ξ±).choose j := by | |
| have ht : lowDegree (π½ := π½) B d=β€ := by | |
| apply top_unique | |
| intro f hf | |
| have he : f=β b, f b β’ Pi.single b (1 : π½) := by | |
| ext b | |
| simp [Pi.single_apply] | |
| rw [he] | |
| exact Submodule.sum_mem _ (fun b _ => Submodule.smul_mem _ (f b) (h b)) | |
| classical | |
| have hd := finrank_span_finset_le_card (R := π½) | |
| ((smallSets Ξ± d).image (monomial (π½ := π½) B)) | |
| have he : Submodule.span π½ (((smallSets Ξ± d).image (monomial (π½ := π½) B)) : Set (Ξ² β π½))= | |
| lowDegree B d := by rw [Finset.coe_image]; rfl | |
| change Module.finrank π½ (Submodule.span π½ _) β€ _ at hd | |
| rw [he,ht,finrank_top,Module.finrank_fintype_fun_eq_card] at hd | |
| refine hd.trans (Finset.card_image_le.trans ?_) | |
| calc | |
| (smallSets Ξ± d).card β€ β j β Finset.range (d+1), ((Finset.univ : Finset Ξ±).powersetCard j).card := by | |
| exact Finset.card_biUnion_le | |
| _ = _ := by simp only [Finset.card_powersetCard,Finset.card_univ] | |
| end FiniteConstruction | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 3.71 kB
- Xet hash:
- 931260c9a32b23b9c9bab7f906855ae1724fdaaeb731f731236687d9f4c286df
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.