Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - - PowerPoint PPT Presentation

logical foundations of cyber physical systems
SMART_READER_LITE
LIVE PREVIEW

Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - - PowerPoint PPT Presentation

10: Differential Equations & Differential Invariants Logical Foundations of Cyber-Physical Systems Andr Platzer Logical Foundations of Cyber-Physical Systems Andr Platzer Andr Platzer (CMU) LFCPS/10: Differential Equations &


slide-1
SLIDE 1

10: Differential Equations & Differential Invariants

Logical Foundations of Cyber-Physical Systems

Logical Foundations of Cyber-Physical Systems

André Platzer

André Platzer

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 1 / 19

slide-2
SLIDE 2

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 2 / 19

slide-3
SLIDE 3

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 2 / 19

slide-4
SLIDE 4

Learning Objectives

Differential Equations & Differential Invariants

CT M&C CPS discrete vs. continuous analogies rigorous reasoning about ODEs induction for differential equations differential facet of logical trinity understanding continuous dynamics relate discrete+continuous semantics of ODEs

  • perational CPS effects

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 3 / 19

slide-5
SLIDE 5

Differential Facet of Logical Trinity

Axiomatics Syntax Semantics Syntax defines the notation What problems are we allowed to write down? Semantics what carries meaning. What real or mathematical objects does the syntax stand for? Axiomatics internalizes semantic relations into universal syntactic transformations. How does the semantics of e = ˜ e relate to the semantics of e − ˜ e = 0, syntactically? What about derivatives?

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 4 / 19

slide-6
SLIDE 6

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 4 / 19

slide-7
SLIDE 7

ODE Examples Solutions more complicated than ODE

ODE Solution x′ = 1,x(0) = x0 x(t) = x0 + t x′ = 5,x(0) = x0 x(t) = x0 + 5t x′ = x,x(0) = x0 x(t) = x0et x′ = x2,x(0) = x0 x(t) =

x0 1−tx0

x′ = 1

x ,x(0) = 1

x(t) = √ 1+ 2t ... y′(x) = −2xy,y(0) = 1 y(x) = e−x2 x′(t) = tx,x(0) = x0 x(t) = x0e

t2 2

x′ = √ x,x(0) = x0 x(t) = t2

4 ± t√x0 + x0

x′ = y,y′ = −x,x(0) = 0,y(0) = 1 x(t) = sint,y(t) = cost x′ = 1+ x2,x(0) = 0 x(t) = tant x′(t) = 2

t3 x(t)

x(t) = e− 1

t2 non-analytic

x′ = x2 + x4

???

x′(t) = et2 non-elementary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 5 / 19

slide-8
SLIDE 8

Global Descriptive Power of Local Differential Equations

Descriptive power of differential equations

1

Descriptive power: differential equations characterize continuous evolution only locally by the respective directions.

2

Simple differential equations describe complicated physical processes.

3

Complexity difference between local description and global behavior

4

Analyzing ODEs via their solutions undoes their descriptive power.

5

Let’s exploit descriptive power of ODEs for proofs! x′′ = −x x(t) = sin(t) = t − t3 3! + t5 5! − t7 7! + t9 9! −... x′′(t) = et2 no elementary closed-form solution

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 6 / 19

slide-9
SLIDE 9

Global Descriptive Power of Local Differential Equations

You also prefer loop induction to unfolding all loop iterations, globally . . . Descriptive power of differential equations

1

Descriptive power: differential equations characterize continuous evolution only locally by the respective directions.

2

Simple differential equations describe complicated physical processes.

3

Complexity difference between local description and global behavior

4

Analyzing ODEs via their solutions undoes their descriptive power.

5

Let’s exploit descriptive power of ODEs for proofs! x′′ = −x x(t) = sin(t) = t − t3 3! + t5 5! − t7 7! + t9 9! −... x′′(t) = et2 no elementary closed-form solution

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 6 / 19

slide-10
SLIDE 10

Intuition for Differential Invariants

Differential Invariant

Γ ⊢ F,∆

F ⊢ ???F F ⊢ P

Γ ⊢ [x′ = f(x)]P,∆ [′] [x′ = f(x)]P ↔ ∀t≥0[x := y(t)]P

(y’ =f(y), y(0)=x)

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 7 / 19

slide-11
SLIDE 11

