The areas / V11. Fields and Galois theory
Mathlib.FieldTheory.RatFunc.Defs
29 declarations. Mathlib docs · Source
The field of rational functions
Files in this folder define the field K⟮X⟯ of rational functions over a field K, show it
is the field of fractions of K[X] and provide the main results concerning it. This file contains
the basic definition.
For connections with Laurent Series, see Mathlib/RingTheory/LaurentSeries.lean.
Main definitions
We provide a set of recursion and induction principles:
RatFunc.liftOn: define a function by mapping a fraction of polynomialsp/qtof p q, iffis well-defined in the sense thatp/q = p'/q' → f p q = f p' q'.RatFunc.liftOn': define a function by mapping a fraction of polynomialsp/qtof p q, iffis well-defined in the sense thatf (a * p) (a * q) = f p' q'.RatFunc.induction_on: ifPholds onp / qfor all polynomialsp q, thenPholds on all rational functions
Implementation notes
To provide good API encapsulation and speed up unification problems,
RatFunc is defined as a structure, and all operations are @[irreducible] defs
We need a couple of maps to set up the Field and IsFractionRing structure,
namely RatFunc.ofFractionRing, RatFunc.toFractionRing, RatFunc.mk and
RatFunc.toFractionRingRingEquiv.
All these maps get simped to bundled morphisms like algebraMap K[X] K⟮X⟯
and IsLocalization.algEquiv.
There are separate lifts and maps of homomorphisms, to provide routes of lifting even when the codomain is not a field or even an integral domain.
References
- [Kleiman, Misconceptions about $K_X$][kleiman1979]
- https://freedommathdance.blogspot.com/2012/11/misconceptions-about-kx.html
- https://stacks.math.columbia.edu/tag/01X1
Constructing RatFuncs and their induction principles
theorem RatFunc.ofFractionRing.injEq E0 #
∀ {K : Type u} [inst : CommRing K] (toFractionRing toFractionRing_1 : FractionRing (Polynomial K)),
({ toFractionRing := toFractionRing } = { toFractionRing := toFractionRing_1 }) = (toFractionRing = toFractionRing_1)
def RatFunc.ctorIdx E1 #
{K : Type u} → {inst : CommRing K} → RatFunc K → ℕ
theorem RatFunc.ofFractionRing.inj E1 #
∀ {K : Type u} {inst : CommRing K} {toFractionRing toFractionRing_1 : FractionRing (Polynomial K)},
{ toFractionRing := toFractionRing } = { toFractionRing := toFractionRing_1 } → toFractionRing = toFractionRing_1
theorem RatFunc.liftOn.congr_simp E1 #
∀ {K : Type u} [inst : CommRing K] {P : Sort v} (x x_1 : RatFunc K),
x = x_1 →
∀ (f f_1 : Polynomial K → Polynomial K → P) (e_f : f = f_1)
(H :
∀ {p q p' q' : Polynomial K},
q ∈ nonZeroDivisors (Polynomial K) → q' ∈ nonZeroDivisors (Polynomial K) → q' * p = q * p' → f p q = f p' q'),
x.liftOn f H = x_1.liftOn f_1 ⋯
theorem RatFunc.mk.congr_simp E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p p_1 : Polynomial K),
p = p_1 → ∀ (q q_1 : Polynomial K), q = q_1 → RatFunc.mk p q = RatFunc.mk p_1 q_1
structure RatFunc E3 #
(K : Type u) → [CommRing K] → Type u
RatFunc K is K(X), the field of rational functions over K.
The inclusion of polynomials into RatFunc is algebraMap K[X] K⟮X⟯,
the maps between K⟮X⟯ and another field of fractions of K[X],
especially FractionRing K[X], are given by IsLocalization.algEquiv.
ctor RatFunc.ofFractionRing E0 #
{K : Type u} → [inst : CommRing K] → FractionRing (Polynomial K) → RatFunc K
abbrev RatFunc.toFractionRing E1 #
{K : Type u} → [inst : CommRing K] → RatFunc K → FractionRing (Polynomial K)
the coercion to the fraction ring of the polynomial ring
def RatFunc.«term_⟮X⟯» E1 #
Lean.TrailingParserDescr
RatFunc K is K(X), the field of rational functions over K.
The inclusion of polynomials into RatFunc is algebraMap K[X] K⟮X⟯,
the maps between K⟮X⟯ and another field of fractions of K[X],
especially FractionRing K[X], are given by IsLocalization.algEquiv.
theorem RatFunc.ofFractionRing_injective E1 #
∀ {K : Type u} [inst : CommRing K], Function.Injective RatFunc.ofFractionRing
theorem RatFunc.toFractionRing_injective E1 #
∀ {K : Type u} [inst : CommRing K], Function.Injective RatFunc.toFractionRing
theorem RatFunc.toFractionRing_inj E0 #
∀ {K : Type u} [inst : CommRing K] {x y : RatFunc K}, x.toFractionRing = y.toFractionRing ↔ x = y
def RatFunc.liftOn E3 #
{K : Type u} →
[inst : CommRing K] →
{P : Sort v} →
RatFunc K →
(f : Polynomial K → Polynomial K → P) →
(∀ {p q p' q' : Polynomial K},
q ∈ nonZeroDivisors (Polynomial K) →
q' ∈ nonZeroDivisors (Polynomial K) → q' * p = q * p' → f p q = f p' q') →
P
Non-dependent recursion principle for K⟮X⟯:
To construct a term of P : Sort* out of x : K⟮X⟯,
it suffices to provide a constructor f : Π (p q : K[X]), P
and a proof that f p q = f p' q' for all p q p' q' such that q' * p = q * p' where
both q and q' are not zero divisors, stated as q ∉ K[X]⁰, q' ∉ K[X]⁰.
If considering K as an integral domain, this is the same as saying that
we construct a value of P for such elements of K⟮X⟯ by setting
liftOn (p / q) f _ = f p q.
When [IsDomain K], one can use RatFunc.liftOn', which has the stronger requirement
of ∀ {p q a : K[X]} (hq : q ≠ 0) (ha : a ≠ 0), f (a * p) (a * q) = f p q.
theorem RatFunc.liftOn_ofFractionRing_mk E0 #
∀ {K : Type u} [inst : CommRing K] {P : Sort v} (n : Polynomial K) (d : ↥(nonZeroDivisors (Polynomial K)))
(f : Polynomial K → Polynomial K → P)
(H :
∀ {p q p' q' : Polynomial K},
q ∈ nonZeroDivisors (Polynomial K) → q' ∈ nonZeroDivisors (Polynomial K) → q' * p = q * p' → f p q = f p' q'),
{ toFractionRing := Localization.mk n d }.liftOn f H = f n ↑d
theorem RatFunc.liftOn_condition_of_liftOn'_condition E1 #
∀ {K : Type u} [inst : CommRing K] {P : Sort v} {f : Polynomial K → Polynomial K → P},
(∀ {p q a : Polynomial K}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q) →
∀ ⦃p q p' q' : Polynomial K⦄, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'
def RatFunc.mk E1 #
{K : Type u} → [inst : CommRing K] → [IsDomain K] → Polynomial K → Polynomial K → RatFunc K
RatFunc.mk (p q : K[X]) is p / q as a rational function.
If q = 0, then mk returns 0.
This is an auxiliary definition used to define an Algebra structure on RatFunc;
the simp normal form of mk p q is algebraMap _ _ p / algebraMap _ _ q.
theorem RatFunc.mk_eq_div' E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p q : Polynomial K),
RatFunc.mk p q =
{
toFractionRing :=
(algebraMap (Polynomial K) (FractionRing (Polynomial K))) p /
(algebraMap (Polynomial K) (FractionRing (Polynomial K))) q }
theorem RatFunc.mk_zero E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K), RatFunc.mk p 0 = { toFractionRing := 0 }
theorem RatFunc.mk_coe_def E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K) (q : ↥(nonZeroDivisors (Polynomial K))),
RatFunc.mk p ↑q = { toFractionRing := IsLocalization.mk' (FractionRing (Polynomial K)) p q }
theorem RatFunc.mk_def_of_mem E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K) {q : Polynomial K}
(hq : q ∈ nonZeroDivisors (Polynomial K)),
RatFunc.mk p q = { toFractionRing := IsLocalization.mk' (FractionRing (Polynomial K)) p ⟨q, hq⟩ }
theorem RatFunc.mk_def_of_ne E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K) {q : Polynomial K} (hq : q ≠ 0),
RatFunc.mk p q = { toFractionRing := IsLocalization.mk' (FractionRing (Polynomial K)) p ⟨q, ⋯⟩ }
theorem RatFunc.mk_eq_localization_mk E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K) {q : Polynomial K} (hq : q ≠ 0),
RatFunc.mk p q = { toFractionRing := Localization.mk p ⟨q, ⋯⟩ }
theorem RatFunc.mk_one' E1 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] (p : Polynomial K),
RatFunc.mk p 1 = { toFractionRing := (algebraMap (Polynomial K) (FractionRing (Polynomial K))) p }
theorem RatFunc.mk_eq_mk E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] {p q p' q' : Polynomial K},
q ≠ 0 → q' ≠ 0 → (RatFunc.mk p q = RatFunc.mk p' q' ↔ p * q' = p' * q)
theorem RatFunc.liftOn_mk E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] {P : Sort v} (p q : Polynomial K)
(f : Polynomial K → Polynomial K → P),
(∀ (p : Polynomial K), f p 0 = f 0 1) →
∀ (H' : ∀ {p q p' q' : Polynomial K}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q')
(H :
optParam
(∀ {p q p' q' : Polynomial K},
q ∈ nonZeroDivisors (Polynomial K) →
q' ∈ nonZeroDivisors (Polynomial K) → q' * p = q * p' → f p q = f p' q')
⋯),
(RatFunc.mk p q).liftOn f H = f p q
def RatFunc.liftOn' E3 #
{K : Type u} →
[inst : CommRing K] →
[IsDomain K] →
{P : Sort v} →
RatFunc K →
(f : Polynomial K → Polynomial K → P) →
(∀ {p q a : Polynomial K}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q) → P
Non-dependent recursion principle for K⟮X⟯: if f p q : P for all p q,
such that f (a * p) (a * q) = f p q, then we can find a value of P
for all elements of K⟮X⟯ by setting lift_on' (p / q) f _ = f p q.
The value of f p 0 for any p is never used and in principle this may be anything,
although many usages of lift_on' assume f p 0 = f 0 1.
theorem RatFunc.liftOn'_def E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] {P : Sort v} (x : RatFunc K)
(f : Polynomial K → Polynomial K → P) (H : ∀ {p q a : Polynomial K}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q),
x.liftOn' f H = x.liftOn f ⋯
theorem RatFunc.liftOn'_mk E0 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] {P : Sort v} (p q : Polynomial K)
(f : Polynomial K → Polynomial K → P),
(∀ (p : Polynomial K), f p 0 = f 0 1) →
∀ (H : ∀ {p q a : Polynomial K}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q), (RatFunc.mk p q).liftOn' f H = f p q
theorem RatFunc.induction_on' E2 #
∀ {K : Type u} [inst : CommRing K] [inst_1 : IsDomain K] {P : RatFunc K → Prop} (x : RatFunc K),
(∀ (p q : Polynomial K), q ≠ 0 → P (RatFunc.mk p q)) → P x
Induction principle for K⟮X⟯: if f p q : P (RatFunc.mk p q) for all p q,
then P holds on all elements of K⟮X⟯.
See also induction_on, which is a recursion principle defined in terms of algebraMap.