mirror of
https://github.com/GTBarkley/comm_alg.git
synced 2024-12-26 07:38:36 -06:00
finish more on the PolyType_0 lemma
This commit is contained in:
parent
61a7ae54bf
commit
007e8cf795
1 changed files with 45 additions and 29 deletions
|
@ -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 ℤ
|
||||||
|
@ -107,7 +107,7 @@ def f (n : ℤ) := n
|
||||||
end section
|
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 : ℚ) :
|
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
|
||||||
|
@ -132,6 +132,8 @@ 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
|
||||||
|
@ -139,10 +141,9 @@ lemma PolyType_0 (f : ℤ → ℤ) : (PolyType f 0) ↔ (∃ (c : ℤ), ∃ (N :
|
||||||
· 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=> (hh n).left
|
rcases hh with ⟨H1, H2⟩
|
||||||
have H2 := λ n=> (hh n).right
|
-- have H1 := λ n=> (hh n).left
|
||||||
clear hh
|
-- have H2 := λ n=> (hh n).right
|
||||||
specialize H2 (N + 1)
|
|
||||||
have this1 : Polynomial.degree Poly = 0 := by
|
have this1 : Polynomial.degree Poly = 0 := by
|
||||||
have : N ≤ N + 1 := by
|
have : N ≤ N + 1 := by
|
||||||
norm_num
|
norm_num
|
||||||
|
@ -170,7 +171,6 @@ lemma PolyType_0 (f : ℤ → ℤ) : (PolyType f 0) ↔ (∃ (c : ℤ), ∃ (N :
|
||||||
constructor
|
constructor
|
||||||
· intro HH1
|
· intro HH1
|
||||||
-- have H6 := H1 HH1
|
-- have H6 := H1 HH1
|
||||||
--
|
|
||||||
have this3 : f n = Polynomial.eval (n : ℚ) Poly := by
|
have this3 : f n = Polynomial.eval (n : ℚ) Poly := by
|
||||||
tauto
|
tauto
|
||||||
have this4 : Polynomial.eval (n : ℚ) Poly = c := by
|
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
|
have this5 : f n = (c : ℚ) := by
|
||||||
rw [←this4, this3]
|
rw [←this4, this3]
|
||||||
exact Iff.mp (Rat.coe_int_inj (f n) c) this5
|
exact Iff.mp (Rat.coe_int_inj (f n) c) this5
|
||||||
--
|
|
||||||
|
|
||||||
· intro c0
|
· intro c0
|
||||||
-- have H7 := H2 (by norm_num)
|
-- have H7 := H2 (by norm_num)
|
||||||
|
@ -189,27 +188,46 @@ lemma PolyType_0 (f : ℤ → ℤ) : (PolyType f 0) ↔ (∃ (c : ℤ), ∃ (N :
|
||||||
|
|
||||||
|
|
||||||
· intro h
|
· intro h
|
||||||
rcases h with ⟨c, N, aaa⟩
|
rcases h with ⟨c, N, hh⟩
|
||||||
let (Poly : Polynomial ℚ) := Polynomial.C (c : ℚ)
|
let Poly := Polynomial.C (c : ℚ)
|
||||||
|
--unfold PolyType
|
||||||
use Poly
|
use Poly
|
||||||
|
--simp at Poly
|
||||||
use N
|
use N
|
||||||
intro n
|
have H1 := λ n=> (hh n).left
|
||||||
specialize aaa n
|
have H22 := λ n=> (hh n).right
|
||||||
have this1 : c ≠ 0 → f n = c := by
|
have H2 : c ≠ 0 := by
|
||||||
tauto
|
exact H22 0
|
||||||
rcases aaa with ⟨A, B⟩
|
clear H22
|
||||||
have this1 : f n = c := by
|
|
||||||
tauto
|
|
||||||
constructor
|
constructor
|
||||||
clear A
|
· intro n Nn
|
||||||
· have this2 : ∀ (t : ℚ), (Polynomial.eval t Poly) = (c : ℚ) := by
|
specialize H1 n
|
||||||
rw [← Poly_constant Poly (c : ℚ)]
|
have this : f n = c := by
|
||||||
sorry
|
tauto
|
||||||
specialize this2 n
|
rw [this]
|
||||||
rw [this2]
|
have this2 : Polynomial.eval (n : ℚ) Poly = (c : ℚ) := by
|
||||||
tauto
|
have this3 : ∀ r : ℚ, (Polynomial.eval r Poly) = (c : ℚ) := (Poly_constant Poly (c : ℚ)).mp rfl
|
||||||
· sorry
|
exact this3 n
|
||||||
-- apply Polynomial.degree_C c
|
exact this2.symm
|
||||||
|
|
||||||
|
|
||||||
|
· sorry
|
||||||
|
-- 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
|
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 => (hh n).left
|
rcases hh with ⟨H1, H2⟩
|
||||||
have H2 := λ n => (hh n).right
|
|
||||||
clear hh
|
|
||||||
have HH2 : d = Polynomial.degree Poly := by
|
have HH2 : d = Polynomial.degree Poly := by
|
||||||
sorry
|
sorry
|
||||||
induction' d with d hd
|
induction' d with d hd
|
||||||
|
|
Loading…
Reference in a new issue