Separation Logic. Part 3. Arthur Charguéraud. February / 66

Size: px
Start display at page:

Download "Separation Logic. Part 3. Arthur Charguéraud. February / 66"

Transcription

1 Separation Logic Part 3 Arthur Charguéraud February / 66

2 Content Reasoning about loops For loops While loops Repeat-loops Total correctness Frame in a while loop Higher-order iterators for pure containers Higher-order iterators for mutable containers Specication of objects 2 / 66

3 Example of a for-loop let facto n = let r = ref 1 in for i = 2 to n do let v =!r in r := v * i; done ;!r Before the loop: r ãñ 1 At each iteration: from r ãñ pi 1q! to r ãñ i! After the loop (assuming n ě 1): r ãñ n! Loop invariant, with i P r2, n ` 1s: I i r ãñ pi 1q! 3 / 66

4 Reasoning rule for for-loops For any loop invariant I of type int Ñ Hprop: a ď b H Ź I a I pb ` 1q Ź Q P ra, bs. ti iu t 1 tλtt. I pi ` 1qu thu pfor i a to b do t 1 q tqu Instantiation on the example, where I i r ãñ pi 1q! 2 ď n ` 1 r ãñ 1 Ź r ãñ p2 1q! r ãñ pn ` 1 1q! Ź r ãñ P r2, ns. tr ãñ pi 1q!u body tλtt. r ãñ pi ` 1 1q!u tr ãñ 1u pfor i 2 to n do bodyq tr ãñ n!u 4 / 66

5 General rule for for-loops Rule when a ď b: a ď b H Ź I a I pb ` 1q Ź Q P ra, bs. ti iu t 1 tλtt. I pi ` 1qu thu pfor i a to b do t 1 q tqu Rule when a ą b: a ą b H Ź Q tt thu pfor i a to b do t 1 q tqu General rule: H Ź I a I pmax a pb ` 1qq Ź Q P ra, bs. ti iu t 1 tλtt. I pi ` 1qu thu pfor i a to b do t 1 q tqu 5 / 66

6 While loops in A-normal form Eect of conversion to A-normal form of a while loop: let facto n = let r = ref 1 in let k = ref 2 in while! k <= n do r :=!r *!k; incr k; done ;!r. let facto n = let r = ref 1 in let k = ref 2 in while ( let i =!k in i <= n) do let i =!k in let n =!r in r := i * n; incr k; done ;!r 6 / 66

7 Reasoning rule for while-loops, partial correctness The loop invariant I describes the state between every iterations. The post-condition J describes the state after the evaluation of t 1. H Ź I tiu t 1 tju tj trueu t 2 tλtt. Iu J false Ź Q tt thu pwhile t 1 do t 2 q tqu where pi : Hpropq and pj : bool Ñ Hpropq. 7 / 66

8 Verication of a while loop H Ź I tiu t 1 tju tj trueu t 2 tλtt. Iu J false Ź Q tt thu pwhile t 1 do t 2 q tqu let facto n = let r = ref 1 in let k = ref 2 in while ( let i =!k in i <= n) do let i =!k in let n =!r in r := i * n; incr k; done ;!r Instantiation of the rule: H k ãñ 2 r ãñ 1 I Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s J b Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s rb true ô i ď ns Q λtt. k ãñ n r ãñ n! 8 / 66

9 Problem with the while loop H Ź I tiu t 1 tju tj trueu t 2 tλtt. Iu J false Ź Q tt thu pwhile t 1 do t 2 q tqu Duplication between I and J: I Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s J b Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s rb true ô i ď ns 9 / 66

10 Reasoning rule for repeat, partial correctness New language construct: repeat t 1 do tt while t 1 Reasoning rule: H Ź I tiu t 1 tλb. if b then I else pq ttqu thu prepeat t 1 q tqu Remark: the post-condition uses a logical if-then-else. 10 / 66

11 Translation of while loops into repeat loops Translation scheme: do t 1 while t 2 repeat pt 1 ; t 2 q while t 1 do t 2 repeat pif t 1 then pt 2 ; trueq else falseq Translation of while loops in A-normal form: while plet x t 0 in bq do t 2 repeat plet x t 0 in if b then pt 2 ; trueq else falseq 11 / 66

12 Encoding a while loop using repeat. while let i =!k in i <= n do let i =!k in let n =!r in r := i * n; incr k; done ; repeat let i =!k in if i <= n then begin let i =!k in let n =!r in r := i * n; incr k; true end else false done ; 12 / 66

13 Reasoning about while loops using repeat H Ź I tiu t 1 tλb. if b then I else pq ttqu thu prepeat t 1 q tqu Reasoning about while plet x t 0 in bq do t 2, encoded as (1) Check: H Ź I (2) Check: repeat plet x t 0 in if b then pt 2 ; trueq else falseq tiu t 0 tq 1 b true ñ tq 1 xu t 2 tλtt. Iu b false ñ Q 1 x Ź Q tt tiu plet x t 0 in if b then pt 2 ; trueq else falseq tλb. if b then I else pq ttqu 13 / 66

14 Verication of a repeat loop, partial correctness let facto n = let r = ref 1 in let k = ref 2 in repeat let i =!k in if i <= n then begin let i =!k in let n =!r in r := i * n; incr k; true end else false done ;!r Instantiation of the rule: H k ãñ 2 r ãñ 1 I Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s Q λtt. k ãñ n r ãñ n! 14 / 66

15 Reasoning rule for repeat, total correctness Need to check: H Ź I tiu!k tq 1 u H k ãñ 2 r ãñ 1 I Di. k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s Q λtt. k ãñ n r ãñ n! i ď n ñ tq 1 xu plet i =!k in... incr kq tλtt. Iu i ď n ñ Q 1 x Ź Q tt In the true branch, from r ãñ i pi 1q!, we deduce r ãñ ppi ` 1q 1q!. In the false branch, from pi ď nq and r2 ď i ď n ` 1s, we get i n ` / 66

16 Reasoning rule for repeat, total correctness From partial correctness: to total correctness: H Ź I tiu t 1 tλb. if b then I else pq ttqu thu prepeat t 1 q tqu H Ź I X ti Xu t 1 tλb. if b then pdy. I Y ry ă Xsq else pq ttqu thu prepeat t 1 q tqu where A is a user-specied type, px 0 : Aq, px : Aq, pi : A Ñ Hpropq, and pă : A Ñ A Ñ Propq is a well-founded relation. 16 / 66

17 Verication of a repeat loop, total correctness let facto n = let r = ref 1 in let k = ref 2 in repeat let i =!k in if i <= n then begin let i =!k in let n =!r in r := i * n; incr k; true end else false done ;!r Instantiation of the rule: H k ãñ 2 r ãñ 1 Q λtt. k ãñ n r ãñ n! A int I i k ãñ i r ãñ pi 1q! r2 ď i ď n ` 1s X 0 2 i 1 ă i i ă i 1 ď n ` 1 H Ź I X ti Xu t 1 tλb. if b then pdy. I Y ry ă Xsq else pq ttqu thu prepeat t 1 q tqu 17 / 66

18 Content Reasoning about loops Frame in a while loop Length with a while loop While loops by induction In-place increment Higher-order iterators for pure containers Higher-order iterators for mutable containers Specication of objects 18 / 66

19 Length with a while loop let rec mlength (p:'a cell ) = let t = ref 0 in let f = ref p in while! f!= null do incr t; f := (! f ). tl ; done!t Assume the pre-condition is p Mlist L. What is the loop invariant? 19 / 66

20 Length with a while loop: invariant Loop invariant, in partial correctness: I DL 1 L 2 q. f ãñ q p MlistSeg q L 1 q Mlist L 2 rl L 1``L 2 s t ãñ L 1 20 / 66

21 Length with a while loop: termination Loop invariant, in total correctness: I L 2 DL 1 q. f ãñ q p MlistSeg q L 1 q Mlist L 2 rl L 1``L 2 s t ãñ L 1 with: A list int X 0 L l ă pv :: lq H Ź I X ti Xu t 1 tλb. if b then pdy. I Y ry ă Xsq else pq ttqu thu prepeat t 1 q tqu 21 / 66

22 Need for list segments Observation: mlength dened using let rec does not require list tp Mlist Lu pmlength pq tλn. rn length Ls p Mlist Lu mlength dened using while seems to require list segments: I D... p MlistSeg q L 1 q Mlist L / 66

23 Proofs by induction for loops Semantic equivalence: while t 1 do t 2 if t 1 then pt 2 ; while t 1 do t 2 q else tt Reasoning rule: thu pif t 1 then pt 2 ; while t 1 do t 2 q else ttq tqu thu pwhile t 1 do t 2 q tqu Ñ proof by induction on a logical variable (ocurring in H and Q). 23 / 66

24 Length with a while loop: f qn. tf ãñ q q Mlist L f t ãñ nu pwhile!f!= null do incr t; f :=!f.tl doneq tλtt. f ãñ null q Mlist L f t ãñ pn ` length L f qu Show the pre- and the post-condition to hold of the following code: if!f!= null then (incr t; f :=!f.tl; while... done) else () 24 / 66

25 Length with a while loop: f nq. tf ãñ q q Mlist L f t ãñ nu pif!f!= null then (incr t; f :=!f.tl; while... done) else () q tλtt. f ãñ null q Mlist L f t ãñ n ` length L f u Case q null. Then L f nil. The pre-condition entails the post. Case q null. Then L f x :: L 1 f, and length L f 1 ` length L 1 f, and the state is: f ãñ q q ÞÑ t hd=x; tl=q 1 u q 1 Mlist L 1 f t ãñ n and after incr t; f :=!f.tl the state becomes: f ãñ q 1 q ÞÑ t hd=x; tl=q 1 u q 1 Mlist L 1 f t ãñ n ` 1 25 / 66

26 Length with a while loop: illustration Recursive call on: f ãñ q 1 q 1 Mlist L 1 f t ãñ n ` 1 f ãñ null q 1 Mlist L 1 f t ãñ pn ` 1 ` length L 1 f q After putting back q ÞÑ t hd=x; tl=q 1 u, we get: f ãñ null q Mlist L f t ãñ pn ` length L f q 26 / 66

27 In-place increment in a list let rec list_incr (p:'a cell ) = let f = ref p in while! f!= null do let q =!f in q. hd <- q. hd + 1; f := q. tl ; done Exercise: what specication? loop invariant? loop induction principle? 27 / 66

28 In-place increment in a list Specication: Loop invariant: DqL 1 L 2. tp Mlist Lu plist_incr pq tλtt. p Mlist pmap p`1q Lqu f ãñ q p MlistSeg q pmap p`1q L 1 q q Mlist L 2 rl L 1``L 2 s Loop specication, for a proof by 2. tf ãñ q q Mlist L 2 u pwhile... doneq tλtt. f ãñ null q Mlist pmap p`1q L 2 qu 28 / 66

29 Content Reasoning about loops Frame in a while loop Higher-order iterators for pure containers Function acting over a reference List.iter Constraints over the items Map Fold-left More functions on lists Higher-order iterators for mutable containers Specication of objects 29 / 66

30 Notation Adding an item at the tail of a list: L&x L``px :: nilq Pure pre-conditions as hypotheses: trp s Hu t tqu P ñ thu t tqu Specication of a boolean value: b istrue P pb true ô P q 30 / 66

31 Forall predicate Asserting properties about list items: Forall P L Denition: Forall P nil P x Forall P L Forall P px :: Lq Similarly: Denition: Forall2 P L 1 L 2 Forall2 P nil nil P x 1 x 2 Forall2 P L 1 L 2 Forall2 P px 1 :: L 1 q px 2 :: L 2 q 31 / 66

32 Function acting over a reference let refapply r f = r := f!r 1 r. ñ tr su pf vq tλy. ry v 1 su tr ãñ vu prefapply r fq tλtt. r ãñ v 1 u 32 / 66

33 Applying a function over a reference, generalization let refapply r f = r := f!r let s = ref 0 in let f x = incr s; 2* x in let r = ref 42 in refapply r f Generalized 1 rhh 1. ñ thu pf vq tλy. ry v 1 s H 1 u tpr ãñ vq Hu prefapply r fq tλtt. pr ãñ v 1 q H 1 u 33 / 66

34 Iteration over a pure list let rec iter f l = match l with [] -> () x :: t -> f x; iter f t ñ `@xk. ti ku pf xq tλtt. I pk&xqu ti nilu piter f lq tλtt. I lu 34 / 66

35 Length using iter let length l = let r = ref 0 in iter ( fun x -> incr r) l;!r Specication: `@xk. ti ku pf xq tλtt. I pk&xqu ñ ti nilu piter f lq tλtt. I lu Invariant: I k r ãñ k Specialization to the invariant, where f x incr r: `@xk. tr ãñ k u pf xq tλtt. r ãñ k ` 1u ñ tr ãñ 0u piter f lq tλtt. r ãñ l u 35 / 66

36 Sum using iter let sum l = let r = ref 0 in iter ( fun x -> r :=!r + x) l;!r What is the invariant? I k r ãñ Sum k where: Sum k Fold p`q 0 k 36 / 66

37 Verication of iter let rec iter f l = match l with [] -> () x :: t -> f x; iter f t ñ `@xk. ti ku pf xq tλtt. I pk&xqu ti nilu piter f lq tλtt. I lu How to prove that this specication of iter is correct? 37 / 66

38 Verication of iter ti ku pf xq tλtt. I pk&xqu Prove: by generalizing it ti nilu piter f lq tλtt. I ti ku piter f sq tλtt. I pk``squ 38 / 66

39 Verication of iter let rec iter f l = match l with [] -> () x :: t -> f x; iter f t ti ku pf xq tλtt. I pk&xqu ti ku piter f sq tλtt. I pk``squ By induction on l: Case s nil. We have ti ku piter f lq tλtt. I pk``nilqu Case s x :: t. By the rule for sequences: ti ku pf xq tλtt. I pk&xqu ti pk&xqu piter f tq tλtt. I ppk&xq``tqu ti ku pf x; iter f tq ti pk``squ because pk&xq``t k``px :: tq k``s. 39 / 66

40 Constraints over the items Specication of ñ ti ku pf xq tλtt. I pk&xqu ti nilu piter f lq tλtt. I lu What about the following application? iter ( fun x -> r :=!r +. sqrt x) [2.0; 3.0] Generalized `@xk. x P l ñ ti ku pf xq tλtt. I pk&xqu ñ ti nilu piter f lq tλtt. I lu 40 / 66

41 Constraints over the items Given a list x 1 :: x 2 :: x 3 :: nil, compute b a? x1 ` x 2 ` x 3. let r = ref 0. in iter ( fun x -> r := sqrt (! r +. x )) [2.; -1.; 3.] Generalized `@xkk 1. l k``x :: k 1 ñ ti ku pf xq tλtt. I pk&xqu ñ ti nilu piter f lq tλtt. I lu 41 / 66

42 Specication of map let rec map f l = match l with [] -> [] x :: k -> (f x )::( map f k) l. ñ p@x. tr su pf xq tλx 1. rp x x 1 suq tr su pmap f lq tλl 1. rforall2 P l l 1 su Ñ This specication forbids any visible side eect of f. 42 / 66

43 Verication of map l. ñ tr su pf xq tλx 1. rp x x 1 suq tr su pmap f lq tλl 1. rforall2 P l l 1 su Proof by induction on l. Ñ Case l nil. Use the relation: Forall2 P nil nil. Ñ Case l x :: t. Derive the relation: Forall2 P px :: tq px 1 :: t 1 q. tr su pf xq tλx 1. rp x x 1 su tr su pmap f tq tλt 1. rforall2 P t t 1 su tr su pf x :: map f tq tλl 1. rforall2 P l l 1 su 43 / 66

44 Generalized specication of map Specication of l. ñ tr su pf xq tλx 1. rp x x 1 suq tr su pmap f lq tλl 1. rforall2 P l l 1 su Specication of ñ `@xk. ti ku pf xq tλtt. I pk&xqu ti nilu piter f lq tλtt. I lu Combining the Il. ñ `@xk. ti ku pf xq tλx 1. rp x x 1 s I pk&xqu ti nilu pmap f lq tλl 1. rforall2 P l l 1 s I lu 44 / 66

