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

18: Axioms & Uniform Substitutions Logical Foundations of Cyber-Physical Systems Andr Platzer Logical Foundations of Cyber-Physical Systems Andr Platzer Andr Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 1


slide-1
SLIDE 1

18: Axioms & Uniform Substitutions

Logical Foundations of Cyber-Physical Systems

Logical Foundations of Cyber-Physical Systems

André Platzer

André Platzer

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 1 / 24

slide-2
SLIDE 2

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 1 / 24

slide-3
SLIDE 3

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 1 / 24

slide-4
SLIDE 4

Learning Objectives

Axioms & Uniform Substitutions

CT M&C CPS axiom vs. axiom schema algorithmic impact of philosophical difference local meaning of axioms generic axioms like generic points uniform substitution meaning of differentials parsimonious CPS reasoning impl. modular impl. of logic prover

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 2 / 24

slide-5
SLIDE 5

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 2 / 24

slide-6
SLIDE 6

Differential Dynamic Logic: Axiomatization

Part I

[:=] [x :=θ]φ(x) ↔ φ(θ) [?] [?χ]φ ↔ (χ → φ) [∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) V φ → [α]φ

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 3 / 24

slide-7
SLIDE 7

Differential Dynamic Logic: Axiomatization

Part I

[:=] [x :=θ]φ(x) ↔ φ(θ)

(θ free for x in φ)

[?] [?χ]φ ↔ (χ → φ) [∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) V φ → [α]φ (FV(φ)∩ BV(α) = /

0) [′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ

(t fresh and y′(t) = θ)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 3 / 24

slide-8
SLIDE 8

Axiom Schema

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-9
SLIDE 9

Axiom Schema Matches Many Formulas

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-10
SLIDE 10

Axiom Schema Matches Many Formulas

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-11
SLIDE 11

Axiom Schema Matches Many Formulas

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ y ≥ 0 → [x′ = −5]y ≥ 0 x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z

[:=] [x :=θ]φ(x) ↔ φ(θ)

Match shape

α ∪β

Schema variable

α match

Same φ every- where

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-12
SLIDE 12

Axiom Schema Matches Many Formulas

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

y ≥ 0 → [x′ = −5]y ≥ 0 × x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z [:=] [x :=θ]φ(x) ↔ φ(θ)

Match shape

α ∪β

Schema variable

α match

Same φ every- where

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-13
SLIDE 13

Axiom Schema Matches Many Formulas But Not All

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

(FV(φ)∩ BV(α) = / 0) y ≥ 0 → [x′ = −5]y ≥ 0 × x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z [:=] [x :=θ]φ(x) ↔ φ(θ) [x := x + y]x ≤ y2 ↔ x + y ≤ y2 [x := x + y][y := 5]x≥0 ↔ [y := 5]x + y≥0 [y := 2b][(x := x+y;x′ = y)∗]x≥y ↔ [(x := x+2b;x′ = 2b)∗]x≥2b [x := x + y][x := x + 1]x≥0 ↔ [x := x + y + 1]x≥0

Match shape

α ∪β

Schema variable

α match

Same φ every- where rule out by side conditions

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-14
SLIDE 14

Axiom Schema Matches Many Formulas But Not All

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

(FV(φ)∩ BV(α) = / 0) y ≥ 0 → [x′ = −5]y ≥ 0 × x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z [:=] [x :=θ]φ(x) ↔ φ(θ) [x := x + y]x ≤ y2 ↔ x + y ≤ y2 × [x := x + y][y := 5]x≥0 ↔ [y := 5]x + y≥0 [y := 2b][(x := x+y;x′ = y)∗]x≥y ↔ [(x := x+2b;x′ = 2b)∗]x≥2b [x := x + y][x := x + 1]x≥0 ↔ [x := x + y + 1]x≥0

Match shape

α ∪β

Schema variable

α match

Same φ every- where rule out by side conditions

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-15
SLIDE 15

Axiom Schema Matches Many Formulas But Not All

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

(FV(φ)∩ BV(α) = / 0) y ≥ 0 → [x′ = −5]y ≥ 0 × x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z [:=] [x :=θ]φ(x) ↔ φ(θ) (θ free for x in φ) [x := x + y]x ≤ y2 ↔ x + y ≤ y2 × [x := x + y][y := 5]x≥0 ↔ [y := 5]x + y≥0 [y := 2b][(x := x+y;x′ = y)∗]x≥y ↔ [(x := x+2b;x′ = 2b)∗]x≥2b [x := x + y][x := x + 1]x≥0 ↔ [x := x + y + 1]x≥0

Match shape

α ∪β

Schema variable

α match

Same φ every- where rule out by side conditions Match all free x occur- rences Replace by θ every- where no x oc- currence where

θ bound

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-16
SLIDE 16

Axiom Schema Matches Many Formulas But Not All

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [x := x + 1∪ x′ = x2]x ≥ 0 ↔ [x := x + 1]x ≥ 0∧[x′ = x2]x ≥ 0 [x′ = 5∪ x′ = −x]x2 ≥ 5 ↔ [x′ = 5]x2 ≥ 5∧[x′ = −x]x2 ≥ 5 × [v := v+1;x′ = v ∪ x′ = 2]x≥5 ↔ [v := v+1;x′ = v]x≥5∧[x′ = 2]x≥4

V φ → [α]φ

(FV(φ)∩ BV(α) = / 0) y ≥ 0 → [x′ = −5]y ≥ 0 × x ≥ 0 → [x′ = −5]x ≥ 0 y ≥ z → [x′ = −5]y ≥ z [:=] [x :=θ]φ(x) ↔ φ(θ) (θ free for x in φ) [x := x + y]x ≤ y2 ↔ x + y ≤ y2 × [x := x + y][y := 5]x≥0 ↔ [y := 5]x + y≥0 [y := 2b][(x := x+y;x′ = y)∗]x≥y ↔ [(x := x+2b;x′ = 2b)∗]x≥2b [x := x + y][x := x + 1]x≥0 ↔ [x := x + y + 1]x≥0

Match shape

α ∪β

Schema variable

α match

Same φ every- where rule out by side conditions Match all free x occur- rences Replace by θ every- where no x oc- currence where

θ bound

Algorithm

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 5 / 24

slide-17
SLIDE 17

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 6 / 24

slide-18
SLIDE 18

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ (t fresh and y′(t) = θ)

Axiom schema with side conditions:

1

Occurs check: t fresh

2

Solution check: y(·) solves the ODE y′(t) = θ with y(·) plugged in for x in term θ

3

Initial value check: y(·) solves the symbolic IVP y(0) = x

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 6 / 24

slide-19
SLIDE 19

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ (t fresh and y′(t) = θ)

Axiom schema with side conditions:

1

Occurs check: t fresh

2

Solution check: y(·) solves the ODE y′(t) = θ with y(·) plugged in for x in term θ

3

Initial value check: y(·) solves the symbolic IVP y(0) = x

4

y(·) covers all solutions parametrically

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 6 / 24

slide-20
SLIDE 20

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ (t fresh and y′(t) = θ)

Axiom schema with side conditions:

1

Occurs check: t fresh

2

Solution check: y(·) solves the ODE y′(t) = θ with y(·) plugged in for x in term θ

3

Initial value check: y(·) solves the symbolic IVP y(0) = x

4

y(·) covers all solutions parametrically

5

x′ cannot occur free in φ

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 6 / 24

slide-21
SLIDE 21

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ (t fresh and y′(t) = θ)

Axiom schema with side conditions:

1

Occurs check: t fresh

2

Solution check: y(·) solves the ODE y′(t) = θ with y(·) plugged in for x in term θ

3

Initial value check: y(·) solves the symbolic IVP y(0) = x

4

y(·) covers all solutions parametrically

5

x′ cannot occur free in φ Quite nontrivial soundness-critical side condition algorithms . . .

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 6 / 24

slide-22
SLIDE 22

What Axioms Want

V φ → [α]φ

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-23
SLIDE 23

What Axioms Want

V φ → [α]φ V p → [a]p V predicate symbol p of arity 0 has no bound variable of HP a free “Formula p has no explicit permission to depend on anything” (except implicitly on what doesn’t change in a anyhow) V program constant symbol a could have arbitrary behavior

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-24
SLIDE 24

What Axioms Want

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

V p → [a]p V predicate symbol p of arity 0 has no bound variable of HP a free “Formula p has no explicit permission to depend on anything” (except implicitly on what doesn’t change in a anyhow) V program constant symbol a could have arbitrary behavior

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-25
SLIDE 25

What Axioms Want

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

V p → [a]p

[:=] [x := c]p(x) ↔ p(c)

V predicate symbol p of arity 0 has no bound variable of HP a free “Formula p has no explicit permission to depend on anything” (except implicitly on what doesn’t change in a anyhow)

[:=] predicate symbol p of arity 1 has different arguments in different places

“Formula p(x) has explicit permission to depend on x”

[:=] function symbol c of arity 0 takes no arguments

V program constant symbol a could have arbitrary behavior

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-26
SLIDE 26

What Axioms Want

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ)

