For more information see: https://github.com/leanprover/lean/wiki/Refactoring-structures The new attribute [algebra] implements the [algebraic_class] described in the page above.