Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/RingTheory/PowerSeries/     Datei vom 15.10.2026 mit Größe 2 kB image not shown  

Quelle  NoZeroDivisors.lean   Sprache: Lean

 

/-
Copyright (c) 2019 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Kenny Lau
-/

module

public import Mathlib.RingTheory.Ideal.Maps
public import Mathlib.RingTheory.PowerSeries.Order

/-!
# Power series over rings with no zero divisors

This file proves, using the properties of orders of power series,
that `R⟦X⟧` is an integral domain when `R` is.

We then state various results about `R⟦X⟧` with `R` an integral domain.

## Instance

If `R` has `NoZeroDivisors`, then so does `R⟦X⟧`.
-/


public section


variable {R : Type*}

namespace PowerSeries

section NoZeroDivisors

variable [Semiring R]

instance [NoZeroDivisors R] : NoZeroDivisors R⟦X⟧ where
  eq_zero_or_eq_zero_of_mul_eq_zero {φ ψ} h := by
    simp_rw [← order_eq_top, order_mul] at h ⊢
    exact WithTop.add_eq_top.mp h

end NoZeroDivisors

section IsDomain

instance [Ring R] [IsDomain R] : IsDomain R⟦X⟧ :=
  NoZeroDivisors.to_isDomain _

variable [CommRing R] [IsDomain R]

/-- The variable of the power series ring over an integral domain is prime. -/
theorem prime_X : Prime (X : R⟦X⟧) := by
  rw [← Ideal.span_singleton_prime X_ne_zero]
  suffices Ideal.span ({X} : Set R⟦X⟧) = RingHom.ker constantCoeff by
    rw [this]
    exact RingHom.ker_isPrime _
  apply Ideal.ext
  intro φ
  rw [RingHom.mem_ker, Ideal.mem_span_singleton, X_dvd_iff]

@[deprecated (since := "2026-10-09")] alias X_prime := prime_X

/-- The variable of the power series ring over an integral domain is irreducible. -/
theorem irreducible_X : Irreducible (X : R⟦X⟧) := prime_X.irreducible

@[deprecated (since := "2026-10-09")] alias X_irreducible := irreducible_X

/-- The ideal spanned by the variable in the power series ring
over an integral domain is a prime ideal. -/

@[deprecated prime_X +typeChanged (since := "2026-10-09")]
theorem span_X_isPrime : (Ideal.span ({X} : Set R⟦X⟧)).IsPrime :=
  Ideal.isPrime_span_singleton_of_prime prime_X

theorem rescale_injective {a : R} (ha : a ≠ 0) : Function.Injective (rescale a) := by
  intro p q h
  rw [PowerSeries.ext_iff] at *
  intro n
  specialize h n
  rwa [coeff_rescale, coeff_rescale, mul_right_inj' <| pow_ne_zero _ ha] at h

end IsDomain

end PowerSeries

Messung
CHZG
100100100100

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland