clone export AssocAlgebra with type r = int, type a = int, constant R.zero = Int.zero, constant R.one = Int.one, function R.(+) = (+), function R.(-_) = (-_), function R.(*) = (*),constant A.zero = Int.zero, constant one = Int.one, function (+) = (+), function A.(-_) = (-_), function ( *) = ( *), function (@) = ( *), goal AUnitary, goal ANonTrivial, goal ExtDistSumA, goal ExtDistSumR, goal AssocMulExt, goal UnitExt, goal CommMulExt, val eq0 = eq0_int, goal A.MulAssoc.Assoc, goal A.Unit_def_l, goal A.Unit_def_r, goal A.Comm, goal A.Assoc
use import AssocAlgebraDecision
meta reify_target function interp
goal g: forall x y. x * y = y * x
end
module Matrix
use import int.Int
use import int.MinMax
use import matrices.Matrix
use import matrices.MatrixArithmetic
use import matrices.BlockMul
constant d : int
axiom DimNonNeg : d >= 0
function extf (c: int) (a:mat int) : int -> int -> int =
fun x y -> c * (get a x y)
function ext (c: int) (a:mat int) : mat int =
create (rows a) (cols a) (extf c a)
function addm (a b: mat int) : mat int =
create (max a.rows b.rows) (max a.cols b.cols) (add2f a b)
constant d : int
axiom DimNonNeg : d >= 0
constant zero11 : mat int = zero d d
constant one11 : mat int = create d d (fun _ _ -> 1)
constant zero11 : mat int = zero 0 0
constant one11 : mat int = create d d (fun x y -> if x=y then 1 else 0)
let predicate eq0_int (x:int) = x=0
clone export AssocAlgebra with type r = int, type a = mat int, constant R.zero = Int.zero, constant R.one = Int.one, function R.(+) = (+), function R.(-_) = (-_), function R.(*) = (*),constant A.zero = zero11, constant one = one11, function (+) = add, function A.(-_) = opp, function ( *) = mul, function (@) = ext, goal AUnitary, goal ANonTrivial, goal ExtDistSumA, goal ExtDistSumR, goal AssocMulExt, goal UnitExt, goal CommMulExt, val eq0 = eq0_int
clone export AssocAlgebra with type r = int, type a = mat int, constant R.zero = Int.zero, constant R.one = Int.one, function R.(+) = (+), function R.(-_) = (-_), function R.(*) = (*),constant A.zero = zero11, constant one = one11, function (+) = add, function A.(-_) = opp, function ( *) = mul, function (@) = ext, goal AUnitary, goal ANonTrivial, goal ExtDistSumA, goal ExtDistSumR, goal AssocMulExt, goal UnitExt, goal CommMulExt, val eq0 = eq0_int, goal A.MulAssoc.Assoc, goal A.Unit_def_l, goal A.Unit_def_r, goal A.Comm, goal A.Assoc