# Weight + Weight -- the sum of two weights

## Synopsis

• Operator: +
• Usage:
p1 + p2
• Inputs:
• p1, an instance of the type Weight,
• p2, an instance of the type Weight,
• Outputs:
• an instance of the type Weight, the sum of p1 and p2

## Description

 i1 : R=rootSystemA(4) o1 = RootSystem{...8...} o1 : RootSystem i2 : M=cartanMatrix R o2 = | 2 -1 0 0 | | -1 2 -1 0 | | 0 -1 2 -1 | | 0 0 -1 2 | 4 4 o2 : Matrix ZZ <--- ZZ i3 : p1=weight(R,M_0) o3 = | 2 | | -1 | | 0 | | 0 | o3 : Weight i4 : p2=weight(R,M_1) o4 = | -1 | | 2 | | -1 | | 0 | o4 : Weight i5 : p1+p2 o5 = | 1 | | 1 | | -1 | | 0 | o5 : Weight