finish more on the PolyType_0 lemma

This commit is contained in:
chelseaandmadrid 2023-06-15 15:10:30 -07:00
parent 61a7ae54bf
commit 007e8cf795

View file

@ -70,7 +70,7 @@ end section
noncomputable section
-- Polynomial type of degree d
@[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
-- structure PolyType (f : ) where
-- Poly : Polynomial
@ -107,7 +107,7 @@ def f (n : ) := n
end section
-- (NO NEED TO PROVE) Constant polynomial function = constant function
-- (NO need to prove another direction) Constant polynomial function = constant function
lemma Poly_constant (F : Polynomial ) (c : ) :
(F = Polynomial.C (c : )) ↔ (∀ r : , (Polynomial.eval r F) = (c : )) := by
constructor
@ -132,6 +132,8 @@ lemma Poly_shifting (f : ) (g : ) (hf : PolyType f d) (s :
-- set_option pp.all true in
-- PolyType 0 = constant function
lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N : ), ∀ (n : ), (N ≤ n → f n = c) ∧ (c ≠ 0)) := by
@ -139,10 +141,9 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
· intro h
rcases h with ⟨Poly, hN⟩
rcases hN with ⟨N, hh⟩
have H1 := λ n=> (hh n).left
have H2 := λ n=> (hh n).right
clear hh
specialize H2 (N + 1)
rcases hh with ⟨H1, H2⟩
-- have H1 := λ n=> (hh n).left
-- have H2 := λ n=> (hh n).right
have this1 : Polynomial.degree Poly = 0 := by
have : N ≤ N + 1 := by
norm_num
@ -170,7 +171,6 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
constructor
· intro HH1
-- have H6 := H1 HH1
--
have this3 : f n = Polynomial.eval (n : ) Poly := by
tauto
have this4 : Polynomial.eval (n : ) Poly = c := by
@ -179,7 +179,6 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
have this5 : f n = (c : ) := by
rw [←this4, this3]
exact Iff.mp (Rat.coe_int_inj (f n) c) this5
--
· intro c0
-- have H7 := H2 (by norm_num)
@ -189,27 +188,46 @@ lemma PolyType_0 (f : ) : (PolyType f 0) ↔ (∃ (c : ), ∃ (N :
· intro h
rcases h with ⟨c, N, aaa⟩
let (Poly : Polynomial ) := Polynomial.C (c : )
rcases h with ⟨c, N, hh⟩
let Poly := Polynomial.C (c : )
--unfold PolyType
use Poly
--simp at Poly
use N
intro n
specialize aaa n
have this1 : c ≠ 0 → f n = c := by
tauto
rcases aaa with ⟨A, B⟩
have this1 : f n = c := by
tauto
have H1 := λ n=> (hh n).left
have H22 := λ n=> (hh n).right
have H2 : c ≠ 0 := by
exact H22 0
clear H22
constructor
clear A
· have this2 : ∀ (t : ), (Polynomial.eval t Poly) = (c : ) := by
rw [← Poly_constant Poly (c : )]
sorry
specialize this2 n
rw [this2]
tauto
· intro n Nn
specialize H1 n
have this : f n = c := by
tauto
rw [this]
have this2 : Polynomial.eval (n : ) Poly = (c : ) := by
have this3 : ∀ r : , (Polynomial.eval r Poly) = (c : ) := (Poly_constant Poly (c : )).mp rfl
exact this3 n
exact this2.symm
· sorry
-- apply Polynomial.degree_C c
-- intro n
-- specialize aaa n
-- have this1 : c ≠ 0 → f n = c := by
-- sorry
-- rcases aaa with ⟨A, B⟩
-- have this1 : f n = c := by
-- tauto
-- constructor
-- clear A
-- · have this2 : ∀ (t : ), (Polynomial.eval t Poly) = (c : ) := by
-- rw [← Poly_constant Poly (c : )]
-- sorry
-- specialize this2 n
-- rw [this2]
-- tauto
-- · sorry
@ -244,9 +262,7 @@ lemma Δ_PolyType_d_to_PolyType_0 (f : ) (d : ): PolyType f d →
intro h
rcases h with ⟨Poly, hN⟩
rcases hN with ⟨N, hh⟩
have H1 := λ n => (hh n).left
have H2 := λ n => (hh n).right
clear hh
rcases hh with ⟨H1, H2⟩
have HH2 : d = Polynomial.degree Poly := by
sorry
induction' d with d hd