-
Notifications
You must be signed in to change notification settings - Fork 1
/
HurkensLower.agda
55 lines (39 loc) · 1.2 KB
/
HurkensLower.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{-# OPTIONS --rewriting #-}
{-
{-# OPTIONS --type-in-type #-}
record Lower (A : Set₁) : Set where
constructor lower
field raise : A
open Lower
-}
postulate
_≡_ : ∀ {A : Set₁} → A → A → Set
Lower : (A : Set₁) → Set
lower : ∀ {A} → A → Lower A
raise : ∀ {A} → Lower A → A
beta : ∀ {A} {a : A} → raise (lower a) ≡ a
{-# BUILTIN REWRITE _≡_ #-}
{-# REWRITE beta #-}
data ⊥ : Set where
℘ : ∀ {ℓ} → Set ℓ → Set _
℘ {ℓ} S = S → Set
U : Set
U = Lower (∀ (X : Set) → (℘ (℘ X) → X) → ℘ (℘ X))
τ : ℘ (℘ U) → U
τ t = lower (λ X f p → t (λ x → p (f (raise x X f))))
σ : U → ℘ (℘ U)
σ s = raise s U τ
Δ : ℘ U
Δ y = Lower (∀ p → σ y p → p (τ (σ y))) → ⊥
Ω : U
Ω = τ (λ p → (∀ x → σ x p → p x))
R : ∀ p → (∀ x → σ x p → p x) → p Ω
R _ 𝟙 = 𝟙 Ω (λ x → 𝟙 (τ (σ x)))
M : ∀ x → σ x Δ → Δ x
M _ 𝟚 𝟛 =
let 𝟛 = raise 𝟛
in 𝟛 Δ 𝟚 (lower (λ p → 𝟛 (λ y → p (τ (σ y)))))
L : (∀ p → (∀ x → σ x p → p x) → p Ω) → ⊥
L 𝟘 = 𝟘 Δ M (lower (λ p → 𝟘 (λ y → p (τ (σ y)))))
false : ⊥
false = L R