Expand description
The element of the theorems feature, THEOREM
(flm.theorems.theorem), with one element value per configured theorem
kind: its arguments and fields, the reference point every theorem declares,
and the back-reference a proof’s title declares (title_reading).
§What an author writes
\begin{lemma}[Key lemma]\label{lem:key}
Every bounded monotone sequence converges.
\end{lemma}
\begin{proof}[*lem:key]
…
\end{proof}Every theorem kind is an environment of its own name. It takes an optional
title, ordinary inline content, then two fields in any order: the
references feature’s \label{…}, repeatable, and the feature’s own
\noproofref, which takes no argument and says that no proof of the
statement is coming. A field is a macro that a construct reads as data
rather than as content (see fields: data a construct
reads).
The environment’s body is laid out as blocks.
§The reference point
Every theorem is one reference point of
the reference kind POINT_KIND, theorem, including a proof.
- A theorem of a numbered kind carries the labels of its
\labelfields and accepts the configuration’slabel_types. It counts in its class’s counter and is shown in its kind’s counter style (numbers). Its anchor is the environment’s name and its number,lemma-4(lemma-2-3in a document that numbers theorems within sections); where the document did not number it, its anchor is formed from its first label (AnchorPolicy::FromValue). - A theorem of an unnumbered kind, such as a proof, is numbered by
nothing and accepts no label. A
\labelon a proof is reported by the references feature asflm.refs.label-type-not-accepted(with the condition’s fieldacceptedempty and its fieldkindequal totheorem), and the proof has no anchor.
§The back-reference
On a kind whose class reads back-references
(relation_ref), a title that is one
run of plain characters beginning with a star is a back-reference to
the statement the theorem proves: [*lem:key] refers to the statement
labeled lem:key and shows its word and number in the heading, and
[**lem:key] refers to the same statement and shows nothing in the
heading. The theorem then
declares one reference site, which the
references feature resolves as it resolves \ref. Every other title is a
title, whether it begins with a star or not (title_reading).
A title on such a kind that begins with a star, comments and whitespace
aside, but is not one run of characters ([*\emph{x}], [~*lem:key]), or
whose text after the stars is not of the form type:label, is malformed (TitleReading::Malformed): it declares
no reference site, the feature’s check reports it
(check), and the theorem’s rules show the title as
written.
§A starred title is kept as typed
The references feature compares a back-reference’s label with the labels
of \label as typed. On a kind whose class reads back-references, the
title’s reader (theorem_args) therefore places a title that begins with
a star, comments and whitespace aside, under an opaque wrapper (see opaque
regions): the
block-structure pass carries it over as written, so [*lem:a--b] refers to
the statement labeled lem:a--b, and a malformed back-reference is shown as
typed. Every other title is content, laid out and shown as any optional
argument is, with the typographic substitutions applied.
The reader sees the star only where the theorem’s own source writes it. A
star written in a user definition’s template ([*#1]) is seen, and the
title is kept as typed whatever the use site writes after it. A star that
arrives through a placeholder (a template [#1] used as \pf{*lem:a--b})
is not seen: that title is laid out as content, and a label holding --,
quotes, an apostrophe or ... does not resolve through it.
Structs§
- Theorem
Element - The data of one element value of
THEOREM: the theorem kind an environment is, its class, and what its reference point needs. The feature creates one per configured kind (TheoremElement::of).
Enums§
- Title
Reading - What a theorem’s title argument is, as
title_readingreads it: no title, a title, a back-reference, a malformed back-reference, or not yet known.
Constants§
- NOPROOFREF_
FIELD - The name of the field that marks a statement as having no proof,
noproofref, written\noproofrefafter the title. It is one of the fields of the theorem’s tack-on argument (the trailing argument that absorbs field macros; seetheorem_args). - POINT_
KIND - The reference kind of every theorem’s reference point,
theorem, for every theorem kind alike. - THEOREM
- The element name of every theorem,
flm.theorems.theorem. The element has one element value per configured theorem kind, each carrying aTheoremElementas its data. - TITLE_
ARG - The name of a theorem’s optional title argument,
title.
Functions§
- has_
noproofref - Whether the theorem
nodecarries the field\noproofref. - theorem_
args - The arguments of the theorem environments of a class, in order: the
optional title (
TITLE_ARG), then the tack-on argument (the trailing argument that absorbs field macros;ArgStdKind::TackOn) under the references feature’s argument name (FIELDS_ARG), holding the fields\label{…}(the references feature’s declaration,label_field), repeatable, and\noproofref(NOPROOFREF_FIELD). - title_
reading - What the title of the theorem
nodeis (see the module documentation);Nonefor a node that is not a theorem. On a kind whose class does not read back-references, every written title is aTitle.