fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
ofHasUnitMulPowIrreducibleFactorization {R : Type u} [CommRing R] [IsDomain R] (hR : HasUnitMulPowIrreducibleFactorization R) : IsDiscreteValuationRing R := by letI : UniqueFactorizationMonoid R := hR.toUniqueFactorizationMonoid apply of_ufd_of_unique_irreducible _ hR.unique_irreducible obtain ⟨p, hp, H⟩ := hR exact ⟨p, hp⟩ /- If a ring is equivalent to a DVR, it is itself a DVR. -/
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
ofHasUnitMulPowIrreducibleFactorization
An integral domain in which there is an irreducible element `p` such that every nonzero element is associated to a power of `p` is a discrete valuation ring.
RingEquivClass.isDiscreteValuationRing {A B E : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B] [IsDiscreteValuationRing A] [EquivLike E A B] [RingEquivClass E A B] (e : E) : IsDiscreteValuationRing B where principal := (isPrincipalIdealRing_iff _).1 <| IsPrincipalIdealRing.of_surjective _ (e : A ≃+* B).surjective __ : IsLocalRing B := (e : A ≃+* B).isLocalRing not_a_field' := by obtain ⟨a, ha⟩ := Submodule.nonzero_mem_of_bot_lt (bot_lt_iff_ne_bot.mpr <| IsDiscreteValuationRing.not_a_field A) rw [Submodule.ne_bot_iff] refine ⟨e a, ⟨?_, by simp only [ne_eq, EmbeddingLike.map_eq_zero_iff, ZeroMemClass.coe_eq_zero, ha, not_false_eq_true]⟩⟩ rw [IsLocalRing.mem_maximalIdeal, map_mem_nonunits_iff e, ← IsLocalRing.mem_maximalIdeal] exact a.2
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
RingEquivClass.isDiscreteValuationRing
null
associated_pow_irreducible {x : R} (hx : x ≠ 0) {ϖ : R} (hirr : Irreducible ϖ) : ∃ n : ℕ, Associated x (ϖ ^ n) := by have : WfDvdMonoid R := IsNoetherianRing.wfDvdMonoid obtain ⟨fx, hfx⟩ := WfDvdMonoid.exists_factors x hx use Multiset.card fx have H := hfx.2 rw [← Associates.mk_eq_mk_iff_associated] at H ⊢ rw [← H, ← Associates.prod_mk, Associates.mk_pow, ← Multiset.prod_replicate] congr 1 rw [Multiset.eq_replicate] simp only [true_and, and_imp, Multiset.card_map, Multiset.mem_map, exists_imp] rintro _ _ _ rfl rw [Associates.mk_eq_mk_iff_associated] refine associated_of_irreducible _ ?_ hirr apply hfx.1 assumption
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
associated_pow_irreducible
null
eq_unit_mul_pow_irreducible {x : R} (hx : x ≠ 0) {ϖ : R} (hirr : Irreducible ϖ) : ∃ (n : ℕ) (u : Rˣ), x = u * ϖ ^ n := by obtain ⟨n, hn⟩ := associated_pow_irreducible hx hirr obtain ⟨u, rfl⟩ := hn.symm use n, u apply mul_comm open Submodule.IsPrincipal
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
eq_unit_mul_pow_irreducible
null
ideal_eq_span_pow_irreducible {s : Ideal R} (hs : s ≠ ⊥) {ϖ : R} (hirr : Irreducible ϖ) : ∃ n : ℕ, s = Ideal.span {ϖ ^ n} := by have gen_ne_zero : generator s ≠ 0 := by rw [Ne, ← eq_bot_iff_generator_eq_zero] assumption rcases associated_pow_irreducible gen_ne_zero hirr with ⟨n, u, hnu⟩ use n have : span _ = _ := Ideal.span_singleton_generator s rw [← this, ← hnu, span_singleton_eq_span_singleton] use u
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
ideal_eq_span_pow_irreducible
null
unit_mul_pow_congr_pow {p q : R} (hp : Irreducible p) (hq : Irreducible q) (u v : Rˣ) (m n : ℕ) (h : ↑u * p ^ m = v * q ^ n) : m = n := by have key : Associated (Multiset.replicate m p).prod (Multiset.replicate n q).prod := by rw [Multiset.prod_replicate, Multiset.prod_replicate, Associated] refine ⟨u * v⁻¹, ?_⟩ simp only [Units.val_mul] rw [mul_left_comm, ← mul_assoc, h, mul_right_comm, Units.mul_inv, one_mul] have := by refine Multiset.card_eq_card_of_rel (UniqueFactorizationMonoid.factors_unique ?_ ?_ key) all_goals intro x hx obtain rfl := Multiset.eq_of_mem_replicate hx assumption simpa only [Multiset.card_replicate]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
unit_mul_pow_congr_pow
null
unit_mul_pow_congr_unit {ϖ : R} (hirr : Irreducible ϖ) (u v : Rˣ) (m n : ℕ) (h : ↑u * ϖ ^ m = v * ϖ ^ n) : u = v := by obtain rfl : m = n := unit_mul_pow_congr_pow hirr hirr u v m n h rw [← sub_eq_zero] at h rw [← sub_mul, mul_eq_zero] at h rcases h with h | h · rw [sub_eq_zero] at h exact mod_cast h · apply (hirr.ne_zero (pow_eq_zero h)).elim /-!
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
unit_mul_pow_congr_unit
null
noncomputable addVal (R : Type u) [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] : AddValuation R ℕ∞ := multiplicity_addValuation (Classical.choose_spec (exists_prime R))
def
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal
The `ℕ∞`-valued additive valuation on a DVR.
addVal_def (r : R) (u : Rˣ) {ϖ : R} (hϖ : Irreducible ϖ) (n : ℕ) (hr : r = u * ϖ ^ n) : addVal R r = n := by classical rw [addVal, multiplicity_addValuation_apply, hr, emultiplicity_eq_of_associated_left (associated_of_irreducible R hϖ (Classical.choose_spec (exists_prime R)).irreducible), emultiplicity_eq_of_associated_right (Associated.symm ⟨u, mul_comm _ _⟩), emultiplicity_pow_self_of_prime (irreducible_iff_prime.1 hϖ)]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_def
null
addVal_def' (u : Rˣ) {ϖ : R} (hϖ : Irreducible ϖ) (n : ℕ) : addVal R ((u : R) * ϖ ^ n) = n := addVal_def _ u hϖ n rfl
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_def'
An alternative definition of the additive valuation, taking units into account
addVal_zero : addVal R 0 = ⊤ := (addVal R).map_zero
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_zero
null
addVal_one : addVal R 1 = 0 := (addVal R).map_one @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_one
null
addVal_uniformizer {ϖ : R} (hϖ : Irreducible ϖ) : addVal R ϖ = 1 := by simpa only [one_mul, eq_self_iff_true, Units.val_one, pow_one, forall_true_left, Nat.cast_one] using addVal_def ϖ 1 hϖ 1
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_uniformizer
null
addVal_mul {a b : R} : addVal R (a * b) = addVal R a + addVal R b := (addVal R).map_mul _ _
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_mul
null
addVal_pow (a : R) (n : ℕ) : addVal R (a ^ n) = n • addVal R a := (addVal R).map_pow _ _ nonrec theorem _root_.Irreducible.addVal_pow {ϖ : R} (h : Irreducible ϖ) (n : ℕ) : addVal R (ϖ ^ n) = n := by rw [addVal_pow, addVal_uniformizer h, nsmul_one]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_pow
null
addVal_eq_top_iff {a : R} : addVal R a = ⊤ ↔ a = 0 := by have hi := (Classical.choose_spec (exists_prime R)).irreducible constructor · contrapose intro h obtain ⟨n, ha⟩ := associated_pow_irreducible h hi obtain ⟨u, rfl⟩ := ha.symm rw [mul_comm, addVal_def' u hi n] nofun · rintro rfl exact addVal_zero
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_eq_top_iff
null
addVal_le_iff_dvd {a b : R} : addVal R a ≤ addVal R b ↔ a ∣ b := by classical have hp := Classical.choose_spec (exists_prime R) constructor <;> intro h · by_cases ha0 : a = 0 · rw [ha0, addVal_zero, top_le_iff, addVal_eq_top_iff] at h rw [h] apply dvd_zero obtain ⟨n, ha⟩ := associated_pow_irreducible ha0 hp.irreducible rw [addVal, multiplicity_addValuation_apply, multiplicity_addValuation_apply, emultiplicity_le_emultiplicity_iff] at h exact ha.dvd.trans (h n ha.symm.dvd) · rw [addVal, multiplicity_addValuation_apply, multiplicity_addValuation_apply] exact emultiplicity_le_emultiplicity_of_dvd_right h
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_le_iff_dvd
null
addVal_add {a b : R} : min (addVal R a) (addVal R b) ≤ addVal R (a + b) := (addVal R).map_add _ _ @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_add
null
addVal_eq_zero_of_unit (u : Rˣ) : addVal R u = 0 := by obtain ⟨ϖ, hϖ⟩ := exists_irreducible R rw [addVal_def (u : R) u hϖ 0] <;> simp
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_eq_zero_of_unit
null
addVal_eq_zero_iff {x : R} : addVal R x = 0 ↔ IsUnit x := by rcases eq_or_ne x 0 with rfl | hx · simp obtain ⟨ϖ, hϖ⟩ := exists_irreducible R obtain ⟨n, u, rfl⟩ := eq_unit_mul_pow_irreducible hx hϖ simp [isUnit_pow_iff_of_not_isUnit hϖ.not_isUnit, hϖ]
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
addVal_eq_zero_iff
null
maximalIdeal_eq_setOf_le_v_algebraMap : letI : IsDomain O := hv.hom_inj.isDomain ∀ [IsDiscreteValuationRing O] {ϖ : O} (_h : Irreducible ϖ), (IsLocalRing.maximalIdeal O : Set O) = {y : O | v (algebraMap O K y) ≤ v (algebraMap O K ϖ)} := by letI : IsDomain O := hv.hom_inj.isDomain intro _ _ h rw [← hv.coe_span_singleton_eq_setOf_le_v_algebraMap, ← h.maximalIdeal_eq]
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
maximalIdeal_eq_setOf_le_v_algebraMap
null
maximalIdeal_pow_eq_setOf_le_v_algebraMap_pow : letI : IsDomain O := hv.hom_inj.isDomain ∀ [IsDiscreteValuationRing O] {ϖ : O} (_h : Irreducible ϖ) (n : ℕ), ((IsLocalRing.maximalIdeal O ^ n : Ideal O) : Set O) = {y : O | v (algebraMap O K y) ≤ v (algebraMap O K ϖ) ^ n} := by letI : IsDomain O := hv.hom_inj.isDomain intro _ ϖ h n have : (v (algebraMap O K ϖ)) ^ n = v (algebraMap O K (ϖ ^ n)) := by simp rw [this, ← hv.coe_span_singleton_eq_setOf_le_v_algebraMap, ← Ideal.span_singleton_pow, ← h.maximalIdeal_eq]
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
maximalIdeal_pow_eq_setOf_le_v_algebraMap_pow
null
_root_.Irreducible.maximalIdeal_eq_setOf_le_v_coe [IsDiscreteValuationRing v.integer] {ϖ : v.integer} (h : Irreducible ϖ) : (IsLocalRing.maximalIdeal v.integer : Set v.integer) = {y : v.integer | v y ≤ v ϖ} := (Valuation.integer.integers v).maximalIdeal_eq_setOf_le_v_algebraMap h
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
_root_.Irreducible.maximalIdeal_eq_setOf_le_v_coe
null
_root_.Irreducible.maximalIdeal_pow_eq_setOf_le_v_coe_pow [IsDiscreteValuationRing v.integer] {ϖ : v.integer} (h : Irreducible ϖ) (n : ℕ) : ((IsLocalRing.maximalIdeal v.integer ^ n : Ideal v.integer) : Set v.integer) = {y : v.integer | v y ≤ v (ϖ : K) ^ n} := (Valuation.integer.integers v).maximalIdeal_pow_eq_setOf_le_v_algebraMap_pow h _
lemma
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
_root_.Irreducible.maximalIdeal_pow_eq_setOf_le_v_coe_pow
null
exists_maximalIdeal_pow_eq_of_principal [IsNoetherianRing R] [IsLocalRing R] [IsDomain R] (h' : (maximalIdeal R).IsPrincipal) (I : Ideal R) (hI : I ≠ ⊥) : ∃ n : ℕ, I = maximalIdeal R ^ n := by by_cases h : IsField R · let _ := h.toField exact ⟨0, by simp [(eq_bot_or_eq_top I).resolve_left hI]⟩ classical obtain ⟨x, hx : _ = Ideal.span _⟩ := h' by_cases hI' : I = ⊤ · use 0; rw [pow_zero, hI', Ideal.one_eq_top] have H : ∀ r : R, ¬IsUnit r ↔ x ∣ r := fun r => (SetLike.ext_iff.mp hx r).trans Ideal.mem_span_singleton have : x ≠ 0 := by rintro rfl apply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h simp [hx] have hx' := IsDiscreteValuationRing.irreducible_of_span_eq_maximalIdeal x this hx have H' : ∀ r : R, r ≠ 0 → r ∈ nonunits R → ∃ n : ℕ, Associated (x ^ n) r := by intro r hr₁ hr₂ obtain ⟨f, hf₁, rfl, hf₂⟩ := (WfDvdMonoid.not_unit_iff_exists_factors_eq r hr₁).mp hr₂ have : ∀ b ∈ f, Associated x b := by intro b hb exact Irreducible.associated_of_dvd hx' (hf₁ b hb) ((H b).mp (hf₁ b hb).1) clear hr₁ hr₂ hf₁ induction f using Multiset.induction with | empty => exact (hf₂ rfl).elim | cons fa fs fh => ?_ rcases eq_or_ne fs ∅ with (rfl | hf') · use 1 rw [pow_one, Multiset.prod_cons, Multiset.empty_eq_zero, Multiset.prod_zero, mul_one] exact this _ (Multiset.mem_cons_self _ _) · obtain ⟨n, hn⟩ := fh hf' fun b hb => this _ (Multiset.mem_cons_of_mem hb) use n + 1 rw [pow_add, Multiset.prod_cons, mul_comm, pow_one] exact Associated.mul_mul (this _ (Multiset.mem_cons_self _ _)) hn have : ∃ n : ℕ, x ^ n ∈ I := by obtain ⟨r, hr₁, hr₂⟩ : ∃ r : R, r ∈ I ∧ r ≠ 0 := by by_contra! h; apply hI; rw [eq_bot_iff]; exact h obtain ⟨n, u, rfl⟩ := H' r hr₂ (le_maximalIdeal hI' hr₁) use n rwa [← I.unit_mul_mem_iff_mem u.isUnit, mul_comm] use Nat.find this apply le_antisymm · change ∀ s ∈ I, s ∈ _ by_contra! hI'' obtain ⟨s, hs₁, hs₂⟩ := hI'' apply hs₂ by_cases hs₃ : s = 0; · rw [hs₃]; exact zero_mem _ obtain ⟨n, u, rfl⟩ := H' s hs₃ (le_maximalIdeal hI' hs₁) rw [mul_comm, Ideal.unit_mul_mem_iff_mem _ u.isUnit] at hs₁ ⊢ apply Ideal.pow_le_pow_right (Nat.find_min' this hs₁) ...
theorem
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
exists_maximalIdeal_pow_eq_of_principal
null
maximalIdeal_isPrincipal_of_isDedekindDomain [IsLocalRing R] [IsDomain R] [IsDedekindDomain R] : (maximalIdeal R).IsPrincipal := by classical by_cases ne_bot : maximalIdeal R = ⊥ · rw [ne_bot]; infer_instance obtain ⟨a, ha₁, ha₂⟩ : ∃ a ∈ maximalIdeal R, a ≠ (0 : R) := by by_contra! h'; apply ne_bot; rwa [eq_bot_iff] have hle : Ideal.span {a} ≤ maximalIdeal R := by rwa [Ideal.span_le, Set.singleton_subset_iff] have : (Ideal.span {a}).radical = maximalIdeal R := by rw [Ideal.radical_eq_sInf] apply le_antisymm · exact sInf_le ⟨hle, inferInstance⟩ · refine le_sInf fun I hI => (eq_maximalIdeal <| hI.2.isMaximal (fun e => ha₂ ?_)).ge rw [← Ideal.span_singleton_eq_bot, eq_bot_iff, ← e]; exact hI.1 have : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a} := by rw [← this]; apply Ideal.exists_radical_pow_le_of_fg; exact IsNoetherian.noetherian _ rcases hn : Nat.find this with - | n · have := Nat.find_spec this rw [hn, pow_zero, Ideal.one_eq_top] at this exact (Ideal.IsMaximal.ne_top inferInstance (eq_top_iff.mpr <| this.trans hle)).elim obtain ⟨b, hb₁, hb₂⟩ : ∃ b ∈ maximalIdeal R ^ n, b ∉ Ideal.span {a} := by by_contra! h'; rw [Nat.find_eq_iff] at hn; exact hn.2 n n.lt_succ_self fun x hx => h' x hx have hb₃ : ∀ m ∈ maximalIdeal R, ∃ k : R, k * a = b * m := by intro m hm; rw [← Ideal.mem_span_singleton']; apply Nat.find_spec this rw [hn, pow_succ]; exact Ideal.mul_mem_mul hb₁ hm have hb₄ : b ≠ 0 := by rintro rfl; apply hb₂; exact zero_mem _ let K := FractionRing R let x : K := algebraMap R K b / algebraMap R K a let M := Submodule.map (Algebra.linearMap R K) (maximalIdeal R) have ha₃ : algebraMap R K a ≠ 0 := IsFractionRing.to_map_eq_zero_iff.not.mpr ha₂ by_cases hx : ∀ y ∈ M, x * y ∈ M · have := isIntegral_of_smul_mem_submodule M ?_ ?_ x hx · obtain ⟨y, e⟩ := IsIntegrallyClosed.algebraMap_eq_of_integral this refine (hb₂ (Ideal.mem_span_singleton'.mpr ⟨y, ?_⟩)).elim apply IsFractionRing.injective R K rw [map_mul, e, div_mul_cancel₀ _ ha₃] · rw [Submodule.ne_bot_iff]; refine ⟨_, ⟨a, ha₁, rfl⟩, ?_⟩ exact (IsFractionRing.to_map_eq_zero_iff (K := K)).not.mpr ha₂ · apply Submodule.FG.map; exact IsNoetherian.noetherian _ · have : (M.map (DistribMulAction.toLinearMap R K x)).comap (Algebra.linearMap R K) = ⊤ := by by_contra h; apply hx rintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩ obtain ⟨k, hk⟩ := hb₃ m hm have hk' : x * algebraMap R K m = algebraMap R K k := by rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel_right₀ _ ha₃] exact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩ obtain ⟨y, hy₁, hy₂⟩ : ∃ y ∈ maximalIdeal R, b * y = a := by rw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this ...
theorem
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
maximalIdeal_isPrincipal_of_isDedekindDomain
null
tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain [IsNoetherianRing R] [IsLocalRing R] [IsDomain R] : List.TFAE [IsPrincipalIdealRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∀ P : Ideal R, P ≠ ⊥ → P.IsPrime → P = maximalIdeal R, (maximalIdeal R).IsPrincipal, finrank (ResidueField R) (CotangentSpace R) ≤ 1, ∀ I ≠ ⊥, ∃ n : ℕ, I = maximalIdeal R ^ n] := by tfae_have 1 → 2 := fun _ ↦ inferInstance tfae_have 2 → 1 := fun _ ↦ ((IsBezout.TFAE (R := R)).out 0 1).mp ‹_› tfae_have 1 → 4 | H => ⟨inferInstance, fun P hP hP' ↦ eq_maximalIdeal (hP'.isMaximal hP)⟩ tfae_have 4 → 3 := fun ⟨h₁, h₂⟩ ↦ { h₁ with maximalOfPrime := (h₂ _ · · ▸ maximalIdeal.isMaximal R) } tfae_have 3 → 5 := fun h ↦ maximalIdeal_isPrincipal_of_isDedekindDomain R tfae_have 6 ↔ 5 := finrank_cotangentSpace_le_one_iff tfae_have 5 → 7 := exists_maximalIdeal_pow_eq_of_principal R tfae_have 7 → 2 := by rw [ValuationRing.iff_ideal_total] intro H constructor intro I J by_cases hI : I = ⊥; · subst hI; left; exact bot_le by_cases hJ : J = ⊥; · subst hJ; right; exact bot_le obtain ⟨n, rfl⟩ := H I hI obtain ⟨m, rfl⟩ := H J hJ exact (le_total m n).imp Ideal.pow_le_pow_right Ideal.pow_le_pow_right tfae_finish
theorem
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain
Let `(R, m, k)` be a Noetherian local domain (possibly a field). The following are equivalent: 0. `R` is a PID 1. `R` is a valuation ring 2. `R` is a Dedekind domain 3. `R` is integrally closed with at most one non-zero prime ideal 4. `m` is principal 5. `dimₖ m/m² ≤ 1` 6. Every nonzero ideal is a power of `m`. Also see `IsDiscreteValuationRing.TFAE` for a version assuming `¬ IsField R`.
IsDiscreteValuationRing.TFAE [IsNoetherianRing R] [IsLocalRing R] [IsDomain R] (h : ¬IsField R) : List.TFAE [IsDiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ P.IsPrime, (maximalIdeal R).IsPrincipal, finrank (ResidueField R) (CotangentSpace R) = 1, ∀ (I) (_ : I ≠ ⊥), ∃ n : ℕ, I = maximalIdeal R ^ n] := by have : finrank (ResidueField R) (CotangentSpace R) = 1 ↔ finrank (ResidueField R) (CotangentSpace R) ≤ 1 := by simp [Nat.le_one_iff_eq_zero_or_eq_one, finrank_cotangentSpace_eq_zero_iff, h] rw [this] have : maximalIdeal R ≠ ⊥ := isField_iff_maximalIdeal_eq.not.mp h convert tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain R · exact ⟨fun _ ↦ inferInstance, fun h ↦ { h with not_a_field' := this }⟩ · exact ⟨fun h P h₁ h₂ ↦ h.unique ⟨h₁, h₂⟩ ⟨this, inferInstance⟩, fun H ↦ ⟨_, ⟨this, inferInstance⟩, fun P hP ↦ H P hP.1 hP.2⟩⟩ variable {R}
theorem
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
IsDiscreteValuationRing.TFAE
The following are equivalent for a Noetherian local domain that is not a field `(R, m, k)`: 0. `R` is a discrete valuation ring 1. `R` is a valuation ring 2. `R` is a Dedekind domain 3. `R` is integrally closed with a unique non-zero prime ideal 4. `m` is principal 5. `dimₖ m/m² = 1` 6. Every nonzero ideal is a power of `m`. Also see `tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain` for a version without `¬ IsField R`.
IsLocalRing.finrank_CotangentSpace_eq_one_iff [IsNoetherianRing R] [IsLocalRing R] [IsDomain R] : finrank (ResidueField R) (CotangentSpace R) = 1 ↔ IsDiscreteValuationRing R := by by_cases hR : IsField R · letI := hR.toField simp only [finrank_cotangentSpace_eq_zero, zero_ne_one, false_iff] exact fun h ↦ h.3 maximalIdeal_eq_bot · exact (IsDiscreteValuationRing.TFAE R hR).out 5 0 variable (R)
lemma
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
IsLocalRing.finrank_CotangentSpace_eq_one_iff
null
IsLocalRing.finrank_CotangentSpace_eq_one [IsDomain R] [IsDiscreteValuationRing R] : finrank (ResidueField R) (CotangentSpace R) = 1 := finrank_CotangentSpace_eq_one_iff.mpr ‹_›
lemma
RingTheory
[ "Mathlib.RingTheory.DedekindDomain.Basic", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.RingTheory.Finiteness.Ideal", "Mathlib.RingTheory.Ideal.Cotangent" ]
Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
IsLocalRing.finrank_CotangentSpace_eq_one
null
DividedPowers where /-- The divided power function underlying a divided power structure -/ dpow : ℕ → A → A dpow_null : ∀ {n x} (_ : x ∉ I), dpow n x = 0 dpow_zero : ∀ {x} (_ : x ∈ I), dpow 0 x = 1 dpow_one : ∀ {x} (_ : x ∈ I), dpow 1 x = x dpow_mem : ∀ {n x} (_ : n ≠ 0) (_ : x ∈ I), dpow n x ∈ I dpow_add : ∀ {n} {x y} (_ : x ∈ I) (_ : y ∈ I), dpow n (x + y) = (antidiagonal n).sum fun k ↦ dpow k.1 x * dpow k.2 y dpow_mul : ∀ {n} {a : A} {x} (_ : x ∈ I), dpow n (a * x) = a ^ n * dpow n x mul_dpow : ∀ {m n} {x} (_ : x ∈ I), dpow m x * dpow n x = choose (m + n) m * dpow (m + n) x dpow_comp : ∀ {m n x} (_ : n ≠ 0) (_ : x ∈ I), dpow m (dpow n x) = uniformBell m n * dpow (m * n) x variable (A) in
structure
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
DividedPowers
The divided power structure on an ideal I of a commutative ring A
noncomputable dividedPowersBot : DividedPowers (⊥ : Ideal A) where dpow n a := open Classical in ite (a = 0 ∧ n = 0) 1 0 dpow_null {n a} ha := by simp only [mem_bot] at ha rw [if_neg] exact not_and_of_not_left (n = 0) ha dpow_zero ha := by rw [mem_bot.mp ha] simp only [and_self, ite_true] dpow_one ha := by simp [mem_bot.mp ha] dpow_mem {n a} hn _ := by simp only [mem_bot, ite_eq_right_iff, and_imp] exact fun _ a ↦ False.elim (hn a) dpow_add ha hb := by rw [mem_bot.mp ha, mem_bot.mp hb, add_zero] simp only [true_and, mul_ite, mul_one, mul_zero] split_ifs with h · simp [h] · symm apply sum_eq_zero grind [mem_antidiagonal] dpow_mul {n} _ _ hx := by rw [mem_bot.mp hx] simp only [mul_zero, true_and, mul_ite, mul_one] by_cases hn : n = 0 · rw [if_pos hn, hn, if_pos rfl, _root_.pow_zero] · simp only [if_neg hn] mul_dpow {m n x} hx := by rw [mem_bot.mp hx] simp only [true_and, mul_ite, mul_one, mul_zero, add_eq_zero] by_cases hn : n = 0 · simp only [hn, ite_true, and_true, add_zero, choose_self, cast_one] · rw [if_neg hn, if_neg] exact not_and_of_not_right (m = 0) hn dpow_comp m {n a} hn ha := by rw [mem_bot.mp ha] simp only [true_and, ite_eq_right_iff, _root_.mul_eq_zero, mul_ite, mul_one, mul_zero] by_cases hm : m = 0 · simp [hm, uniformBell_zero_left, hn] · simp only [hm, and_false, ite_false, false_or, if_neg hn]
def
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dividedPowersBot
The canonical `DividedPowers` structure on the zero ideal
dividedPowersBot_dpow_eq [DecidableEq A] (n : ℕ) (a : A) : (dividedPowersBot A).dpow n a = if a = 0 ∧ n = 0 then 1 else 0 := by simp [dividedPowersBot]
lemma
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dividedPowersBot_dpow_eq
null
dpow_add' (hI : DividedPowers I) {n : ℕ} (ha : a ∈ I) (hb : b ∈ I) : hI.dpow n (a + b) = (range (n + 1)).sum fun k ↦ hI.dpow k a * hI.dpow (n - k) b := by rw [hI.dpow_add ha hb, sum_antidiagonal_eq_sum_range_succ_mk]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_add'
The coercion from the divided powers structures to functions -/ instance : CoeFun (DividedPowers I) fun _ ↦ ℕ → A → A := ⟨fun hI ↦ hI.dpow⟩ variable {I} in @[ext] theorem DividedPowers.ext (hI : DividedPowers I) (hI' : DividedPowers I) (h_eq : ∀ (n : ℕ) {x : A} (_ : x ∈ I), hI.dpow n x = hI'.dpow n x) : hI = hI' := by obtain ⟨hI, h₀, _⟩ := hI obtain ⟨hI', h₀', _⟩ := hI' simp only [mk.injEq] grind theorem DividedPowers.coe_injective : Function.Injective (fun (h : DividedPowers I) ↦ (h : ℕ → A → A)) := fun hI hI' h ↦ by ext n x exact congr_fun (congr_fun h n) x end DividedPowersDefinition namespace DividedPowers section BasicLemmas /- ## Basic lemmas for divided powers -/ variable {A : Type*} [CommSemiring A] {I : Ideal A} {a b : A} /-- Variant of `DividedPowers.dpow_add` with a sum on `range (n + 1)`
exp (hI : DividedPowers I) (a : A) : PowerSeries A := PowerSeries.mk fun n ↦ hI.dpow n a
def
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
exp
The exponential series of an element in the context of divided powers, `Σ (dpow n a) X ^ n`
exp_add' (dp : ℕ → A → A) (dp_add : ∀ n, dp n (a + b) = (antidiagonal n).sum fun k ↦ dp k.1 a * dp k.2 b) : PowerSeries.mk (fun n ↦ dp n (a + b)) = (PowerSeries.mk fun n ↦ dp n a) * (PowerSeries.mk fun n ↦ dp n b) := by ext n simp only [PowerSeries.coeff_mk, PowerSeries.coeff_mul, dp_add n, sum_antidiagonal_eq_sum_range_succ_mk]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
exp_add'
A more general of `DividedPowers.exp_add`
exp_add (hI : DividedPowers I) (ha : a ∈ I) (hb : b ∈ I) : hI.exp (a + b) = hI.exp a * hI.exp b := exp_add' _ (fun _ ↦ hI.dpow_add ha hb) variable (hI : DividedPowers I) /- ## Rewriting lemmas -/
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
exp_add
null
dpow_smul {n : ℕ} (ha : a ∈ I) : hI.dpow n (b • a) = b ^ n • hI.dpow n a := by simp only [smul_eq_mul, hI.dpow_mul, ha]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_smul
null
dpow_mul_right {n : ℕ} (ha : a ∈ I) : hI.dpow n (a * b) = hI.dpow n a * b ^ n := by rw [mul_comm, hI.dpow_mul ha, mul_comm]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_mul_right
null
dpow_smul_right {n : ℕ} (ha : a ∈ I) : hI.dpow n (a • b) = hI.dpow n a • b ^ n := by rw [smul_eq_mul, hI.dpow_mul_right ha, smul_eq_mul]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_smul_right
null
factorial_mul_dpow_eq_pow {n : ℕ} (ha : a ∈ I) : (n ! : A) * hI.dpow n a = a ^ n := by induction n with | zero => rw [factorial_zero, cast_one, one_mul, pow_zero, hI.dpow_zero ha] | succ n ih => rw [factorial_succ, mul_comm (n + 1)] nth_rewrite 1 [← (n + 1).choose_one_right] rw [← choose_symm_add, cast_mul, mul_assoc, ← hI.mul_dpow ha, ← mul_assoc, ih, hI.dpow_one ha, pow_succ, mul_comm]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
factorial_mul_dpow_eq_pow
null
dpow_eval_zero {n : ℕ} (hn : n ≠ 0) : hI.dpow n 0 = 0 := by rw [← MulZeroClass.mul_zero (0 : A), hI.dpow_mul I.zero_mem, zero_pow hn, zero_mul, zero_mul]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_eval_zero
null
nilpotent_of_mem_dpIdeal {n : ℕ} (hn : n ≠ 0) (hnI : ∀ {y}, y ∈ I → n • y = 0) (hI : DividedPowers I) (ha : a ∈ I) : a ^ n = 0 := by have h_fac : (n ! : A) * hI.dpow n a = n • ((n - 1)! : A) * hI.dpow n a := by rw [nsmul_eq_mul, ← cast_mul, mul_factorial_pred hn] rw [← hI.factorial_mul_dpow_eq_pow ha, h_fac, smul_mul_assoc] exact hnI (I.mul_mem_left ((n - 1)! : A) (hI.dpow_mem hn ha))
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
nilpotent_of_mem_dpIdeal
If an element of a divided power ideal is killed by multiplication by some nonzero integer `n`, then its `n`th power is zero. Proposition 1.2.7 of [Berthelot-1974], part (i).
coincide_on_smul {J : Ideal A} (hJ : DividedPowers J) {n : ℕ} (ha : a ∈ I • J) : hI.dpow n a = hJ.dpow n a := by induction ha using Submodule.smul_induction_on' generalizing n with | smul a ha b hb => rw [Algebra.id.smul_eq_mul, hJ.dpow_mul hb, mul_comm a b, hI.dpow_mul ha, ← hJ.factorial_mul_dpow_eq_pow hb, ← hI.factorial_mul_dpow_eq_pow ha] ring | add x hx y hy hx' hy' => rw [hI.dpow_add (mul_le_right hx) (mul_le_right hy), hJ.dpow_add (mul_le_left hx) (mul_le_left hy)] apply sum_congr rfl intro k _ rw [hx', hy']
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
coincide_on_smul
If J is another ideal of A with divided powers, then the divided powers of I and J coincide on I • J [Berthelot-1974], 1.6.1 (ii)
prod_dpow {ι : Type*} {s : Finset ι} {n : ι → ℕ} (ha : a ∈ I) : (s.prod fun i ↦ hI.dpow (n i) a) = multinomial s n * hI.dpow (s.sum n) a := by classical induction s using Finset.induction with | empty => simp only [prod_empty, multinomial_empty, cast_one, sum_empty, one_mul] rw [hI.dpow_zero ha] | insert _ _ hi hrec => rw [prod_insert hi, hrec, ← mul_assoc, mul_comm (hI.dpow (n _) a), mul_assoc, hI.mul_dpow ha, ← sum_insert hi, ← mul_assoc] apply congr_arg₂ _ _ rfl rw [multinomial_insert hi, mul_comm, cast_mul, sum_insert hi]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
prod_dpow
A product of divided powers is a multinomial coefficient times the divided power [Roby-1965], formula (III')
dpow_sum' {M : Type*} [AddCommMonoid M] {I : AddSubmonoid M} (dpow : ℕ → M → A) (dpow_zero : ∀ {x}, x ∈ I → dpow 0 x = 1) (dpow_add : ∀ {n x y}, x ∈ I → y ∈ I → dpow n (x + y) = (antidiagonal n).sum fun k ↦ dpow k.1 x * dpow k.2 y) (dpow_eval_zero : ∀ {n : ℕ}, n ≠ 0 → dpow n 0 = 0) {ι : Type*} [DecidableEq ι] {s : Finset ι} {x : ι → M} (hx : ∀ i ∈ s, x i ∈ I) {n : ℕ} : dpow n (s.sum x) = (s.sym n).sum fun k ↦ s.prod fun i ↦ dpow (Multiset.count i k) (x i) := by simp only [sum_antidiagonal_eq_sum_range_succ_mk] at dpow_add induction s using Finset.induction generalizing n with | empty => simp only [sum_empty, prod_empty, sum_const, nsmul_eq_mul, mul_one] by_cases hn : n = 0 · rw [hn] rw [dpow_zero I.zero_mem] simp only [sym_zero, card_singleton, cast_one] · rw [dpow_eval_zero hn, eq_comm, ← cast_zero] apply congr_arg rw [card_eq_zero, sym_eq_empty] exact ⟨hn, rfl⟩ | insert a s ha ih => have hx' : ∀ i, i ∈ s → x i ∈ I := fun i hi ↦ hx i (mem_insert_of_mem hi) simp_rw [sum_insert ha, dpow_add (hx a (mem_insert_self a s)) (I.sum_mem fun i ↦ hx' i), sum_range, ih hx', mul_sum, sum_sigma', eq_comm] apply sum_bij' (fun m _ ↦ m.filterNe a) (fun m _ ↦ m.2.fill a m.1) (fun m hm ↦ mem_sigma.2 ⟨mem_univ _, _⟩) (fun m hm ↦ by simp only [succ_eq_add_one, mem_sym_iff, mem_insert, Sym.mem_fill_iff] simp only [mem_sigma, mem_univ, mem_sym_iff, true_and] at hm intro b apply Or.imp (fun h ↦ h.2) (fun h ↦ hm b h)) (fun m _ ↦ m.fill_filterNe a) · intro m hm simp only [mem_sigma, mem_univ, mem_sym_iff, true_and] at hm exact Sym.filter_ne_fill a m fun a_1 ↦ ha (hm a a_1) · intro m hm simp only [mem_sym_iff, mem_insert] at hm rw [prod_insert ha] apply congr_arg₂ _ rfl apply prod_congr rfl intro i hi apply congr_arg₂ _ _ rfl conv_lhs => rw [← m.fill_filterNe a] exact Sym.count_coe_fill_of_ne (ne_of_mem_of_not_mem hi ha) · intro m hm convert sym_filterNe_mem a hm rw [erase_insert ha]
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_sum'
Lemma towards `dpow_sum` when we only have partial information on a divided power ideal
dpow_sum {ι : Type*} [DecidableEq ι] {s : Finset ι} {x : ι → A} (hx : ∀ i ∈ s, x i ∈ I) {n : ℕ} : hI.dpow n (s.sum x) = (s.sym n).sum fun k ↦ s.prod fun i ↦ hI.dpow (Multiset.count i k) (x i) := dpow_sum' hI.dpow hI.dpow_zero hI.dpow_add hI.dpow_eval_zero hx
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
dpow_sum
A “multinomial” theorem for divided powers — without multinomial coefficients
ofRingEquiv (hI : DividedPowers I) : DividedPowers J where dpow n b := e (hI.dpow n (e.symm b)) dpow_null hx := by rw [EmbeddingLike.map_eq_zero_iff, hI.dpow_null] rwa [symm_apply_mem_of_equiv_iff, h] dpow_zero hx := by rw [EmbeddingLike.map_eq_one_iff, hI.dpow_zero] rwa [symm_apply_mem_of_equiv_iff, h] dpow_one hx := by rw [dpow_one, RingEquiv.apply_symm_apply] rwa [I.symm_apply_mem_of_equiv_iff, h] dpow_mem hn hx := by rw [← h, I.apply_mem_of_equiv_iff] apply hI.dpow_mem hn rwa [I.symm_apply_mem_of_equiv_iff, h] dpow_add hx hy := by simp only [map_add] rw [hI.dpow_add (symm_apply_mem_of_equiv_iff.mpr (h ▸ hx)) (symm_apply_mem_of_equiv_iff.mpr (h ▸ hy))] simp only [map_sum, map_mul] dpow_mul hx := by simp only [map_mul] rw [hI.dpow_mul (symm_apply_mem_of_equiv_iff.mpr (h ▸ hx))] rw [map_mul, map_pow] simp only [RingEquiv.apply_symm_apply] mul_dpow hx := by rw [← map_mul, hI.mul_dpow, map_mul] · simp only [map_natCast] · rwa [symm_apply_mem_of_equiv_iff, h] dpow_comp hn hx := by simp only [RingEquiv.symm_apply_apply] rw [hI.dpow_comp hn] · simp only [map_mul, map_natCast] · rwa [symm_apply_mem_of_equiv_iff, h] @[simp]
def
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
ofRingEquiv
Transfer divided powers under an equivalence
ofRingEquiv_dpow (hI : DividedPowers I) {n : ℕ} {b : B} : (ofRingEquiv h hI).dpow n b = e (hI.dpow n (e.symm b)) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
ofRingEquiv_dpow
null
ofRingEquiv_dpow_apply (hI : DividedPowers I) {n : ℕ} {a : A} : (ofRingEquiv h hI).dpow n (e a) = e (hI.dpow n a) := by simp
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
ofRingEquiv_dpow_apply
null
equiv : DividedPowers I ≃ DividedPowers J where toFun := ofRingEquiv h invFun := ofRingEquiv (show map e.symm J = I by rw [← h]; exact I.map_of_equiv e) left_inv := fun hI ↦ by ext n a; simp [ofRingEquiv] right_inv := fun hJ ↦ by ext n b; simp [ofRingEquiv]
def
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
equiv
Transfer divided powers under an equivalence (Equiv version)
equiv_apply (hI : DividedPowers I) (n : ℕ) (b : B) : (equiv h hI).dpow n b = e (hI.dpow n (e.symm b)) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
equiv_apply
null
equiv_apply' (hI : DividedPowers I) {n : ℕ} {a : A} : (equiv h hI).dpow n (e a) = e (hI.dpow n a) := ofRingEquiv_dpow_apply h hI
theorem
RingTheory
[ "Mathlib.RingTheory.PowerSeries.Basic", "Mathlib.Combinatorics.Enumerative.Bell", "Mathlib.Data.Nat.Choose.Multinomial", "Mathlib.RingTheory.Ideal.Maps" ]
Mathlib/RingTheory/DividedPowers/Basic.lean
equiv_apply'
Variant of `DividedPowers.equiv_apply`
IsDPMorphism {A B : Type*} [CommSemiring A] [CommSemiring B] {I : Ideal A} {J : Ideal B} (hI : DividedPowers I) (hJ : DividedPowers J) (f : A →+* B) : Prop where ideal_comp : I.map f ≤ J dpow_comp : ∀ {n : ℕ}, ∀ a ∈ I, hJ.dpow n (f a) = f (hI.dpow n a) variable {A B : Type*} [CommSemiring A] [CommSemiring B] {I : Ideal A} {J : Ideal B} (hI : DividedPowers I) (hJ : DividedPowers J)
structure
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
IsDPMorphism
Given divided power structures on the `A`-ideal `I` and the `B`-ideal `J`, a ring morphism `A → B` is a divided power morphism if it is compatible with these divided power structures.
isDPMorphism_def (f : A →+* B) : IsDPMorphism hI hJ f ↔ I.map f ≤ J ∧ ∀ {n}, ∀ a ∈ I, hJ.dpow n (f a) = f (hI.dpow n a) := ⟨fun h ↦ ⟨h.ideal_comp, h.dpow_comp⟩, fun ⟨h1, h2⟩ ↦ IsDPMorphism.mk h1 h2⟩
lemma
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
isDPMorphism_def
null
isDPMorphism_iff (f : A →+* B) : IsDPMorphism hI hJ f ↔ I.map f ≤ J ∧ ∀ n ≠ 0, ∀ a ∈ I, hJ.dpow n (f a) = f (hI.dpow n a) := by rw [isDPMorphism_def, and_congr_right_iff] refine fun hIJ ↦ ⟨fun H n _ ↦ H, fun H n ↦ ?_⟩ by_cases hn : n = 0 · intro _ ha rw [hn, hI.dpow_zero ha, hJ.dpow_zero (hIJ (mem_map_of_mem f ha)), map_one] · exact H n hn
lemma
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
isDPMorphism_iff
null
map_dpow {f : A →+* B} (hf : IsDPMorphism hI hJ f) {n : ℕ} {a : A} (ha : a ∈ I) : f (hI.dpow n a) = hJ.dpow n (f a) := (hf.2 a ha).symm
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
map_dpow
null
comp {f : A →+* B} {g : B →+* C} (hg : IsDPMorphism hJ hK g) (hf : IsDPMorphism hI hJ f) : IsDPMorphism hI hK (g.comp f) := by refine ⟨le_trans (map_map f g ▸ map_mono hf.1) hg.1, fun a ha ↦ ?_⟩ simp only [RingHom.coe_comp, Function.comp_apply] rw [← hf.2 a ha, hg.2] exact hf.1 (mem_map_of_mem f ha)
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
comp
null
@[ext] DPMorphism {A B : Type*} [CommSemiring A] [CommSemiring B] {I : Ideal A} {J : Ideal B} (hI : DividedPowers I) (hJ : DividedPowers J) extends RingHom A B where ideal_comp : I.map toRingHom ≤ J dpow_comp : ∀ {n : ℕ}, ∀ a ∈ I, hJ.dpow n (toRingHom a) = toRingHom (hI.dpow n a)
structure
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
DPMorphism
A bundled divided power morphism between rings endowed with divided power structures.
instFunLike : FunLike (DPMorphism hI hJ) A B where coe h := h.toRingHom coe_injective' h h' hh' := by cases h; cases h'; congr dsimp at hh'; ext; rw [hh']
instance
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
instFunLike
null
coe_ringHom : CoeOut (DPMorphism hI hJ) (A →+* B) := ⟨DPMorphism.toRingHom⟩ @[simp] theorem coe_toRingHom {f : DPMorphism hI hJ} : ⇑(f : A →+* B) = f := rfl @[simp] lemma toRingHom_apply {f : DPMorphism hI hJ} {a : A} : f.toRingHom a = f a := rfl variable {hI hJ}
instance
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
coe_ringHom
null
isDPMorphism (f : DPMorphism hI hJ) : IsDPMorphism hI hJ f.toRingHom := ⟨f.ideal_comp, f.dpow_comp⟩
lemma
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
isDPMorphism
null
mk' {f : A →+* B} (hf : IsDPMorphism hI hJ f) : DPMorphism hI hJ := ⟨f, hf.1, hf.2⟩ variable (hI hJ)
def
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
mk'
A constructor for `DPMorphism` from a ring homomorphism `f : A →+* B` satisfying `IsDPMorphism hI hJ f`.
_root_.DividedPowers.ideal_from_ringHom {f : A →+* B} (hf : I.map f ≤ J) : Ideal A where carrier := {x ∈ I | ∀ n : ℕ, f (hI.dpow n (x : A)) = hJ.dpow n (f (x : A))} add_mem' := fun hx hy ↦ by simp only [mem_setOf_eq, map_add] at hx hy ⊢ refine ⟨I.add_mem hx.1 hy.1, fun n ↦ ?_⟩ rw [hI.dpow_add hx.1 hy.1, map_sum, hJ.dpow_add (hf (mem_map_of_mem f hx.1)) (hf (mem_map_of_mem f hy.1))] apply congr_arg ext k rw [map_mul, hx.2, hy.2] zero_mem' := by simp only [mem_setOf_eq, Submodule.zero_mem, map_zero, true_and] intro n induction n with | zero => rw [hI.dpow_zero I.zero_mem, hJ.dpow_zero J.zero_mem, map_one] | succ n => rw [hI.dpow_eval_zero n.succ_ne_zero, hJ.dpow_eval_zero n.succ_ne_zero, map_zero] smul_mem' := fun r x hx ↦ by refine ⟨I.smul_mem r hx.1, (fun n ↦ ?_)⟩ rw [smul_eq_mul, hI.dpow_mul hx.1, map_mul, map_mul, map_pow, hJ.dpow_mul (hf (mem_map_of_mem f hx.1)), hx.2 n]
def
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
_root_.DividedPowers.ideal_from_ringHom
Given a ring homomorphism `A → B` and ideals `I ⊆ A` and `J ⊆ B` such that `I.map f ≤ J`, this is the `A`-ideal on which `f (hI.dpow n x) = hJ.dpow n (f x)`. See [N. Roby, *Les algèbres à puissances dividées* (Proposition 2)][Roby-1965].
fromGens {f : A →+* B} {S : Set A} (hS : I = span S) (hf : I.map f ≤ J) (h : ∀ {n : ℕ}, ∀ x ∈ S, f (hI.dpow n x) = hJ.dpow n (f x)) : DPMorphism hI hJ where toRingHom := f ideal_comp := hf dpow_comp {n} x hx := by have hS' : S ⊆ ideal_from_ringHom hI hJ hf := fun y hy ↦ by simp only [mem_coe, ideal_from_ringHom, Submodule.mem_mk] exact ⟨hS ▸ subset_span hy, fun n => h y hy⟩ rw [← span_le, ← hS] at hS' exact ((hS' hx).2 n).symm
def
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
fromGens
The `DPMorphism` induced by a ring morphism, given that divided powers are compatible on a generating set. See [N. Roby, *Les algèbres à puissances dividées* (Proposition 3)][Roby-1965].
id : DPMorphism hI hI where toRingHom := RingHom.id A ideal_comp := by simp only [map_id, le_refl] dpow_comp _ _ := by simp only [RingHom.id_apply]
def
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
id
The identity map as a `DPMorphism`.
fromGens_coe {f : A →+* B} {S : Set A} (hS : I = span S) (hf : I.map f ≤ J) (h : ∀ {n : ℕ}, ∀ x ∈ S, f (hI.dpow n x) = hJ.dpow n (f x)) : (fromGens hI hJ hS hf h).toRingHom = f := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
fromGens_coe
null
on_span {f : A →+* B} {S : Set A} (hS : I = span S) (hS' : ∀ s ∈ S, f s ∈ J) (hdp : ∀ {n : ℕ}, ∀ a ∈ S, f (hI.dpow n a) = hJ.dpow n (f a)) : IsDPMorphism hI hJ f := by suffices h : I.map f ≤ J by exact ⟨h, fun a ha ↦ by rw [← fromGens_coe hI hJ hS h hdp, (fromGens hI hJ hS h hdp).dpow_comp a ha]⟩ rw [hS, map_span, span_le] rintro b ⟨a, has, rfl⟩ exact hS' a has
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
on_span
null
of_comp (f : A →+* B) (g : B →+* C) (heq : J = I.map f) (hf : IsDPMorphism hI hJ f) (hh : IsDPMorphism hI hK (g.comp f)) : IsDPMorphism hJ hK g := by apply on_span _ _ heq · rintro b ⟨a, ha, rfl⟩ rw [← RingHom.comp_apply] exact hh.1 (mem_map_of_mem _ ha) · rintro n b ⟨a, ha, rfl⟩ rw [← RingHom.comp_apply, hh.2 a ha, RingHom.comp_apply, hf.2 a ha]
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
of_comp
null
protected comp (g : DPMorphism hJ hK) (f : DPMorphism hI hJ) : DPMorphism hI hK := mk' (IsDPMorphism.comp hK g.isDPMorphism f.isDPMorphism) @[simp] lemma comp_toRingHom (g : DPMorphism hJ hK) (f : DPMorphism hI hJ) : (g.comp f).toRingHom = g.toRingHom.comp f.toRingHom := rfl
def
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
comp
The composition of two divided power morphisms as a `DPMorphism`.
dpow_comp_from_gens {S : Set A} (hS : I = span S) (hS' : ∀ s ∈ S, f s ∈ J) (hdp : ∀ {n : ℕ}, ∀ a ∈ S, f (hI.dpow n a) = hJ.dpow n (f a)) : ∀ {n}, ∀ a ∈ I, hJ.dpow n (f a) = f (hI.dpow n a) := (IsDPMorphism.on_span hI hJ hS hS' hdp).2
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
dpow_comp_from_gens
null
dpow_eq_from_gens {S : Set A} (hS : I = span S) (hdp : ∀ {n : ℕ}, ∀ a ∈ S, hI.dpow n a = hI'.dpow n a) : hI' = hI := by ext n a by_cases ha : a ∈ I · refine hI.dpow_comp_from_gens hI' (f := RingHom.id A) hS ?_ ?_ a ha · intro s hs simp only [RingHom.id_apply, hS] exact subset_span hs · intro m b hb simpa only [RingHom.id_apply] using (hdp b hb) · rw [hI.dpow_null ha, hI'.dpow_null ha]
theorem
RingTheory
[ "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/DPMorphism.lean
dpow_eq_from_gens
If two divided power structures on the ideal `I` agree on a generating set, then they are equal. See [N. Roby, *Les algèbres à puissances dividées* (Corollary to Proposition 3)][Roby-1965].
noncomputable dpow : ℕ → A → A := fun m x => if x ∈ I then inverse (m ! : A) * x ^ m else 0 variable {I}
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow
The family of functions `ℕ → A → A` given by `x^n/n!`.
dpow_eq_of_mem {m : ℕ} {x : A} (hx : x ∈ I) : dpow I m x = inverse (m ! : A) * x ^ m := by simp [dpow, hx]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_eq_of_mem
null
dpow_eq_of_not_mem {m : ℕ} {x : A} (hx : x ∉ I) : dpow I m x = 0 := by simp [dpow, hx]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_eq_of_not_mem
null
dpow_null {m : ℕ} {x : A} (hx : x ∉ I) : dpow I m x = 0 := by simp [dpow, hx]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_null
null
dpow_zero {x : A} (hx : x ∈ I) : dpow I 0 x = 1 := by simp [dpow, hx]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_zero
null
dpow_one {x : A} (hx : x ∈ I) : dpow I 1 x = x := by simp [dpow_eq_of_mem hx]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_one
null
dpow_mem {m : ℕ} (hm : m ≠ 0) {x : A} (hx : x ∈ I) : dpow I m x ∈ I := by rw [dpow_eq_of_mem hx] exact Ideal.mul_mem_left I _ (Ideal.pow_mem_of_mem I hx _ (Nat.pos_of_ne_zero hm))
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_mem
null
dpow_add_of_lt {n : ℕ} (hn_fac : IsUnit ((n - 1)! : A)) {m : ℕ} (hmn : m < n) {x y : A} (hx : x ∈ I) (hy : y ∈ I) : dpow I m (x + y) = (Finset.antidiagonal m).sum (fun k ↦ dpow I k.1 x * dpow I k.2 y) := by rw [dpow_eq_of_mem (Ideal.add_mem I hx hy)] simp only [dpow] rw [inverse_mul_eq_iff_eq_mul _ _ _ (hn_fac.natCast_factorial_of_lt hmn), Finset.mul_sum, Commute.add_pow' (Commute.all _ _)] apply Finset.sum_congr rfl intro k hk rw [if_pos hx, if_pos hy] ring_nf simp only [mul_assoc]; congr; rw [← mul_assoc] exact castChoose_eq (hn_fac.natCast_factorial_of_lt hmn) hk
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_add_of_lt
null
dpow_add {n : ℕ} (hn_fac : IsUnit ((n - 1)! : A)) (hnI : I ^ n = 0) {m : ℕ} {x : A} (hx : x ∈ I) {y : A} (hy : y ∈ I) : dpow I m (x + y) = (Finset.antidiagonal m).sum fun k ↦ dpow I k.1 x * dpow I k.2 y := by by_cases hmn : m < n · exact dpow_add_of_lt hn_fac hmn hx hy · have h_sub : I ^ m ≤ I ^ n := Ideal.pow_le_pow_right (not_lt.mp hmn) rw [dpow_eq_of_mem (Ideal.add_mem I hx hy)] simp only [dpow] have hxy : (x + y) ^ m = 0 := by rw [← Ideal.mem_bot, ← Ideal.zero_eq_bot, ← hnI] exact Set.mem_of_subset_of_mem h_sub (Ideal.pow_mem_pow (Ideal.add_mem I hx hy) m) rw [hxy, mul_zero, eq_comm] apply Finset.sum_eq_zero intro k hk rw [if_pos hx, if_pos hy, mul_assoc, mul_comm (x ^ k.1), mul_assoc, ← mul_assoc] apply mul_eq_zero_of_right rw [← Ideal.mem_bot, ← Ideal.zero_eq_bot, ← hnI] apply Set.mem_of_subset_of_mem h_sub rw [← Finset.mem_antidiagonal.mp hk, add_comm, pow_add] exact Ideal.mul_mem_mul (Ideal.pow_mem_pow hy _) (Ideal.pow_mem_pow hx _)
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_add
null
dpow_mul {m : ℕ} {a x : A} (hx : x ∈ I) : dpow I m (a * x) = a ^ m * dpow I m x := by rw [dpow_eq_of_mem (Ideal.mul_mem_left I _ hx), dpow_eq_of_mem hx, mul_pow, ← mul_assoc, mul_comm _ (a ^ m), mul_assoc]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_mul
null
dpow_mul_of_add_lt {n : ℕ} (hn_fac : IsUnit ((n - 1)! : A)) {m k : ℕ} (hkm : m + k < n) {x : A} (hx : x ∈ I) : dpow I m x * dpow I k x = ↑((m + k).choose m) * dpow I (m + k) x := by have hm : m < n := lt_of_le_of_lt le_self_add hkm have hk : k < n := lt_of_le_of_lt le_add_self hkm rw [dpow_eq_of_mem hx, dpow_eq_of_mem hx, dpow_eq_of_mem hx, mul_assoc, ← mul_assoc (x ^ m), mul_comm (x ^ m), mul_assoc _ (x ^ m), ← pow_add, ← mul_assoc, ← mul_assoc] apply congr_arg₂ _ _ rfl rw [eq_mul_inverse_iff_mul_eq _ _ _ (hn_fac.natCast_factorial_of_lt hkm), mul_assoc, inverse_mul_eq_iff_eq_mul _ _ _ (hn_fac.natCast_factorial_of_lt hm), inverse_mul_eq_iff_eq_mul _ _ _ (hn_fac.natCast_factorial_of_lt hk)] norm_cast; apply congr_arg rw [← Nat.add_choose_mul_factorial_mul_factorial, mul_comm, mul_comm _ (m !), Nat.choose_symm_add]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_mul_of_add_lt
null
mul_dpow {n : ℕ} (hn_fac : IsUnit ((n - 1).factorial : A)) (hnI : I ^ n = 0) {m k : ℕ} {x : A} (hx : x ∈ I) : dpow I m x * dpow I k x = ↑((m + k).choose m) * dpow I (m + k) x := by by_cases hkm : m + k < n · exact dpow_mul_of_add_lt hn_fac hkm hx · have hxmk : x ^ (m + k) = 0 := Ideal.pow_eq_zero_of_mem hnI (not_lt.mp hkm) hx rw [dpow_eq_of_mem hx, dpow_eq_of_mem hx, dpow_eq_of_mem hx, mul_assoc, ← mul_assoc (x ^ m), mul_comm (x ^ m), mul_assoc _ (x ^ m), ← pow_add, hxmk, mul_zero, mul_zero, mul_zero, mul_zero]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
mul_dpow
null
dpow_comp_of_mul_lt {n : ℕ} (hn_fac : IsUnit ((n - 1)! : A)) {m k : ℕ} (hk : k ≠ 0) (hkm : m * k < n) {x : A} (hx : x ∈ I) : dpow I m (dpow I k x) = ↑(uniformBell m k) * dpow I (m * k) x := by have hmn : m < n := lt_of_le_of_lt (Nat.le_mul_of_pos_right _ (Nat.pos_of_ne_zero hk)) hkm rw [dpow_eq_of_mem (m := m * k) hx, dpow_eq_of_mem (dpow_mem hk hx)] by_cases hm0 : m = 0 · simp only [hm0, zero_mul, _root_.pow_zero, mul_one, uniformBell_zero_left, cast_one, one_mul] · have hkn : k < n := lt_of_le_of_lt (Nat.le_mul_of_pos_left _ (Nat.pos_of_ne_zero hm0)) hkm rw [dpow_eq_of_mem hx, mul_pow, ← pow_mul, mul_comm k, ← mul_assoc, ← mul_assoc] apply congr_arg₂ _ _ rfl rw [eq_mul_inverse_iff_mul_eq _ _ _ (hn_fac.natCast_factorial_of_lt hkm), mul_assoc, inverse_mul_eq_iff_eq_mul _ _ _ (hn_fac.natCast_factorial_of_lt hmn), inverse_pow_mul_eq_iff_eq_mul _ _ (hn_fac.natCast_factorial_of_lt hkn), ← uniformBell_mul_eq _ hk] simp only [Nat.cast_mul, Nat.cast_pow] ring_nf
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_comp_of_mul_lt
null
dpow_comp {n : ℕ} (hn_fac : IsUnit ((n - 1).factorial : A)) (hnI : I ^ n = 0) {m k : ℕ} (hk : k ≠ 0) {x : A} (hx : x ∈ I) : dpow I m (dpow I k x) = ↑(uniformBell m k) * dpow I (m * k) x := by by_cases hmk : m * k < n · exact dpow_comp_of_mul_lt hn_fac hk hmk hx · have hxmk : x ^ (m * k) = 0 := Ideal.pow_eq_zero_of_mem hnI (not_lt.mp hmk) hx rw [dpow_eq_of_mem (dpow_mem hk hx), dpow_eq_of_mem hx, dpow_eq_of_mem hx, mul_pow, ← pow_mul, ← mul_assoc, mul_comm k, hxmk, mul_zero, mul_zero, mul_zero]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_comp
null
noncomputable dividedPowers {n : ℕ} (hn_fac : IsUnit ((n - 1).factorial : A)) (hnI : I ^ n = 0) : DividedPowers I where dpow := dpow I dpow_null hx := dpow_null hx dpow_zero hx := dpow_zero hx dpow_one hx := dpow_one hx dpow_mem hn hx := dpow_mem hn hx dpow_add hx hy := dpow_add hn_fac hnI hx hy dpow_mul := dpow_mul mul_dpow hx := mul_dpow hn_fac hnI hx dpow_comp hk hx := dpow_comp hn_fac hnI hk hx
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers
If `(n-1)!` is invertible in `A` and `I^n = 0`, then `I` admits a divided power structure. Proposition 1.2.7 of [B74], part (ii).
dpow_apply {n : ℕ} (hn_fac : IsUnit ((n - 1).factorial : A)) (hnI : I ^ n = 0) {m : ℕ} {x : A} : (dividedPowers hn_fac hnI).dpow m x = if x ∈ I then inverse (m.factorial : A) * x ^ m else 0 := rfl
lemma
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_apply
null
noncomputable dividedPowers : DividedPowers I := OfInvertibleFactorial.dividedPowers (by norm_num) hI2
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers
If `I^2 = 0`, then `I` admits a divided power structure.
dpow_of_two_le {n : ℕ} (hn : 2 ≤ n) (a : A) : (dividedPowers hI2) n a = 0 := by simp only [dividedPowers, OfInvertibleFactorial.dpow_apply, ite_eq_right_iff] intro ha rw [Ideal.pow_eq_zero_of_mem hI2 hn ha, mul_zero]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_of_two_le
null
noncomputable dividedPowers : DividedPowers I := OfInvertibleFactorial.dividedPowers (n := p) (IsUnit.natCast_factorial_of_isNilpotent hp (Nat.sub_one_lt (NeZero.ne' p).symm)) hIp
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers
If `A` is a commutative ring of prime characteristic `p` and `I` is an ideal such that `I^p = 0`, then `I` admits a divided power structure.
dpow_of_prime_le {n : ℕ} (hn : p ≤ n) (a : A) : (dividedPowers hp hIp) n a = 0 := by simp only [dividedPowers, OfInvertibleFactorial.dpow_apply, ite_eq_right_iff] intro ha rw [Ideal.pow_eq_zero_of_mem hIp hn ha, mul_zero]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_of_prime_le
null
noncomputable dividedPowers : DividedPowers I := IsNilpotent.dividedPowers ((CharP.cast_eq_zero A p) ▸ IsNilpotent.zero) hIp
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers
If `A` is a commutative ring of prime characteristic `p` and `I` is an ideal such that `I^p = 0`, then `I` admits a divided power structure.
dpow_of_prime_le {n : ℕ} (hn : p ≤ n) (a : A) : (dividedPowers A p hIp) n a = 0 := by simp only [dividedPowers, IsNilpotent.dividedPowers, OfInvertibleFactorial.dpow_apply, ite_eq_right_iff] intro ha rw [Ideal.pow_eq_zero_of_mem hIp hn ha, mul_zero]
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_of_prime_le
null
noncomputable dpow : ℕ → R → R := OfInvertibleFactorial.dpow I variable {I}
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow
The family `ℕ → R → R` given by `dpow n x = x ^ n / n!`.
dpow_eq_of_mem (n : ℕ) {x : R} (hx : x ∈ I) : dpow I n x = (inverse n.factorial : R) * x ^ n := by rw [dpow, OfInvertibleFactorial.dpow_eq_of_mem hx] variable [Algebra ℚ R] variable (I)
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_eq_of_mem
null
noncomputable dividedPowers : DividedPowers I where dpow := dpow I dpow_null hx := OfInvertibleFactorial.dpow_null hx dpow_zero hx := OfInvertibleFactorial.dpow_zero hx dpow_one hx := OfInvertibleFactorial.dpow_one hx dpow_mem hn hx := OfInvertibleFactorial.dpow_mem hn hx dpow_add {n} _ _ hx hy := OfInvertibleFactorial.dpow_add_of_lt (IsUnit.natCast_factorial_of_algebra ℚ _) (n.lt_succ_self) hx hy dpow_mul hx := OfInvertibleFactorial.dpow_mul hx mul_dpow {m} k _ hx := OfInvertibleFactorial.dpow_mul_of_add_lt (IsUnit.natCast_factorial_of_algebra ℚ _) (m + k).lt_succ_self hx dpow_comp hk hx := OfInvertibleFactorial.dpow_comp_of_mul_lt (IsUnit.natCast_factorial_of_algebra ℚ _) hk (lt_add_one _) hx @[simp]
def
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers
If `I` is an ideal in a `ℚ`-algebra `A`, then `I` admits a unique divided power structure, given by `dpow n x = x ^ n / n!`.
dpow_apply {n : ℕ} {x : R} : (dividedPowers I).dpow n x = if x ∈ I then inverse (n.factorial : R) * x ^ n else 0 := rfl omit [DecidablePred fun x ↦ x ∈ I] in
lemma
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_apply
null
dpow_eq_inv_fact_smul (hI : DividedPowers I) {n : ℕ} {x : R} (hx : x ∈ I) : hI.dpow n x = (inverse (n.factorial : ℚ)) • x ^ n := by rw [inverse_eq_inv', ← factorial_mul_dpow_eq_pow hI hx, ← smul_eq_mul, ← smul_assoc] nth_rewrite 1 [← one_smul R (hI.dpow n x)] congr have aux : ((n !) : R) = (n ! : ℚ) • (1 : R) := by rw [cast_smul_eq_nsmul, nsmul_eq_mul, mul_one] rw [aux, ← mul_smul] suffices (n ! : ℚ)⁻¹ * (n !) = 1 by rw [this, one_smul] apply Rat.inv_mul_cancel rw [← cast_zero, ne_eq] simp [factorial_ne_zero] variable {I}
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dpow_eq_inv_fact_smul
If `I` is an ideal in a `ℚ`-algebra `A`, then the divided power structure on `I` given by `dpow n x = x ^ n / n!` is the only possible one.
dividedPowers_unique (hI : DividedPowers I) : hI = dividedPowers I := hI.ext _ (fun n x hx ↦ by rw [dpow_apply, if_pos hx, eq_comm, inverse_mul_eq_iff_eq_mul _ _ _ (IsUnit.natCast_factorial_of_algebra ℚ n), factorial_mul_dpow_eq_pow _ hx])
theorem
RingTheory
[ "Mathlib.Data.Nat.Factorial.NatCast", "Mathlib.RingTheory.DividedPowers.Basic" ]
Mathlib/RingTheory/DividedPowers/RatAlgebra.lean
dividedPowers_unique
There are no other divided power structures on an ideal of a `ℚ`-algebra.