# HG changeset patch # User Shinji KONO # Date 1620435874 -32400 # Node ID 849f85e543f1a8cb2e164209f04e703628c27939 # Parent 4e58611b1fb149d3468c2886f7a7a137ea92b270 char-cong diff -r 4e58611b1fb1 -r 849f85e543f1 src/CCC.agda --- a/src/CCC.agda Thu Apr 29 11:16:18 2021 +0900 +++ b/src/CCC.agda Sat May 08 10:04:34 2021 +0900 @@ -1,3 +1,4 @@ +{-# OPTIONS --allow-unsolved-metas #-} open import Level open import Category module CCC where @@ -206,15 +207,40 @@ open Mono +iso-mono : {c₁ c₂ ℓ : Level} (A : Category c₁ c₂ ℓ) {a b c : Obj A } {m : Hom A a b} ( mono : Mono A m ) (i : Iso A a c ) → Mono A (A [ m o Iso.≅← i ] ) +iso-mono A {a} {b} {c} {m} mono i = record { isMono = λ {d} f g → im f g } where + im : {d : Obj A} (f g : Hom A d c ) → A [ A [ A [ m o Iso.≅← i ] o f ] ≈ A [ A [ m o Iso.≅← i ] o g ] ] → A [ f ≈ g ] + im {d} f g mf=mg = begin + f ≈↑⟨ idL ⟩ + id1 A _ o f ≈↑⟨ car (Iso.iso← i) ⟩ + ( Iso.≅→ i o Iso.≅← i) o f ≈↑⟨ assoc ⟩ + Iso.≅→ i o (Iso.≅← i o f) ≈⟨ cdr ( Mono.isMono mono _ _ (if=ig mf=mg) ) ⟩ + Iso.≅→ i o (Iso.≅← i o g) ≈⟨ assoc ⟩ + ( Iso.≅→ i o Iso.≅← i) o g ≈⟨ car (Iso.iso← i) ⟩ + id1 A _ o g ≈⟨ idL ⟩ + g ∎ where + open ≈-Reasoning A + if=ig : ( m o Iso.≅← i ) o f ≈ ( m o Iso.≅← i ) o g → m o (Iso.≅← i o f ) ≈ m o ( Iso.≅← i o g ) + if=ig eq = trans-hom assoc (trans-hom eq (sym-hom assoc ) ) + + record IsTopos {c₁ c₂ ℓ : Level} (A : Category c₁ c₂ ℓ) (c : CCC A) ( Ω : Obj A ) ( ⊤ : Hom A (CCC.1 c) Ω ) (Ker : {a : Obj A} → ( h : Hom A a Ω ) → Equalizer A h (A [ ⊤ o (CCC.○ c a) ])) (char : {a b : Obj A} → (m : Hom A b a) → Mono A m → Hom A a Ω) : Set ( suc c₁ ⊔ suc c₂ ⊔ suc ℓ ) where field - char-uniqueness : {a b : Obj A } {h : Hom A a Ω} (m : Hom A b a) → (mono : Mono A m) + char-uniqueness : {a b : Obj A } {h : Hom A a Ω} → A [ char (equalizer (Ker h)) (record { isMono = λ f g → monic (Ker h)}) ≈ h ] + char-cong : {a b : Obj A } { m m' : Hom A b a } { mono : Mono A m } { mono' : Mono A m' } + → A [ m ≈ m' ] → A [ char m mono ≈ char m' mono' ] ker-m : {a b : Obj A} → (m : Hom A b a ) → (mono : Mono A m) → IsEqualizer A m (char m mono) (A [ ⊤ o (CCC.○ c a) ]) + char-iso : {a b c : Obj A } {m : Hom A a b} {h : Hom A b Ω}( mono : Mono A m ) → ( i : Iso A a (equalizer-c (Ker h)) ) + → A [ char (A [ m o Iso.≅← i ]) (iso-mono A mono i) ≈ h ] + char-iso {a} {b} {c} {m} {h} mono i = begin + char ( m o Iso.≅← i ) (iso-mono A mono i) ≈⟨ char-cong {!!} ⟩ + char (equalizer (Ker h)) (record { isMono = λ f g → monic (Ker h) }) ≈⟨ char-uniqueness {b} {a} {h} ⟩ + h ∎ where open ≈-Reasoning A ker : {a : Obj A} → ( h : Hom A a Ω ) → Hom A ( equalizer-c (Ker h) ) a ker h = equalizer (Ker h) char-m=⊤ : {a b : Obj A} → (m : Hom A b a) → (mono : Mono A m) → A [ A [ char m mono o m ] ≈ A [ ⊤ o CCC.○ c b ] ] diff -r 4e58611b1fb1 -r 849f85e543f1 src/CCCSets.agda --- a/src/CCCSets.agda Thu Apr 29 11:16:18 2021 +0900 +++ b/src/CCCSets.agda Sat May 08 10:04:34 2021 +0900 @@ -136,7 +136,7 @@ ; Ker = tker ; char = λ m mono → tchar m mono ; isTopos = record { - char-uniqueness = λ {a} {b} {h} m mono → extensionality Sets ( λ x → uniq h m mono x ) + char-uniqueness = λ {a} {b} {h} → extensionality Sets ( λ x → uniq h x ) ; ker-m = λ m mono → equalizerIso _ _ (tker (tchar m mono)) m (isol m mono) } } where @@ -165,9 +165,9 @@ ... | case2 f = false -- imequ : {a b : Obj Sets} (m : Hom Sets b a) (mono : Mono Sets m) → IsEqualizer Sets m (tchar m mono) (Sets [ (λ _ → true ) o CCC.○ sets a ]) -- imequ {a} {b} m mono = equalizerIso _ _ (tker (tchar m mono)) m (isol m mono) - uniq : {a : Obj (Sets {c})} {b : Obj Sets} (h : Hom Sets a Bool) (m : Hom Sets b a) (mono : Mono Sets m) (y : a) → + uniq : {a : Obj (Sets {c})} (h : Hom Sets a Bool) (y : a) → tchar (Equalizer.equalizer (tker h)) (record { isMono = λ f g → monic (tker h) }) y ≡ h y - uniq {a} {b} h m mono y with h y | inspect h y | lem (image (Equalizer.equalizer (tker h)) y ) | inspect (tchar (Equalizer.equalizer (tker h)) (record { isMono = λ f g → monic (tker h) })) y + uniq {a} h y with h y | inspect h y | lem (image (Equalizer.equalizer (tker h)) y ) | inspect (tchar (Equalizer.equalizer (tker h)) (record { isMono = λ f g → monic (tker h) })) y ... | true | record { eq = eqhy } | case1 x | record { eq = eq1 } = eq1 ... | true | record { eq = eqhy } | case2 x | record { eq = eq1 } = ⊥-elim (x (isImage (elem y eqhy))) ... | false | record { eq = eqhy } | case1 (isImage (elem x eq)) | record { eq = eq1 } = ⊥-elim ( ¬x≡t∧x≡f record {fst = eqhy ; snd = eq }) diff -r 4e58611b1fb1 -r 849f85e543f1 src/ToposIL.agda --- a/src/ToposIL.agda Thu Apr 29 11:16:18 2021 +0900 +++ b/src/ToposIL.agda Sat May 08 10:04:34 2021 +0900 @@ -104,37 +104,34 @@ _⊢_ {a} {b} p q = {c : Obj A} (h : Hom A c b ) → A [ Poly.f p ∙ h ≈ (Topos.⊤ t) ∙ ○ c ] → A [ Poly.f q ∙ h ≈ (Topos.⊤ t) ∙ ○ c ] -- --- iso ○ b --- e ⇐====⇒ b -----------→ 1 +-- iso ○ c +-- e ⇐====⇒ c -----------→ 1 -- | | | -- | h | | ⊤ -- | ↓ char h ↓ --- + ------→ 1 -----------→ Ω +-- + ------→ b -----------→ Ω -- ker h fp / fq -- - tl01 : {a b : Obj A} (p : Poly a (Topos.Ω t) b ) (q : Poly a (Topos.Ω t) b ) + tl01 : {a b : Obj A} (p q : Poly a (Topos.Ω t) b ) → p ⊢ q → q ⊢ p → A [ Poly.f p ≈ Poly.f q ] tl01 {a} {b} p q p