annotate src/OD.agda @ 1453:c6bc9334a3ee

cantor passed
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 07 Jul 2023 10:43:12 +0900
parents 66a6804d867b
children fa52d72f4bb3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
1 {-# OPTIONS --allow-unsolved-metas #-}
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 open import Level
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 open import Ordinals
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 module OD {n : Level } (O : Ordinals {n} ) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
6 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 open import Relation.Binary.PropositionalEquality hiding ( [_] )
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
8 open import Data.Nat.Properties
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Data.Empty
1175
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1148
diff changeset
10 open import Data.Unit
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 open import Relation.Nullary
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 open import Relation.Binary hiding (_⇔_)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 open import Relation.Binary.Core hiding (_⇔_)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 open import logic
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 import OrdUtil
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 open import nat
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 open Ordinals.Ordinals O
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
20 open Ordinals.IsOrdinals isOrdinal
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
21 -- open Ordinals.IsNext isNext
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 open OrdUtil O
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 -- Ordinal Definable Set
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 record OD : Set (suc n ) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 field
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 def : (x : Ordinal ) → Set n
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 open OD
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 open _∧_
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 open _∨_
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 open Bool
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 record _==_ ( a b : OD ) : Set n where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 field
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
38 eq→ : ∀ { x : Ordinal } → def a x → def b x
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
39 eq← : ∀ { x : Ordinal } → def b x → def a x
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 ==-refl : { x : OD } → x == x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 ==-refl {x} = record { eq→ = λ x → x ; eq← = λ x → x }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
44 open _==_
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 ==-trans : { x y z : OD } → x == y → y == z → x == z
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 ==-trans x=y y=z = record { eq→ = λ {m} t → eq→ y=z (eq→ x=y t) ; eq← = λ {m} t → eq← x=y (eq← y=z t) }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
49 ==-sym : { x y : OD } → x == y → y == x
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 ==-sym x=y = record { eq→ = λ {m} t → eq← x=y t ; eq← = λ {m} t → eq→ x=y t }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
53 ⇔→== : { x y : OD } → ( {z : Ordinal } → (def x z ⇔ def y z)) → x == y
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
54 eq→ ( ⇔→== {x} {y} eq ) {z} m = proj1 eq m
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
55 eq← ( ⇔→== {x} {y} eq ) {z} m = proj2 eq m
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 -- OD is an equation on Ordinals, so it contains Ordinals. If these Ordinals have one-to-one
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 -- correspondence to the OD then the OD looks like a ZF Set.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 -- If all ZF Set have supreme upper bound, the solutions of OD have to be bounded, i.e.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 -- bbounded ODs are ZF Set. Unbounded ODs are classes.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 --
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
64 -- In classical Set Theory, HOD is used, as a subset of OD,
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 -- HOD = { x | TC x ⊆ OD }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 -- where TC x is a transitive clusure of x, i.e. Union of all elemnts of all subset of x.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 -- This is not possible because we don't have V yet. So we assumes HODs are bounded OD.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 -- We also assumes HODs are isomorphic to Ordinals, which is ususally proved by Goedel number tricks.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 -- There two contraints on the HOD order, one is ∋, the other one is ⊂.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 -- ODs have an ovbious maximum, but Ordinals are not, but HOD has no maximum because there is an aribtrary
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 -- bound on each HOD.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 -- In classical Set Theory, sup is defined by Uion, since we are working on constructive logic,
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
75 -- we need explict assumption on sup for unrestricted Replacement.
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 -- ==→o≡ is necessary to prove axiom of extensionality.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 -- Ordinals in OD , the maximum
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 Ords : OD
1175
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1148
diff changeset
81 Ords = record { def = λ x → Lift n ⊤ }
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 record HOD : Set (suc n) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 field
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 od : OD
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 odmax : Ordinal
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 <odmax : {y : Ordinal} → def od y → y o< odmax
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 open HOD
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
1218
362e43a1477c brain damaged fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1186
diff changeset
91 open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ )
362e43a1477c brain damaged fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1186
diff changeset
92
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
93 record ODAxiom : Set (suc n) where
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 field
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 -- HOD is isomorphic to Ordinal (by means of Goedel number)
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
96 & : HOD → Ordinal
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
97 * : Ordinal → HOD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 c<→o< : {x y : HOD } → def (od y) ( & x ) → & x o< & y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 ⊆→o≤ : {y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 *iso : {x : HOD } → * ( & x ) ≡ x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 &iso : {x : Ordinal } → & ( * x ) ≡ x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 ==→o≡ : {x y : HOD } → (od x == od y) → x ≡ y
1218
362e43a1477c brain damaged fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1186
diff changeset
103 ∋-irr : {X : HOD} {x : Ordinal } → (a b : def (od X) x) → a ≅ b
1284
45cd80181a29 remove import zf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1223
diff changeset
104
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 postulate odAxiom : ODAxiom
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 open ODAxiom odAxiom
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
108 -- possible order restriction (required in the axiom of Omega )
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
109
1297
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
110 -- postulate odAxiom-ho< : ODAxiom-ho<
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
111 -- open ODAxiom-ho< odAxiom-ho<
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
112
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 -- odmax minimality
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 -- since we have ==→o≡ , so odmax have to be unique. We should have odmaxmin in HOD.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 -- We can calculate the minimum using sup but it is tedius.
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
117 -- Only Select has non minimum odmax.
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 -- We have the same problem on 'def' itself, but we leave it.
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 odmaxmin : Set (suc n)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 odmaxmin = (y : HOD) (z : Ordinal) → ((x : Ordinal)→ def (od y) x → x o< z) → odmax y o< osuc z
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 -- OD ⇔ Ordinal leads a contradiction, so we need bounded HOD
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 ¬OD-order : ( & : OD → Ordinal ) → ( * : Ordinal → OD ) → ( { x y : OD } → def y ( & x ) → & x o< & y) → ⊥
1175
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1148
diff changeset
125 ¬OD-order & * c<→o< = o≤> <-osuc (c<→o< {Ords} (lift tt) )
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 -- Ordinal in OD ( and ZFSet ) Transitive Set
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
128 Ord : ( a : Ordinal ) → HOD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 Ord a = record { od = record { def = λ y → y o< a } ; odmax = a ; <odmax = lemma } where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 lemma : {x : Ordinal} → x o< a → x o< a
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 lemma {x} lt = lt
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
133 od∅ : HOD
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
134 od∅ = Ord o∅
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 odef : HOD → Ordinal → Set n
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 odef A x = def ( od A ) x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 _∋_ : ( a x : HOD ) → Set n
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 _∋_ a x = odef a ( & x )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 -- _c<_ : ( x a : HOD ) → Set n
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
143 -- x c< a = a ∋ x
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 d→∋ : ( a : HOD ) { x : Ordinal} → odef a x → a ∋ (* x)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 d→∋ a lt = subst (λ k → odef a k ) (sym &iso) lt
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 -- odef-subst : {Z : HOD } {X : Ordinal }{z : HOD } {x : Ordinal }→ odef Z X → Z ≡ z → X ≡ x → odef z x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 -- odef-subst df refl refl = df
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 otrans : {a x y : Ordinal } → odef (Ord a) x → odef (Ord x) y → odef (Ord a) y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 otrans x<a y<x = ordtrans y<x x<a
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 -- If we have reverse of c<→o<, everything becomes Ordinal
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 ∈→c<→HOD=Ord : ( o<→c< : {x y : Ordinal } → x o< y → odef (* y) x ) → {x : HOD } → x ≡ Ord (& x)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 ∈→c<→HOD=Ord o<→c< {x} = ==→o≡ ( record { eq→ = lemma1 ; eq← = lemma2 } ) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 lemma1 : {y : Ordinal} → odef x y → odef (Ord (& x)) y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 lemma1 {y} lt = subst ( λ k → k o< & x ) &iso (c<→o< {* y} {x} (d→∋ x lt))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 lemma2 : {y : Ordinal} → odef (Ord (& x)) y → odef x y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 lemma2 {y} lt = subst (λ k → odef k y ) *iso (o<→c< {y} {& x} lt )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 -- avoiding lv != Zero error
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 orefl : { x : HOD } → { y : Ordinal } → & x ≡ y → & x ≡ y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 orefl refl = refl
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 ==-iso : { x y : HOD } → od (* (& x)) == od (* (& y)) → od x == od y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 ==-iso {x} {y} eq = record {
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
168 eq→ = λ {z} d → lemma ( eq→ eq (subst (λ k → odef k z ) (sym *iso) d )) ;
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
169 eq← = λ {z} d → lemma ( eq← eq (subst (λ k → odef k z ) (sym *iso) d )) }
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 lemma : {x : HOD } {z : Ordinal } → odef (* (& x)) z → odef x z
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
172 lemma {x} {z} d = subst (λ k → odef k z) (*iso) d
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 =-iso : {x y : HOD } → (od x == od y) ≡ (od (* (& x)) == od y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 =-iso {_} {y} = cong ( λ k → od k == od y ) (sym *iso)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 ord→== : { x y : HOD } → & x ≡ & y → od x == od y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 ord→== {x} {y} eq = ==-iso (lemma (& x) (& y) (orefl eq)) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 lemma : ( ox oy : Ordinal ) → ox ≡ oy → od (* ox) == od (* oy)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 lemma ox ox refl = ==-refl
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 o≡→== : { x y : Ordinal } → x ≡ y → od (* x) == od (* y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 o≡→== {x} {.x} refl = ==-refl
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184
556
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
185 *≡*→≡ : { x y : Ordinal } → * x ≡ * y → x ≡ y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
186 *≡*→≡ eq = subst₂ (λ j k → j ≡ k ) &iso &iso ( cong (&) eq )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
187
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
188 &≡&→≡ : { x y : HOD } → & x ≡ & y → x ≡ y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
189 &≡&→≡ eq = subst₂ (λ j k → j ≡ k ) *iso *iso ( cong (*) eq )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 450
diff changeset
190
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
191 o∅≡od∅ : * (o∅ ) ≡ od∅
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 o∅≡od∅ = ==→o≡ lemma where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 lemma0 : {x : Ordinal} → odef (* o∅) x → odef od∅ x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 lemma0 {x} lt with c<→o< {* x} {* o∅} (subst (λ k → odef (* o∅) k ) (sym &iso) lt)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 ... | t = subst₂ (λ j k → j o< k ) &iso &iso t
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 lemma1 : {x : Ordinal} → odef od∅ x → odef (* o∅) x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 lemma1 {x} lt = ⊥-elim (¬x<0 lt)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 lemma : od (* o∅) == od od∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 lemma = record { eq→ = lemma0 ; eq← = lemma1 }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
201 ord-od∅ : & (od∅ ) ≡ o∅
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 ord-od∅ = sym ( subst (λ k → k ≡ & (od∅ ) ) &iso (cong ( λ k → & k ) o∅≡od∅ ) )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 ≡o∅→=od∅ : {x : HOD} → & x ≡ o∅ → od x == od od∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 ≡o∅→=od∅ {x} eq = record { eq→ = λ {y} lt → ⊥-elim ( ¬x<0 {y} (subst₂ (λ j k → j o< k ) &iso eq ( c<→o< {* y} {x} (d→∋ x lt))))
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
206 ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )}
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
208 =od∅→≡o∅ : {x : HOD} → od x == od od∅ → & x ≡ o∅
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 =od∅→≡o∅ {x} eq = trans (cong (λ k → & k ) (==→o≡ {x} {od∅} eq)) ord-od∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
448
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 431
diff changeset
211 ≡od∅→=od∅ : {x : HOD} → x ≡ od∅ → od x == od od∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 431
diff changeset
212 ≡od∅→=od∅ {x} eq = ≡o∅→=od∅ (subst (λ k → & x ≡ k ) ord-od∅ ( cong & eq ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 431
diff changeset
213
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
214 ∅0 : record { def = λ x → Lift n ⊥ } == od od∅
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 eq→ ∅0 {w} (lift ())
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 eq← ∅0 {w} lt = lift (¬x<0 lt)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 ∅< : { x y : HOD } → odef x (& y ) → ¬ ( od x == od od∅ )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 ∅< {x} {y} d eq with eq→ (==-trans eq (==-sym ∅0) ) d
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 ∅< {x} {y} d eq | lift ()
450
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 448
diff changeset
221
1223
kono
parents: 1218
diff changeset
222 ¬x∋y→x≡od∅ : { x : HOD } → ({y : Ordinal } → ¬ odef x y ) → x ≡ od∅
kono
parents: 1218
diff changeset
223 ¬x∋y→x≡od∅ {x} nxy = ==→o≡ record { eq→ = λ {y} lt → ⊥-elim (nxy lt) ; eq← = λ {y} lt → ⊥-elim (¬x<0 lt) }
kono
parents: 1218
diff changeset
224
1148
d39c79bb71f0 recovered
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1109
diff changeset
225 0<P→ne : { x : HOD } → o∅ o< & x → ¬ ( od x == od od∅ )
d39c79bb71f0 recovered
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1109
diff changeset
226 0<P→ne {x} 0<x eq = ⊥-elim ( o<¬≡ (sym (=od∅→≡o∅ eq)) 0<x )
d39c79bb71f0 recovered
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1109
diff changeset
227
688
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
228 ∈∅< : { x : HOD } {y : Ordinal } → odef x y → o∅ o< (& x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
229 ∈∅< {x} {y} d with trio< o∅ (& x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
230 ... | tri< a ¬b ¬c = a
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
231 ... | tri≈ ¬a b ¬c = ⊥-elim ( ∅< {x} {* y} (subst (λ k → odef x k ) (sym &iso) d ) ( ≡o∅→=od∅ (sym b) ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
232 ... | tri> ¬a ¬b c = ⊥-elim ( ¬x<0 c )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
233
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 ∅6 : { x : HOD } → ¬ ( x ∋ x ) -- no Russel paradox
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 ∅6 {x} x∋x = o<¬≡ refl ( c<→o< {x} {x} x∋x )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 odef-iso : {A B : HOD } {x y : Ordinal } → x ≡ y → (odef A y → odef B y) → odef A x → odef B x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 odef-iso refl t = t
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 is-o∅ : ( x : Ordinal ) → Dec ( x ≡ o∅ )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 is-o∅ x with trio< x o∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 is-o∅ x | tri< a ¬b ¬c = no ¬b
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 is-o∅ x | tri≈ ¬a b ¬c = yes b
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 is-o∅ x | tri> ¬a ¬b c = no ¬b
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
246 odef< : {b : Ordinal } { A : HOD } → odef A b → b o< & A
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
247 odef< {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab))
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
248
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
249 odef∧< : {A : HOD } {y : Ordinal} {n : Level } → {P : Set n} → odef A y ∧ P → y o< & A
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
250 odef∧< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p )))
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
251
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 -- the pair
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
253 _,_ : HOD → HOD → HOD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 x , y = record { od = record { def = λ t → (t ≡ & x ) ∨ ( t ≡ & y ) } ; odmax = omax (& x) (& y) ; <odmax = lemma } where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 lemma : {t : Ordinal} → (t ≡ & x) ∨ (t ≡ & y) → t o< omax (& x) (& y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 lemma {t} (case1 refl) = omax-x _ _
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 lemma {t} (case2 refl) = omax-y _ _
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
258
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 pair<y : {x y : HOD } → y ∋ x → & (x , x) o< osuc (& y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 pair<y {x} {y} y∋x = ⊆→o≤ lemma where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 lemma : {z : Ordinal} → def (od (x , x)) z → def (od y) z
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 lemma (case1 refl) = y∋x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 lemma (case2 refl) = y∋x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
264
688
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 612
diff changeset
265 -- another possible restriction. We require no minimality on odmax, so it may arbitrary larger.
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 odmax<& : { x y : HOD } → x ∋ y → Set n
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 odmax<& {x} {y} x∋y = odmax x o< & x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
268
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
269 in-codomain : (X : HOD ) → ( ψ : HOD → HOD ) → OD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 in-codomain X ψ = record { def = λ x → ¬ ( (y : Ordinal ) → ¬ ( odef X y ∧ ( x ≡ & (ψ (* y ))))) }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
272 _∩_ : ( A B : HOD ) → HOD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 A ∩ B = record { od = record { def = λ x → odef A x ∧ odef B x }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 ; odmax = omin (odmax A) (odmax B) ; <odmax = λ y → min1 (<odmax A (proj1 y)) (<odmax B (proj2 y))}
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
275
1096
55ab5de1ae02 recovery
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
276 _⊆_ : ( A B : HOD) → Set n
55ab5de1ae02 recovery
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
277 _⊆_ A B = { x : Ordinal } → odef A x → odef B x
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 infixr 220 _⊆_
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 -- if we have & (x , x) ≡ osuc (& x), ⊆→o≤ → c<→o<
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 ⊆→o≤→c<→o< : ({x : HOD} → & (x , x) ≡ osuc (& x) )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 → ({y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z) )
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
284 → {x y : HOD } → def (od y) ( & x ) → & x o< & y
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 ⊆→o≤→c<→o< peq ⊆→o≤ {x} {y} y∋x with trio< (& x) (& y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 ⊆→o≤→c<→o< peq ⊆→o≤ {x} {y} y∋x | tri< a ¬b ¬c = a
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 ⊆→o≤→c<→o< peq ⊆→o≤ {x} {y} y∋x | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (peq {x}) (pair<y (subst (λ k → k ∋ x) (sym ( ==→o≡ {x} {y} (ord→== b))) y∋x )))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 ⊆→o≤→c<→o< peq ⊆→o≤ {x} {y} y∋x | tri> ¬a ¬b c =
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 ⊥-elim ( o<> (⊆→o≤ {x , x} {y} y⊆x,x ) lemma1 ) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 lemma : {z : Ordinal} → (z ≡ & x) ∨ (z ≡ & x) → & x ≡ z
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 lemma (case1 refl) = refl
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 lemma (case2 refl) = refl
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 y⊆x,x : {z : Ordinal} → def (od (x , x)) z → def (od y) z
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
294 y⊆x,x {z} lt = subst (λ k → def (od y) k ) (lemma lt) y∋x
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 lemma1 : osuc (& y) o< & (x , x)
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
296 lemma1 = subst (λ k → osuc (& y) o< k ) (sym (peq {x})) (osucc c )
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 ε-induction : { ψ : HOD → Set (suc n)}
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 → ( {x : HOD } → ({ y : HOD } → x ∋ y → ψ y ) → ψ x )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 → (x : HOD ) → ψ x
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 ε-induction {ψ} ind x = subst (λ k → ψ k ) *iso (ε-induction-ord (osuc (& x)) <-osuc ) where
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 induction : (ox : Ordinal) → ((oy : Ordinal) → oy o< ox → ψ (* oy)) → ψ (* ox)
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
303 induction ox prev = ind ( λ {y} lt → subst (λ k → ψ k ) *iso (prev (& y) (o<-subst (c<→o< lt) refl &iso )))
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 ε-induction-ord : (ox : Ordinal) { oy : Ordinal } → oy o< ox → ψ (* oy)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 ε-induction-ord ox {oy} lt = TransFinite {λ oy → ψ (* oy)} induction oy
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306
1109
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
307 ε-induction0 : { ψ : HOD → Set n}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
308 → ( {x : HOD } → ({ y : HOD } → x ∋ y → ψ y ) → ψ x )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
309 → (x : HOD ) → ψ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
310 ε-induction0 {ψ} ind x = subst (λ k → ψ k ) *iso (ε-induction-ord (osuc (& x)) <-osuc ) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
311 induction : (ox : Ordinal) → ((oy : Ordinal) → oy o< ox → ψ (* oy)) → ψ (* ox)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
312 induction ox prev = ind ( λ {y} lt → subst (λ k → ψ k ) *iso (prev (& y) (o<-subst (c<→o< lt) refl &iso )))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
313 ε-induction-ord : (ox : Ordinal) { oy : Ordinal } → oy o< ox → ψ (* oy)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
314 ε-induction-ord ox {oy} lt = inOrdinal.TransFinite0 O {λ oy → ψ (* oy)} induction oy
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1097
diff changeset
315
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
316 -- Open supreme upper bound leads a contradition, so we use domain restriction on sup
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
317 ¬open-sup : ( sup-o : (Ordinal → Ordinal ) → Ordinal) → ((ψ : Ordinal → Ordinal ) → (x : Ordinal) → ψ x o< sup-o ψ ) → ⊥
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
318 ¬open-sup sup-o sup-o< = o<> <-osuc (sup-o< next-ord (sup-o next-ord)) where
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
319 next-ord : Ordinal → Ordinal
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
320 next-ord x = osuc x
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
321
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
322 Select : (X : HOD ) → ((x : HOD ) → Set n ) → HOD
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 Select X ψ = record { od = record { def = λ x → ( odef X x ∧ ψ ( * x )) } ; odmax = odmax X ; <odmax = λ y → <odmax X (proj1 y) }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
324
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
325 _=h=_ : (x y : HOD) → Set n
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
326 x =h= y = od x == od y
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
327
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
328 record Own (A : HOD) (x : Ordinal) : Set n where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
329 field
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
330 owner : Ordinal
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
331 ao : odef A owner
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
332 ox : odef (* owner) x
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
333
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
334 Union : HOD → HOD
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
335 Union U = record { od = record { def = λ x → Own U x } ; odmax = osuc (& U) ; <odmax = umax } where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
336 umax : {y : Ordinal} → Own U y → y o< osuc (& U)
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
337 umax {y} uy = o<→≤ ( ordtrans (odef< (Own.ox uy)) (subst (λ k → k o< & U) (sym &iso) umax1) ) where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
338 umax1 : Own.owner uy o< & U
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
339 umax1 = odef< (Own.ao uy)
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
340
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
341 union→ : (X z u : HOD) → (X ∋ u) ∧ (u ∋ z) → Union X ∋ z
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
342 union→ X z u xx = record { owner = & u ; ao = proj1 xx ; ox = subst (λ k → odef k (& z)) (sym *iso) (proj2 xx) }
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
343 union← : (X z : HOD) (X∋z : Union X ∋ z) → ¬ ( (u : HOD ) → ¬ ((X ∋ u) ∧ (u ∋ z )))
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
344 union← X z UX∋z not = ⊥-elim ( not (* (Own.owner UX∋z)) ⟪ subst (λ k → odef X k) (sym &iso) ( Own.ao UX∋z) , Own.ox UX∋z ⟫ )
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
345
1303
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1300
diff changeset
346 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1300
diff changeset
347 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1300
diff changeset
348 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1300
diff changeset
349
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
350 record RCod (COD : HOD) (ψ : HOD → HOD) : Set (suc n) where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
351 field
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
352 ≤COD : ∀ {x : HOD } → ψ x ⊆ COD
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
353
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
354 record Replaced (A : HOD) (ψ : Ordinal → Ordinal ) (x : Ordinal ) : Set n where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
355 field
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
356 z : Ordinal
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
357 az : odef A z
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
358 x=ψz : x ≡ ψ z
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
359
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
360 Replace : (D : HOD) → (ψ : HOD → HOD) → {C : HOD} → RCod C ψ → HOD
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
361 Replace X ψ {C} rc = record { od = record { def = λ x → Replaced X (λ z → & (ψ (* z))) x } ; odmax = osuc (& C)
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
362 ; <odmax = rmax< } where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
363 rmax< : {y : Ordinal} → Replaced X (λ z → & (ψ (* z))) y → y o< osuc (& C)
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
364 rmax< {y} lt = subst (λ k → k o< osuc (& C)) r01 ( ⊆→o≤ (RCod.≤COD rc) ) where
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
365 r01 : & (ψ ( * (Replaced.z lt ) )) ≡ y
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
366 r01 = sym (Replaced.x=ψz lt )
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
367
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
368 replacement← : {ψ : HOD → HOD} (X x : HOD) → X ∋ x → {C : HOD} → (rc : RCod C ψ) → Replace X ψ rc ∋ ψ x
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
369 replacement← {ψ} X x lt {C} rc = record { z = & x ; az = lt ; x=ψz = cong (λ k → & (ψ k)) (sym *iso) }
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
370 replacement→ : {ψ : HOD → HOD} (X x : HOD) → {C : HOD} → (rc : RCod C ψ ) → (lt : Replace X ψ rc ∋ x)
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
371 → ¬ ( (y : HOD) → ¬ (x =h= ψ y))
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
372 replacement→ {ψ} X x {C} rc lt eq = eq (* (Replaced.z lt)) (ord→== (Replaced.x=ψz lt))
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
373
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 --
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
375 -- If we have LEM, Replace' is equivalent to Replace
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 --
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
377
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
378 record RXCod (X COD : HOD) (ψ : (x : HOD) → X ∋ x → HOD) : Set (suc n) where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
379 field
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
380 ≤COD : ∀ {x : HOD } → (lt : X ∋ x) → ψ x lt ⊆ COD
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
381
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
382 record Replaced1 (A : HOD) (ψ : (x : Ordinal ) → odef A x → Ordinal ) (x : Ordinal ) : Set n where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
383 field
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
384 z : Ordinal
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
385 az : odef A z
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
386 x=ψz : x ≡ ψ z az
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
387
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
388 Replace' : (X : HOD) → (ψ : (x : HOD) → X ∋ x → HOD) → {C : HOD} → RXCod X C ψ → HOD
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
389 Replace' X ψ {C} rc = record { od = record { def = λ x → Replaced1 X (λ z xz → & (ψ (* z) (subst (λ k → odef X k) (sym &iso) xz) )) x } ; odmax = osuc (& C) ; <odmax = rmax< } where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
390 rmax< : {y : Ordinal} → Replaced1 X (λ z xz → & (ψ (* z) (subst (λ k → odef X k) (sym &iso) xz) )) y → y o< osuc (& C)
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
391 rmax< {y} lt = subst (λ k → k o< osuc (& C)) r01 ( ⊆→o≤ (RXCod.≤COD rc (subst (λ k → odef X k) (sym &iso) (Replaced1.az lt) ))) where
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
392 r01 : & (ψ ( * (Replaced1.z lt ) ) (subst (λ k → odef X k) (sym &iso) (Replaced1.az lt) )) ≡ y
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
393 r01 = sym (Replaced1.x=ψz lt )
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
394
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
395 cod-conv : (X : HOD) → (ψ : (x : HOD) → X ∋ x → HOD) → {C : HOD} → (rc : RXCod X C ψ )
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
396 → RXCod (* (& X)) C (λ y xy → ψ y (subst (λ k → k ∋ y) *iso xy))
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
397 cod-conv X ψ {C} rc = record { ≤COD = λ {x} lt → RXCod.≤COD rc (subst (λ k → odef k (& x)) *iso lt) }
1218
362e43a1477c brain damaged fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1186
diff changeset
398
1294
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
399 Replace'-iso : {X Y : HOD} → {fx : (x : HOD) → X ∋ x → HOD} {fy : (x : HOD) → Y ∋ x → HOD}
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
400 → {CX : HOD} → (rcx : RXCod X CX fx ) → {CY : HOD} → (rcy : RXCod Y CY fy )
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
401 → X ≡ Y → ( (x : HOD) → (xx : X ∋ x ) → (yy : Y ∋ x ) → fx _ xx ≡ fy _ yy )
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
402 → Replace' X fx rcx ≡ Replace' Y fy rcy
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
403 Replace'-iso {X} {X} {fx} {fy} _ _ refl eq = ==→o≡ record { eq→ = ri0 ; eq← = ri1 } where
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
404 ri0 : {x : Ordinal} → Replaced1 X (λ z xz → & (fx (* z) (subst (odef X) (sym &iso) xz))) x
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
405 → Replaced1 X (λ z xz → & (fy (* z) (subst (odef X) (sym &iso) xz))) x
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
406 ri0 {x} record { z = z ; az = az ; x=ψz = x=ψz } = record { z = z ; az = az ; x=ψz = trans x=ψz (cong (&) ( eq _ xz xz )) } where
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
407 xz : X ∋ * z
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
408 xz = subst (λ k → odef X k ) (sym &iso) az
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
409 ri1 : {x : Ordinal} → Replaced1 X (λ z xz → & (fy (* z) (subst (odef X) (sym &iso) xz))) x
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
410 → Replaced1 X (λ z xz → & (fx (* z) (subst (odef X) (sym &iso) xz))) x
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
411 ri1 {x} record { z = z ; az = az ; x=ψz = x=ψz } = record { z = z ; az = az ; x=ψz = trans x=ψz (cong (&) (sym ( eq _ xz xz ))) } where
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
412 xz : X ∋ * z
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
413 xz = subst (λ k → odef X k ) (sym &iso) az
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
414
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
415 Replace'-iso1 : (X : HOD) → (ψ : (x : HOD) → X ∋ x → HOD) → {C : HOD} → (rc : RXCod X C ψ )
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
416 → Replace' (* (& X)) (λ y xy → ψ y (subst (λ k → k ∋ y ) *iso xy) ) (cod-conv X ψ rc)
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
417 ≡ Replace' X ( λ y xy → ψ y xy ) rc
1294
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
418 Replace'-iso1 X ψ rc = Replace'-iso {* (& X)} {X} {λ y xy → ψ y (subst (λ k → k ∋ y ) *iso xy) } { λ y xy → ψ y xy }
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
419 (cod-conv X ψ rc) rc
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
420 *iso (λ x xx yx → fi00 x xx yx ) where
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
421 fi00 : (x : HOD ) → (xx : (* (& X)) ∋ x ) → (yx : X ∋ x) → ψ x (subst (λ k → k ∋ x) *iso xx) ≡ ψ x yx
968feed7cf64 ZPmirror
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1285
diff changeset
422 fi00 x xx yx = cong (λ k → ψ x k ) ( HE.≅-to-≡ ( ∋-irr {X} {& x} (subst (λ k → k ∋ x) *iso xx) yx ) )
1218
362e43a1477c brain damaged fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1186
diff changeset
423
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
424 -- replacement←1 : {ψ : HOD → HOD} (X x : HOD) → X ∋ x → Replace1 X ψ ∋ ψ x
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
425 -- replacement←1 {ψ} X x lt = record { z = & x ; az = lt ; x=ψz = cong (λ k → & (ψ k)) (sym *iso) }
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
426 -- replacement→1 : {ψ : HOD → HOD} (X x : HOD) → (lt : Replace1 X ψ ∋ x) → ¬ ( (y : HOD) → ¬ (x =h= ψ y))
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
427 -- replacement→1 {ψ} X x lt eq = eq (* (Replaced.z lt)) (ord→== (Replaced.x=ψz lt))
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
428
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 _∈_ : ( A B : HOD ) → Set n
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 A ∈ B = B ∋ A
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
431
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
432 Power : HOD → HOD
1453
c6bc9334a3ee cantor passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1303
diff changeset
433 Power A = record { od = record { def = λ x → ( z : Ordinal) → odef (* x) z → odef A z } ; odmax = osuc (& A)
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
434 ; <odmax = p00 } where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
435 p00 : {y : Ordinal} → ((z : Ordinal) → odef (* y) z → odef A z) → y o< osuc (& A)
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
436 p00 {y} y⊆A = p01 where
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
437 p01 : y o≤ & A
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
438 p01 = subst (λ k → k o≤ & A) &iso ( ⊆→o≤ (λ {x} yx → y⊆A x yx ))
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
439
1095
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
440 power→ : ( A t : HOD) → Power A ∋ t → {x : HOD} → t ∋ x → A ∋ x
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
441 power→ A t P∋t {x} t∋x = P∋t (& x) (subst (λ k → odef k (& x) ) (sym *iso) t∋x )
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
442
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
443 power← : (A t : HOD) → ({x : HOD} → (t ∋ x → A ∋ x)) → Power A ∋ t
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
444 power← A t t⊆A z xz = subst (λ k → odef A k ) &iso ( t⊆A (subst₂ (λ j k → odef j k) *iso (sym &iso) xz ))
08b6aa6870d9 OD clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1091
diff changeset
445
1453
c6bc9334a3ee cantor passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1303
diff changeset
446 Power∋∅ : {S : HOD} → odef (Power S) o∅
c6bc9334a3ee cantor passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1303
diff changeset
447 Power∋∅ z xz = ⊥-elim (¬x<0 (subst (λ k → odef k z) o∅≡od∅ xz) )
c6bc9334a3ee cantor passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1303
diff changeset
448
1180
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1175
diff changeset
449 Intersection : (X : HOD ) → HOD -- ∩ X
1186
ffe5bc98f9d1 not-covered
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1180
diff changeset
450 Intersection X = record { od = record { def = λ x → (x o≤ & X ) ∧ ( {y : Ordinal} → odef X y → odef (* y) x )} ; odmax = osuc (& X) ; <odmax = λ lt → proj1 lt }
1180
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1175
diff changeset
451
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
452 empty : (x : HOD ) → ¬ (od∅ ∋ x)
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
453 empty x = ¬x<0
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
454
1180
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1175
diff changeset
455
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 -- {_} : ZFSet → ZFSet
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
457 -- { x } = ( x , x ) -- better to use (x , x) directly
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
458
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
459 data Omega-d : ( x : Ordinal ) → Set n where
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
460 iφ : Omega-d o∅
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
461 isuc : {x : Ordinal } → Omega-d x →
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
462 Omega-d (& ( Union (* x , (* x , * x ) ) ))
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
463
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 -- ω can be diverged in our case, since we have no restriction on the corresponding ordinal of a pair.
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
465 -- We simply assumes Omega-d y has a maximum.
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
466 --
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 -- This means that many of OD may not be HODs because of the & mapping divergence.
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
468 -- We should have some axioms to prevent this .
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
469 --
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
470
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
471 Omega-od : OD
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
472 Omega-od = record { def = λ x → Omega-d x }
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
473
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
474 o∅<x : {x : Ordinal} → o∅ o≤ x
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
475 o∅<x {x} with trio< o∅ x
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
476 ... | tri< a ¬b ¬c = o<→≤ a
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
477 ... | tri≈ ¬a b ¬c = o≤-refl0 b
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
478 ... | tri> ¬a ¬b c = ⊥-elim (¬x<0 c)
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
479
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
480 ¬0=ux : {x : HOD} → ¬ o∅ ≡ & (Union ( x , ( x , x)))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
481 ¬0=ux {x} eq = ⊥-elim ( o<¬≡ eq (ordtrans≤-< o∅<x (subst (λ k → k o< & (Union (x , (x , x)))) &iso (c<→o< lemma ) ))) where
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
482 lemma : Own (x , (x , x)) (& ( * (& x )))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
483 lemma = record { owner = _ ; ao = case2 refl ; ox = subst₂ (λ j k → odef j k ) (sym *iso) (sym &iso) (case1 refl) }
1297
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
484
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
485 ux-2cases : {x y : HOD } → Union ( x , ( x , x)) ∋ y → ( x ≡ y ) ∨ ( x ∋ y )
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
486 ux-2cases {x} {y} record { owner = owner ; ao = (case1 eq) ; ox = ox } = case2 (subst (λ k → odef k (& y)) (trans (cong (*) eq) *iso) ox)
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
487 ux-2cases {x} {y} record { owner = owner ; ao = (case2 eq) ; ox = ox } with subst (λ k → odef k (& y)) (trans (cong (*) eq) *iso) ox
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
488 ... | case1 eq = case1 (sym (&≡&→≡ eq))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
489 ... | case2 eq = case1 (sym (&≡&→≡ eq))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
490
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
491 ux-transitve : {x y : HOD} → x ∋ y → Union ( x , ( x , x)) ∋ y
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
492 ux-transitve {x} {y} ox = record { owner = _ ; ao = case1 refl ; ox = subst (λ k → odef k (& y)) (sym *iso) ox }
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
493
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
494 --
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
495 -- Possible Ordinal Limit
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
496 --
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
497
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
498 -- our Ordinals is greater than Union ( x , ( x , x)) transitive closure
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
499 --
1297
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
500 record ODAxiom-ho< : Set (suc n) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
501 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
502 omega : Ordinal
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
503 ho< : {x : Ordinal } → Omega-d x → x o< omega
1297
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
504
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
505 postulate
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
506 odaxion-ho< : ODAxiom-ho<
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
507
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
508 open ODAxiom-ho< odaxion-ho<
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1294
diff changeset
509
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
510 Omega : HOD
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
511 Omega = record { od = record { def = λ x → Omega-d x } ; odmax = omega ; <odmax = ho<}
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
512
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
513 infinity∅ : Omega ∋ od∅
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
514 infinity∅ = subst (λ k → odef Omega k ) lemma iφ where
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
515 lemma : o∅ ≡ & od∅
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
516 lemma = let open ≡-Reasoning in begin
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
517 o∅
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
518 ≡⟨ sym &iso ⟩
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
519 & ( * o∅ )
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
520 ≡⟨ cong ( λ k → & k ) o∅≡od∅ ⟩
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
521 & od∅
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
522
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
523
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
524 infinity : (x : HOD) → Omega ∋ x → Omega ∋ Union (x , (x , x ))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
525 infinity x lt = subst (λ k → odef Omega k ) lemma (isuc {& x} lt) where
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
526 lemma : & (Union (* (& x) , (* (& x) , * (& x))))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
527 ≡ & (Union (x , (x , x)))
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
528 lemma = cong (λ k → & (Union ( k , ( k , k ) ))) *iso
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
529
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
530 pair→ : ( x y t : HOD ) → (x , y) ∋ t → ( t =h= x ) ∨ ( t =h= y )
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 pair→ x y t (case1 t≡x ) = case1 (subst₂ (λ j k → j =h= k ) *iso *iso (o≡→== t≡x ))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
532 pair→ x y t (case2 t≡y ) = case2 (subst₂ (λ j k → j =h= k ) *iso *iso (o≡→== t≡y ))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
533
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
534 pair← : ( x y t : HOD ) → ( t =h= x ) ∨ ( t =h= y ) → (x , y) ∋ t
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 pair← x y t (case1 t=h=x) = case1 (cong (λ k → & k ) (==→o≡ t=h=x))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 pair← x y t (case2 t=h=y) = case2 (cong (λ k → & k ) (==→o≡ t=h=y))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
537
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
538 o<→c< : {x y : Ordinal } → x o< y → (Ord x) ⊆ (Ord y)
1096
55ab5de1ae02 recovery
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
539 o<→c< lt {z} ox = ordtrans ox lt
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
540
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 ⊆→o< : {x y : Ordinal } → (Ord x) ⊆ (Ord y) → x o< osuc y
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
542 ⊆→o< {x} {y} lt with trio< x y
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 ⊆→o< {x} {y} lt | tri< a ¬b ¬c = ordtrans a <-osuc
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 ⊆→o< {x} {y} lt | tri≈ ¬a b ¬c = subst ( λ k → k o< osuc y) (sym b) <-osuc
1096
55ab5de1ae02 recovery
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
545 ⊆→o< {x} {y} lt | tri> ¬a ¬b c with lt (o<-subst c (sym &iso) refl )
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 ... | ttt = ⊥-elim ( o<¬≡ refl (o<-subst ttt &iso refl ))
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
547
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 ψiso : {ψ : HOD → Set n} {x y : HOD } → ψ x → x ≡ y → ψ y
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 ψiso {ψ} t refl = t
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 selection : {ψ : HOD → Set n} {X y : HOD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
551 selection {ψ} {X} {y} = ⟪
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 ( λ cond → ⟪ proj1 cond , ψiso {ψ} (proj2 cond) (sym *iso) ⟫ )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 , ( λ select → ⟪ proj1 select , ψiso {ψ} (proj2 select) *iso ⟫ )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
554
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
555
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
556 selection-in-domain : {ψ : HOD → Set n} {X y : HOD} → Select X ψ ∋ y → X ∋ y
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 selection-in-domain {ψ} {X} {y} lt = proj1 ((proj2 (selection {ψ} {X} )) lt)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
558
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 ---
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 --- Power Set
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 ---
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
562 --- First consider ordinals in HOD
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 ---
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
564 --- A ∩ x = record { def = λ y → odef A y ∧ odef x y } subset of A
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
565 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
566 --
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 ∩-≡ : { a b : HOD } → ({x : HOD } → (a ∋ x → b ∋ x)) → a =h= ( b ∩ a )
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
568 ∩-≡ {a} {b} inc = record {
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 eq→ = λ {x} x<a → ⟪ (subst (λ k → odef b k ) &iso (inc (d→∋ a x<a))) , x<a ⟫ ;
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
570 eq← = λ {x} x<a∩b → proj2 x<a∩b }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
571
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
572 extensionality0 : {A B : HOD } → ((z : HOD) → (A ∋ z) ⇔ (B ∋ z)) → A =h= B
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
573 eq→ (extensionality0 {A} {B} eq ) {x} d = odef-iso {A} {B} (sym &iso) (proj1 (eq (* x))) d
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
574 eq← (extensionality0 {A} {B} eq ) {x} d = odef-iso {B} {A} (sym &iso) (proj2 (eq (* x))) d
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
575
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
576 extensionality : {A B w : HOD } → ((z : HOD ) → (A ∋ z) ⇔ (B ∋ z)) → (w ∋ A) ⇔ (w ∋ B)
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
577 proj1 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) ( ==→o≡ (extensionality0 {A} {B} eq) ) d
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
578 proj2 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) (sym ( ==→o≡ (extensionality0 {A} {B} eq) )) d
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
579
1284
45cd80181a29 remove import zf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1223
diff changeset
580 open import zf
45cd80181a29 remove import zf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1223
diff changeset
581
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
582 record ODAxiom-sup : Set (suc n) where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
583 field
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
584 sup-o : (A : HOD) → ( ( x : Ordinal ) → def (od A) x → Ordinal ) → Ordinal -- required in Replace
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
585 sup-o≤ : (A : HOD) → { ψ : ( x : Ordinal ) → def (od A) x → Ordinal }
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
586 → ∀ {x : Ordinal } → (lt : def (od A) x ) → ψ x lt o≤ sup-o A ψ
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
587 sup-c≤ : (ψ : HOD → HOD) → {X x : HOD} → def (od X) (& x) → & (ψ x) o≤ (sup-o X (λ y X∋y → & (ψ (* y))))
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
588 sup-c≤ ψ {X} {x} lt = subst (λ k → & (ψ k) o< _ ) *iso (sup-o≤ X lt )
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
589
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
590 -- sup-o may contradict
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
591 -- If we have open monotonic function in Ordinal, there is no sup-o.
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
592 -- for example, if we may have countable sequence of Ordinal, which contains some ordinal larger than any given Ordinal.
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
593 -- This happens when we have a coutable model. In this case, we have to have codomain restriction in Replacement axiom.
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
594 -- that is, Replacement axiom does not create new ZF set.
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
595
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
596 open ODAxiom-sup
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
597
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
598 ZFReplace : ODAxiom-sup → HOD → (HOD → HOD) → HOD
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
599 ZFReplace os X ψ = record { od = record { def = λ x → Replaced X (λ z → & (ψ (* z))) x } ; odmax = rmax ; <odmax = rmax< } where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
600 rmax : Ordinal
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
601 rmax = osuc ( sup-o os X (λ y X∋y → & (ψ (* y) )) )
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
602 rmax< : {y : Ordinal} → Replaced X (λ z → & (ψ (* z))) y → y o< rmax
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
603 rmax< {y} lt = subst (λ k → k o< rmax) r01 ( sup-o≤ os X (Replaced.az lt) ) where
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
604 r01 : & (ψ ( * (Replaced.z lt ) )) ≡ y
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
605 r01 = sym (Replaced.x=ψz lt )
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
606
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
607 zf-replacement← : (os : ODAxiom-sup) → {ψ : HOD → HOD} (X x : HOD) → X ∋ x → ZFReplace os X ψ ∋ ψ x
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
608 zf-replacement← os {ψ} X x lt = record { z = & x ; az = lt ; x=ψz = cong (λ k → & (ψ k)) (sym *iso) }
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
609 zf-replacement→ : (os : ODAxiom-sup ) → {ψ : HOD → HOD} (X x : HOD) → (lt : ZFReplace os X ψ ∋ x) → ¬ ( (y : HOD) → ¬ (x =h= ψ y))
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
610 zf-replacement→ os {ψ} X x lt eq = eq (* (Replaced.z lt)) (ord→== (Replaced.x=ψz lt))
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
611
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
612 isZF : (os : ODAxiom-sup) → IsZF HOD _∋_ _=h=_ od∅ _,_ Union Power Select (ZFReplace os) Omega
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
613 isZF os = record {
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
614 isEquivalence = record { refl = ==-refl ; sym = ==-sym; trans = ==-trans }
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 ; pair→ = pair→
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
616 ; pair← = pair←
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
617 ; union→ = union→
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 ; union← = union←
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
619 ; empty = empty
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
620 ; power→ = power→
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
621 ; power← = power←
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
622 ; extensionality = λ {A} {B} {w} → extensionality {A} {B} {w}
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
623 ; ε-induction = ε-induction
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
624 ; infinity∅ = infinity∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 ; infinity = infinity
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
626 ; selection = λ {X} {ψ} {y} → selection {X} {ψ} {y}
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
627 ; replacement← = zf-replacement← os
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
628 ; replacement→ = λ {ψ} → zf-replacement→ os {ψ}
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
629 }
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
630
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
631 HOD→ZF : ODAxiom-sup → ZF
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
632 HOD→ZF os = record {
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
633 ZFSet = HOD
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
634 ; _∋_ = _∋_
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
635 ; _≈_ = _=h=_
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
636 ; ∅ = od∅
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
637 ; _,_ = _,_
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
638 ; Union = Union
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 ; Power = Power
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
640 ; Select = Select
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
641 ; Replace = ZFReplace os
1300
47d3cc596d68 remove next
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1297
diff changeset
642 ; infinite = Omega
1285
302cfb533201 fix Replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1284
diff changeset
643 ; isZF = isZF os
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
644 }
431
a5f8084b8368 reorganiztion for apkg
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
645
1091
63c1167b2343 fix comments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1007
diff changeset
646