ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/RingTheory/QuotientNilpotent.lean

full_name: Ideal.isRadical_iff_quotient_reduced
code: theorem Ideal.isRadical_iff_quotient_reduced {R : Type*} [CommRing R] (I : Ideal R) :
    I.IsRadical ↔ IsReduced (R ⧸ I) 
goal: I.IsRadical ↔ IsReduced (R ⧸ I)

full_name: Ideal.IsNilpotent.induction_on
code: /-- Let `P` be a property on ideals. If `P` holds for square-zero ideals, and if
  `P I → P (J ⧸ I) → P J`, then `P` holds for all nilpotent ideals. -/
theorem Ideal.IsNilpotent.induction_on (hI : IsNilpotent I)
    {P : ∀ ⦃S : Type _⦄ [CommRing S], Ideal S → Prop}
    (h₁ : ∀ ⦃S : Type _⦄ [CommRing S], ∀ I : Ideal S, I ^ 2 = ⊥ → P I)
    (h₂ : ∀ ⦃S : Type _⦄ [CommRing S], ∀ I J : Ideal S, I ≤ J → P I →
      P (J.map (Ideal.Quotient.mk I)) → P J) :
    P I 
goal: P I

full_name: IsNilpotent.isUnit_quotient_mk_iff
code: theorem IsNilpotent.isUnit_quotient_mk_iff {R : Type*} [CommRing R] {I : Ideal R}
    (hI : IsNilpotent I) {x : R} : IsUnit (Ideal.Quotient.mk I x) ↔ IsUnit x 
goal: IsUnit ((Ideal.Quotient.mk I) x) ↔ IsUnit x
File: Mathlib/RingTheory/RootsOfUnity/Lemmas.lean

full_name: IsPrimitiveRoot.prod_one_sub_pow_eq_order
code: /-- If `μ` is a primitive `n`th root of unity in `R`, then `∏(1≤k<n) (1-μ^k) = n`.
(Stated with `n+1` in place of `n` to avoid the condition `n ≠ 0`.) -/
lemma prod_one_sub_pow_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :
    ∏ k ∈ range n, (1 - μ ^ (k + 1)) = n + 1 
goal: ∏ k ∈ Finset.range n, (1 - μ ^ (k + 1)) = ↑n + 1

full_name: IsPrimitiveRoot.prod_pow_sub_one_eq_order
code: /-- If `μ` is a primitive `n`th root of unity in `R`, then `(-1)^(n-1) * ∏(1≤k<n) (μ^k-1) = n`.
(Stated with `n+1` in place of `n` to avoid the condition `n ≠ 0`.) -/
lemma prod_pow_sub_one_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :
    (-1) ^ n * ∏ k ∈ range n, (μ ^ (k + 1) - 1) = n + 1 
goal: (-1) ^ n * ∏ k ∈ Finset.range n, (μ ^ (k + 1) - 1) = ↑n + 1

full_name: IsPrimitiveRoot.self_sub_one_pow_dvd_order
code: /-- If `μ` is a primitive `n`th root of unity in `R` and `k < n`, then `n` is divisible
by `(μ-1)^k` in `ℤ[μ] ⊆ R`. -/
lemma self_sub_one_pow_dvd_order {k n : ℕ} (hn : k < n) {μ : R} (hμ : IsPrimitiveRoot μ n) :
    ∃ z ∈ adjoin ℤ {μ}, n = z * (μ - 1) ^ k 
goal: ∃ z ∈ Algebra.adjoin ℤ {μ}, ↑n = z * (μ - 1) ^ k
File: Mathlib/RingTheory/RootsOfUnity/Complex.lean

full_name: Complex.isPrimitiveRoot_exp_of_coprime
code: theorem isPrimitiveRoot_exp_of_coprime (i n : ℕ) (h0 : n ≠ 0) (hi : i.Coprime n) :
    IsPrimitiveRoot (exp (2 * π * I * (i / n))) n 
goal: IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I * (↑i / ↑n))) n

full_name: Complex.isPrimitiveRoot_exp
code: theorem isPrimitiveRoot_exp (n : ℕ) (h0 : n ≠ 0) : IsPrimitiveRoot (exp (2 * π * I / n)) n 
goal: IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) n

