TU Wien:Logic and Computability VU (Ciabattoni)/Oral Exam Questions 2022SS

Aus VoWi
Zur Navigation springen Zur Suche springen

Logic and Computability[Bearbeiten | Quelltext bearbeiten]

Ciabattoni[Bearbeiten | Quelltext bearbeiten]

Classical Logic[Bearbeiten | Quelltext bearbeiten]

Compactness Theorem[Bearbeiten | Quelltext bearbeiten]

Soundness and Completeness of the Propositional Sequent Salculus[Bearbeiten | Quelltext bearbeiten]
  • Soundness:
    • We want to check that Axiom is valid in classical logic and the inference rules of preserve validity.
    • Axiom is valid since is trivially valid. Structural rules (Weakening, Contraction; Permutation) also trivial.
    • For logical rules investigate interpretation s.t. all take value and all in value , other cases are trivial.
  • Completeness:
    • We can show that the calculus rules preserve validity when applied bottom up (similarly to soundness proof). Additionally, when applying rules bottom up the number of connectives will decrease and thus in a finite amount of steps we will reach sequents only containing atomic rules. If a formula , then can be derived from using weakening rules.
Completeness of the Sequent Calculus for first-order Classical Logic[Bearbeiten | Quelltext bearbeiten]
  • We use the proposed proof search algorithm which ensures that all variables introduced in and do not appear free in the conclusion and for and all terms are potentially considered. If our algorithm finds a proof we are done, if not either:
    • one of the leafs is not an axiom
      • then we can define an interpretation based on the contained atomic formulas.
    • there is an infinite branch
      • this means the left and right side of the sequent have to be disjoint.
      • we can then construct an interpretation from the infinite branch
      • ?????
Löwenheim-Skolem Theorem[Bearbeiten | Quelltext bearbeiten]

Overspill Lemma[Bearbeiten | Quelltext bearbeiten]

- where represents the formula

Reachability Problem (non-expressibility in first-order logic)[Bearbeiten | Quelltext bearbeiten]

Computability Theory[Bearbeiten | Quelltext bearbeiten]

Non Existence of an Algorithm for each (decision) Problem[Bearbeiten | Quelltext bearbeiten]
  • Each decision problem can be seen as a function
    • Each algorithm computes a function
    • algorithms operate on various objects but we can encode them into
  • is uncountable
  • There are only countably many algorithms
    • There are algorithms
      • Let be a formal system which describes algorithms
      • Let be the set containing all algorithms in
      • Each algorithm in computes a function
      • Alphabet of has a finite number of symbols
      • A bijection can now be built between and by ordering the algorithms first according to the number of symbols and then lexicographically
Undecidability of the Halting Problem[Bearbeiten | Quelltext bearbeiten]

Enumeration and s-m-n Theorem (intuitive proofs)[Bearbeiten | Quelltext bearbeiten]

Fixed Point Theorem for computable Functions[Bearbeiten | Quelltext bearbeiten]

Each Recursive Set is R.E.[Bearbeiten | Quelltext bearbeiten]

Post Theorem[Bearbeiten | Quelltext bearbeiten]

Equivalence between R.E. Sets and semi-decidable sets[Bearbeiten | Quelltext bearbeiten]

  • I r.e. s.t. and s.t. is
    • h(x) := …
      • is g(0) = x?
      • is g(1) = x?
  • I semi-decidable total computable s.t. , where .
  • Let and s.t.
    • if then is r.e. by definition
    • otherwise there . Using dovetailing
      • x if in n steps
      • k otherwise
Rice Theorem[Bearbeiten | Quelltext bearbeiten]

Fermüller[Bearbeiten | Quelltext bearbeiten]

Automated Deduction[Bearbeiten | Quelltext bearbeiten]

Why is Herbrand’s Theorem important for automated deduction?[Bearbeiten | Quelltext bearbeiten]
  • A universal prenex formula is unsatisfiable iff there exists a finite unsatisfiable set of instances of the quantifier-free .
  • Allows for instantiation of FOL formulas, these can then be treated like propositional formulas.
    • thus it provides a complexity reduction which is the base of automated deduction procedures
On what principles are state-of-the-art provers for first-order logic based?[Bearbeiten | Quelltext bearbeiten]
  • unification: compute most general unifiers
  • atomic cut: propositional resolution rule (cut atom and its negation)