Intuition for Differential Invariants

Differential Invariant

Γ ⊢ F,∆

F ⊢ ???F F ⊢ P

Γ ⊢ [x′ = f(x)]P,∆ [′] [x′ = f(x)]P ↔ ∀t≥0[x := y(t)]P

(y’ =f(y), y(0)=x)

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 7 / 19

slide-12
SLIDE 12

Intuition for Differential Invariants

Differential Invariant

Γ ⊢ F,∆

F ⊢ ???F F ⊢ P

Γ ⊢ [x′ = f(x)]P,∆ [′] [x′ = f(x)]P ↔ ∀t≥0[x := y(t)]P

(y’ =f(y), y(0)=x)

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 7 / 19

slide-13
SLIDE 13

Intuition for Differential Invariants

Differential Invariant

Γ ⊢ F,∆

F ⊢ ???F F ⊢ P

Γ ⊢ [x′ = f(x)]P,∆

Want: formula F remains true in the direction of the dynamics

¬ ¬F

F F

[′] [x′ = f(x)]P ↔ ∀t≥0[x := y(t)]P

(y’ =f(y), y(0)=x) Next step is undefined for ODEs. But don’t need to know where exactly the system evolves to. Just that it remains somewhere in F. Show: only evolves into directions in which formula F stays true.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 7 / 19

slide-14
SLIDE 14

Guiding Example

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 8 / 19

slide-15
SLIDE 15

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2 v w w = r cosϑ v r sinϑ r

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 8 / 19

slide-16
SLIDE 16

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 8 / 19

slide-17
SLIDE 17

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 8 / 19

slide-18
SLIDE 18

Syntax With Primes

Syntax e ::= x | c | e + k | e − k | e · k | e/k

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 9 / 19

slide-19
SLIDE 19

Syntax With Primes

Syntax e ::= x | c | e + k | e − k | e · k | e/k Derivatives

(e + k)′ = (e)′ +(k)′ (e − k)′ = (e)′ −(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (e/k)′ =

  • (e)′ · k − e ·(k)′

/k2 (c())′ = 0

for constants/numbers c()

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 9 / 19

slide-20
SLIDE 20

Syntax With Primes

Syntax e ::= x | c | e + k | e − k | e · k | e/k Derivatives

(e + k)′ = (e)′ +(k)′ (e − k)′ = (e)′ −(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (e/k)′ =

  • (e)′ · k − e ·(k)′

/k2

same singularities

(c())′ = 0

for constants/numbers c()

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 9 / 19

slide-21
SLIDE 21

Syntax With Primes

Syntax e ::= x | c | e + k | e − k | e · k | e/k Derivatives

(e + k)′ = (e)′ +(k)′ (e − k)′ = (e)′ −(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (e/k)′ =

  • (e)′ · k − e ·(k)′

/k2

same singularities

(c())′ = 0

for constants/numbers c() . . . What do these primes mean? . . .

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 9 / 19

slide-22
SLIDE 22

Syntax With Primes

Syntax e ::= x | c | e + k | e − k | e · k | e/k | (e)′ Derivatives

(e + k)′ = (e)′ +(k)′ (e − k)′ = (e)′ −(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (e/k)′ =

  • (e)′ · k − e ·(k)′

/k2

same singularities

(c())′ = 0

for constants/numbers c() . . . What do these primes mean? . . . internalize primes into dL syntax

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 9 / 19

slide-23
SLIDE 23

The Meaning of Primes

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-24
SLIDE 24

The Meaning of Primes

Semantics

ω[ [(e)′] ] =

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-25
SLIDE 25

The Meaning of Primes

Semantics

ω[ [(e)′] ] = dω[ [e] ]

dt

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-26
SLIDE 26

The Meaning of Primes

Semantics

ω[ [(e)′] ] = dω[ [e] ]

dt what’s the time derivative?

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-27
SLIDE 27

The Meaning of Primes

Semantics

ω[ [(e)′] ] = dω[ [e] ]

dt what’s the time derivative? what’s the time?

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-28
SLIDE 28

The Meaning of Primes

Semantics

ω[ [(e)′] ] = dω[ [e] ]

dt nonsense! what’s the time derivative? what’s the time? depends on the differential equation?

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-29
SLIDE 29

The Meaning of Primes

Semantics

ω[ [(e)′] ] =

what’s the time derivative? what’s the time? depends on the differential equation? Not compositional!

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-30
SLIDE 30

The Meaning of Primes

Semantics

ω[ [(e)′] ] =

what’s the time derivative? what’s the time? depends on the differential equation? Not compositional! well-defined in isolated state ω at all?

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-31
SLIDE 31

The Meaning of Primes

Semantics

ω[ [(e)′] ] =

what’s the time derivative? what’s the time? depends on the differential equation? Not compositional! well-defined in isolated state ω at all? No time-derivative without time!

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-32
SLIDE 32

The Meaning of Differentials Differential Forms

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω)

what’s the time derivative? what’s the time? depends on the differential equation? Not compositional! well-defined in isolated state ω at all? No time-derivative without time! meaning is a function of x and x′. Differential form!

→ R

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-33
SLIDE 33

The Meaning of Differentials Differential Forms

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω)

Partial

∂[ [e] ] ∂x (ω) = lim

κ→ω(x)

ωκ

x [

[e] ]−ω[ [e] ] κ −ω(x)

what’s the time derivative? what’s the time? depends on the differential equation? Not compositional! well-defined in isolated state ω at all? No time-derivative without time! meaning is a function of x and x′. Differential form!

→ R

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 10 / 19

slide-34
SLIDE 34

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-35
SLIDE 35

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-36
SLIDE 36

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ω,ν) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R with ϕ(0) = ω and ϕ(r) = ν} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-37
SLIDE 37

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ω,ν) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R with ϕ(0) = ω except on x′ and ϕ(r) = ν} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q Initial value of x′ in ω is irrelevant since defined by ODE. Final value of x′ is carried over to the final state ν.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-38
SLIDE 38

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ω,ν) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R with ϕ(0) = ω except on x′ and ϕ(r) = ν} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q x′ = f(x) Initial value of x′ in ω is irrelevant since defined by ODE. Final value of x′ is carried over to the final state ν.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-39
SLIDE 39

