# HG changeset patch # User Shinji KONO # Date 1686098578 -32400 # Node ID 66a6804d867b44df7d6114e669cdc4ff57eae00f # Parent c97660e1953562ad7d47610b4a794919688839ba ... diff -r c97660e19535 -r 66a6804d867b src/OD.agda --- a/src/OD.agda Mon Jun 05 14:50:02 2023 +0900 +++ b/src/OD.agda Wed Jun 07 09:42:58 2023 +0900 @@ -343,6 +343,10 @@ union← : (X z : HOD) (X∋z : Union X ∋ z) → ¬ ( (u : HOD ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) 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 ⟫ ) +-- +-- +-- + record RCod (COD : HOD) (ψ : HOD → HOD) : Set (suc n) where field ≤COD : ∀ {x : HOD } → ψ x ⊆ COD diff -r c97660e19535 -r 66a6804d867b src/ZProduct.agda --- a/src/ZProduct.agda Mon Jun 05 14:50:02 2023 +0900 +++ b/src/ZProduct.agda Wed Jun 07 09:42:58 2023 +0900 @@ -362,7 +362,7 @@ field i→ : (x : Ordinal ) → odef (* A) x → Ordinal iB : (x : Ordinal ) → ( lt : odef (* A) x ) → odef (* B) ( i→ x lt ) - iiso : (x y : Ordinal ) → ( ltx : odef (* A) x ) ( lty : odef (* A) y ) → i→ x ltx ≡ i→ y lty → x ≡ y + inject : (x y : Ordinal ) → ( ltx : odef (* A) x ) ( lty : odef (* A) y ) → i→ x ltx ≡ i→ y lty → x ≡ y record HODBijection (A B : HOD ) : Set n where field diff -r c97660e19535 -r 66a6804d867b src/bijection.agda --- a/src/bijection.agda Mon Jun 05 14:50:02 2023 +0900 +++ b/src/bijection.agda Wed Jun 07 09:42:58 2023 +0900 @@ -475,8 +475,96 @@ lb07 : (x : List Bool) → pred (lton1 x ) ≡ suc n → lb+1 (true ∷ t) ≡ x lb07 x eq1 = lb=b (lb+1 (true ∷ t)) x (trans ( lb02 (true ∷ t) lb03 ) (sym eq1)) -Bernstein : (A B C D : Set) → Bijection A D → Bijection C D → (f : A → B ) → (g : B → C ) → Bijection B D -Bernstein A B C D ad cd f g = ? +-- Bernstein is non constructive, so we cannot use this without some assumption +-- but in case of ℕ, we can construct it directly. + +record InjectiveF (A B : Set) : Set where + field + f : A → B + inject : {x y : A} → f x ≡ f y → x ≡ y + +record Is (A C : Set) (f : A → C) (c : C) : Set where + field + a : A + fa=c : f a ≡ c + +Countable-Bernstein : (A B C : Set) → Bijection A ℕ → Bijection C ℕ + → (fi : InjectiveF A B ) → (gi : InjectiveF B C ) + → (is-A : (c : C ) → Dec (Is A C (λ x → (InjectiveF.f gi (InjectiveF.f fi x))) c )) → (is-B : (c : C ) → Dec (Is B C (InjectiveF.f gi) c) ) + → Bijection B ℕ +Countable-Bernstein A B C an cn fi gi is-A is-B = record { + fun→ = λ x → bton x + ; fun← = λ n → ntob n + ; fiso→ = λ n → ? + ; fiso← = λ x → ? + } where + -- + -- an f g cn + -- ℕ → A → B → C → ℕ + -- + open Bijection + f = InjectiveF.f fi + g = InjectiveF.f gi + + cbn : ℕ → ℕ + cbn n = fun→ cn (g (f (fun← an (suc n)))) + + -- + -- count number of valid A and B in C + -- the count of B is the numner of B in Bijection B ℕ + -- if we have a , number a of A is larger than the numner of B C, so we have the inverse + -- + record CB (n : ℕ) : Set where + field + ca cb : ℕ + cb≤n : cb ≤ suc n + ca≤cb : ca ≤ cb + na : {i : ℕ} → i < ca → A + nb : {i : ℕ} → i < cb → B + ia : {i j : ℕ } → { i