Can there be a computable function that bounds the size of the search space of a first-order prover in terms of the size of the input (formulas of set of clauses)? (Explain!)[Bearbeiten | Quelltext bearbeiten]
  • No:
    • then we would have a decision procedure (finite search space) and we know that validity of first order formulas is only semi-decidable.
    • if yes, we could limit the search space to a finite space which would make it decidable (i.e. FOL would no longer be undecidable)
What is the idea of structural clause forms? What can be gained (relative to traditional clause form translation) in terms of size of clause forms, minimal refutations, and search space, respectively?[Bearbeiten | Quelltext bearbeiten]
  • Introduce new predicate for each subformula, validity preserving
  • Gain: only constant number of clauses for each subformula (usually worst case exponential), sometimes smaller refutations, larger search space since more variables (but smaller formulas at the same time)
What does ‘most general unification’ mean? Why is it so important for automated deduction? How does it occur there? Can it be implemented efficiently?[Bearbeiten | Quelltext bearbeiten]
  • Generality:
    • We say is more general than if s.t. holds.
    • A substitution is more general than if expressions , is more general than .
    • is a mgu of if is a unifier of and is more or equally general than any other unifier of .
  • Importance:
    • Yes, as we do not spoil future resolutions when applying them.
  • Efiiciency
    • Yes, shown by Robinson and Martelli.
In what sense is Robinson resolution complete and sound?[Bearbeiten | Quelltext bearbeiten]
  • It is refutationally sound and complete, i.e.
    • if a formula is unsat, then we will be able to resolve to the empty clause
Why does one have to speak of refutational completeness? What exactly does this mean?[Bearbeiten | Quelltext bearbeiten]
  • Since binary/robinson resolution is not complete for satisfiable formulas
  • if a formula is unsat, then we will be able to resolve to the empty clause
Why is binary resolution not complete in general? Can you give an example?[Bearbeiten | Quelltext bearbeiten]

Why is binary resolution not complete in general?

Because we cannot apply factoring/renaming.

Can you give an example?

Yes, take two clauses and such that and . We can use binary resolution to unify the first two literals of and , but we need something more to get rid of the literal .

What is factorisation? Why is it needed?[Bearbeiten | Quelltext bearbeiten]
  • A p-reduction on a G-instance of a clause.
    • This means a smaller formula resulting in leaving out redundant literals after a renaming of a clause.
What is a semantic tree? How can we use it to prove completeness of resolution refinements and of redundancy elimination mechanisms (e.g., tautology elimination and subsumption)?[Bearbeiten | Quelltext bearbeiten]
  • Represents all Herbrand interpretations of a clause set , where each branch induces an assignment of truth values to the herbrand base of .
  • ???
  • Things that wont fail at any node of the tree can be removed from the set.
Why does one have to consider refinements (like A-orderings) in practice?[Bearbeiten | Quelltext bearbeiten]
  • This speeds up search.
  • Since the number of resolvents grows exponentially, pruning possibilities is helpful.
Why is quantifier scope minimisation significant (in theory and) in practice?[Bearbeiten | Quelltext bearbeiten]
  • ???

Intuitionistic Logic/Constructivism[Bearbeiten | Quelltext bearbeiten]

What is the basic difference between constructive and classical reasoning?[Bearbeiten | Quelltext bearbeiten]
  • constructive:
    • focus on verification, we can only assert truth after
    • epistemic (valid = invariantly known)proving/verifying it
  • classical:
    • every statement is assumed to be either true or false
    • ontological (valid = invariantly true)
What is the (effective) disjunction principle? How does it relate to constructive existence?[Bearbeiten | Quelltext bearbeiten]
  • We can only assert once we have proved either or
  • A proof of existence of an object has to inform us on how to construct the object.
  • We can translate it to constructive existence.
Brouwer claimed that mathematics is more fundamental than logic. Which consequences/analogues can we formulate computer science? (Explain!)[Bearbeiten | Quelltext bearbeiten]
  • When investigating underlying logic one should derive logic from underlying principles and not other way around.
  • Analysing programs:
    • first investigate what should be accepted asa good analysis of a model and then look at what that means for a good underlying logic
Why are intuitionistic proofs useful for programming? What is the Curry-Howard correspondence? Which types of programming languages are based on this relation?[Bearbeiten | Quelltext bearbeiten]
  • Because an intuitionistic proof delivers a process for constructing an object (i.e. using a program).
    • States that there mathematical proofs and computer programs are equivalent. (They represent the same kind of mathematics objects.)
    • A proof is a program and the formula it proves is the type for the program.
    • Functional languages
