let ident n = Array2D.init n n (fun i j -> if i = j then 1 else 0)