Skip to content

Commit 5db21ff

Browse files
committed
feat(MarkovCategory/Positive): Define PositiveCategory (leanprover-community#38212)
Define `PositiviveCategory`: a specific kind of Markov category deeply related to determinism of isomorphisms. For some additional context, please see leanprover-community#37851. ### References - Section 11 of [A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics, Fritz, 2020](https://arxiv.org/abs/1908.07021) - Section 3 of [A category-theoretic proof of the ergodic decomposition theorem, Moss and Perrone, 2023](https://arxiv.org/abs/2207.07353)
1 parent ae1d34f commit 5db21ff

3 files changed

Lines changed: 98 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,6 +2974,7 @@ public import Mathlib.CategoryTheory.LocallyCartesianClosed.Over
29742974
public import Mathlib.CategoryTheory.LocallyCartesianClosed.Sections
29752975
public import Mathlib.CategoryTheory.LocallyDirected
29762976
public import Mathlib.CategoryTheory.MarkovCategory.Basic
2977+
public import Mathlib.CategoryTheory.MarkovCategory.Positive
29772978
public import Mathlib.CategoryTheory.Monad.Adjunction
29782979
public import Mathlib.CategoryTheory.Monad.Algebra
29792980
public import Mathlib.CategoryTheory.Monad.Basic
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/-
2+
Copyright (c) 2026 Gaëtan Serré. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Gaëtan Serré
5+
-/
6+
module
7+
8+
public import Mathlib.CategoryTheory.MarkovCategory.Basic
9+
public import Mathlib.CategoryTheory.CopyDiscardCategory.Deterministic
10+
11+
/-!
12+
# Positive Categories
13+
14+
Markov categories where deletion is natural for all morphisms.
15+
16+
## Main definitions
17+
18+
* `PositiveCategory`: Markov category where copy is natural given deterministic composition of
19+
morphisms.
20+
21+
## Main results
22+
23+
* `copy_comp_natural` - Given morphisms `f : X ⟶ Y` and `g : Y ⟶ Z`, if their composition is
24+
deterministic, then process `f`, copy and then process `g` equals copy and process `f` and `g`
25+
independently.
26+
27+
* All isomorphisms in a positive Markov category are deterministic.
28+
29+
## Implementation notes
30+
31+
The key property `copy_comp_natural : f ≫ Δ ≫ (g ⊗ₘ 𝟙 Y) = Δ ≫ (f ≫ g ⊗ₘ f)`, given
32+
`Deterministic (f ≫ g)`, means that after processing `f`, copying and then processing `g` is the
33+
same as copying and processing `f` and `g` independently. The probabilistic interpretation is that
34+
given a deterministic process that has a stochastic intermediate result, the same distribution over
35+
both results can be obtained by computing the intermediate result independently of the
36+
deterministic process.
37+
38+
## References
39+
40+
* [Fritz, *A synthetic approach to Markov kernels, conditional independence
41+
and theorems on sufficient statistics*, Def. 11.22][fritz2020]
42+
* [Moss and Perrone, *A category-theoretic proof of the ergodic decomposition theorem*][moss2023]
43+
-/
44+
45+
@[expose] public section
46+
47+
universe v u
48+
49+
namespace CategoryTheory
50+
51+
open MonoidalCategory CopyDiscardCategory ComonObj
52+
53+
/-- Markov category where copy is natural given deterministic composition of morphisms. -/
54+
class PositiveCategory (C : Type u) [Category.{v} C] [MonoidalCategory C] extends
55+
MarkovCategory C where
56+
/-- Given morphisms `f : X ⟶ Y` and `g : Y ⟶ Z`, if their composition is deterministic, then
57+
process `f`, copy and then process `g` equals copy and process `f` and `g` independently. -/
58+
copy_comp_natural {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [h : Deterministic (f ≫ g)] :
59+
f ≫ Δ ≫ (g ⊗ₘ 𝟙 Y) = Δ ≫ (f ≫ g ⊗ₘ f)
60+
61+
variable {C : Type u} [Category.{v} C] [MonoidalCategory C]
62+
63+
namespace PositiveCategory
64+
65+
variable [PositiveCategory C]
66+
67+
instance {X Y : C} (f : X ⟶ Y) [IsIso f] : Deterministic f where
68+
hom_comul := by
69+
calc
70+
_ = f ≫ Δ ≫ (inv f ⊗ₘ 𝟙 Y) ≫ (f ⊗ₘ 𝟙 Y) := by
71+
cat_disch
72+
_ = (f ≫ Δ ≫ (inv f ⊗ₘ 𝟙 Y)) ≫ (f ⊗ₘ 𝟙 Y) := by
73+
simp
74+
_ = (Δ ≫ (𝟙 X ⊗ₘ f)) ≫ (f ⊗ₘ 𝟙 Y) := by
75+
rw [copy_comp_natural (h := by rw [IsIso.hom_inv_id]; infer_instance)]
76+
simp
77+
_ = Δ ≫ (𝟙 X ⊗ₘ f) ≫ (f ⊗ₘ 𝟙 Y) := by
78+
simp
79+
_ = Δ ≫ ((𝟙 X ≫ f) ⊗ₘ (f ≫ 𝟙 Y)) := by
80+
rw [MonoidalCategory.tensorHom_comp_tensorHom]
81+
_ = Δ ≫ (f ⊗ₘ f) := by cat_disch
82+
83+
end PositiveCategory
84+
85+
end CategoryTheory

docs/references.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4073,6 +4073,18 @@ @Article{ moss-2020
40734073
url = {https://doi.org/10.1007/s40062-019-00247-y}
40744074
}
40754075

4076+
@Article{ moss2023,
4077+
title = {A category-theoretic proof of the ergodic decomposition
4078+
theorem},
4079+
author = {Moss, Sean and Perrone, Paolo},
4080+
journal = {Ergodic Theory and Dynamical Systems},
4081+
volume = {43},
4082+
number = {12},
4083+
pages = {4166--4192},
4084+
year = {2023},
4085+
publisher = {Cambridge University Press}
4086+
}
4087+
40764088
@Article{ MR0236876,
40774089
title = {A new proof that metric spaces are paracompact},
40784090
author = {Mary Ellen Rudin},

0 commit comments

Comments
 (0)