Zulip Chat Archive

Stream: mathlib4

Topic: Notation `g^n` incurs two slow CoeTs


Yongyi Chen (Nov 01 2023 at 01:15):

MWE:

import Mathlib
set_option trace.Meta.synthInstance true
/-
The two offending CoeT calls:
[Meta.synthInstance] [0.506649s] ❌ CoeT ℤ x G ▶
[Meta.synthInstance] [0.508005s] ❌ CoeT G x ℤ ▶
-/
example [Group G] (g : G) (n : ) (h : n = 0) : g ^ n = 1 := by
  sorry

Patrick Massot (Nov 01 2023 at 01:19):

Elaborations of powers will change very soon so it is probably not worth investigating this.

Yongyi Chen (Nov 01 2023 at 01:22):

It's conceivable that Lean will still try the two failed CoeT's, though.


Last updated: Dec 20 2023 at 11:08 UTC