cfahlgren1's picture
download
raw
3.71 kB
12
def monomial (s : Finset α) : β → 𝔽 := fun b => if s ⊆ B b then 1 else 0
14
def smallSets (α : Type) [Fintype α] [DecidableEq α] (d : ℕ) : Finset (Finset α) :=
body · 1 line
  (Finset.range (d+1)).biUnion (fun j => Finset.univ.powersetCard j)
16
lemma mem_smallSets (s : Finset α) (d : ℕ) : s ∈ smallSets α d ↔ s.card ≤ d := by
proof · 7 lines
  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⟩
25
def lowDegree (d : ℕ) : Submodule 𝔽 (β → 𝔽) :=
body · 1 line
  Submodule.span 𝔽 (monomial (𝔽 := 𝔽) B '' (smallSets α d : Set (Finset α)))
28
lemma monomial_mem {s : Finset α} {d : ℕ} (hs : s.card ≤ d) :
    monomial (𝔽 := 𝔽) B s ∈ lowDegree B d := by
proof · 1 line
  exact Submodule.subset_span ⟨s,(mem_smallSets s d).mpr hs,rfl⟩
32
lemma monomial_empty : monomial (𝔽 := 𝔽) B ∅=1 := by ext b; simp [monomial]
34
lemma monomial_mul (s t : Finset α) :
    monomial (𝔽 := 𝔽) B s * monomial B t=monomial B (s ∪ t) := by
proof · 3 lines
  ext b
  by_cases hs : s ⊆ B b <;> by_cases ht : t ⊆ B b <;>
    simp [monomial,Finset.union_subset_iff,hs,ht]
39
lemma coordinate_mul_mem {d : ℕ} {f : β → 𝔽} (hf : f ∈ lowDegree B d) (a : α) :
    monomial B {a} * f ∈ lowDegree B (d+1) := by
proof · 12 lines
  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
54
lemma sum_power_mem (A : Finset α) (d : ℕ) :
    (∑ a ∈ A, monomial (𝔽 := 𝔽) B {a})^d ∈ lowDegree B d := by
proof · 6 lines
  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)
65
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
proof · 20 lines
  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]

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.