On Interpolation and Symbol Elimination in Theory Extensions

On Interpolation and Symbol Elimination in
Theory Extensions
Viorica Sofronie-Stokkermans
University Koblenz-Landau, Koblenz, Germany
IJCAR 2016, Coimbra, 28.06.2016
1
Motivation
SMT solvers: check satisfiability/unsatisfiability
Application: Verification (e.g. Invariant checking, BMC)
1
Motivation
SMT solvers: check satisfiability/unsatisfiability
Application: Verification (e.g. Invariant checking, BMC)
More interesting: Beyond yes/no answers
• Consider parametric systems
• Infer constraints on parameters (which can be values or functions)
which guarantee that certain properties are met.
(e.g. guarantee the unsatisfiability of clauses in theory extensions)
Application: Verification/synthesis of parametric systems
[VSS 2010, 2013] use hierarchical reasoning + quantifier elimination
1
Goals
Symbol elimination
7→ Synthesis of constraints
7→ Ground Interpolation
Main idea:
• Use quantifier elimination (QE)
• If theory does not allow QE, but its model completion does
then use QE in the model completion.
• For theory extensions T0 ⊆ T0 ∪ K
Instantiation + Hierarchical reduction to reasoning in T0
+ QE in T0 or its model completion.
2
Overview
• Definitions (QE, model completions, AP, ... )
• Ground Interpolation (w.r.t. a theory T / its model completion T ∗ )
• Theory Extensions, Locality
• Symbol Elimination in Theory Extensions
• Ground Interpolation in Theory Extensions
3
Overview
• Definitions (QE, model completions, AP, ... )
• Ground Interpolation (w.r.t. a theory T / its model completion T ∗ )
• Theory Extensions, Locality
• Symbol Elimination in Theory Extensions
• Ground Interpolation in Theory Extensions
3
Definitions
T allows quantifier elimination (QE)
if for every formula φ there exists a quantifier-free formula φ∗ with
φ ≡T φ∗ .
4
Definitions
T allows quantifier elimination (QE)
if for every formula φ there exists a quantifier-free formula φ∗ with
φ ≡T φ∗ .
T is model complete if all embeddings between its models are elementary
(i.e. preserve the truth of all first-order formulae).
T allows QE ⇒ T is model complete.
4
Definitions
T allows quantifier elimination (QE)
if for every formula φ there exists a quantifier-free formula φ∗ with
φ ≡T φ∗ .
T is model complete if all embeddings between its models are elementary
(i.e. preserve the truth of all first-order formulae).
T allows QE ⇒ T is model complete.
Examples: The following theories allow QE, hence are model complete.
• Presburger arithmetic with congruence mod. n,
• Rational linear arithmetic,
• The theories of real closed fields and of algebraically closed fields,
• The theory of finite fields,
• The theory of acyclic lists in the signature {car, cdr, cons}
4
Definitions
T allows quantifier elimination (QE)
if for every formula φ there exists a quantifier-free formula φ∗ with
φ ≡T φ∗ .
T is model complete if all embeddings between its models are elementary
(i.e. preserve the truth of all first-order formulae).
T allows QE ⇒ T is model complete.
T ∗ is a model companion of T if
(i) T and T ∗ are co-theories
(ii) T ∗ is model complete.
T ∗ is a model completion of T iff (i), (ii) and (iii) hold.
(iii) for every model A of T , T ∗ ∪ ∆(A) is a complete theory.
(∆(A) is the diagram of A).
4
Ground Interpolation
T has the ground interpolation property if for every ground formulae
A(c, a)
and
B(c, b)
with A(c, a) ∧ B(c, b) |=T ⊥
there exists a ground formula I (c) such that
A(c, a) |=T I (c) and B(c, b) ∧ I (c) |=T ⊥ .
5
Ground Interpolation
T has the ground interpolation property if for every ground formulae
A(c, a)
and
B(c, b)
with A(c, a) ∧ B(c, b) |=T ⊥
there exists a ground formula I (c) such that
A(c, a) |=T I (c) and
B(c, b) ∧ I (c) |=T ⊥ .
T (with signature Σ) has the general ground interpolation property if
for every signature Σ′ disjoint from Σ and every ground Σ ∪ Σ′ -formulae
A(c, h, a, f ) and
B(c, h, b, g ) ,
with
A ∧ B |=T ∪UIFΣ′ ⊥
there exists a ground formula I (c, h), such that:
(i) all predicate, constants and function symbols from Σ′
occurring in I also occur in A and B;
(ii) A(c, h, a, f ) |=T ∪UIFΣ′ I (c, h) and B(c, h, b, g ) ∧ I (c, h) |=T ∪UIFΣ′ ⊥
5
Amalgamation
A theory T has the sub-amalgamation property (SAP) iff
M1
d❍❍
❍
A
:✈ M2
✈✈
A substructure of M1 , M2
6
Amalgamation
A theory T has the sub-amalgamation property (SAP) iff
E
E
M1
9
r
r
rr
e❑❑❑
❑
M
A
E
µ1
e▲▲▲µ2
▲
9s M2
sss
A substructure of M1 , M2
such that µ1 , µ2 embeddings and µ1 |A = µ2 |A .
6
Amalgamation
A theory T has the sub-amalgamation property (SAP) iff
E
E
M1
9
r
r
rr
e❑❑❑
❑
M
A
E
µ1
e▲▲▲µ2
▲
9s M2
sss
A substructure of M1 , M2
such that µ1 , µ2 embeddings and µ1 |A = µ2 |A .
and the strong sub-amalgamation property (strong SAP) if µ1 , µ2 , M can
be chosen s.t.:
if µ1 (m1 ) = µ2 (m2 ), then there exists an element a ∈ A s.t. m1 = m2 = a.
6
Equality Interpolating
Definition [Brutomesso, Ghilardi, Ranise 2014]
A theory T is equality interpolating iff it has the ground interpolation
property and has the property that
1 ,
for all tuples x = x1 , . . . , xn , y 1 = y11 , . . . , yn11 , z 1 = z11 , . . . , zm
1
2
2
2
2
2
2
y = y1 , . . . , yn2 , z = z1 , . . . , zm2 of constants,
and for every pair of ground formulae A(x, z 1 , y 1 ) and B(x, z 2 , y 2 ) s.t.:
A(x, z 1 , y 1 ) ∧ B(x, z 2 , y 2 ) |=T
n1 _
n2
_
yi1 = yj2
i=1 j=1
there exists a tuple of terms containing only the constants in x, v (x) =
v1 , . . . , vk such that
A(x, z 1 , y 1 ) ∧ B(x, z 2 , y 2 ) |=T
n1 _
k
_
i=1 u=1
yi1 = vk ∨
n2 _
k
_
vk = yj2
j=1 u=1
7
Ground Interpolation and Quantifier Elimination
Theorem [Brutomesso, Ghilardi, Ranise 2014]
T SAP
⇔
ground interpolation
⇔ ( Strong SAP iff equality interpolating)
T Strong SAP
⇔
T universal + QE ⇒
general ground interpolation
equality interpolating
Theorem
T universal and allows QE ⇒ T has general ground interpolation.
Proof: T allows QE ⇒ T has ground interpolation
T universal and allows QE ⇒ T equality interpolating
Then T has strong SAP, hence general ground interpolation.
8
Model Companions and Ground Interpolation
Theorem [Bacsich75, ChangKeisler]
T universal. Then T has AP ⇔ T has ground interpolation
T ∗ model companion of T
⇔ (i)T has AP iff (ii)T ∗ model completion of T
+T universal
⇒ (i), (ii) equiv to T ∗ allows QE
Theorem. Let T be a theory and T ∗ a model companion of T .
1. T universal and has ground interpolation ⇒ T ∗ allows QE.
2. T ∗ has ground interpolation ⇒ T has ground interpolation;
ground interpolants computed w.r.t. T ∗ are interpolants w.r.t. T .
3. T universal. T has ground interpolation ⇔ T ∗ has ground interpolation.
4. T ∗ allows QE ⇒ T has ground interpolation.
= T ∗.
A
A
Proof: Follows from T
9
Model Companions and Ground Interpolation
Examples of theories with ground interpolation
Theorem [Bacsich75,
ChangKeisler]
• The
pure theory of equality (model completion: the theory
of anAP
infinite
which
allows interpolation
QE).
T universal. Then T has
⇔ set,
T has
ground
∗ model completion
• of
TheTtheory⇔
of total
completion:
the theory of T
T ∗ model companion
(i)T orderings
has AP(model
iff (ii)T
+T universal
of dense total orders without endpoints,
which allows QE).
∗
⇒ (i), (ii) equiv to T
allows QE
• The theory of Boolean algebras (model completion: the
theory of atomless Boolean algebras, which allows QE).
∗ a (model
theory
of T
fields
Theorem. Let T be• aThe
theory
and
modelcompletion:
companionthe
oftheory
T . of alge-
braically closed fields, which allows QE).
1. If T is universal and has ground interpolation, then T ∗ allows QE.
2. If T ∗ has ground interpolation then so does T ;
ground interpolants computed w.r.t. T ∗ are interpolants w.r.t. T .
3. T universal. T has ground interpolation iff T ∗ has ground interpolation.
4. If T ∗ allows QE then T has ground interpolation.
= T ∗.
A
A
Proof: Follows from T
9
Model Companions and Ground Interpolation
Examples of theories with ground interpolation
Theorem [Bacsich75,
ChangKeisler]
• The
pure theory of equality (model completion: the theory
of anAP
infinite
which
allows interpolation
QE).
T universal. Then T has
⇔ set,
T has
ground
∗ model completion
TheTtheory⇔
of total
completion:
the theory of T
• of
T ∗ model companion
(i)T orderings
has AP(model
iff (ii)T
+T universal
of dense total orders without endpoints,
which allows QE).
∗
⇒a (i),
(ii)
equiv
toa T allows
QE
A
:
d
≤
∧
a
≤
c
∧
d
≤
T
=
TOrd
1
1
• The theory of Boolean algebras (model completion:
the
B : of
b≤
d ∧ b1 Boolean
6≤ c ∧ b1algebras,
≤ d1
theory
atomless
which allows QE).
∗ a (model
fields
Theorem. Let T be• aThe
and
T
model
companion
oftheory
T . of algeItheory
= theory
d1 ≤
cofobtained
by QEcompletion:
in TOrd∗ the
braically closed
fields,
x, xwhich
(d ≤allows
x ∧ xQE).
≤ c ∧ d ≤ x)
from
E
1
1
1
1. If T is universal and has ground interpolation,
then T ∗ allows
QE.
2. If T ∗ has ground interpolation then so does T ;
ground interpolants computed w.r.t. T ∗ are interpolants w.r.t. T .
3. T universal. T has ground interpolation iff T ∗ has ground interpolation.
4. If T ∗ allows QE then T has ground interpolation.
= T ∗.
A
A
Proof: Follows from T
9
Overview
• Definitions (QE, model completions, AP, ... )
• Ground Interpolation (w.r.t. a theory T / its model completion T ∗ )
• Theory Extensions, Locality
• Symbol Elimination in Theory Extensions
• Ground Interpolation in Theory Extensions
10
Local Theory Extensions
Theory extension: T0 ⊆ T = T0 ∪ K
K set of clauses axiomatizing properties of extension functions.
(Loc)
T0 ⊆ T is local, if for ground clauses G ,
T0 ∪ K ∪ G |=⊥ iff T0 ∪ K[G ] ∪ G |=⊥
Extension to Ψ-locality, where Ψ is a closure operator telling which instances
K[Ψ(G )] to consider.
11
Local Theory Extensions
Theory extension: T0 ⊆ T = T0 ∪ K
K set of clauses axiomatizing properties of extension functions.
(Loc)
T0 ⊆ T is local, if for ground clauses G ,
T0 ∪ K ∪ G |=⊥ iff T0 ∪ K[G ] ∪ G |=⊥
Extension to Ψ-locality, where Ψ is a closure operator telling which instances
K[Ψ(G )] to consider.
Hierarchical reasoning: [VS 2005]
– purify K[G ] and G
⇒ K0 ∧ G0 ∧ Def
7 definitions for terms starting with extension functions
→
– reduce to satisfiability in T0
⇒ K0 ∧ G0 ∧ Con[G ]0
11
Symbol Elimination in Theory Extensions
Π0 = (Σ0 , Pred),
T0 Π0 -theory,
ΣP parameters,
Σ ∩ (Σ0 ∪ ΣP ) = ∅
• K Π0 ∪ΣP ∪Σ-clauses, all variables also below functions in Σ1 = ΣP ∪ Σ.
• G ground clauses, T ground terms over Π0 ∪ΣP ∪Σ∪C (finite)
Step 1: K[T ] ∪ G ❀ K0 ∪ G0 ∪ Con[G ]0 =: G1 (purification, ΠC
0 clauses).
E
Step 2: G1 (c p , c f , c) ❀ xG1 (c p , c f , x)
- c f , f ∈ ΣP , where cf = f ∈ ΣP or introduced by cf := f (c1 , . . . , ck )
- c p occurring as arguments of functions in ΣP in such definitions.
- c be the remaining variables.
E
Step 3: Construct Γ1 (c p , c f ) ≡T0
xG1 (c p , c f , x) (use QE in T0 )
E
Step 4: Γ1 (c p , c f ) ❀ Γ2 (c p ) ❀ y Γ2 (y ) (cf ❀ f (c1 , . . . , ck ), cp ❀ y ).
E
A
y ΓT (y ) := ¬( y Γ2 (y )) =
A
Step 5: Negate:
y ¬Γ2 (y ).
12
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
13
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
Step 1: T0 ∪ K[G ] ∪ G ❀ T0 ∪ K0 ∪ Con0 ∪ G0 (purification)
Def = {g1 =g (c1 ), g2 =g (c2 ), f1 =f (c1 ), f2 =f (c2 ), h1 =h(c1 ), h2 =h(c2 )}
K0 ∪ Con0 ∪ G0 := {
c1 ≤ c → g1 = f1 , c2 ≤ c → g2 = f2 , c < c1 → g1 = h1 ,
c < c2 → g2 = h2 , c1 = c2 → g1 = g2 , c1 = c2 → f1 = f2 ,
c1 = c2 → h1 = h2 , c1 ≤ c2 , g1 > g2 }
13
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
Step 2: ΣP = {f , h, c}. To eliminate g we replace g1 , g2 with existentially
quantified variables z1 , z2 .
E
We obtain z1 , z2 G1 (c1 , c2 , c, f1 , f2 , h1 , h2 , z1 , z2 ) =
E
z1 , z2 (c1 ≤ c → z1 =f1 ∧ c2 ≤ c → z2 =f2 ∧ c1 =c2 → f1 =f2 ∧ c1 = c2 → h1 =h2
c < c1 → z1 =h1 ∧ c < c2 → z2 =h2 ∧ c1 =c2 → z1 =z2 ∧ c1 ≤ c2 ∧ z1 > z2 )
13
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
Step 3: After simplification followed by QE for dense total orderings
without endpoints we obtain the formula Γ1 (c1 , c2 , c, f1 , f2 , h1 , h2 )
(
(c1 ≤ c
(c1 ≤ c
(c < c1
(c < c1
∧
∧
∧
∧
c2 ≤ c
c < c2
c2 ≤ c
c < c2
∧
∧
∧
∧
c1
c1
c1
c1
≤
≤
≤
≤
c2
c2
c2
c2
∧
∧
∧
∧
f1 > f2 ∧
f1 > h2 ∧
h1 > f2 ∧
h1 > h2 ∧
c1 6= c2 ) ∨
c1 6= c2 ) ∨
c1 6= c2 ) ∨
c1 6= c2 ))
13
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
Step 4: We construct the formula Γ2 (c1 , c2 , c) from Γ1 by replacing fi by
f (ci ) and hi by h(ci ), i = 1, 2.
We obtain (after minor simplification/rearrangement for facilitating reading):
((c1 < c2 ≤ c ∧ f (c1 ) > f (c2 )) ∨ (c1 ≤ c < c2 ∧ f (c1 ) > h(c2 )) ∨
(c < c1 < c2 ∧ h(c1 ) > h(c2 )))
13
Example
T0 : dense total orderings without endpoints. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
x, y (x ≤ y → g (x) ≤ g (y )),
is monotone, e.g. satisfies Mon(g ) :
A
G = {c1 ≤ c2 , g (c1 ) > g (c2 )} is the negation of Mon(g ).
Step 5: Negate the formula obtained after Step 4.
A
A
z1 , z2 ΓT (z1 , z2 ) =
z1 , z2 [(z1 < z2 ≤ c → f (z1 ) ≤ f (z2 )) ∧
(z1 ≤ c < z2 → f (z1 ) ≤ h(z2 )) ∧
(c < z1 < z2 → h(z1 ) ≤ h(z2 ))].
13
Symbol Elimination in Theory Extensions
A
• For every model A of T0 ∪ K and
y ΓT (y ):
A
Theorem. T0 allows QE.
After Step 5 we obtain a universal Π0 ∪ ΣP -formula
xΓT (x) with:
A |= ¬G .
A
• T0 ∪ y ΓT (y ) ∪ K ∪ G is unsatisfiable.
Theorem. If T0 ⊆ T0 ∪ K local [K is flat and linear] and
partial models can be completed to total ones with same support then
A
y ΓG (y ) is the weakest among the univ. formulae Γ with T0 ∪ Γ ∪ K ∪ G |=⊥.
(is entailed by every such formula Γ).
14
Symbol Elimination in Theory Extensions
T0 has a model completion with T0 ⊆ T0∗ such that:
(i) every model of T0 ∪ K embeds into a model of T0∗ ∪ K, and
(ii) T0∗ allows quantifier elimination.
A
Theorem. After Step 5 we obtain a universal Π0 ∪ ΣP -formula xΓT (x) with:
A
• For every model A of T0 ∪ K and
y ΓT (y ):
A |= ¬G .
A
• T0 ∪ y ΓT (y ) ∪ K ∪ G is unsatisfiable.
A
In this case we cannot guarantee that y ΓG (y ) is the weakest set of
constraints in the set of all Γ with T0 ∪ Γ ∪ K ∪ G |=⊥.
15
Example
T0 : theory of total orderings. ΣP = {f , h, c} and Σ = {g }.
A
A
K := { x(x ≤ c → g (x) = f (x)), x(c < x → g (x) = h(x))}.
Task: Generate constraints on parameters (f , h, c) which ensure that g
is monotone, e.g. satisfies Mon(g ) :
x, y (x ≤ y → g (x) ≤ g (y )),
A
T0∗ theory of dense total orders without endpoints.
(i) every model of T0 ∪ K embeds into a model of T0∗ ∪ K, and
(ii) T0∗ allows quantifier elimination.
A
The formula z1 , z2 ΓT (z1 , z2 ) constructed before ensures that g is
monotone also in this case.
16
Ground Interpolation in Theory Extensions
• [VSS 2006, 2008] Identify classes of local extensions in which ground
interpolants can be computed hierarchically.
• [Totla, Wies, 2013] Link between hierarchical ground interpolation to
an amalgamability property for partial algebras.
Restriction: convexity of base theory
Here:
• Extend these results, avoiding the restriction to convex base theories.
• Explicitly point out all conditons needed for hierarchical interpolation.
• Relate symbol elimination to computation of ground interpolants.
17
Example
where K:
A
T = TOrd ∪ K
x (x≤g (y ) → f (x)≤y )
A
x (x ≤ y → g (x) ≤ g (y ))
A
x (x ≤ y → f (x) ≤ f (y ))
G =A∧B
d≤g (a) ∧ a≤c
b≤d
∧ f (b)6≤c
K[G ] ∧ Con[G ]
b ≤ g (a) → f (b) ≤ a
a ⊳ a → g (a) ⊳ g (a)
(redundant)
b ⊳ b → f (b) ⊳ f (b)
⊳∈ {≤, =}
18
Example
where K:
A
T = TOrd ∪ K
x (x≤g (y ) → f (x)≤y )
A
x (x ≤ y → g (x) ≤ g (y ))
A
x (x ≤ y → f (x) ≤ f (y ))
G =A∧B
d≤g (a) ∧ a≤c
b≤d
∧ f (b)6≤c
K[G ] ∧ Con[G ]
b ≤ g (a) → f (b) ≤ a
a ⊳ a → g (a) ⊳ g (a) (redundant)
b ⊳ b → f (b) ⊳ f (b)
⊳∈ {≤, =}
18
Example
where K:
A
T = TOrd ∪ K
x (x≤g (y ) → f (x)≤y )
A
x (x ≤ y → g (x) ≤ g (y ))
A
x (x ≤ y → f (x) ≤ f (y ))
Def
g (a) = a1
f (b) = b1
G =A∧B
d≤g (a) ∧ a≤c
b≤d
K[G ] ∧ Con[G ]
b ≤ g (a) → f (b) ≤ a
∧ f (b)6≤c
18
Example
where K:
x (x≤g (y ) → f (x)≤y )
A
A ∧ B |=T ⊥
A
T = TOrd ∪ K,
x (x ≤ y → g (x) ≤ g (y ))
A
x (x ≤ y → f (x) ≤ f (y ))
Def
G0 = A0 ∧ B0
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
K[A, B]0 ∧ Con[A, B]0
b ≤ a1 → b 1 ≤ a
(unsatisfiable)
18
Example
T = TOrd ∪ K
A ∧ B |=T ⊥
Def
A0 ∧ B 0
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
K[A, B]0 ∧ Con[A, B]0
b ≤ a1 → b 1 ≤ a
A0 ∧ B0 |= b ≤ a1
B0 |= b ≤ d
A0 |= d ≤ a1
18
Example
T = TOrd ∪ K
A ∧ B |=T ⊥
Def
A0 ∧ B 0
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
K[A, B]0 ∧ Con[A, B]0
b ≤ a1 → b 1 ≤ a
A0 ∧ B0 |= b ≤ a1
Consider new instances of K
B0 |= b ≤ d
b ≤ d → f (b) ≤ f (d)
A0 |= d ≤ a1
d ≤ g (a) → f (d) ≤ a
18
Example
T = TOrd ∪ K
A ∧ B |=T ⊥
Def
A0 ∧ B 0
K[A, B]0 ∧ Con[A, B]0
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
b≤a1 →b1 ≤a
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
b ≤ d → b1 ≤ d1
f (d) = d1
d ≤ a1 → d 1 ≤ a
A0 ∧ B0 |= b ≤ a1
Consider new instances of K
B0 |= b ≤ d
b ≤ d → f (b) ≤ f (d)
A0 |= d ≤ a1
d ≤ g (a) → f (d) ≤ a
18
Example
T = TOrd ∪ K
A ∧ B |=T ⊥
Def
A0 ∧ B 0
W (A, B) = st(A) ∪ {d, f (d)}
W (B, A) = st(B) ∪ {d, f (d)}
K[A, B]0 ∧ Con[A, B]0
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
b≤a1 →b1 ≤a
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
b ≤ d → b1 ≤ d1
f (d) = d1
d ≤ a1 → d 1 ≤ a
A0 ∧ B0 |= b ≤ a1
Consider new instances of K
B0 |= b ≤ d
b ≤ d → f (b) ≤ f (d)
A0 |= d ≤ a1
d ≤ g (a) → f (d) ≤ a
18
Example
T = TOrd ∪ K
A ∧ B |=T1 ⊥
Def
A0 ∧ B 0
(K[A, B]0 ∧ Con[A, B]0 )sep
g (a)=a1
A0 :d ≤ a1 ∧ a ≤ c
b≤a1 →b1 ≤a
f (b)=b1
B0 :b ≤ d ∧ b1 6≤ c
b ≤ d →b1 ≤ d1
f (d) = d1
d ≤ a1 →d1 ≤a
Interpolant (w.r.t. TOrd): I0 = d1 ≤ c
⇓
Interpolant (w.r.t. TOrd ∪ K) of A ∧ B:
I = f (d) ≤ c
18
W-separability
Definition [Totla & Wies 2013]
T = T0 ∪ K is W -separable if for all sets of ground clauses A and B,
T0 ∪ K ∪ A ∪ B |=⊥ iff T0 ∪ K[W (A, B)] ∪ A ∪ K[W (B, A)] ∪ B |=⊥.
Notation: W (A, B) for W (st(A), st(B)).
(TA , TB ) 7→ W (TA , TB )
“amalgamation closure”
TA and TB finite sets of ground terms ⇒ W (TA , TB ) finite set of TA -pure
ground terms; contains stK (TA )
• W is monotone and a closure operator;
• W is compatible with any map h between constants s.t. h(c1 ) 6= h(c2 )
whenever c1 ∈ st(TA ), c2 ∈ st(TB ) not shared between TA and TB .
19
W -Separability and Partial Amalgamation
Theorem [Totla, Wies 2013]
W -separability ⇒ Ψ-Locality, Ψ described with the help of W
Theorem [Totla,Wies2013] Partial W -amalgamability ⇒ W -separability.
E
E
MA
MD
8
q
q
q
f▼▼▼
▼
MC
E
hA
f▼▼▼hB
MB
8
q
qqq
total structure
partial structures; defined terms closed under W
partial substructure
20
W -Separability and Partial Amalgamation
Theorem [Totla, Wies 2013]
W -separability ⇒ Ψ-Locality, Ψ described with the help of W
Theorem [Totla,Wies2013] Partial W -amalgamability ⇒ W -separability.
Theorems
• Implication holds if we assume W -amalgamability for
partial structures with the same Π0 -reduct.
• W -separability & Interpolants contain terms in W (A, B) ∩ W (B, A)
⇒W -amalgamability for partial structures with the same Π0 -reduct.
• Interpolants can also be computed using QE (in T0 or T0∗ )
or symbol elimination
20
Conclusion
• Ground Interpolation/quantifier elimination/model completions
• Symbol elimination in theory extensions T0 ⊆ T0 ∪ K.
Given: G set of ground clauses, T set of terms.
A
A
Task: Find constraint on parameters
xΓT (x) s.t. T0 ∪ K ∪ xΓT (x) ∪ G |=⊥.
• the method uses hierarchical reasoning + QE in T0
• for local theory extensions obtain weakest conditions
• the method can be used also for theories that do not allow QE
provided they have a model completion that has QE.
• Hierarchical interpolation in local theory extensions
21