Higher-Order Distributions for Linear Logic Marie Kerjean & - - PowerPoint PPT Presentation

higher order distributions for linear logic
SMART_READER_LITE
LIVE PREVIEW

Higher-Order Distributions for Linear Logic Marie Kerjean & - - PowerPoint PPT Presentation

Fossacs 2019 Higher-Order Distributions for Linear Logic Marie Kerjean & Jean-Simon Lemay Inria Bretagne - LS2N - Nantes & University of Oxford logo_oxford.png 1 / 34 Differentiating Programs - Differentiating Functions


slide-1
SLIDE 1

Fossacs 2019

Higher-Order Distributions for Linear Logic

Marie Kerjean & Jean-Simon Lemay

Inria Bretagne - LS2N - Nantes & University of Oxford

logo_oxford.png

1 / 34

slide-2
SLIDE 2

Differentiating Programs - Differentiating Functions

◮ Differentiation in Theoretical Computer Science : Automatic Differentiation, Incremental Computing, Differential Linear Logic... [Discrete] ◮ Differentiation in Mathematics : Differential Geometry, Numerical Analysis, Functional analysis ... [continuous] Differentiation in Computer Science the same as Differentiation in Mathematics ?

2 / 34

slide-3
SLIDE 3

Differentiating Programs - Differentiating Functions

◮ Differentiation in Theoretical Computer Science : Automatic Differentiation, Incremental Computing, Differential Linear Logic... [Discrete] ◮ Differentiation in Mathematics : Differential Geometry, Numerical Analysis, Functional analysis ... [continuous] Is differentiation in Logic the same as Differentiation in Functional Analysis ? ◮ [K18] : Models of Differential Linear Logic with Distributions and Differential Equations, without Higher-Order. C∞(Rn, R) ◮ Today : going to Higher Order. C∞(E, R) ?

3 / 34

slide-4
SLIDE 4

Differentiating Programs - Differentiating Functions

◮ Differentiation in Theoretical Computer Science : Automatic Differentiation, Incremental Computing, Differential Linear Logic... [Discrete] ◮ Differentiation in Mathematics : Differential Geometry, Numerical Analysis, Functional analysis ... [continuous] Is differentiation in Logic the same as Differentiation in Functional Analysis ? ◮ [K18] : Models of Differential Linear Logic with Distributions and Differential Equations, without Higher-Order. C∞(Rn, R) ◮ Today : going to Higher Order. C∞(E, R) ?

4 / 34

slide-5
SLIDE 5

Differentiating Programs - Differentiating Functions

◮ Differentiation in Theoretical Computer Science : Automatic Differentiation, Incremental Computing, Differential Linear Logic... [Discrete] ◮ Differentiation in Mathematics : Differential Geometry, Numerical Analysis, Functional analysis ... [continuous] Is differentiation in Logic the same as Differentiation in Functional Analysis ? ◮ [K18] : Models of Differential Linear Logic with Distributions and Differential Equations, without Higher-Order. C∞(Rn, R) ◮ Today : going to Higher Order. C∞(E, R) ?

From mathematics to computer science. ⇐ Higher-Order

5 / 34

slide-6
SLIDE 6

Differentiating Programs - Differentiating Functions

◮ Differentiation in Theoretical Computer Science : Automatic Differentiation, Incremental Computing, Differential Linear Logic... [Discrete] ◮ Differentiation in Mathematics : Differential Geometry, Numerical Analysis, Functional analysis ... [continuous] Is differentiation in Logic the same as Differentiation in Functional Analysis ? ◮ [K18] : Models of Differential Linear Logic with Distributions and Differential Equations, without Higher-Order. C∞(Rn, R) ◮ Today : going to Higher Order. C∞(E, R) ?

From models for physics to models for computing. ⇐ Higher-Order

6 / 34

slide-7
SLIDE 7

Curry-Howard-Lambek

The syntax mirrors the semantics. Programs Logic Semantics

fun (x:A)-> (t:B)

Proof of A ⊢ B f : A → B. Types Formulas Objects Execution Cut-elimination Equality

7 / 34

slide-8
SLIDE 8

Curry-Howard-Lambek

The syntax mirrors the semantics. Programs Logic Semantics

fun (x:A)-> (t:B)

Proof of A ⊢ B f : A → B. Types Formulas Objects Execution Cut-elimination Equality λ-calculus

Coherence spaces [Girard87] Linear maps f : A ⊸ B Non-linear maps f : !A ⊸ B