45 Concised specication of map Combined specication, with I renamed into Jl. `@xk. tj ku pf xq tλx 1. rp x x 1 s J pk&xqu ñ tj nilu pmap f lq tλl 1. rforall2 P l l 1 s J lu Dene: I k k 1 J k rforall2 P k k 1 s More concise Il. `@xkk 1. ti k k 1 u pf xq tλx 1. I pk&xq pk 1 &x 1 qu ñ ti nil nilu pmap f lq tλl 1. I l l 1 u 45 / 66

46 Specication of fold-left Description: fold f i r6 :: 4 :: 7s f pf pf i 6q 4q 7 Implementation: let rec fold f i l = match l with [] -> i x :: k -> fold f (f i x) k ñ `@xik. ti i ku pf i xq tλj. I j pk&xqu ti a nilu pfold f a lq tλb. I b lu 46 / 66

47 Application of fold-left let sum l = fold (+) 0 l What is the invariant? I i k ri Sum ks where Sum k Fold p`q 0 k. Proof: `@xik. tri Sum ksu p(+) i xq tλj. rj psum kq ` xsu ñ tr0 Sum nilsu pfold (+) 0 lq tλb. rb Sum lsu Deriving the specication of (+) tr su p(+) u vq tλr. rr u ` vsu 47 / 66

48 Specication of nd let rec find f l = match l with [] -> None x :: k -> if f x then Some x else find f k l. ñ p@x. tr su pf xq tλb. rb istrue pp xqsuq tr su pfind f lq tλo. r match o with None ñ Forall p P q l Some x ñ Dkt. l k``x :: t ^ Forall p P q k ^ P x su 48 / 66

49 Specication of sort List. sort ( fun x y -> x - y) ^ ñ total-order pĺq p@xy. tr su pf x yq tλn. rn ď 0 ô x ĺ ysuq tr su psort f lq tλl 1. rpermut l l 1 ^ sorted pĺq l 1 su 49 / 66

50 Content Reasoning about loops Frame in a while loop Higher-order iterators for pure containers Higher-order iterators for mutable containers Iterating over a mutable list Mapping over a mutable list Iterating over a mutable list of distinct mutable items Find over a mutable list Specication of objects 50 / 66

51 Iterating over a mutable list let rec miter f p = if p == null then () else (f p. hd ; miter f p. tl ) 51 / 66

52 Iterating over a mutable list How to adapt the specication of `@xk. ti ku pf xq tλtt. I pk&xqu ñ ti nilu piter f lq tλtt. I lu Specication of pil. `@xk. ti ku pf xq tλtt. I pk&xqu ñ tp Mlist l I nilu pmiter f pq tλtt. p Mlist l I lu 52 / 66

53 Mapping a function over a mutable list Mapping a function over elements, in place: let rec mmap f p = if p == null then () else (p. hd <- f p. hd ; mmap f p. tl ) 53 / 66

54 Mapping a function over a mutable list Recall the concise specication of Il. `@xkk 1. ti k k 1 u pf xq tλx 1. I pk&xq pk 1 &x 1 qu ñ ti nil nilu pmap f lq tλl 1. I l l 1 u Specication of 1. `@xkk 1. ti k k 1 u pf xq tλx 1. I pk&xq pk 1 &x 1 qu ñ tp Mlist l I nil nilu pmmap f pq tλtt. Dl 1. p Mlist l 1 I l l 1 u 54 / 66

55 Mapping a function over a mutable list: example Mapping a function over elements, in place: mmap ( fun x - > x + 1) p How to instantiate I in the 1. `@xkk 1. ti k k 1 u pf xq tλx 1. I pk&xq pk&x 1 qu ñ tp Mlist l I nil nilu pmmap f pq tλtt. Dl 1. p Mlist l 1 I l l 1 u Take: or, equivalently: I k k 1 rk 1 map p`1q ks I k k 1 rforall2 P k k 1 s with P x x 1 px 1 x ` 1q 55 / 66

56 Representation of a list of references Dp 1 p 2 p 3. p Mlistof Id pp 1 :: p 2 :: p 3 :: nilq p 1 Ref 8 p 2 Ref 5 p 3 Ref 2 Equivalent to: p Mlistof Ref p8 :: 5 :: 2 :: nilq 56 / 66

57 Polymorphic representation predicate for mutable lists p Mlistof Ref p8 :: 5 :: 2 :: nilq p Mlistof R L match L with nil ñ rp nulls X :: L 1 ñ Dxp 1. p ÞÑ t hd=x; tl=p 1 u p 1 Mlistof R L 1 x R X 57 / 66

58 Incrementing a mutable list of distinct references miter ( fun x -> incr x) [ ref 5; ref 3] Take the invariant: Specialized specication for pil. ñ I K K 1 rk 1 map p`1q Ks `@xkk 1 n. ti K K 1 x Ref nu pf xq tλtt. I pk&nq pk 1 &pn ` 1qq x Ref pn ` 1qu tp Mlistof Ref L I nil nilu pmiter f pq tλtt. DL 1. p Mlistof Ref L 1 I L L 1 u 58 / 66

59 Iterating over a mutable list of mutable items Generalization to a list of the form p Mlistof R pirl. ñ `@xkk 1 X. ti K K 1 x R Xu pf xq tλtt. DX 1. I pk&xq pk 1 &X 1 q x R X 1 u tp Mlistof R L I nil nilu pmiter f pq tλtt. DL 1. p Mlistof R L 1 I L L 1 u 59 / 66

60 Function mnd let rec mfind f p = if p == null then None else if f p. hd then Some p else mfind f p. tl Assume a pure function and a list of integers. What is the specication? 60 / 66

61 Function mnd l. ñ tr su pf xq tλb. rb istrue pp xqsuq tp Mlist lu pmfind f pq tλo. match o with None ñ p Mlist l rforall p P q ls Some q ñ Dkt. p MlistSeg q k q Mlist px :: tq rl k``x :: t ^ Forall p P q k ^ P xs u 61 / 66

62 Function mnd on list of mutable items Consider a mutable list of references: p Mlistof Ref p3 :: 6 :: 2 :: nilq. mfind ( fun r ->!r > 5) p Generalized RL. ñ p@xx. tx R Xu pf xq tλb. x R X rb istrue pp Xqsuq tp Mlistof R Lu pmfind f pq tλo. match o with None ñ p Mlistof R L rforall p P q Ls Some q ñ DKT. p Mlistsegof R q K R Mlistof q px :: T q rl K ``X :: T ^ Forall p P q K ^ P Xs u 62 / 66

63 Content Reasoning about loops Frame in a while loop Higher-order iterators for pure containers Higher-order iterators for mutable containers Specication of objects The counter object Internal specication External specication 63 / 66

64 The counter object Creation of a counter: let new_counter () = object val mutable cur = 0 method step () = cur <- cur + 1 method read () = cur end Using a counter: let c = new_counter () in c# step (); c# step (); let x = c# read () in assert ( x = 2) 64 / 66

65 The counter object: internal specication Shorthand: p Obj pn, f, gq p ÞÑ t cur=n; read=f; step=g u Specication of a counter object: p Counter n Dfg. p Obj pn, f, gq r@i. tp Obj pi, f, gqu pg ()q tλtt. p Obj pi ` 1, f, gqus r@i. tp Obj pi, f, gqu pf ()q tλx. rx is p Obj pi, f, gqus 65 / 66

66 The counter object: external specication let c = new_counter () in c# step (); c# step (); let x = c# read () in assert ( x = 2) Specication exposed to the end-user: tr su pnew_counter()q tλp. p tp Counter iu pp #step()q tλtt. p Counter pi ` 1qu tp Counter iu pp #read()q tλx. rx is p Counter iu 66 / 66

Example of a for-loop. Separation Logic. The repeat construct. Reasoning rule for for-loops. Before the loop:

