Zulip Chat Archive

Stream: Is there code for X?

Topic: nat.smul_one_eq_coe for enat


Yaël Dillies (Aug 18 2021 at 11:16):

Is nat.smul_one_eq_coe really general enough? It doesn't apply here.

example (a : ) : a  (1 : enat) = a :=

and has anybody a proof of that?

Yaël Dillies (Aug 18 2021 at 12:28):

Ahah! I think there's something fishy here. If you rw nsmul_one, you end up with the goal ↑a = ↑a. The LHS is nat.cast while the RHS is the coercion defined by instance : has_coe ℕ enat := ⟨some⟩ in data.nat.enat.

Ryan Lahfa (Aug 18 2021 at 12:45):

Yaël Dillies said:

Ahah! I think there's something fishy here. If you rw nsmul_one, you end up with the goal ↑a = ↑a. The LHS is nat.cast while the RHS is the coercion defined by instance : has_coe ℕ enat := ⟨some⟩ in data.nat.enat.

Does rw_mod_cast help?


Last updated: Dec 20 2023 at 11:08 UTC