Mercurial > hg > Members > kono > Proof > ZF-in-agda
changeset 1373:1da09696a256
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Jun 2023 12:26:09 +0900 |
parents | 4b7a756dae33 |
children | 51ccc9daa979 |
files | src/bijection.agda |
diffstat | 1 files changed, 13 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bijection.agda Thu Jun 22 09:20:17 2023 +0900 +++ b/src/bijection.agda Thu Jun 22 12:26:09 2023 +0900 @@ -731,24 +731,19 @@ cb=n : count-B cb ≡ suc n lem01 : (n i : ℕ) → suc n ≤ count-B i → CountB n - lem01 zero zero le with is-B (fun← cn 0) | inspect count-B zero - ... | yes isb | record { eq = eq1 } = record { b = Is.a isb ; cb = 0 ; b=cn = sym (Is.fa=c isb) ; cb=n = eq1 } - ... | no nisb | record { eq = eq1 } = ⊥-elim ( nat-≤> le a<sa) - lem01 zero (suc i) le with ≤-∨ le - ... | case1 eq with is-B (fun← cn (suc i)) | inspect count-B (suc i) - ... | yes isb | record { eq = eq1 } = record { b = Is.a isb ; cb = suc i ; b=cn = sym (Is.fa=c isb) ; cb=n = trans eq1 (sym eq) } - ... | no nisb | record { eq = eq1 } = lem01 zero i le - lem01 zero (suc i) le | case2 lt with is-B (fun← cn (suc i)) | inspect count-B (suc i) - ... | yes isb | record { eq = eq1 } = record { b = Is.a isb ; cb = suc i ; b=cn = sym (Is.fa=c isb) ; cb=n = trans eq1 ? } - ... | no nisb | record { eq = eq1 } = lem01 zero i le - lem01 (suc n) zero () - lem01 (suc n) (suc i) n≤i with is-B (fun← cn (suc i)) - ... | no nisB = lem01 (suc n) i n≤i - ... | yes isB with <-cmp (count-B (suc i)) (suc n) - ... | tri< a ¬b ¬c = lem01 (suc n) i ? - ... | tri≈ ¬a eq ¬c = record { b = Is.a isB ; cb = suc i ; b=cn = sym (Is.fa=c isB) ; cb=n = ? } - ... | tri> ¬a ¬b c = lem01 (suc n) i ? - + lem01 n i le = ? where + -- starting from 0, if count B i ≡ suc n, this is it + lem03 : (i m : ℕ ) → i ≤ m → count-B i < count-B m → CountB i + lem03 0 0 i≤m ci<cm = ⊥-elim ( nat-≡< refl ci<cm ) + lem03 0 (suc m) i≤m ci<cm with is-B (fun← cn (suc m)) | inspect count-B (suc m) + ... | yes isb | record { eq = eq1 } with <-cmp 0 (count-B m) + ... | tri≈ ¬a cb=0 ¬c = record { b = Is.a isb ; cb = suc m ; b=cn = sym (Is.fa=c isb) ; cb=n = trans eq1 (cong suc (sym cb=0)) } + ... | tri< 0<cb ¬b ¬c with count-B m | inspect count-B m + ... | 0 | record { eq = eq2 } = record { b = Is.a isb ; cb = suc m ; b=cn = sym (Is.fa=c isb) ; cb=n = trans eq1 refl } + ... | suc cb | record { eq = eq2 } = lem03 0 m z≤n (subst (λ k → _ < k ) (sym eq2) (x≤y→x<sy ?) ) + lem03 zero (suc m) z≤n ci<cm | no nisb | record { eq = eq1 } = lem03 0 m z≤n (<-transˡ a<sa ci<cm) + lem03 (suc i) 0 i≤m ci<cm = ? + lem03 (suc i) (suc m) i≤m ci<cm = ? ntob : (n : ℕ) → B ntob n = CountB.b (lem01 n (maxAC.ac (lem02 n)) (≤-trans (maxAC.n<ca (lem02 n)) (ca≤cb0 (maxAC.ac (lem02 n))) ))