Zulip Chat Archive

Stream: mathlib4

Topic: ring failure


Patrick Massot (Oct 18 2022 at 15:31):

The whole file https://github.com/leanprover-community/mathlib/blob/master/src/algebra/group_power/identities.lean is beyond the reach of our current mathlib4 ring tactic.

Alex J. Best (Oct 18 2022 at 16:31):

see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/status.20of.20.60ring.60/near/303965507

Yaël Dillies (Nov 20 2024 at 15:09):

Here is an example of ring failing on a simple goal which should be within its reach. This is a real example from APAP:

import Mathlib

example {m : } : (2 : ) ^ (m * 2) * 8 ^ m = 32 ^ m := by ring

Yaël Dillies (Nov 20 2024 at 15:12):

(whoops, that thread already existed :graveyard:)

Eric Wieser (Nov 20 2024 at 15:15):

This doesn't look in scope for ring to me

Eric Wieser (Nov 20 2024 at 15:17):

Here's a perhaps more minimal example:

example {m : } : 2 ^ (m * 2) * 2 ^ (m * 3) = (2 ^ 5) ^ m := by
  ring_nf

Sébastien Gouëzel (Nov 20 2024 at 15:18):

There is rpow_ring in PFR that is extremely helpful in this kind of situation...

Yaël Dillies (Nov 20 2024 at 15:30):

Here is an even more minimal example that shows that it should be in scope for ring:

import Mathlib

example {m : } : (2 : ) ^ m * 3 ^ m = (2 * 3) ^ m := by ring

Yaël Dillies (Nov 20 2024 at 15:33):

The issue is that ring simplifies numerals under a single power, but doesn't combine numerals outside different powers

Yaël Dillies (Nov 20 2024 at 15:33):

If it didn't do the former or did do the latter, then my example would work


Last updated: May 02 2025 at 03:31 UTC