Skip to main content

Posts

Showing posts with the label discrete mathematics

Predicate logic explained (with examples)

What is predicate logic and how is it different from propositional logic? Consider the example: All men are mortal. Socrates was a man. Socrates is mortal. This argument can't be expressed as propositional logic. Notice the keyword "All". Propositional logic only has one variable. However the statement "All men are mortal" is a predicate. It is neither true or false. It is both depending on who the subject is also known as the predicate variable. For example, the statement "Elon Musk is a billionaire" is true, but the statement "I am a billionaire" isn't. Unless, I become one in the coming years. Predicates A predicate is a statement that contains variables and that may be true or not depending on the values of these variables. Predicate : P(x) is a color. Predicate Instantiated (Proposition) : P(red) is a color. Predicate's domain (values which x can take): {red, green, apple} You can also think of a predicate as a function. f(x) = ...

Discrete Mathematics - Inference Rules for Propositional Logic

Why do we grab an umbrella when the weather is set to be rainy for the day? How does your weather app recommend outdoor activities when the weather is sunny? It seems as simple as one plus one but these rules we use for our logical reasoning are the basis for many fields such as mathematics, computer science, philosophy, and legal reasoning.