full_name: Complex.isPrimitiveRoot_iff
code: theorem isPrimitiveRoot_iff (ζ : ℂ) (n : ℕ) (hn : n ≠ 0) :
    IsPrimitiveRoot ζ n ↔ ∃ i < (n : ℕ), ∃ _ : i.Coprime n, exp (2 * π * I * (i / n)) = ζ 
goal: IsPrimitiveRoot ζ n ↔ ∃ i < n, ∃ (_ : i.Coprime n), Complex.exp (2 * ↑Real.pi * Complex.I * (↑i / ↑n)) = ζ

full_name: Complex.mem_rootsOfUnity
code: /-- The complex `n`-th roots of unity are exactly the
complex numbers of the form `exp (2 * Real.pi * Complex.I * (i / n))` for some `i < n`. -/
nonrec theorem mem_rootsOfUnity (n : ℕ+) (x : Units ℂ) :
    x ∈ rootsOfUnity n ℂ ↔ ∃ i < (n : ℕ), exp (2 * π * I * (i / n)) = x 
goal: x ∈ rootsOfUnity n ℂ ↔ ∃ i < ↑n, Complex.exp (2 * ↑Real.pi * Complex.I * (↑i / ↑↑n)) = ↑x

full_name: Complex.card_rootsOfUnity
code: theorem card_rootsOfUnity (n : ℕ+) : Fintype.card (rootsOfUnity n ℂ) = n 
goal: Fintype.card ↥(rootsOfUnity n ℂ) = ↑n

full_name: Complex.card_primitiveRoots
code: theorem card_primitiveRoots (k : ℕ) : (primitiveRoots k ℂ).card = φ k 
goal: (primitiveRoots k ℂ).card = k.totient

full_name: IsPrimitiveRoot.norm'_eq_one
code: theorem IsPrimitiveRoot.norm'_eq_one {ζ : ℂ} {n : ℕ} (h : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ‖ζ‖ = 1 
goal: ‖ζ‖ = 1

