Zulip Chat Archive

Stream: new members

Topic: coeff_add


Leo Mayer (Jun 01 2022 at 19:05):

How does one do this?

import tactic
import data.polynomial.basic

open polynomial

example (R : Type) [comm_ring R] (f g : polynomial R) (n : ) :
  (f + g).coeff n = (f.coeff n) + (g.coeff n) := sorry

Riccardo Brasca (Jun 01 2022 at 19:07):

does library_search work? It is surely already in the library.

Leo Mayer (Jun 01 2022 at 19:07):

That's what I thought, but its not working for me

Riccardo Brasca (Jun 01 2022 at 19:08):

docs#polynomial.coeff_add

Alex J. Best (Jun 01 2022 at 19:08):

simp also solves this and simp? tells you the name of the lemma too.

Leo Mayer (Jun 01 2022 at 19:09):

Thanks! Why would library_search not be able to find that?

Alex J. Best (Jun 01 2022 at 19:10):

I think it's just especially slow when trying to prove equalities. It just finished for me after a while and did find it indeed.


Last updated: Dec 20 2023 at 11:08 UTC