Zulip Chat Archive
Stream: mathlib4
Topic: What is 2?
Siddhartha Gadgil (Dec 18 2022 at 08:17):
The following fails while porting:
variable [Semiring α] [Semiring β] {m n : α}
example : (2 : α) = (1 : α) + (1 : α) := by rfl
I am trying to deconstruct the definition of 2 in a Semiring
, but perhaps someone here knows what to simp/rw/unfold.
Thanks.
Ruben Van de Velde (Dec 18 2022 at 08:46):
This is rather more painful in lean 4. I think zero_le_two
and related lemmas could be used for inspiration
Siddhartha Gadgil (Dec 18 2022 at 08:52):
Thanks. That indeed uses one_add_one_equals_two
, which is just what I needed.
Siddhartha Gadgil (Dec 18 2022 at 09:25):
And indeed two errors were fixed by that and the final one by copying from its proof
Kevin Buzzard (Dec 18 2022 at 09:33):
I suppose it's inevitable that some things are defeq that didn't used to be (eta for structures) and some things are not defeq that used to be (numerals, mod, fin stuff).
Siddhartha Gadgil (Dec 18 2022 at 09:34):
It's not a problem as long as there are theorems for rewriting.
Riccardo Brasca (Dec 18 2022 at 09:54):
We can maybe add this to the common problems section of the wiki.
Kevin Buzzard (Dec 18 2022 at 10:02):
Yes I guess the only problem is the pain making the API itself
Last updated: Dec 20 2023 at 11:08 UTC