# How to add new properties: "Normal" and "Othogonal"

+1 vote

Hi, I want to know how to code properly for Cadabra. I read the section on programming in "The Cadabra Book" pdf but I need a little more explanation on programming new properties (like "::Coordinate")

I want to generate two new properties

• "Normal" can be applied to a 1D tensor (vector or covector)
• "Orthogonal" can be applied to any tensor (that is not a scalar)

Then if I have an expression with contraction of two tensors then I will write a function such that

1. if the two tensors are normal vectors then their contraction is -1
2. if one tensor is orthogonal and the other is a normal (co)vector then their contraction is 0

Hi Amnon. I find your suggestion is very interesting. If you ask me, I would use the substitute algorithm to apply a series of rules, but I see the simplification that might be introduced by the Orthogonal property.

In my ignorance, I would suggest to see the implementation of properties like Commuting or SelfCommuting, since these apply to any of the objects in a set... However, I have doubts about avoiding the self-orthogonality!

Great suggestion.