Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CHAPTER 5. SETS AND THE SPLITTING 101<br />
For this pro<strong>of</strong> tree, the cost and height are as follows:<br />
C (insert) = 5 + C (Prop 9) = 9<br />
and H (insert) = 3 + H (Prop 9) = 6<br />
5.4.2 Second Definition<br />
We prove Equation (5.6) for insert1 by induction on xs.<br />
Base Case Suppose that xs = [ ]. Then<br />
insert1 a (insert1 a [ ])<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a [a]<br />
= {definition <strong>of</strong> insert1}<br />
[a]<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a [ ]<br />
Step Case Suppose that xs = y : ys and for the induction hypothesis, we<br />
assume that ys satisfies Equation (5.6). We have three subcases.<br />
Subcase 1 Suppose that a > y then<br />
insert1 a (insert1 a (y : ys))<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a (y : (insert1 a ys))<br />
= {definition <strong>of</strong> insert1}<br />
y : (insert1 a (insert1 a ys))<br />
= {induction hypothesis}<br />
y : (insert1 a ys)<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a (y : ys)<br />
Subcase 2 Suppose that a = y then<br />
insert1 a (insert1 a (y : ys))<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a (y : ys)<br />
Subcase 3 Suppose that a < y then<br />
insert1 a (insert1 a (y : ys))<br />
= {definition <strong>of</strong> insert1}<br />
insert1 a (a : y : ys)<br />
= {definition <strong>of</strong> insert1}