File size: 1,147 Bytes
ae00908
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import OAI.Algebra.FormulaHitting.Evaluation
import OAI.Algebra.FormulaHitting.Series

namespace OAI

noncomputable section
namespace NCHitting
namespace Formula

variable {F : Type*} {n : ℕ} [Field F]

def series (f : Formula F n) : PowerSeries F :=
  f.polynomial.sum (fun w a => PowerSeries.C a * wordSeries w)

theorem series_eq_smul_sum (f : Formula F n) :
    f.series = f.polynomial.sum (fun w a => a • wordSeries w) := by
  simp only [series, PowerSeries.smul_eq_C_mul]

theorem series_eq_sum_of_cutoff (f : Formula F n) (d : ℕ)
    (hcut : ∀ w, d ≤ w.length → f.coeff w = 0) :
    f.series = ∑ k ∈ Finset.range d, ∑ w ∈ wordsOfLength n k,
      PowerSeries.C (f.coeff w) * wordSeries w := by
  exact sum_eq_sum_wordsOfLength f.polynomial hcut _ (by intro w; simp)

theorem series_eq_sum_wordsOfLength (f : Formula F n) {s : ℕ} (hs : f.size ≤ s) :
    f.series = ∑ k ∈ Finset.range (s + 1), ∑ w ∈ wordsOfLength n k,
      PowerSeries.C (f.coeff w) * wordSeries w := by
  apply f.series_eq_sum_of_cutoff
  intro w hw
  exact f.coeff_eq_zero_of_length_gt w (by omega)

end Formula
end NCHitting

end

end OAI