V p → [a]p

[:=] [x := c]p(x) ↔ p(c)

V predicate symbol p of arity 0 has no bound variable of HP a free “Formula p has no explicit permission to depend on anything” (except implicitly on what doesn’t change in a anyhow)

[:=] predicate symbol p of arity 1 has different arguments in different places

“Formula p(x) has explicit permission to depend on x”

[:=] function symbol c of arity 0 takes no arguments

V program constant symbol a could have arbitrary behavior

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-27
SLIDE 27

What Axioms Want

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ

V φ → [α]φ

[:=] [x :=θ]φ(x) ↔ φ(θ) [∪] [a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x) V p → [a]p

[:=] [x := c]p(x) ↔ p(c)

V predicate symbol p of arity 0 has no bound variable of HP a free “Formula p has no explicit permission to depend on anything” (except implicitly on what doesn’t change in a anyhow)

[:=] predicate symbol p of arity 1 has different arguments in different places

“Formula p(x) has explicit permission to depend on x”

[∪] predicate symbol p of arity n takes all variables ¯

x as arguments “Formula p(¯ x) has explicit permission to depend on all variables ¯ x”

[:=] function symbol c of arity 0 takes no arguments

V program constant symbol a could have arbitrary behavior

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-28
SLIDE 28

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 7 / 24

slide-29
SLIDE 29

Differential Dynamic Logic with Interpretations: Syntax

Definition (Hybrid program α) α,β ::= a | x :=θ | ?Q | x′ = f(x)&Q | α ∪β | α;β | α∗ Definition (dL Formula φ) φ,ψ ::= p(θ1,...,θk) | θ ≥ η | ¬φ | φ ∧ψ | ∀x φ | ∃x φ | [α]φ | αφ Definition (Term θ) θ,η ::= f(θ1,...,θk) | x | θ +η | θ ·η | (θ)′

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 8 / 24

slide-30
SLIDE 30

Differential Dynamic Logic with Interpretations: Syntax

Definition (Hybrid program α) α,β ::= a | x :=θ | ?Q | x′ = f(x)&Q | α ∪β | α;β | α∗ Definition (dL Formula φ) φ,ψ ::= p(θ1,...,θk) | θ ≥ η | ¬φ | φ ∧ψ | ∀x φ | ∃x φ | [α]φ | αφ Definition (Term θ) θ,η ::= f(θ1,...,θk) | x | θ +η | θ ·η | (θ)′

Discrete Assign Test Condition Differential Equation Nondet. Choice Seq. Compose Nondet. Repeat All Reals Some Reals All Runs Some Runs

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 8 / 24

slide-31
SLIDE 31

Differential Dynamic Logic with Interpretations: Syntax

Definition (Hybrid program α) α,β ::= a | x :=θ | ?Q | x′ = f(x)&Q | α ∪β | α;β | α∗ Definition (dL Formula φ) φ,ψ ::= p(θ1,...,θk) | θ ≥ η | ¬φ | φ ∧ψ | ∀x φ | ∃x φ | [α]φ | αφ Definition (Term θ) θ,η ::= f(θ1,...,θk) | x | θ +η | θ ·η | (θ)′

Program Symbol Differential Function Symbol Predicate Symbol

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 8 / 24

slide-32
SLIDE 32

Differential Dynamic Logic with Interpretations: Semantics

Definition (Term semantics) ([

[·] ] : Trm → (S → R))

ω[ [f(θ1,...,θk)] ] = I(f)

  • ω[

[θ1] ],...,ω[ [θk] ]

  • I(f) : Rk → R smooth

ω[ [(θ)′] ] = ∑

x

ω(x′)∂[ [θ] ] ∂x (ω) Definition (dL semantics) ([

[·] ] : Fml →℘(S))

[ [p(θ1,...,θk)] ] = {ω : (ω[ [θ1] ],...,ω[ [θk] ]) ∈ I(p)}

I(p) ⊆ Rk

[ [αφ] ] = [ [α] ] ◦[ [φ] ]

