24.12.2014 Views

Machine Intelligence 7 - AITopics

Machine Intelligence 7 - AITopics

Machine Intelligence 7 - AITopics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PROGRAM PROOF AND MANIPULATION<br />

We define the number of occurrences of a cell in a list by induction<br />

(5: Ux..T-4N<br />

(i) 6(v-,v)=0<br />

(ii) 6,4(x-o a t/ x-02 w)=6,a(t1 x:-,w)+1 if x=u<br />

a<br />

=3„(t1 x-+w) if xOu<br />

It follows by an obvious induction that 6„(A • p)=3„(A)+6„(p).<br />

To keep track of the effects of assignments we now define a relation of<br />

distinctness between lists, that is, they have no cells in common.<br />

Distinct: 2' x 21-4T<br />

Distinct(A, 1t)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!