theorems and proofs - latex reference and guides

Upload: ravi-mashru

Post on 03-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    1/6

    6/16/2014 Theorems and proofs - LaTeX Reference and Guides

    http://www.sharelatex.com/learn/Theorems_and_proofs 1/6

    Theorems and proofsMathematical documents include elements that require special formatting and numbering such as theorems,definitions, propositions, remarks, corollaries, lemmas and so on. This article explains how to define theseenvironments in L ATEX.

    Contents

    1 Introduction2 Numbered theorems, definitions, corollar ies and lemmas3 Unnumbered theorem-like environments4 Theorem styles5 Proofs6 Changing the qed symbol7 Reference guide8 Further reading

    Introduction

    Numbered environments in L ATEX can be defined by means of the command \newtheorem . An example is presented b elow:

    Theorems and pr oofs

    \ document class { article }\ usepacka ge [ utf8 ]{ inputenc }\ usepacka ge [ enlgis h ]{ babel } \newtheorem { theorem }{ Theorem } \begin { document }\ section { Introduction }Theorems can easily be defined \begin { theorem }Let $f$ be a fu nc tio n who se d eri va ti ve exis a continuous function.\end { theorem }\end { document }

    Output

    The command \newtheorem{theorem}{Theorem} has two parameters, the first one is the name of theenvironment that is defined, the second one is the word that will be printed, in boldface font, at the beginning of the environment. Once this new environment is defined it can be used normally within the document, delimited itwith the marks \begin{theorem} and \end{theorem} .

    Open an example in ShareLaTeX

    http://www.sharelatex.com/learn/File:TheoremsProofsEx1.pnghttps://www.sharelatex.com/project/new/template?zipUrl=/project/5382514de0ed446407e1ed72/download/zip&templateName=TheoremsAndProofs&compiler=pdflatexhttp://www.sharelatex.com/learn/File:TheoremsProofsEx1.png
  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    2/6

    6/16/2014 Theorems and proofs - LaTeX Reference and Guides

    http://www.sharelatex.com/learn/Theorems_and_proofs 2/6

    Numbered theorems, definitions, corollaries and lemmas

    The numbering of the environments can be controlled by means of two additional parameter in the\newtheorem command. Let's see:

    Theorems and proofs

    \ documentclass { article }\ usepackage [ utf8 ]{ inputenc }\ usepackage [ enlgish ]{ babel } \newtheorem { theorem }{ Theorem }[ section ]\newtheorem { corollary }{ Corollary }[ theorem ]\newtheorem { lemma }[ theorem ]{ Lemma } \begin { document }\ section { Introduction }Theorems can easily be defined \begin { theorem }Let $f$ be a fu nc tio n who se d eri va ti ve exa continuous function.

    \end { theorem } \begin { theorem }[ Pythagorean theorem ]\ label { pythagorean }This is a theorema about right trianglesequation\[ x^2 + y^2 = z^2 \ ]\end { theorem } And a consequence of theorem \ ref { pythagocorollary. \begin { corollary }T he re' s no ri gh t rec ta ngl e wh ose s id es me\end { corollary } You can reference theorems such as \ ref { p

    \begin { lemma }Given two line segments whose lengths arereal number $r$ such that $b=ra$ .\end { lemma }

    Output

    There are three new environments defined in the preamble.

    \newtheorem{theorem}{Theorem}[section]This is the example presented in the introduction but it has the additional parameter [section] thatrestarts the theorem counter at every new section.

    \newtheorem{corollary}{Corollary}[theorem]

    A environment called corollary is created, the counter of this new environment will be reset every time anew theorem environment is used.

    \newtheorem{lemma}[theorem]{Lemma}

    In this case, the even though a new environment called lemma is created, it will use the same counter asthe theorem environment.

    http://www.sharelatex.com/learn/File:TheoremsProofsEx2.png
  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    3/6

  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    4/6

    6/16/2014 Theorems and proofs - LaTeX Reference and Guides

    http://www.sharelatex.com/learn/Theorems_and_proofs 4/6

    Theorems and proofs

    \ documentclass { article }\ usepackage [ utf8 ]{ inputenc }\ usepackage [ enlgish ]{ babel } \ usepackage { amsthm } \theoremstyle { definition }\newtheorem { definition }{ Definition }[ secti

    \theoremstyle { remark }\newtheorem* { remark }{ Remark } \begin { document }Unnumbered theorem-like environments are

    \begin { remark }This statement is true, I guess.\end { remark } And the next is a somewhat informal defin \theoremstyle { definition }\begin { definition }{ Fibration }A fibration is a mapping between two topo\end { definition }\end { document }

    Output

    The command \theoremstyle{ } sets the styling for the numbered environment defined right below it. In theexample above the styles remark and definition are used. Notice that the remark is now in italics and the text inthe environment uses normal (Roman) typeface, the definition on the other hand also uses Roman typeface for the text within but the word "Definition" is printed in boldface font.

    See the reference guide for more theorem styles.

    Open an example in ShareLaTeX

    Proofs

    Proofs are the core of mathematical papers and books and is customary to keep them visually apart from thenormal text in the document. The package amsthm provides the environment proof for this.

    https://www.sharelatex.com/project/new/template?zipUrl=/project/5382514de0ed446407e1ed72/download/zip&templateName=TheoremsAndProofs&compiler=pdflatexhttp://www.sharelatex.com/learn/File:TheoremsProofsEx4.png
  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    5/6

  • 8/11/2019 Theorems and Proofs - LaTeX Reference and Guides

    6/6

    6/16/2014 Theorems and proofs - LaTeX Reference and Guides

    http://www.sharelatex.com/learn/Theorems_and_proofs 6/6

    To print the traditional QED (quod erat demonstrandum) at the end of a proof.

    Open an example in ShareLaTeX

    Reference guide

    Theorem styles

    definition boldface title, romand body. Commonly used in definitions, conditions, problems andexamples.plain boldface title, italicized body. Commonly used in theorems, lemmas, corollaries, propositions andconjectures.remark italicized title, romman body. Commonly used in remarks, notes, annotations, claims, cases,acknowledgments and conclusions.

    Further reading

    For more information see the amsthm package documentation

    Retrieved from "http://www.sharelatex.com/learn-scripts/index.php?title=Theorems_and_proofs&oldid=3047"

    This page was last modified on 30 May 2014, at 03:03.

    Privacy policyAbout LaTeX Reference and GuidesDisclaimers

    http://www.sharelatex.com/learn/Learn:General_disclaimerhttp://www.sharelatex.com/learn/Learn:Abouthttp://www.sharelatex.com/learn/Learn:Privacy_policyhttp://www.sharelatex.com/learn-scripts/index.php?title=Theorems_and_proofs&oldid=3047http://www.ctan.org/pkg/amsthmhttps://www.sharelatex.com/project/new/template?zipUrl=/project/5382514de0ed446407e1ed72/download/zip&templateName=TheoremsAndProofs&compiler=pdflatex