Algebra and coalgebra in polynomial differential equations 1 Michele - - PowerPoint PPT Presentation

algebra and coalgebra
SMART_READER_LITE
LIVE PREVIEW

Algebra and coalgebra in polynomial differential equations 1 Michele - - PowerPoint PPT Presentation

Algebra and coalgebra in polynomial differential equations 1 Michele Boreale D I SIA - University of Florence OPTC 2017 IST Vienna, June 27, 2017 1 (Based on work appeared in FoSSaCS17) M. Boreale (D I SIA - University of Florence) Algebra


slide-1
SLIDE 1

Algebra and coalgebra in polynomial differential equations1

Michele Boreale

DISIA - University of Florence

OPTC 2017 IST Vienna, June 27, 2017

1(Based on work appeared in FoSSaCS17’)

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 1 / 17

slide-2
SLIDE 2

Systems of polynomial ODE’s

Initial Value Problems (IVP)

˙

x

=

F(x) F = vector field x = (x1,...,xN) = variables x(0)

=

x0 x0 = initial conditions            ˙

x(t)

=

x(t)z(t)+ z(t)

˙

y(t)

=

y(t)w(t)+ z(t)

˙

z(t)

=

z(t)

˙

w(t)

=

w(t) x(0)

=

x0 = (0,0,1,1)

Hybrid systems Markov chains System Biology Fluid-flow approximations of stochastic systems ...

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 2 / 17

slide-3
SLIDE 3

Motivations and goals

  • Reasoning. Prove and automatically discover conservation laws of the system

θ

           ˙ θ = ω ˙ ω =

g

ℓ x

˙

x

= −y ·ω ˙

y

=

x ·ω x(0)

= (0,0,ℓ,0) ⇒

1 2m ·(ℓω)2

=

m · y kinetic energy

=

lost potential energy

  • Reduction. Minimize number of variables and equations

             ˙

x

=

x · z + z

˙

y

=

y · w + z

˙

z

=

z

˙

w

=

w x(0)

= (0,0,1,1) = ⇒ ?

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 3 / 17

slide-4
SLIDE 4

Example: safety assertions (e.g. in hybrid systems)

If x0 ∈ ψ then x(t) ∈ φ In this talk:

  • ψ is a singleton
  • φ is an algebraic variety = common zeros of a set of polynomials.

Challenge

Can we put coalgebra to use to pursue these goals?

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 4 / 17

slide-5
SLIDE 5

Semantics of Initial Value Problems

Semantic domain: analytic functions A def

= {f : R → R| f admits a Taylor expansion in a neighborhood of 0}.

Theorem (Picard-Lindelöf)

Every polynomial IVP has a unique solution x(t) = (x1(t),...,xN(t)), with xi(t) ∈ A. x(t) : R → RN is the system’s trajectory

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 5 / 17

slide-6
SLIDE 6

Coalgebraic semantics of IVP

On polynomials R[x], Lie derivatives are the syntactic counterpart of (time) derivatives on A:

d dt (·) in A ↔ LF(·) in R[x]

L(xy)

=

L(x)y + xL(y) = (xz + z)y + x(wy + z)

  • (xy)

=

x0 · y0 = 0 C = (R[x], L(·), o(·)) forms a coalgebra over polynomials.

Theorem (Coinduction)

xi ∼ xj in C if and only if xi(t) = xj(t) in A (can be extended to polynomial expressions). Proof: xi ∼ xj means xi(t) and xj(t) have the same Taylor expansion.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 6 / 17

slide-7
SLIDE 7

Proving identities via bisimulation

˙

x = −y

˙

y = x

(x(0),y(0)) = (1,0) Prove x2 + y2 ∼ 1 with R =

  • (x2 + y2,1) , (0,0)
  • .
  • x2 + y2 ,

L

  • 1)

L

  • − 2xy + 2yx = 0 ,

0) = (0,0) This is the familiar cos2(t)+sin2(t) = 1. This technique can be enhanced with up to techniques à la Sangiorgi.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 7 / 17

slide-8
SLIDE 8

Mechanizing proofs of equivalence

x2(t)+ y2(t) = 1 p(t) def

= x2(2)+ y2(t)− 1 is identically zero

p(t) = p(x0)+ p(1)(x0)t + p(2)(x0)

2

t2 + p(3)(x0)

3!

t3 +··· Equivalently p(j)(x0) = 0 for each j ≥ 0

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 8 / 17

slide-9
SLIDE 9

An algorithm for of equivalence checking/1

           ˙

x

=

x · z + z

˙

y

=

y · w + z

˙

z

=

z

˙

w

=

w x(0)

=

x0 = (0,0,1,1)

Prove x(t) = y(t). p = x − y

L

  • p(x0) = 0

p(1) = xz + z − yw + z

L

  • p(1)(x0) = 0

p(2) = xz2 + xz + z2 − yw2 + yw + wz

L

  • p(2)(x0) = 0

p(3) = h1 · p + h2 · p(1) + h3 · p(2) p(2)(x0) = 0 So p(j)(x0) = 0 for all j ≥ 3

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 9 / 17

slide-10
SLIDE 10

An algorithm for of equivalence checking/2

p(t) def

= p(x(t))

e(t) = f(t) iff p(t) def

= (e(t)− f(t)) is identically 0: p is a polynomial invariant

Algorithm to check if p is an invariant

Consider p,p(1),p(2),.... Stop when reaching m such that either:

  • a. p(m)(x0) = 0: return NO
  • b. p(m+1) ∈ Ideal
  • {p,p(1),...,p(m)}
  • : return YES.

Ideal

