Discrete Mathematics for Computer Scientists -- Suggested Text Notation DIT980, HT 2015 Home | Schedule | Assignments | Exercises | Exam | About Fire | Forum | TimeEdit | Links | 2014 This is a list of suggested notation to use when you are writing a text file with mathematics in it. If you feel something is missing from the list, please use the Course Forum to point this out, and possibly suggest a notation. I will then add it to the list. General math ```x1, x2, xn - x with subscripts 1, 2, n a /= b - a not equal to b a <= b - a smaller than or equal to b a >= b - a greater than or equal to b oo - infinity INF - infinity ``` Sets ```0 - empty set A U B - A union B A /\ B - A intersection B ("snitt") A `snitt` B - A intersection B ("snitt") A \ B - A difference B A -> B - functions from A to B A x B - Cartesian product of A and B 𝔹 - set of booleans {0,1} ℕ - natural numbers ℤ - integer numbers ("heltal") ℕ+, ℤ+ - positive integers ("positiva heltal") ℚ - rational numbers ℝ - real numbers A <= B - A subset of B A < B - A strict subset of B ``` Note: Please add spaces ("mellanslag") between operators and their arguments. So: write A U B and not AUB. Note: When you use x for Cartesian product, please do not use x as a variable name at the same time. Functions ```f : ℕ -> ℕ - f goes from ℕ to ℕ x |-> 2x - the function that takes x to 2x a*b - multiplication a^b - a to the power of b ("a upphöjd till b" / "potens") f . g - function composition of f and g ``` Logic ```p ^ q - conjunction p /\ q - conjunction p & q - conjunction p v q - disjunction p \/ q - disjunction p -> q - implication p <-> q - equivalence ~p - negation ("inte") not p - negation ("inte") inte p - negation ("inte") ALL x : P(x) - for all x, such that P(x) EXI x : P(x) - exists x, such that P(x) ("det finns ett x") FINNS x : P(x) - exists x, such that P(x) ("det finns ett x") ``` Note: When you use v for disjunction, please do not use v as a variable name at the same time. Sums ```SUM(i=0,n) ai - the sum of all ai for i from 0 to n oo - infinity INF - infinity ```