Differential Dynamic Logic dL: Semantics

Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ω,ν) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a solution ϕ : [0,r] → S of any duration r ∈ R with ϕ(0) = ω except on x′ and ϕ(r) = ν} where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)

t x Q

ν ω

r x′ = f(x)&Q x′ = f(x) Initial value of x′ in ω is irrelevant since defined by ODE. Final value of x′ is carried over to the final state ν.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 11 / 19

slide-40
SLIDE 40

Differential Substitution Lemmas

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}:

Syntactic ′

ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

Analytic ′

Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P Lemma (Derivations) (Equations of Differentials) (e + k)′ = (e)′ +(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (c())′ = 0

for constants/numbers c()

(x)′ = x′

for variables x ∈ V

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 12 / 19

slide-41
SLIDE 41

Differential Substitution Lemmas

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z) Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P

Axiomatics DE [x′ = f(x)&Q]P ↔ [x′ = f(x)&Q][x′ := f(x)]P DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 12 / 19

slide-42
SLIDE 42

Differential Substitution Lemmas

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z) Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P

Axiomatics DE [x′ = f(x)&Q]P ↔ [x′ = f(x)&Q][x′ := f(x)]P DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

rate of change of e along ODE is 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 12 / 19

slide-43
SLIDE 43

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-44
SLIDE 44

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-45
SLIDE 45

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

Proof (dI is a derived rule).

DIe = 0 ⊢ [x′ = f(x)]e = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-46
SLIDE 46

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

Proof (dI is a derived rule).

DE

⊢ [x′ = f(x)](e)′ = 0

DIe = 0 ⊢ [x′ = f(x)]e = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-47
SLIDE 47

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

Proof (dI is a derived rule).

G

⊢ [x′ = f(x)][x′ := f(x)](e)′ = 0

DE

⊢ [x′ = f(x)](e)′ = 0

DIe = 0 ⊢ [x′ = f(x)]e = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-48
SLIDE 48

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

Proof (dI is a derived rule). ⊢ [x′ := f(x)](e)′ = 0

G

⊢ [x′ = f(x)][x′ := f(x)](e)′ = 0

DE

⊢ [x′ = f(x)](e)′ = 0

DIe = 0 ⊢ [x′ = f(x)]e = 0

G P

[α]P

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 13 / 19

