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 A. LIST ASSERTION 145<br />
= {definition <strong>of</strong> xs}<br />
|(t : ts) + ys|<br />
= {definition <strong>of</strong> +}<br />
|t : (ts + ys)|<br />
= {definition <strong>of</strong> | |}<br />
1 + |ts + ys|<br />
= {induction hypothesis}<br />
1 + |ts| + |ys|<br />
= {definition <strong>of</strong> | |}<br />
|t : ts| + |ys|<br />
= {definition <strong>of</strong> xs}<br />
|xs| + |ys|<br />
The tree is this pro<strong>of</strong> is:<br />
(A.1)<br />
Base<br />
Step<br />
xs<br />
xs<br />
+<br />
+<br />
arith<br />
| |<br />
| |<br />
IH<br />
xs<br />
| |<br />
For this, C (A.1) = 11 and H (A.1) = 7.<br />
xs<br />
A.2 Alternating Split for Lists<br />
We want to prove that<br />
|xsp + asp ysp| asp<br />
= |xsp| asp<br />
+ |ysp| asp<br />
(A.2)<br />
For the alternating split, we have two operations equivalent to +.<br />
A.2.1 Version 1<br />
We first define:<br />
〈l 0 ,r 0 〉 asp + asp 〈l 1 ,r 1 〉 asp =<br />
{ 〈l0 + l 1 ,r 0 + r 1 〉 asp if |l 0 | = |r 0 |<br />
〈l 0 + r 1 ,r 0 + l 1 〉 asp otherwise<br />
To prove (A.2), let xsp = 〈l 0 ,r 0 〉 asp and ysp = 〈l 1 ,r 1 〉 asp and we have two<br />
cases: