Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
APPENDIX C. MATRICES 168<br />
Base Case Suppose that xs = [x] and let yss = [ys] so that |xs| = 1 = |yss|<br />
f (g xs yss)<br />
= {definitions <strong>of</strong> xs, yss and g}<br />
f [x : ys]<br />
= {foldr1 definition <strong>of</strong> f }<br />
foldr1 (zipWith ( +)) (map (map wrap) [x : ys])<br />
= {definitions <strong>of</strong> map and wrap}<br />
foldr1 (zipWith ( +)) [[x] : (map wrap ys)]<br />
= {definition <strong>of</strong> foldr1}<br />
[x] : (map wrap ys)<br />
= {[definition <strong>of</strong> foldr1}<br />
[x] : (foldr1 (zipWith ( +)) [map wrap ys])<br />
= {definition <strong>of</strong> map}<br />
[x] : (foldr1 (zipWith ( +)) (map (map wrap) [ys]))<br />
= {foldr1 definition <strong>of</strong> f }<br />
[x] : (f [ys])<br />
= {definitions}<br />
xs : (f yss)<br />
Step Case Suppose that xs = v : vs and yss = ws : wss where |vs| = |wss|.<br />
For the induction hypothesis, we suppose that vs and wss satisfy Equation (C.2).<br />
f (g xs yss)<br />
= {definitions}<br />
f (g (v : vs) (ws : wss))<br />
= {definition <strong>of</strong> g (g is an instance <strong>of</strong> zipWith)}<br />
f ((v : ws) : (g vs wss))<br />
= {Property 12}<br />
g (v : ws) (f (g vs wss))<br />
= {induction hypothesis}<br />
g (v : ws) (vs : (f wss))<br />
= {g is an instance <strong>of</strong> zipWith}<br />
(v : vs) : (g ws (f wss)))<br />
= {Property 12}<br />
(v : vs) : (f (ws : wss))<br />
= {definitions}<br />
xs : (f yss)