reserve r, r1, r2, x, y, z,
        x1, x2, x3, y1, y2, y3 for Real;
reserve R, R1, R2, R3 for Element of 3-tuples_on REAL;
reserve p, q, p1, p2, p3, q1, q2 for Element of REAL 3;
reserve f1, f2, f3, g1, g2, g3, h1, h2, h3 for PartFunc of REAL,REAL;
reserve t, t0, t1, t2 for Real;

theorem
  |[ x1,x2,x3 ]| + |[ y1,y2,y3 ]| = (x1+y1)*<e1> + (x2+y2)*<e2> + (x3+y3)*<e3>
proof
A1:  <e1>.1 = 1 & <e1>.2 = 0 & <e1>.3 = 0;
A2:  <e2>.1 = 0 & <e2>.2 = 1 & <e2>.3 = 0;
A3:  <e3>.1 = 0 & <e3>.2 = 0 & <e3>.3 = 1;
A4: (x1+y1)*<e1> + (x2+y2)*<e2> + (x3+y3)*<e3>
  = |[ (x1+y1)*1,(x1+y1)*0,(x1+y1)*0 ]| + (x2+y2)*<e2>
    + (x3+y3)*<e3> by A1,Lm1
 .= |[ x1+y1,0,0 ]| + |[ (x2+y2)*0,(x2+y2)*1,(x2+y2)*0 ]|
    + (x3+y3)*<e3> by A2,Lm1
 .= |[ x1+y1,0,0 ]| + |[ 0,x2+y2,0 ]|
    + |[ (x3+y3)*0,(x3+y3)*0,(x3+y3)*1 ]| by A3,Lm1
 .= |[ x1+y1,0,0 ]| + |[ 0,x2+y2,0 ]| + |[ 0,0,x3+y3 ]|;
A5: |[ x1+y1,0,0 ]|.1 = x1+y1 & |[ x1+y1,0,0 ]|.2 = 0
    & |[ x1+y1,0,0 ]|.3 = 0;
A6: |[ 0,x2+y2,0 ]|.1 = 0 & |[ 0,x2+y2,0 ]|.2 = x2+y2
    & |[ 0,x2+y2,0 ]|.3 = 0;
A7: |[ 0,0,x3+y3 ]|.1 = 0 & |[ 0,0,x3+y3 ]|.2 = 0
    & |[ 0,0,x3+y3 ]|.3 = x3+y3;
A8: (x1+y1)*<e1> + (x2+y2)*<e2> + (x3+y3)*<e3>
  = |[ (x1+y1) + 0,0 + (x2+y2),0 + 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