I have a function, br
, that takes multiple integer arguments (which for syntactic ease I collect in a list) and is
Antisymmetric in any two arguments:
br[l_List] :> Signature[l] br[Sort[l]]
Obeys an algebraic relation:
%%%%%TYPO br[{i_,j_,m___}]br[{k_,l_,m___}] - %%%%%TYPO br[{i_,k_,m___}]br[{j_,l_,m___}] - %%%%%TYPO br[{i_,l_,m___}]br[{j_,k_,m___}] :> 0 br[{i_,j_,m___}]br[{p_,q_,m___}] - br[{p_,j_,m___}]br[{i_,q_,m___}] - br[{q_,j_,m___}]br[{p_,i_,m___}] :> 0
Perhaps abusively, I call this a "quadratic" constraint since each term is two "powers" of br
(with different arguments).
Is there a good way to implement this second condition?
A sample expression that should reduce after two iterations of the second rule:
samp = (1/(br[{3, 6, 7}] br[{4, 6, 7}]))*
(
br[{2, 6, 7}] br[{3, 6, 7}] br[{4, 5, 6}] +
br[{2, 6, 7}] br[{3, 4, 6}] br[{5, 6, 7}] +
br[{2, 3, 6}] br[{4, 6, 7}] br[{5, 6, 7}]
);
The first condition is straightforward, but I have to by-hand define the second:
cleanBR =
{
br[l_List] :> Signature[l] br[Sort[l]]
,
br[{3, 6, 7}] br[{4, 5, 6}] :>
br[{3, 6, 4}] br[{7, 5, 6}] + br[{3, 6, 5}] br[{7, 4, 6}]
,
br[{2, 6, 7}] br[{3, 5, 6}] :>
br[{2, 6, 3}] br[{5, 7, 6}] + br[{2, 6, 5}] br[{7, 3, 6}]
};
Then:
FixedPoint[(# //. cleanBR // Simplify) &, samp]
(* br[{2,5,6}] *)
Is there a clever way to do the br[___]br[___]:>___
that I currently resort to? I'm open minded about this and have aside from pattern matching considered algebraic elimination and some kind of Simplify[samp,extraEquations_List]
but nothing is very robust.
Edit
I had a typo in the original "quadratic" constraint. I've corrected it. The constraint is just one among determinants of matrices. If:
br[l_List]
takesLength[l]
arguments and- each integer argument of
br
is a vector of lengthLength[l]
and br:=Det
then the constraint is satisfied. Demonstration for arbitraty l
(by way of arbitrary mSeq
):
mSeq = Sequence[m1, m2, m3, m4, m5, m6];
test = br[{i, j, mSeq}] br[{p, q, mSeq}] -
br[{p, j, mSeq}] br[{i, q, mSeq}] -
br[{q, j, mSeq}] br[{p, i, mSeq}];
test = test //. cleanBR;
lettersToVecs = (# -> RandomInteger[{1, 100}, Length[{mSeq}] + 2]) & /@ {i, j, p, q, mSeq};
(test //. lettersToVecs) //. br :> Det
(*0*)