slide-9
SLIDE 9

Curry-Howard-Lambek

The syntax mirrors the semantics. Programs Logic Semantics

fun (x:A)-> (t:B)

Proof of A ⊢ B f : A → B. Types Formulas Objects Execution Cut-elimination Equality λ-calculus

Coherence spaces [Girard87] Linear maps f : A ⊸ B Non-linear maps f : !A ⊸ B Linear Logic [Gir87] Linear proofs f : A ⊢ B Non-linear proofs f : !A ⊢ B !A ⊸ B ≃ A ⇒ B

slide-10
SLIDE 10

Curry-Howard-Lambek

The syntax mirrors the semantics. Programs Logic Semantics

fun (x:A)-> (t:B)

Proof of A ⊢ B f : A → B. Types Formulas Objects Execution Cut-elimination Equality λ-calculus

Coherence spaces [Girard87] Linear maps f : A ⊸ B Non-linear maps f : !A ⊸ B Linear Logic [Gir87] Linear proofs f : A ⊢ B Non-linear proofs f : !A ⊢ B !A ⊸ B ≃ A ⇒ B Vectorial Models [Ehrhard02/05] Power series f =

n fn

Differentiation D0 : f → f1 Differential Linear Logic [Ehrhard&Regnier06]

10 / 34

slide-11
SLIDE 11

Linear logic

A linear implication

A ⇒ B = ! A ⊸ B C∞(A, B) ≃ L(!A, B) Usual Implication A proof is linear when it uses only once its hypothesis A.

11 / 34

slide-12
SLIDE 12

Linear logic

A linear implication

A ⇒ B = ! A ⊸ B C∞(A, B) ≃ L(!A, B) Usual implication Linear Implication A proof is linear when it uses only once its hypothesis A.

12 / 34

slide-13
SLIDE 13

Linear logic

A linear implication

A ⇒ B = ! A ⊸ B C∞(A, B) ≃ L(!A, B) Usual implication Linear implication Exponential A proof is linear when it uses only once its hypothesis A.

13 / 34

slide-14
SLIDE 14

Linear logic

A linear implication

A ⇒ B = ! A ⊸ B C∞(A, B) ≃ L(!A, B)

A focus on linearity

◮ Higher-Order is about Seely’s isomoprhism. C∞(A × B, C) ≃ C∞(A, C∞(B, C)) L(!(A × B), C) ≃ L(!A, L(!B, C)) !(A × B)≃ !Aˆ ⊗!B ◮ Classicality is about a linear involutive negation : A⊥ := A ⊸ ⊥ A′ := L(A, R) A⊥⊥ ≃ A A ≃ A′′

14 / 34

slide-15
SLIDE 15

Just a glimpse at Differential Linear Logic

Differential Linear Logic

ℓ : A ⊢ B d ℓ : !A ⊢ B f : !A ⊢ B ¯ d D0(f ) : A ⊢ B A linear proof is in particular non-linear. From a non-linear proof we can extract a linear proof

f ∈ C∞(R, R) d(f )(0)

Normal functors, power series and λ-calculus. Girard, APAL(1988)

15 / 34

slide-16
SLIDE 16

Getting a smooth model of classical Differential Linear Logic ? Smoothness

Spaces : E is a locally convex and Haussdorf topological vector space. Functions: f ∈ C∞(Rn, R) is infinitely and everywhere differentiable. These two requirements work as opposite forces. Handling smooth functions : some completeness. Interpreting the involutive linear negation (E ⊥)⊥ ≃ E: Reflexive spaces.

16 / 34

slide-17
SLIDE 17

Getting a smooth model of classical Differential Linear Logic ? Smoothness

Spaces : E is a locally convex and Haussdorf topological vector space. Functions: f ∈ C∞(Rn, R) is infinitely and everywhere differentiable. These two requirements work as opposite forces. Handling smooth functions : some completeness. × Interpreting the involutive linear negation (E ⊥)⊥ ≃ E. Reflexive spaces

Convenient differential category Blute, Ehrhard Tasson Cah. Geom. Diff. (2010) Mackey-complete spaces and Power series, K. and Tasson, MSCS 2016.

17 / 34

slide-18
SLIDE 18

Getting a smooth model of classical Differential Linear Logic ? Smoothness

Spaces : E is a locally convex and Haussdorf topological vector space. Functions: f ∈ C∞(Rn, R) is infinitely and everywhere differentiable. These two requirements work as opposite forces. × Handling smooth functions : some completeness. Interpreting the involutive linear negation (E ⊥)⊥ ≃ E: Reflexive spaces.

