File: Mathlib/RingTheory/Presentation.lean

full_name: Algebra.Presentation.relation
code: /--
A presentation of an `R`-algebra `S` is a family of
generators with
1. `rels`: The type of relations.
2. `relation : relations → MvPolynomial vars R`: The assignment of
each relation to a polynomial in the generators.
-/
@[nolint checkUnivs]
structure Algebra.Presentation extends Algebra.Generators.{w} R S where
  /-- The type of relations.  -/
  rels : Type t
  /-- The assignment of each relation to a polynomial in the generators. -/
  relation : rels → toGenerators.Ring
  /-- The relations span the kernel of the canonical map. -/
  span_range_relation_eq_ker :
    Ideal.span (Set.range relation) = toGenerators.ker
goal: self.rels → self.Ring

full_name: Algebra.Presentation.span_range_relation_eq_ker
code: /--
A presentation of an `R`-algebra `S` is a family of
generators with
1. `rels`: The type of relations.
2. `relation : relations → MvPolynomial vars R`: The assignment of
each relation to a polynomial in the generators.
-/
@[nolint checkUnivs]
structure Algebra.Presentation extends Algebra.Generators.{w} R S where
  /-- The type of relations.  -/
  rels : Type t
  /-- The assignment of each relation to a polynomial in the generators. -/
  relation : rels → toGenerators.Ring
  /-- The relations span the kernel of the canonical map. -/
  span_range_relation_eq_ker :
    Ideal.span (Set.range relation) = toGenerators.ker
goal: Ideal.span (Set.range self.relation) = self.ker

full_name: Algebra.Presentation.rels
code: /--
A presentation of an `R`-algebra `S` is a family of
generators with
1. `rels`: The type of relations.
2. `relation : relations → MvPolynomial vars R`: The assignment of
each relation to a polynomial in the generators.
-/
@[nolint checkUnivs]
structure Algebra.Presentation extends Algebra.Generators.{w} R S where
  /-- The type of relations.  -/
  rels : Type t
  /-- The assignment of each relation to a polynomial in the generators. -/
  relation : rels → toGenerators.Ring
  /-- The relations span the kernel of the canonical map. -/
  span_range_relation_eq_ker :
    Ideal.span (Set.range relation) = toGenerators.ker
goal: Type t

full_name: Algebra.Presentation
code: /--
A presentation of an `R`-algebra `S` is a family of
generators with
1. `rels`: The type of relations.
2. `relation : relations → MvPolynomial vars R`: The assignment of
each relation to a polynomial in the generators.
-/
@[nolint checkUnivs]
structure Algebra.Presentation extends Algebra.Generators.{w} R S where
  /-- The type of relations.  -/
  rels : Type t
  /-- The assignment of each relation to a polynomial in the generators. -/
  relation : rels → toGenerators.Ring
  /-- The relations span the kernel of the canonical map. -/
  span_range_relation_eq_ker :
    Ideal.span (Set.range relation) = toGenerators.ker
goal: Type (max (max (max (t + 1) u) v) (w + 1))

full_name: Algebra.Presentation.aeval_val_relation
code: @[simp]
lemma aeval_val_relation (i) : aeval P.val (P.relation i) = 0 
goal: (MvPolynomial.aeval P.val) (P.relation i) = 0

full_name: Algebra.Presentation.Quotient
code: /-- The polynomial algebra wrt a family of generators modulo a family of relations. -/
protected abbrev Quotient : Type (max w u) 
goal: Type (max w u)

full_name: Algebra.Presentation.quotientEquiv
code: /-- `P.Quotient` is `P.Ring`-isomorphic to `S` and in particular `R`-isomorphic to `S`. -/
def quotientEquiv : P.Quotient ≃ₐ[P.Ring] S 
goal: P.Quotient ≃ₐ[P.Ring] S

full_name: Algebra.Presentation.quotientEquiv_mk
code: @[simp]
lemma quotientEquiv_mk (p : P.Ring) : P.quotientEquiv p = algebraMap P.Ring S p 
goal: P.quotientEquiv ((Ideal.Quotient.mk P.ker) p) = (algebraMap P.Ring S) p

full_name: Algebra.Presentation.quotientEquiv_symm
code: @[simp]
lemma quotientEquiv_symm (x : S) : P.quotientEquiv.symm x = P.σ x 
goal: P.quotientEquiv.symm x = (Ideal.Quotient.mk P.ker) (P.σ x)

full_name: Algebra.Presentation.dimension
code: /--
Dimension of a presentation defined as the cardinality of the generators
minus the cardinality of the relations.

Note: this definition is completely non-sensical for non-finite presentations and
even then for this to make sense, you should assume that the presentation
is a complete intersection.
-/
noncomputable def dimension : ℕ 
goal: ℕ

full_name: Algebra.Presentation.IsFinite
code: /-- A presentation is finite if there are only finitely-many
relations and finitely-many relations. -/
class IsFinite (P : Presentation.{t, w} R S) : Prop where
  finite_vars : Finite P.vars
  finite_rels : Finite P.rels
goal: Prop

full_name: Algebra.Presentation.IsFinite.finite_rels
code: /-- A presentation is finite if there are only finitely-many
relations and finitely-many relations. -/
class IsFinite (P : Presentation.{t, w} R S) : Prop where
  finite_vars : Finite P.vars
  finite_rels : Finite P.rels
goal: Finite P.rels

full_name: Algebra.Presentation.IsFinite.finite_vars
code: /-- A presentation is finite if there are only finitely-many
relations and finitely-many relations. -/
class IsFinite (P : Presentation.{t, w} R S) : Prop where
  finite_vars : Finite P.vars
  finite_rels : Finite P.rels
goal: Finite P.vars

full_name: Algebra.Presentation.ideal_fg_of_isFinite
code: lemma ideal_fg_of_isFinite [P.IsFinite] : P.ker.FG 
goal: P.ker.FG

full_name: Algebra.Presentation.instFinitePresentationQuotientOfIsFinite
code: /-- If a presentation is finite, the corresponding quotient is
of finite presentation. -/
instance [P.IsFinite] : FinitePresentation R P.Quotient 
goal: Algebra.FinitePresentation R P.Quotient

full_name: Algebra.Presentation.finitePresentation_of_isFinite
code: lemma finitePresentation_of_isFinite [P.IsFinite] :
    FinitePresentation R S 
goal: Algebra.FinitePresentation R S

full_name: _private.Mathlib.RingTheory.Presentation.0.Algebra.Presentation.span_range_relation_eq_ker_localizationAway
code: private lemma span_range_relation_eq_ker_localizationAway :
    Ideal.span { C r * X () - 1 } =
      RingHom.ker (aeval (S₁ := S) (Generators.localizationAway r).val) 
goal: Ideal.span {MvPolynomial.C r * MvPolynomial.X () - 1} =
  RingHom.ker (MvPolynomial.aeval (Algebra.Generators.localizationAway r).val)

full_name: Algebra.Presentation.localizationAway
code: /-- If `S` is the localization of `R` away from `r`, we can construct a natural
presentation of `S` as `R`-algebra with a single generator `X` and the relation `r * X - 1 = 0`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable def localizationAway : Presentation R S 
goal: Algebra.Presentation R S

full_name: Algebra.Presentation.localizationAway_relation
code: /-- If `S` is the localization of `R` away from `r`, we can construct a natural
presentation of `S` as `R`-algebra with a single generator `X` and the relation `r * X - 1 = 0`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable def localizationAway : Presentation R S 
goal: ∀ (x : Unit), (Algebra.Presentation.localizationAway r).relation x = MvPolynomial.C r * MvPolynomial.X () - 1

full_name: Algebra.Presentation.localizationAway_rels
code: /-- If `S` is the localization of `R` away from `r`, we can construct a natural
presentation of `S` as `R`-algebra with a single generator `X` and the relation `r * X - 1 = 0`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable def localizationAway : Presentation R S 
goal: (Algebra.Presentation.localizationAway r).rels = Unit

full_name: Algebra.Presentation.localizationAway_isFinite
code: instance localizationAway_isFinite : (localizationAway r (S := S)).IsFinite 
goal: (Algebra.Presentation.localizationAway r).IsFinite

full_name: Algebra.Presentation.localizationAway_dimension_zero
code: @[simp]
lemma localizationAway_dimension_zero : (localizationAway r (S := S)).dimension = 0 
goal: (Algebra.Presentation.localizationAway r).dimension = 0

full_name: _private.Mathlib.RingTheory.Presentation.0.Algebra.Presentation.span_range_relation_eq_ker_baseChange
code: private lemma span_range_relation_eq_ker_baseChange :
    Ideal.span (Set.range fun i ↦ (MvPolynomial.map (algebraMap R T)) (P.relation i)) =
      RingHom.ker (aeval (R := T) (S₁ := T ⊗[R] S) P.baseChange.val) 
goal: Ideal.span (Set.range fun i => (MvPolynomial.map (algebraMap R T)) (P.relation i)) =
  RingHom.ker (MvPolynomial.aeval P.baseChange.val)

full_name: Algebra.Presentation.baseChange_relation
code: /-- If `P` is a presentation of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural presentation of `T ⊗[R] S` over `T`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable
def baseChange : Presentation T (T ⊗[R] S) 
goal: P.baseChange.relation i = (MvPolynomial.map (algebraMap R T)) (P.relation i)

full_name: Algebra.Presentation.baseChange
code: /-- If `P` is a presentation of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural presentation of `T ⊗[R] S` over `T`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable
def baseChange : Presentation T (T ⊗[R] S) 
goal: Algebra.Presentation T (T ⊗[R] S)

full_name: Algebra.Presentation.baseChange_rels
code: /-- If `P` is a presentation of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural presentation of `T ⊗[R] S` over `T`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable
def baseChange : Presentation T (T ⊗[R] S) 
goal: P.baseChange.rels = P.rels