2014-11-13 35 views
0

假設我有一個記錄如何訪問記錄的元素COQ

Record ToyModel:={ 
universe:Set; 
aNiceProperty:universe->Prop; 
color:universe->nat 
}. 

我想定義兼容性的概念,類型ToyModel的 元素。

Definition Compatible(T1 T2: ToyModel):= 
if there is an element of T1.universe with color a then there 
exists an element of T2.universe with color a. 

我該怎麼寫coq?問題是我不知道 如何訪問記錄中的元素。

回答