slide-49
SLIDE 49

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2 v w w = r cosϑ v r sinϑ r

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-50
SLIDE 50

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-51
SLIDE 51

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

dI v2+w2−r 2=0 ⊢ [v′ = w,w′ = −v]v2 + w2 − r 2 = 0

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-52
SLIDE 52

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

[:=]

⊢ [v′:=w][w′:=−v]2vv′ + 2ww′ − 2rr′ = 0

dI v2+w2−r 2=0 ⊢ [v′ = w,w′ = −v]v2 + w2 − r 2 = 0

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-53
SLIDE 53

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

R

⊢ 2v(w)+ 2w(−v) = 0

[:=]

⊢ [v′:=w][w′:=−v]2vv′ + 2ww′ − 2rr′ = 0

dI v2+w2−r 2=0 ⊢ [v′ = w,w′ = −v]v2 + w2 − r 2 = 0

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-54
SLIDE 54

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

R

⊢ 2v(w)+ 2w(−v) = 0

[:=]

⊢ [v′:=w][w′:=−v]2vv′ + 2ww′ − 2rr′ = 0

dI v2+w2−r 2=0 ⊢ [v′ = w,w′ = −v]v2 + w2 − r 2 = 0

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-55
SLIDE 55

Guiding Example: Rotational Dynamics

v2+w2 = r 2 → [v′ = w,w′ = −v]v2+w2 = r 2

R

⊢ 2v(w)+ 2w(−v) = 0

[:=]

⊢ [v′:=w][w′:=−v]2vv′ + 2ww′ − 2rr′ = 0

dI v2+w2−r 2=0 ⊢ [v′ = w,w′ = −v]v2 + w2 − r 2 = 0

→R

⊢ v2+w2−r 2=0 → [v′ = w,w′ = −v]v2+w2−r 2=0

Simple proof without solving ODE, just by differentiating

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 14 / 19

slide-56
SLIDE 56

Example Proof

→R

⊢ x2y − 2 = 0 → [x′ = −x2,y′ = 2xy]x2y − 2 = 0

  • André Platzer (CMU)

LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-57
SLIDE 57

Example Proof

dI x2y − 2 = 0 ⊢ [x′ = −x2,y′ = 2xy]x2y − 2 = 0

→R

⊢ x2y − 2 = 0 → [x′ = −x2,y′ = 2xy]x2y − 2 = 0

  • André Platzer (CMU)

LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-58
SLIDE 58

Example Proof

[:=]

⊢ [x′:=−x2][y′:=2xy]2xx′y + x2y′ − 0 = 0

dI x2y − 2 = 0 ⊢ [x′ = −x2,y′ = 2xy]x2y − 2 = 0

→R

⊢ x2y − 2 = 0 → [x′ = −x2,y′ = 2xy]x2y − 2 = 0

  • André Platzer (CMU)

LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-59
SLIDE 59

Example Proof

R

⊢ 2x(−x2)y + x2(2xy) = 0

[:=]

⊢ [x′:=−x2][y′:=2xy]2xx′y + x2y′ − 0 = 0

dI x2y − 2 = 0 ⊢ [x′ = −x2,y′ = 2xy]x2y − 2 = 0

→R

⊢ x2y − 2 = 0 → [x′ = −x2,y′ = 2xy]x2y − 2 = 0

  • André Platzer (CMU)

LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-60
SLIDE 60

Example Proof

R

⊢ 2x(−x2)y + x2(2xy) = 0

[:=]

⊢ [x′:=−x2][y′:=2xy]2xx′y + x2y′ − 0 = 0

dI x2y − 2 = 0 ⊢ [x′ = −x2,y′ = 2xy]x2y − 2 = 0

→R

⊢ x2y − 2 = 0 → [x′ = −x2,y′ = 2xy]x2y − 2 = 0

  • André Platzer (CMU)

LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-61
SLIDE 61

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 15 / 19

slide-62
SLIDE 62

Differential Substitution Lemmas

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}:

Syntactic ′

ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

Analytic ′

Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P Lemma (Derivations) (Equations of Differentials) (e + k)′ = (e)′ +(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (c())′ = 0

for constants/numbers c()

(x)′ = x′

for variables x ∈ V

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 16 / 19

slide-63
SLIDE 63

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z) Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-64
SLIDE 64

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-65
SLIDE 65

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

