Zulip Chat Archive

Stream: mathlib4

Topic: Syntax idiomatic definition class


Martin Dvořák (Dec 30 2025 at 19:34):

Which of the following syntaxes is idiomatic in the definition of an algebraic class please?

(1)

mul_smul : ∀ x y : α, ∀ b : β, (x * y) • b = x • y • b

(2)

mul_smul : ∀ (x y : α) (b : β), (x * y) • b = x • y • b

(3)

mul_smul (x y : α) (b : β) : (x * y) • b = x • y • b

Ruben Van de Velde (Dec 30 2025 at 19:44):

Last one is best, imo

Aaron Liu (Dec 30 2025 at 19:46):

I like the last one best but not to the extent that I would change it in existing code


Last updated: Feb 28 2026 at 14:05 UTC