Zulip Chat Archive

Stream: Is there code for X?

Topic: natural mul_left


Edison Xie (Mar 29 2025 at 00:15):

import Mathlib

example (r n : ) [NeZero n] [NeZero r] (hr1 : n = r * n) : r = 1 := by
  -- norm_num at hr1
  -- aesop
  -- simp at hr1
  simpa [mul_left_eq_self₀, NeZero.ne n] using hr1.symm

Is there a tactic that could solve this? Should there be one?

Edison Xie (Mar 29 2025 at 00:15):

cc @Yaël Dillies @Bhavik Mehta

Kevin Buzzard (Mar 29 2025 at 00:21):

It's not linear so omega doesn't work either

Eric Wieser (Mar 29 2025 at 00:23):

I don't think NeZero is supposed to be used in this case

Andrew Yang (Mar 31 2025 at 09:13):

We could add a variant of mul_left_eq_self₀ called eq_mul_left_self₀ and make it a simp lemma. I don't think one could ask for more.


Last updated: May 02 2025 at 03:31 UTC