File: Mathlib/RingTheory/ClassGroup.lean

full_name: definition._@.Mathlib.RingTheory.ClassGroup._hyg.182
code: /-- `toPrincipalIdeal R K x` sends `x ≠ 0 : K` to the fractional `R`-ideal generated by `x` -/
irreducible_def toPrincipalIdeal : Kˣ →* (FractionalIdeal R⁰ K)ˣ 
goal: Kˣ →* (FractionalIdeal R⁰ K)ˣ

full_name: toPrincipalIdeal_def
code: /-- `toPrincipalIdeal R K x` sends `x ≠ 0 : K` to the fractional `R`-ideal generated by `x` -/
irreducible_def toPrincipalIdeal : Kˣ →* (FractionalIdeal R⁰ K)ˣ 
goal: toPrincipalIdeal R K =
  {
    toFun := fun x =>
      { val := FractionalIdeal.spanSingleton R⁰ ↑x, inv := FractionalIdeal.spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯,
        inv_val := ⋯ },
    map_one' := ⋯, map_mul' := ⋯ }

full_name: wrapped._@.Mathlib.RingTheory.ClassGroup._hyg.182
code: /-- `toPrincipalIdeal R K x` sends `x ≠ 0 : K` to the fractional `R`-ideal generated by `x` -/
irreducible_def toPrincipalIdeal : Kˣ →* (FractionalIdeal R⁰ K)ˣ 
goal: Subtype (Eq definition✝)

full_name: toPrincipalIdeal
code: /-- `toPrincipalIdeal R K x` sends `x ≠ 0 : K` to the fractional `R`-ideal generated by `x` -/
irreducible_def toPrincipalIdeal : Kˣ →* (FractionalIdeal R⁰ K)ˣ 
goal: Kˣ →* (FractionalIdeal R⁰ K)ˣ

full_name: coe_toPrincipalIdeal
code: @[simp]
theorem coe_toPrincipalIdeal (x : Kˣ) :
    (toPrincipalIdeal R K x : FractionalIdeal R⁰ K) = spanSingleton _ (x : K) 
goal: ↑((toPrincipalIdeal R K) x) = FractionalIdeal.spanSingleton R⁰ ↑x

full_name: toPrincipalIdeal_eq_iff
code: @[simp]
theorem toPrincipalIdeal_eq_iff {I : (FractionalIdeal R⁰ K)ˣ} {x : Kˣ} :
    toPrincipalIdeal R K x = I ↔ spanSingleton R⁰ (x : K) = I 
goal: (toPrincipalIdeal R K) x = I ↔ FractionalIdeal.spanSingleton R⁰ ↑x = ↑I

full_name: mem_principal_ideals_iff
code: theorem mem_principal_ideals_iff {I : (FractionalIdeal R⁰ K)ˣ} :
    I ∈ (toPrincipalIdeal R K).range ↔ ∃ x : K, spanSingleton R⁰ x = I 
goal: I ∈ (toPrincipalIdeal R K).range ↔ ∃ x, FractionalIdeal.spanSingleton R⁰ x = ↑I

full_name: PrincipalIdeals.normal
code: instance PrincipalIdeals.normal : (toPrincipalIdeal R K).range.Normal 
goal: (toPrincipalIdeal R K).range.Normal

full_name: ClassGroup
code: /-- The ideal class group of `R` is the group of invertible fractional ideals
modulo the principal ideals. -/
def ClassGroup 
goal: Type u_1

full_name: instCommGroupClassGroup
code: noncomputable instance : CommGroup (ClassGroup R) 
goal: CommGroup (ClassGroup R)

full_name: instInhabitedClassGroup
code: noncomputable instance : Inhabited (ClassGroup R) 
goal: Inhabited (ClassGroup R)

full_name: ClassGroup.mk
code: /-- Send a nonzero fractional ideal to the corresponding class in the class group. -/
noncomputable def ClassGroup.mk : (FractionalIdeal R⁰ K)ˣ →* ClassGroup R 
goal: (FractionalIdeal R⁰ K)ˣ →* ClassGroup R

full_name: ClassGroup.Quot_mk_eq_mk
code: theorem ClassGroup.Quot_mk_eq_mk (I : (FractionalIdeal R⁰ (FractionRing R))ˣ) :
    Quot.mk _ I = ClassGroup.mk I 
