-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
7,913 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import itertools | ||
|
||
def iter_primes(): | ||
# an iterator of all numbers between 2 and +infinity | ||
numbers = itertools.count(2) | ||
|
||
# generate primes forever | ||
while True: | ||
# get the first number from the iterator (always a prime) | ||
prime = numbers.next() | ||
yield prime | ||
|
||
# this code iteratively builds up a chain of | ||
# filters...slightly tricky, but ponder it a bit | ||
numbers = itertools.ifilter(prime.__rmod__, numbers) | ||
|
||
for p in iter_primes(): | ||
if p > 1000: | ||
break | ||
print(p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
makeindex general | ||
makeindex authors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
\NeedsTeXFormat{LaTeX2e}[1994/06/01] | ||
\ProvidesPackage{lathalesians-analysis}[2016/09/24 LaThalesians Analysis] | ||
|
||
% \underset, etc. | ||
\RequirePackage{amsmath} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Equality by definition | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\newcommand{\defeq}{:=} | ||
\newcommand{\eqdef}{=:} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Equivalence, limits, etc. | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\newcommand{\idwith}{\leftrightarrow} | ||
\newcommand{\tendsto}{\rightarrow} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Logical symbols | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\newcommand{\Implies}{\Rightarrow} | ||
\newcommand{\OnlyIf}{\Implies} | ||
\newcommand{\ImpliedBy}{\Leftarrow} | ||
\newcommand{\If}{\ImpliedBy} | ||
\newcommand{\Iff}{\Leftrightarrow} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Some important sets | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
% Natural numbers without specifying the 0 convention | ||
\newcommand{\N}{\mathbb{N}} | ||
% Natural numbers including 0 | ||
\newcommand{\Nz}{\mathbb{N}^0} | ||
% Nonzero natural numbers | ||
\newcommand{\Nnz}{\mathbb{N}^*} | ||
% Integers | ||
\newcommand{\Z}{\mathbb{Z}} | ||
% Positive integers | ||
\newcommand{\Zp}{\mathbb{Z}^+} | ||
% Nonnegative integers | ||
\newcommand{\Znn}{\mathbb{Z}^+_0} | ||
% Negative integers | ||
\newcommand{\Zn}{\mathbb{Z}^-} | ||
% Nonzero integers | ||
\newcommand{\Znz}{\mathbb{Z}^*} | ||
% Rationals | ||
\newcommand{\Q}{\mathbb{Q}} | ||
% Positive rationals | ||
\newcommand{\Qp}{\mathbb{Q}^+} | ||
% Nonnegative rationals | ||
\newcommand{\Qnn}{\mathbb{Q}^+_0} | ||
% Negative rationals | ||
\newcommand{\Qn}{\mathbb{Q}^-} | ||
% Nonzero rationals | ||
\newcommand{\Qnz}{\mathbb{Q}^*} | ||
% Real numbers | ||
\newcommand{\R}{\ensuremath{\mathbb{R}}} | ||
% Positive real numbers | ||
\newcommand{\Rp}{\ensuremath{\mathbb{R}^+}} | ||
% Nonnegative real numbers | ||
\newcommand{\Rnn}{\ensuremath{\mathbb{R}^+_0}} | ||
% Negative real numbers | ||
\newcommand{\Rn}{\ensuremath{\mathbb{R}^-}} | ||
% Nonzero real numbers | ||
\newcommand{\Rnz}{\ensuremath{\mathbb{R}^*}} | ||
% Extended real numbers | ||
\newcommand{\Rx}{\ensuremath{\overline{\mathbb{R}}}} | ||
\newcommand{\Rpx}{\ensuremath{\overline{\mathbb{R}}^+}} | ||
\newcommand{\Rnnx}{\ensuremath{\overline{\mathbb{R}}^+_0}} | ||
\newcommand{\Rnx}{\ensuremath{\overline{\mathbb{R}}^-}} | ||
\newcommand{\Rnzx}{\ensuremath{\overline{\mathbb{R}}^*}} | ||
% Complex numbers | ||
\newcommand{\C}{\ensuremath{\mathbb{C}}} | ||
% Nonzero complex numbers | ||
\newcommand{\Cnz}{\ensuremath{\mathbb{C}^*}} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Sets and collections | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
% Name of a collection | ||
\DeclareDocumentCommand\Collection{m}{\ensuremath{\mathcal{#1}}} | ||
% Name of a set | ||
\DeclareDocumentCommand\Set{m}{\ensuremath{#1}} | ||
|
||
% Such that | ||
\newcommand{\st}{\ | \ } | ||
|
||
% Definition of a collection | ||
\DeclareDocumentCommand \collection { m o }{% | ||
\IfNoValueTF {#2}% | ||
{\ensuremath{\left\{ #1 \right\}}}% | ||
{\ensuremath{\left\{ #1 \st #2 \right\}}}% | ||
} | ||
|
||
% Definition of a set | ||
\DeclareDocumentCommand \set { m o }{% | ||
\IfNoValueTF {#2}% | ||
{\ensuremath{\left\{ #1 \right\}}}% | ||
{\ensuremath{\left\{ #1 \st #2 \right\}}}% | ||
} | ||
|
||
% Name of an element of a sequence | ||
\DeclareDocumentCommand \seqel { m o o }{% | ||
\IfNoValueTF {#3} {% | ||
\IfNoValueTF {#2}% | ||
{\ensuremath{\left( #1 \right)}}% | ||
{\ensuremath{\left( #1 \right)_{#2}}}% | ||
}{% | ||
\ensuremath{\left( #1 \right)_{#2}^{#3}}% | ||
}% | ||
} | ||
|
||
% Definition of a sequence | ||
\newcommand{\sequence}[1]{\ensuremath{\left( #1 \right)}} | ||
% Definition of a tuple | ||
\newcommand{\tuple}[1]{\sequence{#1}} | ||
|
||
% Subset | ||
\newcommand{\sset}{\subseteq} | ||
% Superset | ||
\newcommand{\Sset}{\supseteq} | ||
% Subset | ||
\newcommand{\psset}{\subsetneq} | ||
% Superset | ||
\newcommand{\pSset}{\supsetneq} | ||
|
||
% Set difference | ||
\newcommand{\setdiff}{\setminus} | ||
% Symmetric difference | ||
\newcommand{\symmdiff}{\triangle} | ||
|
||
% Complement of a set | ||
\newcommand{\setcomplement}[1]{\ensuremath{#1^{\mathsf{c}}}} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% General topology | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
% Closure of a set | ||
\newcommand{\closure}[1]{\ensuremath{\overline{#1}}} | ||
% Interior of a set | ||
\newcommand{\interior}[1]{\ensuremath{#1^\circ}} | ||
|
||
% Embedding | ||
\newcommand{\embed}{\hookrightarrow} | ||
\newcommand{\embedsinto}{\embed} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Functions | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
% Function type | ||
\DeclareDocumentCommand \functype { o m m }{% | ||
\ensuremath{% | ||
\IfNoValueTF {#1}% | ||
{#2 \to #3}% | ||
{#1 : #2 \to #3}% | ||
}% | ||
} | ||
|
||
% Function definition | ||
\DeclareDocumentCommand \funcdefn { o m m }{% | ||
\ensuremath{% | ||
\IfNoValueTF {#1}% | ||
{#2 \mapsto #3}% | ||
{#1 : #2 \mapsto #3}% | ||
}% | ||
} | ||
|
||
% The zero function | ||
\newcommand{\zerofunc}{\ensuremath{\mathbf{0}}} | ||
% The indicator function of a given set | ||
\newcommand{\indfunc}[1]{\ensuremath{\mathbf{1}_{#1}}} | ||
|
||
% The starred version of \DeclareMathOperator - have limits typeset beneath | ||
\DeclareMathOperator*{\argmin}{arg\,min} | ||
\DeclareMathOperator*{\argmax}{arg\,max} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Normed vector spaces | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} |
Oops, something went wrong.