TL;我想要的DR:
f with g
f | constructor1 val = {!!}
在该目标的背景下,如何获得g ≡ constructor1 val
类型的东西?
我对平等的定义如下:
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
以及函数定义的以下子句(对不起,我在那里没有定义的所有函数;类型很重要,最后只有一个目标是正确的):
f (negSucc a) (negSucc x) c d pr with (negSucc x +Z nonneg d)
f (negSucc a) (negSucc x) c d pr | nonneg int = identityOfIndiscernablesRight (negSucc a +Z nonneg (succ c)) (nonneg (succ int)) (negSucc x +Z nonneg (succ d)) _≡_ (addNonnegSucc (negSucc a) c int pr) (equalityCommutative (addNonnegSucc (negSucc x) d int {!refl!}))
孔的类型必须为negSucc x +Z nonneg d ≡ nonneg int
。
但是,即使refl
子句将nonneg int
定义为等于with
,negSucc x +Z nonneg d
也不会在那里进行类型检查。