[英]Omitting forall in Coq
我找到了我想研究的一個有趣的邏輯定理的源代碼 。 但是,當我在CoqIDE中運行它時,它一開始就卡住了。
Inductive Term: Set :=
K: Term |
S: Term |
app: Term -> Term -> Term.
Inductive one_step: Term -> Term -> Prop :=
redk: (m, n: Term) (one_step (app (app K m) n) m) |
reds: (m, n, p: Term) (one_step (app (app (app S m) n) p) (app (app m p) (app n p))) |
redl: (m, m', n: Term) (one_step m m') -> (one_step (app m n) (app m' n)) |
redr: (m, n, n': Term) (one_step n n') -> (one_step (app m n) (app m n')).
由於The reference m was not found in the current environment.
,因此one_step
定義失敗The reference m was not found in the current environment.
我知道缺少的術語是forall
,但是沒有它,原始代碼是如何運行的? 是否需要加載一些模塊以使其隱式?
編譯代碼所需的其他模塊列表也將非常有幫助。
自7.4版以來,該語法已進行了一些更改,該版本已通過此開發進行了測試。 這是一個適用於8.4的版本:
Inductive Term: Set :=
K: Term |
S: Term |
app: Term -> Term -> Term.
Inductive one_step: Term -> Term -> Prop :=
| redk (m n: Term) : one_step (app (app K m) n) m
| reds (m n p: Term) : one_step (app (app (app S m) n) p) (app (app m p) (app n p))
| redl (m m' n: Term) : one_step m m' -> one_step (app m n) (app m' n)
| redr (m n n': Term) : one_step n n' -> one_step (app m n) (app m n').
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.