Pablo Arrighi and Alejandro Díaz-Caro - A System F Accounting For Scalars

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 101

A System F accounting for scalars

arXiv:0903.3741

Pablo Arrighi and Alejandro Daz-Caro


Universit de Grenoble Laboratoire d'Informatique de Grenoble

November 19th, 2009. PPS (Paris)

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Global context
Oddity of Quantum theory
ad hoc

Quantum Logic?

(developed

before quantum computing, no clear relation with

quantum programs).

Birkho, G. and J. von Neumann, The logic of quantum mechanics, Annals of Mathematics 37 (1936), pp. 823843.
1
Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 2/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Global context
Oddity of Quantum theory
ad hoc

Quantum Logic?

(developed

before quantum computing, no clear relation with

quantum programs). Models of Linear Logics

Quantum Theory? (Coherent

spaces, Micromechanics loses duplicability.)

Birkho, G. and J. von Neumann, The logic of quantum mechanics, Annals of Mathematics 37 (1936), pp. 823843.
1
Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 2/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Global context
Oddity of Quantum theory
ad hoc

Quantum Logic?

(developed

before quantum computing, no clear relation with

quantum programs). Models of Linear Logics

Quantum Theory? (Coherent

spaces, Micromechanics loses duplicability.) Curry-Howard : (programs,types)=(proofs,logics). Quantum Computation : (quantum programs, quantum types). CH+QC : (quantum th. proofs, quantum th. logics)? Quantum logics : isolating the reasoning behind quantum algorithms?

Birkho, G. and J. von Neumann, The logic of quantum mechanics, Annals of Mathematics 37 (1936), pp. 823843.
1
Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 2/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Global context
Oddity of Quantum theory
ad hoc

Quantum Logic?

(developed

before quantum computing, no clear relation with

quantum programs). Models of Linear Logics

Quantum Theory? (Coherent

spaces, Micromechanics loses duplicability.) Curry-Howard : (programs,types)=(proofs,logics). Quantum Computation : (quantum programs, quantum types). CH+QC : (quantum th. proofs, quantum th. logics)? Quantum logics : isolating the reasoning behind quantum algorithms?

What are quantum types?


Birkho, G. and J. von Neumann, The logic of quantum mechanics, Annals of Mathematics 37 (1936), pp. 823843.
1
Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 2/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Quantum theory

States are (normalized) vectors Vector space of o.n.b.

(bi ).

v.

Then

v=

i i bi .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

3/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Quantum theory

States are (normalized) vectors Vector space of o.n.b.

(bi ).

v.

Then

v=

i i bi .

v = U v.

Evolutions are (unitary) linear operators U .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

3/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Quantum theory

States are (normalized) vectors Vector space of o.n.b.

(bi ).

v.

Then

v=

i i bi .

v = U v.

Evolutions are (unitary) linear operators U .

Systems are put next to one another with Bilinear just like application :

u + v w = u w + v w, u v + w = u v + u w, . . .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

3/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Quantum theory

States are (normalized) vectors Vector space of o.n.b.

(bi ).

v.

Then

v=

i i bi .

v = U v.

Evolutions are (unitary) linear operators U .

Systems are put next to one another with Bilinear just like application :

u + v w = u w + v w, u v + w = u v + u w, . . . No-cloning theorem!

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

3/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

No-cloning theorem
Statement: Proof: Vector space of o.n.b.
U

: U

v = v v.
so

(bi ),

v=

bi = bi bi
U

i bi .

We can have (=copying, OK)

But then

v =

i bi = i U bi i i = i bi bi = i j bi bj i ij = ( i bi ) ( j bj ) i j = vv
U

(=cloning, Not OK)

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

4/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

No-cloning theorem
Statement: Proof: Vector space of o.n.b.
U

: U

v = v v.
so

(bi ),

v=

bi = bi bi
U

i bi .

We can have (=copying, OK)

But then

v =

i bi = i U bi i i = i bi bi = i j bi bj i ij = ( i bi ) ( j bj ) i j = vv
U

(=cloning, Not OK)

Conicts with -reduction?


Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 4/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic The language

-Calculus2

