Intuitionistic Temporal Logic from Reactive Programming Wolfgang Jeltsch Institute of Cybernetics at Tallinn University of Technology Estonian–Finnish Logic Meeting Rakvere, Estonia 14 October 2015 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 1 / 20
Functional reactive programming and intuitionistic temporal logic 1 Logical operators 2 Inference rules 3 Conclusions and outlook 4 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 2 / 20
Functional reactive programming and intuitionistic temporal logic 1 Logical operators 2 Inference rules 3 Conclusions and outlook 4 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 3 / 20
Functional reactive programming (FRP) extension of functional programming with support for describing temporal behavior time is a totally ordered set ( T , ≤ ) : linear not necessarily discrete key constructs for behavior descriptions: signals events Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 4 / 20
Signals and events signals are time-varying values: Signal α : α events are times with associated values: Event β : β examples: Signal � audio channel in a multimedia application Event Σ key press Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 5 / 20
Correspondence to temporal logic operators Signal corresponds to a future-only variant of � : � ′ A : A Event corresponds to a future-only variant of � : � ′ B : B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 6 / 20
Establishment of a Curry–Howard correspondence FRP inspires temporal logic, making it intuitionistic in several ways: double negation elimination does not hold: ¬¬ A � A � ′ and � ′ are not interdefinable: � ′ A � ¬ � ′ ¬ A � ′ B � ¬ � ′ ¬ B � ′ does not distribute over finite disjunctions: � ′ ( A ∨ B ) � � ′ A ∨ � ′ B � ′ ⊥ � ⊥ � ′ A ∨ � ′ B ⊢ � ′ ( A ∨ B ) ⊥ ⊢ � ′ ⊥ temporal logic inspires FRP: time-dependent truth −→ time-dependent type inhabitance “until” proofs −→ processes Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 7 / 20
Functional reactive programming and intuitionistic temporal logic 1 Logical operators 2 Inference rules 3 Conclusions and outlook 4 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 8 / 20
“Until” operators family of future-only “until” operators: A B A ⊲ ′′ c B : A parameter c is termination constraint: termination behaviors are elements of T ∪ {∞} : t ∈ T termination at time t ∞ nontermination termination constraints are downward closed sets of permitted termination behaviors special cases: T termination guaranteed T ∪ {∞} nontermination possible shortcuts: ↓ = T � = T ∪ {∞} Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 9 / 20
Derivation of “always” and “eventually” operators derivation of � ′ : � ′ A = A ⊲ ′′ � ⊥ : A derivation of � ′ : � ′ B = ⊤ ⊲ ′′ ↓ B : B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 10 / 20
Present-also versions of “always” and “eventually” present-also version of � ′ : � A = A × � ′ A : A present-also version of � ′ : B � B = B + � ′ B : B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 11 / 20
Present-also versions of “until” derivation analogous to derivation of � : A ⊲ ′ c B = A × A ⊲ ′′ c B : A B derivation analogous to derivation of � : B A ⊲ c B = B + A ⊲ ′ c B : A B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 12 / 20
Functional reactive programming and intuitionistic temporal logic 1 Logical operators 2 Inference rules 3 Conclusions and outlook 4 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 13 / 20
Map judgment application under ⊲ ′′ : A ⊢ A ′ B ⊢ B ′ (Map) A ⊲ ′′ c B ⊢ A ′ ⊲ ′′ c B ′ A ⊲ ′′ c B : A B A ′ ⊲ ′′ c B ′ : A ′ B ′ Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 14 / 20
Join elimination of right nesting: (Join) A ⊲ ′′ c ( A ⊲ c B ) ⊢ A ⊲ ′′ c B A ⊲ ′′ c ( A ⊲ c B ) : A B A ⊲ ′′ c B : A B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 15 / 20
Expand introduction of left nesting: (Expand) c B ) ⊲ ′′ B A ⊲ ′′ c B ⊢ ( A ⊲ ′ A ⊲ ′′ c B : A B ( A ⊲ ′ c B ) ⊲ ′′ c B : A ⊲ ′ c B B Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 16 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 B 1 × A 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 B 1 × A 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 B 1 × A 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 A 1 × B 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 B 1 × B 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Merge merging of two ⊲ ′′ -statements: (Merge) A 1 ⊲ ′′ c 1 B 1 × A 2 ⊲ ′′ c 2 B 2 ⊢ ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R R = B 1 × A 2 + A 1 × B 2 + B 1 × B 2 A 1 ⊲ ′′ c 1 B 1 : A 1 B 1 A 2 ⊲ ′′ c 2 B 2 : A 2 B 2 ( A 1 × A 2 ) ⊲ ′′ c 1 ∩ c 2 R : A 1 × A 2 B 1 × A 2 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 17 / 20
Nontermination introduction nullary variant of Merge: (Nontermination introduction) ⊤ ⊢ ⊤ ⊲ ′′ � ⊥ ⊤ ⊲ ′′ � ⊥ : ⊤ Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 18 / 20
Functional reactive programming and intuitionistic temporal logic 1 Logical operators 2 Inference rules 3 Conclusions and outlook 4 Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 19 / 20
Conclusions and outlook conclusions: discovery of correspondence between FRP and temporal logic profits both FRP and temporal logic causality as a temporal intuitionistic concept inference rules inspired by core operations of FRP outlook: integration of our intuitionistic temporal logic and the logic of bunched implication interpretation of the resulting logic as a variant of FRP with support for side effects Wolfgang Jeltsch (Institute of Cybernetics) Intuitionistic Temporal Logic Estonian–Finnish Logic Meeting 20 / 20
Recommend
More recommend