Zulip Chat Archive

Stream: mathlib4

Topic: Quotienting by a polynomial


Son Ho (Sep 14 2023 at 19:10):

Is there a canonical definition for the quotient ring R[X] / P[X], where R is a ring and P[X] ∈ R[X] is a polynomial?

Adam Topaz (Sep 14 2023 at 19:10):

You use docs#Ideal.span and take the quotient by that ideal

Adam Topaz (Sep 14 2023 at 19:13):

Namely:

import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Data.Polynomial.Basic

variable (R : Type*) [CommRing R] (P : Polynomial R)

#check Polynomial R  Ideal.span {P}

Son Ho (Sep 14 2023 at 19:15):

Thanks! (again :) )

Adam Topaz (Sep 14 2023 at 19:15):

Or if you want some nicer notation:

import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Data.Polynomial.Basic

open scoped Polynomial

variable (R : Type*) [CommRing R] (P : Polynomial R)

#check R[X]  Ideal.span {P}

Adam Topaz (Sep 14 2023 at 19:15):

I don't remember whether we have notation for Ideal.span...

Eric Rodriguez (Sep 14 2023 at 19:27):

there's notation for docs#Submodule.span, which is defeq IIRC, but sadly it is untypeable... see file#Mathlib/LinearAlgebra/Span at ~l270

Eric Rodriguez (Sep 14 2023 at 19:28):

In specific, it is supposedly \. according to the top of the file, but that is now the Lean4 dot

Adam Topaz (Sep 14 2023 at 19:30):

Can we somehow introduce the notations:

  1. f\langle f \rangle for the ideal generated by an element ff,
  2. f1,f2,f3,f4\langle f_1, f_2, f_3, f_4 \rangle for the ideal generated by the set {f1,...,f4}\{f_1,...,f_4\} and
  3. S\langle S \rangle for the ideal generated by a set SS?

Is Lean4's notation flexible enough for this much overloading?

Eric Wieser (Sep 14 2023 at 19:34):

We something similar for IntermediateField.adjoin, so could presumably do the same thing

Adam Topaz (Sep 14 2023 at 19:35):

docs#IntermediateField.adjoin

Eric Rodriguez (Sep 14 2023 at 19:37):

(just a note - that notation is broken in conjunction with the one for C^infty and such like - I was going to mention this when I had time to work on it but I thought it may be relevant)

Adam Topaz (Sep 14 2023 at 19:37):

I only see https://github.com/leanprover-community/mathlib4/blob/cdbcc21987465a4a2b7818916888e1dcee620bb2/Mathlib/FieldTheory/Adjoin.lean#L472 for finitely many elements... is there one for sets as well?

Eric Rodriguez (Sep 14 2023 at 19:37):

(also this should be moved)


Last updated: Dec 20 2023 at 11:08 UTC