What does the Collatz (3n +1 problem) example illustrate?[Bearbeiten | Quelltext bearbeiten]
  • It is a conjecture which is widely accepted to be true, while no one has found a proof for its truth as of yet.
    • Halve even numbers, for odd: triple and then plus one and you will always end up at one for arbitrarily large integers.
  • Very easily specifiable program which could not yet be verified, also interesting in terms of incompleteness.
What is the idea of BHK semantics? Explain the meaning of logical connectives and quantifiers according to that interpretation.[Bearbeiten | Quelltext bearbeiten]
  • An interpretation in BHK semantics defines how to prove a given formula.
  • A connective is defined according to how you prove it.
  • Provides semantics for IL.
Explain why tertium non datur is constructively unsound.[Bearbeiten | Quelltext bearbeiten]
  • Because the absence of a proof of a formula does not necessitate the existence of a proof for its negation.
Is ex falso quodlibet constructively sound? Why?[Bearbeiten | Quelltext bearbeiten]
  • Yes. If we can prove an inconsistency i.e. prove a formula as well as its negation, we can derive anything from this.
Can you name a few other classically valid formulas that are not intuitionistically valid?[Bearbeiten | Quelltext bearbeiten]

Modal Logic[Bearbeiten | Quelltext bearbeiten]

What is the basic idea of modal logic? What does ‘modal’ mean here?[Bearbeiten | Quelltext bearbeiten]
  • Developed in order to represent necessity and possiblity.
  • The mode of assertion.
Why are there so many different modal logics?[Bearbeiten | Quelltext bearbeiten]
  • They allow modal logics to be applied in various different concepts, i.e. deontic, epistemic or temporal.
Can you name a few different possible interpretations of the Box-operator? Can you name different application scenarios in computer science where there interpretations are useful?[Bearbeiten | Quelltext bearbeiten]
  • temporal: always holds, talking about consistency of a system
  • deontic: obligation, when trying to define AI for use in law
  • epistemic: knows, when reasoning about knowledge of agents?
Can you derive the informal meaning of Diamond, given the informal meaning of Box? Why and how? (Illustrate with concrete examples)[Bearbeiten | Quelltext bearbeiten]
  • Yes, it is .
What is a Kripke frame? What is a Kripke interpretation?[Bearbeiten | Quelltext bearbeiten]
  • They are a version of possible world semantics.
    • Frame:
    • Interpretation:
What four levels of truth can be distinguished in modal logic?[Bearbeiten | Quelltext bearbeiten]
  • Truth in a world:
  • Truth in a model:
  • Truth in a frame:
    • is valid in if is true in all interpretations of
  • Truth in a class of frames: is true in if - where is a class (set) of frames
How does one specify a specific normal modal logic semantically?[Bearbeiten | Quelltext bearbeiten]
  • Using classes of frames determined by properties of the accessibility relation
Explain the purely syntactic notion of a ‘logic’. Why is it useful?[Bearbeiten | Quelltext bearbeiten]
  • A set of formulas which is:
    • closed under substitutions
    • closed under modus ponens
  • I can compare different axiom schemes, different derivation rules, different Hilbert-type systems arising from either adding or removing certain axioms. So we can compare those logics then in the most basic way, namely in the ways of set inclusion. Is the one contained in the other or are they incomparable sets? That’s what we often want to know about logics.
What is the necessitation rule? Why is it sound?[Bearbeiten | Quelltext bearbeiten]
  • we can derive from
  • can be read like MP, if can be derived so can
  • since we are in Hilbert system there are no assumptions, thus you can only derive tautologies
Why is the deduction theorem (in it’s usual form) not valid for usual modal logics?[Bearbeiten | Quelltext bearbeiten]
  • We can always derive from , but
  • does not hold in general
    • Counterexample: interpretation and

Incompleteness[Bearbeiten | Quelltext bearbeiten]

How does Smullyan’s Gödelian puzzle relate to the incompleteness theorem(s)?[Bearbeiten | Quelltext bearbeiten]
  • Because the statement “I am not a knight” can neither be shown to be true or false in the given “system”.
Why do we need to use two different signs for natural numbers? What is the difference?[Bearbeiten | Quelltext bearbeiten]
  • To differentiate between the domain of the natural numbers and the structure of the natural numbers
    • … set of natural numbers
    • … structure of natural numbers
