Computational Logic Standardization of Interpretations Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic Year 2009/2010 D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 1 / 1
Satisfiability and Interpretationsp The problem F is unsatisfiable iff there is no interpretation I such that I ( F ) = t in order to check this, we should consider all models : if F is propositional with n different propositions, then there are 2 n models in a first order formula, the number of interpretations can be uncountable! it would be useful to have a subset of interpretations of F such that it contains a smaller (finite or countable) number of interpretations analyzing it is enough in order to decide the satisfiability of F such interpretations exist for every formula, and are called Herbrand interpretations D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 2 / 1
Satisfiability and Interpretationsp Jacques Herbrand (Paris, France, February 12, 1908 - La B´ erarde, Is` ere, France, July 27, 1931) PhD at ´ Ecole Normale Superieure, Paris, in 1929 joined the army in October 1929 H. universe , H. base , H. interpretation , H. structure , H. quotient Herbrand’s Theorem : actually, two different results have this name introduced the notion of recursive function worked with John von Neumann and Emmy Noether died falling from a mountain in the Alps while climbing D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 2 / 1
Satisfiability and Interpretationsp Jacques Herbrand (Paris, France, February 12, 1908 - La B´ erarde, Is` ere, France, July 27, 1931) PhD at ´ Ecole Normale Superieure, Paris, in 1929 joined the army in October 1929 H. universe , H. base , H. interpretation , H. structure , H. quotient Herbrand’s Theorem : actually, two different results have this name introduced the notion of recursive function worked with John von Neumann and Emmy Noether died falling from a mountain in the Alps while climbing not exactly like him... D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 2 / 1
Herbrand Universep Herbrand universe H ( F ) of a formula F determines the domain of interpretation of F for Herbrand interpretations consists of all terms which can be formed with the constants and functions occurring in F Herbrand universe: definition Const ( F ) = set of constant symbols in F Fun ( F ) = set of function symbols in F � Const ( F ) if Const ( F ) � = ∅ H 0 = { a } if Const ( F ) = ∅ H i +1 = { f ( t 1 , .., t n ) | t j ∈ ( H 0 ∪ .. ∪ H i ) , f / n ∈ Fun ( F ) } H ( F ) = H 0 ∪ .. ∪ H i ∪ .. is the Herbrand universe D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 3 / 1
Herbrand Universep Herbrand universe: examples F = { p ( x ) , q ( y ) } H 0 = { a } H 1 = H 2 = .. = ∅ H ( F ) = { a } F = { p ( x , a ) , q ( y ) ∨ ¬ r ( b , f ( x )) } H 0 = { a , b } H 1 = { f ( a ) , f ( b ) } H 2 = { f ( f ( a )) , f ( f ( b )) } . . . H ( F ) = { a , b , f ( a ) , f ( b ) , f ( f ( a )) , f ( f ( b )) , f ( f ( f ( a ))) , f ( f ( f ( b ))) , .. } = { f n ( a ) , f n ( b ) } n ≥ 0 D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 3 / 1
Herbrand Basep Herbrand base of F ground atom : an atom which is obtained by applying a predicate symbol of F to terms from the Herbrand universe of F the Herbrand base of F is the set of all the possible ground atoms of F Herbrand base: definition Pred ( F ) is the set of predicate symbols in F HB ( F ) = { p ( t 1 , .., t n ) | t j ∈ H ( F ) , p / n ∈ Pred ( F ) } D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 4 / 1
Herbrand Basep Herbrand base: examples F = { p ( x ) , q ( y ) } H ( F ) = { a } HB ( F ) = { p ( a ) , q ( a ) } F = { p ( a ) , q ( y ) ∨ ¬ p ( f ( x )) } H ( F ) = { a , f ( a ) , f ( f ( a )) , .. } = { f n ( a ) } n ≥ 0 HB ( F ) = { p ( a ) , p ( f ( a )) , p ( f ( f ( a ))) , .., q ( a ) , q ( f ( a )) , q ( f ( f ( a ))) , .. } = ∪ ( {{ p ( t ) , q ( t ) }| t ∈ H ( f ) } ) F = { p ( a ) , q ( y ) ∨ ¬ r ( b , f ( x )) } H ( F ) = { a , b , f ( a ) , f ( b ) , f ( f ( a )) , f ( f ( b )) , .. } = { f n ( a ) , f n ( b ) } n ≥ 0 HB ( F ) = ∪ ( {{ p ( t ) , q ( t ) , r ( t , t ′ ) }| t , t ′ ∈ H ( F ) } ) D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 4 / 1
Herbrand Interpretationsp An Herbrand interpretation of F is an interpretation I H = ( H ( F ) , I H ) on H ( F ) such that: every constant a ∈ Const ( F ) is assigned to itself: I H ( a ) = a every function symbol f / n ∈ Fun ( F ) is assigned to I H ( f / n ) = F : ( H ( F )) n �→ H ( F ), such that F ( u 1 , .., u n ) = f ( u 1 , .., u n ) ∈ H ( F ) where u i ∈ H ( F ) every predicate symbol p / n ∈ Pred ( F ) is assigned as I H ( p / n ) = P : ( H ( F )) n �→ { t , f } , such that I H ( p ( u 1 , .., u n )) = P ( I H ( u 1 ) , .., I H ( u n )) = P ( u 1 , .., u n ) ∈ { t , f } ☞ every (ground) atom of HB ( F ) has a truth value. Which one? It is not required by the definition, every interpretation decides D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Herbrand Interpretationsp Herbrand interpretations: notation An Herbrand interpretation can be represented as the set of ground atoms in HB ( F ): positive if they are interpreted as true, negative otherwise { A 1 , A 2 , A 3 , .. } HB ( F ) = I H { A 1 , ¬ A 2 , ¬ A 3 , .. } = if I H ( A 1 ) = t , I H ( A 2 ) = f , I H ( A 3 ) = f , .. Terminology the notions of Herbrand universe, base, and interpretations will often refer to a set of clauses , written as C , which can be actually the result of the standardization of a generic formula F in practice, F will be usually taken to be in clause form because we (computational logicians) are smarter than formal logicians? D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Herbrand Interpretationsp Herbrand interpretations: examples F = { p ( x ) , q ( y ) } H ( F ) = { a } , HB ( F ) = { p ( a ) , q ( a ) } there are 4 possible Herbrand interpretations: I 1 I 2 = { p ( a ) , q ( a ) } = { p ( a ) , ¬ q ( a ) } H H I 3 I 4 = {¬ p ( a ) , q ( a ) } = {¬ p ( a ) , ¬ q ( a ) } H H F = { p ( a ) , q ( y ) ∨ ¬ p ( f ( x )) } H ( F ) = { f n ( a ) } n ≥ 0 , HB ( F ) = ∪ ( {{ p ( t ) , q ( t ) }| t ∈ H ( F ) } ) there are an infinite (how many?) number of Herbrand interpretations I 1 ∪ ( {{ p ( t ) , q ( t ) } | t ∈ H ( F ) } ) = H I 2 { p ( a ) } ∪ {¬ p ( t ) | t ∈ H ( F ) \ { a }} ∪ { q ( t ) | t ∈ H ( F ) } = H I 3 { p ( t ) | t ∈ H ( F ) } ∪ {¬ q ( t ) | t ∈ H ( F ) } = . . . H D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Herbrand Interpretationsp Ground instances A ground instance of a clause is a formula, in clause form, which results from replacing the variables of the clause by terms from its Herbrand universe by means of an Herbrand interpretation, it is possible to give a truth value to a formula starting from the truth value of its ground instances Example: F = { p ( a ) , q ( b ) ∨ ¬ p ( x ) } H ( F ) = { a , b } HB ( F ) = { p ( a ) , p ( b ) , q ( a ) , q ( b ) } I H = { p ( a ) , ¬ p ( b ) , q ( a ) , ¬ q ( b ) } the first clause is true since its only instance, p ( a ), is true in I H the second clause is false since one instance, q ( b ) ∨ ¬ p ( b ), is true in I H , but the other, q ( b ) ∨ ¬ p ( a ), is false since F is the conjunction of both clauses, it is false for I H (we’ll see why) D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Herbrand Interpretationsp I H corresponding to I Given I = ( D , I ), an Herbrand interpretation I H = ( D H , I H ) corresponds to I for F if it satisfies the following condition: I ′ is a total mapping from H ( F ) to D , such that I ′ ( c ) = d if I ( c ) = d (constants) I ′ ( f ( t 1 , .., t n )) = F ( I ′ ( t 1 ) , .., I ′ ( t n )) where I ( f / n ) = F / n for every ground atom p ( t 1 , .., t n ) ∈ HB ( F ), I H ( p ( t 1 , .., t n )) = t (resp., f ) if I ( p )( I ′ ( t 1 ) , .., I ′ ( t n )) = t (resp., f ) ☞ this definition may look overly complicated, but simpler ones can be imprecise... let h 1 , .., h n be elements of H ( F ) let every h i be mapped to some d i ∈ D if p ( d 1 , .., d n ) is assigned t (resp., f ) by I , then p ( h 1 , .., h n ) is also assigned t (resp., f ) by I H [Chang and Lee. Symbolic Logic and Mechanical Theorem Proving] D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Herbrand Interpretationsp Example: F = { p ( x ) , q ( y , f ( y , a )) } , D = { 1 , 2 } I ( a ) = 2 I ( f / 2) = F / 2: F (1 , 1) = 1 F (1 , 2) = 1 F (2 , 1) = 2 F (2 , 2) = 1 I ( p / 1) = P / 1: P (1) = t P (2) = f I ( q / 2) = Q / 2: Q (1 , 1) = f Q (1 , 2) = t Q (2 , 1) = f Q (2 , 2) = t In this case, I ′ comes to be the same as I (on H ( F )) I H ( p ( a )) = I ( p ( a )) = P ( I ( a )) = P (2) = f I H ( q ( a , a )) = I ( q ( a , a )) = Q ( I ( a ) , I ( a )) = Q (2 , 2) = t I H ( p ( f ( a , a ))) = I ( p ( f ( a , a ))) = P ( F (2 , 2)) = P (1) = t . . . D. Zanardini ( damiano@fi.upm.es ) Computational Logic Ac. Year 2009/2010 5 / 1
Recommend
More recommend