Many-sorted logic Jouko Väänänen 1, 2 1 Department of Mathematics and Statistics, University of Helsinki 2 Institute for Logic, Language and Computation, University of Amsterdam January 2014 Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 1 / 114
46
Embed
Many-sorted logic - Helsingin yliopisto · Many-sorted logic Jouko Väänänen1;2 1Department of Mathematics and Statistics, University of Helsinki 2Institute for Logic, Language
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Many-sorted logic
Jouko Väänänen1,2
1Department of Mathematics and Statistics, University of Helsinki
2Institute for Logic, Language and Computation, University of Amsterdam
January 2014
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 1 / 114
Introduction
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 2 / 114
Many-sorted logic MSL
Several “sorts" of variableselements and sequences of elementsvector spaces: scalars and vectorsgeometry: points and linessecond order logic: individuals and subsets.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 3 / 114
Many-sorted logic
Can be translated into one-sorted logicMany-sorted version of a theorem is sometimes more powerfulthan the single sorted version.Craig Interpolation Theorem.Applications of the many-sorted interpolation theorem.Applications to “symbiosis" between set theory and model theory.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 4 / 114
Single sorted logic
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 5 / 114
DefinitionAn ordinary single sorted first order structure (model)
M = (M,R1, . . . ,Rm, f1, . . . , fk , c1, . . . , cl)
consists of1 Universe M 6= ∅2 Relations R1, . . . ,Rm between elements of the universe3 Functions f1, . . . , fk between elements of the universe4 Distinguished constants c1, . . . , cl in the universe.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 6 / 114
where ...
Ri ⊆ M × ...×M
fi : M × ...×M → M
ci ∈ M
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 7 / 114
Syntax in single sorted logic
t = t ′
Rt1...tn¬φ∧n φn∨n φn
∃xiφ
∀xiφ
In second order logic add
∃X mi φ where X m
i is m-ary
∀X mi φ where X m
i is m-ary
In monadic second order logic m = 1.Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 8 / 114
Semantics in single sorted logic
Assignments v intoM are functions on voc(L)-variables such thatv(xi) ∈ M for each xi . Modified assignment v(a/xi) as usual.
DefinitionFirst order logic:M |=v ∃xiφ ⇐⇒ M |=v(a/xi ) φ for some a ∈ M.M |=v ∀xiφ ⇐⇒ M |=v(a/xi ) φ for all a ∈ M.
Second order logic:M |=v ∃X m
i φ ⇐⇒ M |=v(A/X mi ) φ for some A ⊆ Mm.
M |=v ∀X mi φ ⇐⇒ M |=v(a/X m
i ) φ for all A ⊆ Mm.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 9 / 114
Semantics in single sorted logic
Assignments v intoM are functions on voc(L)-variables such thatv(xi) ∈ M for each xi . Modified assignment v(a/xi) as usual.
DefinitionFirst order logic:M |=v ∃xiφ ⇐⇒ M |=v(a/xi ) φ for some a ∈ M.M |=v ∀xiφ ⇐⇒ M |=v(a/xi ) φ for all a ∈ M.
Second order logic:M |=v ∃X m
i φ ⇐⇒ M |=v(A/X mi ) φ for some A ⊆ Mm.
M |=v ∀X mi φ ⇐⇒ M |=v(a/X m
i ) φ for all A ⊆ Mm.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 9 / 114
Many sorted logic: its structures
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 10 / 114
consists of1 Universes (“sorts") M1, . . . ,Mn, each 6= ∅2 Relations R1, . . . ,Rm between elements of the universes3 Functions f1, . . . , fk between elements of the universes4 Distinguished constants c1, . . . , cl in the universes.
We callM n-sorted. M is “strict" if the Mi are disjoint, otherwise “lax".We allow n = 0, i.e. “no sorts" as a special case.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 11 / 114
if1 M ′i ⊆ Mi for i = 1, ...,n2 R′i (a1, ...,as) ⇐⇒ Ri(a1, ...,as) for a1, ...,as ∈
⋃ni=1 M ′i
3 f ′i (a1, ...,as) = fi(a1, ...,as) for (a1, ...,as) ∈ dom(f ′).4 c′i = ci
ThenM′ is a substructure ofM.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 27 / 114
Neither extension nor substructure...
DefinitionA Chu transform between Chu spaces (A,X ,R) and (A′,X ′,R′) is apair h,g of mapping such that
1 h : A→ A′
2 g : X ′ → X3 ∀a ∈ A∀x ′ ∈ X ′(R′(h(a), x ′)↔ R(a,g(x ′)))
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 28 / 114
Chu transforms
Example
Transforming (monadic) second order logic into first order logic:A sentences of single sorted monadic second order logicX single sorted structures (M, ...)R truthA′ sentences of 2-sorted first order logicX ′ second order domain (P(M),M,∈, ...)R′ truthh translation of A into A′
g the first order partwhere
h(∃xiφ) = ∃x0i h(φ),h(∃X 1
i φ) = ∃x1i h(φ)
g((P(M),M,∈, ...)) = (M, ...)
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 29 / 114
Chu transforms
ExampleContinuous maps in topology:
A topological spaceX its topologyR elementhoodA′ topological spaceX ′ its topologyR′ elementhoodh continuous mapping A→ A′
g g(U) = {a ∈ A : f (a) ∈ U} i.e. preimageitem Now a ∈ g(U) ⇐⇒ h(a) ∈ U.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 30 / 114
Chu transforms
ExampleImportant special case: A ⊆ A′, X ′ ⊆ X , h = g = id .
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 31 / 114
Relations, functions, and constants which are not meaningful are atthe same time dropped. Respectively then,M is an expansion ofM′.A reduct may also have the same sorts but fewer relations, etc.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 32 / 114
ExampleReducts of a vector space (F ,V ,+, ·,0):
The scalar field: F = (F ,+F .·F ,0F ,1F )
The vector addition group: (V ,+,0)
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 33 / 114
ExampleReducts of a second order domain (P(M),M,∈, ...):
The first order part: (M, ...)
The second order part: (P(M),M,∈)
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 34 / 114
ExampleA reduct of the database
R:John male IV 2500 MaryMary female V 2600 PaulLaura female II 2500 Mary
is not obtained by forgetting (e.g.) the number-sort:
John male IV MaryMary female V PaulLaura female II Mary
This is a completely new relation, a so-called projection (not reduct) ofthe original. In a reduct the entire relation R would drop out.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 35 / 114
ExampleA reduct of the two table (relation) relational database
R1:John male D MaryMary female E PaulLaura female B Mary
R2:
A 1000B 1300C 1500D 2500E 2600
obtained by forgetting the number-sort is
John male D MaryMary female E PaulLaura female B Mary
Relation R2 drops out as it uses the abandoned number-sort.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 36 / 114
DefinitionA single sorted reduct of a many sorted L-structure
M = ({Ms : s ∈ sort(L)},R1, . . . ,Rm, f1, . . . , fk , c1, . . . , cl)
to an L′ = {s}, where s ∈ sort(L). Relations, functions, and constantswhich are not meaningful are dropped.
Sometimes the single sorted reducts determine the many sortedstructure, but usually not (because the single sorted reducts disregardthe interaction between sorts.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 37 / 114
Fundamental translation
DefinitionThe fundamental translation of a relational many-sorted structure
From the single sortedM∗ the originalM can be readily recovered.We have left function symbols out because there is no satisfactory wayto extend functions from individual sorts to the union of all sorts.Anyway, functions can be transformed to relations and then there is noproblem.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 38 / 114
For vector spaces we could define the fundamental translation({F ,V},+,0)∗ = (F ∪ V ,F ,V ,+,0) by letting the value of thefunctions +F , ·F ,+V and ·V to be 0 whenever they are notcanonically defined.Note: M �M∗
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 39 / 114
Syntax and semantics of many sorted logic
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 40 / 114
DefinitionThe vocabulary L = voc(M) of a many-sorted structure (model)
No variables ranging over “everything"! No variables ranging overelements of two different sort s (but this can be arranged by having anew sort for the “union").
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 43 / 114
DefinitionSuppose L is a many sorted vocabulary. The L-terms are defined asfollows:
1 Constants c in L are L-terms and s(c) is already defined.2 L-variables xs are L-terms and s(xs) = s.3 If t1, ..., tn are L-terms with si = s(ti) and f ∈ L with
s(f ) = 〈s1, . . . , sn, s〉, then ft1...tn (or f (t1, ..., tn)) is an L-term ands(ft1...tn) = s.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 44 / 114
Syntax
t = t ′
Rt1...tn¬φ∧n φn∨n φn
∃xsφ∀xsφ
Strict many-sorted logic: we allow t = t ′ only ifs(t) = s(t ′).Lax many-sorted logic: we allow t = t ′ for allterms.
Jouko Väänänen (Helsinki and Amsterdam) Many-sorted logic January 2014 45 / 114