最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

coq - Rocq: Transparent aliased definition (that instance solver sees though) - Stack Overflow

programmeradmin1浏览0评论

In Rocq, we can define aliases for types or other elements using Definition.

Unfortunately, these aliases often break typeclass resolution and require explicit unfolding within proofs.

In some cases, Notation is an option, but this cannot give non-symbolic names.

Is there a way to give something another name such that it expands trivially within proofs and instance resolution?

In Rocq, we can define aliases for types or other elements using Definition.

Unfortunately, these aliases often break typeclass resolution and require explicit unfolding within proofs.

In some cases, Notation is an option, but this cannot give non-symbolic names.

Is there a way to give something another name such that it expands trivially within proofs and instance resolution?

Share Improve this question asked Feb 7 at 20:57 Jason CarrJason Carr 2362 silver badges12 bronze badges 2
  • 1 What do you mean by "cannot give non-symbolic names"? – Li-yao Xia Commented Feb 7 at 23:09
  • Meaning if you were to write: Notation "foo" := bar (at level 60). you would get the error A notation must include at least one symbol – Jason Carr Commented 2 days ago
Add a comment  | 

2 Answers 2

Reset to default 2

There is a restricted form of notations, called abbreviations, which don't create new tokens, but are instead parsed as regular names.

Notation new_constant := a_term.
Notation f x y z := (g z x y).

You can also configure typeclass resolution to see through definitions using Typeclasses Transparent foo

https://rocq-prover.org/doc/V8.20.1/refman/addendum/type-classes.html#typeclasses-transparent-typeclasses-opaque

发布评论

评论列表(0)

  1. 暂无评论