【发布时间】:2020-05-25 22:11:04
【问题描述】:
我怎样才能让 Coq 识别出两种类型实际上是相同的类型?
小例子
Module Type S.
End S.
Module F (s : S).
Inductive foo : Type := a.
End F.
Module G (s : S).
Include F s.
End G.
Module H (s : S).
Include F.
End H.
Module I (s : S).
Module G := G s.
Module H := H s.
(* This is a type error - but the foos are the same! *)
Axiom bar : forall g : G.foo, forall h : H.foo, g = h.
End I.
在上面的 Coq 文件中,我想声明一个公理,要求 G s 中的类型 foo 与 H s 中的类型 foo 相同。显然,事实确实如此。但是我可以让 Coq 识别它吗?
【问题讨论】: