Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coq中相依记录结构等式的证明_Coq_Dependent Type - Fatal编程技术网

Coq中相依记录结构等式的证明

Coq中相依记录结构等式的证明,coq,dependent-type,Coq,Dependent Type,我定义了一个简单的结构: Require Import Ensembles. Record ConfigStructure {T:Type} : Type := mkCS { E: Ensemble T; C: Ensemble (Ensemble T); CS_wf : forall x y, In _ C x -> In _ x y -> In _ E y; rooted := In (Ensemble T) C (Empty_set T) }. CS\u w

我定义了一个简单的结构:

Require Import Ensembles.

Record ConfigStructure {T:Type} : Type := mkCS {
  E: Ensemble T;
  C: Ensemble (Ensemble T);
  CS_wf : forall x y, In _ C x -> In _ x y -> In _ E y;
  rooted := In (Ensemble T) C (Empty_set T)
}.
CS\u wf
基于这两个参数在构造时强制执行语义格式良好属性。现在稍后,我需要比较两个记录的相等性——我应该如何处理证明组件

我从以下几点开始——我想lhs上也应该出现这两种良好的形式

Lemma CS_split: forall T e1 c1 wf1 e2 c2 wf2,
e1 = e2 /\ c1 = c2 -> mkCS T e1 c1 wf1 = mkCS T e2 c2 wf2.
Proof.
intros.
destruct H as [He Hc].
destruct He; destruct Hc.
f_equal.
Abort.
这让我想到:

T : Type
e1 : Ensemble T
c1 : Ensemble (Ensemble T)
wf1 : forall (x : Ensemble T) (y : T),
      In (Ensemble T) c1 x -> In T x y -> In T e1 y
wf2 : forall (x : Ensemble T) (y : T),
      In (Ensemble T) c1 x -> In T x y -> In T e1 y
============================
 wf1 = wf2
我猜证明无关也起作用了?

当然,“应用证明无关”起了作用——它在我的情况下不起作用,因为我的脚本中有一个
要求导入经典事实,而正如Coq俱乐部成员指出的,我需要
Coq.Logic.proof无关