diff options
-rw-r--r-- | git.html.markdown | 4 | ||||
-rw-r--r-- | matlab.html.markdown | 2 | ||||
-rw-r--r-- | rst.html.markdown | 6 | ||||
-rw-r--r-- | set-theory.html.markdown | 19 | ||||
-rw-r--r-- | smalltalk.html.markdown | 2 |
5 files changed, 27 insertions, 6 deletions
diff --git a/git.html.markdown b/git.html.markdown index aa96c90a..a40ef01b 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -82,12 +82,12 @@ pushed to other repositories, or not! ### Branch A branch is essentially a pointer to the last commit you made. As you go on -committing, this pointer will automatically update to point the latest commit. +committing, this pointer will automatically update to point to the latest commit. ### Tag A tag is a mark on specific point in history. Typically people use this -functionality to mark release points (v1.0, and so on) +functionality to mark release points (v1.0, and so on). ### HEAD and head (component of .git dir) diff --git a/matlab.html.markdown b/matlab.html.markdown index 5790bcc6..4ca31857 100644 --- a/matlab.html.markdown +++ b/matlab.html.markdown @@ -234,7 +234,7 @@ A' % Concise version of complex transpose % On their own, the arithmetic operators act on whole matrices. When preceded % by a period, they act on each element instead. For example: A * B % Matrix multiplication -A .* B % Multiple each element in A by its corresponding element in B +A .* B % Multiply each element in A by its corresponding element in B % There are several pairs of functions, where one acts on each element, and % the other (whose name ends in m) acts on the whole matrix. diff --git a/rst.html.markdown b/rst.html.markdown index 2423622e..bdc73c7a 100644 --- a/rst.html.markdown +++ b/rst.html.markdown @@ -49,9 +49,11 @@ Subtitles with dashes You can put text in *italic* or in **bold**, you can "mark" text as code with double backquote ``print()``. +Special characters can be escaped using a backslash, e.g. \\ or \*. + Lists are similar to Markdown, but a little more involved. -Remember to line up list symbols (like - or *) with the left edge of the previous text block, and remember to use blank lines to separate new lists from parent lists: +Remember to line up list symbols (like - or \*) with the left edge of the previous text block, and remember to use blank lines to separate new lists from parent lists: - First item - Second item @@ -86,7 +88,7 @@ There are multiple ways to make links: - By typing a full comprehensible URL : https://github.com/ (will be automatically converted to a link) - By making a more Markdown-like link: `Github <https://github.com/>`_ . -.. _Github https://github.com/ +.. _Github: https://github.com/ ``` diff --git a/set-theory.html.markdown b/set-theory.html.markdown index 988c4397..c6bc39c5 100644 --- a/set-theory.html.markdown +++ b/set-theory.html.markdown @@ -29,11 +29,13 @@ These operators don't require a lot of text to describe. * `Z`, the set of all integers. `{…,-2,-1,0,1,2,…}` * `Q`, the set of all rational numbers. * `R`, the set of all real numbers. + ### The empty set * The set containing no items is called the empty set. Representation: `∅` * The empty set can be described as `∅ = {x|x ≠ x}` * The empty set is always unique. * The empty set is the subset of all sets. + ``` A = {x|x∈N,x < 0} A = ∅ @@ -42,6 +44,7 @@ A = ∅ |∅| = 0 |{∅}| = 1 ``` + ## Representing sets ### Enumeration * List all items of the set, e.g. `A = {a,b,c,d}` @@ -49,6 +52,7 @@ A = ∅ ### Description * Describes the features of all items in the set. Syntax: `{body|condtion}` + ``` A = {x|x is a vowel} B = {x|x ∈ N, x < 10l} @@ -84,6 +88,7 @@ C = {2x|x ∈ N} * The number of items in a set is called the base number of that set. Representation: `|A|` * If the base number of the set is finite, this set is a finite set. * If the base number of the set is infinite, this set is an infinite set. + ``` A = {A,B,C} |A| = 3 @@ -94,6 +99,7 @@ B = {a,{b,c}} ### Powerset * Let `A` be any set. The set that contains all possible subsets of `A` is called a powerset (written as `P(A)`). + ``` P(A) = {x|x ⊆ A} @@ -103,41 +109,54 @@ P(A) = {x|x ⊆ A} ## Set operations among two sets ### Union Given two sets `A` and `B`, the union of the two sets are the items that appear in either `A` or `B`, written as `A ∪ B`. + ``` A ∪ B = {x|x∈A∨x∈B} ``` + ### Intersection Given two sets `A` and `B`, the intersection of the two sets are the items that appear in both `A` and `B`, written as `A ∩ B`. + ``` A ∩ B = {x|x∈A,x∈B} ``` + ### Difference Given two sets `A` and `B`, the set difference of `A` with `B` is every item in `A` that does not belong to `B`. + ``` A \ B = {x|x∈A,x∉B} ``` + ### Symmetrical difference Given two sets `A` and `B`, the symmetrical difference is all items among `A` and `B` that doesn't appear in their intersections. + ``` A △ B = {x|(x∈A∧x∉B)∨(x∈B∧x∉A)} A △ B = (A \ B) ∪ (B \ A) ``` + ### Cartesian product Given two sets `A` and `B`, the cartesian product between `A` and `B` consists of a set containing all combinations of items of `A` and `B`. + ``` A × B = { {x, y} | x ∈ A, y ∈ B } ``` + ## "Generalized" operations ### General union Better known as "flattening" of a set of sets. + ``` ∪A = {x|X∈A,x∈X} ∪A={a,b,c,d,e,f} ∪B={a} ∪C=a∪{c,d} ``` + ### General intersection + ``` ∩ A = A1 ∩ A2 ∩ … ∩ An ``` diff --git a/smalltalk.html.markdown b/smalltalk.html.markdown index d6d369cc..58dccae4 100644 --- a/smalltalk.html.markdown +++ b/smalltalk.html.markdown @@ -388,7 +388,7 @@ y := $A max: $B. ```smalltalk | b x y | x := #Hello. "symbol assignment" -y := 'String', 'Concatenation'. "symbol concatenation (result is string)" +y := #Symbol, #Concatenation. "symbol concatenation (result is string)" b := x isEmpty. "test if symbol is empty" y := x size. "string size" y := x at: 2. "char at location" |