Stream: Coq users

Topic: ✔ I forgot how to tell Coq that two types are equal


view this post on Zulip Lessness (Jul 15 2022 at 19:53):

Structure test A B (H: A = B) := {
  t: forall (x: A) (y: B), x = y
}.

Let's use this as toy example. How to tell Coq that A = B and therefore x = y makes sense?

view this post on Zulip Lessness (Jul 15 2022 at 19:58):

Solved.

Structure test A B (H: A = B) := {
  t: forall (x: A) (y: B), eq_rect _ _ x _ H = y
}.

view this post on Zulip Notification Bot (Jul 15 2022 at 19:58):

Lessness has marked this topic as resolved.

view this post on Zulip Joshua Grosso (Jul 15 2022 at 20:00):

There's also the rew notation, which imo looks nice here:

Import EqNotations.

Structure test A B (H: A = B) := {
  t: forall (x: A) (y: B), rew H in x = y
}.

Last updated: Feb 01 2023 at 12:30 UTC