[Imprint][Data Privacy Statement][E-Mail]

Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Specification matrix
enrich
   nat
with
   sorts matrix('a);
   functions 
       mkmatrix : nat × nat × 'a → matrix('a);
       #r . : matrix('a) → nat;
       #c . : matrix('a) → nat;
   
   variables 
       mx : matrix('a);
       r : nat;
       c : nat;
       a : 'a;
       b : 'a;
   
   partial functions 
       . [ . ] : matrix('a) × nat × nat → 'a with λ mx, r, c. r < #r mx ∧ c < #c mx;
       . [ . := . ] : matrix('a) × nat × nat × 'a → matrix('a) with λ mx, r, c, a. r < #r mx ∧ c < #c mx;
   
   
   induction 
      matrix('a) generated by mkmatrix, [ := ];
   
   axioms 
      extension: 
      mx1 = mx2 ↔ #r mx1 = #r mx2 ∧ #c mx1 = #c mx2 ∧ (∀ r, c. r < #r mx1 ∧ c < #c mx1 → mx1[r, c] = mx2[r, c]);
      used for: ls;
      
      rowno-mkmatrix: #r mkmatrix(r, c, a) = (c = 0 ⊃ 0;r);
      used for: s, ls;
      
      colno-mkmatrix: #c mkmatrix(r, c, a) = (r = 0 ⊃ 0;c);
      used for: s, ls;
      
      get-mkmatrix: r < r0 ∧ c < c0 → mkmatrix(r0, c0, a)[r, c] = a;
      used for: s, ls;
      
      rowno-put: #r mx[r, c := a] = #r mx;
      used for: s, ls;
      
      colno-put: #c mx[r, c := a] = #c mx;
      used for: s, ls;
      
      put-same: r < #r mx ∧ c < #c mx → (mx[r, c := a])[r, c] = a;
      used for: s, ls, lc;
      
      put-otherrow: r ≠ r0 → (mx[r, c := a])[r0, c0] = mx[r0, c0];
      used for: s, ls, lc;
      
      put-othercol: c ≠ c0 → (mx[r, c := a])[r0, c0] = mx[r0, c0];
      used for: s, ls, lc;
   
   
end enrich