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
  p1<X>(p2<X>p3) = (|(p1,p3)|*p2)-(|(p1,p2)|*p3)
proof
A1: p2 = |[ p2.1, p2.2, p2.3 ]| by Th1;
A2: p3 = |[ p3.1, p3.2, p3.3 ]| by Th1;
A3: p1<X>(p2<X>p3) = |[(p1.2*p3.2+p1.3*p3.3+p1.1*p3.1)*p2.1-
    (p1.2*p2.2+p1.3*p2.3+p1.1*p2.1)*p3.1,
    (p1.3*p3.3+p1.1*p3.1+p1.2*p3.2)*p2.2-
    (p1.3*p2.3+p1.1*p2.1+p1.2*p2.2)*p3.2,
    (p1.1*p3.1+p1.2*p3.2+p1.3*p3.3)*p2.3
    -(p1.1*p2.1+p1.2*p2.2+p1.3*p2.3)*p3.3 ]|;
 |(p1,p3)| = p1.1*p3.1+p1.2*p3.2+p1.3*p3.3 by Lm5;
then A4: p1<X>(p2<X>p3) = |[ |(p1,p3)|*p2.1, |(p1,p3)|*p2.2, |(p1,p3)|*p2.3 ]|-
    |[ (p1.1*p2.1+p1.2*p2.2+p1.3*p2.3)*p3.1,
    (p1.1*p2.1+p1.2*p2.2+p1.3*p2.3)*p3.2,
    (p1.1*p2.1+p1.2*p2.2+p1.3*p2.3)*p3.3 ]| by A3,Lm11;
 |(p1,p2)| = p1.1*p2.1+p1.2*p2.2+p1.3*p2.3 by Lm5;
    then p1<X>(p2<X>p3) = (|(p1,p3)|)*|[ p2.1, p2.2, p2.3 ]|-
    |[ |(p1,p2)|*p3.1, |(p1,p2)|*p3.2, |(p1,p2)|*p3.3 ]| by A4,Th50;
    hence thesis by A1,A2,Th50;
end;