full_name: IsPrimitiveRoot.nnnorm_eq_one
code: theorem IsPrimitiveRoot.nnnorm_eq_one {ζ : ℂ} {n : ℕ} (h : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ‖ζ‖₊ = 1 
goal: ‖ζ‖₊ = 1

full_name: IsPrimitiveRoot.arg_ext
code: theorem IsPrimitiveRoot.arg_ext {n m : ℕ} {ζ μ : ℂ} (hζ : IsPrimitiveRoot ζ n)
    (hμ : IsPrimitiveRoot μ m) (hn : n ≠ 0) (hm : m ≠ 0) (h : ζ.arg = μ.arg) : ζ = μ 
goal: ζ = μ

full_name: IsPrimitiveRoot.arg_eq_zero_iff
code: theorem IsPrimitiveRoot.arg_eq_zero_iff {n : ℕ} {ζ : ℂ} (hζ : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ζ.arg = 0 ↔ ζ = 1 
goal: ζ.arg = 0 ↔ ζ = 1

full_name: IsPrimitiveRoot.arg_eq_pi_iff
code: theorem IsPrimitiveRoot.arg_eq_pi_iff {n : ℕ} {ζ : ℂ} (hζ : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ζ.arg = Real.pi ↔ ζ = -1 
goal: ζ.arg = Real.pi ↔ ζ = -1

full_name: IsPrimitiveRoot.arg
code: theorem IsPrimitiveRoot.arg {n : ℕ} {ζ : ℂ} (h : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ∃ i : ℤ, ζ.arg = i / n * (2 * Real.pi) ∧ IsCoprime i n ∧ i.natAbs < n 
goal: ∃ i, ζ.arg = ↑i / ↑n * (2 * Real.pi) ∧ IsCoprime i ↑n ∧ i.natAbs < n

full_name: Complex.norm_eq_one_of_mem_rootsOfUnity
code: lemma Complex.norm_eq_one_of_mem_rootsOfUnity {ζ : ℂˣ} {n : ℕ+} (hζ : ζ ∈ rootsOfUnity n ℂ) :
    ‖(ζ : ℂ)‖ = 1 
goal: ‖↑ζ‖ = 1
File: Mathlib/RingTheory/Adjoin/Tower.lean

full_name: Algebra.adjoin_restrictScalars
code: theorem adjoin_restrictScalars (C D E : Type*) [CommSemiring C] [CommSemiring D] [CommSemiring E]
    [Algebra C D] [Algebra C E] [Algebra D E] [IsScalarTower C D E] (S : Set E) :
    (Algebra.adjoin D S).restrictScalars C =
      (Algebra.adjoin ((⊤ : Subalgebra C D).map (IsScalarTower.toAlgHom C D E)) S).restrictScalars
        C 
goal: Subalgebra.restrictScalars C (Algebra.adjoin D S) =
  Subalgebra.restrictScalars C (Algebra.adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)

full_name: Algebra.adjoin_res_eq_adjoin_res
code: theorem adjoin_res_eq_adjoin_res (C D E F : Type*) [CommSemiring C] [CommSemiring D]
    [CommSemiring E] [CommSemiring F] [Algebra C D] [Algebra C E] [Algebra C F] [Algebra D F]
    [Algebra E F] [IsScalarTower C D F] [IsScalarTower C E F] {S : Set D} {T : Set E}
    (hS : Algebra.adjoin C S = ⊤) (hT : Algebra.adjoin C T = ⊤) :
    (Algebra.adjoin E (algebraMap D F '' S)).restrictScalars C =
      (Algebra.adjoin D (algebraMap E F '' T)).restrictScalars C 
goal: Subalgebra.restrictScalars C (Algebra.adjoin E (⇑(algebraMap D F) '' S)) =
  Subalgebra.restrictScalars C (Algebra.adjoin D (⇑(algebraMap E F) '' T))

full_name: Algebra.fg_trans'
code: theorem Algebra.fg_trans' {R S A : Type*} [CommSemiring R] [CommSemiring S] [Semiring A]
    [Algebra R S] [Algebra S A] [Algebra R A] [IsScalarTower R S A] (hRS : (⊤ : Subalgebra R S).FG)
    (hSA : (⊤ : Subalgebra S A).FG) : (⊤ : Subalgebra R A).FG 
goal: ⊤.FG

full_name: exists_subalgebra_of_fg
code: theorem exists_subalgebra_of_fg (hAC : (⊤ : Subalgebra A C).FG) (hBC : (⊤ : Submodule B C).FG) :
    ∃ B₀ : Subalgebra A B, B₀.FG ∧ (⊤ : Submodule B₀ C).FG 
goal: ∃ B₀, B₀.FG ∧ ⊤.FG

full_name: fg_of_fg_of_fg
code: /-- **Artin--Tate lemma**: if A ⊆ B ⊆ C is a chain of subrings of commutative rings, and
A is noetherian, and C is algebra-finite over A, and C is module-finite over B,
then B is algebra-finite over A.

References: Atiyah--Macdonald Proposition 7.8; Stacks 00IS; Altman--Kleiman 16.17. -/
theorem fg_of_fg_of_fg [IsNoetherianRing A] (hAC : (⊤ : Subalgebra A C).FG)
    (hBC : (⊤ : Submodule B C).FG) (hBCi : Function.Injective (algebraMap B C)) :
    (⊤ : Subalgebra A B).FG 
goal: ⊤.FG
File: Mathlib/RingTheory/Adjoin/Field.lean

full_name: AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly
code: /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Algebra F R] (x : R) :
    Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) 
goal: ↥(Algebra.adjoin F {x}) ≃ₐ[F] AdjoinRoot (minpoly F x)

full_name: Algebra.adjoin.liftSingleton
code: /-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to
a root of `x`'s minimal polynomial in `T`. -/
noncomputable def Algebra.adjoin.liftSingleton {S T : Type*}
    [CommRing S] [CommRing T] [Algebra F S] [Algebra F T]
    (x : S) (y : T) (h : aeval y (minpoly F x) = 0) :
    Algebra.adjoin F {x} →ₐ[F] T 
goal: ↥(Algebra.adjoin F {x}) →ₐ[F] T

full_name: Polynomial.lift_of_splits
code: /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
theorem Polynomial.lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K]
    [Algebra F L] (s : Finset K) : (∀ x ∈ s, IsIntegral F x ∧
      Splits (algebraMap F L) (minpoly F x)) → Nonempty (Algebra.adjoin F (s : Set K) →ₐ[F] L) 
goal: (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) → Nonempty (↥(Algebra.adjoin F ↑s) →ₐ[F] L)

full_name: IsIntegral.mem_range_algHom_of_minpoly_splits
code: theorem IsIntegral.mem_range_algHom_of_minpoly_splits (f : K →ₐ[R] L) : x ∈ f.range 
goal: x ∈ f.range

full_name: IsIntegral.mem_range_algebraMap_of_minpoly_splits
code: theorem IsIntegral.mem_range_algebraMap_of_minpoly_splits [Algebra K L] [IsScalarTower R K L] :
    x ∈ (algebraMap K L).range 
goal: x ∈ (algebraMap K L).range

full_name: IsIntegral.minpoly_splits_tower_top'
code: theorem IsIntegral.minpoly_splits_tower_top' {f : K →+* L}
    (h : Splits (f.comp <| algebraMap R K) (minpoly R x)) :
    Splits f (minpoly K x) 
goal: Polynomial.Splits f (minpoly K x)

full_name: IsIntegral.minpoly_splits_tower_top
code: theorem IsIntegral.minpoly_splits_tower_top [Algebra K L] [IsScalarTower R K L]
    (h : Splits (algebraMap R L) (minpoly R x)) :
    Splits (algebraMap K L) (minpoly K x) 
goal: Polynomial.Splits (algebraMap K L) (minpoly K x)

full_name: Subalgebra.adjoin_rank_le
code: /-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F`,
then `[E[L] : E] ≤ [L : F]`. -/
lemma Subalgebra.adjoin_rank_le {F : Type*} (E : Type*) {K : Type*}
    [CommRing F] [StrongRankCondition F] [CommRing E] [StrongRankCondition E] [Ring K]
    [SMul F E] [Algebra E K] [Algebra F K] [IsScalarTower F E K]
    (L : Subalgebra F K) [Module.Free F L] :
    Module.rank E (Algebra.adjoin E (L : Set K)) ≤ Module.rank F L 
goal: Module.rank E ↥(Algebra.adjoin E ↑L) ≤ Module.rank F ↥L
File: Mathlib/RingTheory/Adjoin/FG.lean

full_name: Algebra.fg_trans
code: theorem fg_trans (h1 : (adjoin R s).toSubmodule.FG) (h2 : (adjoin (adjoin R s) t).toSubmodule.FG) :
    (adjoin R (s ∪ t)).toSubmodule.FG 
goal: (Subalgebra.toSubmodule (Algebra.adjoin R (s ∪ t))).FG

full_name: Subalgebra.FG
code: /-- A subalgebra `S` is finitely generated if there exists `t : Finset A` such that
`Algebra.adjoin R t = S`. -/
def FG (S : Subalgebra R A) : Prop 
goal: Prop

full_name: Subalgebra.fg_adjoin_finset
code: theorem fg_adjoin_finset (s : Finset A) : (Algebra.adjoin R (↑s : Set A)).FG 
goal: (Algebra.adjoin R ↑s).FG

full_name: Subalgebra.fg_def
code: theorem fg_def {S : Subalgebra R A} : S.FG ↔ ∃ t : Set A, Set.Finite t ∧ Algebra.adjoin R t = S 
goal: S.FG ↔ ∃ t, t.Finite ∧ Algebra.adjoin R t = S

full_name: Subalgebra.fg_bot
code: theorem fg_bot : (⊥ : Subalgebra R A).FG 
goal: ⊥.FG

full_name: Subalgebra.fg_of_fg_toSubmodule
code: theorem fg_of_fg_toSubmodule {S : Subalgebra R A} : S.toSubmodule.FG → S.FG 
goal: (Subalgebra.toSubmodule S).FG → S.FG

full_name: Subalgebra.fg_of_noetherian
code: theorem fg_of_noetherian [IsNoetherian R A] (S : Subalgebra R A) : S.FG 
goal: S.FG

full_name: Subalgebra.fg_of_submodule_fg
code: theorem fg_of_submodule_fg (h : (⊤ : Submodule R A).FG) : (⊤ : Subalgebra R A).FG 
goal: ⊤.FG

full_name: Subalgebra.FG.prod
code: theorem FG.prod {S : Subalgebra R A} {T : Subalgebra R B} (hS : S.FG) (hT : T.FG) :
    (S.prod T).FG 
goal: (S.prod T).FG

full_name: Subalgebra.FG.map
code: theorem FG.map {S : Subalgebra R A} (f : A →ₐ[R] B) (hs : S.FG) : (S.map f).FG 
goal: (Subalgebra.map f S).FG

full_name: Subalgebra.fg_of_fg_map
code: theorem fg_of_fg_map (S : Subalgebra R A) (f : A →ₐ[R] B) (hf : Function.Injective f)
    (hs : (S.map f).FG) : S.FG 
goal: S.FG

full_name: Subalgebra.fg_top
code: theorem fg_top (S : Subalgebra R A) : (⊤ : Subalgebra R S).FG ↔ S.FG 
goal: ⊤.FG ↔ S.FG

full_name: Subalgebra.induction_on_adjoin
code: theorem induction_on_adjoin [IsNoetherian R A] (P : Subalgebra R A → Prop) (base : P ⊥)
    (ih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x S)))
    (S : Subalgebra R A) : P S 
goal: P S

full_name: AlgHom.isNoetherianRing_range
code: /-- The image of a Noetherian R-algebra under an R-algebra map is a Noetherian ring. -/
instance AlgHom.isNoetherianRing_range (f : A →ₐ[R] B) [IsNoetherianRing A] :
    IsNoetherianRing f.range 
goal: IsNoetherianRing ↥f.range

full_name: isNoetherianRing_of_fg
code: theorem isNoetherianRing_of_fg {S : Subalgebra R A} (HS : S.FG) [IsNoetherianRing R] :
    IsNoetherianRing S 
goal: IsNoetherianRing ↥S

full_name: is_noetherian_subring_closure
code: theorem is_noetherian_subring_closure (s : Set R) (hs : s.Finite) :
    IsNoetherianRing (Subring.closure s) 
goal: IsNoetherianRing ↥(Subring.closure s)
File: Mathlib/RingTheory/DedekindDomain/SInteger.lean

full_name: Set.integer
code: /-- The `R`-subalgebra of `S`-integers of `K`. -/
@[simps!]
def integer : Subalgebra R K 
goal: Subalgebra R K

full_name: Set.integer_carrier
code: /-- The `R`-subalgebra of `S`-integers of `K`. -/
@[simps!]
def integer : Subalgebra R K 
goal: ↑(S.integer K) = {x | ∀ v ∉ S, v.valuation x ≤ 1}

full_name: Set.integer_eq
code: theorem integer_eq :
    (S.integer K).toSubring =
      ⨅ (v) (_ : v ∉ S), (v : HeightOneSpectrum R).valuation.valuationSubring.toSubring 
goal: (S.integer K).toSubring = ⨅ v, ⨅ (_ : v ∉ S), v.valuation.valuationSubring.toSubring

full_name: Set.integer_valuation_le_one
code: theorem integer_valuation_le_one (x : S.integer K) {v : HeightOneSpectrum R} (hv : v ∉ S) :
    v.valuation (x : K) ≤ 1 
goal: v.valuation ↑x ≤ 1

full_name: Set.unit_coe
code: /-- The subgroup of `S`-units of `Kˣ`. -/
@[simps!]
def unit : Subgroup Kˣ 
goal: ↑(S.unit K) = {x | ∀ v ∉ S, v.valuation ↑x = 1}

full_name: Set.unit
code: /-- The subgroup of `S`-units of `Kˣ`. -/
@[simps!]
def unit : Subgroup Kˣ 
goal: Subgroup Kˣ

full_name: Set.unit_eq
code: theorem unit_eq :
    S.unit K = ⨅ (v) (_ : v ∉ S), (v : HeightOneSpectrum R).valuation.valuationSubring.unitGroup 
goal: S.unit K = ⨅ v, ⨅ (_ : v ∉ S), v.valuation.valuationSubring.unitGroup

full_name: Set.unit_valuation_eq_one
code: theorem unit_valuation_eq_one (x : S.unit K) {v : HeightOneSpectrum R} (hv : v ∉ S) :
    v.valuation ((x : Kˣ) : K) = 1 
goal: v.valuation ↑↑x = 1

full_name: Set.val_unitEquivUnitsInteger_apply_coe
code: /-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ 
goal: ↑↑((S.unitEquivUnitsInteger K) x) = ↑↑x

full_name: Set.unitEquivUnitsInteger_symm_apply_coe
code: /-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ 
goal: ↑((S.unitEquivUnitsInteger K).symm x) = Units.mk0 ↑↑x ⋯

full_name: Set.unitEquivUnitsInteger
code: /-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ 
goal: ↥(S.unit K) ≃* (↥(S.integer K))ˣ
File: Mathlib/RingTheory/Derivation/Lie.lean

full_name: Derivation.instBracket
code: /-- The commutator of derivations is again a derivation. -/
instance : Bracket (Derivation R A A) (Derivation R A A) 
goal: Bracket (Derivation R A A) (Derivation R A A)

full_name: Derivation.commutator_coe_linear_map
code: @[simp]
theorem commutator_coe_linear_map : ↑⁅D1, D2⁆ = ⁅(D1 : Module.End R A), (D2 : Module.End R A)⁆ 
goal: ↑⁅D1, D2⁆ = ⁅↑D1, ↑D2⁆

full_name: Derivation.commutator_apply
code: theorem commutator_apply : ⁅D1, D2⁆ a = D1 (D2 a) - D2 (D1 a) 
goal: ⁅D1, D2⁆ a = D1 (D2 a) - D2 (D1 a)

full_name: Derivation.instLieRing
code: instance : LieRing (Derivation R A A) 
goal: LieRing (Derivation R A A)

full_name: Derivation.instLieAlgebra
code: instance instLieAlgebra : LieAlgebra R (Derivation R A A) 
goal: LieAlgebra R (Derivation R A A)
File: Mathlib/RingTheory/DedekindDomain/PID.lean

full_name: Ideal.eq_span_singleton_of_mem_of_not_mem_sq_of_not_mem_prime_ne
code: /-- Let `P` be a prime ideal, `x ∈ P \ P²` and `x ∉ Q` for all prime ideals `Q ≠ P`.
Then `P` is generated by `x`. -/
theorem Ideal.eq_span_singleton_of_mem_of_not_mem_sq_of_not_mem_prime_ne {P : Ideal R}
    (hP : P.IsPrime) [IsDedekindDomain R] {x : R} (x_mem : x ∈ P) (hxP2 : x ∉ P ^ 2)
    (hxQ : ∀ Q : Ideal R, IsPrime Q → Q ≠ P → x ∉ Q) : P = Ideal.span {x} 
goal: P = Ideal.span {x}

full_name: FractionalIdeal.isPrincipal_of_unit_of_comap_mul_span_singleton_eq_top
code: theorem FractionalIdeal.isPrincipal_of_unit_of_comap_mul_span_singleton_eq_top {R A : Type*}
    [CommRing R] [CommRing A] [Algebra R A] {S : Submonoid R} [IsLocalization S A]
    (I : (FractionalIdeal S A)ˣ) {v : A} (hv : v ∈ (↑I⁻¹ : FractionalIdeal S A))
    (h : Submodule.comap (Algebra.linearMap R A) ((I : Submodule R A) * Submodule.span R {v}) = ⊤) :
    Submodule.IsPrincipal (I : Submodule R A) 
goal: (↑↑I).IsPrincipal

full_name: FractionalIdeal.isPrincipal.of_finite_maximals_of_inv
code: /--
An invertible fractional ideal of a commutative ring with finitely many maximal ideals is principal.

https://math.stackexchange.com/a/95857 -/
theorem FractionalIdeal.isPrincipal.of_finite_maximals_of_inv {A : Type*} [CommRing A]
    [Algebra R A] {S : Submonoid R} [IsLocalization S A] (hS : S ≤ R⁰)
    (hf : {I : Ideal R | I.IsMaximal}.Finite) (I I' : FractionalIdeal S A) (hinv : I * I' = 1) :
    Submodule.IsPrincipal (I : Submodule R A) 
goal: (↑I).IsPrincipal

full_name: Ideal.IsPrincipal.of_finite_maximals_of_isUnit
code: /-- An invertible ideal in a commutative ring with finitely many maximal ideals is principal.

https://math.stackexchange.com/a/95857 -/
theorem Ideal.IsPrincipal.of_finite_maximals_of_isUnit (hf : {I : Ideal R | I.IsMaximal}.Finite)
    {I : Ideal R} (hI : IsUnit (I : FractionalIdeal R⁰ (FractionRing R))) : I.IsPrincipal 
goal: Submodule.IsPrincipal I

full_name: IsPrincipalIdealRing.of_finite_primes
code: /-- A Dedekind domain is a PID if its set of primes is finite. -/
theorem IsPrincipalIdealRing.of_finite_primes [IsDedekindDomain R]
    (h : {I : Ideal R | I.IsPrime}.Finite) : IsPrincipalIdealRing R 
goal: IsPrincipalIdealRing R

full_name: IsLocalization.OverPrime.mem_normalizedFactors_of_isPrime
code: /-- If `p` is a prime in the Dedekind domain `R`, `S` an extension of `R` and `Sₚ` the localization
of `S` at `p`, then all primes in `Sₚ` are factors of the image of `p` in `Sₚ`. -/
theorem IsLocalization.OverPrime.mem_normalizedFactors_of_isPrime [IsDomain S]
    {P : Ideal Sₚ} (hP : IsPrime P) (hP0 : P ≠ ⊥) :
    P ∈ normalizedFactors (Ideal.map (algebraMap R Sₚ) p) 
goal: P ∈ UniqueFactorizationMonoid.normalizedFactors (Ideal.map (algebraMap R Sₚ) p)

full_name: IsDedekindDomain.isPrincipalIdealRing_localization_over_prime
code: /-- Let `p` be a prime in the Dedekind domain `R` and `S` be an integral extension of `R`,
then the localization `Sₚ` of `S` at `p` is a PID. -/
theorem IsDedekindDomain.isPrincipalIdealRing_localization_over_prime [IsDomain S] :
    IsPrincipalIdealRing Sₚ 
goal: IsPrincipalIdealRing Sₚ
File: Mathlib/RingTheory/HahnSeries/Valuation.lean

full_name: HahnSeries.addVal
code: /-- The additive valuation on `HahnSeries Γ R`, returning the smallest index at which
  a Hahn Series has a nonzero coefficient, or `⊤` for the 0 series.  -/
def addVal : AddValuation (HahnSeries Γ R) (WithTop Γ) 
goal: AddValuation (HahnSeries Γ R) (WithTop Γ)

full_name: HahnSeries.addVal_apply
code: theorem addVal_apply {x : HahnSeries Γ R} :
    addVal Γ R x = x.orderTop 
goal: (HahnSeries.addVal Γ R) x = x.orderTop

full_name: HahnSeries.addVal_apply_of_ne
code: @[simp]
theorem addVal_apply_of_ne {x : HahnSeries Γ R} (hx : x ≠ 0) : addVal Γ R x = x.order 
goal: (HahnSeries.addVal Γ R) x = ↑x.order

full_name: HahnSeries.addVal_le_of_coeff_ne_zero
code: theorem addVal_le_of_coeff_ne_zero {x : HahnSeries Γ R} {g : Γ} (h : x.coeff g ≠ 0) :
    addVal Γ R x ≤ g 
goal: (HahnSeries.addVal Γ R) x ≤ ↑g
File: Mathlib/RingTheory/Bezout.lean

full_name: IsBezout.iff_span_pair_isPrincipal
code: theorem iff_span_pair_isPrincipal :
    IsBezout R ↔ ∀ x y : R, (Ideal.span {x, y} : Ideal R).IsPrincipal 
goal: IsBezout R ↔ ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})

full_name: Function.Surjective.isBezout
code: theorem _root_.Function.Surjective.isBezout {S : Type v} [CommRing S] (f : R →+* S)
    (hf : Function.Surjective f) [IsBezout R] : IsBezout S 
goal: IsBezout S

full_name: IsBezout.TFAE
code: theorem TFAE [IsBezout R] [IsDomain R] :
    List.TFAE
    [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R] 
goal: [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R].TFAE