chain

= ∑

x

∂[ [e] ] ∂x (ϕ(z))dϕ(t)(x)

dt

(z)

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-66
SLIDE 66

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

chain

= ∑

x

∂[ [e] ] ∂x (ϕ(z))dϕ(t)(x)

dt

(z)

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-67
SLIDE 67

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

chain

= ∑

x

∂[ [e] ] ∂x (ϕ(z))dϕ(t)(x)

dt

(z) = ∑

x

∂[ [e] ] ∂x (ϕ(z))ϕ(z)(x′)

Semantics

ω[ [(e)′] ] = ∑

x

ω(x′)∂[ [e] ] ∂x (ω) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-68
SLIDE 68

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

chain

= ∑

x

∂[ [e] ] ∂x (ϕ(z))dϕ(t)(x)

dt

(z) = ∑

x

∂[ [e] ] ∂x (ϕ(z))ϕ(z)(x′)

Semantics

ϕ(z)[ [(e)′] ] = ∑

x

ϕ(z)(x′)∂[ [e] ] ∂x (ϕ(z)) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-69
SLIDE 69

Soundness Proof

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}: ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

dϕ(t)[

[e] ]

dt

(z)

chain

= ∑

x

∂[ [e] ] ∂x (ϕ(z))dϕ(t)(x)

dt

(z) = ∑

x

∂[ [e] ] ∂x (ϕ(z))ϕ(z)(x′)

Semantics

ϕ(z)[ [(e)′] ] = ∑

x

ϕ(z)(x′)∂[ [e] ] ∂x (ϕ(z)) Definition (Hybrid program semantics) ([

[·] ] : HP →℘(S ×S))

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ(z) | = x′ = f(x)∧ Q for all 0≤z≤r

for a ϕ : [0,r] → S where ϕ(z)(x′)

def

= dϕ(t)(x)

dt

(z)}

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-70
SLIDE 70

Outline

1

Learning Objectives

2

A Gradual Introduction to Differential Invariants Global Descriptive Power of Local Differential Equations Intuition for Differential Invariants Deriving Differential Equations

3

Differentials Syntax Semantics of Differential Symbols Semantics of Differential Equations Soundness Example Proofs

4

Soundness Proof

5

Summary

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 17 / 19

slide-71
SLIDE 71

Differential Invariants for Differential Equations

Differential Invariant dI

⊢ [x′ := f(x)](e)′ = 0

e = 0 ⊢ [x′ = f(x)]e = 0 DI

  • [x′ = f(x)]e = 0 ↔ e = 0
  • ← [x′ = f(x)](e)′ = 0

DE [x′ = f(x)]P ↔ [x′ = f(x)][x′ := f(x)]P

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 18 / 19

slide-72
SLIDE 72

Differential Substitution Lemmas

Lemma (Differential lemma) (Differential value vs. Time-derivative)

If ϕ |

= x′ = f(x)∧ Q for duration r>0, then for all 0≤z≤r, FV(e) ⊆ {x}:

Syntactic ′

ϕ(z)[ [(e)′] ] = dϕ(t)[ [e] ]

dt

(z)

Analytic ′

Lemma (Differential assignment) (Effect on Differentials)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = P ↔ [x′ := f(x)]P Lemma (Derivations) (Equations of Differentials) (e + k)′ = (e)′ +(k)′ (e · k)′ = (e)′ · k + e ·(k)′ (c())′ = 0

for constants/numbers c()

(x)′ = x′

for variables x ∈ V

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 19 / 19

slide-73
SLIDE 73

Outline

6

Appendix Differential Equations vs. Loops Differential Invariant Terms and Invariant Functions

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 19 / 19

slide-74
SLIDE 74

Differential Equations vs. Loops

Lemma (Differential equations are their own loop) [ [(x′ = f(x))∗] ] = [ [x′ = f(x)] ]

loop α∗ ODE x′ = f(x) repeat any number n ∈ N of times evolve for any duration r ∈ R can repeat 0 times can evolve for duration 0 effect depends on previous loop iteration effect depends on the past solution local generator is loop body α local generator x′ = f(x) full global execution trace global solution ϕ : [0,r] → S unwinding proof by iteration [∗] proof by global solution with [′] inductive proof with loop invariant proof with differential invariant

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 20 / 19

