| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Topos
Contents
Description
Elementary toposes: HasSubobjectClassifier provides the object Omega of truth values
classifying monomorphisms, HasEpiMonoFactorization the image factorization, and
ElementaryTopos combines these with finite (co)limits and exponentials, yielding the internal
logic (false, and, or, implies).
Synopsis
- class (HasProducts k, Ob (Omega :: k)) => HasSubobjectClassifier k where
- type Omega :: k
- true :: (TerminalObject :: k) ~> (Omega :: k)
- classifyGraph :: forall (a :: k) (b :: k). (a ~> b) -> (a && b) ~> (Omega :: k)
- isEq :: forall {k} (a :: k). (HasSubobjectClassifier k, Ob a) => (a && a) ~> (Omega :: k)
- classifyImage :: forall {k} (a :: k) (b :: k). (HasSubobjectClassifier k, HasPushouts k) => (a ~> b) -> b ~> (Omega :: k)
- classifyKernelPair :: forall {k} (a :: k) (b :: k). HasSubobjectClassifier k => (a ~> b) -> (a && a) ~> (Omega :: k)
- class CategoryOf k => HasEpiMonoFactorization k where
- defaultFactorize :: forall k (a :: k) (b :: k). (HasPushouts k, HasEqualizers k) => (a ~> b) -> (Hom k :.: Hom k) a b
- defaultFactorizeDual :: forall k (a :: k) (b :: k). (HasPullbacks k, HasCoequalizers k) => (a ~> b) -> (Hom k :.: Hom k) a b
- type HasFiniteLimits k = (HasProducts k, HasPullbacks k, HasEqualizers k)
- type HasFiniteColimits k = (HasCoproducts k, HasPushouts k, HasCoequalizers k)
- class (HasFiniteLimits k, HasFiniteColimits k, CCC k, HasSubobjectClassifier k, HasEpiMonoFactorization k) => ElementaryTopos k
- false :: ElementaryTopos k => (TerminalObject :: k) ~> (Omega :: k)
- and :: ElementaryTopos k => ((Omega :: k) && (Omega :: k)) ~> (Omega :: k)
- or :: ElementaryTopos k => ((Omega :: k) && (Omega :: k)) ~> (Omega :: k)
- implies :: ElementaryTopos k => ((Omega :: k) && (Omega :: k)) ~> (Omega :: k)
- not :: ElementaryTopos k => (Omega :: k) ~> (Omega :: k)
- doubleNegation :: ElementaryTopos k => (Omega :: k) ~> (Omega :: k)
- openTopology :: ElementaryTopos k => ((TerminalObject :: k) ~> (Omega :: k)) -> (Omega :: k) ~> (Omega :: k)
- closedTopology :: ElementaryTopos k => ((TerminalObject :: k) ~> (Omega :: k)) -> (Omega :: k) ~> (Omega :: k)
Documentation
class (HasProducts k, Ob (Omega :: k)) => HasSubobjectClassifier k where Source Github #
Minimal complete definition
Methods
true :: (TerminalObject :: k) ~> (Omega :: k) Source Github #
default true :: (HasProducts k, HasPushouts k) => (TerminalObject :: k) ~> (Omega :: k) Source Github #
classifyGraph :: forall (a :: k) (b :: k). (a ~> b) -> (a && b) ~> (Omega :: k) Source Github #
Classify the graph (id *** f :: a ~> a && b) of a morphism f.
This is a minimal primitive that works for any morphism.
Instances
| HasSubobjectClassifier FINHASK Source Github # |
| ||||
Defined in Proarrow.Category.Instance.FinHask Associated Types
| |||||
| HasSubobjectClassifier FINSET Source Github # |
| ||||
Defined in Proarrow.Category.Instance.FinSet Associated Types
| |||||
| (StableSite t k, HasFiniteCovers t k, FiniteCat j, FiniteCat k) => HasSubobjectClassifier (PROD (SHEAVES t j k)) Source Github # | The classifier is the closed sieves, and an arrow is classified by | ||||
Defined in Proarrow.Category.Enriched.Finitary.Sheaf Associated Types
| |||||
| (FiniteCat j, FiniteCat k) => HasSubobjectClassifier (PROD (FINITARY j k)) Source Github # | The subobject classifier is the profunctor of sieves, and an arrow classifies its graph. | ||||
Defined in Proarrow.Category.Enriched.Finitary.Topos Associated Types
| |||||
isEq :: forall {k} (a :: k). (HasSubobjectClassifier k, Ob a) => (a && a) ~> (Omega :: k) Source Github #
classifyImage :: forall {k} (a :: k) (b :: k). (HasSubobjectClassifier k, HasPushouts k) => (a ~> b) -> b ~> (Omega :: k) Source Github #
classify f classifies the image of f. If f is mono, then this returns its characteristic map.
classifyKernelPair :: forall {k} (a :: k) (b :: k). HasSubobjectClassifier k => (a ~> b) -> (a && a) ~> (Omega :: k) Source Github #
class CategoryOf k => HasEpiMonoFactorization k where Source Github #
Minimal complete definition
Nothing
Methods
factorize :: forall (a :: k) (b :: k). (a ~> b) -> (Hom k :.: Hom k) a b Source Github #
Factor an arrow as an epi followed by a mono. Defaults to defaultFactorize, the image
factorization via the cokernel pair, which applies whenever k has pushouts and equalizers.
default factorize :: forall (a :: k) (b :: k). (HasPushouts k, HasEqualizers k) => (a ~> b) -> (Hom k :.: Hom k) a b Source Github #
Instances
| HasEpiMonoFactorization COST Source Github # | |
| HasEpiMonoFactorization FINHASK Source Github # | |
| HasEpiMonoFactorization FINSET Source Github # | |
| Indexed k => HasEpiMonoFactorization (CODISCRETE k) Source Github # | |
Defined in Proarrow.Category.Instance.Discrete Methods factorize :: forall (a :: CODISCRETE k) (b :: CODISCRETE k). (a ~> b) -> (Hom (CODISCRETE k) :.: Hom (CODISCRETE k)) a b Source Github # | |
| Indexed k => HasEpiMonoFactorization (DISCRETE k) Source Github # | |
| (Fractional a, Eq a) => HasEpiMonoFactorization (MatK a) Source Github # | Epi-mono factorization is computed via
|
| HasEpiMonoFactorization (ORDINAL n) Source Github # | |
| HasEpiMonoFactorization k => HasEpiMonoFactorization (PROD k) Source Github # | Image factorization is unchanged by making the tensor the product. |
| (Enumerable j, Enumerable k) => HasEpiMonoFactorization (FINITARY j k) Source Github # | The image of a natural transformation is the equalizer of its cokernel pair. |
| (HasPushouts j, HasEqualizers j, HasPushouts k, HasEqualizers k) => HasEpiMonoFactorization (COPRODUCT j k) Source Github # | |
| (HasFiniteCovers t k, FiniteCat j, FiniteCat k) => HasEpiMonoFactorization (SHEAVES t j k) Source Github # | The image of an arrow of sheaves, by the same cokernel-pair construction as in |
defaultFactorize :: forall k (a :: k) (b :: k). (HasPushouts k, HasEqualizers k) => (a ~> b) -> (Hom k :.: Hom k) a b Source Github #
defaultFactorizeDual :: forall k (a :: k) (b :: k). (HasPullbacks k, HasCoequalizers k) => (a ~> b) -> (Hom k :.: Hom k) a b Source Github #
type HasFiniteLimits k = (HasProducts k, HasPullbacks k, HasEqualizers k) Source Github #
type HasFiniteColimits k = (HasCoproducts k, HasPushouts k, HasCoequalizers k) Source Github #
class (HasFiniteLimits k, HasFiniteColimits k, CCC k, HasSubobjectClassifier k, HasEpiMonoFactorization k) => ElementaryTopos k Source Github #
Instances
| ElementaryTopos FINHASK Source Github # | |
Defined in Proarrow.Category.Instance.FinHask | |
| ElementaryTopos FINSET Source Github # | |
Defined in Proarrow.Category.Instance.FinSet | |
| (StableSite t k, HasFiniteCovers t k, FiniteCat j, FiniteCat k) => ElementaryTopos (PROD (SHEAVES t j k)) Source Github # | The topos of sheaves. Finite limits and colimits, cartesian closed, a subobject classifier, and image factorization, all defined above and none of them postulated. The exponential needs |
Defined in Proarrow.Category.Enriched.Finitary.Sheaf | |
| (FiniteCat j, FiniteCat k) => ElementaryTopos (PROD (FINITARY j k)) Source Github # | Finitary profunctors between finite categories form an elementary topos: finite limits and colimits, cartesian closed, a subobject classifier, and image factorization. |
Defined in Proarrow.Category.Enriched.Finitary.Topos | |
false :: ElementaryTopos k => (TerminalObject :: k) ~> (Omega :: k) Source Github #
not :: ElementaryTopos k => (Omega :: k) ~> (Omega :: k) Source Github #
Negation: the classifying map of false, which is a mono as every arrow out of the terminal
object is. The same arrow as u ⇒ false.
Lawvere–Tierney topologies
A Lawvere–Tierney topology is an arrow j :: that fixes Omega ~> Omegatrue, is
idempotent and preserves and. Its sheaves form a subtopos. Every topos has the two extremes,
id (every object a sheaf) and (only the terminal one), and the internal
logic gives the ones below. A coverage gives another, by closing sieves:
const truelawvereTierney.
Proarrow.Testing.Laws.testLawvereTierney checks the three laws.
doubleNegation :: ElementaryTopos k => (Omega :: k) ~> (Omega :: k) Source Github #
The double-negation topology ¬¬, whose sheaves form the smallest dense subtopos, and a
Boolean one. On a presheaf topos it is the dense topology: a sieve on a covers when every arrow
into a can be extended to one in the sieve. When every cospan can be completed to a commuting
square (the Ore condition, which pullbacks provide), that is the atomic topology, so there
Atomic computes this by closing sieves. In a Boolean topos it is id.
openTopology :: ElementaryTopos k => ((TerminalObject :: k) ~> (Omega :: k)) -> (Omega :: k) ~> (Omega :: k) Source Github #
The open topology of a truth value u: u ⇒ -. Its sheaves are the open subtopos of the
subterminal object u classifies, the part of the topos lying over u.
is openTopology trueid and is openTopology false.const true
closedTopology :: ElementaryTopos k => ((TerminalObject :: k) ~> (Omega :: k)) -> (Omega :: k) ~> (Omega :: k) Source Github #
The closed topology of a truth value u: u ∨ -, complementary to openTopology. Its
sheaves are the part of the topos lying away from u. is
closedTopology true and const true is closedTopology falseid.