<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../xsl/unit.xsl"?>
<KIVSPEC name="list-getput"><SPECBODY>enrich
   <a href="../../../specs/list-data/export/unit.xml">list-data</a>
with
   variables 
       x : list;
       y : list;
       z : list;
       a : elem;
       b : elem;
       c : elem;
       m : nat;
       n : nat;
   
   partial functions 
       . [ . ] : list × nat → elem with λ x, n. n &lt; &#35; x;
      comment: get is zero based;
       . [ . ] : list × nat × elem → list with λ x, n, a. n &lt; &#35; x;
      comment: put is zero based;
   
   
   axioms 
      get-zero: (a + x)[0] = a;
      used for: s, ls;
      
      get-succ: (a + x)[n + 1] = x[n];
      used for: s, ls;
      
      put-zero: (b + x)[0, a] = a + x;
      used for: s, ls;
      
      put-succ: (b + x)[n + 1, a] = b + x[n, a];
      used for: s, ls;
   
   
end enrich</SPECBODY></KIVSPEC>