Example of a for-loop. Separation Logic. The repeat construct. Reasoning rule for for-loops. Before the loop: Example of a for-loop Separation Logic Part 3 Arthur Charguéraud February 2015 let facto n = let r = ref 1 in for i = 2 to n do let v =!r in r := v * i; done;!r Before the loop: r ãñ 1 At each iteration:

More information

Focus rules for segments. Focus and defocus rules for concatenation. Mlength with a while loop. Mlength with a while loop.

Focus rules for segments. Focus and defocus rules for concatenation. Mlength with a while loop. Mlength with a while loop. The function nth-cell Separation Logic Part 2 Returns the i-th cell of a list: Arthur Charguéraud February 2015 let rec nth_cell (i:int) (p: a cell) = if i = 0 then p else nth_cell (i-1) (p.tl) Why is

More information

Separation Logic 2/4. Chapter 7. Preservation of independent state. The frame rule. The Frame Rule. Arthur Charguéraud.

Separation Logic 2/4. Chapter 7. Preservation of independent state. The frame rule. The Frame Rule. Arthur Charguéraud. Separation Logic 2/4 Arthur Charguéraud Chapter 7 The Frame Rule Febuary 8th, 2017 1 / 75 2 / 75 Preservation of independent state The frame rule We have: tr ÞÑ 2u pincr rq tλ. r ÞÑ 3u Principle: a triple

More information

Separation Logic 4/4. Chapter 18. Integration of structural rules. Definition of the local predicate (1/2)

Separation Logic 4/4. Chapter 18. Integration of structural rules. Definition of the local predicate (1/2) Separation Logic 4/4 Arthur Charguéraud Chapter 18 Characteristic Formulae with structural rules Febuary 22th, 2016 1 / 72 2 / 72 Integration of structural rules Definition of the local predicate (1/2)

More information

DS-GA 1002: PREREQUISITES REVIEW SOLUTIONS VLADIMIR KOBZAR

DS-GA 1002: PREREQUISITES REVIEW SOLUTIONS VLADIMIR KOBZAR DS-GA 2: PEEQUISIES EVIEW SOLUIONS VLADIMI KOBZA he following is a selection of questions (drawn from Mr. Bernstein s notes) for reviewing the prerequisites for DS-GA 2. Questions from Ch, 8, 9 and 2 of

More information

~,. :'lr. H ~ j. l' ", ...,~l. 0 '" ~ bl '!; 1'1. :<! f'~.., I,," r: t,... r':l G. t r,. 1'1 [<, ."" f'" 1n. t.1 ~- n I'>' 1:1 , I. <1 ~'..

