最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Agda : what is the difference between using braces or not in a lambda expression? - Stack Overflow

programmeradmin1浏览0评论

what's the difference between the lambda expression

λ {(tr u) → refl}

and without braces,

λ (tr u) → refl

I noticed that using one or the other causes an error.

While proving lemman 3.9.1 of the HoTT book:

∀ {n : Level} {P : Set n} → isMereProposition P → P ≃ || P ||

This proof was causing errors:

unique-choice {n} {P} PisProp = ⟨ tr , ⟨ ⟨ inverse-tr , (λ (tr u) → refl) ⟩ , 
                                          ⟨ inverse-tr , (λ u → refl) ⟩ ⟩ ⟩ where
                                          inverse-tr : || P || → P
                                          inverse-tr = λ (tr u) → u

while this one did not:

unique-choice {n} {P} PisProp = ⟨ tr , ⟨ ⟨ inverse-tr , (λ {(tr u) → refl}) ⟩ , 
                                          ⟨ inverse-tr , (λ u → refl) ⟩ ⟩ ⟩ where
                                          inverse-tr : || P || → P
                                          inverse-tr = λ {(tr u) → u}
发布评论

评论列表(0)

  1. 暂无评论