differential program semantics sub modular functions and
play

Differential program semantics: sub-modular functions and partial - PowerPoint PPT Presentation

Differential program semantics: sub-modular functions and partial metrics Guillaume Geoffroy, Paolo Pistone DIAPASoN, Unibo 27 February 2020 1 / 17 A metric on programs? Distance between programs ( t , s ) : 2 / 17 A metric on programs?


  1. Differential program semantics: sub-modular functions and partial metrics Guillaume Geoffroy, Paolo Pistone DIAPASoN, Unibo 27 February 2020 1 / 17

  2. A metric on programs? Distance between programs ∂ ( t , s ) : 2 / 17

  3. A metric on programs? Distance between programs ∂ ( t , s ) : ◮ Compatible with product and function types, 2 / 17

  4. A metric on programs? Distance between programs ∂ ( t , s ) : ◮ Compatible with product and function types, ◮ ∂ ( t , t ) ✟ = 0, ❍ ✟ ❍ 2 / 17

  5. A metric on programs? Distance between programs ∂ ( t , s ) : ◮ Compatible with product and function types, ◮ ∂ ( t , t ) ✟ = 0, ❍ ✟ ❍ ◮ Asymmetric, ◮ No triangular inequality. 2 / 17

  6. Differential program semantics C A B 3 / 17

  7. Differential program semantics – alternative approach ◮ Step 1: define a notion of approximate program denotation, ◮ Step 2: define distances between approximate denotations. 4 / 17

  8. Differential program semantics – alternative approach ◮ Step 1: define a notion of approximate program denotation, ◮ Step 2: define distances between approximate denotations. Example: Programs of type R ◮ Approximate reals: [ R ] = { [ x , y ]; x ≤ y } ∪ { R } , 4 / 17

  9. Differential program semantics – alternative approach ◮ Step 1: define a notion of approximate program denotation, ◮ Step 2: define distances between approximate denotations. Example: Programs of type R ◮ Approximate reals: [ R ] = { [ x , y ]; x ≤ y } ∪ { R } , ◮ Distance: ∂ ( a , b ) = diameter( a ∪ b ) 4 / 17

  10. Differential program semantics – alternative approach ◮ Step 1: define a notion of approximate program denotation, ◮ Step 2: define distances between approximate denotations. Example: Programs of type R ◮ Approximate reals: [ R ] = { [ x , y ]; x ≤ y } ∪ { R } , ◮ Distance: ∂ ( a , b ) = diameter( a ∪ b ) = diameter( a ∨ b ) . 4 / 17

  11. Approximate denotations Definition An interval space space I is the data of: ◮ a set |I| , ◮ a subset I ⊆ P ( |I| ) \ {∅} closed under non-empty intersections. 5 / 17

  12. Approximate denotations Definition An interval space space I is the data of: ◮ a set |I| , ◮ a subset I ⊆ P ( |I| ) \ {∅} closed under non-empty intersections. Example The interval space [ R ] ◮ | [ R ] | , ◮ [ R ] = { [ x , y ]; x ≤ y } ∪ { R } . 5 / 17

  13. Approximate functions – wrong definition Definition? ◮ An approximate function from [ R ] to [ R ] is a function ϕ : R → [ R ] , 6 / 17

  14. Approximate functions – wrong definition Definition? ◮ An approximate function from [ R ] to [ R ] is a function ϕ : R → [ R ] , ◮ Given ϕ, ψ : R → [ R ] , � ψ ◦ ϕ := x �→ ψ ( y ) . y ∈ ϕ ( x ) 6 / 17

  15. Approximate functions – wrong definition Definition? ◮ An approximate function from [ R ] to [ R ] is a function ϕ : R → [ R ] , ◮ Given ϕ, ψ : R → [ R ] , � ψ ◦ ϕ := x �→ ψ ( y ) . y ∈ ϕ ( x ) Problem: not associative 6 / 17

  16. Approximate functions Definition ◮ An approximate function from [ R ] to [ R ] is a monotone function ϕ : [ R ] → [ R ] , 7 / 17

  17. Approximate functions Definition ◮ An approximate function from [ R ] to [ R ] is a monotone function ϕ : [ R ] → [ R ] , ◮ ϕ is optimal if for all a ∈ [ R ] , ϕ ( a ) = � x ∈ a ϕ ( { x } ) . 7 / 17

  18. Approximate functions Definition ◮ An approximate function from [ R ] to [ R ] is a monotone function ϕ : [ R ] → [ R ] , ◮ ϕ is optimal if for all a ∈ [ R ] , ϕ ( a ) = � x ∈ a ϕ ( { x } ) . Definition Let I , J be interval spaces. An approximate function from I to J is a monotone function ϕ : I → J . 7 / 17

  19. Approximate functions Definition Let I , J be interval spaces. An approximate function from I to J is a monotone function ϕ : I → J . 7 / 17

  20. Approximate functions Definition Let I , J be interval spaces. An approximate function from I to J is a monotone function ϕ : I → J . Definition The category A of approximate programs is defined by: ◮ the objects of A are the interval spaces, ◮ for all I , J , A ( I , J ) is the poset of approximate functions from I to J . 7 / 17

  21. Exact vs aproximate functions Notation For all ϕ ∈ A ( I , J ) , | ϕ | = { f : |I| → |J | ; ∀ x f ( x ) ∈ ϕ ( x ) } . 8 / 17

  22. Exact vs aproximate functions Notation For all ϕ ∈ A ( I , J ) , | ϕ | = { f : |I| → |J | ; ∀ x f ( x ) ∈ ϕ ( x ) } . Definition For all f : |I| → |J | , the differential d f ∈ A ( I , J ) is defined by: � d f ( a ) = f ( x ) . x ∈ a 8 / 17

  23. Exact vs aproximate functions Notation For all ϕ ∈ A ( I , J ) , | ϕ | = { f : |I| → |J | ; ∀ x f ( x ) ∈ ϕ ( x ) } . Definition For all f : |I| → |J | , the differential d f ∈ A ( I , J ) is defined by: � d f ( a ) = f ( x ) . x ∈ a Lemma For all f , ϕ : d f ≤ ϕ ⇔ f ∈ | ϕ | . 8 / 17

  24. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , 9 / 17

  25. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , 9 / 17

  26. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , ◮ π L ( a × b ) = a and π R ( a × b ) = b , 9 / 17

  27. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , ◮ π L ( a × b ) = a and π R ( a × b ) = b , ◮ � ϕ, ψ � = c �→ ϕ ( a ) × ϕ ( b ) . 9 / 17

  28. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , ◮ π L ( a × b ) = a and π R ( a × b ) = b , ◮ � ϕ, ψ � = c �→ ϕ ( a ) × ϕ ( b ) . ◮ For all ϕ, ψ , π L ◦ � ϕ, ψ � = ϕ and π R ◦ � ϕ, ψ � = ψ , 9 / 17

  29. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , ◮ π L ( a × b ) = a and π R ( a × b ) = b , ◮ � ϕ, ψ � = c �→ ϕ ( a ) × ϕ ( b ) . ◮ For all ϕ, ψ , π L ◦ � ϕ, ψ � = ϕ and π R ◦ � ϕ, ψ � = ψ , ◮ For all χ , � π L ◦ χ, π R ◦ χ � = χ . 9 / 17

  30. Cartesian product Definition For all I , J , let: ◮ |I × J | = |I| × |J | , ◮ I × J = { a × b ; a ∈ I , b ∈ J } , ◮ π L ( a × b ) = a and π R ( a × b ) = b , ◮ � ϕ, ψ � = c �→ ϕ ( a ) × ϕ ( b ) . This defines a cartesian product in A : ◮ For all ϕ, ψ , π L ◦ � ϕ, ψ � = ϕ and π R ◦ � ϕ, ψ � = ψ , ◮ For all χ , � π L ◦ χ, π R ◦ χ � = χ . 9 / 17

  31. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , 10 / 17

  32. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , 10 / 17

  33. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , ◮ for all ϕ ∈ A ( K , exp( I , J )) , 10 / 17

  34. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , ◮ for all ϕ ∈ A ( K , exp( I , J )) , � � ev( ϕ ) = c × a �→ f ( x ) x ∈ a f ∈ ϕ ( c ) 10 / 17

  35. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , ◮ for all ϕ ∈ A ( K , exp( I , J )) , � � � ev( ϕ ) = c × a �→ f ( x ) = d f ( a ) , x ∈ a f ∈ ϕ ( c ) f ∈ ϕ ( c ) 10 / 17

  36. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , ◮ for all ϕ ∈ A ( K , exp( I , J )) , � � � ev( ϕ ) = c × a �→ f ( x ) = d f ( a ) , x ∈ a f ∈ ϕ ( c ) f ∈ ϕ ( c ) ◮ for all ψ ∈ A ( K × I , J ) , 10 / 17

  37. Exponentials Definition For all I , J , let: ◮ | exp( I , J ) | = { functions from |I| to |J |} , ◮ exp( I , J ) = {| ϕ | ; ϕ ∈ A ( I , J ) } , ◮ for all ϕ ∈ A ( K , exp( I , J )) , � � � ev( ϕ ) = c × a �→ f ( x ) = d f ( a ) , x ∈ a f ∈ ϕ ( c ) f ∈ ϕ ( c ) ◮ for all ψ ∈ A ( K × I , J ) , λ ( ψ ) = c �→ | a �→ ψ ( c , a ) | . 10 / 17

  38. Exponentials � λ ( ψ ) = c �→ | a �→ ψ ( c , a ) | ev( ϕ ) = d f ( a ) f ∈ ϕ ( c ) 11 / 17

  39. Exponentials � λ ( ψ ) = c �→ | a �→ ψ ( c , a ) | ev( ϕ ) = d f ( a ) f ∈ ϕ ( c ) Proposition This defines a lax-expenential : ◮ ev( ϕ ◦ χ ) = ev( ϕ ) ◦ ( χ × id) and λ ( ψ ◦ ( χ × id)) = λ ( ψ ) ◦ χ , 11 / 17

  40. Exponentials � λ ( ψ ) = c �→ | a �→ ψ ( c , a ) | ev( ϕ ) = d f ( a ) f ∈ ϕ ( c ) Proposition This defines a lax-expenential : ◮ ev( ϕ ◦ χ ) = ev( ϕ ) ◦ ( χ × id) and λ ( ψ ◦ ( χ × id)) = λ ( ψ ) ◦ χ , ◮ ev( λ ( ψ )) ≤ ψ , 11 / 17

  41. Exponentials � λ ( ψ ) = c �→ | a �→ ψ ( c , a ) | ev( ϕ ) = d f ( a ) f ∈ ϕ ( c ) Proposition This defines a lax-expenential : ◮ ev( ϕ ◦ χ ) = ev( ϕ ) ◦ ( χ × id) and λ ( ψ ◦ ( χ × id)) = λ ( ψ ) ◦ χ , ◮ ev( λ ( ψ )) ≤ ψ , ◮ ϕ ≤ λ (ev( ϕ )) . 11 / 17

Recommend


More recommend