From 5a869021189bd2a993aa2c8e9aa28dc10f5f9937 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:10:22 -0700 Subject: [PATCH 01/23] changed --- CommAlg/final_hil_pol.lean | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CommAlg/final_hil_pol.lean b/CommAlg/final_hil_pol.lean index 591c6cc..7176de2 100644 --- a/CommAlg/final_hil_pol.lean +++ b/CommAlg/final_hil_pol.lean @@ -6,7 +6,6 @@ import Mathlib.RingTheory.Artinian import Mathlib.Order.Height - -- Setting for "library_search" set_option maxHeartbeats 0 macro "ls" : tactic => `(tactic|library_search) @@ -44,7 +43,7 @@ noncomputable def length ( A : Type _) (M : Type _) [CommRing A] [AddCommGroup M] [Module A M] := Set.chainHeight {M' : Submodule A M | M' < โŠค} -- Make instance of M_i being an R_0-module -instance tada1 (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] +instance tada1 (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] [DirectSum.Gmodule ๐’œ ๐“œ] (i : โ„ค ) : SMul (๐’œ 0) (๐“œ i) where smul x y := @Eq.rec โ„ค (0+i) (fun a _ => ๐“œ a) (GradedMonoid.GSmul.smul x y) i (zero_add i) @@ -110,7 +109,7 @@ instance {๐’œ : โ„ค โ†’ Type _} [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GComm -class StandardGraded {๐’œ : โ„ค โ†’ Type _} [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GCommRing ๐’œ] : Prop where +class StandardGraded (๐’œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GCommRing ๐’œ] : Prop where gen_in_first_piece : Algebra.adjoin (๐’œ 0) (DirectSum.of _ 1 : ๐’œ 1 โ†’+ โจ i, ๐’œ i).range = (โŠค : Subalgebra (๐’œ 0) (โจ i, ๐’œ i)) @@ -189,10 +188,11 @@ lemma Associated_prime_of_graded_is_graded -- If M is a finite graed R-Mod of dimension d โ‰ฅ 1, then the Hilbert function H(M, n) is of polynomial type (d - 1) theorem Hilbert_polynomial_d_ge_1 (d : โ„•) (d1 : 1 โ‰ค d) (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] -[DirectSum.Gmodule ๐’œ ๐“œ] (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) +[DirectSum.Gmodule ๐’œ ๐“œ] (st: StandardGraded ๐’œ) (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) (fingen : IsNoetherian (โจ i, ๐’œ i) (โจ i, ๐“œ i)) (findim : dimensionmodule (โจ i, ๐’œ i) (โจ i, ๐“œ i) = d) (hilb : โ„ค โ†’ โ„ค) (Hhilb: hilbert_function ๐’œ ๐“œ hilb) + : PolyType hilb (d - 1) := by sorry @@ -203,7 +203,7 @@ theorem Hilbert_polynomial_d_ge_1_reduced (d : โ„•) (d1 : 1 โ‰ค d) (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] -[DirectSum.Gmodule ๐’œ ๐“œ] (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) +[DirectSum.Gmodule ๐’œ ๐“œ] (st: StandardGraded ๐’œ) (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) (fingen : IsNoetherian (โจ i, ๐’œ i) (โจ i, ๐“œ i)) (findim : dimensionmodule (โจ i, ๐’œ i) (โจ i, ๐“œ i) = d) (hilb : โ„ค โ†’ โ„ค) (Hhilb: hilbert_function ๐’œ ๐“œ hilb) @@ -217,7 +217,7 @@ theorem Hilbert_polynomial_d_ge_1_reduced -- If M is a finite graed R-Mod of dimension zero, then the Hilbert function H(M, n) = 0 for n >> 0 theorem Hilbert_polynomial_d_0 (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] -[DirectSum.Gmodule ๐’œ ๐“œ] (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) +[DirectSum.Gmodule ๐’œ ๐“œ] (st: StandardGraded ๐’œ) (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) (fingen : IsNoetherian (โจ i, ๐’œ i) (โจ i, ๐“œ i)) (findim : dimensionmodule (โจ i, ๐’œ i) (โจ i, ๐“œ i) = 0) (hilb : โ„ค โ†’ โ„ค) (Hhilb : hilbert_function ๐’œ ๐“œ hilb) @@ -230,7 +230,7 @@ theorem Hilbert_polynomial_d_0 (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [ theorem Hilbert_polynomial_d_0_reduced (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [DirectSum.GCommRing ๐’œ] -[DirectSum.Gmodule ๐’œ ๐“œ] (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) +[DirectSum.Gmodule ๐’œ ๐“œ] (st: StandardGraded ๐’œ) (art: IsArtinianRing (๐’œ 0)) (loc : LocalRing (๐’œ 0)) (fingen : IsNoetherian (โจ i, ๐’œ i) (โจ i, ๐“œ i)) (findim : dimensionmodule (โจ i, ๐’œ i) (โจ i, ๐“œ i) = 0) (hilb : โ„ค โ†’ โ„ค) (Hhilb : hilbert_function ๐’œ ๐“œ hilb) @@ -256,3 +256,4 @@ theorem Hilbert_polynomial_d_0_reduced + From 766c740c8d76d6a344713b92dcfa796a41183fbe Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Wed, 14 Jun 2023 23:35:46 -0700 Subject: [PATCH 02/23] Add graded_isom (with error) --- CommAlg/final_hil_pol.lean | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/CommAlg/final_hil_pol.lean b/CommAlg/final_hil_pol.lean index 7176de2..e3c141e 100644 --- a/CommAlg/final_hil_pol.lean +++ b/CommAlg/final_hil_pol.lean @@ -108,7 +108,6 @@ instance {๐’œ : โ„ค โ†’ Type _} [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GComm sorry) - class StandardGraded (๐’œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GCommRing ๐’œ] : Prop where gen_in_first_piece : Algebra.adjoin (๐’œ 0) (DirectSum.of _ 1 : ๐’œ 1 โ†’+ โจ i, ๐’œ i).range = (โŠค : Subalgebra (๐’œ 0) (โจ i, ๐’œ i)) @@ -123,7 +122,27 @@ def Component_of_graded_as_addsubgroup (๐’œ : โ„ค โ†’ Type _) def graded_morphism (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) (๐“ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [โˆ€ i, AddCommGroup (๐“ i)] -[DirectSum.GCommRing ๐’œ] [DirectSum.Gmodule ๐’œ ๐“œ][DirectSum.Gmodule ๐’œ ๐“] (f : (โจ i, ๐“œ i) โ†’ (โจ i, ๐“ i)) : โˆ€ i, โˆ€ (r : ๐“œ i), โˆ€ j, (j โ‰  i โ†’ f (DirectSum.of _ i r) j = 0) โˆง (IsLinearMap (โจ i, ๐’œ i) f) := by sorry +[DirectSum.GCommRing ๐’œ] [DirectSum.Gmodule ๐’œ ๐“œ][DirectSum.Gmodule ๐’œ ๐“] +(f : (โจ i, ๐“œ i) โ†’โ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i)) +: โˆ€ i, โˆ€ (r : ๐“œ i), โˆ€ j, (j โ‰  i โ†’ f (DirectSum.of _ i r) j = 0) +โˆง (IsLinearMap (โจ i, ๐’œ i) f) := by + sorry + +#check graded_morphism + +def graded_isomorphism (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) (๐“ : โ„ค โ†’ Type _) +[โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [โˆ€ i, AddCommGroup (๐“ i)] +[DirectSum.GCommRing ๐’œ] [DirectSum.Gmodule ๐’œ ๐“œ][DirectSum.Gmodule ๐’œ ๐“] +(f : (โจ i, ๐“œ i) โ†’โ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i)) +(hf : graded_morphism (fun i => (๐’œ i)) (fun i => (๐“œ i)) (fun i => (๐“ i)) f) +: (f : (โจ i, ๐“œ i) โ‰ƒโ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i)) := by + sorry + + +-- (โŠ• i, ๐’œ i) (โจ i, ๐“œ i) (โŠ• i, ๐“ i) + +#check graded_isomorphism + def graded_submodule @@ -142,6 +161,7 @@ end + -- @Quotient of a graded ring R by a graded ideal p is a graded R-Mod, preserving each component instance Quotient_of_graded_is_graded (๐’œ : โ„ค โ†’ Type _) [โˆ€ i, AddCommGroup (๐’œ i)] [DirectSum.GCommRing ๐’œ] @@ -149,6 +169,13 @@ instance Quotient_of_graded_is_graded : DirectSum.Gmodule ๐’œ (fun i => (๐’œ i)โงธ(Component_of_graded_as_addsubgroup ๐’œ p hp i)) := by sorry +-- +lemma sss + : true := by + sorry + + + -- If A_0 is Artinian and local, then A is graded local lemma Graded_local_if_zero_component_Artinian_and_local (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) @@ -255,5 +282,8 @@ theorem Hilbert_polynomial_d_0_reduced + + + From 75cc002bef90567bf47193dde474eb7ebabadbd9 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 12:31:37 -0700 Subject: [PATCH 03/23] finished a case of polytype 0 --- CommAlg/PolyTEST.lean | 0 CommAlg/final_hil_pol.lean | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 CommAlg/PolyTEST.lean diff --git a/CommAlg/PolyTEST.lean b/CommAlg/PolyTEST.lean new file mode 100644 index 0000000..e69de29 diff --git a/CommAlg/final_hil_pol.lean b/CommAlg/final_hil_pol.lean index e3c141e..eff9302 100644 --- a/CommAlg/final_hil_pol.lean +++ b/CommAlg/final_hil_pol.lean @@ -134,13 +134,11 @@ def graded_isomorphism (๐’œ : โ„ค โ†’ Type _) (๐“œ : โ„ค โ†’ Type _) (๐“ : [โˆ€ i, AddCommGroup (๐’œ i)] [โˆ€ i, AddCommGroup (๐“œ i)] [โˆ€ i, AddCommGroup (๐“ i)] [DirectSum.GCommRing ๐’œ] [DirectSum.Gmodule ๐’œ ๐“œ][DirectSum.Gmodule ๐’œ ๐“] (f : (โจ i, ๐“œ i) โ†’โ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i)) -(hf : graded_morphism (fun i => (๐’œ i)) (fun i => (๐“œ i)) (fun i => (๐“ i)) f) -: (f : (โจ i, ๐“œ i) โ‰ƒโ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i)) := by +: IsLinearEquiv f := by sorry - - --- (โŠ• i, ๐’œ i) (โจ i, ๐“œ i) (โŠ• i, ๐“ i) - +-- f โˆˆ (โจ i, ๐“œ i) โ‰ƒโ‚—[(โจ i, ๐’œ i)] (โจ i, ๐“ i) +-- LinearEquivClass f (โจ i, ๐’œ i) (โจ i, ๐“œ i) (โจ i, ๐“ i) +-- #print IsLinearEquiv #check graded_isomorphism @@ -284,6 +282,8 @@ theorem Hilbert_polynomial_d_0_reduced + + From 41105f8623d584ea652f0b2c8d2ed0f59fd0d6b2 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 12:40:41 -0700 Subject: [PATCH 04/23] Rename the file --- CommAlg/PolyTEST.lean | 0 CommAlg/final_poly_type.lean | 325 +++++++++++++++++++++++++++++++++++ 2 files changed, 325 insertions(+) delete mode 100644 CommAlg/PolyTEST.lean create mode 100644 CommAlg/final_poly_type.lean diff --git a/CommAlg/PolyTEST.lean b/CommAlg/PolyTEST.lean deleted file mode 100644 index e69de29..0000000 diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean new file mode 100644 index 0000000..c62acf3 --- /dev/null +++ b/CommAlg/final_poly_type.lean @@ -0,0 +1,325 @@ +import Mathlib.Order.Height +import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic + +-- Setting for "library_search" +set_option maxHeartbeats 0 +macro "ls" : tactic => `(tactic|library_search) + +-- New tactic "obviously" +macro "obviously" : tactic => + `(tactic| ( + first + | dsimp; simp; done; dbg_trace "it was dsimp simp" + | simp; done; dbg_trace "it was simp" + | tauto; done; dbg_trace "it was tauto" + | simp; tauto; done; dbg_trace "it was simp tauto" + | rfl; done; dbg_trace "it was rfl" + | norm_num; done; dbg_trace "it was norm_num" + | /-change (@Eq โ„ _ _);-/ linarith; done; dbg_trace "it was linarith" + -- | gcongr; done + | ring; done; dbg_trace "it was ring" + | trivial; done; dbg_trace "it was trivial" + -- | nlinarith; done + | fail "No, this is not obvious.")) + + +-- Testing of Polynomial +section Polynomial +noncomputable section +#check Polynomial +#check Polynomial (โ„š) +#check Polynomial.eval + + +example (f : Polynomial โ„š) (hf : f = Polynomial.C (1 : โ„š)) : Polynomial.eval 2 f = 1 := by + have : โˆ€ (q : โ„š), Polynomial.eval q f = 1 := by + sorry + obviously + +-- example (f : โ„ค โ†’ โ„ค) (hf : โˆ€ x, f x = x ^ 2) : Polynomial.eval 2 f = 4 := by +-- sorry + +-- degree of a constant function is โŠฅ (is this same as -1 ???) +#print Polynomial.degree_zero + +def F : Polynomial โ„š := Polynomial.C (2 : โ„š) +#print F +#check F +#check Polynomial.degree F +#check Polynomial.degree 0 +#check WithBot โ„• +-- #eval Polynomial.degree F +#check Polynomial.eval 1 F +example : Polynomial.eval (100 : โ„š) F = (2 : โ„š) := by + refine Iff.mpr (Rat.ext_iff (Polynomial.eval 100 F) 2) ?_ + simp only [Rat.ofNat_num, Rat.ofNat_den] + rw [F] + simp + +-- Treat polynomial f โˆˆ โ„š[X] as a function f : โ„š โ†’ โ„š +#check CoeFun + + + + +end section + + +-- @[BH, 4.1.2] +-- All the polynomials are in โ„š[X], all the functions are considered as โ„ค โ†’ โ„ค +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 +section +-- structure PolyType (f : โ„ค โ†’ โ„ค) where +-- Poly : Polynomial โ„ค +-- d : +-- N : โ„ค +-- Poly_equal : โˆ€ n โˆˆ โ„ค โ†’ f n = Polynomial.eval n : โ„ค Poly + +#check PolyType + +example (f : โ„ค โ†’ โ„ค) (hf : โˆ€ x, f x = x ^ 2) : PolyType f 2 := by + unfold PolyType + sorry + -- use Polynomial.monomial (2 : โ„ค) (1 : โ„ค) + -- have' := hf 0; ring_nf at this + -- exact this + +end section + +-- ฮ” operator (of d times) +@[simp] +def ฮ” : (โ„ค โ†’ โ„ค) โ†’ โ„• โ†’ (โ„ค โ†’ โ„ค) + | f, 0 => f + | f, d + 1 => fun (n : โ„ค) โ†ฆ (ฮ” f d) (n + 1) - (ฮ” f d) (n) +section +-- def ฮ” (f : โ„ค โ†’ โ„ค) (d : โ„•) := fun (n : โ„ค) โ†ฆ f (n + 1) - f n +-- def add' : โ„• โ†’ โ„• โ†’ โ„• +-- | 0, m => m +-- | n+1, m => (add' n m) + 1 +-- #eval add' 5 10 +#check ฮ” +def f (n : โ„ค) := n +#eval (ฮ” f 1) 100 +-- #check (by (show_term unfold ฮ”) : ฮ” f 0=0) +end section + + +-- (NO NEED TO PROVE) Constant polynomial function = constant function +lemma Poly_constant (F : Polynomial โ„š) (c : โ„š) : + (F = Polynomial.C c) โ†” (โˆ€ r : โ„š, (Polynomial.eval r F) = c) := by + constructor + ยท intro h + rintro r + refine Iff.mpr (Rat.ext_iff (Polynomial.eval r F) c) ?_ + simp only [Rat.ofNat_num, Rat.ofNat_den] + rw [h] + simp + ยท sorry + + + + +-- Shifting doesn't change the polynomial type +lemma Poly_shifting (f : โ„ค โ†’ โ„ค) (g : โ„ค โ†’ โ„ค) (hf : PolyType f d) (s : โ„ค) (hfg : โˆ€ (n : โ„ค), f (n + s) = g (n)) : PolyType g d := by + simp only [PolyType] + rcases hf with โŸจF, hhโŸฉ + rcases hh with โŸจN,ssโŸฉ + sorry + + + + +-- 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 + constructor + ยท intro h + rcases h with โŸจPoly, hNโŸฉ + rcases hN with โŸจN, hhโŸฉ + have H1 := ฮป n hn => (hh n hn).left + have H2 := ฮป n hn => (hh n hn).right + clear hh + specialize H2 (N + 1) + have this1 : Polynomial.degree Poly = 0 := by + have : N โ‰ค N + 1 := by + norm_num + tauto + have this2 : โˆƒ (c : โ„ค), Poly = Polynomial.C (c : โ„š) := by + have HH : โˆƒ (c : โ„š), Poly = Polynomial.C (c : โ„š) := by + use Poly.coeff 0 + apply Polynomial.eq_C_of_degree_eq_zero + exact this1 + cases' HH with c HHH + have HHHH : โˆƒ (d : โ„ค), d = c := by + have H3 := (Poly_constant Poly c).mp HHH N + have H4 := H1 N (le_refl N) + rw[H3] at H4 + exact โŸจf N, H4โŸฉ + cases' HHHH with d H5 + use d + rw [H5] + exact HHH + rcases this2 with โŸจc, hthis2โŸฉ + use c + use N + intro n + specialize H1 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 + rw [hthis2] + simp + 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) + rw [hthis2] at this1 + rw [c0] at this1 + simp at this1 + -- + + + ยท intro h + rcases h with โŸจc, N, aaaโŸฉ + let (Poly : Polynomial โ„š) := Polynomial.C (c : โ„š) + use Poly + use N + intro n Nn + specialize aaa n + have this1 : c โ‰  0 โ†’ f n = c := by + tauto + constructor + ยท sorry + ยท sorry + -- apply Polynomial.degree_C c + + + + + + +-- ฮ” of 0 times preserve the function +lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by + tauto + +-- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 +lemma ฮ”_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by + intro h + rcases h with โŸจPoly, hNโŸฉ + rcases hN with โŸจN, hhโŸฉ + have H1 := ฮป n hn => (hh n hn).left + have H2 := ฮป n hn => (hh n hn).right + clear hh + have HH2 : d = Polynomial.degree Poly := by + sorry + induction' d with d hd + ยท rw [PolyType_0] + sorry + ยท sorry + + + + +-- [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 + intro h + rcases h with โŸจc, N, hhโŸฉ + have H1 := ฮป n => (hh n).left + have H2 := ฮป n => (hh n).right + clear hh + have H2 : c โ‰  0 := by + tauto + induction' d with d hd + ยท rw [PolyType_0] + use c + use N + tauto + ยท sorry + +-- [BH, 4.1.2] (a) <= (b) +-- f is of polynomial type d โ†’ ฮ”^d f (n) = c for some nonzero integer c for n >> 0 +lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0)) := by + intro h + have : PolyType (ฮ” f d) 0 := by + apply ฮ”_PolyType_d_to_PolyType_0 + exact h + have this1 : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) n = c) โˆง c โ‰  0)) := by + rw [โ†PolyType_0] + exact this + exact this1 +end + + + + + +-- @Additive lemma of length for a SES +-- Given a SES 0 โ†’ A โ†’ B โ†’ C โ†’ 0, then length (A) - length (B) + length (C) = 0 +section +-- variable {R M N : Type _} [CommRing R] [AddCommGroup M] [AddCommGroup N] [Module R M] [Module R N] +-- (f : M โ†’[R] N) +open LinearMap +-- variable {R M : Type _} [CommRing R] [AddCommGroup M] [Module R M] +-- noncomputable def length := Set.chainHeight {M' : Submodule R M | M' < โŠค} + + +-- Definitiion of the length of a module +noncomputable def length (R M : Type _) [CommRing R] [AddCommGroup M] [Module R M] := Set.chainHeight {M' : Submodule R M | M' < โŠค} +#check length โ„ค โ„ค +-- #eval length โ„ค โ„ค + + +-- @[ext] +-- structure SES (R : Type _) [CommRing R] where +-- A : Type _ +-- B : Type _ +-- C : Type _ +-- f : A โ†’โ‚—[R] B +-- g : B โ†’โ‚—[R] C +-- left_exact : LinearMap.ker f = 0 +-- middle_exact : LinearMap.range f = LinearMap.ker g +-- right_exact : LinearMap.range g = C + + + +-- Definition of a SES (Short Exact Sequence) +-- @[ext] +structure SES {R A B C : Type _} [CommRing R] [AddCommGroup A] [AddCommGroup B] + [AddCommGroup C] [Module R A] [Module R B] [Module R C] + (f : A โ†’โ‚—[R] B) (g : B โ†’โ‚—[R] C) + where + left_exact : LinearMap.ker f = โŠฅ + middle_exact : LinearMap.range f = LinearMap.ker g + right_exact : LinearMap.range g = โŠค + +#check SES.right_exact +#check SES + + +-- Additive lemma +lemma length_Additive (R A B C : Type _) [CommRing R] [AddCommGroup A] [AddCommGroup B] [AddCommGroup C] [Module R A] [Module R B] [Module R C] + (f : A โ†’โ‚—[R] B) (g : B โ†’โ‚—[R] C) + : (SES f g) โ†’ ((length R A) + (length R C) = (length R B)) := by + intro h + rcases h with โŸจleft_exact, middle_exact, right_exactโŸฉ + sorry + +end section + + + + + + + From 61a7ae54bfee1c5176466078d59487bb8ef66c33 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 13:31:48 -0700 Subject: [PATCH 05/23] change PolyType --- CommAlg/final_poly_type.lean | 51 +++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index c62acf3..94dd153 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -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 โ„ค @@ -109,7 +109,7 @@ end section -- (NO NEED TO PROVE) Constant polynomial function = constant function 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 ยท intro h rintro r @@ -134,13 +134,13 @@ 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 +lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), (N โ‰ค n โ†’ f n = c) โˆง (c โ‰  0)) := by constructor ยท intro h rcases h with โŸจPoly, hNโŸฉ rcases hN with โŸจN, hhโŸฉ - have H1 := ฮป n hn => (hh n hn).left - have H2 := ฮป n hn => (hh n hn).right + have H1 := ฮป n=> (hh n).left + have H2 := ฮป n=> (hh n).right clear hh specialize H2 (N + 1) have this1 : Polynomial.degree Poly = 0 := by @@ -182,11 +182,10 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : -- ยท intro c0 - have H7 := H2 (by norm_num) + -- have H7 := H2 (by norm_num) rw [hthis2] at this1 rw [c0] at this1 simp at this1 - -- ยท intro h @@ -194,17 +193,45 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : let (Poly : Polynomial โ„š) := Polynomial.C (c : โ„š) use Poly use N - intro n Nn + 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 constructor - ยท sorry - ยท 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 -- 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 rcases h with โŸจPoly, hNโŸฉ rcases hN with โŸจN, hhโŸฉ - have H1 := ฮป n hn => (hh n hn).left - have H2 := ฮป n hn => (hh n hn).right + have H1 := ฮป n => (hh n).left + have H2 := ฮป n => (hh n).right clear hh have HH2 : d = Polynomial.degree Poly := by sorry From 007e8cf7950442d3fa16cd151eba2e1def637c93 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:10:30 -0700 Subject: [PATCH 06/23] finish more on the PolyType_0 lemma --- CommAlg/final_poly_type.lean | 74 ++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 94dd153..ebd6043 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -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 - ยท sorry - -- apply Polynomial.degree_C c + ยท 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 + -- 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 From 300007621a41a50bb0d75eef3034a2378a9af6d1 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:38:25 -0700 Subject: [PATCH 07/23] Finish the PolyType_0 lemma! --- CommAlg/final_poly_type.lean | 44 ++++++------------------------------ 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index ebd6043..60df0d4 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -198,6 +198,8 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : have H22 := ฮป n=> (hh n).right have H2 : c โ‰  0 := by exact H22 0 + have H2 : (c : โ„š) โ‰  0 := by + simp; tauto clear H22 constructor ยท intro n Nn @@ -206,47 +208,15 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : 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 + have this3 : โˆ€ r : โ„š, (Polynomial.eval r Poly) = (c : โ„š) := (Poly_constant Poly (c : โ„š)).mp rfl exact this3 n 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 - - - - -- 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 + ยท have this : Polynomial.degree Poly = 0 := by + simp only [map_intCast] + exact Polynomial.degree_C H2 + tauto From d5b2e4d431c4edf47b7e01e3317281e5122b64e8 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:51:32 -0700 Subject: [PATCH 08/23] Part of the base case of \Delta lemma --- CommAlg/final_poly_type.lean | 60 +++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 60df0d4..403e14e 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -65,7 +65,13 @@ example : Polynomial.eval (100 : โ„š) F = (2 : โ„š) := by end section + + + -- @[BH, 4.1.2] + + + -- All the polynomials are in โ„š[X], all the functions are considered as โ„ค โ†’ โ„ค noncomputable section -- Polynomial type of degree d @@ -107,6 +113,10 @@ def f (n : โ„ค) := n end section + + + + -- (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 @@ -133,7 +143,6 @@ 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 @@ -211,7 +220,6 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : have this3 : โˆ€ r : โ„š, (Polynomial.eval r Poly) = (c : โ„š) := (Poly_constant Poly (c : โ„š)).mp rfl exact this3 n exact this2.symm - ยท have this : Polynomial.degree Poly = 0 := by simp only [map_intCast] @@ -221,23 +229,54 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : - - -- ฮ” of 0 times preserve the function lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by tauto + + + + -- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 -lemma ฮ”_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by +lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by intro h rcases h with โŸจPoly, hNโŸฉ rcases hN with โŸจN, hhโŸฉ rcases hh with โŸจH1, H2โŸฉ have HH2 : d = Polynomial.degree Poly := by - sorry + tauto + have HH3 : Polynomial.degree Poly = d := by + tauto induction' d with d hd + -- Base case ยท rw [PolyType_0] - sorry + have this : Poly = Polynomial.C (Polynomial.coeff Poly 0) := by + exact Polynomial.eq_C_of_degree_eq_zero HH3 + let d := Polynomial.coeff Poly 0 + have this11 : โˆƒ (c : โ„ค), c = d := by + sorry + rcases this11 with โŸจc, this1โŸฉ + have this1 : c = Polynomial.coeff Poly 0 := by + tauto + use c; use N; intro n + constructor + ยท specialize H1 n + rw [ฮ”_0] + intro h + have this2 : f n = Polynomial.eval (n : โ„š) Poly := by + tauto + have this3 : f n = (c : โ„š) := by + rw [this2, this1] + let HHH := (Poly_constant Poly c).mp + sorry + exact Iff.mp (Rat.coe_int_inj (f n) c) this3 + ยท intro c0 + have this2 : (c : โ„š) = 0 := by + exact congrArg Int.cast c0 + have this3 : Polynomial.coeff Poly 0 = 0 := by + rw [โ†this1, this2] + sorry + -- Induction step ยท sorry @@ -260,12 +299,14 @@ lemma a_to_b (f : โ„ค โ†’ โ„ค) (d : โ„•) : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n tauto ยท sorry + + -- [BH, 4.1.2] (a) <= (b) -- f is of polynomial type d โ†’ ฮ”^d f (n) = c for some nonzero integer c for n >> 0 lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0)) := by intro h have : PolyType (ฮ” f d) 0 := by - apply ฮ”_PolyType_d_to_PolyType_0 + apply ฮ”_d_PolyType_d_to_PolyType_0 exact h have this1 : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) n = c) โˆง c โ‰  0)) := by rw [โ†PolyType_0] @@ -277,6 +318,9 @@ end + + + -- @Additive lemma of length for a SES -- Given a SES 0 โ†’ A โ†’ B โ†’ C โ†’ 0, then length (A) - length (B) + length (C) = 0 section From b8928c8d90964e6d996746a2df3bc7c0e4ab6dfc Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 15 Jun 2023 22:09:13 -0400 Subject: [PATCH 09/23] refactored PolyType_0 --- CommAlg/final_poly_type.lean | 97 ++++++------------------------------ 1 file changed, 16 insertions(+), 81 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 60df0d4..aca056a 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -136,92 +136,27 @@ 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 +lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), + (N โ‰ค n โ†’ f n = c) โˆง c โ‰  0) := by constructor - ยท intro h - rcases h with โŸจPoly, hNโŸฉ - rcases hN with โŸจN, hhโŸฉ - 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 - tauto + ยท rintro โŸจPoly, โŸจN, โŸจH1, H2โŸฉโŸฉโŸฉ + have this1 : Polynomial.degree Poly = 0 := by rw [โ† H2]; rfl have this2 : โˆƒ (c : โ„ค), Poly = Polynomial.C (c : โ„š) := by - have HH : โˆƒ (c : โ„š), Poly = Polynomial.C (c : โ„š) := by - use Poly.coeff 0 - apply Polynomial.eq_C_of_degree_eq_zero - exact this1 + have HH : โˆƒ (c : โ„š), Poly = Polynomial.C (c : โ„š) := โŸจPoly.coeff 0, Polynomial.eq_C_of_degree_eq_zero (by rw[โ† H2]; rfl)โŸฉ cases' HH with c HHH - have HHHH : โˆƒ (d : โ„ค), d = c := by - have H3 := (Poly_constant Poly c).mp HHH N - have H4 := H1 N (le_refl N) - rw[H3] at H4 - exact โŸจf N, H4โŸฉ - cases' HHHH with d H5 - use d - rw [H5] - exact HHH - rcases this2 with โŸจc, hthis2โŸฉ - use c - use N - intro n - specialize H1 n + have HHHH : โˆƒ (d : โ„ค), d = c := โŸจf N, by simp [(Poly_constant Poly c).mp HHH N, H1 N (le_refl N)]โŸฉ + cases' HHHH with d H5; exact โŸจd, by rw[โ† H5] at HHH; exact HHHโŸฉ + rcases this2 with โŸจc, hthis2โŸฉ + use c; use N; intro 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 - rw [hthis2] - simp - have this5 : f n = (c : โ„š) := by - rw [โ†this4, this3] - exact Iff.mp (Rat.coe_int_inj (f n) c) this5 - + ยท have this4 : Polynomial.eval (n : โ„š) Poly = c := by + rw [hthis2]; simp only [map_intCast, Polynomial.eval_int_cast] + exact fun HH1 => Iff.mp (Rat.coe_int_inj (f n) c) (by rw [โ†this4, H1 n HH1]) ยท intro c0 - -- have H7 := H2 (by norm_num) - rw [hthis2] at this1 - rw [c0] at this1 - simp at this1 - - - ยท intro h - rcases h with โŸจc, N, hhโŸฉ - let Poly := Polynomial.C (c : โ„š) - --unfold PolyType - use Poly - --simp at Poly - use N - have H1 := ฮป n=> (hh n).left - have H22 := ฮป n=> (hh n).right - have H2 : c โ‰  0 := by - exact H22 0 - have H2 : (c : โ„š) โ‰  0 := by - simp; tauto - clear H22 - constructor - ยท 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 - - - ยท have this : Polynomial.degree Poly = 0 := by - simp only [map_intCast] - exact Polynomial.degree_C H2 - tauto - - - - - + simp only [hthis2, c0, Int.cast_zero, map_zero, Polynomial.degree_zero] at this1 + ยท rintro โŸจc, N, hhโŸฉ + have H2 : (c : โ„š) โ‰  0 := by simp only [ne_eq, Int.cast_eq_zero]; exact (hh 0).2 + exact โŸจPolynomial.C (c : โ„š), N, fun n Nn => by rw [(hh n).1 Nn]; exact (((Poly_constant (Polynomial.C (c : โ„š)) (c : โ„š)).mp rfl) n).symm, by rw [Polynomial.degree_C H2]; rflโŸฉ -- ฮ” of 0 times preserve the function lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by From 31210a9bf5f2fece27ba9c7c829cd1688bdc3327 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 20:27:29 -0700 Subject: [PATCH 10/23] add foo and foofoo --- CommAlg/final_poly_type.lean | 79 +++++++++++++++++------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 403e14e..3669cb6 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -229,55 +229,49 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : --- ฮ” of 0 times preserve the function -lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by - tauto +-- ฮ” of 0 times preserves the function +lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by tauto + +-- ฮ” of 1 times decreaes the polynomial type by one +lemma ฮ”_1 (f : โ„ค โ†’ โ„ค) (d : โ„•): d > 0 โ†’ PolyType f d โ†’ PolyType (ฮ” f 1) (d - 1) := by + sorry + + +lemma foo (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by + sorry -- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 +lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” f d) 0):= by + induction' d with d hd + ยท intro f h + rw [ฮ”_0] + tauto + ยท intro f hf + have this1 : PolyType f (d + 1) := by tauto + have this2 : PolyType (ฮ” f (d + 1)) 0 := by + have this3 : PolyType (ฮ” f 1) d := by + sorry + clear hf + specialize hd (ฮ” f 1) + have this4 : PolyType (ฮ” (ฮ” f 1) d) 0 := by tauto + rw [foo] at this4 + tauto + tauto + + + lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by intro h - rcases h with โŸจPoly, hNโŸฉ - rcases hN with โŸจN, hhโŸฉ - rcases hh with โŸจH1, H2โŸฉ - have HH2 : d = Polynomial.degree Poly := by - tauto - have HH3 : Polynomial.degree Poly = d := by - tauto - induction' d with d hd - -- Base case - ยท rw [PolyType_0] - have this : Poly = Polynomial.C (Polynomial.coeff Poly 0) := by - exact Polynomial.eq_C_of_degree_eq_zero HH3 - let d := Polynomial.coeff Poly 0 - have this11 : โˆƒ (c : โ„ค), c = d := by - sorry - rcases this11 with โŸจc, this1โŸฉ - have this1 : c = Polynomial.coeff Poly 0 := by - tauto - use c; use N; intro n - constructor - ยท specialize H1 n - rw [ฮ”_0] - intro h - have this2 : f n = Polynomial.eval (n : โ„š) Poly := by - tauto - have this3 : f n = (c : โ„š) := by - rw [this2, this1] - let HHH := (Poly_constant Poly c).mp - sorry - exact Iff.mp (Rat.coe_int_inj (f n) c) this3 - ยท intro c0 - have this2 : (c : โ„š) = 0 := by - exact congrArg Int.cast c0 - have this3 : Polynomial.coeff Poly 0 = 0 := by - rw [โ†this1, this2] - sorry - -- Induction step - ยท sorry + have this : โˆ€ (d : โ„•), โˆ€ (f :โ„ค โ†’ โ„ค), (PolyType f d) โ†’ (PolyType (ฮ” f d) 0) := by + exact foofoo + specialize this d f + tauto + + @@ -293,10 +287,13 @@ lemma a_to_b (f : โ„ค โ†’ โ„ค) (d : โ„•) : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n have H2 : c โ‰  0 := by tauto induction' d with d hd + -- Base case ยท rw [PolyType_0] use c use N tauto + + -- Induction step ยท sorry From a3c376de01fc08b5a1dc3eebc8ff579e42302ff7 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 20:28:30 -0700 Subject: [PATCH 11/23] merge two files --- CommAlg/final_poly_type.lean | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 3fc34d7..96a3aca 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -167,14 +167,21 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : have H2 : (c : โ„š) โ‰  0 := by simp only [ne_eq, Int.cast_eq_zero]; exact (hh 0).2 exact โŸจPolynomial.C (c : โ„š), N, fun n Nn => by rw [(hh n).1 Nn]; exact (((Poly_constant (Polynomial.C (c : โ„š)) (c : โ„š)).mp rfl) n).symm, by rw [Polynomial.degree_C H2]; rflโŸฉ + + + -- ฮ” of 0 times preserves the function lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by tauto + + -- ฮ” of 1 times decreaes the polynomial type by one lemma ฮ”_1 (f : โ„ค โ†’ โ„ค) (d : โ„•): d > 0 โ†’ PolyType f d โ†’ PolyType (ฮ” f 1) (d - 1) := by sorry + + lemma foo (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by sorry From 01f628cf986c8bdc6d9a13592c888408278f1246 Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 20:43:52 -0700 Subject: [PATCH 12/23] kind of finish \Delta of d times lemma --- CommAlg/final_poly_type.lean | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 96a3aca..4405e42 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -199,7 +199,9 @@ lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” have this1 : PolyType f (d + 1) := by tauto have this2 : PolyType (ฮ” f (d + 1)) 0 := by have this3 : PolyType (ฮ” f 1) d := by - sorry + have this4 : d + 1 > 0 := by positivity + have this5 : (d + 1) > 0 โ†’ PolyType f (d + 1) โ†’ PolyType (ฮ” f 1) d := ฮ”_1 f (d + 1) + exact this5 this4 this1 clear hf specialize hd (ฮ” f 1) have this4 : PolyType (ฮ” (ฮ” f 1) d) 0 := by tauto From 37d8991879f5fdccad630a28fe4282d042d12261 Mon Sep 17 00:00:00 2001 From: poincare-duality Date: Thu, 15 Jun 2023 20:45:29 -0700 Subject: [PATCH 13/23] proved one direction --- CommAlg/jayden(krull-dim-zero).lean | 140 ++++++++++++++++++++++------ 1 file changed, 109 insertions(+), 31 deletions(-) diff --git a/CommAlg/jayden(krull-dim-zero).lean b/CommAlg/jayden(krull-dim-zero).lean index f75912a..78bd648 100644 --- a/CommAlg/jayden(krull-dim-zero).lean +++ b/CommAlg/jayden(krull-dim-zero).lean @@ -16,6 +16,7 @@ import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Algebra.Ring.Pi import Mathlib.RingTheory.Finiteness import Mathlib.Util.PiNotation +import CommAlg.krull open PiNotation @@ -23,10 +24,10 @@ namespace Ideal variable (R : Type _) [CommRing R] (P : PrimeSpectrum R) -noncomputable def height : โ„•โˆž := Set.chainHeight {J : PrimeSpectrum R | J < P} +-- noncomputable def height : โ„•โˆž := Set.chainHeight {J : PrimeSpectrum R | J < P} -noncomputable def krullDim (R : Type) [CommRing R] : - WithBot โ„•โˆž := โจ† (I : PrimeSpectrum R), height R I +-- noncomputable def krullDim (R : Type) [CommRing R] : +-- WithBot โ„•โˆž := โจ† (I : PrimeSpectrum R), height R I --variable {R} @@ -66,6 +67,8 @@ lemma ring_Noetherian_iff_spec_Noetherian : IsNoetherianRing R โ†” TopologicalSpace.NoetherianSpace (PrimeSpectrum R) := by constructor intro RisNoetherian + sorry + sorry -- how do I apply an instance to prove one direction? @@ -99,9 +102,9 @@ lemma containment_radical_power_containment : -- Stacks Lemma 10.52.6: I is a maximal ideal and IM = 0. Then length of M is -- the same as the dimension as a vector space over R/I, -lemma length_eq_dim_if_maximal_annihilates {I : Ideal R} [Ideal.IsMaximal I] - : I โ€ข (โŠค : Submodule R M) = 0 - โ†’ Module.length R M = Module.rank RโงธI Mโงธ(I โ€ข (โŠค : Submodule R M)) := by sorry +-- lemma length_eq_dim_if_maximal_annihilates {I : Ideal R} [Ideal.IsMaximal I] +-- : I โ€ข (โŠค : Submodule R M) = 0 +-- โ†’ Module.length R M = Module.rank RโงธI Mโงธ(I โ€ข (โŠค : Submodule R M)) := by sorry -- Does lean know that M/IM is a R/I module? -- Use 10.52.5 @@ -125,30 +128,34 @@ lemma Artinian_has_finite_max_ideal let m' : โ„• โ†ช MaximalSpectrum R := Infinite.natEmbedding (MaximalSpectrum R) have m'inj := m'.injective let m'' : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ โจ… k โˆˆ range n, (m' k).asIdeal - let f : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ (m' n).asIdeal - let F : Fin n โ†’ Ideal R := fun k โ†ฆ (m' k).asIdeal - have comaximal : โˆ€ i j : โ„•, i โ‰  j โ†’ (m' i).asIdeal โŠ” (m' j).asIdeal = - (โŠค : Ideal R) := by - intro i j distinct - apply Ideal.IsMaximal.coprime_of_ne - exact (m' i).IsMaximal - exact (m' j).IsMaximal - have : (m' i) โ‰  (m' j) := by - exact Function.Injective.ne m'inj distinct - intro h - apply this - exact MaximalSpectrum.ext _ _ h - have โˆ€ n : โ„•, (R โงธ โจ… (i : Fin n), (F n) i) โ‰ƒ+* ((i : Fin n) โ†’ R โงธ (F n) i) := by + -- let f : โ„• โ†’ MaximalSpectrum R := fun n : โ„• โ†ฆ m' n + -- let F : (n : โ„•) โ†’ Fin n โ†’ MaximalSpectrum R := fun n k โ†ฆ m' k + have DCC : โˆƒ n : โ„•, โˆ€ k : โ„•, n โ‰ค k โ†’ m'' n = m'' k := by + apply IsArtinian.monotone_stabilizes { + toFun := m'' + monotone' := sorry + } + cases' DCC with n DCCn + specialize DCCn (n+1) + specialize DCCn (Nat.le_succ n) + have containment1 : m'' n < (m' (n + 1)).asIdeal := by sorry + have : โˆ€ (j : โ„•), (j โ‰  n + 1) โ†’ โˆƒ x, x โˆˆ (m' j).asIdeal โˆง x โˆ‰ (m' (n+1)).asIdeal := by + intro j jnotn + have notcontain : ยฌ (m' j).asIdeal โ‰ค (m' (n+1)).asIdeal := by + -- apply Ideal.IsMaximal (m' j).asIdeal + sorry sorry - -- (let F : Fin n โ†’ Ideal R := fun k : Fin n โ†ฆ (m' k).asIdeal) - -- let g := Ideal.quotientInfRingEquivPiQuotient f comaximal - + sorry + -- have distinct : (m' j).asIdeal โ‰  (m' (n+1)).asIdeal := by + -- intro h + -- apply Function.Injective.ne m'inj jnotn + -- exact MaximalSpectrum.ext _ _ h + -- simp + -- unfold + -- Stacks Lemma 10.53.4: R Artinian => Jacobson ideal of R is nilpotent -lemma Jacobson_of_Artinian_is_nilpotent - [IsArtinianRing R] : IsNilpotent (Ideal.jacobson (โŠฅ : Ideal R)) := by - have J := Ideal.jacobson (โŠฅ : Ideal R) - +-- This is in mathlib: IsArtinianRing.isNilpotent_jacobson_bot -- Stacks Lemma 10.53.5: If R has finitely many maximal ideals and -- locally nilpotent Jacobson radical, then R is the product of its localizations at @@ -187,21 +194,92 @@ lemma primes_of_Artinian_are_maximal -- Lemma: Krull dimension of a ring is the supremum of height of maximal ideals - -- Stacks Lemma 10.60.5: R is Artinian iff R is Noetherian of dimension 0 -lemma dim_zero_Noetherian_iff_Artinian (R : Type _) [CommRing R] : - IsNoetherianRing R โˆง Ideal.krullDim R = 0 โ†” IsArtinianRing R := by +lemma dim_le_zero_Noetherian_iff_Artinian (R : Type _) [CommRing R] : + IsNoetherianRing R โˆง Ideal.krullDim R โ‰ค 0 โ†” IsArtinianRing R := by constructor sorry intro RisArtinian constructor apply finite_length_is_Noetherian rwa [IsArtinian_iff_finite_length] at RisArtinian - sorry -- can use Grant's lemma dim_eq_zero_iff + rw [Ideal.dim_le_zero_iff] + intro I + apply primes_of_Artinian_are_maximal +-- Trash bin +-- lemma Artinian_has_finite_max_ideal +-- [IsArtinianRing R] : Finite (MaximalSpectrum R) := by +-- by_contra infinite +-- simp only [not_finite_iff_infinite] at infinite +-- let m' : โ„• โ†ช MaximalSpectrum R := Infinite.natEmbedding (MaximalSpectrum R) +-- have m'inj := m'.injective +-- let m'' : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ โจ… k โˆˆ range n, (m' k).asIdeal +-- let f : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ (m' n).asIdeal +-- have DCC : โˆƒ n : โ„•, โˆ€ k : โ„•, n โ‰ค k โ†’ m'' n = m'' k := by +-- apply IsArtinian.monotone_stabilizes { +-- toFun := m'' +-- monotone' := sorry +-- } +-- cases' DCC with n DCCn +-- specialize DCCn (n+1) +-- specialize DCCn (Nat.le_succ n) +-- let F : Fin (n + 1) โ†’ MaximalSpectrum R := fun k โ†ฆ m' k +-- have comaximal : โˆ€ (i j : Fin (n + 1)), (i โ‰  j) โ†’ (F i).asIdeal โŠ” (F j).asIdeal = +-- (โŠค : Ideal R) := by +-- intro i j distinct +-- apply Ideal.IsMaximal.coprime_of_ne +-- exact (F i).IsMaximal +-- exact (F j).IsMaximal +-- have : (F i) โ‰  (F j) := by +-- apply Function.Injective.ne m'inj +-- contrapose! distinct +-- exact Fin.ext distinct +-- intro h +-- apply this +-- exact MaximalSpectrum.ext _ _ h +-- let CRT1 : (R โงธ โจ… (i : Fin (n + 1)), ((F i).asIdeal)) +-- โ‰ƒ+* ((i : Fin (n + 1)) โ†’ R โงธ (F i).asIdeal) := +-- Ideal.quotientInfRingEquivPiQuotient +-- (fun i โ†ฆ (F i).asIdeal) comaximal +-- let CRT2 : (R โงธ โจ… (i : Fin (n + 1)), ((F i).asIdeal)) +-- โ‰ƒ+* ((i : Fin (n + 1)) โ†’ R โงธ (F i).asIdeal) := +-- Ideal.quotientInfRingEquivPiQuotient +-- (fun i โ†ฆ (F i).asIdeal) comaximal + + + + + -- have comaximal : โˆ€ (n : โ„•) (i j : Fin n), (i โ‰  j) โ†’ ((F n) i).asIdeal โŠ” ((F n) j).asIdeal = + -- (โŠค : Ideal R) := by + -- intro n i j distinct + -- apply Ideal.IsMaximal.coprime_of_ne + -- exact (F n i).IsMaximal + -- exact (F n j).IsMaximal + -- have : (F n i) โ‰  (F n j) := by + -- apply Function.Injective.ne m'inj + -- contrapose! distinct + -- exact Fin.ext distinct + -- intro h + -- apply this + -- exact MaximalSpectrum.ext _ _ h + -- let CRT : (n : โ„•) โ†’ (R โงธ โจ… (i : Fin n), ((F n) i).asIdeal) + -- โ‰ƒ+* ((i : Fin n) โ†’ R โงธ ((F n) i).asIdeal) := + -- fun n โ†ฆ Ideal.quotientInfRingEquivPiQuotient + -- (fun i โ†ฆ (F n i).asIdeal) (comaximal n) + -- have DCC : โˆƒ n : โ„•, โˆ€ k : โ„•, n โ‰ค k โ†’ m'' n = m'' k := by + -- apply IsArtinian.monotone_stabilizes { + -- toFun := m'' + -- monotone' := sorry + -- } + -- cases' DCC with n DCCn + -- specialize DCCn (n+1) + -- specialize DCCn (Nat.le_succ n) + -- let CRT1 := CRT n + -- let CRT2 := CRT (n + 1) From 7cc1079f7d3f77b056049f89b5588e74bb28e0c9 Mon Sep 17 00:00:00 2001 From: GTBarkley Date: Fri, 16 Jun 2023 03:53:29 +0000 Subject: [PATCH 14/23] swapped inequalities in lt_height_iff --- CommAlg/krull.lean | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/CommAlg/krull.lean b/CommAlg/krull.lean index e068760..79e81c2 100644 --- a/CommAlg/krull.lean +++ b/CommAlg/krull.lean @@ -72,31 +72,32 @@ lemma krullDim_eq_height [LocalRing R] : krullDim R = height (closedPoint R) := /-- The height of a prime `๐”ญ` is greater than `n` if and only if there is a chain of primes less than `๐”ญ` with length `n + 1`. -/ lemma lt_height_iff' {๐”ญ : PrimeSpectrum R} {n : โ„•โˆž} : -height ๐”ญ > n โ†” โˆƒ c : List (PrimeSpectrum R), c.Chain' (ยท < ยท) โˆง (โˆ€ ๐”ฎ โˆˆ c, ๐”ฎ < ๐”ญ) โˆง c.length = n + 1 := by - rcases n with _ | n - . constructor <;> intro h <;> exfalso +n < height ๐”ญ โ†” โˆƒ c : List (PrimeSpectrum R), c.Chain' (ยท < ยท) โˆง (โˆ€ ๐”ฎ โˆˆ c, ๐”ฎ < ๐”ญ) โˆง c.length = n + 1 := by + match n with + | โŠค => + constructor <;> intro h <;> exfalso . exact (not_le.mpr h) le_top . tauto - have (m : โ„•โˆž) : m > some n โ†” m โ‰ฅ some (n + 1) := by - symm - show (n + 1 โ‰ค m โ†” _ ) - apply ENat.add_one_le_iff - exact ENat.coe_ne_top _ - rw [this] - unfold Ideal.height - show ((โ†‘(n + 1):โ„•โˆž) โ‰ค _) โ†” โˆƒc, _ โˆง _ โˆง ((_ : WithTop โ„•) = (_:โ„•โˆž)) - rw [{J | J < ๐”ญ}.le_chainHeight_iff] - show (โˆƒ c, (List.Chain' _ c โˆง โˆ€๐”ฎ, ๐”ฎ โˆˆ c โ†’ ๐”ฎ < ๐”ญ) โˆง _) โ†” _ - constructor <;> rintro โŸจc, hcโŸฉ <;> use c - . tauto - . change _ โˆง _ โˆง (List.length c : โ„•โˆž) = n + 1 at hc - norm_cast at hc - tauto + | (n : โ„•) => + have (m : โ„•โˆž) : n < m โ†” (n + 1 : โ„•โˆž) โ‰ค m := by + symm + show (n + 1 โ‰ค m โ†” _ ) + apply ENat.add_one_le_iff + exact ENat.coe_ne_top _ + rw [this] + unfold Ideal.height + show ((โ†‘(n + 1):โ„•โˆž) โ‰ค _) โ†” โˆƒc, _ โˆง _ โˆง ((_ : WithTop โ„•) = (_:โ„•โˆž)) + rw [{J | J < ๐”ญ}.le_chainHeight_iff] + show (โˆƒ c, (List.Chain' _ c โˆง โˆ€๐”ฎ, ๐”ฎ โˆˆ c โ†’ ๐”ฎ < ๐”ญ) โˆง _) โ†” _ + constructor <;> rintro โŸจc, hcโŸฉ <;> use c + . tauto + . change _ โˆง _ โˆง (List.length c : โ„•โˆž) = n + 1 at hc + norm_cast at hc + tauto /-- Form of `lt_height_iff''` for rewriting with the height coerced to `WithBot โ„•โˆž`. -/ lemma lt_height_iff'' {๐”ญ : PrimeSpectrum R} {n : โ„•โˆž} : -height ๐”ญ > (n : WithBot โ„•โˆž) โ†” โˆƒ c : List (PrimeSpectrum R), c.Chain' (ยท < ยท) โˆง (โˆ€ ๐”ฎ โˆˆ c, ๐”ฎ < ๐”ญ) โˆง c.length = n + 1 := by - show (_ < _) โ†” _ +(n : WithBot โ„•โˆž) < height ๐”ญ โ†” โˆƒ c : List (PrimeSpectrum R), c.Chain' (ยท < ยท) โˆง (โˆ€ ๐”ฎ โˆˆ c, ๐”ฎ < ๐”ญ) โˆง c.length = n + 1 := by rw [WithBot.coe_lt_coe] exact lt_height_iff' @@ -158,7 +159,7 @@ lemma dim_le_zero_iff : krullDim R โ‰ค 0 โ†” โˆ€ I : PrimeSpectrum R, IsMaximal rw [hcontr] at h exact h h๐”ช.1 use ๐”ชp - show (_ : WithBot โ„•โˆž) > (0 : โ„•โˆž) + show (0 : โ„•โˆž) < (_ : WithBot โ„•โˆž) rw [lt_height_iff''] use [I] constructor @@ -169,7 +170,7 @@ lemma dim_le_zero_iff : krullDim R โ‰ค 0 โ†” โˆ€ I : PrimeSpectrum R, IsMaximal rwa [hI'] . simp . contrapose! h - change (_ : WithBot โ„•โˆž) > (0 : โ„•โˆž) at h + change (0 : โ„•โˆž) < (_ : WithBot โ„•โˆž) at h rw [lt_height_iff''] at h obtain โŸจc, _, hc2, hc3โŸฉ := h norm_cast at hc3 From 85263016c118b8b2f8363110a0ccc589e6c0222a Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 16 Jun 2023 00:00:20 -0400 Subject: [PATCH 15/23] fixed indentation for PolyType_0 --- CommAlg/final_poly_type.lean | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 4405e42..bfbef39 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -151,9 +151,11 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : ยท rintro โŸจPoly, โŸจN, โŸจH1, H2โŸฉโŸฉโŸฉ have this1 : Polynomial.degree Poly = 0 := by rw [โ† H2]; rfl have this2 : โˆƒ (c : โ„ค), Poly = Polynomial.C (c : โ„š) := by - have HH : โˆƒ (c : โ„š), Poly = Polynomial.C (c : โ„š) := โŸจPoly.coeff 0, Polynomial.eq_C_of_degree_eq_zero (by rw[โ† H2]; rfl)โŸฉ + have HH : โˆƒ (c : โ„š), Poly = Polynomial.C (c : โ„š) := + โŸจPoly.coeff 0, Polynomial.eq_C_of_degree_eq_zero (by rw[โ† H2]; rfl)โŸฉ cases' HH with c HHH - have HHHH : โˆƒ (d : โ„ค), d = c := โŸจf N, by simp [(Poly_constant Poly c).mp HHH N, H1 N (le_refl N)]โŸฉ + have HHHH : โˆƒ (d : โ„ค), d = c := + โŸจf N, by simp [(Poly_constant Poly c).mp HHH N, H1 N (le_refl N)]โŸฉ cases' HHHH with d H5; exact โŸจd, by rw[โ† H5] at HHH; exact HHHโŸฉ rcases this2 with โŸจc, hthis2โŸฉ use c; use N; intro n @@ -162,10 +164,13 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : rw [hthis2]; simp only [map_intCast, Polynomial.eval_int_cast] exact fun HH1 => Iff.mp (Rat.coe_int_inj (f n) c) (by rw [โ†this4, H1 n HH1]) ยท intro c0 - simp only [hthis2, c0, Int.cast_zero, map_zero, Polynomial.degree_zero] at this1 + simp only [hthis2, c0, Int.cast_zero, map_zero, Polynomial.degree_zero] + at this1 ยท rintro โŸจc, N, hhโŸฉ - have H2 : (c : โ„š) โ‰  0 := by simp only [ne_eq, Int.cast_eq_zero]; exact (hh 0).2 - exact โŸจPolynomial.C (c : โ„š), N, fun n Nn => by rw [(hh n).1 Nn]; exact (((Poly_constant (Polynomial.C (c : โ„š)) (c : โ„š)).mp rfl) n).symm, by rw [Polynomial.degree_C H2]; rflโŸฉ + have H2 : (c : โ„š) โ‰  0 := by simp only [ne_eq, Int.cast_eq_zero]; exact (hh 0).2 + exact โŸจPolynomial.C (c : โ„š), N, fun n Nn + => by rw [(hh n).1 Nn]; exact (((Poly_constant (Polynomial.C (c : โ„š)) + (c : โ„š)).mp rfl) n).symm, by rw [Polynomial.degree_C H2]; rflโŸฉ From 04bda915d14865967076122446152a5dd830213c Mon Sep 17 00:00:00 2001 From: chelseaandmadrid <53058005+chelseaandmadrid@users.noreply.github.com> Date: Thu, 15 Jun 2023 21:27:52 -0700 Subject: [PATCH 16/23] change statement of PolyType_0 --- CommAlg/final_poly_type.lean | 69 ++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index 4405e42..377619c 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -145,8 +145,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 +lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), (โˆ€ (n : โ„ค), + (N โ‰ค n โ†’ f n = c)) โˆง c โ‰  0) := by constructor ยท rintro โŸจPoly, โŸจN, โŸจH1, H2โŸฉโŸฉโŸฉ have this1 : Polynomial.degree Poly = 0 := by rw [โ† H2]; rfl @@ -182,14 +182,11 @@ lemma ฮ”_1 (f : โ„ค โ†’ โ„ค) (d : โ„•): d > 0 โ†’ PolyType f d โ†’ PolyType (ฮ” -lemma foo (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by - sorry - - - -- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 +lemma ฮ”_1_s_equiv_ฮ”_s_1 (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by + sorry lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” f d) 0):= by induction' d with d hd ยท intro f h @@ -205,12 +202,9 @@ lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” clear hf specialize hd (ฮ” f 1) have this4 : PolyType (ฮ” (ฮ” f 1) d) 0 := by tauto - rw [foo] at this4 + rw [ฮ”_1_s_equiv_ฮ”_s_1] at this4 tauto tauto - - - lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by intro h have this : โˆ€ (d : โ„•), โˆ€ (f :โ„ค โ†’ โ„ค), (PolyType f d) โ†’ (PolyType (ฮ” f d) 0) := by @@ -222,37 +216,60 @@ lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d - --- [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 - intro h - rcases h with โŸจc, N, hhโŸฉ - have H1 := ฮป n => (hh n).left - have H2 := ฮป n => (hh n).right - clear hh - have H2 : c โ‰  0 := by - tauto +lemma foofoofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), (โˆ€ (n : โ„ค), N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0) โ†’ (PolyType f d) := by induction' d with d hd + -- Base case - ยท rw [PolyType_0] + ยท intro f + intro h + rcases h with โŸจc, N, hhโŸฉ + rw [PolyType_0] use c use N tauto -- Induction step - ยท sorry + ยท intro f + intro h + rcases h with โŸจc, N, hโŸฉ + have this : PolyType f (d + 1) := by + sorry + tauto + + + +-- [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 + -- intro h + -- rcases h with โŸจc, N, hhโŸฉ + -- have H1 := ฮป n => (hh n).left + -- have H2 := ฮป n => (hh n).right + -- clear hh + -- have H2 : c โ‰  0 := by + -- tauto + -- induction' d with d hd + + -- -- Base case + -- ยท rw [PolyType_0] + -- use c + -- use N + -- tauto + + -- -- Induction step + -- ยท sorry -- [BH, 4.1.2] (a) <= (b) -- f is of polynomial type d โ†’ ฮ”^d f (n) = c for some nonzero integer c for n >> 0 -lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0)) := by +lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), (โˆ€ (n : โ„ค), N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0) := by intro h have : PolyType (ฮ” f d) 0 := by apply ฮ”_d_PolyType_d_to_PolyType_0 exact h - have this1 : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) n = c) โˆง c โ‰  0)) := by + have this1 : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), (โˆ€ (n : โ„ค), (N โ‰ค n โ†’ (ฮ” f d) n = c)) โˆง c โ‰  0) := by rw [โ†PolyType_0] exact this exact this1 From de995bf2f33858d41766845a1e793d6e91f34a25 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 16 Jun 2023 00:28:44 -0400 Subject: [PATCH 17/23] fixed some formatting --- CommAlg/final_poly_type.lean | 74 +----------------------------------- 1 file changed, 2 insertions(+), 72 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index bfbef39..40f66e7 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -139,12 +139,6 @@ lemma Poly_shifting (f : โ„ค โ†’ โ„ค) (g : โ„ค โ†’ โ„ค) (hf : PolyType f d) (s : rcases hh with โŸจN,ssโŸฉ sorry - - - - --- 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 constructor @@ -172,28 +166,16 @@ lemma PolyType_0 (f : โ„ค โ†’ โ„ค) : (PolyType f 0) โ†” (โˆƒ (c : โ„ค), โˆƒ (N : => by rw [(hh n).1 Nn]; exact (((Poly_constant (Polynomial.C (c : โ„š)) (c : โ„š)).mp rfl) n).symm, by rw [Polynomial.degree_C H2]; rflโŸฉ - - - -- ฮ” of 0 times preserves the function lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by tauto - - -- ฮ” of 1 times decreaes the polynomial type by one lemma ฮ”_1 (f : โ„ค โ†’ โ„ค) (d : โ„•): d > 0 โ†’ PolyType f d โ†’ PolyType (ฮ” f 1) (d - 1) := by sorry - - - lemma foo (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by sorry - - - - -- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” f d) 0):= by induction' d with d hd @@ -214,19 +196,7 @@ lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” tauto tauto - - -lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by - intro h - have this : โˆ€ (d : โ„•), โˆ€ (f :โ„ค โ†’ โ„ค), (PolyType f d) โ†’ (PolyType (ฮ” f d) 0) := by - exact foofoo - specialize this d f - tauto - - - - - +lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := fun h => (foofoo d f) h -- [BH, 4.1.2] (a) => (b) -- ฮ”^d f (n) = c for some nonzero integer c for n >> 0 โ†’ f is of polynomial type d @@ -248,8 +218,6 @@ lemma a_to_b (f : โ„ค โ†’ โ„ค) (d : โ„•) : (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n -- Induction step ยท sorry - - -- [BH, 4.1.2] (a) <= (b) -- f is of polynomial type d โ†’ ฮ”^d f (n) = c for some nonzero integer c for n >> 0 lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), โˆ€ (n : โ„ค), ((N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0)) := by @@ -263,41 +231,14 @@ lemma b_to_a (f : โ„ค โ†’ โ„ค) (d : โ„•) : PolyType f d โ†’ (โˆƒ (c : โ„ค), โˆƒ exact this1 end - - - - - - - -- @Additive lemma of length for a SES -- Given a SES 0 โ†’ A โ†’ B โ†’ C โ†’ 0, then length (A) - length (B) + length (C) = 0 section --- variable {R M N : Type _} [CommRing R] [AddCommGroup M] [AddCommGroup N] [Module R M] [Module R N] --- (f : M โ†’[R] N) open LinearMap --- variable {R M : Type _} [CommRing R] [AddCommGroup M] [Module R M] --- noncomputable def length := Set.chainHeight {M' : Submodule R M | M' < โŠค} - -- Definitiion of the length of a module noncomputable def length (R M : Type _) [CommRing R] [AddCommGroup M] [Module R M] := Set.chainHeight {M' : Submodule R M | M' < โŠค} #check length โ„ค โ„ค --- #eval length โ„ค โ„ค - - --- @[ext] --- structure SES (R : Type _) [CommRing R] where --- A : Type _ --- B : Type _ --- C : Type _ --- f : A โ†’โ‚—[R] B --- g : B โ†’โ‚—[R] C --- left_exact : LinearMap.ker f = 0 --- middle_exact : LinearMap.range f = LinearMap.ker g --- right_exact : LinearMap.range g = C - - -- Definition of a SES (Short Exact Sequence) -- @[ext] @@ -309,10 +250,6 @@ structure SES {R A B C : Type _} [CommRing R] [AddCommGroup A] [AddCommGroup B] middle_exact : LinearMap.range f = LinearMap.ker g right_exact : LinearMap.range g = โŠค -#check SES.right_exact -#check SES - - -- Additive lemma lemma length_Additive (R A B C : Type _) [CommRing R] [AddCommGroup A] [AddCommGroup B] [AddCommGroup C] [Module R A] [Module R B] [Module R C] (f : A โ†’โ‚—[R] B) (g : B โ†’โ‚—[R] C) @@ -321,11 +258,4 @@ lemma length_Additive (R A B C : Type _) [CommRing R] [AddCommGroup A] [AddCommG rcases h with โŸจleft_exact, middle_exact, right_exactโŸฉ sorry -end section - - - - - - - +end section \ No newline at end of file From 8eff058565edf99ccb03c3b0dc9b1c7be92f94be Mon Sep 17 00:00:00 2001 From: poincare-duality Date: Thu, 15 Jun 2023 21:34:38 -0700 Subject: [PATCH 18/23] more stuff --- CommAlg/jayden(krull-dim-zero).lean | 88 ++++------------------------- 1 file changed, 10 insertions(+), 78 deletions(-) diff --git a/CommAlg/jayden(krull-dim-zero).lean b/CommAlg/jayden(krull-dim-zero).lean index 78bd648..15dd150 100644 --- a/CommAlg/jayden(krull-dim-zero).lean +++ b/CommAlg/jayden(krull-dim-zero).lean @@ -43,7 +43,6 @@ class IsLocallyNilpotent {R : Type _} [CommRing R] (I : Ideal R) : Prop := #check Ideal.IsLocallyNilpotent end Ideal - -- Repeats the definition of the length of a module by Monalisa variable (R : Type _) [CommRing R] (I J : Ideal R) variable (M : Type _) [AddCommMonoid M] [Module R M] @@ -71,7 +70,7 @@ lemma ring_Noetherian_iff_spec_Noetherian : IsNoetherianRing R sorry -- how do I apply an instance to prove one direction? - +-- Stacks Lemma 5.9.2: -- Use TopologicalSpace.NoetherianSpace.exists_finset_irreducible : -- Every closed subset of a noetherian space is a finite union -- of irreducible closed subsets. @@ -169,7 +168,7 @@ abbrev Prod_of_localization := def foo : Prod_of_localization R โ†’+* R where toFun := sorry - invFun := sorry + -- invFun := sorry left_inv := sorry right_inv := sorry map_mul' := sorry @@ -198,6 +197,13 @@ lemma primes_of_Artinian_are_maximal lemma dim_le_zero_Noetherian_iff_Artinian (R : Type _) [CommRing R] : IsNoetherianRing R โˆง Ideal.krullDim R โ‰ค 0 โ†” IsArtinianRing R := by constructor + rintro โŸจRisNoetherian, dimzeroโŸฉ + rw [ring_Noetherian_iff_spec_Noetherian] at RisNoetherian + let Z := irreducibleComponents (PrimeSpectrum R) + have Zfinite : Set.Finite Z := by + -- apply TopologicalSpace.NoetherianSpace.finite_irreducibleComponents ?_ + sorry + sorry intro RisArtinian constructor @@ -207,81 +213,7 @@ lemma dim_le_zero_Noetherian_iff_Artinian (R : Type _) [CommRing R] : intro I apply primes_of_Artinian_are_maximal - - - --- Trash bin --- lemma Artinian_has_finite_max_ideal --- [IsArtinianRing R] : Finite (MaximalSpectrum R) := by --- by_contra infinite --- simp only [not_finite_iff_infinite] at infinite --- let m' : โ„• โ†ช MaximalSpectrum R := Infinite.natEmbedding (MaximalSpectrum R) --- have m'inj := m'.injective --- let m'' : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ โจ… k โˆˆ range n, (m' k).asIdeal --- let f : โ„• โ†’ Ideal R := fun n : โ„• โ†ฆ (m' n).asIdeal --- have DCC : โˆƒ n : โ„•, โˆ€ k : โ„•, n โ‰ค k โ†’ m'' n = m'' k := by --- apply IsArtinian.monotone_stabilizes { --- toFun := m'' --- monotone' := sorry --- } --- cases' DCC with n DCCn --- specialize DCCn (n+1) --- specialize DCCn (Nat.le_succ n) --- let F : Fin (n + 1) โ†’ MaximalSpectrum R := fun k โ†ฆ m' k --- have comaximal : โˆ€ (i j : Fin (n + 1)), (i โ‰  j) โ†’ (F i).asIdeal โŠ” (F j).asIdeal = --- (โŠค : Ideal R) := by --- intro i j distinct --- apply Ideal.IsMaximal.coprime_of_ne --- exact (F i).IsMaximal --- exact (F j).IsMaximal --- have : (F i) โ‰  (F j) := by --- apply Function.Injective.ne m'inj --- contrapose! distinct --- exact Fin.ext distinct --- intro h --- apply this --- exact MaximalSpectrum.ext _ _ h --- let CRT1 : (R โงธ โจ… (i : Fin (n + 1)), ((F i).asIdeal)) --- โ‰ƒ+* ((i : Fin (n + 1)) โ†’ R โงธ (F i).asIdeal) := --- Ideal.quotientInfRingEquivPiQuotient --- (fun i โ†ฆ (F i).asIdeal) comaximal --- let CRT2 : (R โงธ โจ… (i : Fin (n + 1)), ((F i).asIdeal)) --- โ‰ƒ+* ((i : Fin (n + 1)) โ†’ R โงธ (F i).asIdeal) := --- Ideal.quotientInfRingEquivPiQuotient --- (fun i โ†ฆ (F i).asIdeal) comaximal - - - - - -- have comaximal : โˆ€ (n : โ„•) (i j : Fin n), (i โ‰  j) โ†’ ((F n) i).asIdeal โŠ” ((F n) j).asIdeal = - -- (โŠค : Ideal R) := by - -- intro n i j distinct - -- apply Ideal.IsMaximal.coprime_of_ne - -- exact (F n i).IsMaximal - -- exact (F n j).IsMaximal - -- have : (F n i) โ‰  (F n j) := by - -- apply Function.Injective.ne m'inj - -- contrapose! distinct - -- exact Fin.ext distinct - -- intro h - -- apply this - -- exact MaximalSpectrum.ext _ _ h - -- let CRT : (n : โ„•) โ†’ (R โงธ โจ… (i : Fin n), ((F n) i).asIdeal) - -- โ‰ƒ+* ((i : Fin n) โ†’ R โงธ ((F n) i).asIdeal) := - -- fun n โ†ฆ Ideal.quotientInfRingEquivPiQuotient - -- (fun i โ†ฆ (F n i).asIdeal) (comaximal n) - -- have DCC : โˆƒ n : โ„•, โˆ€ k : โ„•, n โ‰ค k โ†’ m'' n = m'' k := by - -- apply IsArtinian.monotone_stabilizes { - -- toFun := m'' - -- monotone' := sorry - -- } - -- cases' DCC with n DCCn - -- specialize DCCn (n+1) - -- specialize DCCn (Nat.le_succ n) - -- let CRT1 := CRT n - -- let CRT2 := CRT (n + 1) - - +-- Use TopologicalSpace.NoetherianSpace.exists_finset_irreducible : From 0089e927e1380662e1b8fcb4b1ba2b20404ed530 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 16 Jun 2023 00:44:03 -0400 Subject: [PATCH 19/23] fixed merge conflics --- CommAlg/final_poly_type.lean | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/CommAlg/final_poly_type.lean b/CommAlg/final_poly_type.lean index e192575..dcb0e70 100644 --- a/CommAlg/final_poly_type.lean +++ b/CommAlg/final_poly_type.lean @@ -139,11 +139,6 @@ lemma Poly_shifting (f : โ„ค โ†’ โ„ค) (g : โ„ค โ†’ โ„ค) (hf : PolyType f d) (s : rcases hh with โŸจN,ssโŸฉ sorry - - - - --- 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 @@ -179,11 +174,6 @@ lemma ฮ”_0 (f : โ„ค โ†’ โ„ค) : (ฮ” f 0) = f := by tauto lemma ฮ”_1 (f : โ„ค โ†’ โ„ค) (d : โ„•): d > 0 โ†’ PolyType f d โ†’ PolyType (ฮ” f 1) (d - 1) := by sorry - - - - - -- ฮ” of d times maps polynomial of degree d to polynomial of degree 0 lemma ฮ”_1_s_equiv_ฮ”_s_1 (f : โ„ค โ†’ โ„ค) (s : โ„•) : ฮ” (ฮ” f 1) s = (ฮ” f (s + 1)) := by sorry @@ -208,23 +198,6 @@ lemma foofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (PolyType f d) โ†’ (PolyType (ฮ” lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := fun h => (foofoo d f) h --- [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 - intro h - rcases h with โŸจc, N, hhโŸฉ - have H1 := ฮป n => (hh n).left - have H2 := ฮป n => (hh n).right - clear hh - have H2 : c โ‰  0 := by - tauto -lemma ฮ”_d_PolyType_d_to_PolyType_0 (f : โ„ค โ†’ โ„ค) (d : โ„•): PolyType f d โ†’ PolyType (ฮ” f d) 0 := by - intro h - have this : โˆ€ (d : โ„•), โˆ€ (f :โ„ค โ†’ โ„ค), (PolyType f d) โ†’ (PolyType (ฮ” f d) 0) := by - exact foofoo - specialize this d f - tauto - lemma foofoofoo (d : โ„•) : (f : โ„ค โ†’ โ„ค) โ†’ (โˆƒ (c : โ„ค), โˆƒ (N : โ„ค), (โˆ€ (n : โ„ค), N โ‰ค n โ†’ (ฮ” f d) (n) = c) โˆง c โ‰  0) โ†’ (PolyType f d) := by induction' d with d hd From 9c4f129a56e2fd7d935e988815ea793a95e25683 Mon Sep 17 00:00:00 2001 From: GTBarkley Date: Fri, 16 Jun 2023 04:57:28 +0000 Subject: [PATCH 20/23] added WF_interval_le_prime --- CommAlg/grant2.lean | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CommAlg/grant2.lean b/CommAlg/grant2.lean index 0e3092e..24edcff 100644 --- a/CommAlg/grant2.lean +++ b/CommAlg/grant2.lean @@ -54,9 +54,20 @@ def symbolicIdeal(Q : Ideal R) {hin : Q.IsPrime} (I : Ideal R) : Ideal R where rw [โ†mul_assoc, mul_comm s, mul_assoc] exact Ideal.mul_mem_left _ _ hs2 + +theorem WF_interval_le_prime (I : Ideal R) (P : Ideal R) [P.IsPrime] + (h : โˆ€ J โˆˆ (Set.Icc I P), J.IsPrime โ†’ J = P ): + WellFounded ((ยท < ยท) : (Set.Icc I P) โ†’ (Set.Icc I P) โ†’ Prop ) := sorry + protected lemma LocalRing.height_le_one_of_minimal_over_principle - [LocalRing R] (q : PrimeSpectrum R) {x : R} + [LocalRing R] {x : R} (h : (closedPoint R).asIdeal โˆˆ (Ideal.span {x}).minimalPrimes) : - q = closedPoint R โˆจ Ideal.height q = 0 := by - + Ideal.height (closedPoint R) โ‰ค 1 := by + -- by_contra hcont + -- push_neg at hcont + -- rw [Ideal.lt_height_iff'] at hcont + -- rcases hcont with โŸจc, hc1, hc2, hc3โŸฉ + apply height_le_of_gt_height_lt + intro p hp + sorry \ No newline at end of file From 4b9f84f7c111d47b09364042622b358eeea824cb Mon Sep 17 00:00:00 2001 From: leopoldmayer Date: Thu, 15 Jun 2023 22:10:39 -0700 Subject: [PATCH 21/23] new file for complete proof of adjoining a var --- CommAlg/polynomial.lean | 163 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 CommAlg/polynomial.lean diff --git a/CommAlg/polynomial.lean b/CommAlg/polynomial.lean new file mode 100644 index 0000000..d03ce2c --- /dev/null +++ b/CommAlg/polynomial.lean @@ -0,0 +1,163 @@ +import Mathlib.RingTheory.Ideal.Operations +import Mathlib.RingTheory.FiniteType +import Mathlib.Order.Height +import Mathlib.RingTheory.Polynomial.Quotient +import Mathlib.RingTheory.PrincipalIdealDomain +import Mathlib.RingTheory.DedekindDomain.Basic +import Mathlib.RingTheory.Ideal.Quotient +import Mathlib.RingTheory.Localization.AtPrime +import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic +import Mathlib.Order.ConditionallyCompleteLattice.Basic +import CommAlg.krull + +section ChainLemma +variable {ฮฑ ฮฒ : Type _} +variable [LT ฮฑ] [LT ฮฒ] (s t : Set ฮฑ) + +namespace Set +open List + +/- +Sorry for using aesop, but it doesn't take that long +-/ +theorem append_mem_subchain_iff : +l ++ l' โˆˆ s.subchain โ†” l โˆˆ s.subchain โˆง l' โˆˆ s.subchain โˆง โˆ€ a โˆˆ l.getLast?, โˆ€ b โˆˆ l'.head?, a < b := by + simp [subchain, chain'_append] + aesop + +end Set +end ChainLemma + +variable {R : Type _} [CommRing R] +open Ideal Polynomial + +namespace Polynomial +/- +The composition R โ†’ R[X] โ†’ R is the identity +-/ +theorem coeff_C_eq : RingHom.comp constantCoeff C = RingHom.id R := by ext; simp + +end Polynomial + +/- +Given an ideal I in R, we define the ideal adjoin_x' I to be the kernel +of R[X] โ†’ R โ†’ R/I +-/ +def adj_x_map (I : Ideal R) : R[X] โ†’+* R โงธ I := (Ideal.Quotient.mk I).comp constantCoeff +def adjoin_x' (I : Ideal R) : Ideal (Polynomial R) := RingHom.ker (adj_x_map I) +def adjoin_x (I : PrimeSpectrum R) : PrimeSpectrum (Polynomial R) where + asIdeal := adjoin_x' I.asIdeal + IsPrime := RingHom.ker_isPrime _ + +@[simp] +lemma adj_x_comp_C (I : Ideal R) : RingHom.comp (adj_x_map I) C = Ideal.Quotient.mk I := by + ext x; simp [adj_x_map] + +lemma adjoin_x_eq (I : Ideal R) : adjoin_x' I = I.map C โŠ” Ideal.span {X} := by + apply le_antisymm + . rintro p hp + have h : โˆƒ q r, p = C r + X * q := โŸจp.divX, p.coeff 0, p.divX_mul_X_add.symm.trans $ by ringโŸฉ + obtain โŸจq, r, rflโŸฉ := h + suffices : r โˆˆ I + . simp only [Submodule.mem_sup, Ideal.mem_span_singleton] + refine' โŸจC r, Ideal.mem_map_of_mem C this, X * q, โŸจq, rflโŸฉ, rflโŸฉ + rw [adjoin_x', adj_x_map, RingHom.mem_ker, RingHom.comp_apply] at hp + rw [constantCoeff_apply, coeff_add, coeff_C_zero, coeff_X_mul_zero, add_zero] at hp + rwa [โ†RingHom.mem_ker, Ideal.mk_ker] at hp + . rw [sup_le_iff] + constructor + . simp [adjoin_x', RingHom.ker, โ†map_le_iff_le_comap, Ideal.map_map] + . simp [span_le, adjoin_x', RingHom.mem_ker, adj_x_map] + +/- +If I is prime in R, the pushforward I*R[X] is prime in R[X] +-/ +def map_prime (I : PrimeSpectrum R) : PrimeSpectrum R[X] := + โŸจI.asIdeal.map C, isPrime_map_C_of_isPrime I.IsPrimeโŸฉ + +/- +The pushforward map (Ideal R) โ†’ (Ideal R[X]) is injective +-/ +lemma map_inj {I J : Ideal R} (h : I.map C = J.map C) : I = J := by + have H : map constantCoeff (I.map C) = map constantCoeff (J.map C) := by rw [h] + simp [Ideal.map_map, coeff_C_eq] at H + exact H + +/- +The pushforward map (Ideal R) โ†’ (Ideal R[X]) is strictly monotone +-/ +lemma map_strictmono {I J : Ideal R} (h : I < J) : I.map C < J.map C := by + rw [lt_iff_le_and_ne] at h โŠข + exact โŸจmap_mono h.1, fun H => h.2 (map_inj H)โŸฉ + +lemma map_lt_adjoin_x (I : PrimeSpectrum R) : map_prime I < adjoin_x I := by + simp [adjoin_x, adjoin_x_eq] + show I.asIdeal.map C < I.asIdeal.map C โŠ” span {X} + simp [Ideal.span_le, mem_map_C_iff] + use 1 + simp + rw [โ†Ideal.eq_top_iff_one] + exact I.IsPrime.ne_top' + +/- Given an ideal p in R, define the ideal p[x] in R[x] -/ +lemma ht_adjoin_x_eq_ht_add_one [Nontrivial R] (I : PrimeSpectrum R) : height I + 1 โ‰ค height (adjoin_x I) := by + suffices H : height I + (1 : โ„•) โ‰ค height (adjoin_x I) + (0 : โ„•) + . norm_cast at H; rw [add_zero] at H; exact H + rw [height, height, Set.chainHeight_add_le_chainHeight_add {J | J < I} _ 1 0] + intro l hl + use ((l.map map_prime) ++ [map_prime I]) + constructor + . simp [Set.append_mem_subchain_iff] + refine' โŸจ_,_,_โŸฉ + . show (List.map map_prime l).Chain' (ยท < ยท) โˆง โˆ€ i โˆˆ _, i โˆˆ _ + constructor + . apply List.chain'_map_of_chain' map_prime + intro a b hab + apply map_strictmono + exact hab + exact hl.1 + . intro i hi + rw [List.mem_map] at hi + obtain โŸจa, ha, rflโŸฉ := hi + show map_prime a < adjoin_x I + calc map_prime a < map_prime I := by apply map_strictmono; apply hl.2; apply ha + _ < adjoin_x I := by apply map_lt_adjoin_x + . apply map_lt_adjoin_x + . intro a ha + have H : โˆƒ b : PrimeSpectrum R, b โˆˆ l โˆง map_prime b = a + . have H2 : l โ‰  [] + . intro h + rw [h] at ha + tauto + use l.getLast H2 + refine' โŸจList.getLast_mem H2, _โŸฉ + have H3 : l.map map_prime โ‰  [] + . intro hl + apply H2 + apply List.eq_nil_of_map_eq_nil hl + rw [List.getLast?_eq_getLast _ H3, Option.some_inj] at ha + simp [โ†ha, List.getLast_map _ H2] + obtain โŸจb, hb, rflโŸฉ := H + apply map_strictmono + apply hl.2 + exact hb + . simp + +/- +dim R + 1 โ‰ค dim R[X] +-/ +lemma dim_le_dim_polynomial_add_one [Nontrivial R] : + krullDim R + (1 : โ„•โˆž) โ‰ค krullDim R[X] := by + obtain โŸจn, hnโŸฉ := krullDim_nonneg_of_nontrivial R + rw [hn] + change โ†‘(n + 1) โ‰ค krullDim R[X] + have := le_of_eq hn.symm + rw [le_krullDim_iff'] at this โŠข + obtain โŸจI, hIโŸฉ := this + use adjoin_x I + apply WithBot.coe_mono + calc n + 1 โ‰ค height I + 1 := by + apply add_le_add_right + rw [WithBot.coe_le_coe] at hI + exact hI + _ โ‰ค height (adjoin_x I) := ht_adjoin_x_eq_ht_add_one I \ No newline at end of file From c702c535b5af813b33b0f0392835810537ac2a5f Mon Sep 17 00:00:00 2001 From: leopoldmayer Date: Thu, 15 Jun 2023 22:13:11 -0700 Subject: [PATCH 22/23] golf attempt --- CommAlg/polynomial.lean | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/CommAlg/polynomial.lean b/CommAlg/polynomial.lean index d03ce2c..f130868 100644 --- a/CommAlg/polynomial.lean +++ b/CommAlg/polynomial.lean @@ -98,33 +98,23 @@ lemma map_lt_adjoin_x (I : PrimeSpectrum R) : map_prime I < adjoin_x I := by simp rw [โ†Ideal.eq_top_iff_one] exact I.IsPrime.ne_top' - -/- Given an ideal p in R, define the ideal p[x] in R[x] -/ + lemma ht_adjoin_x_eq_ht_add_one [Nontrivial R] (I : PrimeSpectrum R) : height I + 1 โ‰ค height (adjoin_x I) := by suffices H : height I + (1 : โ„•) โ‰ค height (adjoin_x I) + (0 : โ„•) . norm_cast at H; rw [add_zero] at H; exact H rw [height, height, Set.chainHeight_add_le_chainHeight_add {J | J < I} _ 1 0] intro l hl use ((l.map map_prime) ++ [map_prime I]) - constructor + refine' โŸจ_, by simpโŸฉ . simp [Set.append_mem_subchain_iff] - refine' โŸจ_,_,_โŸฉ - . show (List.map map_prime l).Chain' (ยท < ยท) โˆง โˆ€ i โˆˆ _, i โˆˆ _ - constructor - . apply List.chain'_map_of_chain' map_prime - intro a b hab - apply map_strictmono - exact hab - exact hl.1 - . intro i hi - rw [List.mem_map] at hi + refine' โŸจ_, map_lt_adjoin_x I, fun a ha => _โŸฉ + . refine' โŸจ_, fun i hi => _โŸฉ + . apply List.chain'_map_of_chain' map_prime (fun a b hab => map_strictmono hab) hl.1 + . rw [List.mem_map] at hi obtain โŸจa, ha, rflโŸฉ := hi - show map_prime a < adjoin_x I calc map_prime a < map_prime I := by apply map_strictmono; apply hl.2; apply ha _ < adjoin_x I := by apply map_lt_adjoin_x - . apply map_lt_adjoin_x - . intro a ha - have H : โˆƒ b : PrimeSpectrum R, b โˆˆ l โˆง map_prime b = a + . have H : โˆƒ b : PrimeSpectrum R, b โˆˆ l โˆง map_prime b = a . have H2 : l โ‰  [] . intro h rw [h] at ha @@ -141,7 +131,7 @@ lemma ht_adjoin_x_eq_ht_add_one [Nontrivial R] (I : PrimeSpectrum R) : height I apply map_strictmono apply hl.2 exact hb - . simp + /- dim R + 1 โ‰ค dim R[X] From 2402dd93b2ea145996de37ebc69d37591a3b96e9 Mon Sep 17 00:00:00 2001 From: leopoldmayer Date: Fri, 16 Jun 2023 00:07:32 -0700 Subject: [PATCH 23/23] removed dependency on false sorried lemma --- CommAlg/krull.lean | 28 ++++++++++++++++++++++++++-- CommAlg/polynomial.lean | 18 ++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/CommAlg/krull.lean b/CommAlg/krull.lean index e44fa91..e35a4c5 100644 --- a/CommAlg/krull.lean +++ b/CommAlg/krull.lean @@ -95,8 +95,32 @@ lemma le_krullDim_iff (R : Type _) [CommRing R] (n : โ„•) : have : height I โ‰ค krullDim R := by apply height_le_krullDim exact le_trans h this -lemma le_krullDim_iff' (R : Type _) [CommRing R] (n : โ„•โˆž) : - n โ‰ค krullDim R โ†” โˆƒ I : PrimeSpectrum R, n โ‰ค (height I : WithBot โ„•โˆž) := by sorry +#check ENat.recTopCoe + +/- terrible place for this lemma. Also this probably exists somewhere + Also this is a terrible proof +-/ +lemma eq_top_iff (n : WithBot โ„•โˆž) : n = โŠค โ†” โˆ€ m : โ„•, m โ‰ค n := by + aesop + induction' n using WithBot.recBotCoe with n + . exfalso + have := (a 0) + simp [not_lt_of_ge] at this + induction' n using ENat.recTopCoe with n + . rfl + . have := a (n + 1) + exfalso + change (((n + 1) : โ„•โˆž) : WithBot โ„•โˆž) โ‰ค _ at this + simp [WithBot.coe_le_coe] at this + change ((n + 1) : โ„•โˆž) โ‰ค (n : โ„•โˆž) at this + simp [ENat.add_one_le_iff] at this + +lemma krullDim_eq_top_iff (R : Type _) [CommRing R] : + krullDim R = โŠค โ†” โˆ€ (n : โ„•), โˆƒ I : PrimeSpectrum R, n โ‰ค height I := by + simp [eq_top_iff, le_krullDim_iff] + change (โˆ€ (m : โ„•), โˆƒ I, ((m : โ„•โˆž) : WithBot โ„•โˆž) โ‰ค height I) โ†” _ + simp [WithBot.coe_le_coe] + /-- The Krull dimension of a local ring is the height of its maximal ideal. -/ lemma krullDim_eq_height [LocalRing R] : krullDim R = height (closedPoint R) := by diff --git a/CommAlg/polynomial.lean b/CommAlg/polynomial.lean index f130868..8dd886a 100644 --- a/CommAlg/polynomial.lean +++ b/CommAlg/polynomial.lean @@ -132,7 +132,7 @@ lemma ht_adjoin_x_eq_ht_add_one [Nontrivial R] (I : PrimeSpectrum R) : height I apply hl.2 exact hb - +#check (โŠค : โ„•โˆž) /- dim R + 1 โ‰ค dim R[X] -/ @@ -142,12 +142,26 @@ lemma dim_le_dim_polynomial_add_one [Nontrivial R] : rw [hn] change โ†‘(n + 1) โ‰ค krullDim R[X] have := le_of_eq hn.symm - rw [le_krullDim_iff'] at this โŠข + induction' n using ENat.recTopCoe with n + . change krullDim R = โŠค at hn + change โŠค โ‰ค krullDim R[X] + rw [krullDim_eq_top_iff] at hn + rw [top_le_iff, krullDim_eq_top_iff] + intro n + obtain โŸจI, hIโŸฉ := hn n + use adjoin_x I + calc n โ‰ค height I := hI + _ โ‰ค height I + 1 := le_self_add + _ โ‰ค height (adjoin_x I) := ht_adjoin_x_eq_ht_add_one I + change n โ‰ค krullDim R at this + change (n + 1 : โ„•) โ‰ค krullDim R[X] + rw [le_krullDim_iff] at this โŠข obtain โŸจI, hIโŸฉ := this use adjoin_x I apply WithBot.coe_mono calc n + 1 โ‰ค height I + 1 := by apply add_le_add_right + change ((n : โ„•โˆž) : WithBot โ„•โˆž) โ‰ค (height I) at hI rw [WithBot.coe_le_coe] at hI exact hI _ โ‰ค height (adjoin_x I) := ht_adjoin_x_eq_ht_add_one I \ No newline at end of file