Higher-order computation t ::= x | x .t | (t t) |

Arrighi, P. and G. Dowek. Linear-algebraic -calculus: higher-order, encodings and conuence. Lecture Notes in Computer Science (RTA'08), 5117
2

(2008), pp. 1731.


Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

5/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic The language

-Calculus2
Linear algebra t + t | .t | 0

Higher-order computation t ::= x | x .t | (t t) |

Arrighi, P. and G. Dowek. Linear-algebraic -calculus: higher-order, encodings and conuence. Lecture Notes in Computer Science (RTA'08), 5117
2

(2008), pp. 1731.


Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

5/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic The language

-Calculus2
Linear algebra t + t | .t | 0

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

b an abstraction or a

variable.

Arrighi, P. and G. Dowek. Linear-algebraic -calculus: higher-order, encodings and conuence. Lecture Notes in Computer Science (RTA'08), 5117
2

(2008), pp. 1731.


Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

5/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic The language

-Calculus2
Linear algebra t + t | .t | 0
Elementary rules such as

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

b an abstraction or a

variable.

u + 0 u and .(u + v) .u + .v.


.u + .u ( + ).u.

u closed normal. (***) u and u + v closed normal.


(**)

Factorisation rules such as (**)

Application rules such as (***)

u (v + w) (u v) + (u w).
Arrighi, P. and G. Dowek. Linear-algebraic -calculus: higher-order, encodings and conuence. Lecture Notes in Computer Science (RTA'08), 5117
2

(2008), pp. 1731.


Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

5/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Copying vs Cloning

Untyped

-calculus

+ linear algebra

Cloning?

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

6/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Copying vs Cloning

Untyped

-calculus

+ linear algebra

Cloning?

x .(x x )

i
( i bi ) (

i bi

i bi bi

i bi )

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

6/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Copying vs Cloning

Untyped

-calculus

+ linear algebra

Cloning?

x .(x x )

i
( i bi ) (

i bi

i bi bi

i bi )

No-cloning says bottom reduction forbidden. We must delay beta reduction till after linearity. So restrict beta reduction to

vectors i.e.

base

abstractions or variables.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

6/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Yb x .(b + (x x )) x .(b + (x x )) Yb b + Yb

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Yb x .(b + (x x )) x .(b + (x x )) Yb b + Yb
But whoever says innity says trouble says. . .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Yb x .(b + (x x )) x .(b + (x x )) Yb b + Yb
But whoever says innity says trouble says. . . indenite forms.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Yb x .(b + (x x )) x .(b + (x x )) Yb b + Yb
But whoever says innity says trouble says. . . indenite forms.

Yb Yb b + Yb Yb b

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

Linear-Algebraic -Calculus Why the restrictions : Innities


Untyped

-calculus

+ linear algebra

Yb x .(b + (x x )) x .(b + (x x )) Yb b + Yb
But whoever says innity says trouble says. . . indenite forms.

Yb Yb b + Yb Yb b

0
High school teacher says we must restrict factorization rules to

nite vectors i.e.


Pablo Arrighi and Alejandro Daz-Caro, LIG

closed-normal forms.
A System F accounting for scalars, arXiv:0903.3741 7/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Straightforward extension of System F (2la )

System F rules plus simple rules to type algebraic terms

0: A

ax0

u: A

v: A

u + v: A

+I

t: A
.t : A

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

8/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Straightforward extension of System F (2la )

System F rules plus simple rules to type algebraic terms

0: A

ax0

u: A

v: A

u + v: A

+I

t: A
.t : A

Theorem (Strong normalization)

t: T

is strongly normalising.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

8/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Straightforward extension of System F (2la )

System F rules plus simple rules to type algebraic terms

0: A

ax0

u: A

v: A

u + v: A

+I

t: A
.t : A

Theorem (Strong normalization)

t: T

is strongly normalising.

Proof.

Sketch: We extend the notion of saturated sets.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

8/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la


SN :

Set of strongly normalising terms

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

9/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la


SN :

Set of strongly normalising terms

A subset X
1 2 3 4

n 0, (((x t1 ) . . . ) tn ) X where ti SN ; v[b/x ] t X (x v) b t X ; t, u X t + u X ; , t X .t X ; i I , ((ui w1 ) . . . wn ) X


i

SN

is saturated if

w1 . . . w X ;
n

i I , (u wi ) X u
i

7 8 9 10

.((t1 t2 ) . . . tn ) X ((t1 t2 ) . . . .tk ) . . . tn X (1 k n); 0 X; t SN , (0 t ) X ; SN , (t 0) X . t, u u


X

X;

stable by construction and anti-reduction

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

9/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la


SN :

Set of strongly normalising terms

A subset X
1 2 3 4

n 0, (((x t1 ) . . . ) tn ) X where ti SN ; v[b/x ] t X (x v) b t X ; t, u X t + u X ; , t X .t X ; i I , ((ui w1 ) . . . wn ) X


i

SN

is saturated if

w1 . . . w X ;
n

i I , (u wi ) X u
i

7 8 9 10

.((t1 t2 ) . . . tn ) X ((t1 t2 ) . . . .tk ) . . . tn X (1 k n); 0 X; t SN , (0 t ) X ; SN , (t 0) X . t, u u


X

X;

stable by construction and anti-reduction

SAT

is the set of all saturated sets


A System F accounting for scalars, arXiv:0903.3741 9/31

Pablo Arrighi and Alejandro Daz-Caro, LIG

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (II)

Rening the sketch: The idea is that types correspond to saturated sets.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

10/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (II)

Rening the sketch: The idea is that types correspond to saturated sets. This correspondance is achived by a maping from types to
SAT .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

10/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (III)

Lemma
1

SN

SAT , SAT A B SAT ,

A B

For all collection A

of members of SAT ,

i Ai SAT ,

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

11/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (III)

Lemma
1

SN

SAT , SAT A B SAT ,

A B

For all collection A

of members of SAT ,

i Ai SAT ,

Denition (Mapping)
[[X ]] = (X ) [[X .T ]] =
(where

() : TVar SAT )

[[A B ]] = [[A]] [[B ]]

Y SAT [[T ]](X :=Y )

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

11/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (III)

Lemma
1

SN

SAT , SAT A B SAT ,

A B

For all collection A

of members of SAT ,

i Ai SAT ,

Denition (Mapping)
[[X ]] = (X ) [[X .T ]] =
(where

() : TVar SAT )

[[A B ]] = [[A]] [[B ]]

Y SAT [[T ]](X :=Y )

Lemma
Given a valuation

, [[T ]] SAT
A System F accounting for scalars, arXiv:0903.3741 11/31

Pablo Arrighi and Alejandro Daz-Caro, LIG

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (IV)

Denition ( )
For

= x1 : A1 , . . . , xn : An ,
x1

t: T

means that

[[A1 ]] , . . . xn [[An ]] t [[T ]]

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

12/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (IV)

Denition ( )
For

= x1 : A1 , . . . , xn : An ,
x1

t: T

means that

[[A1 ]] , . . . xn [[An ]] t [[T ]]

Rening the sketch: Prove that

t: T t: T

We prove this by induction on the derivation of the denition of hypothesis)

t: T

(In fact

is slightly dierent to strengthen the induction

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

12/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (V)

Then, the proof of the strong normalisation theorem is: Let

t: T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

13/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (V)

Then, the proof of the strong normalisation theorem is: Let t: T t: T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

13/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (V)

Then, the proof of the strong normalisation theorem is: Let t: T t: T If (xi : Ai ) , xi [[Ai ]]

then

t [[T ]]

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

13/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (V)

Then, the proof of the strong normalisation theorem is: Let t: T t: T If (xi : Ai ) , xi [[Ai ]] Note that
x

then

t [[T ]]

i [[Ai ]]

because

[[Ai ]]

is saturated,

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

13/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Strong normalization of 2la (V)

Then, the proof of the strong normalisation theorem is: Let t: T t: T If (xi : Ai ) , xi [[Ai ]] Note that
x

then

t [[T ]]

i [[Ai ]]

because

then

t is strong normalising because [[T ]] SN

[[Ai ]]

is saturated,

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

13/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Linear-Algebraic -Calculus with 2la

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

Linear algebra t + t | .t | 0
Elementary rules such as

b an abstraction or a variable.

u + 0 u and .(u + v) .u + .v.

Factorisation rules such as

.u + .u ( + ).u.

Application rules such as

u (v + w) (u v) + (u w).

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

14/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Linear-Algebraic -Calculus with 2la

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

Linear algebra t + t | .t | 0
Elementary rules such as

b an abstraction or a variable.

Every typable term is strong normalizing

u + 0 u and .(u + v) .u + .v.

Factorisation rules such as

.u + .u ( + ).u.

Application rules such as

u (v + w) (u v) + (u w).

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

14/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Linear-Algebraic -Calculus with 2la

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

Linear algebra t + t | .t | 0
Elementary rules such as

b an abstraction or a variable. Yb is no typable!

Every typable term is strong normalizing Hence

u + 0 u and .(u + v) .u + .v.

Factorisation rules such as

.u + .u ( + ).u.

Application rules such as

u (v + w) (u v) + (u w).

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

14/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

System F Linear-Algebraic -Calculus with 2la

Higher-order computation t ::= x | x .t | (t t) |


x .t b t[b/x ] ()
(*)

Linear algebra t + t | .t | 0
Elementary rules such as

b an abstraction or a variable.

Every typable term is strong

u + 0 u and .(u + v) .u + .v.

Yb is no typable! t t 0 always, so it is not necesary to reduce t rst. we can


Hence remove the closed-normal restrictions!

normalizing

Factorisation rules such as

.u + .u ( + ).u.

Application rules such as

u (v + w) (u v) + (u w).

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

14/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Grammar

Types grammar:

T = U | X .T | .T | 0, U = X | U T | X .U
where

and

(S, +, )

is a conmutative ring.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

15/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Type inference rules

ax U

[ ]

, x : U

:U , x : U

u: U T
(u v) : T

v: U

t: T

x t : U T I [X ] with

I [U ]

u : X .T u : T [U /X ]

E [X := U ]

u: T u : X .T

FV () /

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

16/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Type inference rules

ax U

[ ]

, x : U

:U , x : U

u: U T
(u v) : T

v: U

t: T

x t : U T I [X ] with

I [U ]

u : X .T u : T [U /X ]
ax0

E [X := U ]

u: T u : X .T

FV () /

u: T

v: T

0: T

u + v: T

+I

u: T
.u : T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

16/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Type inference rules

ax U

[ ]

, x : U

:U , x : U

u : .(U T )

v : .U

(u v) : ( ).T E [X := U ]

t: T

x t : U T I [X ] with

I [U ]

u : X .T u : T [U /X ]
ax

u: T u : X .T

FV () /

0: 0

u : .T

v : .T

u + v : ( + ).T

+I

u: T
.u : .T
sI

[]

Where U

and types in contexts are are in

U.
17/31

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Strong normalisation

()

: map that take types and remove all the scalars on it.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

18/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Strong normalisation

()

: map that take types and remove all the scalars on it.

Example:

(U .X ) = U X

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

18/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Strong normalisation

()

: map that take types and remove all the scalars on it.

Example:

(U .X ) = U X =T
for some T without scalars.

We also dene 0

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

18/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Strong normalisation

()

: map that take types and remove all the scalars on it.

Example:

(U .X ) = U X =T
for some T without scalars.

We also dene 0

Lemma (Correspondence with 2la )

t: T

2la t : T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

18/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Strong normalisation

()

: map that take types and remove all the scalars on it.

Example:

(U .X ) = U X =T
for some T without scalars.

We also dene 0

Lemma (Correspondence with 2la )

t: T

2la t : T

Theorem (Strong normalisation)

t: T

is strongly normalising.

Proof.

By previous lemma

2la

t: T

, then

t is strong

normalising.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

18/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction

Theorem (Subject Reduction)


Let t

t . Then

:T

:T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

19/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction

Theorem (Subject Reduction)


Let t

t . Then

:T

:T
using that rule and

Proof.

(sketch)

We proof rule by rule that if

t : T , then t : T .

tt

In general, the method is to take the term into its small parts and recompose to

t.

t, decompose it

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

19/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (I)


To show a rule as example, we need some auxiliary lemmas and denitions:

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

20/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (I)


To show a rule as example, we need some auxiliary lemmas and denitions: Order: Write A
B A

>B

if either
B

X .A or X .C and

C [U /X ] for some

U.

is the reexive and transitive closure of

>.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

20/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (I)


To show a rule as example, we need some auxiliary lemmas and denitions: Order: Write A
B A

>B

if either
B

X .A or X .C and

C [U /X ] for some

U.

is the reexive and transitive closure of

>.

Instuition of this denition:


Types in the numerator of

t: A t : X .A

with

FV () /

or

t : X .C t : C [U /X ]

are greater than the types in the denominator.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

20/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (II)


Some lemmas needed:

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

21/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (II)


Some lemmas needed:
1

and

t: A t: B

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

21/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (II)


Some lemmas needed:
1 2

B and t : A A B A B
A

t: B

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

21/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (II)


Some lemmas needed:
1 2 3

B and t : A A B A B
A

t: B
(u v) : .T ,
then

Generation lemma (app): Let

u : .U T v : .U T T =

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

21/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (II)


Some lemmas needed:
1 2 3

B and t : A A B A B
A

t: B
(u v) : .T ,
then

Generation lemma (app): Let

u : .U T v : .U T T =
4

Generation lemma (sum): Let

u + v : .T , u : .T v : .T =+
A System F accounting for scalars, arXiv:0903.3741

then

Pablo Arrighi and Alejandro Daz-Caro, LIG

21/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (III)

Example: Rule

( u + v) w ( u w ) + ( v w ) .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

22/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (III)

Example: Rule Let

( u + v) w ( u w ) + ( v w ) .

(u + v) w : T .

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

22/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (III)

Example: Rule Let

( u + v) w ( u w ) + ( v w ) .

(u + v) w : T .

Using the previous lemmas we can prove that

u : ( ).U T v : ((1 ) ).U T w : .U


T
and

where

= 1,

is some scalar.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

22/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (IV)

Then

u : ( ).U T

w : .U

(u w) : ( ).T .T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

23/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (IV)

Then

u : ( ).U T

w : .U

(u w) : ( ).T .T

Also,

v : ((1 ) ).(U T )

w : .U

(v w) : ((1 ) ).T (1 ).T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

23/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Subject reduction proof: example (IV)

Then

u : ( ).U T

w : .U

(u w) : ( ).T .T

Also,


So

v : ((1 ) ).(U T )

w : .U

(v w) : ((1 ) ).T (1 ).T (u w) : .T (v w) : (1 ).T

(u w) + (v w) : T

+I

and

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

23/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Intuition

Conditional

functions

same type on each branch.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

24/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Intuition

Conditional

functions

same type on each branch.

By restricting the scalars to positive reals system.

probabilistic type

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

24/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Intuition

Conditional

functions

same type on each branch.

By restricting the scalars to positive reals system.

probabilistic type

For example, one can type functions such as


1 x {x [ 1 .(true + false)] [ 4 .true + 3 .false]} : B B 2 4

with the type system serving as a guarantee that the function conserves probabilities summing to one.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

24/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Formalisation

We dene the probabilistic type system to be the scalar type system with the following restrictions:

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

25/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Formalisation

We dene the probabilistic type system to be the scalar type system with the following restrictions:

S = R+ ,

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

25/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Formalisation

We dene the probabilistic type system to be the scalar type system with the following restrictions:

S = R+ ,
Contexts: Types in contexts are classic types (C ), i.e. types in

exempt of any scalar,

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

25/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Formalisation

We dene the probabilistic type system to be the scalar type system with the following restrictions:

S = R+ ,
Contexts: Types in contexts are classic types (C ), i.e. types in

exempt of any scalar,

We change the rule

to

t : X .T t : T [C /X ]

with

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

25/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Formalisation

We dene the probabilistic type system to be the scalar type system with the following restrictions:

S = R+ ,
Contexts: Types in contexts are classic types (C ), i.e. types in

exempt of any scalar,

We change the rule

to

t : X .T t : T [C /X ]

with

The nal conclusion must be classic.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

25/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Proof

Denition (Weight function


Let

to check probability distributions)

: R+

be a function dened inductively by:

(0) = 0 (b) = 1 (t1 t2 ) = (t1 ) (t2 )

(t1 + t2 ) = (t1 ) + (t2 ) (.t) = (t)

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

26/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Proof

Denition (Weight function


Let

to check probability distributions)

: R+

be a function dened inductively by:

(0) = 0 (b) = 1 (t1 t2 ) = (t1 ) (t2 )

(t1 + t2 ) = (t1 ) + (t2 ) (.t) = (t)

Theorem (Normal terms in probabilistic have weight 1)


C
t: C

(t ) = 1.

Proof.

We prove that

induction over

t .

t : .C (t ) = by structural

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

26/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Proof

Denition (Weight function


Let

to check probability distributions)

: R+

be a function dened inductively by:

(0) = 0 (b) = 1 (t1 t2 ) = (t1 ) (t2 )

(t1 + t2 ) = (t1 ) + (t2 ) (.t) = (t)

Theorem (Normal terms in probabilistic have weight 1)


C
t: C

(t ) = 1.

Proof.

We prove that

induction over

t .
1 2

t : .C (t ) = by structural

Example: 2.(x

.x )

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

26/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Proof

Denition (Weight function


Let

to check probability distributions)

: R+

be a function dened inductively by:

(0) = 0 (b) = 1 (t1 t2 ) = (t1 ) (t2 )

(t1 + t2 ) = (t1 ) + (t2 ) (.t) = (t)

Theorem (Normal terms in probabilistic have weight 1)


C
t: C

(t ) = 1.

Proof.

We prove that

induction over

t .
1 2

t : .C (t ) = by structural
1 2

Example: 2.(x

.x )

(2.(x
Pablo Arrighi and Alejandro Daz-Caro, LIG

.x ) y ) = 2
A System F accounting for scalars, arXiv:0903.3741 26/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Probabilistic type system: Proof

Denition (Weight function


Let

to check probability distributions)

: R+

be a function dened inductively by:

(0) = 0 (b) = 1 (t1 t2 ) = (t1 ) (t2 )

(t1 + t2 ) = (t1 ) + (t2 ) (.t) = (t)

Theorem (Normal terms in probabilistic have weight 1)


C
t: C

(t ) = 1.

Proof.

We prove that

induction over

t .
1 2

t : .C (t ) = by structural
1 2

Example: 2.(x

.x )

y .x ) y ) = 2 (y ) = 1
26/31

(2.(x
Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (I)

Denition (Proof method of depth n)


0 (S ) = S n1 (S ) n (S ) = R PS
where
S

or

k (S ) h
P

or

h ( S )
P

is a sequent, is a constant derivation tree of size n,

n
R P

max{k , h}

= n 1,

is a typing rule, and is a sequent such that the resulting derivation tree is

well-formed.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

27/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (I)

Denition (Proof method of depth n)


0 (S ) = S n1 (S ) n (S ) = R PS
where
S

or

k (S ) h
P

or

h ( S )
P

is a sequent, is a constant derivation tree of size n,

n
R P

max{k , h}

= n 1,

is a typing rule, and is a sequent such that the resulting derivation tree is

well-formed. C

(n (S ))

denote the conclusion (root) of the tree


A System F accounting for scalars, arXiv:0903.3741

n (S ).
27/31

Pablo Arrighi and Alejandro Daz-Caro, LIG

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (II)

Examples:
S P

1 ( S ) =

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

28/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (II)

Examples:
S P

1 ( S ) =

1 (

t: T) =

t: T t : X .T

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

28/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (II)

Examples:
S P

1 ( S ) =

1 (

t: T) =

t: T t : X .T

n 2 n ( v : 2.A u : .A) = u : .A +I u + v : (2 + ).A

(Partial function or pattern matching)

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

28/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (II)

Examples:
S P

1 ( S ) =

1 (

t: T) =

t: T t : X .T

n 2 n ( v : 2.A u : .A) = u : .A +I u + v : (2 + ).A = PS

means that PS can be derived from S by using S once, with the xed proof method

(Partial function or pattern matching) Basically C (n (S ))

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

28/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (III)

Theorem (No-cloning of scalars)

n such that , C (n ( .U )) = ( s + ).V with = 0 and constants in S , s N>1 and U , V constants in U .


Induction over n.

Proof.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

29/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (III)

Theorem (No-cloning of scalars)

n such that , C (n ( .U )) = ( s + ).V with = 0 and constants in S , s N>1 and U , V constants in U .


Induction over n.

Proof.

Corollary (No-cloning Theorem)


n
such that

T , C (n (

)) =

T.

where A

is the classical encoding for the type of tuples.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

29/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (III)

Theorem (No-cloning of scalars)

n such that , C (n ( .U )) = ( s + ).V with = 0 and constants in S , s N>1 and U , V constants in U .


Induction over n.

Proof.

Corollary (No-cloning Theorem)


n
such that

T , C (n (

)) =

T.

where A
Proof.

is the classical encoding for the type of tuples.

It is easy to show that

T , T .U

with U

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

29/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (III)

Theorem (No-cloning of scalars)

n such that , C (n ( .U )) = ( s + ).V with = 0 and constants in S , s N>1 and U , V constants in U .


Induction over n.

Proof.

Corollary (No-cloning Theorem)


n
such that

T , C (n (

)) =

T.

where A
Proof.

is the classical encoding for the type of tuples.

It is easy to show that


T

T , T .U
2

with U

T .U .U .(U U ) = (1 2 + 0).(U U ).

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

29/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Logical content: No-cloning theorem (III)

Theorem (No-cloning of scalars)

n such that , C (n ( .U )) = ( s + ).V with = 0 and constants in S , s N>1 and U , V constants in U .


Induction over n.

Proof.

Corollary (No-cloning Theorem)


n
such that

T , C (n (

)) =

T.

where A
Proof.

is the classical encoding for the type of tuples.

It is easy to show that


T

T , T .U
2

with U

T .U .U .(U U ) = (1 2 + 0).(U U ).

By the previous theorem, the corollary holds.


Pablo Arrighi and Alejandro Daz-Caro, LIG A System F accounting for scalars, arXiv:0903.3741 29/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Summary of contributions

S.N. : Simplied the Linear-algebraic most restrictions. S.R. OK.

-calculus

by lifting

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

30/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Summary of contributions

S.N. : Simplied the Linear-algebraic most restrictions. S.R. OK.


Scalar

-calculus

by lifting

type system : types keep track of the `amount of a

type' by holding sum of amplitudes of terms of that types.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

30/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Summary of contributions

S.N. : Simplied the Linear-algebraic most restrictions. S.R. OK.


Scalar

-calculus

by lifting

type system : types keep track of the `amount of a

type' by holding sum of amplitudes of terms of that types.

probabilistic type system, yielding a higher-order

probabilistic

-calculus.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

30/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Polemics, future work

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

31/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Polemics, future work

Captured no-cloning theorem is a way that is faithful to quantum theory and linear algebra, unlike LL:

one can nd a copying proof method, but there is no for cloning all A. Algebraic linearity is about taking .U to something in + . . . not just for = 1 = + 1.
A proof method

For all

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

31/31

Motivation

Linear-Algebraic

-Calculus

System F

The scalar type system

Conclusions and future work

The scalar type system Polemics, future work

Captured no-cloning theorem is a way that is faithful to quantum theory and linear algebra, unlike LL:

one can nd a copying proof method, but there is no for cloning all A. Algebraic linearity is about taking .U to something in + . . . not just for = 1 = + 1.
A proof method

For all

C.-H.+Q.C.=(quantum th. proofs, quantum th. logics)? Need a Vectorial type system:

Scalar type system magnitude and signs for type vectors. Future system direction, (i.e. addition and orthogonality of types). Then it would be possible to check norm on amplitudes rather than probabilities.

Pablo Arrighi and Alejandro Daz-Caro, LIG

A System F accounting for scalars, arXiv:0903.3741

31/31

You might also like