P valid iff ω ∈ [

[P] ] for all states ω of all interpretations I Definition (Program semantics) ([

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

[ [a] ] = I(a)

I(a) ⊆ S ×S

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ | = x′ = f(x)∧ Q} [ [α ∪β] ] = [ [α] ] ∪[ [β] ] [ [α;β] ] = [ [α] ] ◦[ [β] ] [ [α∗] ] =

  • [

[α] ] ∗ =

n∈N [

[αn] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 9 / 24

slide-33
SLIDE 33

Soundness Proofs for Axioms

Lemma (V vacuous axiom)

V p → [a]p

Lemma ([:=] assignment axiom) [:=] [x := c]p(x) ↔ p(c)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 10 / 24

slide-34
SLIDE 34

Soundness Proofs for Axioms

Lemma (V vacuous axiom)

V p → [a]p

Proof.

Truth of an arity 0 predicate symbol p depends only on interpretation I.

1

I interprets p as true: ω ∈ [

[p] ] for all ω, so ω ∈ [ [[a]p] ] especially.

2

I interprets p as false: ω ∈ [

[p] ] for all ω, so p → [a]p vacuously. Lemma ([:=] assignment axiom) [:=] [x := c]p(x) ↔ p(c) Proof.

p is true of x after assigning the new value c to x (ω ∈ [

[[x := c]p(x)] ])

iff p is true of the new value c (ω ∈ [

[p(c)] ]).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 10 / 24

slide-35
SLIDE 35

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 10 / 24

slide-36
SLIDE 36

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 11 / 24

slide-37
SLIDE 37

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ)

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 11 / 24

slide-38
SLIDE 38

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 11 / 24

slide-39
SLIDE 39

Uniform Substitution: First-Order Examples

(¬¬p) ↔ p (¬¬[x′ = x2]x ≥ 0) ↔ [x′ = x2]x ≥ 0 σ = {p → [x′ = x2]x ≥ 0} (∀x p) ↔ p ∀x (x ≥ 0) ↔ x ≥ 0 σ = {p → x ≥ 0} (∀x p) ↔ p ∀x (y ≥ 0) ↔ y ≥ 0 σ = {p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 12 / 24

slide-40
SLIDE 40

Uniform Substitution: First-Order Examples

(¬¬p) ↔ p

Correct

(¬¬[x′ = x2]x ≥ 0) ↔ [x′ = x2]x ≥ 0 σ = {p → [x′ = x2]x ≥ 0} (∀x p) ↔ p ∀x (x ≥ 0) ↔ x ≥ 0 σ = {p → x ≥ 0} (∀x p) ↔ p ∀x (y ≥ 0) ↔ y ≥ 0 σ = {p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 12 / 24

slide-41
SLIDE 41

Uniform Substitution: First-Order Examples

(¬¬p) ↔ p

Correct

(¬¬[x′ = x2]x ≥ 0) ↔ [x′ = x2]x ≥ 0 σ = {p → [x′ = x2]x ≥ 0} (∀x p) ↔ p

Clash

∀x

BV

(x ≥ 0) ↔ x ≥ 0 σ = {p → x

FV

≥ 0} (∀x p) ↔ p ∀x (y ≥ 0) ↔ y ≥ 0 σ = {p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 12 / 24

slide-42
SLIDE 42

Uniform Substitution: First-Order Examples

(¬¬p) ↔ p

Correct

(¬¬[x′ = x2]x ≥ 0) ↔ [x′ = x2]x ≥ 0 σ = {p → [x′ = x2]x ≥ 0} (∀x p) ↔ p

Clash

∀x (x ≥ 0) ↔ x ≥ 0 σ = {p → x ≥ 0} (∀x p) ↔ p

Correct

∀x (y ≥ 0) ↔ y ≥ 0 σ = {p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 12 / 24

slide-43
SLIDE 43

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-44
SLIDE 44

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-45
SLIDE 45

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-46
SLIDE 46

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c)

Clash

[x

BV

:= x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x

FV

)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-47
SLIDE 47

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c)

Clash

[x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x)} [x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c) [x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-48
SLIDE 48

Uniform Substitution: Argument Examples

[x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ 0 ↔ x2 − 1 ≥ 0 σ = {c → x2 − 1,p(·) → (· ≥ 0)} [x := c]p(x) ↔ p(c)

Clash

[x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x σ = {c → x2 − 1,p(·) → (· ≥ x)} [x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ x ↔ x2 − 1 ≥ x2 − 1 σ = {c → x2 − 1,p(·) → (· ≥ ·)} [x := c]p(x) ↔ p(c)

Correct

[x := x2 − 1]x ≥ y ↔ x2 − 1 ≥ y σ = {c → x2 − 1,p(·) → (· ≥ y)}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 13 / 24

slide-49
SLIDE 49

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 14 / 24

slide-50
SLIDE 50

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 14 / 24

slide-51
SLIDE 51

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) If you bind a free variable, you go to logic jail! Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 14 / 24

slide-52
SLIDE 52

Uniform Substitution: Recursive Application

σ(x) =

for variable x ∈ V

σ(f(θ)) =

for function symbol f ∈ σ

def

= σ(θ +η) = σ((θ)′) = σ(p(θ)) ≡

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-53
SLIDE 53

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) =

for function symbol f ∈ σ

def

= σ(θ +η) = σ((θ)′) = σ(p(θ)) ≡

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-54
SLIDE 54

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ((θ)′) = σ(p(θ)) ≡

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-55
SLIDE 55

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = σ(p(θ)) ≡

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-56
SLIDE 56

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-57
SLIDE 57

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-58
SLIDE 58

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-59
SLIDE 59

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-60
SLIDE 60

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-61
SLIDE 61

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-62
SLIDE 62

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-63
SLIDE 63

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ x′ = σ(θ)&σ(Q)

if σ {x,x′}-admissible for θ,Q

σ(?Q) ≡ σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-64
SLIDE 64

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ x′ = σ(θ)&σ(Q)

if σ {x,x′}-admissible for θ,Q

σ(?Q) ≡ ?σ(Q) σ(α ∪β) ≡ σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-65
SLIDE 65

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ x′ = σ(θ)&σ(Q)

if σ {x,x′}-admissible for θ,Q

σ(?Q) ≡ ?σ(Q) σ(α ∪β) ≡ σ(α)∪σ(β) σ(α;β) ≡ σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-66
SLIDE 66

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ x′ = σ(θ)&σ(Q)

if σ {x,x′}-admissible for θ,Q

σ(?Q) ≡ ?σ(Q) σ(α ∪β) ≡ σ(α)∪σ(β) σ(α;β) ≡ σ(α);σ(β)

if σ BV(σ(α))-admissible for β

σ(α∗) ≡

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-67
SLIDE 67

Uniform Substitution: Recursive Application

σ(x) = x

for variable x ∈ V

σ(f(θ)) = (σ(f))(σ(θ))

for function symbol f ∈ σ

def

= {· → σ(θ)}(σf(·)) σ(θ +η) = σ(θ)+σ(η) σ((θ)′) = (σ(θ))′

if σ V -admissible for θ

σ(p(θ)) ≡ (σ(p))(σ(θ))

for predicate symbol p ∈ σ

σ(φ ∧ψ) ≡ σ(φ)∧σ(ψ) σ(∀x φ) = ∀x σ(φ)

if σ {x}-admissible for φ

σ([α]φ) = [σ(α)]σ(φ)

if σ BV(σ(α))-admissible for φ

σ(a) ≡ σa

for program symbol a ∈ σ

σ(x :=θ) ≡ x :=σ(θ) σ(x′ = θ &Q) ≡ x′ = σ(θ)&σ(Q)

if σ {x,x′}-admissible for θ,Q

σ(?Q) ≡ ?σ(Q) σ(α ∪β) ≡ σ(α)∪σ(β) σ(α;β) ≡ σ(α);σ(β)

if σ BV(σ(α))-admissible for β

σ(α∗) ≡ (σ(α))∗

if σ BV(σ(α))-admissible for α

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 15 / 24

slide-68
SLIDE 68

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c) [x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c) [x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-69
SLIDE 69

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c) [x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c) [x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-70
SLIDE 70

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c)

Clash

[x

BV

:= x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x

FV

)} [x := c]p(x) ↔ p(c) [x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-71
SLIDE 71

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c)

Clash

[x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c) [x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-72
SLIDE 72

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c)

Clash

[x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c)

Correct

[x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-73
SLIDE 73

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c)

Clash

[x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c)

Correct

[x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p Clash x ≥ 0 → [ BV x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x

FV

≥ 0}

p → [a]p y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-74
SLIDE 74

Uniform Substitution: Examples

[x := c]p(x) ↔ p(c)

Clash

[x := x + 1]x = x ↔ x + 1 = x σ = {c → x + 1,p(·) → (· = x)} [x := c]p(x) ↔ p(c)

Correct

[x := x2][(y := x+y)∗]x≥y ↔ [(y := x2+y)∗]x2≥y σ = {c → x2,p(·) → [(y := ·+y)∗](· ≥ y)}

p → [a]p Clash x ≥ 0 → [x′ = −5]x ≥ 0

σ = {a → x′ = −5,p → x ≥ 0}

p → [a]p Correct y ≥ 0 → [x′ = −5]y ≥ 0

σ = {a → x′ = −5,p → y ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 16 / 24

slide-75
SLIDE 75

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) If you bind a free variable, you go to logic jail! Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 17 / 24

slide-76
SLIDE 76

Correctness of Uniform Substitutions

“Syntactic uniform substitution = semantic replacement”

Lemma (Uniform substitution lemma)

Uniform substitution σ and its adjoint interpretation σ∗

ωI to σ for I,ω have the

same semantics:

ω ∈ I[ [σ(φ)] ] iff ω ∈ σ∗

ωI[

[φ] ] φ σ(φ) ω ∈ I[ [σ(φ)] ] ω ∈ σ∗

ωI[

[φ] ] σ σ∗

ωI

I

σ∗

ωI(f) : R → R; d → Id · ω[

[σf(·)] ] σ∗

ωI(p) = {d ∈ R : ω ∈ Id . [

[σp(·)] ]} σ∗

ωI(a) = I[

[σa] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 18 / 24

slide-77
SLIDE 77

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ Proof.

If premise φ valid, i.e. ω ∈ I[

[φ] ] in all I,ω

Then conclusion σ(φ) valid, because ω ∈ I[

[σ(φ)] ] iff ω ∈ σ∗

ωI[

[φ] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 19 / 24

slide-78
SLIDE 78

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 19 / 24

slide-79
SLIDE 79

Differential Dynamic Logic: Comparison

Part I Part IV

[:=] [x :=θ]φ(x) ↔ φ(θ) [?] [?χ]φ ↔ (χ → φ) [∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) V φ → [α]φ

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

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 20 / 24

slide-80
SLIDE 80

Differential Dynamic Logic: Comparison

Part I Part IV

[:=] [x :=θ]φ(x) ↔ φ(θ) [?] [?χ]φ ↔ (χ → φ) [∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) V φ → [α]φ

[′] [x′ = f(x)]φ ↔ ∀t≥0[x := y(t)]φ [:=] [x := c]p(x) ↔ p(c) [?] [?q]p ↔ (q → p) [∪] [a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[;] [a;b]p(¯

x) ↔ [a][b]p(¯ x)

[∗] [a∗]p(¯

x) ↔ p(¯ x)∧[a][a∗]p(¯ x) K [a](p(¯ x)→q(¯ x)) → ([a]p(¯ x) → [a]q(¯ x)) I [a∗]p(¯ x) ↔ p(¯ x)∧[a∗](p(¯ x) → [a]p(¯ x)) V p → [a]p

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 20 / 24

slide-81
SLIDE 81

Differential Dynamic Logic: Comparison

Infinite axiom schema Axiom = one formula

[:=] [x :=θ]φ(x) ↔ φ(θ) [?] [?χ]φ ↔ (χ → φ)

Schema

[∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) Schema V φ → [α]φ

[′] [x′ = f(x)]φ ↔ ∀t≥0[x := y(t)]φ [:=] [x := c]p(x) ↔ p(c) [?] [?q]p ↔ (q → p)

Axiom

[∪] [a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[;] [a;b]p(¯

x) ↔ [a][b]p(¯ x)

[∗] [a∗]p(¯

x) ↔ p(¯ x)∧[a][a∗]p(¯ x) K [a](p(¯ x)→q(¯ x)) → ([a]p(¯ x) → [a]q(¯ x)) I [a∗]p(¯ x) ↔ p(¯ x)∧[a∗](p(¯ x) → [a]p(¯ x)) Axiom V p → [a]p

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 20 / 24

slide-82
SLIDE 82

Example Proof

[;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-83
SLIDE 83

Example Proof

σ = {a → (v := 2∪ v := x),b → x′ = v,p(¯

x) → x > 0}

[a;b]p(¯

x) ↔ [a][b]p(¯ x)

US[(v := 2∪ v := x);x′ = v]x>0 ↔ [(v := 2∪ v := x)][x′ = v]x>0

[∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-84
SLIDE 84

Example Proof

σ = {a → v := 2,b → v := x,p(¯

x) → [x′ = v]x > 0}

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

US[v := 2∪ v := x][x′=v]x>0 ↔ [v := 2][x′ = v]x>0∧[v := x][x′=v]x>0

[:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-85
SLIDE 85

Example Proof

σ = {c → 2,p(·) → [x′=·]x>0} [v := c]p(v) ↔ p(c) [v := 2][x′=v]x>0 ↔ [x′=2]x>0 σ = {c → x,p(·) → [x′=·]x>0} [v := c]p(v) ↔ p(c) [v := x][x′=v]x>0 ↔ [x′=x]x>0

[:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-86
SLIDE 86

Example Proof

σ = {c → 2,p(·) → [x′=·]x>0} [v := c]p(v) ↔ p(c) [v := 2][x′=v]x>0 ↔ [x′=2]x>0 σ = {c → x,p(·) → [x′=·]x>0} [v := c]p(v) ↔ p(c) [v := x][x′=v]x>0 ↔ [x′=x]x>0

  • [′] j(x) ⊢ [x′ = 2]x>0∧[v := x][x′ = v]x>0

[:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-87
SLIDE 87

Example Proof

σ = {c → v,p(·) → ·>0}

v can’t have ODE

[x′ = c]p(x) ↔ ∀t≥0[x := x+ct]p(x)

US[x′ = v]x>0 ↔ ∀t≥0[x := x+vt]x>0

[:=]j(x) ⊢ ∀t≥0[x := x+2t]x>0∧[v := x]∀t≥0[x := x+vt]x>0 [′] j(x) ⊢ [x′ = 2]x>0∧[v := x][x′ = v]x>0 [:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-88
SLIDE 88

Example Proof

σ = {c → x,p(·) → ∀t≥0[x := x+(·)t]x>0} [v := c]p(v) ↔ p(c)

US[v := x]∀t≥0[x := x+vt]x>0 ↔ ∀t≥0[x := x+xt]x>0

[:=]j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0[x := x+xt]x>0 [:=]j(x) ⊢ ∀t≥0[x := x+2t]x>0∧[v := x]∀t≥0[x := x+vt]x>0 [′] j(x) ⊢ [x′ = 2]x>0∧[v := x][x′ = v]x>0 [:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-89
SLIDE 89

Example Proof

σ = {c → x+xt,p(·) → ·>0} [x := c]p(x) ↔ p(c)

US[x := x+xt]x>0 ↔ x+xt>0

j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0x+xt>0

[:=]j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0[x := x+xt]x>0 [:=]j(x) ⊢ ∀t≥0[x := x+2t]x>0∧[v := x]∀t≥0[x := x+vt]x>0 [′] j(x) ⊢ [x′ = 2]x>0∧[v := x][x′ = v]x>0 [:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-90
SLIDE 90

Example Proof

j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0x+xt>0

[:=]j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0[x := x+xt]x>0 [:=]j(x) ⊢ ∀t≥0[x := x+2t]x>0∧[v := x]∀t≥0[x := x+vt]x>0 [′] j(x) ⊢ [x′ = 2]x>0∧[v := x][x′ = v]x>0 [:=]j(x) ⊢ [v := 2][x′ = v]x>0∧[v := x][x′ = v]x>0 [∪] j(x) ⊢ [v := 2∪ v := x][x′ = v]x>0 [;] j(x) ⊢ [(v := 2∪ v := x);x′ = v]x>0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-91
SLIDE 91

Example Proof

Summarize: j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0x+xt>0 j(x) ⊢ [(v := 2∪ v := x);x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-92
SLIDE 92

Example Proof

Summarize: j(x) ⊢ ∀t≥0x+2t>0∧∀t≥0x+xt>0 j(x) ⊢ [(v := 2∪ v := x);x′ = v]x > 0 Using σ = {j(·) → ·>0} on above derived rule proves:

R x > 0 ⊢ ∀t≥0x + 2t > 0∧∀t≥0x + xt > 0

USRx > 0 ⊢ [(v := 2∪ v := x);x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-93
SLIDE 93

Outline

1

Learning Objectives

2

Axioms Versus Axiom Schemata

3

Differential Dynamic Logic with Interpretations Syntax Semantics

4

Uniform Substitution Uniform Substitution Application Uniform Substitution Lemmas

5

Axiomatic Proof Calculus for dL

6

Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 21 / 24

slide-94
SLIDE 94

Axiom vs. Axiom Schema: Philosophy Affects Provers

Soundness easier: literal formula, not instantiation mechanism An axiom is one formula. Axiom schema is a decision algorithm. Generic formula, not some shape with characterization of exceptions No schema variable or meta variable algorithms No matching mechanisms / unification in prover kernel No side condition subtlety or occurrence pattern checks (per schema) × Need other means of instantiating axioms: uniform substitution (US) US + renaming: isolate static semantics US independent from axioms: modular logic vs. prover separation More flexible by syntactic contextual equivalence × Extra proofs branches since instantiation is explicit proof step

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 22 / 24

slide-95
SLIDE 95

Axiom vs. Axiom Schema: Philosophy Affects Provers

Soundness easier: literal formula, not instantiation mechanism An axiom is one formula. Axiom schema is a decision algorithm. Generic formula, not some shape with characterization of exceptions No schema variable or meta variable algorithms No matching mechanisms / unification in prover kernel No side condition subtlety or occurrence pattern checks (per schema) × Need other means of instantiating axioms: uniform substitution (US) US + renaming: isolate static semantics US independent from axioms: modular logic vs. prover separation More flexible by syntactic contextual equivalence × Extra proofs branches since instantiation is explicit proof step ∑ Net win for soundness since significantly simpler prover

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 22 / 24

slide-96
SLIDE 96

Differential Dynamic Logic: Comparison

Part I Part IV

[:=] [x :=θ]φ(x) ↔ φ(θ) [?] [?χ]φ ↔ (χ → φ) [∪] [α ∪β]φ ↔ [α]φ ∧[β]φ [;] [α;β]φ ↔ [α][β]φ [∗] [α∗]φ ↔ φ ∧[α][α∗]φ

K [α](φ → ψ) → ([α]φ → [α]ψ) I [α∗]φ ↔ φ ∧[α∗](φ → [α]φ) V φ → [α]φ

[′] [x′ = f(x)]φ ↔ ∀t≥0[x := y(t)]φ [:=] [x := c]p(x) ↔ p(c) [?] [?q]p ↔ (q → p) [∪] [a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[;] [a;b]p(¯

x) ↔ [a][b]p(¯ x)

[∗] [a∗]p(¯

x) ↔ p(¯ x)∧[a][a∗]p(¯ x) K [a](p(¯ x)→q(¯ x)) → ([a]p(¯ x) → [a]q(¯ x)) I [a∗]p(¯ x) ↔ p(¯ x)∧[a∗](p(¯ x) → [a]p(¯ x)) V p → [a]p

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 23 / 24

slide-97
SLIDE 97

Uniform Substitution for Differential Dynamic Logic

differential dynamic logic

dL = DL+ HP US

φ σ(φ)

[α]φ φ α Uniform substitution

axioms not schemata

Modular: Logic Prover Straightforward to implement Prover microkernel Sound & complete / ODE Fast contextual equivalence KeYmaera X

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 24 / 24

slide-98
SLIDE 98

Uniform Substitution of Rules and Proofs

G p(¯ x)

[a]p(¯

x)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-99
SLIDE 99

Uniform Substitution of Rules and Proofs

G p(¯ x)

[a]p(¯

x) implies x2 ≥ 0

[x := x + 1;(x′ = x ∪ x′ = −2)]x2 ≥ 0 Theorem (Soundness) (FV(σ) = /

0)

φ1 ... φn ψ

locally sound implies

σ(φ1) ... σ(φn) σ(ψ)

locally sound

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-100
SLIDE 100

Uniform Substitution of Rules and Proofs

G p(¯ x)

[a]p(¯

x) implies x2 ≥ 0

[x := x + 1;(x′ = x ∪ x′ = −2)]x2 ≥ 0 Theorem (Soundness) (FV(σ) = /

0)

φ1 ... φn ψ

locally sound implies

σ(φ1) ... σ(φn) σ(ψ)

locally sound Locally sound The conclusion is valid in any interpretation I in which the premises are.

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-101
SLIDE 101

Uniform Substitution of Rules and Proofs

G p(¯ x)

[a]p(¯

x) implies x2 ≥ 0

[x := x + 1;(x′ = x ∪ x′ = −2)]x2 ≥ 0

CQ f() = g() p(f()) ↔ p(g())

Theorem (Soundness) (FV(σ) = /

0)

φ1 ... φn ψ

locally sound implies

σ(φ1) ... σ(φn) σ(ψ)

locally sound Locally sound The conclusion is valid in any interpretation I in which the premises are.

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-102
SLIDE 102

Uniform Substitution of Rules and Proofs

G p(¯ x)

[a]p(¯

x) implies x2 ≥ 0

[x := x + 1;(x′ = x ∪ x′ = −2)]x2 ≥ 0

CQ f() = g() p(f()) ↔ p(g()) implies 2x − x = x

[x′ = v]2x − x ≥ 0 ↔ [x′ = v]x ≥ 0 Theorem (Soundness) (FV(σ) = /

0)

φ1 ... φn ψ

locally sound implies

σ(φ1) ... σ(φn) σ(ψ)

locally sound Locally sound The conclusion is valid in any interpretation I in which the premises are.

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-103
SLIDE 103

Outline

7

Differential Axioms Differential Equation and Differential Axioms Differential Substitution Lemmas Contextual Congruences Static Semantics Summary

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 25 / 24

slide-104
SLIDE 104

Axiom Schema Side Conditions: ODE Solving

[′] [x′ = θ]φ ↔ ∀t≥0[x := y(t)]φ

Axiom schema with side conditions:

1

Occurs check: t fresh

2

Solution check: y(·) solves the ODE y′(t) = θ with y(·) plugged in for x in term θ

3

Initial value check: y(·) solves the symbolic IVP y(0) = x

4

y(·) covers all solutions parametrically

5

x′ cannot occur free in φ Quite nontrivial soundness-critical side condition algorithms . . .

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 26 / 24

slide-105
SLIDE 105

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 27 / 24

slide-106
SLIDE 106

Differential Invariants for Differential Equations

Differential Invariant Q ⊢ [x′ := f(x)](P)′ P ⊢ [x′ = f(x)&Q]P

x w u r x′ = f(x) & Q P w Q

Differential Cut P ⊢ [x′ = f(x)&Q]C P ⊢ [x′ = f(x)&Q∧C]P P ⊢ [x′ = f(x)&Q]P

x Q w u r x′ = f(x) & Q C w Q

Differential Ghost P ↔ ∃y G G ⊢ [x′ = f(x),y′ = g(x,y)&Q]G P ⊢ [x′ = f(x)&Q]P

x Q w u r x′ = f(x) & Q

if new y′ = g(x,y) has long enough solution

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 28 / 24

slide-107
SLIDE 107

Differential Equation Axioms & Differential Axioms

DW [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)]

  • q(x) → p(x)
  • DI
  • [x′ = f(x)&q(x)]p(x) ↔ [?q(x)]p(x)
  • ← [x′ = f(x)&q(x)](p(x))′

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

DE [x′ = f(x)&q(x)]p(x,x′) ↔ [x′ = f(x)&q(x)][x′ := f(x)]p(x,x′) DG [x′ = f(x)&q(x)]p(x) ↔ ∃y [x′ = f(x),y′ = a(x)y+b(x)&q(x)]p(x) DS [x′ = c &q(x)]p(x) ↔ ∀t≥0

  • (∀0≤s≤t q(x+cs)) → [x := x+ct]p(x)
  • +′ (f(¯

x)+ g(¯ x))′ = (f(¯ x))′ +(g(¯ x))′

·′ (f(¯

x)· g(¯ x))′ = (f(¯ x))′ · g(¯ x)+ f(¯ x)·(g(¯ x))′ c′ (c)′ = 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 29 / 24

slide-108
SLIDE 108

Differential Equation Axioms

Axiom (Differential Weakening) (JAR’17)

DW [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)]

  • q(x) → p(x)
  • t

x q(x)

ν ω

r x′ = f(x)&q(x)

¬q(x)

Differential equations cannot leave their evolution domains. Derives from: DW [x′ = f(x)&q(x)]q(x)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-109
SLIDE 109

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x) DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-110
SLIDE 110

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

q(x) DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-111
SLIDE 111

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-112
SLIDE 112

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-113
SLIDE 113

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x) DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-114
SLIDE 114

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-115
SLIDE 115

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-116
SLIDE 116

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-117
SLIDE 117

Differential Equation Axioms

Axiom (Differential Cut) (JAR’17)

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

t x q(x)

ν ω

r x′ = f(x)&q(x)

ν

DC is a cut for differential equations. DC is a differential modal modus ponens K. Can’t leave r(x), then might as well restrict state space to r(x).

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-118
SLIDE 118

Differential Equation Axioms

Axiom (Differential Invariant) (JAR’17)

DI

  • [x′ = f(x)&q(x)]p(x) ↔ [?q(x)]p(x)
  • ← [x′ = f(x)&q(x)](p(x))′

t x q(x)

ν ω

r x′ = f(x)&q(x)

¬ ¬F

F F Differential invariant: if p(x) true now and if differential (p(x))′ true always What’s the differential of a formula??? What’s the meaning of a differential term . . . in a state???

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-119
SLIDE 119

Differential Equation Axioms

Axiom (Differential Effect) (JAR’17)

DE [x′ = f(x)&q(x)]p(x,x′) ↔ [x′ = f(x)&q(x)][x′ := f(x)]p(x,x′) t x q(x)

ν ω

r x′ = f(x)&q(x) x′ f(x) Effect of differential equation on differential symbol x′

[x′ := f(x)] instantly mimics continuous effect [x′ = f(x)] on x′ [x′ := f(x)] selects vector field x′ = f(x) for subsequent differentials

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-120
SLIDE 120

Differential Equation Axioms

Axiom (Differential Ghost) (JAR’17)

DG [x′ = f(x)&q(x)]p(x) ↔ ∃y [x′ = f(x),y′ = a(x)y+b(x)&q(x)]p(x) t x q(x)

ν ω

r x′ = f(x)&q(x) y′ = a(x)y + b(x) t x x′ = f ( x ) y′ = g ( x , y ) inv Differential ghost/auxiliaries: extra differential equations that exist Can cause new invariants “Dark matter” counterweight to balance conserved quantities

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-121
SLIDE 121

Differential Equation Axioms

Axiom (Differential Solution) (JAR’17)

DS [x′ = c &q(x)]p(x) ↔ ∀t≥0

  • (∀0≤s≤t q(x+cs)) → [x := x+ct]p(x)
  • t

x q(x)

ν ω

r x′ = f(x)&q(x) t x q(x)

ω ν

r x′ = c &q(x) Differential solutions: solve differential equations with DG,DC and inverse companions

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 30 / 24

slide-122
SLIDE 122

Example: Differential Invariants Don’t Solve. Prove!

1

DI proves a property of an ODE inductively by its differentials

2

DE exports vector field, possibly after DW exports evolution domain

3

CE+CQ reason efficiently in Equivalence or eQuational context

4

G isolates postcondition

5

[:=] differential assignment uses vector field

6

·′ differential computations are axiomatic (US) ∗

R ⊢ x3·x + x·x3 ≥ 0 [:=] ⊢ [x′ := x3]x′·x + x·x′ ≥ 0

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

·′ (f(¯

x)·g(¯ x))′ = (f(¯ x))′·g(¯ x)+f(¯ x)·(g(¯ x))′

US

(x·x)′ = (x)′·x + x·(x)′ (x·x)′ = x′·x + x·x′

CQ (x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 31 / 24

slide-123
SLIDE 123

Differential Substitution Lemmas

Lemma (Differential lemma)

If ϕ |

= x′ = f(x)∧ Q for duration r > 0, then for all 0 ≤ ζ ≤ r:

Syntactic

ϕ(ζ)[ [(θ)′] ] = dϕ(t)[ [θ] ]

dt

(ζ)

Analytic

Lemma (Differential assignment)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = φ ↔ [x′ := f(x)]φ Lemma (Derivations) (f(¯

x)+ g(¯ x))′ = (f(¯ x))′ +(g(¯ x))′

(f(¯

x)· g(¯ x))′ = (f(¯ x))′ · g(¯ x)+ f(¯ x)·(g(¯ x))′

(c)′ = 0

for arity 0 functions c

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 32 / 24

slide-124
SLIDE 124

Differential Substitution Lemmas

Lemma (Differential lemma)

If ϕ |

= x′ = f(x)∧ Q for duration r > 0, then for all 0 ≤ ζ ≤ r:

Syntactic

ϕ(ζ)[ [(θ)′] ] = dϕ(t)[ [θ] ]

dt

(ζ)

Analytic

Lemma (Differential assignment)

If ϕ |

= x′ = f(x)∧ Q then ϕ | = φ ↔ [x′ := f(x)]φ Lemma (Derivations) (θ +η)′ = (θ)′ +(η)′ (θ ·η)′ = (θ)′ ·η +θ ·(η)′ (c)′ = 0

for arity 0 functions c

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 33 / 24

slide-125
SLIDE 125

Differential Equation Axioms & Differential Axioms

DW [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)]

  • q(x) → p(x)
  • DI
  • [x′ = f(x)&q(x)]p(x) ↔ [?q(x)]p(x)
  • ← [x′ = f(x)&q(x)](p(x))′

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

DE [x′ = f(x)&q(x)]p(x,x′) ↔ [x′ = f(x)&q(x)][x′ := f(x)]p(x,x′) DG [x′ = f(x)&q(x)]p(x) ↔ ∃y [x′ = f(x),y′ = a(x)y+b(x)&q(x)]p(x) DS [x′ = c &q(x)]p(x) ↔ ∀t≥0

  • (∀0≤s≤t q(x+cs)) → [x := x+ct]p(x)
  • +′ (f(¯

x)+ g(¯ x))′ = (f(¯ x))′ +(g(¯ x))′

·′ (f(¯

x)· g(¯ x))′ = (f(¯ x))′ · g(¯ x)+ f(¯ x)·(g(¯ x))′ c′ (c)′ = 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 34 / 24

slide-126
SLIDE 126

Example: Differential Invariants Don’t Solve. Prove!

1

DI proves a property of an ODE inductively by its differentials

2

DE exports vector field, possibly after DW exports evolution domain

3

CE+CQ reason efficiently in Equivalence or eQuational context

4

G isolates postcondition

5

[:=] differential assignment uses vector field ∗

R ⊢ x3·x + x·x3 ≥ 0 [:=] ⊢ [x′ := x3]x′·x + x·x′ ≥ 0

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

(x·x)′ = x′·x + x·x′

CQ (x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 35 / 24

slide-127
SLIDE 127

Example: Contextual Congruence Reasoning by US

CQ f() = g() p(f()) ↔ p(g())

CQ

(x · x)′ = x′ · x + x · x′ (x · x)′ ≥ 0 ↔ x′ · x + x · x′ ≥ 0

CE P ↔ Q C(P) ↔ C(Q)

CE

(x · x ≥ 1)′ ↔ x′ · x + x · x′ ≥ 0 [x′ = x3][x′ := x3](x · x ≥ 1)′ ↔ [x′ = x3][x′ := x3]x′ · x + x · x′ ≥ 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 36 / 24

slide-128
SLIDE 128

Example: Contextual Congruence Reasoning by US

CQ f() = g() p(f()) ↔ p(g())

CQ

(x · x)′ = x′ · x + x · x′ (x · x)′ ≥ 0 ↔ x′ · x + x · x′ ≥ 0

with σ ≈ {p(·) → · ≥ 0,f() → (x · x)′,g() → x′ · x + x · x′} CE P ↔ Q C(P) ↔ C(Q)

CE

(x · x ≥ 1)′ ↔ x′ · x + x · x′ ≥ 0 [x′ = x3][x′ := x3](x · x ≥ 1)′ ↔ [x′ = x3][x′ := x3]x′ · x + x · x′ ≥ 0

with σ ≈ {C(_) → [x′=x3][x′ := x3]_,P → (x·x ≥ 1)′,Q → x′·x+x·x′ ≥ 0}

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 36 / 24

slide-129
SLIDE 129

Example: Differential Invariants Parametric

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-130
SLIDE 130

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-131
SLIDE 131

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-132
SLIDE 132

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-133
SLIDE 133

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0 CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-134
SLIDE 134

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-135
SLIDE 135

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

4

USR instantiates proof by {j(x,x′) → x′ · x + x · x′}

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

R ⊢ x3·x + x·x3 ≥ 0

x′

(x·x)′ = x′·x + x·x′

USR

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-136
SLIDE 136

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

4

USR instantiates proof by {j(x,x′) → x′ · x + x · x′}

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

R ⊢ x3·x + x·x3 ≥ 0

x′

(x·x)′ = x′·x + x·x′

USR

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-137
SLIDE 137

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

4

USR instantiates proof by {j(x,x′) → x′ · x + x · x′}

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

R ⊢ x3·x + x·x3 ≥ 0

US

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

USR

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-138
SLIDE 138

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

4

USR instantiates proof by {j(x,x′) → x′ · x + x · x′}

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

R ⊢ x3·x + x·x3 ≥ 0 ·′ (f(¯

x)·g(¯ x))′ = (f(¯ x))′·g(¯ x)+ f(¯ x)·(g(¯ x))′

US

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

USR

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-139
SLIDE 139

Example: Differential Invariants Parametric

1

Free function j(x,x′) for parametric differential computation

2

Again G,[:=] to isolate differentially substituted postcondition

3

Construct parametric j(x,x′) by axiomatic differential computation

4

USR instantiates proof by {j(x,x′) → x′ · x + x · x′}

⊢ j(x,x3) ≥ 0

[:=] ⊢ [x′ := x3]j(x,x′) ≥ 0

G ⊢ [x′ = x3][x′ := x3]j(x,x′) ≥ 0

(x·x)′ = j(x,x′)

CQ(x·x)′ ≥ 0 ↔ j(x,x′) ≥ 0

(x·x ≥ 1)′ ↔ j(x,x′) ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

R ⊢ x3·x + x·x3 ≥ 0

·′ (f(¯

x)·g(¯ x))′ = (f(¯ x))′·g(¯ x)+ f(¯ x)·(g(¯ x))′

US

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

USR

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 37 / 24

slide-140
SLIDE 140

Example: Differential Invariants Computation

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-141
SLIDE 141

Example: Differential Invariants Computation

1

Start with identity differential computation result

R

(x·x)′ = (x·x)′

·′

x′ CT CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-142
SLIDE 142

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

R

(x·x)′ = (x·x)′

·′

x′ CT CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-143
SLIDE 143

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′ CT CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-144
SLIDE 144

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-145
SLIDE 145

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0 CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-146
SLIDE 146

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

4

Construct differential invariant computation result forward accordingly

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-147
SLIDE 147

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

4

Construct differential invariant computation result forward accordingly

5

Resume backward proof with result computed by forward proof right

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-148
SLIDE 148

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

4

Construct differential invariant computation result forward accordingly

5

Resume backward proof with result computed by forward proof right

[:=] ⊢ [x′ := x3]x′·x + x·x′ ≥ 0

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-149
SLIDE 149

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

4

Construct differential invariant computation result forward accordingly

5

Resume backward proof with result computed by forward proof right

R ⊢ x3·x + x·x3 ≥ 0 [:=] ⊢ [x′ := x3]x′·x + x·x′ ≥ 0

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-150
SLIDE 150

Example: Differential Invariants Computation

1

Start with identity differential computation result which proves

2

Construct differential computation result forward by ·′ x′

3

Embed differential computation result forward by CT

4

Construct differential invariant computation result forward accordingly

5

Resume backward proof with result computed by forward proof right

R ⊢ x3·x + x·x3 ≥ 0 [:=] ⊢ [x′ := x3]x′·x + x·x′ ≥ 0

G ⊢ [x′ = x3][x′ := x3]x′·x+x·x′≥0

R

(x·x)′ = (x·x)′

·′

(x·x)′ = (x)′·x + x·(x)′

x′

(x·x)′ = x′·x + x·x′

CT(x·x)′ ≥ 0 ↔ x′·x + x·x′ ≥ 0

(x·x ≥ 1)′ ↔ x′·x + x·x′ ≥ 0

CE

⊢ [x′ = x3][x′ := x3](x·x ≥ 1)′

DE

⊢ [x′ = x3](x·x ≥ 1)′

DI

x·x ≥ 1 ⊢ [x′ = x3]x·x ≥ 1

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 38 / 24

slide-151
SLIDE 151

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) If you bind a free variable, you go to logic jail! Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 39 / 24

slide-152
SLIDE 152

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) If you bind a free variable, you go to logic jail! Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

Modular interface: Prover vs. Logic

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 39 / 24

slide-153
SLIDE 153

Correctness of Static Semantics

Lemma (Bound effect lemma) (Only BV(·) change)

If (ω,ν) ∈ [

[α] ], then ω = ν on BV(α)∁. Lemma (Coincidence lemma) (Only FV(·) determine truth)

If ω = ˜

ω on FV(θ) and I = J on Σ(θ), then ω[ [θ] ] = ˜ ω[ [θ] ]

If ω = ˜

ω on FV(φ) ω ∈ [ [φ] ] iff ˜ ω ∈ J[ [φ] ] ω ν ˜ ω ˜ ν

  • n V ⊇ FV(α)

α α ∃

  • n V ∪ MBV(α)
  • n BV(α)∁
  • n BV(α)∁

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 40 / 24

slide-154
SLIDE 154

Correctness of Static Semantics

Lemma (Bound effect lemma) (Only BV(·) change)

If (ω,ν) ∈ [

[α] ], then ω = ν on BV(α)∁. Lemma (Coincidence lemma) (Only FV(·) determine truth)

If ω = ˜

ω on FV(θ) and I = J on Σ(θ), then ω[ [θ] ] = ˜ ω[ [θ] ]

If ω = ˜

ω on FV(φ) ω ∈ [ [φ] ] iff ˜ ω ∈ J[ [φ] ] ω ν ˜ ω ˜ ν

  • n V ⊇ FV(α)

α α ∃

  • n V ∪ MBV(α)
  • n BV(α)∁
  • n BV(α)∁

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 40 / 24

slide-155
SLIDE 155

Differential Dynamic Logic dL: Static Semantics

FV((θ)′) = FV(p(θ1,...,θk)) = FV(φ ∧ψ) = FV(∀x φ) = FV(∃x φ) = FV([α]φ) = FV(αφ) = FV(a) = FV(x :=θ) = FV(?Q) = FV(x′ = θ &Q) = FV(α ∪β) = FV(α;β) = FV(α∗) =

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-156
SLIDE 156

Differential Dynamic Logic dL: Static Semantics

FV((θ)′) = FV(θ) FV(p(θ1,...,θk)) = FV(θ1)∪···∪ FV(θk) FV(φ ∧ψ) = FV(φ)∪ FV(ψ) FV(∀x φ) = FV(∃x φ) = FV(φ)\{x} FV([α]φ) = FV(αφ) = FV(α)∪(FV(φ)\ BV(α)) FV(a) =V for program symbol a FV(x :=θ) = FV(θ) FV(?Q) = FV(Q) FV(x′ = θ &Q) ={x}∪ FV(θ)∪ FV(Q) FV(α ∪β) = FV(α)∪ FV(β) FV(α;β) = FV(α)∪(FV(β)\ BV(α)) FV(α∗) = FV(α)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-157
SLIDE 157

Differential Dynamic Logic dL: Static Semantics

FV((θ)′) = FV(θ)∪ FV(θ)′ caution FV(p(θ1,...,θk)) = FV(θ1)∪···∪ FV(θk) FV(φ ∧ψ) = FV(φ)∪ FV(ψ) FV(∀x φ) = FV(∃x φ) = FV(φ)\{x} FV([α]φ) = FV(αφ) = FV(α)∪(FV(φ)\ MBV(α)) caution FV(a) =V for program symbol a FV(x :=θ) = FV(θ) FV(?Q) = FV(Q) FV(x′ = θ &Q) ={x}∪ FV(θ)∪ FV(Q) FV(α ∪β) = FV(α)∪ FV(β) FV(α;β) = FV(α)∪(FV(β)\ MBV(α)) caution FV(α∗) = FV(α)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-158
SLIDE 158

Differential Dynamic Logic dL: Static Semantics

BV(θ ≥ η) = BV(p(θ1,...,θk)) = BV(φ ∧ψ) = BV(∀x φ) = BV(∃x φ) = BV([α]φ) = BV(αφ) = BV(a) = BV(x :=θ) = BV(?Q) = BV(x′ = θ &Q) = BV(α ∪β) = BV(α;β) = BV(α∗) =

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-159
SLIDE 159

Differential Dynamic Logic dL: Static Semantics

BV(θ ≥ η) = BV(p(θ1,...,θk)) = / BV(φ ∧ψ) = BV(φ)∪ BV(ψ) BV(∀x φ) = BV(∃x φ) ={x}∪ BV(φ) BV([α]φ) = BV(αφ) = BV(α)∪ BV(φ) BV(a) =V for program symbol a BV(x :=θ) ={x} BV(?Q) = / BV(x′ = θ &Q) ={x,x′} BV(α ∪β) = BV(α;β) = BV(α)∪ BV(β) BV(α∗) = BV(α)

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-160
SLIDE 160

Differential Dynamic Logic dL: Static Semantics

BV(θ ≥ η) = BV(p(θ1,...,θk)) = / BV(φ ∧ψ) = BV(φ)∪ BV(ψ) BV(∀x φ) = BV(∃x φ) ={x}∪ BV(φ) BV([α]φ) = BV(αφ) = BV(α)∪ BV(φ) BV(a) =V for program symbol a BV(x :=θ) ={x} BV(?Q) = / BV(x′ = θ &Q) ={x,x′} BV(α ∪β) = BV(α;β) = BV(α)∪ BV(β) BV(α∗) = BV(α) MBV(a) = MBV(α) = MBV(α ∪β) = MBV(α;β) = MBV(α∗) =

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-161
SLIDE 161

Differential Dynamic Logic dL: Static Semantics

BV(θ ≥ η) = BV(p(θ1,...,θk)) = / BV(φ ∧ψ) = BV(φ)∪ BV(ψ) BV(∀x φ) = BV(∃x φ) ={x}∪ BV(φ) BV([α]φ) = BV(αφ) = BV(α)∪ BV(φ) BV(a) =V for program symbol a BV(x :=θ) ={x} BV(?Q) = / BV(x′ = θ &Q) ={x,x′} BV(α ∪β) = BV(α;β) = BV(α)∪ BV(β) BV(α∗) = BV(α) MBV(a) = / program symbol a MBV(α) = BV(α)

  • ther atomic HPs α

MBV(α ∪β) =MBV(α)∩ MBV(β) MBV(α;β) = MBV(α)∪ MBV(β) MBV(α∗) = /

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 41 / 24

slide-162
SLIDE 162

Correctness of Static Semantics

Lemma (Bound effect lemma) (Only BV(·) change)

If (ω,ν) ∈ [

[α] ], then ω = ν on BV(α)∁. Lemma (Coincidence lemma) (Only FV(·) determine truth)

If ω = ˜

ω on FV(θ) and I = J on Σ(θ), then ω[ [θ] ] = ˜ ω[ [θ] ]

If ω = ˜

ω on FV(φ) ω ∈ [ [φ] ] iff ˜ ω ∈ J[ [φ] ] ω ν ˜ ω ˜ ν

  • n V ⊇ FV(α)

α α ∃

  • n V ∪ MBV(α)
  • n BV(α)∁
  • n BV(α)∁

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 42 / 24

slide-163
SLIDE 163

Uniform Substitution

Theorem (Soundness) replace all occurrences of p(·)

US

φ σ(φ)

provided FV(σ|Σ(θ))∩ BV(⊗(·)) = /

0 for each operation ⊗(θ) in φ

i.e. bound variables U = BV(⊗(·)) of no operator ⊗ are free in the substitution on its argument θ (U-admissible) If you bind a free variable, you go to logic jail! Uniform substitution σ replaces all occurrences of p(θ) for any θ by ψ(θ) function sym. f(θ) for any θ by η(θ) program sym. a by

α

Modular interface: Prover vs. Logic

US

[a∪ b]p(¯

x) ↔ [a]p(¯ x)∧[b]p(¯ x)

[v := v + 1∪ x′ = v]x > 0 ↔ [v := v + 1]x > 0∧[x′ = v]x > 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 43 / 24

slide-164
SLIDE 164

Differential Equation Axioms & Differential Axioms

DW [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)]

  • q(x) → p(x)
  • DI
  • [x′ = f(x)&q(x)]p(x) ↔ [?q(x)]p(x)
  • ← [x′ = f(x)&q(x)](p(x))′

DC

  • [x′ = f(x)&q(x)]p(x) ↔ [x′ = f(x)&q(x)∧r(x)]p(x)
  • ← [x′ = f(x)&q(x)]r(x)

DE [x′ = f(x)&q(x)]p(x,x′) ↔ [x′ = f(x)&q(x)][x′ := f(x)]p(x,x′) DG [x′ = f(x)&q(x)]p(x) ↔ ∃y [x′ = f(x),y′ = a(x)y+b(x)&q(x)]p(x) DS [x′ = c &q(x)]p(x) ↔ ∀t≥0

  • (∀0≤s≤t q(x+cs)) → [x := x+ct]p(x)
  • +′ (f(¯

x)+ g(¯ x))′ = (f(¯ x))′ +(g(¯ x))′

·′ (f(¯

x)· g(¯ x))′ = (f(¯ x))′ · g(¯ x)+ f(¯ x)·(g(¯ x))′ c′ (c)′ = 0

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 44 / 24

slide-165
SLIDE 165

André Platzer. Logical Foundations of Cyber-Physical Systems. Springer, Cham, 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. A uniform substitution calculus for differential dynamic logic. In Amy Felty and Aart Middeldorp, editors, CADE, volume 9195 of LNCS, pages 467–481, Berlin, 2015. Springer.

doi:10.1007/978-3-319-21401-6_32.

André Platzer. The complete proof theory of hybrid systems. In LICS [7], pages 541–550.

doi:10.1109/LICS.2012.64.

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 44 / 24

slide-166
SLIDE 166

André Platzer. Differential game logic. ACM Trans. Comput. Log., 17(1):1:1–1:51, 2015.

doi:10.1145/2817824.

André Platzer. Logics of dynamical systems. In LICS [7], pages 13–24.

doi:10.1109/LICS.2012.13.

Logic in Computer Science (LICS), 2012 27th Annual IEEE Symposium

  • n, Los Alamitos, 2012. IEEE.

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 45 / 24

slide-167
SLIDE 167

Differential Dynamic Logic with Interpretations: Semantics

Definition (Term semantics) ([

[·] ] : Trm → (S → R))

ω[ [f(θ1,...,θk)] ] = I(f)

  • ω[

[θ1] ],...,ω[ [θk] ]

  • I(f) : Rk → R smooth

ω[ [(θ)′] ] = ∑

x

ω(x′)∂[ [θ] ] ∂x (ω) Definition (dL semantics) ([

[·] ] : Fml →℘(S))

[ [p(θ1,...,θk)] ] = {ω : (ω[ [θ1] ],...,ω[ [θk] ]) ∈ I(p)}

I(p) ⊆ Rk

[ [αφ] ] = [ [α] ] ◦[ [φ] ]

P valid iff ω ∈ [

[P] ] for all states ω of all interpretations I Definition (Program semantics) ([

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

[ [a] ] = I(a)

I(a) ⊆ S ×S

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ | = x′ = f(x)∧ Q} [ [α ∪β] ] = [ [α] ] ∪[ [β] ] [ [α;β] ] = [ [α] ] ◦[ [β] ] [ [α∗] ] =

  • [

[α] ] ∗ =

n∈N [

[αn] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 45 / 24

slide-168
SLIDE 168

Differential Dynamic Logic with Interpretations: Semantics

Definition (Term semantics) ([

[·] ] : Trm → (S → R))

ω[ [x] ] = ω(x)

for variable x ∈ V

ω[ [θ +η] ] = ω[ [θ] ]+ω[ [η] ] ω[ [θ ·η] ] = ω[ [θ] ]·ω[ [η] ] ω[ [f(θ1,...,θk)] ] = I(f)

  • ω[

[θ1] ],...,ω[ [θk] ]

  • I(f) : Rk → R smooth

ω[ [(θ)′] ] = ∑

x

ω(x′)∂[ [θ] ] ∂x (ω) Definition (dL semantics) ([

[·] ] : Fml →℘(S))

[ [p(θ1,...,θk)] ] = {ω : (ω[ [θ1] ],...,ω[ [θk] ]) ∈ I(p)}

I(p) ⊆ Rk

[ [αφ] ] = [ [α] ] ◦[ [φ] ] [ [[α]φ] ] = [ [¬α¬φ] ] Definition (Program semantics) ([

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

[ [a] ] = I(a)

I(a) ⊆ S ×S

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ | = x′ = f(x)∧ Q} [ [α ∪β] ] = [ [α] ] ∪[ [β] ] [ [α;β] ] = [ [α] ] ◦[ [β] ] [ [α∗] ] =

  • [

[α] ] ∗ =

n∈N [

[αn] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 45 / 24

slide-169
SLIDE 169

Differential Dynamic Logic with Interpretations: Semantics

Definition (Term semantics) ([

[·] ] : Trm → (S → R))

ω[ [f(θ1,...,θk)] ] = I(f)

  • ω[

[θ1] ],...,ω[ [θk] ]

  • I(f) : Rk → R smooth

ω[ [(θ)′] ] = ∑

x

ω(x′)∂[ [θ] ] ∂x (ω) Definition (dL semantics) ([

[·] ] : Fml →℘(S))

[ [θ ≥ η] ] = {ω : ω[ [θ] ] ≥ ω[ [η] ]} [ [p(θ1,...,θk)] ] = {ω : (ω[ [θ1] ],...,ω[ [θk] ]) ∈ I(p)}

I(p) ⊆ Rk

[ [¬φ] ] = ([ [φ] ])∁ [ [φ ∧ψ] ] = [ [φ] ]∩[ [ψ] ] [ [∃x φ] ] = {ω ∈ S : ωr

x ∈ [

[φ] ] for some r ∈ R} [ [αφ] ] = [ [α] ] ◦[ [φ] ] = {ω : ν ∈ [ [φ] ] for some ν (ω,ν) ∈ [ [α] ]} [ [[α]φ] ] = [ [¬α¬φ] ] = {ω : ν ∈ [ [φ] ] for all ν (ω,ν) ∈ [ [α] ]} Definition (Program semantics) ([

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

[ [a] ] = I(a)

I(a) ⊆ S ×S

[ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ | = x′ = f(x)∧ Q} [ [α ∪β] ] = [ [α] ] ∪[ [β] ] [ [α;β] ] = [ [α] ] ◦[ [β] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 45 / 24

slide-170
SLIDE 170

Differential Dynamic Logic with Interpretations: Semantics

Definition (Term semantics) ([

[·] ] : Trm → (S → R))

ω[ [f(θ1,...,θk)] ] = I(f)

  • ω[

[θ1] ],...,ω[ [θk] ]

  • I(f) : Rk → R smooth

ω[ [(θ)′] ] = ∑

x

ω(x′)∂[ [θ] ] ∂x (ω) Definition (dL semantics) ([

[·] ] : Fml →℘(S))

[ [p(θ1,...,θk)] ] = {ω : (ω[ [θ1] ],...,ω[ [θk] ]) ∈ I(p)}

I(p) ⊆ Rk

[ [αφ] ] = [ [α] ] ◦[ [φ] ] [ [[α]φ] ] = [ [¬α¬φ] ] Definition (Program semantics) ([

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

[ [a] ] = I(a)

I(a) ⊆ S ×S

[ [x :=θ] ] = {(ω,ν) : ν = ω except ν[ [x] ] = ω[ [θ] ]} [ [?Q] ] = {(ω,ω) : ω ∈ [ [Q] ]} [ [x′ = f(x)&Q] ] = {(ϕ(0)|{x′}∁,ϕ(r)) : ϕ | = x′ = f(x)∧ Q} [ [α ∪β] ] = [ [α] ] ∪[ [β] ] [ [α;β] ] = [ [α] ] ◦[ [β] ] [ [α∗] ] =

  • [

[α] ] ∗ =

n∈N [

[αn] ]

André Platzer (CMU) LFCPS/18: Axioms & Uniform Substitutions LFCPS/18 45 / 24