簡體   English   中英

如何編寫此Coq代碼的agda等效代碼?

[英]How to write agda equivalent code of this coq code?

我想在agda中編寫給定的coq代碼。

Definition included (D1 D2:R -> Prop) : Prop := forall x:R, D1 x -> D2 x.

我已經嘗試過這種方式..

data included (D1 D2 : R -> Set) : Set where
      forall x : R D1 x -> D2 x

我知道問題出在第二行,但如何解決。 我們需要定義構造函數嗎? 而我該怎么做?

請幫忙。

Agda中的data等同於Coq中的Inductive :它引入了歸納定義的新類型。

等價於Agda中的Definition只是您要定義的事物的定義方程式:

postulate R : Set

included : (_ _ : R → Set) → Set
included D1 D2 = ∀ x → D1 x → D2 x

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM