<periodicSet>
<periodicSet> represents an infinite set of real numbers of the form
— that is, a list of
offsets repeated with a fixed period. The classic use case is comparing
families of angles modulo or in trigonometry: the set of
solutions to , for example, is the periodic set with
offsets and period .
Two <periodicSet> values compare equal when they describe the same set
of real numbers, regardless of which representative offsets are chosen. That
makes it the right tool for answer-validation of trigonometric solution sets.
Attributes and Properties
Attributes for <periodicSet>
Highlighted (3)
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
formatkeyword. Input format.
| Value | Description |
|---|---|
text (default) | Plain-text math notation (e.g., x^2 + 1). |
latex | LaTeX-formatted math (e.g., x^{2} + 1). |
simplifykeyword. Level of simplification applied to the expression.
| Value | Description |
|---|---|
none (default) | No simplification is applied. |
full | Fully simplify the expression. |
numbers | Simplify numeric subexpressions only, leaving symbolic structure intact. |
numbersPreserveOrder | Like numbers, but does not reorder commutative operands. |
normalizeOrder | Reorder commutative operands into a canonical form without simplifying values. |
Number display (5)
avoidScientificNotationboolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.
displayDecimalsinteger. Default value: 2. Number of decimal places to display when rendering this number.
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
displaySmallAsZeronumber. Default value: 1e-14. Threshold below which numbers are displayed as zero.
padZerosboolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Positioning (2)
anchorpoint. Default value: . Coordinates of the anchor point used to position this component on a graph.
positionFromAnchorkeyword. Where this component sits relative to its anchor point.
| Value | Description |
|---|---|
upperRight | Place the component above and to the right of the anchor point. |
upperLeft | Place the component above and to the left of the anchor point. |
lowerRight | Place the component below and to the right of the anchor point. |
lowerLeft | Place the component below and to the left of the anchor point. |
top | Place the component directly above the anchor point. |
bottom | Place the component directly below the anchor point. |
left | Place the component directly to the left of the anchor point. |
right | Place the component directly to the right of the anchor point. |
center (default) | Center the component on the anchor point. |
Other (19)
assumptionsmath. Default value: . Assumptions applied when simplifying or comparing.
createIntervalsboolean. Default value: false. Whether range expressions are interpreted as intervals.
createVectorsboolean. Default value: false. Whether tuple-like expressions are interpreted as vectors.
displayBlanksboolean. Default value: true. Whether blanks (placeholders) are visibly rendered.
draggableboolean. Default value: true. Whether the math component can be dragged on a graph.
expandboolean. Default value: false. Whether to expand the expression.
functionSymbolstextList. Default value: ["f","g"]. Symbols treated as function names when parsing.
layernumber. Default value: 0. Z-order layer index when shown on a graph.
maxIndexinteger. Default value: Infinity. Largest period index considered when listing offsets.
integer. Default value: 1. Largest period index when rendered as a list.
minIndexinteger. Default value: -Infinity. Smallest period index considered when listing offsets.
integer. Default value: -1. Smallest period index when rendered as a list.
offsetsmathList. Offsets within one period.
parseScientificNotationboolean. Default value: false. Whether to parse expressions like 1e3 as scientific notation.
periodmath. The period of the set.
referencesAreFunctionSymbolsreference. References whose names should be treated as function symbols when parsing.
renderModetext. Default value: inline. How the math is rendered (e.g. "inline", "display").
splitSymbolsboolean. Default value: true. Whether multi-character symbols are split into a product of variables.
unorderedboolean. Whether tuple- or list-like math expressions should be treated as unordered for comparison.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <periodicSet name="p">
Highlighted (3)
$p.displayDigitsinteger. Number of significant digits to display when rendering this number.
$p.formattext. Input format.
$p.simplifytext. Level of simplification applied to the expression.
Number display (5)
$p.avoidScientificNotationboolean. Whether to render numbers in full decimal form rather than scientific notation.
$p.displayDecimalsinteger. Number of decimal places to display when rendering this number.
$p.displayDigitsinteger. Number of significant digits to display when rendering this number.
$p.displaySmallAsZeronumber. Threshold below which numbers are displayed as zero.
$p.padZerosboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Positioning (2)
$p.anchorpoint. The coordinates where this component is anchored on the graph.
$p.positionFromAnchortext. Where this component sits relative to its anchor point.
Other (46)
$p.asListmathList. The periodic set rendered as a list of explicit values.
$p.assumptionsmath. Assumptions applied when simplifying or comparing.
$p.backgroundColortext. Human-readable name for this component's background color, derived from the active style and theme.
$p.columns[ math ]. The matrix's entries grouped by column.
$p.createIntervalsboolean. Whether range expressions are interpreted as intervals.
$p.createVectorsboolean. Whether tuple-like expressions are interpreted as vectors.
$p.disabledboolean. Whether this component is disabled and cannot be interacted with.
$p.displayBlanksboolean. Whether blanks (placeholders) are visibly rendered.
$p.draggableboolean. Whether the math component can be dragged on a graph.
$p.expandboolean. Whether to expand the expression.
$p.fixedboolean. Whether this component's value is fixed and cannot be modified.
$p.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$p.functionSymbolstextList. Symbols treated as function names when parsing.
$p.isNumberboolean. Whether the expression evaluates to a finite number.
$p.isNumericboolean. Whether the expression evaluates to any number (including infinities).
$p.latexlatex. The expression rendered as a LaTeX string.
$p.layernumber. Z-order layer index when shown on a graph.
$p.list[ math ]. The math expression interpreted as a list (its elements).
$p.matrix[ math ]. The math expression interpreted as a matrix (its entries by row and column).
$p.matrixSizenumberList. The size of the math expression as a matrix, as a [numRows, numColumns] list.
$p.maxIndexinteger. Largest period index considered when listing offsets.
$p.maxIndexAsListinteger. Largest period index when rendered as a list.
$p.minIndexinteger. Smallest period index considered when listing offsets.
$p.minIndexAsListinteger. Smallest period index when rendered as a list.
$p.numbernumber. The numeric value of the expression (NaN if not a number).
$p.numColumnsinteger. The number of columns when the math expression is interpreted as a matrix.
$p.numDimensionsinteger. The number of dimensions if the math expression is interpreted as a vector or matrix.
$p.numListItemsinteger. The number of items when the math expression is interpreted as a list.
$p.numOffsetsinteger. The number of distinct offsets within one period.
$p.numRowsinteger. The number of rows when the math expression is interpreted as a matrix.
$p.offsetsmathList. Offsets within one period.
$p.parseScientificNotationboolean. Whether to parse expressions like 1e3 as scientific notation.
$p.periodmath. The period of the set.
$p.redundantOffsetsboolean. Offsets that are redundant given the period.
$p.renderModetext. How the math is rendered (e.g. "inline", "display").
$p.rows[ math ]. The matrix's entries grouped by row.
$p.splitSymbolsboolean. Whether multi-character symbols are split into a product of variables.
$p.texttext. The expression rendered as a plain text string.
$p.textColortext. Human-readable name for this component's text color, derived from the active style and theme.
$p.textStyleDescriptiontext. Human-readable description of this component's text styling (color and any background color).
$p.valueperiodicSet. The math expression value.
$p.vector[ math ]. The math expression interpreted as a vector (its components).
$p.xmath. The first component of the math expression when interpreted as a vector.
$p.ymath. The second component of the math expression when interpreted as a vector.
$p.zmath. The third component of the math expression when interpreted as a vector.
Common to all components (4)
$p.doenetMLtext. The DoenetML source code that produced this component.
$p.hideboolean. Whether to hide this component from the rendered output.
$p.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$p.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Solutions of a trigonometric equation
The learner-entered offsets and period define one <periodicSet>; the
correct set is defined inline as another. The = operator compares the two
sets, so equivalent representations are accepted: e.g. writing 13pi/6
in place of pi/6 (shifted by +2 pi), -7pi/6 in place of 5pi/6
(shifted by -2 pi), or listing the two offsets in either order.
Note the missing space in 5pi/6: the offsets attribute is a
mathList — a space-separated list of math expressions — so
an inner space would split that value into two offsets (5 and pi/6).
The period attribute is a single math, so spaces inside it
(2 pi) are fine.
Example: List representative values
The asList property returns a comma-separated list of representative
values, with minIndexAsList and maxIndexAsList controlling how many
periods are listed. numOffsets returns the number of distinct offsets
within a single period.
Attribute Examples
Attribute Example: offsets and period
offsets is a space-separated list of offsets within one period; period is
the spacing. Together they parametrize the entire set.
Attribute Example: minIndexAsList, maxIndexAsList
minIndexAsList and maxIndexAsList control the range of period indices
included when the set is rendered as a list. Both default to ±1, so a
periodic set with one offset renders as three representative values by
default.