notebook/notes/logic/pred-logic.md

3.5 KiB

title TARGET DECK FILE TAGS tags
Predicate Logic Obsidian::STEM logic::predicate
logic
predicate

Overview

A branch of logic that uses quantified variables over non-logical objects. A predicate is a sentence with some number of free variables. A predicate with free variables "plugged in" is a prop-logic.

%%ANKI Cloze {Predicate} logic is also known as {first}-order logic. Reference: Oscar Levin, Discrete Mathematics: An Open Introduction, 3rd ed., n.d., https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf.

END%%

%%ANKI Basic What is a predicate? Back: A sentence with some number of free variables. Reference: Oscar Levin, Discrete Mathematics: An Open Introduction, 3rd ed., n.d., https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf.

END%%

%%ANKI Basic What distinguishes a predicate from a proposition? Back: A proposition does not contain free variables. Reference: Oscar Levin, Discrete Mathematics: An Open Introduction, 3rd ed., n.d., https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf.

END%%

%%ANKI Basic How are propositions defined in terms of predicates? Back: A proposition is a predicate with 0 free variables. Reference: Oscar Levin, Discrete Mathematics: An Open Introduction, 3rd ed., n.d., https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf.

END%%

%%ANKI Basic Why is "3 + x = 12" not a proposition? Back: Because x is a variable. Reference: Oscar Levin, Discrete Mathematics: An Open Introduction, 3rd ed., n.d., https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf.

END%%

Sets

A state is a function that maps identifiers to values. A predicate can be equivalently seen as a representation of the set of states in which it is true.

%%ANKI Basic Is (i \geq 0) well-defined in \{(i, -10)\}? Back: Yes. Reference: Gries, David. The Science of Programming. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

END%%

%%ANKI Basic Is (i \geq 0) well-defined in \{(j, -10)\}? Back: No. Reference: Gries, David. The Science of Programming. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

END%%

%%ANKI Basic What predicate represents states \{(i, 0), (i, 2), (i, 4), \ldots\}? Back: i \geq 0 is even. Reference: Gries, David. The Science of Programming. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

END%%

%%ANKI Basic What is sloppy about phrase "the states in i + j = 0"? Back: i + j = 0 is not a set but a representation of a set (of states). Reference: Gries, David. The Science of Programming. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

END%%

Bibliography