-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmymath.sty
86 lines (71 loc) · 2.93 KB
/
mymath.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
%this file contains helpful macros for setting math-heavy homeworks.
%----------------------------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mymath}[2014/10/23 Common math macros]
%----------------------------------------------------------------------------------------------------
%REQUIREMENTS
%----------------------------------------------------------------------------------------------------
\RequirePackage{mathtools}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
%----------------------------------------------------------------------------------------------------
%MATH STUFF
%----------------------------------------------------------------------------------------------------
%common fields/sets used
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\E}{\ensuremath{\mathbb{E}}}
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
\newcommand{\Com}{\ensuremath{\mathbb{C}}}
\newcommand{\C}{\Com}
\newcommand{\N}{\ensuremath{\mathbb{N}}}
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
\newcommand{\zmod}[1]{\ensuremath{\Z/#1\Z}}
\newcommand{\Sym}{\ensuremath{\mathbb{S}}}
\newcommand{\Sp}{\ensuremath{\mathbb{S}^+}}
\newcommand{\Spp}{\ensuremath{\mathbb{S}^{++}}}
% Set-theory stuff
\newcommand{\B}{\mathcal{B}} % Borel Set
\renewcommand{\P}{\mathcal{P}} % Powerset - replaces "paragraph" mark
\newcommand{\A}{\mathcal{A}} % Family
\renewcommand{\S}{\mathcal{S}} % Sigma Algebra - replaces "section" mark
\newcommand{\T}{\mathcal{T}} % Sigma Algebra (2)
\newcommand{\D}{\mathcal{D}} % Random curly D.
%finite field - provide order as argument.
\newcommand{\F}[1]{\ensuremath{\mathbb{F}_#1}}
\newcommand{\GL}{\ensuremath{\mathrm{GL}}}
%operators
\DeclareMathOperator{\spn}{span}
\DeclareMathOperator{\trace}{trace}
%\DeclareMathOperator{\dim}{dim}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Img}{Im}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Erf}{\mathcal{E}rf}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\newcommand{\ip}[2]{\left<#1, #2\right>}
%modifiers
\newcommand*\conj[1]{\overline{#1}}
%symbols
\newcommand{\Chi}{\chi}
%----------------------------------------------------------------------------------------------------
%TEXT STUFF
%----------------------------------------------------------------------------------------------------
%common text used in mathmode.
\newcommand{\st}{\ensuremath{\text{ s.t. }}}
\newcommand{\divs}{\ensuremath{\text{ divides }}}
%for align environments
%justifying a step
%TODO: right-align this?
\newcommand{\note}[1]{
\ensuremath{\qquad\text{#1}}
}
%proofs
%TODO: Write own theorem style - not so much vertical space, maybe boxes?
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}{Proposition}[section]
\newtheorem{example}{Example}[section]
\newtheorem*{defn}{Defn}
\renewcommand\qedsymbol{$\blacksquare$}