Zulip Chat Archive

Stream: mathlib4

Topic: simps question


Scott Morrison (Nov 20 2023 at 11:51):

@Floris van Doorn:

import Mathlib.Tactic.Simps.Basic

structure P where
  x : Nat

def P.y (p : P) : Nat := p.x + 1

@[simps]
def p : P where
  x := 37

-- Is there a way to ask `simps` to generate `p_y`?
@[simp] theorem p_y : p.y = 37 + 1 := rfl

Floris van Doorn (Nov 20 2023 at 13:08):

No, currently that is not supported, unless P.y is definitionally equal to one of the projections.


Last updated: Dec 20 2023 at 11:08 UTC