~,. :'lr. H ~ j. l' , ...,~l. 0 ' ~ bl '!; 1'1. :<! f'~.., I,, r: t,... r':l G. t r,. 1'1 [<, . f' 1n. t.1 ~- n I'>' 1:1 , I. <1 ~'.. ,, 'l t (.) :;,/.I I n ri' ' r l ' rt ( n :' (I : d! n t, :?rj I),.. fl.),. f!..,,., til, ID f-i... j I. 't' r' t II!:t () (l r El,, (fl lj J4 ([) f., () :. -,,.,.I :i l:'!, :I J.A.. t,.. p, - ' I I I

More information

NOTES WEEK 15 DAY 1 SCOT ADAMS

NOTES WEEK 15 DAY 1 SCOT ADAMS NOTES WEEK 15 DAY 1 SCOT ADAMS We fix some notation for the entire class today: Let n P N, W : R n, : 2 P N pw q, W : LpW, W q, I : id W P W, z : 0 W 0 n. Note that W LpR n, R n q. Recall, for all T P

More information

Future Self-Guides. E,.?, :0-..-.,0 Q., 5...q ',D5', 4,] 1-}., d-'.4.., _. ZoltAn Dbrnyei Introduction. u u rt 5,4) ,-,4, a. a aci,, u 4.

Future Self-Guides. E,.?, :0-..-.,0 Q., 5...q ',D5', 4,] 1-}., d-'.4.., _. ZoltAn Dbrnyei Introduction. u u rt 5,4) ,-,4, a. a aci,, u 4. te SelfGi ZltAn Dbnyei Intdtin ; ) Q) 4 t? ) t _ 4 73 y S _ E _ p p 4 t t 4) 1_ ::_ J 1 `i () L VI O I4 " " 1 D 4 L e Q) 1 k) QJ 7 j ZS _Le t 1 ej!2 i1 L 77 7 G (4) 4 6 t (1 ;7 bb F) t f; n (i M Q) 7S

More information

NOTES WEEK 01 DAY 1 SCOT ADAMS

NOTES WEEK 01 DAY 1 SCOT ADAMS NOTES WEEK 01 DAY 1 SCOT ADAMS Question: What is Mathematics? Answer: The study of absolute truth. Question: Why is it so hard to teach and to learn? Answer: One must learn to play a variety of games called

More information

Iris: Higher-Order Concurrent Separation Logic. Lecture 4: Basic Separation Logic: Proving Pointer Programs

Iris: Higher-Order Concurrent Separation Logic. Lecture 4: Basic Separation Logic: Proving Pointer Programs 1 Iris: Higher-Order Concurrent Separation Logic Lecture 4: Basic Separation Logic: Proving Pointer Programs Lars Birkedal Aarhus University, Denmark November 10, 2017 2 Overview Earlier: Operational Semantics

More information

1 Introduction. 2 First Order Logic. 3 SPL Syntax. 4 Hoare Logic. 5 Exercises

1 Introduction. 2 First Order Logic. 3 SPL Syntax. 4 Hoare Logic. 5 Exercises Contents 1 Introduction INF5140: Lecture 2 Espen H. Lian Institutt for informatikk, Universitetet i Oslo January 28, 2009 2 Proof System 3 SPL 4 GCD 5 Exercises Institutt for informatikk (UiO) INF5140:

More information

A new, axiom-free implementation of CFML for the verification of imperative programs

A new, axiom-free implementation of CFML for the verification of imperative programs A new, axiom-free implementation of CFML for the verification of imperative programs Arthur Charguéraud Inria 2017/10/13 1 / 31 CFML: program verification using characteristic formulae Old CFML: too large

More information

Dr. Marques Sophie Algebra 1 Spring Semester 2017 Problem Set 9

Dr. Marques Sophie Algebra 1 Spring Semester 2017 Problem Set 9 Dr. Marques Sophie Algebra Spring Semester 207 Office 59 marques@cims.nyu.edu Problem Set 9 Exercise 0 : Prove that every group of order G 28 must contain a normal subgroup of order 7. (Why should it contain

More information

Outline. A recursive function follows the structure of inductively-defined data.

Outline. A recursive function follows the structure of inductively-defined data. Outline A recursive function follows the structure of inductively-defined data. With lists as our example, we shall study 1. inductive definitions (to specify data) 2. recursive functions (to process data)

More information

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam Logic and Modelling Introduction to Predicate Logic Jörg Endrullis VU University Amsterdam Predicate Logic In propositional logic there are: propositional variables p, q, r,... that can be T or F In predicate

More information

Introduction to computability Tutorial 7

Introduction to computability Tutorial 7 Introduction to computability Tutorial 7 Context free languages and Turing machines November 6 th 2014 Context-free languages 1. Show that the following languages are not context-free: a) L ta i b j a

More information

I-1. rei. o & A ;l{ o v(l) o t. e 6rf, \o. afl. 6rt {'il l'i. S o S S. l"l. \o a S lrh S \ S s l'l {a ra \o r' tn $ ra S \ S SG{ $ao. \ S l"l. \ (?

I-1. rei. o & A ;l{ o v(l) o t. e 6rf, \o. afl. 6rt {'il l'i. S o S S. ll. \o a S lrh S \ S s l'l {a ra \o r' tn $ ra S \ S SG{ $ao. \ S ll. \ (? >. 1! = * l >'r : ^, : - fr). ;1,!/!i ;(?= f: r*. fl J :!= J; J- >. Vf i - ) CJ ) ṯ,- ( r k : ( l i ( l 9 ) ( ;l fr i) rf,? l i =r, [l CB i.l.!.) -i l.l l.!. * (.1 (..i -.1.! r ).!,l l.r l ( i b i i '9,

More information

PRINCIPLES OF ANALYSIS - LECTURE NOTES

PRINCIPLES OF ANALYSIS - LECTURE NOTES PRINCIPLES OF ANALYSIS - LECTURE NOTES PETER A. PERRY 1. Constructions of Z, Q, R Beginning with the natural numbers N t1, 2, 3,...u we can use set theory to construct, successively, Z, Q, and R. We ll

More information

Homework for MATH 4604 (Advanced Calculus II) Spring 2017

Homework for MATH 4604 (Advanced Calculus II) Spring 2017 Homework for MATH 4604 (Advanced Calculus II) Spring 2017 Homework 14: Due on Tuesday 2 May 55. Let m, n P N, A P R mˆn and v P R n. Show: L A pvq 2 ď A 2 v 2. 56. Let n P N and let A P R nˆn. Let I n

More information

First-Order Logic. Resolution

First-Order Logic. Resolution First-Order Logic Resolution 1 Resolution for predicate logic Gilmore s algorithm is correct and complete, but useless in practice. We upgrade resolution to make it work for predicate logic. 2 Recall:

More information

NOTES WEEK 13 DAY 2 SCOT ADAMS

NOTES WEEK 13 DAY 2 SCOT ADAMS NOTES WEEK 13 DAY 2 SCOT ADAMS Recall: Let px, dq be a metric space. Then, for all S Ď X, we have p S is sequentially compact q ñ p S is closed and bounded q. DEFINITION 0.1. Let px, dq be a metric space.

More information

Probability Generating Functions

Probability Generating Functions Probability Generating Functions Andreas Klappenecker Texas A&M University 2018 by Andreas Klappenecker. All rights reserved. 1 / 27 Probability Generating Functions Definition Let X be a discrete random

More information

L11: Algebraic Path Problems with applications to Internet Routing Lectures 7 and 8

L11: Algebraic Path Problems with applications to Internet Routing Lectures 7 and 8 L: Algebraic Path Problems with applications to Internet Routing Lectures 7 and 8 Timothy G. Grifn timothy.grifn@cl.cam.ac.uk Computer Laboratory University of Cambridge, UK Michaelmas Term, 27 tgg22 (cl.cam.ac.uk)

More information

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated

More information

NOTES WEEK 04 DAY 1 SCOT ADAMS

NOTES WEEK 04 DAY 1 SCOT ADAMS NOTES WEEK 0 DAY 1 SCOT ADAMS DEFINITION 01 Let m, n P N, B P BpR m, R n q Let e 1,, e m be the standard basis of R m Let f 1,, f n be the standard basis of R n Then we define rbs P R nˆm by rbs ji Bpe

More information

L11: Algebraic Path Problems with applications to Internet Routing Lecture 9

L11: Algebraic Path Problems with applications to Internet Routing Lecture 9 L11: Algebraic Path Problems with applications to Internet Routing Lecture 9 Timothy G. Griffin timothy.griffin@cl.cam.ac.uk Computer Laboratory University of Cambridge, UK Michaelmas Term, 2017 tgg22

More information

Exhibit 2-9/30/15 Invoice Filing Page 1841 of Page 3660 Docket No

Exhibit 2-9/30/15 Invoice Filing Page 1841 of Page 3660 Docket No xhibit 2-9/3/15 Invie Filing Pge 1841 f Pge 366 Dket. 44498 F u v 7? u ' 1 L ffi s xs L. s 91 S'.e q ; t w W yn S. s t = p '1 F? 5! 4 ` p V -', {} f6 3 j v > ; gl. li -. " F LL tfi = g us J 3 y 4 @" V)

More information

ETIKA V PROFESII PSYCHOLÓGA

ETIKA V PROFESII PSYCHOLÓGA P r a ž s k á v y s o k á š k o l a p s y c h o s o c i á l n í c h s t u d i í ETIKA V PROFESII PSYCHOLÓGA N a t á l i a S l o b o d n í k o v á v e d ú c i p r á c e : P h D r. M a r t i n S t r o u

More information

L11: Algebraic Path Problems with applications to Internet Routing Lecture 15. Path Weight with functions on arcs?

L11: Algebraic Path Problems with applications to Internet Routing Lecture 15. Path Weight with functions on arcs? L11: Algebraic Path Problems with applications to Internet Routing Lecture 15 Timothy G. Griffin timothy.griffin@cl.cam.ac.uk Computer Laboratory University of Cambridge, UK Michaelmas Term, 2016 tgg22

More information

Random Variables. Andreas Klappenecker. Texas A&M University

Random Variables. Andreas Klappenecker. Texas A&M University Random Variables Andreas Klappenecker Texas A&M University 1 / 29 What is a Random Variable? Random variables are functions that associate a numerical value to each outcome of an experiment. For instance,

More information

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples Hoare Logic I Introduction to Deductive Program Verification Işıl Dillig Program Spec Deductive verifier FOL formula Theorem prover valid contingent Example specs: safety (no crashes), absence of arithmetic

More information

n r t d n :4 T P bl D n, l d t z d th tr t. r pd l

n r t d n :4 T P bl D n, l d t z d   th tr t. r pd l n r t d n 20 20 :4 T P bl D n, l d t z d http:.h th tr t. r pd l 2 0 x pt n f t v t, f f d, b th n nd th P r n h h, th r h v n t b n p d f r nt r. Th t v v d pr n, h v r, p n th pl v t r, d b p t r b R

More information

4 4 N v b r t, 20 xpr n f th ll f th p p l t n p pr d. H ndr d nd th nd f t v L th n n f th pr v n f V ln, r dn nd l r thr n nt pr n, h r th ff r d nd

4 4 N v b r t, 20 xpr n f th ll f th p p l t n p pr d. H ndr d nd th nd f t v L th n n f th pr v n f V ln, r dn nd l r thr n nt pr n, h r th ff r d nd n r t d n 20 20 0 : 0 T P bl D n, l d t z d http:.h th tr t. r pd l 4 4 N v b r t, 20 xpr n f th ll f th p p l t n p pr d. H ndr d nd th nd f t v L th n n f th pr v n f V ln, r dn nd l r thr n nt pr n,

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by

More information

HOPF ALGEBRAS AND LIE ALGEBRAS UCHICAGO PRO-SEMINAR - JANUARY 9, 2014

HOPF ALGEBRAS AND LIE ALGEBRAS UCHICAGO PRO-SEMINAR - JANUARY 9, 2014 HOPF ALGEBRAS AND LIE ALGEBRAS UCHICAGO PRO-SEMINAR - JANUARY 9, 2014 Hopf Algebras Lie Algebras Restricted Lie Algebras Poincaré-Birkhoff-Witt Theorem Milnor-Moore Theorem Cohomology of Lie Algebras Remark

More information

The essence and origins of FRP

The essence and origins of FRP The essence and origins of FRP Conal Elliott June 13, 2015 Conal Elliott The essence and origins of FRP June 13, 2015 1 / 31 What is FRP? Conal Elliott The essence and origins of FRP June 13, 2015 2 /

More information

MATH 387 ASSIGNMENT 2

MATH 387 ASSIGNMENT 2 MATH 387 ASSIGMET 2 SAMPLE SOLUTIOS BY IBRAHIM AL BALUSHI Problem 4 A matrix A ra ik s P R nˆn is called symmetric if a ik a ki for all i, k, and is called positive definite if x T Ax ě 0 for all x P R

More information

L E C T U R E 2 1 : M AT R I X T R A N S F O R M AT I O N S. Monday, November 14

L E C T U R E 2 1 : M AT R I X T R A N S F O R M AT I O N S. Monday, November 14 L E C T U R E 2 1 : M AT R I X T R A N S F O R M AT I O N S Monday, November 14 In this lecture we want to consider functions between vector spaces. Recall that a function is simply a rule that takes an

More information

,. *â â > V>V. â ND * 828.

,. *â â > V>V. â ND * 828. BL D,. *â â > V>V Z V L. XX. J N R â J N, 828. LL BL D, D NB R H â ND T. D LL, TR ND, L ND N. * 828. n r t d n 20 2 2 0 : 0 T http: hdl.h ndl.n t 202 dp. 0 02802 68 Th N : l nd r.. N > R, L X. Fn r f,

More information

REAL ANALYSIS II TAKE HOME EXAM. T. Tao s Lecture Notes Set 5

REAL ANALYSIS II TAKE HOME EXAM. T. Tao s Lecture Notes Set 5 REAL ANALYSIS II TAKE HOME EXAM CİHAN BAHRAN T. Tao s Lecture Notes Set 5 1. Suppose that te 1, e 2, e 3,... u is a countable orthonormal system in a complex Hilbert space H, and c 1, c 2,... is a sequence

More information

46 D b r 4, 20 : p t n f r n b P l h tr p, pl t z r f r n. nd n th t n t d f t n th tr ht r t b f l n t, nd th ff r n b ttl t th r p rf l pp n nt n th

46 D b r 4, 20 : p t n f r n b P l h tr p, pl t z r f r n. nd n th t n t d f t n th tr ht r t b f l n t, nd th ff r n b ttl t th r p rf l pp n nt n th n r t d n 20 0 : T P bl D n, l d t z d http:.h th tr t. r pd l 46 D b r 4, 20 : p t n f r n b P l h tr p, pl t z r f r n. nd n th t n t d f t n th tr ht r t b f l n t, nd th ff r n b ttl t th r p rf l

More information

Characterizing Cycle Partition in 2-Row Bulgarian Solitaire

Characterizing Cycle Partition in 2-Row Bulgarian Solitaire Saint Peter s University Honors Thesis Characterizing Cycle Partition in 2-Row Bulgarian Solitaire Author: Sabin K Pradhan Advisor: Dr Brian Hopkins A thesis submitted in partial fulfillment of the requirements

More information

Extensive Form Abstract Economies and Generalized Perfect Recall

Extensive Form Abstract Economies and Generalized Perfect Recall Extensive Form Abstract Economies and Generalized Perfect Recall Nicholas Butler Princeton University July 30, 2015 Nicholas Butler (Princeton) EFAE and Generalized Perfect Recall July 30, 2015 1 / 1 Motivation

More information

For example, p12q p2x 1 x 2 ` 5x 2 x 2 3 q 2x 2 x 1 ` 5x 1 x 2 3. (a) Let p 12x 5 1x 7 2x 4 18x 6 2x 3 ` 11x 1 x 2 x 3 x 4,

For example, p12q p2x 1 x 2 ` 5x 2 x 2 3 q 2x 2 x 1 ` 5x 1 x 2 3. (a) Let p 12x 5 1x 7 2x 4 18x 6 2x 3 ` 11x 1 x 2 x 3 x 4, SOLUTIONS Math A4900 Homework 5 10/4/2017 1. (DF 2.2.12(a)-(d)+) Symmetric polynomials. The group S n acts on the set tx 1, x 2,..., x n u by σ x i x σpiq. That action extends to a function S n ˆ A Ñ A,

More information

Theorems for free : a (calculational) introduction

Theorems for free : a (calculational) introduction Theorems for free : a (calculational) introduction J.N. Oliveira Dept. Informática, Universidade do Minho Braga, Portugal 2003 (last update: 2013) Parametric polymorphism by example Function countbits

More information

we can assume without loss of generality that x and y are of the form x pabcq and y pbcdq,

we can assume without loss of generality that x and y are of the form x pabcq and y pbcdq, 1. Symmetric and alternating groups. SOLUTIONS Math A4900 Homework 9 11/1/2017 (a) In class we showed that S n is generated by T tpi jq 1 ď i ă j ď nu, the set of transpositions in S n. Show by induction

More information

0 t b r 6, 20 t l nf r nt f th l t th t v t f th th lv, ntr t n t th l l l nd d p rt nt th t f ttr t n th p nt t th r f l nd d tr b t n. R v n n th r

0 t b r 6, 20 t l nf r nt f th l t th t v t f th th lv, ntr t n t th l l l nd d p rt nt th t f ttr t n th p nt t th r f l nd d tr b t n. R v n n th r n r t d n 20 22 0: T P bl D n, l d t z d http:.h th tr t. r pd l 0 t b r 6, 20 t l nf r nt f th l t th t v t f th th lv, ntr t n t th l l l nd d p rt nt th t f ttr t n th p nt t th r f l nd d tr b t n.

More information

PR D NT N n TR T F R 6 pr l 8 Th Pr d nt Th h t H h n t n, D D r r. Pr d nt: n J n r f th r d t r v th tr t d rn z t n pr r f th n t d t t. n

PR D NT N n TR T F R 6 pr l 8 Th Pr d nt Th h t H h n t n, D D r r. Pr d nt: n J n r f th r d t r v th tr t d rn z t n pr r f th n t d t t. n R P RT F TH PR D NT N N TR T F R N V R T F NN T V D 0 0 : R PR P R JT..P.. D 2 PR L 8 8 J PR D NT N n TR T F R 6 pr l 8 Th Pr d nt Th h t H h n t n, D.. 20 00 D r r. Pr d nt: n J n r f th r d t r v th

More information

Crypto math II. Alin Tomescu May 27, Abstract A quick overview on group theory from Ron Rivest s course in Spring 2015.

Crypto math II. Alin Tomescu May 27, Abstract A quick overview on group theory from Ron Rivest s course in Spring 2015. Crypto math II Alin Tomescu alinush@mit.edu May 7, 015 Abstract A quick overview on group theory from Ron Rivest s 6.857 course in Spring 015. 1 Overview Group theory review Diffie-Hellman (DH) key exchange

More information

H NT Z N RT L 0 4 n f lt r h v d lt n r n, h p l," "Fl d nd fl d " ( n l d n l tr l t nt r t t n t nt t nt n fr n nl, th t l n r tr t nt. r d n f d rd n t th nd r nt r d t n th t th n r lth h v b n f

More information

The Riemann Roch theorem for metric graphs

The Riemann Roch theorem for metric graphs The Riemann Roch theorem for metric graphs R. van Dobben de Bruyn 1 Preface These are the notes of a talk I gave at the graduate student algebraic geometry seminar at Columbia University. I present a short

More information

NOTES WEEK 02 DAY 1. THEOREM 0.3. Let A, B and C be sets. Then

NOTES WEEK 02 DAY 1. THEOREM 0.3. Let A, B and C be sets. Then NOTES WEEK 02 DAY 1 SCOT ADAMS LEMMA 0.1. @propositions P, Q, R, rp or pq&rqs rp p or Qq&pP or Rqs. THEOREM 0.2. Let A and B be sets. Then (i) A X B B X A, and (ii) A Y B B Y A THEOREM 0.3. Let A, B and

More information

R e p u b lic o f th e P h ilip p in e s. R e g io n V II, C e n tra l V isa y a s. C ity o f T a g b ila ran

R e p u b lic o f th e P h ilip p in e s. R e g io n V II, C e n tra l V isa y a s. C ity o f T a g b ila ran R e p u b l f th e P h lp p e D e p rt e t f E d u t R e V, e tr l V y D V N F B H L ty f T b l r Ju ly, D V N M E M R A N D U M N. 0,. L T F E N R H G H H L F F E R N G F R 6 M P L E M E N T A T N T :,

More information

Topics in Concurrency

Topics in Concurrency Topics in Concurrency Lecture 3 Jonathan Hayman 18 February 2015 Recap: Syntax of CCS Expressions: Arithmetic a and Boolean b Processes: p ::= nil nil process (τ p) silent/internal action (α!a p) output

More information

5. Program Correctness: Mechanics

5. Program Correctness: Mechanics 5. Program Correctness: Mechanics Program A: LinearSearch with function specification @pre 0 l u < a @post rv i. l i u a[i] = e bool LinearSearch(int[] a, int l, int u, int e) { for @ (int i := l; i u;

More information

Singular integral operators and the Riesz transform

Singular integral operators and the Riesz transform Singular integral operators and the Riesz transform Jordan Bell jordan.bell@gmail.com Department of Mathematics, University of Toronto November 17, 017 1 Calderón-Zygmund kernels Let ω n 1 be the measure

More information

rhtre PAID U.S. POSTAGE Can't attend? Pass this on to a friend. Cleveland, Ohio Permit No. 799 First Class

rhtre PAID U.S. POSTAGE Can't attend? Pass this on to a friend. Cleveland, Ohio Permit No. 799 First Class rhtr irt Cl.S. POSTAG PAD Cllnd, Ohi Prmit. 799 Cn't ttnd? P thi n t frind. \ ; n l *di: >.8 >,5 G *' >(n n c. if9$9$.jj V G. r.t 0 H: u ) ' r x * H > x > i M

More information

Entropy and Ergodic Theory Lecture 7: Rate-distortion theory

Entropy and Ergodic Theory Lecture 7: Rate-distortion theory Entropy and Ergodic Theory Lecture 7: Rate-distortion theory 1 Coupling source coding to channel coding Let rσ, ps be a memoryless source and let ra, θ, Bs be a DMC. Here are the two coding problems we

More information

q-de Rham cohomology via Λ-rings

q-de Rham cohomology via Λ-rings q-de Rham cohomology via Λ-rings J.P.Pridham arxiv:1608.07142 1 / 21 q-analogues (Gauss) rns q : qn 1 q 1 1 q... qn 1 rns q! : rns q... r2s q r1s q, ¹ n 1 i 0 n 1 ¹ i 0 p1 p1 n k q : rns q! rn ksq!rksq!

More information

Representation of Piecewise Linear Interval Functions

Representation of Piecewise Linear Interval Functions Representation of Piecewise Linear Interval Functions Verimag Research Report n o TR-2012-16 October 2, 2012 Reports are downloadable at the following address http://www-verimag.imag.fr Unité Mite de Recherche

More information

RAMSEY PARTIAL ORDERS FROM ACYCLIC GRAPHS

RAMSEY PARTIAL ORDERS FROM ACYCLIC GRAPHS RAMSEY PARTIAL ORDERS FROM ACYCLIC GRAPHS JAROSLAV NEŠETŘIL AND VOJTĚCH RÖDL Abstract. We prove that finite partial orders with a linear extension form a Ramsey class. Our proof is based on the fact that

More information

APPH 4200 Physics of Fluids

APPH 4200 Physics of Fluids APPH 42 Physics of Fluids Problem Solving and Vorticity (Ch. 5) 1.!! Quick Review 2.! Vorticity 3.! Kelvin s Theorem 4.! Examples 1 How to solve fluid problems? (Like those in textbook) Ç"Tt=l I $T1P#(

More information

NOTES WEEK 14 DAY 2 SCOT ADAMS

NOTES WEEK 14 DAY 2 SCOT ADAMS NOTES WEEK 14 DAY 2 SCOT ADAMS For this lecture, we fix the following: Let n P N, let W : R n, let : 2 P N pr n q and let I : id R n : R n Ñ R n be the identity map, defined by Ipxq x. For any h : W W,

More information

n

n p l p bl t n t t f Fl r d, D p rt nt f N t r l R r, D v n f nt r r R r, B r f l. n.24 80 T ll h, Fl. : Fl r d D p rt nt f N t r l R r, B r f l, 86. http://hdl.handle.net/2027/mdp.39015007497111 r t v n

More information

Vr Vr

Vr Vr F rt l Pr nt t r : xt rn l ppl t n : Pr nt rv nd PD RDT V t : t t : p bl ( ll R lt: 00.00 L n : n L t pd t : 0 6 20 8 :06: 6 pt (p bl Vr.2 8.0 20 8.0. 6 TH N PD PPL T N N RL http : h b. x v t h. p V l

More information

NOTES WEEK 11 DAY 2 SCOT ADAMS

NOTES WEEK 11 DAY 2 SCOT ADAMS NOTES WEEK 11 DAY 2 SCOT ADAMS In Proposition 0.1 below, Bp0, δq is just the open interval p δ, δq and Bp0, x q is just the closed interval r x, x s. PROPOSITION 0.1. Let g : R R and let δ ą 0. Assume

More information

r*tt7v Progress, Ibe Ur)ft>ersal LaWof J^atare; Th>oagbt, fbe 3olA>er)t of Jier Problems. CHICAGO, SEPTEMBER MRS. ADA FOYE.

r*tt7v Progress, Ibe Ur)ft>ersal LaWof J^atare; Th>oagbt, fbe 3olA>er)t of Jier Problems. CHICAGO, SEPTEMBER MRS. ADA FOYE. 7v P U)> L ^; > 3>) P L' PBR 3 892 45 p p p j j pp p j ^ pp p k k k k pp v k! k k p k p p B pp P k p v p : p ' P Bk z v z k p p v v k : ] 9 p p j v p v p xp v v p ^ 8 ; p p p : : x k p pp k p k v k 20

More information

Last time: Recall that the fibers of a map ϕ : X Ñ Y are the sets in ϕ 1 pyq Ď X which all map to the same element y P Y.

Last time: Recall that the fibers of a map ϕ : X Ñ Y are the sets in ϕ 1 pyq Ď X which all map to the same element y P Y. Last time: Recall that the fibers of a map ϕ : X Ñ Y are the sets in ϕ 1 pyq Ď X which all map to the same element y P Y. Last time: Recall that the fibers of a map ϕ : X Ñ Y are the sets in ϕ 1 pyq Ď

More information

M e t ir c S p a c es

M e t ir c S p a c es A G M A A q D q O I q 4 78 q q G q 3 q v- q A G q M A G M 3 5 4 A D O I A 4 78 / 3 v D OI A G M 3 4 78 / 3 54 D D v M q D M 3 v A G M 3 v M 3 5 A 4 M W q x - - - v Z M * A D q q q v W q q q q D q q W q

More information

Lecture 24 Properties of deals

Lecture 24 Properties of deals Lecture 24 Properties of deals Aside: Representation theory of finite groups Let G be a finite group, and let R C, R, or Q (any commutative ring). Aside: Representation theory of finite groups Let G be

More information

Valence automata as a generalization of automata with storage

Valence automata as a generalization of automata with storage Valence automata as a generalization of automata with storage Georg Zetzsche Technische Universität Kaiserslautern D-CON 2013 Georg Zetzsche (TU KL) Valence automata D-CON 2013 1 / 23 Example (Pushdown

More information

APPROXIMATE HOMOMORPHISMS BETWEEN THE BOOLEAN CUBE AND GROUPS OF PRIME ORDER

APPROXIMATE HOMOMORPHISMS BETWEEN THE BOOLEAN CUBE AND GROUPS OF PRIME ORDER APPROXIMATE HOMOMORPHISMS BETWEEN THE BOOLEAN CUBE AND GROUPS OF PRIME ORDER TOM SANDERS The purpose of this note is to highlight a question raised by Shachar Lovett [Lov], and to offer some motivation

More information

ON THE SHORTEST PATH THROUGH A NUMBER OF POINTS

ON THE SHORTEST PATH THROUGH A NUMBER OF POINTS ON THE SHORTEST PATH THROUGH A NUMBER OF POINTS S. VERBLUNSKY 1. Introduction. Let 0 denote a bounded open set in the x, y plane, with boundary of zero measure. There is a least absolute positive constant

More information

Theorem The simple finite dimensional sl 2 modules Lpdq are indexed by

Theorem The simple finite dimensional sl 2 modules Lpdq are indexed by The Lie algebra sl 2 pcq has basis x, y, and h, with relations rh, xs 2x, rh, ys 2y, and rx, ys h. Theorem The simple finite dimensional sl 2 modules Lpdq are indexed by d P Z ě0 with basis tv`, yv`, y

More information

Iris: Higher-Order Concurrent Separation Logic. Lecture 6: Case Study: foldr

Iris: Higher-Order Concurrent Separation Logic. Lecture 6: Case Study: foldr 1 Iris: Higher-Order Concurrent Separation Logic Lecture 6: Case Study: foldr Lars Birkedal Aarhus University, Denmark November 10, 2017 2 Overview Earlier: Operational Semantics of λ ref,conc e, (h, e)

More information

Mathematische Methoden der Unsicherheitsquantifizierung

Mathematische Methoden der Unsicherheitsquantifizierung Mathematische Methoden der Unsicherheitsquantifizierung Oliver Ernst Professur Numerische Mathematik Sommersemester 2014 Contents 1 Introduction 1.1 What is Uncertainty Quantification? 1.2 A Case Study:

More information

The Emptiness Problem for Valence Automata or: Another Decidable Extension of Petri Nets

The Emptiness Problem for Valence Automata or: Another Decidable Extension of Petri Nets The Emptiness Problem for Valence Automata or: Another Decidable Extension of Petri Nets Georg Zetzsche Technische Universität Kaiserslautern Reachability Problems 2015 Georg Zetzsche (TU KL) Emptiness

More information

CSE20: Discrete Mathematics

CSE20: Discrete Mathematics Spring 2018 Summary Today: Induction, Program Correctness Reading: Chap. 5 Division Theorem Theorem: For every integer a and positive integer d 1, there exist integers q, r such that a = qd + r and 0 r

More information

A Full RNS Implementation of Fan and Vercauteren Somewhat Homomorphic Encryption Scheme

A Full RNS Implementation of Fan and Vercauteren Somewhat Homomorphic Encryption Scheme A Full RNS Implementation of Fan and Vercauteren Somewhat Homomorphic Encryption Scheme Presented by: Vincent Zucca 1 Joint work with: Jean-Claude Bajard 1, Julien Eynard 2 and Anwar Hasan 2 1 Sorbonne

More information

CIS (More Propositional Calculus - 6 points)

CIS (More Propositional Calculus - 6 points) 1 CIS6333 Homework 1 (due Friday, February 1) 1. (Propositional Calculus - 10 points) --------------------------------------- Let P, Q, R range over state predicates of some program. Prove or disprove

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation Page 1 of 61 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 5: Program Correctness: Mechanics Page 2 of 61 Program A: LinearSearch with function specification @pre 0 l u < a @post rv

More information

arxiv: v2 [math.ca] 13 May 2015

arxiv: v2 [math.ca] 13 May 2015 ON THE CLOSURE OF TRANSLATION-DILATION INVARIANT LINEAR SPACES OF POLYNOMIALS arxiv:1505.02370v2 [math.ca] 13 May 2015 J. M. ALMIRA AND L. SZÉKELYHIDI Abstract. Assume that a linear space of real polynomials

More information

Euclidean Spaces. Euclidean Spaces. Chapter 10 -S&B

Euclidean Spaces. Euclidean Spaces. Chapter 10 -S&B Chapter 10 -S&B The Real Line: every real number is represented by exactly one point on the line. The plane (i.e., consumption bundles): Pairs of numbers have a geometric representation Cartesian plane

More information

CS 173 Lecture 7: Arithmetic (II)

CS 173 Lecture 7: Arithmetic (II) CS 173 Lecture 7: Arithmetic (II) José Meseguer University of Illinois at Urbana-Champaign 1 The Fundamental Theorem of Arithmetic (Part II) Fundamental Theorem of Arithmetic (Part II). Every natural number

More information

Axiomatic Semantics. Hoare s Correctness Triplets Dijkstra s Predicate Transformers

Axiomatic Semantics. Hoare s Correctness Triplets Dijkstra s Predicate Transformers Axiomatic Semantics Hoare s Correctness Triplets Dijkstra s Predicate Transformers Goal of a program = IO Relation Problem Specification Properties satisfied by the input and expected of the output (usually

More information

Some multilinear algebra

Some multilinear algebra Some multilinear algera Multilinear forms Let V e a finite dimensional R-vector space, dim V n. For k P N 0, we denote y T k V the vector space of k-linear forms Then T 1 V V and, y convention, T 0 V R.

More information

Very quick introduction to the conformal group and cft

Very quick introduction to the conformal group and cft CHAPTER 1 Very quick introduction to the conformal group and cft The world of Conformal field theory is big and, like many theories in physics, it can be studied in many ways which may seem very confusing

More information

Symmetries of Weight Enumerators

Symmetries of Weight Enumerators Martino Borello (Paris 8-LAGA) Trento, 16.11.2016 1 / 23 Symmetries of Weight Enumerators Martino Borello Université Paris 8 - LAGA Trento, 16.11.2016 Martino Borello (Paris 8-LAGA) Trento, 16.11.2016

More information

4 8 N v btr 20, 20 th r l f ff nt f l t. r t pl n f r th n tr t n f h h v lr d b n r d t, rd n t h h th t b t f l rd n t f th rld ll b n tr t d n R th

4 8 N v btr 20, 20 th r l f ff nt f l t. r t pl n f r th n tr t n f h h v lr d b n r d t, rd n t h h th t b t f l rd n t f th rld ll b n tr t d n R th n r t d n 20 2 :24 T P bl D n, l d t z d http:.h th tr t. r pd l 4 8 N v btr 20, 20 th r l f ff nt f l t. r t pl n f r th n tr t n f h h v lr d b n r d t, rd n t h h th t b t f l rd n t f th rld ll b n

More information

Erdinç Dündar, Celal Çakan

Erdinç Dündar, Celal Çakan DEMONSTRATIO MATHEMATICA Vol. XLVII No 3 2014 Erdinç Dündar, Celal Çakan ROUGH I-CONVERGENCE Abstract. In this work, using the concept of I-convergence and using the concept of rough convergence, we introduced

More information

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)? How does discrete math help us Helps create a solution (program) Helps analyze a program How does discrete math help (CS160)? Helps create a solution (program) q Logic helps you understand conditionals

More information

R for beginners. 2 The few things to know before st. 8 Index 31

R for beginners. 2 The few things to know before st. 8 Index 31 ; & & & 8 * ( 0 " & 9 1 R f Eu l 1 W R? 3 T fw kw f 5 3-4.1 T

More information

,.*Hffi;;* SONAI, IUERCANTII,N I,IMITDII REGD- 0FFICE: 105/33, VARDHMAN GotD[N PLNLA,R0AD No.44, pitampura, DELHI *ffigfk"

,.*Hffi;;* SONAI, IUERCANTII,N I,IMITDII REGD- 0FFICE: 105/33, VARDHMAN GotD[N PLNLA,R0AD No.44, pitampura, DELHI *ffigfk $ S, URCT,,MTD RGD 0C: 10/, VRDM G[ LL,R0D.44, ptmpur, DL114 C: l22ldll98l,c0224gb, eb:.nlmernte.m T, Dte: 17h tber, 201 BS Lmted hre ]eejeebhy Ter Dll Street Mumb 41 The Mnger (Ltng) Delh Stk xhnge /1,

More information

Topics in Concurrency

Topics in Concurrency Topics in Concurrency Lecture 3 Jonathan Hayman 18 October 2016 Towards a more basic language Aim: removal of variables to reveal symmetry of input and output Transitions for value-passing carry labels

More information

Provenance Semirings. Todd Green Grigoris Karvounarakis Val Tannen. presented by Clemens Ley

Provenance Semirings. Todd Green Grigoris Karvounarakis Val Tannen. presented by Clemens Ley Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place of origin Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place

More information

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK Midlands Graduate School, University of Birmingham, April 2008 1 Operational Semantics Abstract Machines and Correctness Roy L. Crole University of Leicester, UK Midlands Graduate School, University of

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

The Assignment Axiom (Hoare)

The Assignment Axiom (Hoare) The Assignment Axiom (Hoare) Syntax: V := E Semantics: value of V in final state is value of E in initial state Example: X:=X+ (adds one to the value of the variable X) The Assignment Axiom {Q[E/V ]} V

More information

First-Order Predicate Logic. Basics

First-Order Predicate Logic. Basics First-Order Predicate Logic Basics 1 Syntax of predicate logic: terms A variable is a symbol of the form x i where i = 1, 2, 3.... A function symbol is of the form fi k where i = 1, 2, 3... und k = 0,

More information

Disjoint paths in tournaments

Disjoint paths in tournaments Disjoint paths in tournaments Maria Chudnovsky 1 Columbia University, New York, NY 10027, USA Alex Scott Mathematical Institute, University of Oxford, 24-29 St Giles, Oxford OX1 3LB, UK Paul Seymour 2

More information