Definition weighting {m n : nat} (mat : Matrix R m n) : UU := ∑ vec : Vector R n, (mat ** (col_vec vec)) = col_vec (const_vec (1%rig)).
Require Import UniMath.Foundations.PartA. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.Combinatorics.FiniteSequences. Require Import UniMath.Algebra.BinaryOperations. Require Import UniMath.Algebra.IteratedBinaryOperations. Require Import UniMath.Algebra.RigsAndRings.