Physical units and quantities with type-checked dimensions in Lean4