coq - 防止在 Coq 中应用后意外展开
问题描述
我的符号在申请后无意中展开了。每次我使用前装式时,我都不想在小示例文本的最后一行调用策略“更改”。如何禁止 Coq 展开我的 Notation "(a '==' b )"?
Require Export Coq.Vectors.Vector.
Import VectorNotations.
Inductive Terms : Type :=
FVC : nat -> Terms.
Definition Fo:=nat.
Context (axs0 : nat -> Type).
Context (Atom : Vector.t Terms 2 -> Fo).
Notation "( a '==' b )" := (Atom [a:Terms; b:Terms]).
Notation "( A --> B )" := (A + B).
Inductive GPR (axs : nat -> Type) (ctx:list nat) : nat -> Type :=
| MP (A B: Fo) : (GPR axs ctx A)->(GPR axs ctx (A --> B))
->(GPR axs ctx B).
Definition APR := GPR axs0.
Definition p2_23_a ctx (t:Terms) : APR ctx (t == t).
apply MP with (A:=(t == t)).
change (Atom [t; t]) with ((t==t)). (* <-- I don't want to write this line. *)
解决方案
改变
Notation "( a '==' b )" := (Atom [a:Terms; b:Terms]).
到
Notation "( a '==' b )" := (Atom [a; b]).
类型注释出现在 AST 中,并且很容易被简化,因此符号很少匹配。
推荐阅读
- android - AndroidX 迁移后 Android 10 导航崩溃
- python - CLOB/NCLOB 错误的 Cx_Oracle OutputTypeHandler
- here-api - 在此处-api 中查找具有单次接送和多次下车的序列。下一次取货必须在现有交付完成后进行
- debezium - Debezium 从指定的 bin 日志位置读取
- mediawiki - 我可以获得截至指定日期的维基百科页面版本吗?
- swift - SwiftUI 中的动画绑定
- html - 页面页脚的 CSS 计数器在 Chrome 中不递增
- html - 如何防止 Edge 翻译网页
- c# - 将可观察集合绑定到 WPF 中的 TreeView
- java - 套接字超时对性能的影响