sage: x = sum(J.gens())
sage: A = x.subalgebra_generated_by(orthonormalize_basis=True)
sage: L0x = A(x).operator()
- sage: Ps = [ P*l for (l,P) in L0x.spectral_decomposition() ]
- sage: Ps[0] + Ps[1] == L0x
+ sage: sd = L0x.spectral_decomposition()
+ sage: l0 = sd[0][0]
+ sage: l1 = sd[1][0]
+ sage: P0 = sd[0][1]
+ sage: P1 = sd[1][1]
+ sage: P0*l0 + P1*l1 == L0x
+ True
+ sage: P0 + P1 == P0^0 # the identity
+ True
+ sage: P0^2 == P0
+ True
+ sage: P1^2 == P1
+ True
+ sage: c0 = P0(A.one())
+ sage: c1 = P1(A.one())
+ sage: c0.inner_product(c1) == 0
+ True
+ sage: c0 + c1 == A.one()
+ True
+ sage: c0.is_idempotent()
+ True
+ sage: c1.is_idempotent()
True
"""