Types 如何解释两个eta等效agda程序具有不同行为的原因?

Types 如何解释两个eta等效agda程序具有不同行为的原因?,types,equality,agda,dependent-type,Types,Equality,Agda,Dependent Type,我试图通过归纳原理来实现西格玛消除,但我不理解为什么pr₂可以,但是pr₂'高亮显示为黄色,带有下面的约束错误,因为这些程序是等效的。公共关系并非如此₁ 公共关系₁'. 请您解释一下错误,以及为什么agda只喜欢pr₂,不接受pr₂', 同时接受两种公关方式₁ 公共关系₁'. [免责声明:部分代码是埃格伯特·里杰克(Egbert Rijke)在CMU的课程中的代码] open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) publi

我试图通过归纳原理来实现西格玛消除,但我不理解为什么
pr₂可以,但是
pr₂'高亮显示为黄色,带有下面的约束错误,因为这些程序是等效的。公共关系并非如此₁ 公共关系₁'.

请您解释一下错误,以及为什么agda只喜欢
pr₂,不接受pr₂', 同时接受两种公关方式₁ 公共关系₁'.  [免责声明:部分代码是埃格伯特·里杰克(Egbert Rijke)在CMU的课程中的代码]

open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) public

UU : (i : Level) → Set (lsuc i)
UU i = Set i

data Σ {i j : Level} (A : UU i) (B : A → UU j) : UU (i ⊔ j) where
  pair : (x : A) → (B x → Σ A B)

ind-Σ : {i j k : Level} {A : UU i} {B : A → UU j} {C : Σ A B → UU k} →
  ((x : A) (y : B x) → C (pair x y)) → ((t : Σ A B) → C t)
ind-Σ f (pair x y) = f x y

pr₁ : {i j : Level} {A : UU i} {B : A → UU j} → Σ A B → A
pr₁ x = ind-Σ (λ x y → x) x

pr₁' : {i j : Level} {A : UU i} {B : A → UU j} → Σ A B → A
pr₁' = ind-Σ (λ x y → x) 

pr₂ : {i j : Level} { A : UU i } { B : A → UU j } → (t : Σ A B) → B (pr₁ t)
pr₂ = ind-Σ (λ x y → y) 

pr₂' : {i j : Level} { A : UU i } { B : A → UU j } → (t : Σ A B) → B (pr₁ t)
pr₂' f = ind-Σ (λ x y → y) f

-- ———— Errors ————————————————————————————————————————————————
-- Failed to solve the following constraints:
-- _196
-- := λ {i} {j} {A} {B} f →
-- ind-Σ (λ x y → _195 (f = f) (x = x) (y = y)) f
-- [blocked on problem 399]
-- [399] _C_193 f =< B (pr₁ f) : Set j
-- [393] B x =< _C_193 (pair x y) : Set j
-- _194 := λ {i} {j} {A} {B} f x y → y [blocked on problem 393]
打开导入Agda。原语使用(Level;lzero;lsuc_⊔_) 公众的
UU:(一级)→ 集合(lsuc i)
UU i=集合i
数据∑{ij:Level}(A:uui)(B:A)→ UU j):UU(i)⊔ j) 在哪里
配对:(x:A)→ (B)x→ ∑A(B)
ind-∑:{ik:Level}{A:uui}{B:A→ UU j}{C:A∑B→ UU k}→
((x:A)(y:bx)→ C(对x和y))→ ((t:∑ab)→ C(t)
ind∑f(对xy)=fxy
公共关系₁ : {i j:Level}{A:UU i}{B:A→ UU j}→ ∑ab→ A.
公共关系₁ x=ind-∑(λx y)→ x) x
公共关系₁' : {i j:Level}{A:UU i}{B:A→ UU j}→ ∑ab→ A.
公共关系₁' = ind-∑(λxy)→ 十)
公共关系₂ : {i j:Level}{A:UU i}{B:A→ UU j}→ (t:∑ab)→ B(公共关系)₁ (t)
公共关系₂ = ind-∑(λxy)→ y)
公共关系₂' : {i j:Level}{A:UU i}{B:A→ UU j}→ (t:∑ab)→ B(公共关系)₁ (t)
公共关系₂' f=ind-∑(λx y)→ y) f
------错误------------------------------------------------
--未能解决以下约束:
-- _196
--:=λ{i}{j}{A}{B}f→
--ind-∑(λxy)→ _195(f=f)(x=x)(y=y))f
--[问题399被阻止]
--[399]_C_193 f=
您应该使
ind-∑
C
参数显式。它在
pr中起作用,这是很难推断的₂更像是一次性的侥幸。