Evaluation does not add or remove a global variable
For any e,
, , , v, ′, and ′ such that he ;- ;
we can prove
dom- =
“Evaluation doesn’t change the global domain”
Evaluation does not add or remove a global variable such that , - - PowerPoint PPT Presentation
Evaluation does not add or remove a global variable such that , and For any e , , , , v , h e h v ; ; ; i + ; ; ; i ; we can prove dom = dom Evaluation doesnt
For any e,
, , , v, ′, and ′ such that he ;we can prove
dom“Evaluation doesn’t change the global domain”
Could terminate in any rule! Base case:
hLITERAL (v );Both sides identical!
domAnother base case: x
2 domBoth sides identical!
domAssignment to formal parameter x
2 domBy induction hypothesis on
D, domBoth sides have same domain!
True conditional
D1 he1 ;v1
6= 0 D2 he2 ; ′ ; ; ′ i + hv2 ; ′′ ; ; ′′ i hIF (e1 ;e2 ;e3 );By induction hypothesis on
D1, domBy induction hypothesis on
D2, dom ′ = dom ′′Therefore, both sides have same domain:
domx
= 2 domDo both sides have same domain?
By induction hypothesis on
D, domAnd
dom (′ fx 7! v g) = dom ′ [ fx g = domBut x
2 dom ! So dom(cons ’a ’()) also written ’(a) (cons ’b ’(a)) equals ’(b a) (cons ’c ’(b a)) equals ’(c b a) (null? ’(c b a)) equals #f (cdr ’(c b a) equals ’(b a) (car ’(c b a) equals ’c