Weak topologies for Linear Logic, K. LMCS 2015.

18 / 34

slide-19
SLIDE 19

Getting a smooth model of classical Differential Linear Logic ? Smoothness

Spaces : E is a locally convex and Haussdorf topological vector space. Functions: f ∈ C∞(Rn, R) is infinitely and everywhere differentiable. These two requirements work as opposite forces. Handling smooth functions : some completeness. Interpreting the involutive linear negation (E ⊥)⊥ ≃ E: Reflexive spaces.

A model of LL with Schwartz’ epsilon product, Dabrowski and K., 2018. A logical account for PDEs, K., LICS18 [A polarized solution, no higher-order] Higher-Order Distributions, Lemay and K., Fossacs19

19 / 34

slide-20
SLIDE 20

Exponential : from ressources to distributions

◮ Linear Logic has long been interpreted in terms of discrete models and resource consumption. quantitative semantics: !A :=

n A⊗n

20 / 34

slide-21
SLIDE 21

Exponential : from ressources to distributions

◮ Linear Logic has long been interpreted in terms of discrete models and resource consumption. quantitative semantics: !A :=

n A⊗n

◮ In a classical and Smooth model of Differential Linear Logic, the exponential is a space of Distributions. !A ⊸ ⊥ = A ⇒ ⊥ L(!E, R) ≃ C∞(E, R) (!E)′′ ≃ C∞(E, R)′ !E ≃ C∞(E, R)′

21 / 34

slide-22
SLIDE 22

Exponential : from ressources to distributions

◮ Linear Logic has long been interpreted in terms of discrete models and resource consumption. quantitative semantics: !A :=

n A⊗n

◮ In a classical and Smooth model of Differential Linear Logic, the exponential is a space of Distributions. !A ⊸ ⊥ = A ⇒ ⊥ L(!E, R) ≃ C∞(E, R) (!E)′′ ≃ C∞(E, R)′ !E ≃ C∞(E, R)′ ◮ The space of distributions with compact support E′(Rn) := C∞(Rn, R)′, whose elements are for example : φf : g ∈ C∞(Rn, R) →

  • fg.

δx : g → g(x)

22 / 34

slide-23
SLIDE 23

Exponential : from ressources to distributions

◮ Linear Logic has long been interpreted in terms of discrete models and resource consumption. quantitative semantics: !A :=

n A⊗n

◮ In a classical and Smooth model of Differential Linear Logic, the exponential is a space of Distributions. !A ⊸ ⊥ = A ⇒ ⊥ L(!E, R) ≃ C∞(E, R) (!E)′′ ≃ C∞(E, R)′ !E ≃ C∞(E, R)′ ◮ LL and Distribution Theory enjoy the same computing principle same computing principles : Seely’s isomorphisms are Kernel theorems. !A ⊗ !B ≃ !(A × B) C∞(E, R)′ ˆ ⊗C∞(F, R)′ ≃ C∞(E × F, R)′ .

23 / 34

slide-24
SLIDE 24

Which category of tvs should interpret formulas ?

Reflexive spaces enjoy poor stability properties. ◮ It is typically not preserved by ⊗. ◮ Nor by L( , ). Reflexivity takes many forms : ◮ It depends of the topology E ′

β, E ′ c, E ′ w, E ′ µ on the dual.

