fact: Definition m2lmx (l : list Z) : 'M[R]_2 := let a := nth Z0 l 0 in let b := nth Z0 l 1 in \matrix_(i, j) if ((val i == 0%N) && (val j == 0%N)) then ZtoR (a + b) else if (i == j) then ZtoR b else ZtoR a.
imports: Coq(Extraction ZArith Lia) mathcomp(all_ssreflect all_algebra)