Zulip Chat Archive
Stream: Brownian motion
Topic: Brownian typeclass vs struct
Joris van Winden (Feb 13 2026 at 11:20):
I am a bit confused about the choice of typeclass vs structure/def with regards to probability theory. I found the following exampes:
Typeclass: IsPreBrownian, IsBrownian, IsGaussian
Structure/def: HasLaw, IsGaussianProcess, HasIndepIncrements
Is there a guiding principle behind why some of these are typeclasses and some are not?
Etienne Marion (Feb 13 2026 at 11:27):
IsGaussian (which is the only one which already existed before the project) is a typeclass because it allows to automatically infer IsProbabilityMeasure. The other typeclasses are about random variables and I think they should actually be structures because they are often too far fetched to be inferred automatically. For instance when I upstreamed HasGaussianLaw and IsGaussianProcess I turned them into structures while they were originally classes.
Last updated: Feb 28 2026 at 14:05 UTC