from typing import Self
from sympy.core.add import Add
from sympy.matrices.expressions.matexpr import MatrixExpr
from sympy.matrices.expressions.special import GenericZeroMatrix

class MatAdd(MatrixExpr, Add):
    is_MatAdd = ...
    identity = ...
    def __new__(cls, *args, evaluate=..., check=..., _sympify=...) -> GenericZeroMatrix | MatAdd | Self:
        ...
    
    @property
    def shape(self):
        ...
    
    def could_extract_minus_sign(self) -> bool:
        ...
    
    def expand(self, **kwargs) -> MatAdd:
        ...
    
    def doit(self, **hints) -> MatAdd:
        ...
    


factor_of = ...
matrix_of = ...
def combine(cnt, mat):
    ...

def merge_explicit(matadd) -> MatAdd:
    ...

rules = ...
canonicalize = ...
