 ### verifythis_2016_matrix_multiplication:

```- Define set with create (and constrained a benign mistake on axioms)
- s/FloatMatrix/Matrix```
parent 1dbdd078
 ... ... @@ -29,8 +29,9 @@ theory MatrixGen axiom set_def4: forall m: mat 'a, i j: int, v: 'a. 0 <= i < rows m -> 0 <= j < cols m -> forall i' j': int. (i <> i' \/ j <> j') -> get (set m i j v) i' j' = get m i' j' forall i' j': int. 0 <= i' < rows m /\ 0 <= j' < cols m /\ (i <> i' \/ j <> j') -> get (set m i j v) i' j' = get m i' j' predicate (==) (m1 m2: mat 'a) = rows m1 = rows m2 && cols m1 = cols m2 && ... ... @@ -46,12 +47,18 @@ theory MatrixGen end theory FloatMatrix theory Matrix clone export MatrixGen use import int.Int use HighOrd use import int.Int type mat 'a function rows (mat 'a) : int function cols (mat 'a) : int function get (mat 'a) int int : 'a function create (r c: int) (f: int -> int -> 'a) : mat 'a ... ... @@ -67,6 +74,21 @@ theory FloatMatrix forall r c: int, f: int -> int -> 'a, i j: int. 0 <= i < r -> 0 <= j < c -> get (create r c f) i j = f i j function set (m:mat 'a) (x y:int) (z:'a) : mat 'a = create m.rows m.cols (\x1 y1. if x1 = x && y1 = y then z else get m x1 y1) clone export MatrixGen with type mat 'a = mat 'a, function rows = rows, function cols = cols, function get = get, function set = set, lemma set_def1, lemma set_def2, lemma set_def3, lemma set_def4 use import int.Int end theory FixedMatrix ... ... @@ -125,7 +147,7 @@ module MatrixArithmetic use import int.Int use import int.Sum use import sum_extended.Sum_extended use import FloatMatrix use import Matrix (* Zero matrix *) constant zerof : int -> int -> int = \_ _. 0 ... ... @@ -267,7 +289,7 @@ module BlockMul use import int.Int use import int.Sum use import sum_extended.Sum_extended use import FloatMatrix use import Matrix use import MatrixArithmetic function ofs2 (a: mat int) (ai aj: int) : int -> int -> int ... ...
 ... ... @@ -4,10 +4,22 @@ ... ... @@ -19,7 +31,7 @@ ... ... @@ -64,7 +76,7 @@ ... ... @@ -72,7 +84,7 @@ ... ... @@ -145,10 +157,10 @@ ... ... @@ -162,14 +174,14 @@ ... ...
No preview for this file type
 ... ... @@ -3,7 +3,7 @@ module Symb use import int.Int use import list.List use import matrices.FloatMatrix use import matrices.Matrix use import matrices.MatrixArithmetic namespace LOCAL ... ...
 ... ... @@ -5,9 +5,9 @@ ... ... @@ -16,7 +16,7 @@ ... ... @@ -56,7 +56,7 @@ ... ... @@ -103,7 +103,7 @@ ... ... @@ -117,7 +117,7 @@ ... ... @@ -148,25 +148,25 @@ ... ... @@ -179,7 +179,7 @@ ... ... @@ -190,7 +190,7 @@ ... ... @@ -201,7 +201,7 @@ ... ... @@ -212,13 +212,13 @@ ... ... @@ -229,7 +229,7 @@ ... ... @@ -240,13 +240,13 @@ ... ... @@ -257,7 +257,7 @@ ... ... @@ -268,67 +268,67 @@ ... ...
No preview for this file type
 ... ... @@ -4,7 +4,7 @@ module MatrixMultiplication use import int.Sum use import ref.Ref use import map.Map use import matrices.FloatMatrix as F use import matrices.Matrix as F use import matrices.MatrixArithmetic use import matrices.BlockMul use import matrices_ring_simp.Symb ... ...
This diff is collapsed.
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment