DOC PREVIEW
Stanford CS 157 - Lecture 15 - Equality III

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computational Logic CS157Equality IIISelene Makarios(docet pro Mike Genesereth) Autumn 20051Computational Logic EQUALITY IIIPreprocessing - ReviewCollect all the functions and predicates in our theory. Re-place = with E , and add the formulas∀(x )(E (x , x ))∀(x , y)(E (x , y) → E (y, x ))∀(x , y, z )(E (x , y) ∧ E (y, z ) → E (x, z ))Also add the monotonicity formulas∀(x1, ..., xn, x , y)(E (x , y) → E (f (x1, ..., x , ..., xn), f (x1, ..., y, ..., xn)))and∀(x1, ..., xn, x , y)(E (x , y) → (P(x1, ..., x , ..., xn) ↔ P(x1, ..., y, ..., xn)))22Computational Logic EQUALITY IIISidebarInstead of writing E (x , y), let’s replace x = y using a spe-cial new symbol ‘A’, that kind-of looks like ‘=’, but xAyreally just means E(x, y). (Now we can use infix.) Pre-processing, then, involves creating the formulas∀(x )(xAx )∀(x , y)((xAy) → (yAx ))∀(x , y, z )((xAy) ∧ (yAz ) → (xAz ))and the monotonicity formulas∀(x1, ..., xn, x , y)((xAy) → (f (x1, ..., x , ..., xn)Af (x1, ..., y, ..., xn)))and∀(x1, ..., xn, x , y)((xAy) → (P(x1, ..., x , ..., xn) ↔ P(x1, ..., y, ..., xn)))33Computational Logic EQUALITY IIISidebar – Help Name Our New Symbol!In the literature of computational logic, the symbols ‘'’and ‘≈’ (approximately equals), and sometimes ‘.=’ (con-vergently equals), are often used to denote various sorts ofequality-type relations other than ‘=’.We chose to employ something without an existing usage,so we’re using ‘A’, but we don’t know what to call it.1. ‘A’ is “equalz”?2. ‘A’ is “zeequal”?3. ‘A’ is “double-zorro”?4. ‘A’ is “ ”?44Computational Logic EQUALITY IIIPreprocessing - Review∀x (P(x ) → Q(h(x )))f (a) = g(b, c)∀x (R(x ) → h(x ) = g(x , f (x )))à∀x (P (x ) → Q(h(x ))) (f (a)Ag(b, c))∀x (R(x ) → (h(x )Ag(x , f (x )))) ∀x (xAx )∀(x , y)((xAy) → (yAx )) ∀(x , y, z )((xAy) ∧ (yAz ) → (xAz ))∀(x , x0)((xAx0) → (f (x )Af (x0))) ∀(x , x0, y)((xAx0) → (g(x , y)Ag(x0, y)))∀(x , y, y0)((yAy0) → (g(x , y)Ag(x , y0))) ∀(x , x0)((xAx0) → (h(x )Ah(x0)))∀(x , x0)((xAx0) → (P(x ) ↔ P(x0))) ∀(x , x0)((xAx0) → (Q(x ) ↔ Q(x0)))∀(x , x0)((xAx0) → (R(x ) ↔ R(x0)))Theory becomes substantially larger.55Computational Logic EQUALITY IIIPreprocessing - ReviewAdd a new equation to our theory for each function symboland each predicate symbol, per each function or predicateargument.That is, very roughly speaking, the size of the resultingtheory is proportional to the size of the vocabulary.Bad for small theories over large vocabularies.Might be okay for large theory over small vocabulary (butin practice no-one handles equality this way).Surprise: There are other ways of “eliminating equality”that can be very effective. (Competitive Model-Eliminationsystems... E-SETHEO?)66Computational Logic EQUALITY IIIThe 2005 CADE ATP System CompetitionThe World Championship for 1st Order Automated Theorem ProvingMIX Vampire E-SETHEO E Vampire EP Gandalf Gandalf DCTP6 csp03 0.8 5 0.8 c-2.6 c-2.6-PRF 10.2pAttempted 140 140 140 140 140 140 140 140Solved 120 119 113 113 113 102 79 72Av. Time 65.64 34.65 20.91 23.08 25.35 67.75 30.94 43.28Solutions 120 0 0 113 110 0 79 0EPR DCTP Gandalf E-SETHEO E-SETHEO DCTP Paradox Vampire E1.3-EPR c-2.6-SAT csp02 csp03 10.2p 1.0-casc 6 0.8Attempted 70 70 70 70 70 70 70 70Solved 66 61 57 57 55 48 47 47Av. Time 95.83 248.13 24.95 71.19 47.36 60.71 49.7 80.74Solutions 0 0 0 0 0 26 32 0UEQ Waldmeister Waldmeister E E-SETHEO Vampire Gandalf CiME Otter702 703 0.8 csp03 6 c-2.6 2.01 3.2Attempted 70 70 70 70 70 70 70 70Solved 56 56 53 52 48 45 21 11Av. Time 6.89 6.95 26.36 45.73 52.58 73.29 93.86 44.09Solutions 56 56 0 0 48 0 0 117Computational Logic EQUALITY IIIEliminating Equality• In our original preprocessing procedure, we “eliminatedequality” by accounting for each of the five properties ofequality, strictly through the addition of new formulasthat manifest those properties.• A different preprocessing approach accounts for the var-ious properties of equality by modifying the existing equa-tions, rather than adding more equations.88Computational Logic EQUALITY IIIEliminating Equality – FlatteningWe can account for monotonicity by “flattening”:A formula is “flat” when all proper subterms in the formulaare variables (i.e. not constants, or more complex terms):P(x , y) ∨ (f (x ) = y) flat?P(x , y) ∨ (w = a) ∨ (f (x ) = w) flat?f (a) 6= g(a) flat?(f (w) 6= g(w)) ∨ (a 6= w) flat?99Computational Logic EQUALITY IIIEliminating Equality – FlatteningP(x , y) ∨ (f (x ) = y) XP(x , y) ∨ (w = a) ∨ (f (x ) = w) Xf (a) 6= g(a) ×(f (w) 6= g(w)) ∨ (a 6= w) XWe can “flatten” a formula by introducing new variables:(f (a) 6= g(a)) à (z = a) → (f (z ) 6= g(z ))(i(x ) ∗ x = e) à (i(x ) = z ) → (z ∗ x = e)(i(x ) ∗ i(x ) = i(x ∗ x )) à(i(x ) = z1) ∧ (x ∗ x = z2) → (z1∗ z1= i(z2))P(f (g(h(a)))) à(g(z2) = z1) ∧ (h(z3) = z2) ∧ (z3= a) → P(f (z1))1010Computational Logic EQUALITY IIIEliminating Equality – FlatteningImportant: when we flatten, for example like thisP(f (a)) à (a 6= z ) ∨ P(f (z )) ,note that the resulting formula is not logically equivalentto the original one, i.e.,P(f (a)) . (a 6= z ) ∨ P(f (z )) !But that’s okay, because it doesn’t need to be. Since we(generally) are seeking proof by contradiction, all we needis for the original formula, and the flattened formula, to beco-consistent/co-satisfiable, i.e. each one is satisfiable ifand only if the other one is.1111Computational Logic EQUALITY IIIEliminating SymmetryEach equality s = t produces the two symmetric variantsof sAt:C ∨ (s = t) à C ∨ (sAt)C ∨ (s = t) à C ∨ (tAs)Example:R(g(x , y)) ∨ (x = y) àR(g(x , y)) ∨ (xAy)R(g(x , y)) ∨ (yAx )1212Computational Logic EQUALITY IIIEliminating TransitivitySuppose we have a theory including{(s1As2), (s2As3), (s3As4)} ,and we wish to prove (s1As4). Transitivity would entailthis for analogous formulas with =, but we need to some-how manifest the transitivity property forA.Idea: rewriteC ∨ (sAt) à C ∨ ((tAx ) → (sAx ))andC ∨ (sA/ t) à C ∨ ((tAx ) → (sA/ x ))if t is not already a variable. (Question: are the left andright sides of these transformation logically equivalent?)1313Computational


View Full Document

Stanford CS 157 - Lecture 15 - Equality III

Documents in this Course
Lecture 1

Lecture 1

15 pages

Equality

Equality

32 pages

Lecture 19

Lecture 19

100 pages

Epilog

Epilog

29 pages

Equality

Equality

34 pages

Load more
Download Lecture 15 - Equality III
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 15 - Equality III and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 15 - Equality III 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?