判决中离奇违约

Bizarre Contract Violation in Judgment

我有一份 judgement 合同如下:

(define-judgment-form DynamicLam
  #:mode     (down I I O O)
  #:contract (down Γ e Γ e)

  [----------------"Lambda"
   (down Γ_0 z_0 Γ_0 z_0)]
  ;; rest of the code ...
)

当我运行这个:

(define empty (term ()))
(redex-match? DynamicLam Γ empty)
(redex-match? DynamicLam e lam1^*)
(redex-match? DynamicLam z lam1^*)
(judgment-holds (down empty lam1^* empty lam1^*))

我回来了:

#t

#t

#t

. . down: judgment input values do not match its contract; (unknown output values indicated by _) contract: (down Γ e Γ e) values: (down empty lam1^* _ _)

但是这个没有意义,因为上面我明明是用redex-match?来测试的:

我错过了什么? #:contract 除了匹配 Γ e Γ e 之外还有更多含义吗?

我通过将 #:mode 更改为 (down I I I I) 而不是 (down I I O O) 并更改

来解决问题
(judgment-holds (down empty lam1^* empty lam1^*))

(judgment-holds (down ,empty ,lam1^* ,empty ,lam1^*))

, 的变化对我来说很有意义,但我仍然不明白为什么两个输出需要是输入,所以如果有人可以编辑这个答案来解释,或者提供评论或者另一个解释这种微妙之处的答案,那就太棒了。