Module

Transcendence.lean

Nyll.SchemeTheory.RingTheory.FieldExtensions.Transcendence
21 declarations indexed from sourceView source ↗

Transcendence degree of tensor products and Krull dimension

Imports21
  • Mathlib.RingTheory.Algebraic.Integral
  • Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis
  • Mathlib.RingTheory.FiniteStability
  • Mathlib.RingTheory.Finiteness.Quotient
  • Mathlib.RingTheory.Flat.Localization
  • Mathlib.RingTheory.Flat.Stability
  • Mathlib.RingTheory.Ideal.GoingDown
  • Mathlib.RingTheory.Ideal.GoingUp
  • Mathlib.RingTheory.Ideal.MinimalPrime.Basic
  • Mathlib.RingTheory.Ideal.Over
  • Mathlib.RingTheory.KrullDimension.Field
  • Mathlib.RingTheory.KrullDimension.Polynomial
  • Mathlib.RingTheory.LocalRing.ResidueField.Ideal
  • Mathlib.RingTheory.Localization.FractionRing
  • Mathlib.RingTheory.NoetherNormalization
  • Mathlib.RingTheory.TensorProduct.Maps
  • Mathlib.Tactic.Choose
  • Mathlib.Tactic.NormNum
  • Mathlib.Tactic.Ring
  • Mathlib.Util.WithWeakNamespace
  • Nyll.SchemeTheory.RingTheory.AlgebraNeZeroAlgebraicIndependentIsIntegralPowSmul
Imported by7

Declarations

AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.isAlgebraic_of_smul'
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section General
theorem isAlgebraic_of_smul' {R A : Type*} [CommRing R] [IsDomain R] [Ring A] [Algebra R A] {z : A}
    {y : R}
    (hy : y ≠ 0) (h : IsAlgebraic R (y • z)) : IsAlgebraic R z
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.isIntegral_map_of_forall_mem
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section General
theorem isIntegral_map_of_forall_mem {R R' C C' : Type*} [CommRing R] [CommRing R'] [CommRing C]
    [CommRing C']
    [Algebra R C] [Algebra R' C'] (f : C →+* C') (D : Subalgebra R C) (D' : Subalgebra R' C')
    (hDD' : ∀ x ∈ D, f x ∈ D') {x : C} (hx : IsIntegral D x) : IsIntegral D' (f x)
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.isAlgebraic_quotient_of_noether
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section General
theorem isAlgebraic_quotient_of_noether {E₀ E₀' C C' : Type*} [CommRing E₀] [CommRing E₀']
    [IsDomain E₀']
    [CommRing C] [CommRing C'] [IsDomain C']
    [Algebra E₀ C] [Algebra E₀' C'] [FaithfulSMul E₀' C'] (πR : E₀ →+* E₀') (πC : C →+* C')
    (hπ : ∀ x : E₀, πC (algebraMap E₀ C x) = algebraMap E₀' C' (πR x)) (hπsurj :
        Function.Surjective πC)
    {d : ℕ} (z : Fin d → C) (r : E₀) (hr : πR r ≠ 0)
    (hint : ∀ c : C, ∃ n : ℕ, IsIntegral (Algebra.adjoin E₀ (Set.range z)) (r ^ n • c)) :
    ∀ x ∈ (⊤ : Subalgebra E₀' C'), IsAlgebraic (Algebra.adjoin E₀' (Set.range (fun i => πC (z i))))
        x := by
  intro c' _
  set D : Subalgebra E₀ C := Algebra.adjoin E₀ (Set.range z)
  set D' : Subalgebra E₀' C' := Algebra.adjoin E₀' (Set.range (fun i => πC (z i)))
  have hDD' : ∀ x ∈ D, πC x ∈ D' := by
    intro x hx
    refine Algebra.adjoin_induction (hx := hx) ?_ ?_ ?_ ?_
    · rintro _ ⟨i, rfl⟩; exact Algebra.subset_adjoin ⟨i, rfl⟩
    · intro x; rw [hπ]; exact Subalgebra.algebraMap_mem _ _
    · intro x y _ _ hx hy; rw [map_add]; exact D'.add_mem hx hy
    · intro x y _ _ hx hy; rw [map_mul]; exact D'.mul_mem hx hy
  obtain ⟨c, rfl⟩ := hπsurj c'
  obtain ⟨n, hn⟩ := hint c
  have h1 : IsIntegral D' (πC (r ^ n • c)) := isIntegral_map_of_forall_mem πC D D' hDD' hn
  simp only [Algebra.smul_def, map_pow, map_mul] at h1
  rw [hπ] at h1
  let ρ : D' := ⟨algebraMap E₀' C' (πR r) ^ n, D'.pow_mem (Subalgebra.algebraMap_mem _ _) n⟩
  have hρ : (ρ : C') ≠ 0 := by
    refine pow_ne_zero _ ?_
    rw [Ne, ← map_zero (algebraMap E₀' C'), (FaithfulSMul.algebraMap_injective E₀' C').eq_iff]
    exact hr
  have hρ' : ρ ≠ 0 := fun h => hρ (by rw [h]; rfl)
  have h2 : IsAlgebraic D' (ρ • πC c) := by
    rw [Algebra.smul_def]
    exact h1.isAlgebraic
  exact isAlgebraic_of_smul' hρ' h2
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.exists_monic_aeval_eq_zero_coeff_ne_zero
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section General
theorem exists_monic_aeval_eq_zero_coeff_ne_zero {D C : Type*} [CommRing D] [CommRing C] [IsDomain
    C] [Algebra D C]
    {y : C} (hy : y ≠ 0) (hint : IsIntegral D y) :
    ∃ p : D[X], p.Monic ∧ aeval y p = 0 ∧ p.coeff 0 ≠ 0
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.trdeg_quotient_lt_of_lt
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section StrictDrop
variable {A B : Type u} [CommRing A] [CommRing B] [Algebra A B]
theorem trdeg_quotient_lt_of_lt [Algebra.FiniteType A B] (𝔭 : Ideal A) [𝔭.IsPrime] (Q 𝔓 : Ideal B)
    [Q.IsPrime]
    [𝔓.IsPrime] [Q.LiesOver 𝔭] [𝔓.LiesOver 𝔭] (hlt : Q < 𝔓) :
    Algebra.trdeg (A ⧸ 𝔭) (B ⧸ 𝔓) < Algebra.trdeg (A ⧸ 𝔭) (B ⧸ Q)
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.trdeg_le_of_generated
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Le
theorem trdeg_le_of_generated {k₀ E₀ L₀ T : Type u} [CommRing k₀] [IsDomain k₀] [CommRing E₀]
    [CommRing L₀]
    [IsDomain L₀] [CommRing T] [IsDomain T] [Algebra k₀ E₀] [Algebra k₀ L₀] [FaithfulSMul k₀ L₀]
        [Algebra E₀ T]
    [Algebra k₀ T] [IsScalarTower k₀ E₀ T] (ι : L₀ →ₐ[k₀] T) (hι : Function.Injective ι)
    (hgen : ∀ t : T, t ∈ Algebra.adjoin E₀ (Set.range ι)) :
    Algebra.trdeg E₀ T ≤ Algebra.trdeg k₀ L₀
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.includeRight_algebraMap
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Le
variable {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
theorem includeRight_algebraMap (r : R) :
    (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom (algebraMap R A' r) =
      algebraMap R (A ⊗[R] A') r
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.trdeg_le
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Le
variable {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
theorem trdeg_le (𝔓 : Ideal (A ⊗[R] A')) [𝔓.IsPrime] (𝔭 : Ideal A) [𝔭.IsPrime] [𝔓.LiesOver 𝔭]
    (𝔭' : Ideal A') [𝔭'.IsPrime]
    (h𝔭' : 𝔭' = 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom)
    (𝔫 : Ideal R) [𝔫.IsPrime] [𝔭'.LiesOver 𝔫] [𝔭.LiesOver 𝔫] :
    Algebra.trdeg (A ⧸ 𝔭) ((A ⊗[R] A') ⧸ 𝔓) ≤ Algebra.trdeg (R ⧸ 𝔫) (A' ⧸ 𝔭')
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.flat_of_faithfulSMul_field
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section GoingDown
theorem flat_of_faithfulSMul_field (K' L : Type u) [CommRing K'] [IsDomain K'] [Field L] [Algebra
    K' L]
    [FaithfulSMul K' L] : Module.Flat K' L
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.under_eq_bot_of_forall
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section GoingDown
theorem under_eq_bot_of_forall {S' D : Type u} [CommRing S'] [IsDomain S'] [CommRing D] [Algebra S'
    D]
    [Algebra.HasGoingDown S' D] (P₂ : Ideal D) [P₂.IsPrime]
    (hmin : ∀ P' : Ideal D, P'.IsPrime → P' ≤ P₂ → P'.under S' = ⊥ → P' = P₂) : P₂.under S' = ⊥
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.le_trdeg_of_mem_minimalPrimes
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Ge
variable {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
theorem le_trdeg_of_mem_minimalPrimes [Algebra.FiniteType R A']
    (𝔓 : Ideal (A ⊗[R] A')) [𝔓.IsPrime] (𝔭 : Ideal A) [𝔭.IsPrime] [𝔓.LiesOver 𝔭]
    (𝔭' : Ideal A') [𝔭'.IsPrime]
    (h𝔭' : 𝔭' = 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom)
    (𝔫 : Ideal R) [𝔫.IsPrime] [𝔭'.LiesOver 𝔫] [𝔭.LiesOver 𝔫]
    (hmin : 𝔓 ∈ ((𝔭.map (algebraMap A (A ⊗[R] A'))).minimalPrimes)) :
    Algebra.trdeg (R ⧸ 𝔫) (A' ⧸ 𝔭') ≤ Algebra.trdeg (A ⧸ 𝔭) ((A ⊗[R] A') ⧸ 𝔓)
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.comap_includeRight_under
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Main
variable {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
theorem comap_includeRight_under (Q : Ideal (A ⊗[R] A')) :
    (Q.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom).under R =
        Q.under R
AbelianVarieties.NOSProofs.TensorTranscendence.TensorPrimes.main
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
namespace TensorPrimes
section Main
variable {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
theorem main [Algebra.FiniteType R A']
    (𝔓 : Ideal (A ⊗[R] A')) [𝔓.IsPrime]
    (h : 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom ∈
      ((𝔓.under R).map (algebraMap R A')).minimalPrimes) :
    Algebra.trdeg (A ⧸ 𝔓.under A) ((A ⊗[R] A') ⧸ 𝔓) ≤
        Algebra.trdeg
          (R ⧸ (𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
              A')).toRingHom).under R)
          (A' ⧸ 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom)
              ∧
      (𝔓 ∈ ((𝔓.under A).map (algebraMap A (A ⊗[R] A'))).minimalPrimes ↔
        Algebra.trdeg (A ⧸ 𝔓.under A) ((A ⊗[R] A') ⧸ 𝔓) =
          Algebra.trdeg
            (R ⧸ (𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
                A')).toRingHom).under R)
            (A' ⧸ 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
                A')).toRingHom))
Algebra.TensorProduct.trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes
Source context 8 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_TensorProduct_trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace TensorTranscendence
open TensorProduct Polynomial
universe u
with_weak_namespace _root_.Algebra.TensorProduct
theorem trdeg_quotient_le_and_mem_minimalPrimes_iff_of_mem_minimalPrimes
    {R A A' : Type u} [CommRing R] [CommRing A] [CommRing A'] [Algebra R A] [Algebra R A']
    [Algebra.FiniteType R A']
    (𝔓 : Ideal (A ⊗[R] A')) [𝔓.IsPrime]
    (h : 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom ∈
      ((𝔓.under R).map (algebraMap R A')).minimalPrimes) :
    Algebra.trdeg (A ⧸ 𝔓.under A) ((A ⊗[R] A') ⧸ 𝔓) ≤
        Algebra.trdeg
          (R ⧸ (𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
              A')).toRingHom).under R)
          (A' ⧸ 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B := A')).toRingHom)
              ∧
      (𝔓 ∈ ((𝔓.under A).map (algebraMap A (A ⊗[R] A'))).minimalPrimes ↔
        Algebra.trdeg (A ⧸ 𝔓.under A) ((A ⊗[R] A') ⧸ 𝔓) =
          Algebra.trdeg
            (R ⧸ (𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
                A')).toRingHom).under R)
            (A' ⧸ 𝔓.comap (Algebra.TensorProduct.includeRight (R := R) (A := A) (B :=
                A')).toRingHom))
Algebra.IsIntegral.ringKrullDim_le_of_injective
Source context 5 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_IsIntegral_ringKrullDim_le_of_injective.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace IntegralDimension
theorem _root_.Algebra.IsIntegral.ringKrullDim_le_of_injective
    {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] [Algebra.IsIntegral R S]
    (hinj : Function.Injective (algebraMap R S)) :
    ringKrullDim R ≤ ringKrullDim S
AbelianVarieties.NOSProofs.FiniteTypeDimension.Algebra.RingKrullDimEqTrdeg.exists_ltSeries_comap_eq_last
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
namespace Algebra
open _root_.Algebra
namespace RingKrullDimEqTrdeg
open _root_.Algebra
open Cardinal
theorem exists_ltSeries_comap_eq_last {R S : Type*} [CommRing R] [CommRing S]
    [Algebra R S] [Algebra.IsIntegral R S] (hinj : Function.Injective (algebraMap R S))
    (l : LTSeries (PrimeSpectrum R)) :
    ∃ L : LTSeries (PrimeSpectrum S), L.length = l.length ∧
      PrimeSpectrum.comap (algebraMap R S) L.last = l.last
AbelianVarieties.NOSProofs.FiniteTypeDimension.Algebra.RingKrullDimEqTrdeg.ringKrullDim_eq_of_isIntegral_of_injective
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
namespace Algebra
open _root_.Algebra
namespace RingKrullDimEqTrdeg
open _root_.Algebra
open Cardinal
theorem ringKrullDim_eq_of_isIntegral_of_injective {R S : Type*} [CommRing R] [CommRing S]
    [Algebra R S] [Algebra.IsIntegral R S] (hinj : Function.Injective (algebraMap R S)) :
    ringKrullDim R = ringKrullDim S
AbelianVarieties.NOSProofs.FiniteTypeDimension.Algebra.RingKrullDimEqTrdeg.ringKrullDim_mvPolynomial_fin
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
namespace Algebra
open _root_.Algebra
namespace RingKrullDimEqTrdeg
open _root_.Algebra
open Cardinal
theorem ringKrullDim_mvPolynomial_fin (k : Type u) [Field k] (s : ℕ) :
    ringKrullDim (MvPolynomial (Fin s) k) = s
AbelianVarieties.NOSProofs.FiniteTypeDimension.Algebra.RingKrullDimEqTrdeg.isTranscendenceBasis_of_injective_of_isIntegral
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
namespace Algebra
open _root_.Algebra
namespace RingKrullDimEqTrdeg
open _root_.Algebra
open Cardinal
theorem isTranscendenceBasis_of_injective_of_isIntegral (k : Type u) (A : Type v) [Field k]
    [CommRing A] [IsDomain A] [Algebra k A] (s : ℕ) (g : MvPolynomial (Fin s) k →ₐ[k] A)
    (hinj : Function.Injective g) (hint : g.IsIntegral) :
    IsTranscendenceBasis k (fun i : Fin s => g (MvPolynomial.X i)) := by
  have hind : AlgebraicIndependent k (fun i : Fin s => g (MvPolynomial.X i)) := by
    have hae : MvPolynomial.aeval (fun i : Fin s => g (MvPolynomial.X i)) = g := by
      ext i
      exact MvPolynomial.aeval_X _ i
    change Function.Injective (MvPolynomial.aeval (fun i : Fin s => g (MvPolynomial.X i)))
    rw [hae]
    exact hinj
  refine hind.isTranscendenceBasis_iff_isAlgebraic.mpr ?_
  have hrange : Algebra.adjoin k (Set.range fun i : Fin s => g (MvPolynomial.X i)) = g.range := by
    have : (Set.range fun i : Fin s => g (MvPolynomial.X i)) =
        g '' Set.range (MvPolynomial.X : Fin s → MvPolynomial (Fin s) k) := by
      ext a
      simp only [Set.mem_range, Set.mem_image, exists_exists_eq_and]
    rw [this, ← AlgHom.map_adjoin, MvPolynomial.adjoin_range_X, Algebra.map_top]
  rw [hrange]
  have : Algebra.IsIntegral g.range A := by
    constructor
    intro a
    obtain ⟨p, hp, hpa⟩ := hint a
    refine ⟨p.map (g.rangeRestrict : MvPolynomial (Fin s) k →+* g.range), hp.map _, ?_⟩
    have h1 : (algebraMap g.range A).comp (g.rangeRestrict : MvPolynomial (Fin s) k →+* g.range) =
        (g : MvPolynomial (Fin s) k →+* A) := by
      ext x <;> rfl
    rw [Polynomial.eval₂_map, h1]
    exact hpa
  exact Algebra.IsIntegral.isAlgebraic
AbelianVarieties.NOSProofs.FiniteTypeDimension.Algebra.RingKrullDimEqTrdeg.main
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
namespace Algebra
open _root_.Algebra
namespace RingKrullDimEqTrdeg
open _root_.Algebra
open Cardinal
theorem main (k : Type u) (A : Type v) [Field k] [CommRing A] [IsDomain A] [Algebra k A]
    [Algebra.FiniteType k A] :
    ringKrullDim A = (Cardinal.toENat (Algebra.trdeg k A) : WithBot ℕ∞)
Algebra.ringKrullDim_eq_toENat_trdeg_of_finiteType
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_Algebra_ringKrullDim_eq_toENat_trdeg_of_finiteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties
namespace NOSProofs
namespace FiniteTypeDimension
universe u v
theorem _root_.Algebra.ringKrullDim_eq_toENat_trdeg_of_finiteType
    (k : Type u) (A : Type v) [Field k] [CommRing A] [IsDomain A] [Algebra k A]
    [Algebra.FiniteType k A] :
    ringKrullDim A = (Cardinal.toENat (Algebra.trdeg k A) : WithBot ℕ∞)