discrete maths Flashcards
propositional logic
a sentence declaring a fact that is either true or false
compound proposition
compound propositions are formed for other propositions using logical operators
negation (ÂŽ)
it is not the case that
conjunction (n)
the proposition that two propositions are both true else false
disjunction (v)
the proposition that either or both propositions are true
truth tables
gives the truth values of a compound proposition for all combinations of inputs
short circuit evaluation
in python some boolean operators will only execute the second condition if the first does not determine the value of the expression
exclusive or (â)
the proposition that either of the propositions are true not both
implication (=>)
the proposition of if a hypothesis then conclusion, only false if hyp true and con false
contrapositive
p => q is the logical equivalent of ÂŽq => ÂŽp
converse
p => q is not the logical equivalent of q => p
biconditional (<=>)
the proposition that both propositions have equivalent values
truthologies
a compound proposition that is always true ie p v ÂŽp
contraditions
a compound proposition that is always false ie p n ÂŽp
logical equivalence (âĄ)
compound statements are logically equivalent if they share identical truth tables
known logical equivalence rules
Commutative, ð É ð ⥠ð É ð, ð V ð ⥠ð V ð
Associative, (ð É ð) É ð ⥠ð É (ð É ð), (ð V ð) V ð ⥠ð V (ð V ð)
Distributive, ð V (ð É ð) ⥠(ð V ð) É (ð V ð), ð É (ð V ð) ⥠(ð É ð) V (ð É ð)
Identity, ð É T ⥠ð, ð V F ⥠ð
Negation, ð V ÂŽð ⥠T, ð É ÂŽð ⥠F
Idempotent, ð É ð ⥠ð, ð V ð ⥠ð
De Morgan, ÂŽ(ð V ð) ⥠Žð É ÂŽð, ÂŽ(ð É ð) ⥠Žð V ÂŽð
Double negation, ÂŽ(ÂŽð) ⥠ð
â, âĪ, â, â,
â = natural numbers (numbers used for counting)
âĪ = integers (whole numbers)
â = rational numbers (numbers that can be written as p/q)
â = complex numbers ( numbers in the form a +ib where i=sqrt(-1))
set notation - enumeration
listing all members of the set ie. A â {1,2,3,4,âĶ,n}
set notation - set builder
set is defined using variables and logical statements ie A â {x: x > 0} where x is an integer