Zulip Chat Archive

Stream: mathlib4

Topic: Timeouts when using simp on Fin inequalities


Yakov Pechersky (Jan 02 2024 at 19:42):

Is there a way to have the TC search to not be hit by simp here? You can imagine I had a more complex expression like (k + 0) + l < (l + 0) and wanted simp to simplify it.

import Mathlib.Data.Fin.Basic

example {n : } (k l : Fin (n + 1)) : k + l < l := by
  simp -- times out
  -- failed to synthesize
  -- CovariantClass (Fin (n + 1)) (Fin (n + 1)) (Function.swap fun x x_1 ↦ x + x_1) fun x x_1 ↦ x < x_1
  -- (deterministic) timeout at 'typeclass', maximum number of heartbeats (20000) has been reached (use 'set_option synthInstance.maxHeartbeats <num>' to set the limit)

Kevin Buzzard (Jan 02 2024 at 20:52):

We could remove CovarianatClass...

Yaël Dillies (Jan 02 2024 at 20:53):

Agreed


Last updated: May 02 2025 at 03:31 UTC