goal: Quot.mk Setoid.r I = ClassGroup.mk I

full_name: ClassGroup.mk_eq_mk
code: theorem ClassGroup.mk_eq_mk {I J : (FractionalIdeal R⁰ <| FractionRing R)ˣ} :
    ClassGroup.mk I = ClassGroup.mk J ↔
      ∃ x : (FractionRing R)ˣ, I * toPrincipalIdeal R (FractionRing R) x = J 
goal: ClassGroup.mk I = ClassGroup.mk J ↔ ∃ x, I * (toPrincipalIdeal R (FractionRing R)) x = J

full_name: ClassGroup.mk_eq_mk_of_coe_ideal
code: theorem ClassGroup.mk_eq_mk_of_coe_ideal {I J : (FractionalIdeal R⁰ <| FractionRing R)ˣ}
    {I' J' : Ideal R} (hI : (I : FractionalIdeal R⁰ <| FractionRing R) = I')
    (hJ : (J : FractionalIdeal R⁰ <| FractionRing R) = J') :
    ClassGroup.mk I = ClassGroup.mk J ↔
      ∃ x y : R, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J' 
goal: ClassGroup.mk I = ClassGroup.mk J ↔ ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'

full_name: ClassGroup.mk_eq_one_of_coe_ideal
code: theorem ClassGroup.mk_eq_one_of_coe_ideal {I : (FractionalIdeal R⁰ <| FractionRing R)ˣ}
    {I' : Ideal R} (hI : (I : FractionalIdeal R⁰ <| FractionRing R) = I') :
    ClassGroup.mk I = 1 ↔ ∃ x : R, x ≠ 0 ∧ I' = Ideal.span {x} 
goal: ClassGroup.mk I = 1 ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}

full_name: ClassGroup.induction
code: /-- Induction principle for the class group: to show something holds for all `x : ClassGroup R`,
we can choose a fraction field `K` and show it holds for the equivalence class of each
`I : FractionalIdeal R⁰ K`. -/
@[elab_as_elim]
theorem ClassGroup.induction {P : ClassGroup R → Prop}
    (h : ∀ I : (FractionalIdeal R⁰ K)ˣ, P (ClassGroup.mk I)) (x : ClassGroup R) : P x 
goal: P x

full_name: ClassGroup.equiv
code: /-- The definition of the class group does not depend on the choice of field of fractions. -/
noncomputable def ClassGroup.equiv :
    ClassGroup R ≃* (FractionalIdeal R⁰ K)ˣ ⧸ (toPrincipalIdeal R K).range 
goal: ClassGroup R ≃* (FractionalIdeal R⁰ K)ˣ ⧸ (toPrincipalIdeal R K).range

full_name: ClassGroup.equiv_mk
code: @[simp]
theorem ClassGroup.equiv_mk (K' : Type*) [Field K'] [Algebra R K'] [IsFractionRing R K']
    (I : (FractionalIdeal R⁰ K)ˣ) :
    ClassGroup.equiv K' (ClassGroup.mk I) =
      QuotientGroup.mk' _ (Units.mapEquiv (↑(FractionalIdeal.canonicalEquiv R⁰ K K')) I) 