For S = {p1,...,pm}, the set Ideal(S) contains all sums ∑i hi · pi (hi polynomials)

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 10 / 17

slide-11
SLIDE 11

Underlying algebraic geometry

Ideal membership

p ∈ Ideal(S) can be decided: compute a Gröbner basis G for Ideal(S) (Buchberger algorithm) and check if p mod G = 0.

Ascending chain condition (ASC)

Any infinite ascending chain of ideals I1 ⊆ I2 ⊆ I3 ⊆ ··· stabilizes in a finite number of steps (from Hilbert basis theorem). So the given procedure to check invariants is effective and always terminates.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 11 / 17

slide-12
SLIDE 12

Discovering polynomial invariants (p.i.)

Polynomial template: π = ∑n

i=1 ai ·αi (ai parameters, αi monomials)

Theorem (finding invariants)

There is an algorithm that, given an IVP and a template π, returns π′, the most general instance of π all of whom instances are valid p.i. Proof: L(j)(π)(x0) = 0, j = 0,1,2,..., imply successive constraints on the parameters space Rn, until stabilization. For instance, one can find all polynomial invariants (= conservation laws) up to a given degree.

  • Example. Find all invariants of degree ≤ 2 of the pendulum equation:

π′ = a1 ·

  • x2 + y2 −ℓ2
  • Pythagorean identity

+ a2 ·(1

2(ℓ·ω)2 − g · y)

  • energy conservation

Values of a1,a2 can be chosen arbitrarily.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 12 / 17

slide-13
SLIDE 13

Minimization

Algorithm

  • 1. compute a basis B of W = span{x(t) : t in a neighborhood of 0}
  • 2. work out equations for the coordinates y(t) of x(t) in W

˙

y = BF(BT x) y(0) = BT x0 Basically, we project the system onto the subspace W spanned by x(t).

−1 1 −1 1

Theorem (minimality) x(t) = By(t). Moreover y(t) has min- imal no. of components among all z(t)’s s.t. x(t) = C · z(t).              ˙

x

=

x · z + z

˙

y

=

y · w + z

˙

z

=

z

˙

w

=

w x(0)

= (0,0,1,1)T = ⇒        ˙

y1

=

1

2y1 · y2 + y2

˙

y2

=

y2 y(0)

= (0, √

2)T .

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 13 / 17

slide-14
SLIDE 14

Conclusion

Contributions: (co)algebraic methods to (1) reason on (prove & discover identities) and (2) reduce systems of polynomial ODE’s Preliminary experimentation & implementation, check out at local.disia.unifi.it/boreale/papers/DoubleChain.py Related work: relation with weighted automata and bisimulation: see Boreale (CONCUR’09,ICALP’15), Bonchi et al. (I&C’12) Cardelli et al. differential equivalences (POPL ’16): partition of variables into equivalence classes; less general than projection ⇒ finer equivalence Platzer et al. dynamic logic for hybrid systems (e.g. TACAS’14): related goals, very different computational prerequisites, not (relatively) complete in our sense. Further work: further experimentation (algebraic) regions of initial values rather than just IVP: relevant to hybrid systems approximate linearization and reduction, akin to methods in Control Theory.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 14 / 17

slide-15
SLIDE 15

Some references

  • F. Bonchi, M.M. Bonsangue, M. Boreale, J.J.M.M. Rutten, and A. Silva. A coalgebraic

perspective on linear weighted automata. Inf. Comput. 211: 77-105, 2012.

  • M. Boreale. Weighted Bisimulation in Linear Algebraic Form. Proc. of CONCUR 2009,

LNCS 5710, pp. 163-177, Springer, 2009.

  • M. Boreale. Analysis of Probabilistic Systems via Generating Functions and Padé
  • Approximation. ICALP 2015 (2) 2015: 82-94, LNCS 9135, Springer, 2015.
  • L. Cardelli, M. Tribastone, M. Tschaikowski, and A. Vandin. Symbolic Computation of

Differential Equivalences, POPL 2016.

  • D. Cox, J. Little, and D. O’Shea. Ideals, Varieties, and Algorithms An Introduction to

Computational Algebraic Geometry and Commutative Algebra. Undergraduate Texts in Mathematics, Springer, 2007.

  • K. Ghorbal, A. Platzer. Characterizing Algebraic Invariants by Differential Radical
  • Invariants. TACAS 2014: 279-294, 2014.
  • A. Platzer. Logics of dynamical systems. In LICS 2012: 13-24, IEEE, 2012.
  • S. Sankaranarayanan, H. Sipma, and Z. Manna. Non-linear loop invariant generation using

Gröbner bases. POPL 2004.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 15 / 17

slide-16
SLIDE 16

Discovering identities: a double chain algorithm

Vi

def

= {v ∈ Rn : π(j)[v](x0) = 0 for j = 0,...,i }

(1) Ji

def

=

  • i
  • j=1

π(j)[Vi]

  • .

(2) V0,V1,V2,... descending chain of vector spaces J0,J1,J2,... (eventually) ascending chain of ideals Eventually they both stabilize.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 16 / 17

slide-17
SLIDE 17

Linearity of the equivalence

x1 x2 x5 x6 x7 x8 x9 x10 x3 x4 1 2/3 1/3 1/2 1/2 1 1 1 3/2 3/4 1 1

˙

x1 = x2,

˙

x5 = 1

2x6 + 1 2x7, etc.

x1(t) = x5(t), x2(t) = 1

2x6(t)+ 1 2x7(t), etc.

  • M. Boreale (DISIA - University of Florence)

Algebra and coalgebra in polynomial differential equations OPTC 2017 IST Vienna, June 27, 2017 17 / 17