Convert 32 free-form then string expressions in collection_semantics.yml
to structured typed YAML with 14 Pydantic models and as_latex() methods.
Bug fix: NestedElements.elements typed as dict[str, "OutputBinding"]
with model_rebuild() to resolve forward ref (was dict[str, Any]).
Polish: discriminated unions via Annotated[..., Field(discriminator="type")]
on all 4 union type aliases, rename elements_to_latex to
_assumption_elements_to_latex.
61 tests (was 40): smoke tests for all as_latex() and generate_docs(),
unit tests for EllipsisMarker, DatasetListInput, NestedElements,
CollectionOutput with ellipsis, compound sub_collection_type,
MapOverThen producing DatasetOutput.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>