reserve S,T,W,Y for RealNormSpace;
reserve f,f1,f2 for PartFunc of S,T;
reserve Z for Subset of S;
reserve i,n for Nat;

theorem LM180:
  for X,Y be RealNormSpace,
  z be Point of [:X,Y:] holds
  reproj1(z) = (IsoCPNrSP(X,Y)") * reproj(In(1,dom <*X,Y*>),IsoCPNrSP(X,Y).z) &
  reproj2(z) = (IsoCPNrSP(X,Y)") * reproj(In(2,dom <*X,Y*>),IsoCPNrSP(X,Y).z)
  proof
    let X, Y be RealNormSpace,
    z be Point of [:X,Y:];
    set i1 = In(1,dom<*X,Y*>);
    set i2 = In(2,dom<*X,Y*>);
    D1: dom <*X,Y*> = Seg len <*X,Y*> by FINSEQ_1:def 3
    .= Seg 2 by FINSEQ_1:44;
    then 1 in dom <*X,Y*>;
    then AS1: i1 = 1 by SUBSET_1:def 8;
    2 in dom <*X,Y*> by D1;
    then AS2: i2 = 2 by SUBSET_1:def 8;
    set I = (IsoCPNrSP(X,Y)");
    set J = IsoCPNrSP(X,Y);
    set f1 = reproj1(z);
    (<*X,Y*>).i1 = X by AS1;
    then reconsider R = reproj(i1,IsoCPNrSP(X,Y).z)
    as Function of X,product <*X,Y*>;
    reconsider g1 = (IsoCPNrSP(X,Y)")*R as Function of X,[:X,Y:];
    consider x be Point of X, y be Point of Y such that
    P1: z=[x,y] by PRVECT_3:18;
    P3: z`2 = y by P1;
    P4: IsoCPNrSP(X,Y).z =IsoCPNrSP(X,Y).(x,y) by P1
    .=<*x,y*> by defISO;
    now
      let r be Element of X;
      reconsider r0 = r as Element of (<*X,Y*> .i1) by AS1;
      i1 in Seg 2 by AS1;
      then i1 in Seg len <*x,y*> by FINSEQ_1:44; then
      X0: i1 in dom <*x,y*> by FINSEQ_1:def 3;
      X1: R.r = <*x,y*> +* (i1,r0) by P4,NDIFF_5:def 4;
      X3: <*x,y*> +* (i1,r0) = <*x,y*> +* (i1 .--> r0)
        by FUNCT_7:def 3,X0;
      X2: <*x,y*> +* (i1 .--> r0) = <*r,y*>
      proof
        set q = <*x,y*> +* (1 .--> r0 );
        X5: q = <*x,y*> +* ( 1,r0 ) by AS1,X0,FUNCT_7:def 3;
        then reconsider q as FinSequence;
        K1: len q = len <*x,y*> by X5,FUNCT_7:97
        .= 2 by FINSEQ_1:44;
        1 in dom (1 .--> r0) by FUNCOP_1:74; then
        K3: q.1 = (1 .--> r0).1 by FUNCT_4:13
        .= r by FUNCOP_1:72;
        not 2 in dom (1 .--> r0) by FUNCOP_1:75;
        then q.2 = <*x,y*>.2 by FUNCT_4:11
        .= y;
        hence thesis by AS1,K1,K3,FINSEQ_1:44;
      end;
      g1.r = I.(R.r) by FUNCT_2:15
      .= [r,y] by X1,X2,X3,defISOA1;
      hence f1 . r = g1 . r by P3,Defrep1;
    end;
    hence f1 = g1
    .= (IsoCPNrSP(X,Y)")*reproj(i1,IsoCPNrSP(X,Y).z);
    set f2= reproj2(z);
    (<*X,Y*>).i2 = Y by AS2; then
    reconsider L = reproj(i2,IsoCPNrSP(X,Y).z)
    as Function of Y,product <*X,Y*>;
    reconsider g2 = (IsoCPNrSP(X,Y)")*L as Function of Y,[:X,Y:];
    consider x be Point of X, y be Point of Y such that
    P1: z=[x,y] by PRVECT_3:18;
    P2: z`1 = x by P1;
    P4: IsoCPNrSP(X,Y).z = IsoCPNrSP(X,Y).(x,y) by P1
    .=<*x,y*> by defISO;
    now
      let r be Element of Y;
      reconsider r0 = r as Element of (<*X,Y*> .i2) by AS2;
      i2 in Seg 2 by AS2;
      then i2 in Seg len <*x,y*> by FINSEQ_1:44;
      then
      X0: i2 in dom <*x,y*> by FINSEQ_1:def 3;
      X1: L.r = <*x,y*> +* (i2,r0) by P4,NDIFF_5:def 4;
      X3: <*x,y*> +* (i2,r0) = <*x,y*> +* (i2 .--> r0) by FUNCT_7:def 3,X0;
      X2: <*x,y*> +* (i2 .--> r0) = <*x,r*>
      proof
        set q = <*x,y*> +* (2 .--> r0);
        X5: q = <*x,y*> +* (2,r0) by AS2,X0,FUNCT_7:def 3;
        then reconsider q as FinSequence;
        K1: len q = len <*x,y*> by X5,FUNCT_7:97
        .= 2 by FINSEQ_1:44;
        2 in dom (2 .--> r0) by FUNCOP_1:74; then
        K3: q.2 = (2 .--> r0 ).2 by FUNCT_4:13
        .= r by FUNCOP_1:72;
        not 1 in dom (2 .--> r0) by FUNCOP_1:75;
        then q.1 = <*x,y*>.1 by FUNCT_4:11
        .= x;
        hence thesis by AS2,K1,K3,FINSEQ_1:44;
      end;
      g2.r = I.(L.r) by FUNCT_2:15
      .= [x,r] by X1,X2,X3,defISOA1;
      hence f2.r = g2.r by P2,Defrep2;
    end;
    hence f2 = g2
    .=(IsoCPNrSP(X,Y)")*reproj(i2,IsoCPNrSP(X,Y).z);
  end;
