\(\newcommand{\identity}{\mathrm{id}} \newcommand{\notdivide}{{\not{\mid}}} \newcommand{\notsubset}{\not\subset} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\gf}{\operatorname{GF}} \newcommand{\inn}{\operatorname{Inn}} \newcommand{\aut}{\operatorname{Aut}} \newcommand{\Hom}{\operatorname{Hom}} \newcommand{\cis}{\operatorname{cis}} \newcommand{\chr}{\operatorname{char}} \newcommand{\Null}{\operatorname{Null}} \newcommand{\vec}[1]{\mathbf{#1}} \newcommand{\lt}{ < } \newcommand{\gt}{ > } \newcommand{\amp}{ & } \)

Section3.1Definitions, referencing, and exercises

There are three features of Mathbook XML highlighted in this chapter.

  1. Definitions - we make a basic definition that includes an xml id for easy referencing.

  2. Exercises - including hints and solutions.

  3. Cross-referencing - making use of an xml id to create a knowl that reminds the reader of a definition that is made in a different part of the document.

Subsection3.1.1A definition and exercise

This is the general form of a definition, with the notation section optional:

The tag that opens the following definition is <definition xml:id="lattice-points">. In the exercise below we reference this definition with the tag <xref ref="lattice-points" autoname="title" />. With the value of title, the knowl text is the title of the referenced item, in this case "lattice points." The other possible autonamevalues are

  • yes - displays the type of item (Definition, Example, Theorem, ...) and then the number of that item.

  • no - just displays the item number

  • plural - Is a variation on "title" that pluralizes the title. I wasn't aware of this when I wrote the code for this example. If I had used this option, I could have used the more natural id value "lattice point" and the knowl would have added the 's' at the end.

You can set the default when running xsltproc with the argument --stringparam autoname 'yes', where 'yes' can be any of the values mentioned above.

Definition3.1.1Lattice Points

The lattice points in \(d\) dimensions, \(d\) a positive integer, are the points in \(d\)-dimensional space with integer coordinates.

The following definition has two notation tags, each is listed in the notations section.

Definition3.1.2Complement of a set
Let \( A\) and \( B\) be sets. The complement of \( A\) relative to \( B\) (notation \(B - A\)) is the set of elements that are in \( B\) and not in \( A\). That is, \(B-A=\{x: x\in B \textrm{ and } x\notin A\}\). If \( U\) is the universal set, then \(U-A\) is denoted by \(A^c\) and is called simply the complement of \( A\). \(A^c=\{x\in U : x\notin A\}\).

...many lines later or in a different chapter, the following exercise may appear.....

Definition3.1.3Dimension of a Vector Space

Let \(V\) be a vector space over \(\mathbb{R}\) with basis \(\left\{\vec{x}_1,\vec{x}_2, \ldots ,\vec{x}_n\right\}\). Then the dimension of \(V\) is \(n\). We use the notation \(\dim V = n\) to indicate that \(V\) is \(n\)-dimensional.

Subsection3.1.2Some Exercises

1
Given nine Lattice Points in three dimensions, prove that there are at least two for which their midpoint is also a lattice point.
HintSolution