Skip to content

[Merged by Bors] - feat(Kernel/Category): Stoch is a Markov category#36779

Closed
gaetanserre wants to merge 48 commits intoleanprover-community:masterfrom
gaetanserre:kernel_categories
Closed

[Merged by Bors] - feat(Kernel/Category): Stoch is a Markov category#36779
gaetanserre wants to merge 48 commits intoleanprover-community:masterfrom
gaetanserre:kernel_categories

Conversation

@gaetanserre
Copy link
Copy Markdown
Collaborator

@gaetanserre gaetanserre commented Mar 17, 2026

  • Define SFinKer, the category of measurable spaces and s-finite kernels. Show that it is a copy-discard category.

  • Define Stoch, the category of measurable spaces and Markov kernels as a WideSubcategory of SFinKer. Show that it is a Markov category. It uses new typeclasses for MorphismProperty that are stables under specific morphisms of the original category.

  • Add some useful lemmas about parallel product of kernels.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

PR summary 6e77ee2fdb

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Monoidal.Widesubcategory (new file) 487
Mathlib.CategoryTheory.CopyDiscardCategory.Widesubcategory (new file) 488
Mathlib.Probability.Kernel.Category.SFinKer (new file) 1673
Mathlib.Probability.Kernel.Category.Stoch (new file) 1693

Declarations diff

+ Hom
+ InducedWideCategory.Hom
+ IsMonoidalStable
+ IsStableUnderAssociator
+ IsStableUnderBraiding
+ IsStableUnderComonoid
+ IsStableUnderUnitor
+ SFinKer
+ Stoch
+ StochHom
+ WideSubcategory.hom_ext
+ hom_ext
+ id_parallelComp_comp_parallelComp_id
+ id_parallelComp_id
+ instance : CoeSort SFinKer Type*
+ instance : CopyDiscardCategory SFinKer.{u}
+ instance : LargeCategory SFinKer
+ instance : MarkovCategory Stoch.{u}
+ instance : MonoidalCategory SFinKer.{u}
+ instance : StochHom.IsStableUnderBraiding
+ instance : SymmetricCategory SFinKer.{u}
+ instance [BraidedCategory C] [P.IsStableUnderBraiding] (c : WideSubcategory P) [ComonObj c.obj]
+ instance [BraidedCategory C] [P.IsStableUnderBraiding] :
+ instance [CopyDiscardCategory C] [P.IsStableUnderBraiding] [∀ c, P.IsStableUnderComonoid c] :
+ instance [P.IsMonoidalStable] (c : WideSubcategory P) [ComonObj c.obj]
+ instance [P.IsMonoidalStable] : MonoidalCategory (WideSubcategory P)
+ instance [P.IsMonoidalStable] : MonoidalCategoryStruct (WideSubcategory P)
+ instance [SymmetricCategory C] [P.IsStableUnderBraiding] :
+ instance {X : SFinKer} : ComonObj X
+ instance {X Y : SFinKer} {κ : Hom X Y} : IsSFiniteKernel κ.hom := κ.property
+ instance {X Y : Stoch} (κ : X ⟶ Y) : IsMarkovKernel κ.hom.hom := κ.2
+ instance {X} : StochHom.IsStableUnderComonoid X
+ isoMk
+ tensorμ_hom

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-measure-probability Measure theory / Probability theory label Mar 17, 2026
@gaetanserre gaetanserre added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-category-theory Category theory labels Mar 17, 2026
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Mar 17, 2026
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Mar 18, 2026
@EtienneC30 EtienneC30 removed their assignment Mar 18, 2026
@gaetanserre gaetanserre removed the awaiting-author A reviewer has asked the author a question or requested changes. label Mar 18, 2026
@gaetanserre gaetanserre added the awaiting-author A reviewer has asked the author a question or requested changes. label Mar 18, 2026
@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Mar 18, 2026
@gaetanserre gaetanserre added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Mar 18, 2026
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Mar 19, 2026
@gaetanserre gaetanserre added the awaiting-author A reviewer has asked the author a question or requested changes. label Mar 19, 2026
@gaetanserre gaetanserre added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Mar 20, 2026
@github-actions github-actions bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Mar 20, 2026
@joelriou
Copy link
Copy Markdown
Contributor

This should also be reviewed by some expert in probability theory:

maintainer delegate

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by joelriou.


issue_comment, wf_run

@mathlib-triage mathlib-triage bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Mar 27, 2026
gaetanserre and others added 7 commits March 27, 2026 12:45
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
@RemyDegenne
Copy link
Copy Markdown
Contributor

Thanks!
bors r+

@mathlib-triage mathlib-triage bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Mar 27, 2026
mathlib-bors bot pushed a commit that referenced this pull request Mar 27, 2026
- Define `SFinKer`, the category of measurable spaces and s-finite kernels. Show that it is a copy-discard category.

- Define `Stoch`, the category of measurable spaces and Markov kernels as a `WideSubcategory` of `SFinKer`. Show that it is a Markov category. It uses new typeclasses for `MorphismProperty` that are stables under specific morphisms of the original category.
  
- Add some useful lemmas about parallel product of kernels.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 27, 2026

Canceled.

@RemyDegenne
Copy link
Copy Markdown
Contributor

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 27, 2026

✌️ gaetanserre can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Mar 27, 2026
@gaetanserre
Copy link
Copy Markdown
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Mar 27, 2026
- Define `SFinKer`, the category of measurable spaces and s-finite kernels. Show that it is a copy-discard category.

- Define `Stoch`, the category of measurable spaces and Markov kernels as a `WideSubcategory` of `SFinKer`. Show that it is a Markov category. It uses new typeclasses for `MorphismProperty` that are stables under specific morphisms of the original category.
  
- Add some useful lemmas about parallel product of kernels.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 27, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Kernel/Category): Stoch is a Markov category [Merged by Bors] - feat(Kernel/Category): Stoch is a Markov category Mar 27, 2026
@mathlib-bors mathlib-bors bot closed this Mar 27, 2026
justus-springer pushed a commit to justus-springer/mathlib4 that referenced this pull request Mar 28, 2026
…ty#36779)

- Define `SFinKer`, the category of measurable spaces and s-finite kernels. Show that it is a copy-discard category.

- Define `Stoch`, the category of measurable spaces and Markov kernels as a `WideSubcategory` of `SFinKer`. Show that it is a Markov category. It uses new typeclasses for `MorphismProperty` that are stables under specific morphisms of the original category.
  
- Add some useful lemmas about parallel product of kernels.
@gaetanserre gaetanserre deleted the kernel_categories branch April 7, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors. t-category-theory Category theory t-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants