Skip to content

Commit

Permalink
Update Finite.lean
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanyi-350 committed Oct 26, 2024
1 parent d9486b4 commit 3aab458
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions Others/Finite.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,22 @@ def Module.Finite.finiteOfFinite {R M : Type*} [CommRing R] [Finite R] [AddCommM

variable {R : Type*} [CommRing R] [h : Module.Finite ℤ R]

lemma My_Module.Finite.exists_fin' (R : Type u_1) {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M]
--Version issue: it's available in mathlib, but not in our library.
lemma My_copy_Module.finite_of_finite (R : Type u_1) {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M]
[Finite R] [Module.Finite R M] : Finite M := by
obtain ⟨n, f, hf⟩ := Module.Finite.exists_fin' R M;
exact .of_surjective f hf
exact .of_surjective f hf

theorem Ideal.Quotient.finite_of_module_finite_int [IsDomain R]{I : Ideal R} (hp : I ≠ ⊥) : Finite (R ⧸ I) := by
have : I.comap (algebraMap ℤ R) ≠ ⊥ := by
obtain ⟨x, hx1, hx2⟩ : ∃ x : R ,x ∈ I ∧ x ≠ 0 := by
have := mt (Submodule.eq_bot_iff I).mpr hp
push_neg at this
exact this
obtain ⟨x, hx1, hx2⟩ : ∃ x : R ,x ∈ I ∧ x ≠ 0 :=
Set.not_subset.mp <| mt (Submodule.eq_bot_iff I).mpr hp
apply Ideal.comap_ne_bot_of_integral_mem hx2 hx1 <| Algebra.IsIntegral.isIntegral x

-- let f := (Ideal.Quotient.mk I).comp <| algebraMap ℤ R
-- have : ℤ ⧸ (f.toAddMonoidHom).ker ≃+ (f.toAddMonoidHom).range := by
-- exact QuotientAddGroup.quotientKerEquivRange f.toAddMonoidHom

have t1 : Module.Finite (ℤ ⧸ I.comap (algebraMap ℤ R)) (R ⧸ I) := by

sorry
have t2 : Finite (ℤ ⧸ I.comap (algebraMap ℤ R)) := by
-- have : IsPrincipalIdealRing ℤ := EuclideanDomain.to_principal_ideal_domain
have : Submodule.IsPrincipal (I.comap (algebraMap ℤ R)) :=
IsPrincipalIdealRing.principal (comap (algebraMap ℤ R) I)
have : ∃ a : ℤ , (I.comap (algebraMap ℤ R)) = span ({a}: Set ℤ) :=
Submodule.IsPrincipal.principal'
obtain ⟨a,ha⟩ := this
rw [ha]
-- refine finite_iff_exists_equiv_fin.mpr ?intro.a

sorry
exact My_Module.Finite.exists_fin' (ℤ ⧸ comap (algebraMap ℤ R) I)
have t1 : Module.Finite (ℤ ⧸ I.comap (algebraMap ℤ R)) (R ⧸ I) :=
Module.Finite.of_restrictScalars_finite ℤ (ℤ ⧸ I.comap (algebraMap ℤ R)) (R ⧸ I)
have t2 : Finite (ℤ ⧸ I.comap (algebraMap ℤ R)) :=
Int.Quotient.finite_of_ne_bot this
exact My_copy_Module.finite_of_finite (ℤ ⧸ comap (algebraMap ℤ R) I)

-- `NoZeroSMulDivisors` can be removed
instance Ideal.Quotient.finite_of_module_finite_int_of_isMaxiaml [NoZeroSMulDivisors ℤ R] [IsDomain R]
Expand Down

0 comments on commit 3aab458

Please sign in to comment.