◮ The dual is not reflexive : one cannot close by bidual as with biorthogonals. Monoidal closedness does not extends easily to the topological case : ◮ Many possible topologies on ⊗: ⊗β, ⊗π, ⊗ε. ◮ LB(E ⊗B F, G) ≃ LB(E, LB(F, G)) ⇔ ”Grothendieck probl` eme des topologies”.

24 / 34

slide-25
SLIDE 25

Topological models of DiLL

[Ehr02] [Ehr05] [DE08] countable bases

  • f vector spaces

Coherent Banach spaces [Girard99] a norm is too restrictive Reflexive anc complete : e.g. C∞(Rn, R) C∞(Rn, R) is not finite dimensional

25 / 34

slide-26
SLIDE 26

Polarized model of Smooth differential Linear Logic [K.18]

Typical Nuclear Fr´ echet spaces are spaces of [smooth, holomorphic, rapidly decreasing ...] functions.

Fr´ echet spaces C∞(Rn, R) DF-spaces !Rn = C∞(Rn, R)′ Nuclear spaces ⊗ε ≃ ⊗π Rn ( )′ ( )′ What about C∞(!Rn, R) or !!Rn ?

26 / 34

slide-27
SLIDE 27

Constructing some notion of smoothness which leaves stable the class of reflexive topological vector space. We tackle this issue through the space of distribution Consider E a topological vector space. ◮ Define an order on linear injections f : Rn ֒ → E by f ≤ g := ∃ι : Rn ֒ → Rm, f = g ◦ ι. ◮ Define the action of a distribution on E with respect to these linear injections: E′(E) := lim − →

f :Rn⊸E

E′

f (Rn)

directed under the inclusion maps defined as Sf ,g : E′

g(Rn) → E′ f (Rm), φ → (h → φ(h ◦ ιn,m))

This is similar to work on C∞-algebras [KainKrieglMichor87], which we need to refine to obtain reflexivity.

27 / 34

slide-28
SLIDE 28

A good inductive limit

Because the distributions spaces with which we build the inductive limit are extremenly regular, we have ◮ E′(E) is always reflexive. weakly quasi-complete : E = E ′′ algebraically. barrelled E ≃ E ′′ topologically. ◮ E′(E) is the dual of a projective limit of spaces of functions : E(E) := lim ← −

f :Rn⊸E

Ef (Rn) φ ∈ E′(E) acts on f = (ff )f :Rn֒

→E.

where ff ∈ C∞(Rn, R). The Kernel Theorem lifts to Higher-Order : E(E)ˆ ⊗E(F) ≃ E(E ⊕ F)

28 / 34

slide-29
SLIDE 29

Reflexivity is enough for the structural morphisms

Because we worked with reflexive spaces at the beginning, we can built natural transformations : dE :        !(E) → E ′′ ≃ E φ → ( ℓ

  • E⊸R

∈ E ′ → φ[(

Rn→R

  • ℓ ◦ f )f :Rn֒

→E ∈ E(E)]

  • R

) ¯ dE :      E → !E ≃ (E(E))′ x → ((ff )f :Rn⊸E ′) → D0ff (f −1(x)) where f is injective such that x ∈ Im(f ) . And interpretations for (co)-weakening and (co)-contraction follow from the Kernel Theorem.

29 / 34

slide-30
SLIDE 30

We have obtain polarized model of Differential Linear Logic : CoLim NDF, ˆ ⊗, ⊕ E′(F) Lim NF, `, × E(E) F E ( )′ ( )′

30 / 34

slide-31
SLIDE 31

We have obtain polarized model of Differential Linear Logic : CoLim NDF, ˆ ⊗, ⊕ E′(F) Lim NF, `, × E(E) F E ( )′ ( )′ ... without promotion

31 / 34

slide-32
SLIDE 32

We don’t have a Cartesian Closed Category

This definition gives us functoriality only on isomorphisms : ! :      Refliso → Refliso E → E′(E) ℓ : E ⊸ F → !ℓ ∈ E(F ′) where (!ℓ)(φ)(g) = φ((gℓ ◦ f

  • Rn֒

→F

)f :Rn֒

→E).

No category with smooth functions as maps. We have however a good candidate to make a co-monad of our functor. µE :         !E → !!E φ →

  • (gg)g ∈ E(!E) ≃ lim

− → C∞

g (Rm)

  • → gg(g −1(φ))

32 / 34

slide-33
SLIDE 33

Conclusion

What we have :

A Higher-Order exponential extending the notion of distributions, which interpret classical Differential Linear Logic without promotion. E′(E) := lim − →

f :Rn⊸E

E′

f (Rn)

Perspectives :

◮ Linearity / Non-linearity , Solution /Parameter, Positive / Negative : give a categorical structure to the several interactions at stakes. ◮ Lifting this exponential to a co-monad: finer handling of indexations. ◮ Constructing exponentials via methods from Numerical Analysis : !E = < δx, x ∈ E > [BET12] Cut-elimination through Numerical Schemes.

33 / 34

slide-34
SLIDE 34

Computing in Higher-Dimension - Computing Solutions

◮ If we wanted only smoothness and no reflexivty, we could have used :

!E = < δx, x ∈ E >

By Fr¨

  • licher and Kriegl, as used by Blute, Ehrhard and Tasson.

That’s a discretisation scheme.

◮ In [K18] we showed that cut-elimination is the resolution of certain class of differential equations for which we have an explicit one-step resolution . generalize to partial differential equations with no explicit solution.

Let’s embed numerical schemes into cut-elimination.

34 / 34