/// block_size` -- computed by choosing the `k` same-size groups one at a time (dividing out the
/// Converts a full position-to-position permutation mapping (`elements[i]` maps to `mapped[i]`)
fn permutation_mapping_to_cycles(elements: &[Literal], mapped: &[Literal]) -> Vec<Vec<Literal>> {
/// positions a sequence has -- iterating one, for instance, needs to know the range of positions.
/// - [`DomainOpError::WrongType`] if the input domains are different types, or are not integer or set domains.
matches!(lit, Literal::Unnamed(value) if value.ty == *ty && (1..=ty.size).contains(&value.value)),
/// Returns the domain that is the result of applying a binary operation to two integer domains.
/// let matrix_1 = Literal::AbstractLiteral(matrix![Literal::Int(1),Literal::Int(2);domain_int_ground!(2..3)]);
/// let matrix_2 = Literal::AbstractLiteral(matrix![Literal::Int(4),Literal::Int(5);domain_int_ground!(2..3)]);
/// let matrix_1 = Literal::AbstractLiteral(matrix![Literal::Int(1),Literal::Int(2);domain_int_ground!(2..3)]);
/// let matrix_2 = Literal::AbstractLiteral(matrix![Literal::Int(4),Literal::Int(5);domain_int_ground!(1..2)]);
/// let matrix_1 = Literal::AbstractLiteral(matrix![Literal::AbstractLiteral(matrix![Literal::Int(1),Literal::Int(2);domain_int_ground!(1..2)]); domain_int_ground!(2)]);
/// let matrix_2 = Literal::AbstractLiteral(matrix![Literal::AbstractLiteral(matrix![Literal::Int(4),Literal::Int(5);domain_int_ground!(1..2)]); domain_int_ground!(2)]);
// extract all the terminal elements (those that are not nested matrix literals) from the matrix literal.
fn partition_contains_accepts_a_literal_whose_size_exactly_matches_num_parts_times_part_len() {