Zulip Chat Archive

Stream: mathlib4

Topic: neg_mem_iff


Yury G. Kudryashov (Mar 03 2023 at 04:31):

I'm trying to forward-port #18536, namely generalization of docs#inv_mem_iff. I tried both

@[to_additive (attr := simp)]
theorem inv_mem_iff {S G} [InvolutiveInv G] {_ : SetLike S G} [InvMemClass S G] {H : S}
    {x : G} : x⁻¹  H  x  H :=
  fun h => inv_inv x  inv_mem h, inv_mem
#align inv_mem_iff inv_mem_iff
#align neg_mem_iff neg_mem_iff

and

@[to_additive (attr := simp)]
theorem inv_mem_iff {S G} [InvolutiveInv G] [SetLike S G] [InvMemClass S G] {H : S}
    {x : G} : x⁻¹  H  x  H :=
  fun h => inv_inv x  inv_mem h, inv_mem
#align inv_mem_iff inv_mem_iff
#align neg_mem_iff neg_mem_iff

In both cases, Lean fails to do rw [← inv_mem_iff] in div_mem_comm_iff below.

Yury G. Kudryashov (Mar 03 2023 at 04:32):

Is there an easy fix? Or should I revert this part of #18536 for now?

Yury G. Kudryashov (Mar 03 2023 at 04:54):

For now, I'm adding explicit (x := _) here and there.

Kevin Buzzard (Mar 03 2023 at 08:00):

Are you trying to do the job of the autoporter?

Yury G. Kudryashov (Mar 03 2023 at 08:26):

I think that I can copy+paste+fix small snippets not worse than mathport. The issue is that Lean 4 rw can't use this lemma unless it knows x.

Kevin Buzzard (Mar 03 2023 at 08:29):

Oh I see, the issue is the binders

Yury G. Kudryashov (Mar 03 2023 at 08:30):

The issue is about TC search. It can find SubgroupClass that is right there in the assumptions but it fails to find NegMemClass.

Eric Wieser (Mar 03 2023 at 10:17):

Does temporarily enabling etaExperiment help?


Last updated: Dec 20 2023 at 11:08 UTC