Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot prove ∀x. x = x ⇒ ∀x. ∃y. x = y #1

Open
ddssff opened this issue Sep 2, 2015 · 4 comments
Open

cannot prove ∀x. x = x ⇒ ∀x. ∃y. x = y #1

ddssff opened this issue Sep 2, 2015 · 4 comments

Comments

@ddssff
Copy link
Member

ddssff commented Sep 2, 2015

> :set -XFlexibleInstances -XOverloadedStrings
> :load Data.Logic
> let f = (let (x, y) = (vt "x" :: TTerm, vt "y" :: TTerm) in ((for_all "x" ((x .=. x))) .=>. (for_all "x" (exists "y" ((x .=. y))))) :: TFormula)
> putStrLn (prettyShow f)
∀x. (¬x = x) ∨ ∀x. ∃y. x = y
> runNormal (theorem f)
False
@ddssff
Copy link
Member Author

ddssff commented Sep 2, 2015

We have these definitions:

theorem f = inconsistent <$> (.~.) f
inconsistent f = not $ satisfiable f

Here is the trace of the conversion to CNF of (.~.) f

> putStrLn (fst (runNormal (cnfTrace pPrint pPrint pPrint ((.~.) f)) :: (String, Set (Set TFormula))))
Original:
  ¬((∀x. (x = x) ⇒ ∀x. ∃y. (x = y)))
Simplified:
  ¬((∀x. (x = x) ⇒ ∀x. ∃y. (x = y)))
Negation Normal Form:
  ∀x. (x = x) ∧ ∃x. ∀y. (¬((x = y)))
Prenex Normal Form:
  ∀x. ∃x2. ∀y. ((x = x) ∧ ¬((x2 = y)))
Skolem Normal Form:
  (x = x) ∧ ¬((sKx[] = x))
Clause Normal Form:
  [[x = x]]
  [[sKx[] = x]]

@ddssff
Copy link
Member Author

ddssff commented Sep 2, 2015

> prettyCNF (runNormal (clauseNormalForm ((.~.) f)) :: Set (Set TFormula))
x = x ∧ ¬(sKx[] = x)

So if this is not satisfiable the theorem is proved - but above we see the result of theorem is False. Is this the wrong CNF? Is this actually satisfiable?

@ddssff
Copy link
Member Author

ddssff commented Sep 2, 2015

I think the problem is the way I am deciding whether clauses are satisfiable, specifically those involving skolem constants and functions.

@ddssff ddssff changed the title cannot prove ∀x. (¬(x = x)) ∨ ∀x. ∃y. (x = y) cannot prove ∀x. x = x ⇒ ∀x. ∃y. x = y Sep 3, 2015
@ddssff
Copy link
Member Author

ddssff commented Sep 8, 2015

The issue is that while it is easy to prove such a thing for a finite domain, proving it in the general case requires more sophisticated machinery, i.e. Herbrand's theorem, David-Putnam, and onwards. I will know more shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant