change PolyType

This commit is contained in:
chelseaandmadrid 2023-06-15 13:31:48 -07:00
parent 41105f8623
commit 61a7ae54bf

View file

@ -70,7 +70,7 @@ end section
noncomputable section noncomputable section
-- Polynomial type of degree d -- Polynomial type of degree d
@[simp] @[simp]
def PolyType (f : ) (d : ) := ∃ Poly : Polynomial , ∃ (N : ), ∀ (n : ), N ≤ n → f n = Polynomial.eval (n : ) Poly ∧ d = Polynomial.degree Poly def PolyType (f : ) (d : ) := ∃ Poly : Polynomial , ∃ (N : ), ∀ (n : ), (N ≤ n → f n = Polynomial.eval (n : ) Poly) ∧ d = Polynomial.degree Poly
section section
-- structure PolyType (f : ) where -- structure PolyType (f : ) where
-- Poly : Polynomial -- Poly : Polynomial
@ -109,7 +109,7 @@ end section
-- (NO NEED TO PROVE) Constant polynomial function = constant function -- (NO NEED TO PROVE) Constant polynomial function = constant function
lemma Poly_constant (F : Polynomial ) (c : ) : lemma Poly_constant (F : Polynomial ) (c : ) :
(F = Polynomial.C c) ↔ (∀ r : , (Polynomial.eval r F) = c) := by (F = Polynomial.C (c : )) ↔ (∀ r : , (Polynomial.eval r F) = (c : )) := by
constructor constructor
· intro h · intro h
rintro r rintro r
@ -134,13 +134,13 @@ lemma Poly_shifting (f : ) (g : ) (hf : PolyType f d) (s :
-- set_option pp.all true in -- set_option pp.all true in
-- PolyType 0 = constant function -- PolyType 0 = constant function
lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N : ), ∀ (n : ), (N ≤ n → f n = c) ∧ c ≠ 0) := by lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N : ), ∀ (n : ), (N ≤ n → f n = c) ∧ (c ≠ 0)) := by
constructor constructor
· intro h · intro h
rcases h with ⟨Poly, hN⟩ rcases h with ⟨Poly, hN⟩
rcases hN with ⟨N, hh⟩ rcases hN with ⟨N, hh⟩
have H1 := λ n hn => (hh n hn).left have H1 := λ n=> (hh n).left
have H2 := λ n hn => (hh n hn).right have H2 := λ n=> (hh n).right
clear hh clear hh
specialize H2 (N + 1) specialize H2 (N + 1)
have this1 : Polynomial.degree Poly = 0 := by have this1 : Polynomial.degree Poly = 0 := by
@ -182,11 +182,10 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
-- --
· intro c0 · intro c0
have H7 := H2 (by norm_num) -- have H7 := H2 (by norm_num)
rw [hthis2] at this1 rw [hthis2] at this1
rw [c0] at this1 rw [c0] at this1
simp at this1 simp at this1
--
· intro h · intro h
@ -194,17 +193,45 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
let (Poly : Polynomial ) := Polynomial.C (c : ) let (Poly : Polynomial ) := Polynomial.C (c : )
use Poly use Poly
use N use N
intro n Nn intro n
specialize aaa n specialize aaa n
have this1 : c ≠ 0 → f n = c := by have this1 : c ≠ 0 → f n = c := by
tauto tauto
rcases aaa with ⟨A, B⟩
have this1 : f n = c := by
tauto
constructor constructor
· sorry clear A
· have this2 : ∀ (t : ), (Polynomial.eval t Poly) = (c : ) := by
rw [← Poly_constant Poly (c : )]
sorry
specialize this2 n
rw [this2]
tauto
· sorry · sorry
-- apply Polynomial.degree_C c -- apply Polynomial.degree_C c
-- constructor
-- · intro n Nn
-- specialize aaa n
-- have this1 : c ≠ 0 → f n = c := by
-- tauto
-- rcases aaa with ⟨A, B⟩
-- have this1 : f n = c := by
-- tauto
-- clear A
-- have this2 : ∀ (t : ), (Polynomial.eval t Poly) = (c : ) := by
-- rw [← Poly_constant Poly (c : )]
-- sorry
-- specialize this2 n
-- rw [this2]
-- tauto
-- · sorry
@ -217,8 +244,8 @@ lemma Δ_PolyType_d_to_PolyType_0 (f : ) (d : ): PolyType f d →
intro h intro h
rcases h with ⟨Poly, hN⟩ rcases h with ⟨Poly, hN⟩
rcases hN with ⟨N, hh⟩ rcases hN with ⟨N, hh⟩
have H1 := λ n hn => (hh n hn).left have H1 := λ n => (hh n).left
have H2 := λ n hn => (hh n hn).right have H2 := λ n => (hh n).right
clear hh clear hh
have HH2 : d = Polynomial.degree Poly := by have HH2 : d = Polynomial.degree Poly := by
sorry sorry