module public import Mathlib.Basic.Complex.Basic public import Mathlib.FieldTheory.IsAlgClosed.Basic public import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Analysis.Complex.Cardinality import Mathlib.Analysis.Complex.Polynomial.Basic import Mathlib.FieldTheory.IsAlgClosed.Classification import Mathlib.RingTheory.Localization.Cardinality import Mathlib.Tactic.Algebraize import TauCeti.Analysis.Complex.FieldEmbedding public import Lib.Speed /-! # Extending embeddings of countable rings into ℂ This file compares embeddings of a countable ring into `ℂ` and into other fields. Two embeddings, into `ℂ` and into an algebraically closed field of the same cardinality, differ by an isomorphism of the fields, and an embedding into `ℂ` extends along an embedding into a field of cardinality at most that of `ℂ`. ## Main definitions and results * `New.exists_ringEquiv_extend`: two embeddings of a countable ring, into `ℂ` and into an algebraically closed field of the same cardinality, are matched by an isomorphism of the fields (Steinitz's classification, relative to the ring). * `New.exists_ringHom_complex_extend` lets one view a point over a field of cardinality at most that of ℂ as a complex point, compatibly with given embeddings of a countable base ring in the field and in ℂ. ## Relation to the literature The isomorphisms of fields come from Steinitz's theorem. -/ @[expose] public section /-! ## Steinitz's theorem relative to a countable ring -/ section ExtendEmbedding open Cardinal IsAlgClosed /-- Let `K` be a countable ring, `L` an algebraically closed field with the cardinality of `ℂ`, and `f : K → ℂ`, `g : K → L` injective ring maps. Then some isomorphism `σ : ℂ ≃+* L` satisfies `σ ∘ f = g`. A form of Steinitz's theorem (characteristic and cardinality determine an uncountable algebraically closed field up to isomorphism), refined so that the isomorphism respects the given embeddings. -/ lemma New.exists_ringEquiv_extend {L : Type} {K : Type*} [Field L] [IsAlgClosed L] [CommRing K] [Countable K] (h_mk : #ℂ = #L) (f : K →+* ℂ) (g : K →+* L) (hf : Function.Injective f) (hg : Function.Injective g) : ∃ σ : ℂ ≃+* L, ∀ a : K, σ (f a) = g a := by -- Use the two embeddings to regard the ambient fields as faithful `K`-algebras. algebraize [f, g] have : FaithfulSMul K ℂ := (faithfulSMul_iff_algebraMap_injective K ℂ).2 hf have : FaithfulSMul K L := (faithfulSMul_iff_algebraMap_injective K L).2 hg have := IsDomain.of_faithfulSMul K ℂ have : Countable (FractionRing K) := mk_le_aleph0_iff.mp (by simp) let := FractionRing.liftAlgebra K ℂ let := FractionRing.liftAlgebra K L obtain ⟨σ⟩ := TauCeti.Complex.nonempty_algEquiv (k := FractionRing K) (E := L) (h_mk.symm.trans mk_complex) exact ⟨σ.symm.toRingEquiv, (σ.symm.restrictScalars K).commutes⟩ end ExtendEmbedding /-! ## Extension of embeddings of a countable ring into ℂ -/ section ComplexExtension open Cardinal /-- Let `D` be a countable ring, `K` a field with `#K ≤ #ℂ`, and `f : D → K`, `φ : D → ℂ` injective ring maps. Then `φ` extends along `f` to a ring map `ψ : K → ℂ`. -/ lemma New.exists_ringHom_complex_extend {D : Type*} {K : Type} [CommRing D] [Countable D] [Field K] {f : D →+* K} {φ : D →+* ℂ} (hf : Function.Injective f) (hφ : Function.Injective φ) (h_le : #K ≤ #ℂ) : ∃ ψ : K →+* ℂ, ψ.comp f = φ := by -- Use the two embeddings to regard the ambient fields as faithful `D`-algebras. algebraize [f, φ] have : FaithfulSMul D K := (faithfulSMul_iff_algebraMap_injective D K).2 hf have : FaithfulSMul D ℂ := (faithfulSMul_iff_algebraMap_injective D ℂ).2 hφ have := IsDomain.of_faithfulSMul D K have : Countable (FractionRing D) := mk_le_aleph0_iff.mp (by simp) let := FractionRing.liftAlgebra D K let := FractionRing.liftAlgebra D ℂ obtain ⟨ψ⟩ := TauCeti.Complex.nonempty_algHom (k := FractionRing D) (E := K) (h_le.trans_eq mk_complex) exact ⟨ψ.toRingHom, RingHom.ext (ψ.restrictScalars D).commutes⟩ end ComplexExtension