Zulip Chat Archive

Stream: mathlib4

Topic: abs_mul simp


Violeta Hernández (Aug 10 2025 at 09:46):

Is there a reason why docs#abs_mul isn't tagged as simp?

Kenny Lau (Aug 10 2025 at 09:48):

maybe you don't always want to simp it?

Violeta Hernández (Aug 10 2025 at 09:48):

Well, what kind of circumstances lead to that?

Violeta Hernández (Aug 10 2025 at 09:50):

I feel like f (g a b) = g (h a) (h b) is the quintessential form of a simp lemma, think e.g. docs#Nat.cast_add or docs#Nat.cast_mul

Violeta Hernández (Aug 10 2025 at 09:50):

So I don't get why we're excluding this one

Ruben Van de Velde (Aug 10 2025 at 09:52):

It may also be oversight, not sure

Violeta Hernández (Aug 10 2025 at 09:52):

I'll add the attribute and see if anything breaks

Ruben Van de Velde (Aug 10 2025 at 09:52):

Worth a try

Kenny Lau (Aug 10 2025 at 09:52):

Violeta Hernández said:

I feel like f (g a b) = g (h a) (h b) is the quintessential form of a simp lemma, think e.g. docs#Nat.cast_add or docs#Nat.cast_mul

i'm talking about abs in particular

Kenny Lau (Aug 10 2025 at 09:53):

I can't recall an example

Violeta Hernández (Aug 10 2025 at 09:53):

Well yeah, my point is I don't see anything specific about abs that'd make this attribute undesirable

Ruben Van de Velde (Aug 10 2025 at 09:53):

Do we have |a * a| = a * a as simp?

Violeta Hernández (Aug 10 2025 at 09:53):

docs#abs_sq

Ruben Van de Velde (Aug 10 2025 at 09:53):

Or |a| * |a| = a * a

Violeta Hernández (Aug 10 2025 at 09:53):

We don't, huh

Violeta Hernández (Aug 10 2025 at 09:54):

Oh nvm, docs#abs_mul_abs_self and docs#abs_mul_self are both simp

Violeta Hernández (Aug 10 2025 at 09:55):

I think for abs_sq the reason is that docs#abs_pow would conflict with it

Violeta Hernández (Aug 10 2025 at 09:56):

(on that note, it's odd we have both docs#abs_pow and docs#pow_abs)

Violeta Hernández (Aug 10 2025 at 10:00):

#28176 :fingers_crossed:

Violeta Hernández (Aug 10 2025 at 10:52):

Yeah, seems to build just fine, modulo simp warnings.

Violeta Hernández (Aug 10 2025 at 10:53):

On the topic of abs. Shouldn't docs#abs_by_cases be named abs_rec to match docs#max_rec ?


Last updated: Dec 20 2025 at 21:32 UTC