28
Finite Temporal Logic Eric Campbell Advised by Michael Greenberg

Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Finite Temporal LogicEric Campbell

Advised by Michael Greenberg

Page 2: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

http://www.williamsonchamber.com/wp-content/uploads/air-travel-map2.jpg

Page 3: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

http://www.williamsonchamber.com/wp-content/uploads/air-travel-map2.jpg

Questions:

● Do Speedy & Sleepy get to JFK?

● Do Speedy & Sleepy stop flying?

● Speedy has a warrant in Texas.Does Speedy Land in Texas?

Page 4: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

http://www.williamsonchamber.com/wp-content/uploads/air-travel-map2.jpg

“True” Expressions

LAX

next(JFK)

ever(end), next(end)

always(¬ TX)

Page 5: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

http://www.williamsonchamber.com/wp-content/uploads/air-travel-map2.jpg

“True” Expressions

LAX

next(SFO)

next(next(PHX))

next(next(next(JFK)))

next(next(next(end)))

always(¬ TX)

Page 6: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Linear Temporal Logic over finite traces (LTLf)

Page 7: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

What is a logic?

LTLf

Syntax Proof Theory

Semantics

Page 8: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Syntax for LTLf

Define the set of formulae, LTLf(V), to be

a,b ::= v | False | True | end | ¬ a | next a | always a | ever a | a → b | a ∨ b | a ∧ b

Or equivalently,

LTLf(V) = 〈 V ∪ {True, False, end}, { ¬ , next, always, ever}, {→, ∨, ∧} 〉

V = {LAX, SFO, PHX, JFK,CA, TX}

LAX, SFO, LAX → CA

next( PHX )

ever( end )

ever(JFK ∧ end ) → ¬ always(¬ JFK)

LAX → ever(JFK)

Example Formulae

Page 9: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

What is a logic?

LTLf

Syntax Proof Theory

Semantics

Page 10: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Semantics: A Ground TruthDefinition: Timeline

A timeline Tn = ( f1, f2, . . . , fn) is an n-tuple of functions fi : V → { , }

LAX,CA

SFO, PHX,DFW,JFK,TXend

SFO,CA

LAX, PHX,DFW,JFK,TX,end

PHX

LAX,SFO, DFW,JFK,CA,TX,end

JFK,end

LAX,SFO, PHX,DFW,CA,TX

T4 =

T F

Page 11: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

LAX,CA

SFO, PHX,DFW,JFK,TXend

SFO,CA

LAX, PHX,DFW,JFK,TX,end

PHX

LAX,SFO, DFW,JFK,CA,TX,end

JFK,end

LAX,SFO, PHX,DFW,CA,TX

T4 =

ever(JFK)

JFK? JFK? JFK? JFK!

Page 12: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

LAX,CA

SFO, PHX,DFW,JFK,TXend

SFO,CA

LAX, PHX,DFW,JFK,TX,end

PHX

LAX,SFO, DFW,JFK,CA,TX,end

JFK,end

LAX,SFO, PHX,DFW,CA,TX

T4 =

always(¬ end)

¬end! ¬end! end :(¬end!

Page 13: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Semantics: Validity (⊨)Definition: Validity

A formula a is valid if for every timeline Tn

T ni (a) = True ∀ i = 1,…, n,

Write ⊨ a , if a is valid.

Example: ⊨ always(¬ a) → ¬ ever(a).

¬a ¬a ¬a ¬a,end…

a a a a

Page 14: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

What is a logic?

LTLf

Syntax Proof Theory

Semantics

Page 15: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Towards a Proof Theory● Proofs for specific timelines are done by induction● Syntactic proofs for timelines in general -- without Timelines??

We want to be able to prove valid formulae.

Page 16: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Example Proof ( ⊦ next(a) → ¬ end )

Proof.1. next(a) Assume that next(a) holds

2. end To show ¬ end, assume end for contradiction

3. ¬ next(a) Apply ⊦ end → ¬ next(a) to end giving ¬ next(a)

4. contradiction ¬ next(a) and next(a) are a contradiction

5. ¬ end end was contradictory, so ¬ end

Tauts in Classical Logic⊦ next (a → b) ≡ next(a) → next(b)⊦ end → ¬ next(a)⊦ ever(end)⊦ ever a ≡ a ∨ next(ever(a))

If ⊦ a, then ⊦ wk_next(a)

If ⊦ a → b and ⊦ a → wk_next(a), then ⊦ a → always(b)

a

No Reference to Timelines!!

Page 17: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

What is a logic?

LTLf

Syntax Proof TheorySemantics

Completeness valid ⇒ provable

Soundness provable ⇒ valid

Page 18: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Soundness & CompletenessTheorem: Soundness

If ⊦ a then ⊨ a. If we can prove a, then a is valid.

Proof. Simple. show all rules are valid. □

Theorem: Completeness

If ⊨ a then ⊦ a.If a is valid, we can prove a.

Proof. Hard! Construct a graph modelling to all possible timelines. □

next(True)

True,¬ end

True, end

True, end

Page 19: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

notexist

If exists

One other property: Decidability

Decision ProcedureTimeline Tn

in which a is true

boom!

A formula a

Page 20: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Tableau for always((next a) or b)

Page 21: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Motivation

LTL

Page 22: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Motivation for my work

NetKAT + LTLf =

Temporal NetKAT

Page 23: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

What is a logic?

Completeness valid ⇒ provable

LTLf

Syntax Proof TheorySemantics

Decide Soundness provable ⇒ valid

Page 24: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Questions?

Page 25: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Tauts in Classical Logic⊦ next (a → b) ≡ next(a) → next(b)⊦ end → ¬ next(a)⊦ ever(end)⊦ ever a ≡ a ∨ next(ever(a))

If ⊦ a, then ⊦ wk_next(a)

If ⊦ a → b and ⊦ a → wk_next(a), then ⊦ a → always(b)

Proof Theory

Page 26: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Full Semantics

Page 27: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Syntactic Sugar

always(a) ≡ a wk_until False

ever(a) ≡ ¬ always(¬ a)

a until b ≡ a wk_until b ∧ ever(b)

wk_next (a) ≡ ¬ next(¬a)

end ≡ ¬ next(True)

Page 28: Finite Temporal Logic Advised by Michael Greenberg Eric ... · Example Proof ( ⊦ next(a) → ¬ end ) Proof. 1. next(a) Assume that next(a) holds 2. end To show ¬ end, assume end

Linear Temporal Logic over finite traces

Unique Successor

next, always, ever, until, etc.

⊢ ever endTn = (f1, … , fn)