SetDirectory["~/KappaLib/"];
<<kappaLib-1.2.m

Verify that the Fresnel polynomial for the PDCM medium in 

   Lindell, Bergamin, Favaro: Decomposable medium conditions in four-dimensional representation
   
factorises into the product of two quadratic forms.

Define kappa

(* general (1,1)-tensor *)
Pmat=emMatrix["P",4,Structure->"General"];

(* two arbitrary bivectors *)
CC=emMatrix["c",4,Structure->"AntiSymmetric"];
DD=emMatrix["d",4,Structure->"AntiSymmetric"];

(* C1 = constant *)
(* C2 = constant *)
(* rho = scalar density of weight 1 *)

kappa=C1 emIdentityKappa[]+ C2 emPQToKappa[Pmat,Pmat]+emBiProduct[rho,CC,DD];

Compute Fresnel polynomial

vars={xi0,xi1,xi2,xi3};
fresnel=emKappaToFresnel[kappa,vars];

Check that the Fresnel polynomial factorises into two quadratic forms

(* define adjugate of P *)
adjP = Table[
			(-1)^(i+j)Det[Drop[Pmat,{i,i},{j,j}]],
			{j,1,4},{i,1,4}
			];

(* check *)
Simplify[adjP/Det[Pmat]-Inverse[Pmat]]

fresnelExp=-2 C2^2 rho (vars.Pmat.CC.vars)( vars.adjP.DD.vars);
Simplify[fresnel-fresnelExp]

Note: the above formula is valid also when P is not invertible

Extra: Verify some basic identities for P/\ Q

(* Write identity kappa as id/\id  *)
id=IdentityMatrix[4];
Union[Flatten[emIdentityKappa[]-emPQToKappa[id,id]]]

(* If S is a trace-free (1,1)-tensor, then 

    S /\ Id + Id /\ S

has only a skewon part *)
S=emMatrix["sh",4,Structure->"General"];
S=S-1/4Tr[S]IdentityMatrix[4];
Tr[S]
kappa=Simplify[emPQToKappa[id,S]+emPQToKappa[S,id]];
emKappaToMatrix[kappa]//MatrixForm
(* medium has only a skewon part *)
Union[Flatten[Simplify[kappa+emPoincare[kappa]]]]

(* 
  Conversely, the skewon part of any kappa can be written as 

    S/\Id + Id /\ S

where S is the trace-free part of the first trace of kappa 
*)
kappa=emGeneralKappa["k"];
kappaII = 1/2(kappa - emPoincare[kappa]);
S=Table[
Sum[
emReadNormal[kappa,i,j,i,r],{i,1,4}]
,
{j,1,4},{r,1,4}
];
S=(S-1/2 emTrace[kappa]IdentityMatrix[4]);
kappaIIalt=1/2Simplify[
emPQToKappa[id,S]+emPQToKappa[S,id]
];
Union[Flatten[Simplify[kappaII- kappaIIalt]]]