What is the difference between incompleteness in the sense of Theorem GT and Gödel-incompleteness?[Bearbeiten | Quelltext bearbeiten]
  • GT: If is sound and expressible in it, then is incomplete.
  • Gödel-incompleteness: If is sound and is expressible then is Gödel incomplete.
  • Difference: Gödel incomplete refers to a system containing formally undecidable sentences. (i.e. a sentence is contained neither in the provable nor refutable sentences of the system).
What is more difficult in general: deciding whether a given formula is true in all possible interpretations of whether it is true in a given concrete interpretation?[Bearbeiten | Quelltext bearbeiten]
  • In all possible interpretations, since things get more complicated when they are more concrete.
  • Gödel showed:
    • Completeness of FOL holds on general level.
    • Incompleteness of FOL in arithmetic.
What is the difference between formal undecidability in Gödel’s sense and undecidability in the sense of computability theory? Can a theory with formally undecidable sentences be decidable? Can a theory , where for each , either or be undecidable?[Bearbeiten | Quelltext bearbeiten]
  • Gödel: sentences which are neither provable nor refutable.
  • CT: sentences which we cannot decide
What is ‘true arithmetic’()? Why is it well defined? How does it compare with Peano Arithmetic ()?[Bearbeiten | Quelltext bearbeiten]
  • The set of sentences that are satisfied in model .
  • is ordinary FO-Logic plus peano axioms.
  • The set is well defined, since we have a well defined notion of the true sentences.
  • Peano: Induction axiom can only be described in second order logic or in FOL by using one axiom per predicate but
    • no. of predicates is countable
    • no. of sets of natural numbers is uncountable
    • this means we cannot describe some sets when using FOL representation
In what specific sense is arithmetical truth undefinable? Do you see a relation here with the liar paradox? In which sense is undefinability of truth different from (Gödel-)incompleteness?[Bearbeiten | Quelltext bearbeiten]

In what specific sense is arithmetical truth undefinable?

In the sense of Tarski's Undefinability Theorem, which asserts that the set is not definable in Formal Arithmetic.

Do you see a relation here with the liar paradox?

No.

In which sense is undefinability of truth different from (Gödel-)incompleteness?

If we refer to arithmetic definability specifically, then we have that a number set is arithmetically definable/expressible if for a given formula . Therefore, (arithmetic) undefinability of a number set refers to the impossibility of finding a formula that expresses , while (Gödel)-incompleteness refers to the impossibility of establishing the membership of every formula to either or .

What is the ADRF Theorem? What is the proof idea?[Bearbeiten | Quelltext bearbeiten]
  • It states that all recursive functions are arithmetically definable.
  • Church-Turing thesis: all computable functions are arithmetically definable
  • We apply induction on the possible ways of function can be built.
    • Base: projection, constant-0 and successor
    • Inductive cases: composition, primitive recursion, minimisation. Show witness formula for definability.
    • Predicates can be coded as characteristic functions
How does one arithmetically define a function / a predicate / a number set?[Bearbeiten | Quelltext bearbeiten]
  • function: n+1-ary predicate with output as last parameter
  • predicate: characteristic function
  • number set: formula takes free variable and is true iff corresponding number is in set
What is Gödel’s second incompleteness theorem? Why was it considered to be even more important than his first incompleteness theorem in 1931?[Bearbeiten | Quelltext bearbeiten]
  • If the provability predicate for a proof system is representable in and satisfies the provability conditions then is only provable if is inconsistent.
    • provability conditions: (using provability predicate describing provability)
      • then
  • Because it showed that the Hilbert problem of finding a proof of consistency using an elementary system (not stronger than arithmetic) could not be positively solved.
How are incompleteness and undecidability related? What phenomenon was shown first? By whom? Can one derive one from the other?[Bearbeiten | Quelltext bearbeiten]
  • We know every sound proof system for formal arithmetic is incomplete.
  • From the incompleteness theorem we get undecidability of as a corollary, it is complete and can thus not be decidable.
  • Undecidability came later.
  • If we can encode undecidable problem in a system and it is sound, then our system must be incomplete.
  • The other way is less immediate but can also be derived.
What is the significance of incompleteness for software verification?[Bearbeiten | Quelltext bearbeiten]
  • From incompleteness we know that there cannot be a proof system that allows verification of all programs in a reasonably rich language.
  • If you fix a proof system for establishing program correctness then there are cases which cannot be verified by the system.