Zulip Chat Archive
Stream: maths
Topic: Leading term of valuation
Violeta Hernández (Sep 15 2025 at 21:57):
In #29687 I prove that if the real numbers embed into a ring K, then for any two elements x y : K with equal docs#ArchimedeanClass, there's a unique real number r such that ArchimedeanClass.mk y < ArchimedeanClass.mk (x - r * y).
@Weiyi Wang suggested that this result might generalize. Specifically, for any (additive) valuation v, and two elements x y : K with the same valuation, there should exist a unique r in the residue field (?) such that v y < v (x - r * y). My questions are:
- Is this result true?
- Does this value
rhave a name? - Does this exist in Mathlib?
Aaron Liu (Sep 15 2025 at 21:59):
"remainder"?
Weiyi Wang (Sep 15 2025 at 21:59):
I guess it needs a condition "the residue field can be embedded back to K in a nice way "
Violeta Hernández (Sep 15 2025 at 22:00):
I think "nice way" here should mean v (f x) = 0 for x ≠ 0
Aaron Liu (Sep 15 2025 at 22:01):
sometimes it's an embedding but it doesn't respect the ring operations
Violeta Hernández (Sep 15 2025 at 22:02):
Well in the PR I made I specifically needed f : R ->+* K + strictly monotone
Violeta Hernández (Sep 15 2025 at 22:03):
Though it might be possible to relax strictly monotone to injective
Aaron Liu (Sep 15 2025 at 22:03):
so we also want it to be a RingHomClass?
Aaron Liu (Sep 15 2025 at 22:03):
the embedding, I mean
Violeta Hernández (Sep 15 2025 at 22:04):
I believe so
Weiyi Wang (Sep 15 2025 at 22:08):
actually, how about thinking "how do we calculate r". For now let's suppose K is a field, then x/y has multiplicative valuation 1 (or, x/y is in Valuation.valuationSubring if you relax the hypothesis like in your PR), and then IsLocalRing.residue outputs r
Violeta Hernández (Sep 15 2025 at 22:12):
Violeta Hernández (Sep 15 2025 at 22:15):
You're saying this is the value I want?
Violeta Hernández (Sep 15 2025 at 22:16):
in the surreal case, I think this gives the "omnific numbers mod w" map
Weiyi Wang (Sep 15 2025 at 22:16):
It is not exactly yet because it is not In \R. The next step would be: the residue field of ArchimedeanClass.addValuation is Archimedean, hence a subfield of \R
Weiyi Wang (Sep 15 2025 at 22:18):
(I have that "is a subfield of R" PR opened somewhere...)
Weiyi Wang (Sep 15 2025 at 22:18):
(deleted)
Violeta Hernández (Sep 15 2025 at 22:18):
Wait, but what's the local field in this context?
Violeta Hernández (Sep 15 2025 at 22:19):
Would it be the subfield of elements with nonnegative valuation?
Aaron Liu (Sep 15 2025 at 22:19):
Weiyi Wang said:
(I have that "is a subfield of R" PR opened somewhere...)
isn't that just docs#LinearOrderedField.inducedOrderRingHom
Weiyi Wang (Sep 15 2025 at 22:20):
Oh right, my PR was to show that the map for group and map for ring coincide :sweat_smile:but that's likely unnecessary.
Violeta Hernández (Sep 15 2025 at 22:20):
Or perhaps docs#Archimedean.embedReal ?
Violeta Hernández (Sep 15 2025 at 22:21):
oh that one's weaker
Aaron Liu (Sep 15 2025 at 22:21):
not a ring hom :(
Weiyi Wang (Sep 15 2025 at 22:21):
yeah that's the group hom. You can upgrade it to ring hom
Violeta Hernández (Sep 15 2025 at 22:24):
Feels weird that we have these two ways of embedding a field into the reals and that they read so differently
Weiyi Wang (Sep 15 2025 at 22:26):
That's probably my bad. I didn't find the existing one when writing Archimedean.embedReal
Violeta Hernández (Sep 15 2025 at 23:09):
Wait
Violeta Hernández (Sep 15 2025 at 23:09):
Isnt the property that I want to prove basically that valuations give an Euclidean domain structure?
Weiyi Wang (Sep 15 2025 at 23:13):
From https://en.wikipedia.org/wiki/Euclidean_domain
"Examples"
- Any discrete valuation ring....
Violeta Hernández (Sep 15 2025 at 23:17):
A valuation ring with a value group isomorphic to the integers? That doesn't seem right.
Weiyi Wang (Sep 15 2025 at 23:18):
This one translates to requiring discrete ArchimedeanClass, though. There is likely something junky when ArchimedeanClass is not discrete
Weiyi Wang (Sep 15 2025 at 23:18):
Yeah it only applies to discrete case
Weiyi Wang (Sep 15 2025 at 23:18):
(In mathlib it is Valuation.valuationSubring_isDiscreteValuationRing)
Weiyi Wang (Sep 15 2025 at 23:22):
This might be where ArchimedeanClass is special among arbitrary valuations. Its valuationSubring probably can be an Euclidean domain with weaker conditions
Violeta Hernández (Sep 15 2025 at 23:25):
Valuation.valuationSubring: the valuation subring associated to a valuation
wow thanks for nothing docstring
Weiyi Wang (Sep 15 2025 at 23:26):
Mathlib doesn't have IsDiscreteValuationRing -> EuclideanDomain.. is it missing or wrong?
Violeta Hernández (Sep 15 2025 at 23:28):
Weiyi Wang said:
This might be where ArchimedeanClass is special among arbitrary valuations. Its valuationSubring probably can be an Euclidean domain with weaker conditions
Wait, is this really the case? wouldn't it require ArchimedeanClass to be well-ordered?
Weiyi Wang (Sep 15 2025 at 23:30):
Does it? Could you elaborate?
Violeta Hernández (Sep 15 2025 at 23:30):
Well, the Euclidean function in an Euclidean domain needs a well-founded codomain
Violeta Hernández (Sep 15 2025 at 23:30):
I'm not sure if we necessarily have that
Kenny Lau (Sep 15 2025 at 23:32):
Weiyi Wang said:
Mathlib doesn't have
IsDiscreteValuationRing->EuclideanDomain.. is it missing or wrong?
well all the data involved there are highly noncanonical... maybe people just thought it wasn't a good idea
Kenny Lau (Sep 15 2025 at 23:33):
but I personally am not opposed to see a def (not instance)
Weiyi Wang (Sep 15 2025 at 23:35):
Violeta Hernández said:
Well, the Euclidean function in an Euclidean domain needs a well-founded codomain
Ah, I think you are right. I forgot the "A well-founded relation on R, satisfying r (a % b) b. This ensures that the GCD algorithm always terminates." part. So what we want is just a "possibly non-terminating Euclidean domain"
Weiyi Wang (Sep 15 2025 at 23:47):
Anyway, if we follow docs#EuclideanDomain, r would be quotient, and x - r * y would be remainder, and when FiniteArchimedeanClass is, say, isomorphic to integers, then these concepts coincide
Kenny Lau (Sep 16 2025 at 00:44):
import Mathlib
noncomputable section
namespace IsDiscreteValuationRing
variable {R : Type*} [CommRing R] [IsDomain R] [IsDiscreteValuationRing R]
def quotient (x y : R) : R :=
open Classical in if y = 0 then 0 else if h : y ∣ x then h.choose else 0
def remainder (x y : R) : R :=
x - y * quotient x y
def toWithBotNat (x : R) : WithBot ℕ :=
addVal R x
@[simp] lemma toWithBotNat_zero : toWithBotNat (R := R) 0 = ⊥ :=
addVal_zero
@[simp] lemma toWithBotNat_eq_bot_iff (x : R) : toWithBotNat x = ⊥ ↔ x = 0 :=
addVal_eq_top_iff
@[simp] lemma bot_lt_toWithBotNat_iff (x : R) : ⊥ < toWithBotNat x ↔ x ≠ 0 := by
rw [bot_lt_iff_ne_bot]; simp
lemma toWithBotNat_le_toWithBotNat_iff {x y : R} (hx : x ≠ 0) (hy : y ≠ 0) :
toWithBotNat x ≤ toWithBotNat y ↔ x ∣ y := by
unfold toWithBotNat
generalize hvx : addVal R x = vx
generalize hvy : addVal R y = vy
cases' vx with vx
· rw [addVal_eq_top_iff] at hvx; tauto
cases' vy with vy
· rw [addVal_eq_top_iff] at hvy; tauto
rw [← addVal_le_iff_dvd, hvx, hvy]
exact WithBot.coe_le_coe.trans WithTop.coe_le_coe.symm
lemma dvd_of_toWithBotNat_le_toWithBotNat (x y : R) (hx : x ≠ 0)
(hle : toWithBotNat x ≤ toWithBotNat y) : x ∣ y := by
by_cases hy : y = 0
· simp [hy, hx] at hle
exact (toWithBotNat_le_toWithBotNat_iff hx hy).mp hle
variable (R) in
def toEuclideanDomain : EuclideanDomain R where
quotient := quotient
remainder := remainder
r x y := toWithBotNat x < toWithBotNat y
r_wellFounded := WellFounded.onFun wellFounded_lt
quotient_zero x := by simp [quotient]
remainder_lt x y hy := by
rw [remainder, quotient, if_neg hy]
split_ifs with hyx
· rwa [← hyx.choose_spec, sub_self, toWithBotNat_zero, bot_lt_toWithBotNat_iff]
· rw [mul_zero, sub_zero, lt_iff_not_ge]
exact mt (dvd_of_toWithBotNat_le_toWithBotNat _ _ hy) hyx
quotient_mul_add_remainder_eq x y := by
rw [remainder, quotient]
split_ifs with h₁ h₂
· rw [h₁]; ring
· rw [← h₂.choose_spec]; ring
· ring
mul_left_not_lt x y hy := by
by_cases hx : x = 0
· simp [hx]
rw [not_lt, toWithBotNat_le_toWithBotNat_iff hx (mul_ne_zero hx hy)]
exact dvd_mul_right _ _
end IsDiscreteValuationRing
Kenny Lau (Sep 16 2025 at 00:59):
Scott Carnahan (Sep 16 2025 at 01:06):
Regarding the original question, I would prefer a statement that there exists a unit r in the valuation ring (not the residue field) satisfying your condition. Then you could have a uniqueness statement asserting that any other such element is equivalent mod the maximal ideal.
Scott Carnahan (Sep 16 2025 at 01:09):
This avoids some of the messiness of lifting from the residue field.
Weiyi Wang (Sep 16 2025 at 01:16):
Wait... the EuclideanDomain stuff doesn't look right to me
Weiyi Wang (Sep 16 2025 at 01:16):
This code is basically saying the remainder is either x or 0???
Aaron Liu (Sep 16 2025 at 01:21):
that's probably not right
Weiyi Wang (Sep 16 2025 at 01:21):
I think you constructed... a EuclideanDomain, but not the EuclideanDomain I had in mind. Maybe this really just shows how non-canonical it is
Weiyi Wang (Sep 16 2025 at 01:27):
I'd like to define an EuclideanDomain on formal PowerSeries like example: 3 * x ^ 2 + 5 * x ^ 5 + 2 * x ^ 100 + ... divided by x^2 + x^5 should give quotient 3 and remainder 2 * x^5 + 2 * x ^ 100 + ...
Yours: gives quotient = 3 + 2 * x^3 - 2 * x^6 + 2 * x^9 + ... and remainder = 0
Violeta Hernández (Sep 16 2025 at 01:30):
I've got new doubts about my original statement. Consider the rationals with the 2-adic valuation. What would the statement even say? There isn't a ring homomorphism from 𝔽₂ → ℚ besides the trivial one.
Aaron Liu (Sep 16 2025 at 01:31):
Violeta Hernández said:
There isn't a ring homomorphism from 𝔽₂ → ℚ besides the trivial one.
There also isn't a trivial ring homomorphism
Violeta Hernández (Sep 16 2025 at 01:31):
isn't mapping everything to 0 always a ring homomorphism?
Aaron Liu (Sep 16 2025 at 01:31):
doesn't preserve 1
Violeta Hernández (Sep 16 2025 at 01:31):
ah
Aaron Liu (Sep 16 2025 at 01:33):
if there's a ring homomorphism then the characteristic of the codomain has to divide the characteristic of the domain
Aaron Liu (Sep 16 2025 at 01:33):
and 0 ∤ 2
Aaron Liu (Sep 16 2025 at 01:35):
why do we have ∉ but we don't have ∤
Violeta Hernández (Sep 16 2025 at 01:46):
in other words, I have no idea what the generalization of my standardPart construction even is anymore
Kenny Lau (Sep 16 2025 at 07:30):
Weiyi Wang said:
Maybe this really just shows how non-canonical it is
yeah...
Kenny Lau (Sep 16 2025 at 07:31):
Weiyi Wang said:
the remainder is either x or 0???
we're in a valuation ring, so either x|y or y|x, so the GCD can be computed in "1 step"
Kenny Lau (Sep 16 2025 at 07:31):
i just wrote the most efficient algorithm
Violeta Hernández (Sep 16 2025 at 17:25):
Question. Coming back to the original topic, do we have any other instances where the valuation theorem I mention is true?
Violeta Hernández (Sep 16 2025 at 17:26):
Not just that there's an Euclidean division, but that the quotient is given as an element of some ring homomorphism
Weiyi Wang (Sep 16 2025 at 17:29):
It should be true for PowerSeries / HahnSeries. Not sure if it is stated anywhere. (probably too trivial because it is just chopping off a term)
It is also "true" for p-adic numbers in some sense, but that's not a ring hom
Yakov Pechersky (Sep 16 2025 at 17:29):
docs#IsLocalRing.residue is a ring hom to a quotient, that I would call more of a "trailing" term rather than leading.
Violeta Hernández (Sep 16 2025 at 17:31):
Well, this standard part value in a sense is just encoding part of the Hahn embedding theorem
Yakov Pechersky (Sep 16 2025 at 17:32):
For p adics, embedding that back into the p adics is called docs#PadicInt.zmodRepr
Yakov Pechersky (Sep 16 2025 at 17:32):
That is the thing that avoids the nastiness of lifting from the residue field, that Scott mentioned.
Violeta Hernández (Sep 16 2025 at 18:01):
Is there any way to generalize both the standard part and the p-adic constructions, though?
Violeta Hernández (Sep 16 2025 at 18:22):
Like, from what I understand, my function ArchimedeanClass.standardPart is basically just a quotient, but there isn't really a single way to generalize this construction, and this construction doesn't even lead to something nice like an Euclidean domain in the general case.
Weiyi Wang (Sep 16 2025 at 18:23):
I think docs#IsLocalRing.residue is the generalization. It is unfortunately in the quotient space because not all valuation has a nicer construction
Violeta Hernández (Sep 16 2025 at 18:28):
Are the docs down? I can't open that page :frown:
Weiyi Wang (Sep 16 2025 at 18:29):
It opens for me
Violeta Hernández (Sep 16 2025 at 18:32):
Oh, it works if I open it on mobile
Violeta Hernández (Sep 16 2025 at 18:32):
Sorry, but I still don't get what R is in this case.
Weiyi Wang (Sep 16 2025 at 18:36):
R is docs#Valuation.valuationSubring, where x/y lives
Violeta Hernández (Sep 16 2025 at 18:36):
Ah!
Violeta Hernández (Sep 16 2025 at 18:37):
So that's what the v(y) ≤ v(x)condition translates to
Weiyi Wang (Sep 16 2025 at 18:37):
yep
Violeta Hernández (Sep 16 2025 at 18:44):
So you're right, what we want to do is show that the residue field is archimedean
Violeta Hernández (Sep 16 2025 at 18:45):
An archimedean field has a unique embedding into ℝ, right?
Weiyi Wang (Sep 16 2025 at 18:51):
Right. Pretty sure that uniqueness is stated in mathlib
Weiyi Wang (Sep 16 2025 at 18:53):
docs#LinearOrderedField.uniqueOrderRingHom
Violeta Hernández (Sep 16 2025 at 21:08):
I think I understand now
Violeta Hernández (Sep 16 2025 at 21:09):
I'll remake my standardPart PR using this
Violeta Hernández (Sep 16 2025 at 21:09):
I think the definition should look something like
def standardPart (x : K) : ℝ :=
if 0 ≤ ArchimedeanClass.mk x then inducedMap (residue ⟨x, sorry⟩) else 0
Violeta Hernández (Sep 16 2025 at 21:15):
What's the Mathlib name for "the ring of elements of nonnegative valuation"?
Violeta Hernández (Sep 16 2025 at 21:16):
Is docs#Valuation.integer what I want? Do I need to turn my AddValuation into a Valuation first?
Weiyi Wang (Sep 16 2025 at 21:19):
I think so
Violeta Hernández (Sep 16 2025 at 21:20):
It's weird that we have docs#Valuation.integer and docs#Valuation.Integers
Violeta Hernández (Sep 16 2025 at 21:20):
Both feel like they go against the Mathlib naming convention
Violeta Hernández (Sep 16 2025 at 21:21):
At the very least the latter should be Valuation.IsInteger
Violeta Hernández (Sep 16 2025 at 21:26):
Oh nevermind, I want to use docs#Valuation.valuationSubring rather than docs#Valuation.integer
Violeta Hernández (Sep 16 2025 at 21:26):
I am also going to complain about these two definitions that are essentially the same having such different names and not linking to each other
Violeta Hernández (Sep 16 2025 at 21:41):
Wait a second
Violeta Hernández (Sep 16 2025 at 21:42):
How do we define the ordering on the residue field?
Weiyi Wang (Sep 16 2025 at 21:43):
:grimacing:by... showing the quotient operation respect the linear order on the original field?
Violeta Hernández (Sep 16 2025 at 21:43):
That seems untrue
Violeta Hernández (Sep 16 2025 at 21:43):
For instance, residue ω < residue 1
Violeta Hernández (Sep 16 2025 at 21:44):
I think what we need to show is that every nonzero element in the residue field has a unique representative with valuation zero
Weiyi Wang (Sep 16 2025 at 21:47):
I am assuming \omega here represents an infinitely large element, then residue omega isn't really defined? because residue can only be taken on all real elements or infinitesimal elements
Violeta Hernández (Sep 16 2025 at 21:47):
ah, dammit
Violeta Hernández (Sep 16 2025 at 21:47):
the inverse ordering on ArchimedeanClass strikes again
Weiyi Wang (Sep 16 2025 at 21:51):
so the linear order on residue is really saying "linear order is preserved if you quotient away infinitesimal elements"
Violeta Hernández (Sep 16 2025 at 21:52):
I guess you could define < on the residue field as x < y for all representatives x and y
Violeta Hernández (Sep 16 2025 at 21:53):
≤ is subtler, since you can have situations like 1 < 1 + ε but residue 1 = residue (1 + ε)
Violeta Hernández (Sep 16 2025 at 21:53):
I guess ¬ y < x would work to define x ≤ y, but this seems inelegant
Weiyi Wang (Sep 16 2025 at 21:58):
I went into something very similar when originally defining the linear order on ArchimedeanClass
Weiyi Wang (Sep 16 2025 at 21:58):
Basically we want to say express "a quotient collapse the linear order on the source type"
Weiyi Wang (Sep 16 2025 at 21:59):
One bad way to do that is LinearOrder.lift' with Quotient.out, but it's ugly
Violeta Hernández (Sep 16 2025 at 22:02):
That would work yeah
Violeta Hernández (Sep 16 2025 at 22:02):
I think the issue is that the order is preserved between different elements, but not within representatives for the same element
Weiyi Wang (Sep 16 2025 at 22:03):
Right. Perhaps mathlib has this but I don't know the magic spell
Violeta Hernández (Sep 16 2025 at 22:08):
Actually, what about this?
Violeta Hernández (Sep 16 2025 at 22:08):
residue x ≤ residue ywhen eitherresidue x = residue yorx ≤ yresidue x < residue ywhen bothresidue x ≠ residue yandx < y
Violeta Hernández (Sep 16 2025 at 22:09):
I think both of these are independent of representative
Weiyi Wang (Sep 16 2025 at 22:19):
Yeah these can be defined as Quotient.lift₂ on Prop. It leaves you to justify it is a LinearOrder
Violeta Hernández (Sep 16 2025 at 22:28):
I think this is all related to the following fact: if you take a quotient of a linear order, where every equivalence class is convex, you get another linear order
Weiyi Wang (Sep 16 2025 at 22:28):
btw, this linear order can be generalized to quotient between any two ArchimedeanClass.addSubgroup, and you can also conclude the ArchimedeanClass on the quotient is isomorphic to the difference between the classes of the two subgroup (after properly dealing with 0). I had it in a very old branch (using the ugly LinearOrder.lift' way)
Weiyi Wang (Sep 16 2025 at 22:29):
Oh yeah I think what you said is even more general
Aaron Liu (Sep 16 2025 at 22:30):
Violeta Hernández said:
I think this is all related to the following fact: if you take a quotient of a linear order, where every equivalence class is convex, you get another linear order
convex as in docs#Set.OrdConnected
Aaron Liu (Sep 16 2025 at 22:31):
you wouldn't know from just the name
Violeta Hernández (Sep 16 2025 at 22:31):
@loogle LinearOrder, Quotient
loogle (Sep 16 2025 at 22:31):
:shrug: nothing found
Violeta Hernández (Sep 18 2025 at 04:38):
Just re-made my PR #29687 using the IsLocalRing.residue approach
Violeta Hernández (Sep 18 2025 at 04:39):
Still drafted, since it depends on three other PRs, one of which is still being actively discussed
Violeta Hernández (Sep 18 2025 at 05:44):
I'm still a bit surprised by the fact you can define a real-valued standard part from an arbitrary linearly ordered field without knowing anything about how the reals may or may not embed into it
Violeta Hernández (Sep 20 2025 at 02:57):
@Weiyi Wang doesn't docs#LinearOrderedField.uniqueOrderRingHom generalize where the domain is an Archimedean field, not necessarily conditionally complete? nevermind, I was thinking of docs#OrderRingHom.subsingleton
Weiyi Wang (Sep 25 2025 at 02:03):
I found something related to this
Screenshot from 2025-09-24 21-59-17.png
Irving Kaplansky, Maximal Fields with Valuations
(K is a field with valuation V. The fancy "R" is an arbitrary field, not necessarily real numbers)
Last updated: Dec 20 2025 at 21:32 UTC