slide-75
SLIDE 75

Generalizing Differential Invariants: Stronger

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-76
SLIDE 76

Generalizing Differential Invariants: Stronger

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-77
SLIDE 77

Generalizing Differential Invariants: Stronger

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-78
SLIDE 78

Generalizing Differential Invariants: Stronger

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-79
SLIDE 79

Generalizing Differential Invariants: Stronger

R

⊢ 4x3(4y3)+ 4y3(−4x3) = 0

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-80
SLIDE 80

Generalizing Differential Invariants: Stronger

R

⊢ 4x3(4y3)+ 4y3(−4x3) = 0

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-81
SLIDE 81

Generalizing Differential Invariants: Stronger

R

⊢ 4x3(4y3)+ 4y3(−4x3) = 0

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-82
SLIDE 82

Generalizing Differential Invariants: Stronger

R

⊢ 4x3(4y3)+ 4y3(−4x3) = 0

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0 Theorem (Sophus Lie)

DIc Q ⊢ [x′:=f(x)](e)′ = 0

⊢ ∀c

  • e = c → [x′ = f(x)&Q]e = c
  • premise and conclusion are equivalent if Q is a domain, i.e., characterizing a

connected open set.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-83
SLIDE 83

Generalizing Differential Invariants: Stronger

R

⊢ 4x3(4y3)+ 4y3(−4x3) = 0

[:=]

⊢ [x′:=4y3][y′:=−4x3](4x3x′ + 4y3y′) = 0

dI

x4 + y4 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x4 + y4 = 0

cut,MRx2 + y2 = 0 ⊢ [x′ = 4y3,y′ = −4x3]x2 + y2 = 0

→R

⊢ x2 + y2 = 0 → [x′ = 4y3,y′ = −4x3]x2 + y2 = 0 Theorem (Sophus Lie)

DIc Q ⊢ [x′:=f(x)](e)′ = 0

⊢ ∀c

  • e = c → [x′ = f(x)&Q]e = c
  • premise and conclusion are equivalent if Q is a domain, i.e., characterizing a

connected open set. Clou: (e − c)′ = (e)′ independent of additive constants

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 21 / 19

slide-84
SLIDE 84

Strengthening Induction Hypotheses

Stronger Induction Hypotheses

1

As usual in math and in proofs with loops:

2

Inductive proofs may need stronger induction hypotheses to succeed.

3

Differentially inductive proofs may need a stronger differential inductive structure to succeed.

4

Even if {(x,y) ∈ R2 : x2 + y2 = 0} = {{(x,y) ∈ R2 : x4 + y4 = 0} have the same solutions, they have different differential structure.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 22 / 19

slide-85
SLIDE 85

André Platzer. Logical Foundations of Cyber-Physical Systems. Springer, Switzerland, 2018. URL: http://www.springer.com/978-3-319-63587-3,

doi:10.1007/978-3-319-63588-0.

André Platzer. A complete uniform substitution calculus for differential dynamic logic.

  • J. Autom. Reas., 59(2):219–265, 2017.

doi:10.1007/s10817-016-9385-1.

André Platzer. Logical Analysis of Hybrid Systems: Proving Theorems for Complex Dynamics. Springer, Heidelberg, 2010.

doi:10.1007/978-3-642-14509-4.

André Platzer. Logics of dynamical systems. In LICS, pages 13–24, Los Alamitos, 2012. IEEE.

doi:10.1109/LICS.2012.13.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 22 / 19

slide-86
SLIDE 86

André Platzer. Differential-algebraic dynamic logic for differential-algebraic programs.

  • J. Log. Comput., 20(1):309–352, 2010.

doi:10.1093/logcom/exn070.

André Platzer. The structure of differential invariants and differential cut elimination.

  • Log. Meth. Comput. Sci., 8(4:16):1–38, 2012.

doi:10.2168/LMCS-8(4:16)2012.

André Platzer. A differential operator approach to equational differential invariants. In Lennart Beringer and Amy Felty, editors, ITP, volume 7406 of LNCS, pages 28–48, Berlin, 2012. Springer.

doi:10.1007/978-3-642-32347-8_3.

André Platzer (CMU) LFCPS/10: Differential Equations & Differential Invariants LFCPS/10 22 / 19