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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
module burali where
Prop' = Set
power : Set → Set
power X = X → Prop'
∃ : (A : Set) → (A → Prop') → Prop'
∃ A B = {X : Prop'} → ((a : A) → B a → X) → X
_,_ : {A : Set}{B : A → Prop'}
→ (a : A) → B a → ∃ A B
_,_ a b {X} f = f a b
infixr 4 _,_
_≡_ : {A : Set} → A → A → Prop'
_≡_ {A} x y = (P : A → Prop') → P x → P y
refl : {A : Set}{x : A} → x ≡ x
refl P u = u
¬_ : Prop' → Prop'
¬ A = {X : Prop'} → A → X
_∧_ : Prop' → Prop' → Prop'
A ∧ B = ∃ A (λ _ → B)
image : {A B : Set} → (A → B) → power A → power B
image {A}{B} f V b = ∃ A λ a → (V a) ∧ (f a ≡ b)
U : Set
U = (X : Set) → (power X → X) → power X
τ : power U → U
τ V X r = image (λ k → r (k X r)) V
σ : U → power U
σ k = k U τ
_<_ : U → U → Set
x < y = σ y x
ind : power U → Prop'
ind V = (x : U) → ((y : U) → y < x → V y) → V x
dec : U → Prop'
dec x = {V : power U} → ind V → V x
Ω : U
Ω = τ dec
absurd : (A : Prop') → A
absurd = Ωdec Zind (Ω , λ {X} f → f Ωdec refl)
where
preind : {X : power U} → ind X
→ ind (λ x → X (τ (σ x)))
preind {X} i x h = i (τ (σ x)) λ y p
→ p λ z leq
→ leq λ l eq
→ eq X (h z l)
Ωdec : dec Ω
Ωdec {X} i = i Ω λ x p
→ p λ w deq
→ deq λ d eq
→ eq X (d (preind i))
Z : power U
Z y = ¬ (τ (σ y) < y)
Zind : ind Z
Zind x h n = h (τ (σ x)) n
(τ (σ x) , λ {X} f → f n refl)
|