Zulip Chat Archive

Stream: new members

Topic: Simple function lemma


Julian Sutherland (Dec 29 2021 at 12:10):

I find myself frequently wanting to use the following straightforward lemma that holds for any function f:

  lemma eq_lemma :  {α β : Type} {a b : α} (f : α  β), a = b  f a = f b :=
    begin
      intros α β a b g a_eq_b,
      rw a_eq_b,
    end

Is there already such a lemma in mathlib or init or an appropriate tactic?

Patrick Johnson (Dec 29 2021 at 12:12):

docs#congr_arg

Julian Sutherland (Dec 29 2021 at 12:12):

Perfect, thank you! :)


Last updated: Dec 20 2023 at 11:08 UTC