From c8797956abb9c28e2a3eaa97e25a5b926b4cbc40 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 16 Jun 2023 15:11:07 -0400 Subject: [PATCH] golfed foo --- CommAlg/final_poly_type.lean | 39 ++++++------------------------------ 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 85b01a2..07b7bf4 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -194,45 +194,18 @@ lemma Δ_1_ (f : ℤ → ℤ) (d : ℕ) : PolyType (Δ f 1) d → PolyType f (d sorry -lemma foo (d : ℕ) : (f : ℤ → ℤ) → (∃ (c : ℤ), ∃ (N : ℤ), (∀ (n : ℤ), N ≤ n → (Δ f d) (n) = c) ∧ c ≠ 0) → (PolyType f d) := by +lemma foo (d : ℕ) : (f : ℤ → ℤ) → (∃ (c : ℤ), ∃ (N : ℤ), (∀ (n : ℤ), N ≤ n → + (Δ f d) (n) = c) ∧ c ≠ 0) → (PolyType f d) := by induction' d with d hd - -- Base case - · intro f - intro h - rcases h with ⟨c, N, hh⟩ - rw [PolyType_0] - use c - use N - tauto - + · rintro f ⟨c, N, hh⟩; rw [PolyType_0 f]; exact ⟨c, N, hh⟩ -- Induction step - · intro f - intro h - rcases h with ⟨c, N, h⟩ - have this : PolyType f (d + 1) := by - rcases h with ⟨H,c0⟩ - let g := (Δ f 1) - have this1 : (∃ (c : ℤ), ∃ (N : ℤ), (∀ (n : ℤ), N ≤ n → (Δ g d) (n) = c) ∧ c ≠ 0) := by - use c; use N - constructor - · intro n - specialize H n - intro h - have this : Δ f (d + 1) n = c := by tauto - rw [←this] - rw [Δ_1_s_equiv_Δ_s_1] - · tauto - have this2 : PolyType g d := by - apply hd - tauto - exact Δ_1_ f d this2 - exact this + · exact fun f ⟨c, N, ⟨H, c0⟩⟩ => + Δ_1_ f d (hd (Δ f 1) ⟨c, N, fun n h => by rw [← H n h, Δ_1_s_equiv_Δ_s_1], c0⟩) -- [BH, 4.1.2] (a) => (b) -- Δ^d f (n) = c for some nonzero integer c for n >> 0 → f is of polynomial type d -lemma a_to_b (f : ℤ → ℤ) (d : ℕ) : (∃ (c : ℤ), ∃ (N : ℤ), (∀ (n : ℤ), N ≤ n → (Δ f d) (n) = c) ∧ c ≠ 0) → PolyType f d := by - sorry +lemma a_to_b (f : ℤ → ℤ) (d : ℕ) : (∃ (c : ℤ), ∃ (N : ℤ), (∀ (n : ℤ), N ≤ n → (Δ f d) (n) = c) ∧ c ≠ 0) → PolyType f d := fun h => (foo d f) h -- [BH, 4.1.2] (a) <= (b) -- f is of polynomial type d → Δ^d f (n) = c for some nonzero integer c for n >> 0