goal: (ClassGroup.equiv K') (ClassGroup.mk I) =
  (QuotientGroup.mk' (toPrincipalIdeal R K').range) ((Units.mapEquiv ↑(FractionalIdeal.canonicalEquiv R⁰ K K')) I)

full_name: ClassGroup.mk_canonicalEquiv
code: @[simp]
theorem ClassGroup.mk_canonicalEquiv (K' : Type*) [Field K'] [Algebra R K'] [IsFractionRing R K']
    (I : (FractionalIdeal R⁰ K)ˣ) :
    ClassGroup.mk (Units.map (↑(canonicalEquiv R⁰ K K')) I : (FractionalIdeal R⁰ K')ˣ) =
      ClassGroup.mk I 
goal: ClassGroup.mk ((Units.map ↑(FractionalIdeal.canonicalEquiv R⁰ K K')) I) = ClassGroup.mk I

full_name: FractionalIdeal.mk0
code: /-- Send a nonzero integral ideal to an invertible fractional ideal. -/
noncomputable def FractionalIdeal.mk0 [IsDedekindDomain R] :
    (Ideal R)⁰ →* (FractionalIdeal R⁰ K)ˣ 
goal: ↥(Ideal R)⁰ →* (FractionalIdeal R⁰ K)ˣ

full_name: FractionalIdeal.coe_mk0
code: @[simp]
theorem FractionalIdeal.coe_mk0 [IsDedekindDomain R] (I : (Ideal R)⁰) :
    (FractionalIdeal.mk0 K I : FractionalIdeal R⁰ K) = I 
goal: ↑((FractionalIdeal.mk0 K) I) = ↑↑I

full_name: FractionalIdeal.canonicalEquiv_mk0
code: theorem FractionalIdeal.canonicalEquiv_mk0 [IsDedekindDomain R] (K' : Type*) [Field K']
    [Algebra R K'] [IsFractionRing R K'] (I : (Ideal R)⁰) :
    FractionalIdeal.canonicalEquiv R⁰ K K' (FractionalIdeal.mk0 K I) =
    FractionalIdeal.mk0 K' I 
goal: (FractionalIdeal.canonicalEquiv R⁰ K K') ↑((FractionalIdeal.mk0 K) I) = ↑((FractionalIdeal.mk0 K') I)

full_name: FractionalIdeal.map_canonicalEquiv_mk0
code: @[simp]
theorem FractionalIdeal.map_canonicalEquiv_mk0 [IsDedekindDomain R] (K' : Type*) [Field K']
    [Algebra R K'] [IsFractionRing R K'] (I : (Ideal R)⁰) :
    Units.map (↑(FractionalIdeal.canonicalEquiv R⁰ K K')) (FractionalIdeal.mk0 K I) =
      FractionalIdeal.mk0 K' I 
goal: (Units.map ↑(FractionalIdeal.canonicalEquiv R⁰ K K')) ((FractionalIdeal.mk0 K) I) = (FractionalIdeal.mk0 K') I

full_name: ClassGroup.mk0
code: /-- Send a nonzero ideal to the corresponding class in the class group. -/
noncomputable def ClassGroup.mk0 [IsDedekindDomain R] : (Ideal R)⁰ →* ClassGroup R 
goal: ↥(Ideal R)⁰ →* ClassGroup R

full_name: ClassGroup.mk_mk0
code: @[simp]
theorem ClassGroup.mk_mk0 [IsDedekindDomain R] (I : (Ideal R)⁰) :
    ClassGroup.mk (FractionalIdeal.mk0 K I) = ClassGroup.mk0 I 
goal: ClassGroup.mk ((FractionalIdeal.mk0 K) I) = ClassGroup.mk0 I

full_name: ClassGroup.equiv_mk0
code: @[simp]
theorem ClassGroup.equiv_mk0 [IsDedekindDomain R] (I : (Ideal R)⁰) :
    ClassGroup.equiv K (ClassGroup.mk0 I) =
      QuotientGroup.mk' (toPrincipalIdeal R K).range (FractionalIdeal.mk0 K I) 
goal: (ClassGroup.equiv K) (ClassGroup.mk0 I) = (QuotientGroup.mk' (toPrincipalIdeal R K).range) ((FractionalIdeal.mk0 K) I)

full_name: ClassGroup.mk0_eq_mk0_iff_exists_fraction_ring
code: theorem ClassGroup.mk0_eq_mk0_iff_exists_fraction_ring [IsDedekindDomain R] {I J : (Ideal R)⁰} :
    ClassGroup.mk0 I =
      ClassGroup.mk0 J ↔ ∃ (x : _) (_ : x ≠ (0 : K)), spanSingleton R⁰ x * I = J 
goal: ClassGroup.mk0 I = ClassGroup.mk0 J ↔ ∃ x, ∃ (_ : x ≠ 0), FractionalIdeal.spanSingleton R⁰ x * ↑↑I = ↑↑J

full_name: ClassGroup.mk0_eq_mk0_iff
code: theorem ClassGroup.mk0_eq_mk0_iff [IsDedekindDomain R] {I J : (Ideal R)⁰} :
    ClassGroup.mk0 I = ClassGroup.mk0 J ↔
      ∃ (x y : R) (_hx : x ≠ 0) (_hy : y ≠ 0), Ideal.span {x} * (I : Ideal R) =
      Ideal.span {y} * J 
goal: ClassGroup.mk0 I = ClassGroup.mk0 J ↔ ∃ x y, ∃ (_ : x ≠ 0) (_ : y ≠ 0), Ideal.span {x} * ↑I = Ideal.span {y} * ↑J

full_name: ClassGroup.integralRep
code: /-- Maps a nonzero fractional ideal to an integral representative in the class group. -/
noncomputable def ClassGroup.integralRep (I : FractionalIdeal R⁰ (FractionRing R)) :
    Ideal R 
goal: Ideal R

full_name: ClassGroup.integralRep_mem_nonZeroDivisors
code: theorem ClassGroup.integralRep_mem_nonZeroDivisors
    {I : FractionalIdeal R⁰ (FractionRing R)} (hI : I ≠ 0) :
    I.num ∈ (Ideal R)⁰ 
goal: I.num ∈ (Ideal R)⁰

full_name: ClassGroup.mk0_integralRep
code: theorem ClassGroup.mk0_integralRep [IsDedekindDomain R]
    (I : (FractionalIdeal R⁰ (FractionRing R))ˣ) :
    ClassGroup.mk0 ⟨ClassGroup.integralRep I, ClassGroup.integralRep_mem_nonZeroDivisors I.ne_zero⟩
      = ClassGroup.mk I 
goal: ClassGroup.mk0 ⟨ClassGroup.integralRep ↑I, ⋯⟩ = ClassGroup.mk I

full_name: ClassGroup.mk0_surjective
code: theorem ClassGroup.mk0_surjective [IsDedekindDomain R] :
    Function.Surjective (ClassGroup.mk0 : (Ideal R)⁰ → ClassGroup R) 
goal: Function.Surjective ⇑ClassGroup.mk0

full_name: ClassGroup.mk_eq_one_iff
code: theorem ClassGroup.mk_eq_one_iff {I : (FractionalIdeal R⁰ K)ˣ} :
    ClassGroup.mk I = 1 ↔ (I : Submodule R K).IsPrincipal 
goal: ClassGroup.mk I = 1 ↔ (↑↑I).IsPrincipal

full_name: ClassGroup.mk0_eq_one_iff
code: theorem ClassGroup.mk0_eq_one_iff [IsDedekindDomain R] {I : Ideal R} (hI : I ∈ (Ideal R)⁰) :
    ClassGroup.mk0 ⟨I, hI⟩ = 1 ↔ I.IsPrincipal 
goal: ClassGroup.mk0 ⟨I, hI⟩ = 1 ↔ Submodule.IsPrincipal I

full_name: ClassGroup.mk0_eq_mk0_inv_iff
code: theorem ClassGroup.mk0_eq_mk0_inv_iff [IsDedekindDomain R] {I J : (Ideal R)⁰} :
    ClassGroup.mk0 I = (ClassGroup.mk0 J)⁻¹ ↔
      ∃ x ≠ (0 : R), I * J = Ideal.span {x} 
goal: ClassGroup.mk0 I = (ClassGroup.mk0 J)⁻¹ ↔ ∃ x, x ≠ 0 ∧ ↑I * ↑J = Ideal.span {x}

full_name: instFintypeClassGroupOfIsPrincipalIdealRing
code: /-- The class group of principal ideal domain is finite (in fact a singleton).

See `ClassGroup.fintypeOfAdmissibleOfFinite` for a finiteness proof that works for rings of integers
of global fields.
-/
noncomputable instance [IsPrincipalIdealRing R] : Fintype (ClassGroup R) 
goal: Fintype (ClassGroup R)

full_name: card_classGroup_eq_one
code: /-- The class number of a principal ideal domain is `1`. -/
theorem card_classGroup_eq_one [IsPrincipalIdealRing R] : Fintype.card (ClassGroup R) = 1 
goal: Fintype.card (ClassGroup R) = 1

full_name: card_classGroup_eq_one_iff
code: /-- The class number is `1` iff the ring of integers is a principal ideal domain. -/
theorem card_classGroup_eq_one_iff [IsDedekindDomain R] [Fintype (ClassGroup R)] :
    Fintype.card (ClassGroup R) = 1 ↔ IsPrincipalIdealRing R 
goal: Fintype.card (ClassGroup R) = 1 ↔ IsPrincipalIdealRing R