Zulip Chat Archive
Stream: Is there code for X?
Topic: Associated abs
Xavier Roblot (May 15 2025 at 07:27):
I don't think we have the following
import Mathlib
theorem associated_abs {α : Type*} [Ring α] [LinearOrder α] (x : α) :
Associated x |x| := by
obtain h | h := abs_choice x
· rw [h]
· rw [h]
exact ⟨-1, by simp⟩
Somehow I also have the feeling that the hypothesis are too strong but I haven't been able to generalize it. Also I have a hard time figuring out where to put it
Riccardo Brasca (May 15 2025 at 07:48):
Looking at find_home! I think Mathlib.Algebra.Ring.Divisibility.Lemmas is a reasonable place.
Riccardo Brasca (May 15 2025 at 07:49):
If you add it, can you add to Mathlib.RingTheory.Ideal.Span the corollary that they generate the same ideal?
Xavier Roblot (May 15 2025 at 07:50):
Riccardo Brasca said:
If you add it, can you add to
Mathlib.RingTheory.Ideal.Spanthe corollary that they generate the same ideal?
That's my plan :wink:
Riccardo Brasca (May 15 2025 at 07:51):
Ahah, I guess you need it for p.natAbs or something similar :D
Riccardo Brasca (May 15 2025 at 07:51):
Anyway we surely have that -x and x are associated
Xavier Roblot (May 15 2025 at 07:52):
Riccardo Brasca said:
Anyway we surely have that
-xandxare associated
exact? does not find it
Riccardo Brasca (May 15 2025 at 07:53):
Andrew Yang (May 15 2025 at 07:53):
(btw does import Mathlib.lean work?)
Riccardo Brasca (May 15 2025 at 07:53):
with Associated.rfl
Riccardo Brasca (May 15 2025 at 07:53):
Andrew Yang said:
(btw does
import Mathlib.leanwork?)
No
Riccardo Brasca (May 15 2025 at 07:54):
And since you are at it, Associated.rfl and Associated.refl are identical.
Xavier Roblot (May 15 2025 at 07:54):
Oh, I fixed that. Sorry
Andrew Yang (May 15 2025 at 07:55):
Riccardo Brasca said:
And since you are at it, Associated.rfl and Associated.refl are identical.
refl has x explicit and rfl has x implicit. I think this is a universal (though maybe not well-documented) naming convention.
Riccardo Brasca (May 15 2025 at 07:55):
ah sorry, you're right
Xavier Roblot (May 15 2025 at 07:56):
Riccardo Brasca said:
That does not say exactly that x and -x are associated, so I think it is worth adding that result too.
Xavier Roblot (May 15 2025 at 08:05):
Riccardo Brasca said:
Ahah, I guess you need it for
p.natAbsor something similar :smile:
I need it to prove that the norm of an ideal of Z is a generator of that ideal.
Andrew Yang (May 15 2025 at 08:39):
Is this in #21950 useful to you?
Andrew Yang (May 15 2025 at 08:40):
Probably the otherway around. If you can prove that then I can have a better map in my PR.
Xavier Roblot (May 15 2025 at 08:42):
I am away from my computer for the moment but I'll do that soon
Xavier Roblot (May 15 2025 at 10:43):
Eric Wieser (May 15 2025 at 12:05):
Xavier Roblot said:
That does not say exactly that
xand-xare associated, so I think it is worth adding that result too.
as I claim in the Pr, I think it's not worth adding; we don't have the analogous result for Commute
Eric Wieser (May 15 2025 at 12:05):
Adding it just makes naming things hard
Filippo A. E. Nuccio (May 16 2025 at 09:55):
Pinging @Salvatore Mercuri who has been thinking about this as well.
Last updated: Dec 20 2025 at 21:32 UTC