M theory as a matrix extension of Chern–Simons theory