You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The product of orthogonal tensors is orthogonal: Q₁·Q₂ is orthogonal when both Q₁, Q₂ are. The CAS drops the annotation. Chirality composes too (relevant to #269): proper·proper → proper, proper·improper → improper, improper·improper → proper.
Math
(Q₁Q₂)ᵀ(Q₁Q₂) = Q₂ᵀ Q₁ᵀ Q₁ Q₂ = Q₂ᵀ Q₂ = I → orthogonal. det(Q₁Q₂) = det(Q₁)det(Q₂), so the ±1 determinant (proper/improper) multiplies.
Current behavior (probed)
Q*Q2 (both orthogonal) -> (none) expected: orth
How to fix
Two parts:
Binary hook in tag_invoke(mul_fn, tensor, tensor) (include/numsim_cas/tensor/tensor_operators.h): after building the product, if (is_orthogonal(lhs) && is_orthogonal(rhs)) result.data()->tensor_algebra_assumptions().insert(orthogonal{});. Beware the existing trans(Q)·Q → I fold fires first for the transpose pair — that path returns identity and is unaffected.
N-ary generalization: an all-orthogonal tensor_mul factor list → orthogonal. Fold into the classify_tensor_mul_space classifier used by the sandwich issues so multi-factor Q₁Q₂Q₃… is covered.
Summary
The product of orthogonal tensors is orthogonal:
Q₁·Q₂is orthogonal when bothQ₁, Q₂are. The CAS drops the annotation. Chirality composes too (relevant to #269): proper·proper → proper, proper·improper → improper, improper·improper → proper.Math
(Q₁Q₂)ᵀ(Q₁Q₂) = Q₂ᵀ Q₁ᵀ Q₁ Q₂ = Q₂ᵀ Q₂ = I→ orthogonal.det(Q₁Q₂) = det(Q₁)det(Q₂), so the ±1 determinant (proper/improper) multiplies.Current behavior (probed)
How to fix
Two parts:
Binary hook in
tag_invoke(mul_fn, tensor, tensor)(include/numsim_cas/tensor/tensor_operators.h): after building the product,if (is_orthogonal(lhs) && is_orthogonal(rhs)) result.data()->tensor_algebra_assumptions().insert(orthogonal{});. Beware the existingtrans(Q)·Q → Ifold fires first for the transpose pair — that path returns identity and is unaffected.Chirality composition (optional, ties into Add chirality sub-tag to refine det(orthogonal) fold (proper vs improper rotation) #269): if both are
proper_rotation→ insertproper_rotation; mixed →improper_rotation; both improper →proper_rotation. Only when both factors carry a chirality tag; otherwise fall back to plainorthogonal.N-ary generalization: an all-orthogonal
tensor_mulfactor list → orthogonal. Fold into theclassify_tensor_mul_spaceclassifier used by the sandwich issues so multi-factorQ₁Q₂Q₃…is covered.How to test
Part of the annotation-completeness umbrella below. Chirality piece relates to #269.