File: Mathlib/RingTheory/Unramified/Finite.lean

full_name: Algebra.FormallyUnramified.iff_exists_tensorProduct
code: /--
Proposition I.2.3 + I.2.6 of [iversen]
A finite-type `R`-algebra `S` is (formally) unramified iff there exists a `t : S ⊗[R] S` satisfying
1. `t` annihilates every `1 ⊗ s - s ⊗ 1`.
2. the image of `t` is `1` under the map `S ⊗[R] S → S`.
-/
theorem iff_exists_tensorProduct [EssFiniteType R S] :
    FormallyUnramified R S ↔ ∃ t : S ⊗[R] S,
      (∀ s, ((1 : S) ⊗ₜ[R] s - s ⊗ₜ[R] (1 : S)) * t = 0) ∧ TensorProduct.lmul' R t = 1 
goal: Algebra.FormallyUnramified R S ↔
  ∃ t, (∀ (s : S), (1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) * t = 0) ∧ (Algebra.TensorProduct.lmul' R) t = 1

full_name: Algebra.FormallyUnramified.elem
code: /--
A finite-type `R`-algebra `S` is (formally) unramified iff there exists a `t : S ⊗[R] S` satisfying
1. `t` annihilates every `1 ⊗ s - s ⊗ 1`.
2. the image of `t` is `1` under the map `S ⊗[R] S → S`.
See `Algebra.FormallyUnramified.iff_exists_tensorProduct`.
This is the choice of such a `t`.
-/
noncomputable
def elem : S ⊗[R] S 
goal: S ⊗[R] S

full_name: Algebra.FormallyUnramified.one_tmul_sub_tmul_one_mul_elem
code: lemma one_tmul_sub_tmul_one_mul_elem
    (s : S) : (1 ⊗ₜ s - s ⊗ₜ 1) * elem R S = 0 
goal: (1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) * Algebra.FormallyUnramified.elem R S = 0

full_name: Algebra.FormallyUnramified.one_tmul_mul_elem
code: lemma one_tmul_mul_elem
    (s : S) : (1 ⊗ₜ s) * elem R S = (s ⊗ₜ 1) * elem R S 
goal: 1 ⊗ₜ[R] s * Algebra.FormallyUnramified.elem R S = s ⊗ₜ[R] 1 * Algebra.FormallyUnramified.elem R S

full_name: Algebra.FormallyUnramified.lmul_elem
code: lemma lmul_elem [EssFiniteType R S] [FormallyUnramified R S] :
    TensorProduct.lmul' R (elem R S) = 1 
goal: (Algebra.TensorProduct.lmul' R) (Algebra.FormallyUnramified.elem R S) = 1

full_name: Algebra.FormallyUnramified.finite_of_free_aux
code: lemma finite_of_free_aux (I) [DecidableEq I] (b : Basis I R S)
    (f : I →₀ S) (x : S) (a : I → I →₀ R) (ha : a = fun i ↦ b.repr (b i * x)) :
    (1 ⊗ₜ[R] x * Finsupp.sum f fun i y ↦ y ⊗ₜ[R] b i) =
      Finset.sum (f.support.biUnion fun i ↦ (a i).support) fun k ↦
    Finsupp.sum (b.repr (f.sum fun i y ↦ a i k • y)) fun j c ↦ c • b j ⊗ₜ[R] b k 
goal: (1 ⊗ₜ[R] x * f.sum fun i y => y ⊗ₜ[R] b i) =
  ∑ k ∈ f.support.biUnion fun i => (a i).support,
    (b.repr (f.sum fun i y => (a i) k • y)).sum fun j c => c • b j ⊗ₜ[R] b k

full_name: Algebra.FormallyUnramified.finite_of_free
code: /-- An unramified free algebra is finitely generated. Iversen I.2.8 -/
lemma finite_of_free [Module.Free R S] : Module.Finite R S 
goal: Module.Finite R S

full_name: Algebra.FormallyUnramified.sec
code: /--
Proposition I.2.3 of [iversen]
If `S` is an unramified `R`-algebra, and `M` is a `S`-module, then the map
`S ⊗[R] M →ₗ[S] M` taking `(b, m) ↦ b • m` admits a `S`-linear section. -/
noncomputable
def sec :
    M →ₗ[S] S ⊗[R] M 
goal: M →ₗ[S] S ⊗[R] M

full_name: Algebra.FormallyUnramified.comp_sec
code: lemma comp_sec :
    (TensorProduct.AlgebraTensorModule.lift
      ((lsmul S S M).toLinearMap.flip.restrictScalars R).flip).comp (sec R S M) =
      LinearMap.id 
goal: TensorProduct.AlgebraTensorModule.lift (↑R (Algebra.lsmul S S M).toLinearMap.flip).flip ∘ₗ
    Algebra.FormallyUnramified.sec R S M =
  LinearMap.id

full_name: Algebra.FormallyUnramified.flat_of_restrictScalars
code: /-- If `S` is an unramified `R`-algebra, then `R`-flat implies `S`-flat. Iversen I.2.7 -/
lemma flat_of_restrictScalars [Module.Flat R M] : Module.Flat S M 
goal: Module.Flat S M

full_name: Algebra.FormallyUnramified.projective_of_restrictScalars
code: /-- If `S` is an unramified `R`-algebra, then `R`-projective implies `S`-projective. -/
lemma projective_of_restrictScalars [Module.Projective R M] : Module.Projective S M 
goal: Module.Projective S M