Polymorphic types [ag-8LAS]

Details [local-0]

Polymorphic type量化的不是元素,而是型別(PER)本身。一支program住在 ∀X. T(X) 裡的意思是不管 X 是哪個型別,它都住在 T(X) 裡。在這裡型別就是 PER,所以這恰好是把所有instance F A 取交集

(M , N) 屬於 ∀ᵣ F iff對每個PER A 都有 M [ F A ] N

交集量化了所有 Rel,落在比 Rel 高一階的universe,但Agda的universe是predicative的,所以要提供一個新名字 Rel⁺

Rel⁺ : 𝓤₂ ⁺ ̇
Rel⁺ = 𝓟 ℕ → 𝓟 ℕ → 𝓤₂ ̇

∀ᵣ : (Rel → Rel) → Rel⁺
∀ᵣ F M N = (A : Rel) → is-PER A → M [ F A ] N

PER的交集依然是PER [local-1]

Elimination就是instantiation [local-2]