[英]Tactic to partially compute goal in Coq
I have goal 我有目标
quad X Y
, but I don't remember definition of "quad" and I don't want to start searching of its definition. ,但我不记得“四元组”的定义,我不想开始搜索它的定义。
Is there a tactic that allow me rapidly substitute quad with its definition? 是否有一种策略允许我快速用其定义替换四元组?
Record quad (X Y:Type):= { x:X; y:Y}.
Or I have to remember and use 或者我必须记住并使用
refine (@Build_quad _ _).
? ?
Your slightly mistaken, Build_quad
is not the definition of quad
, it is its constructor. 你的有点误,
Build_quad
不是quad
的定义,它是它的构造函数。 It creates terms of type quad
. 它创建了
quad
类型的术语。 As @ejgallego said, you should use the constructor
tactic in this situation. 正如@ejgallego所说,你应该在这种情况下使用
constructor
策略。
Your goal wants you to provide a term of type quad XY
, and the only way to build such a term from scratch is to use the constructor Build_quad
of type forall XY: Type, X -> Y -> quad XY
. 你的目标是希望你提供一个类型为
quad XY
的术语,从头开始构建这样一个术语的唯一方法是使用类型为forall XY: Type, X -> Y -> quad XY
的构造函数Build_quad
forall XY: Type, X -> Y -> quad XY
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.