reserve n,i,j,k,l for Nat;
reserve D for non empty set;
reserve c,d for Element of D;
reserve p,q,q9,r for FinSequence of D;
reserve RAS for MidSp-like non empty ReperAlgebraStr over n+2;
reserve a,b,d,pii,p9i for Point of RAS;
reserve p,q for Tuple of (n+1),RAS;
reserve m for Nat of n;
reserve W for ATLAS of RAS;
reserve v for Vector of W;
reserve x,y for Tuple of (n+1),W;
reserve RAS for ReperAlgebra of n;
reserve a,b,pm,p9m,p99m for Point of RAS;
reserve p for Tuple of (n+1),RAS;
reserve W for ATLAS of RAS;
reserve v for Vector of W;
reserve x for Tuple of (n+1),W;

theorem
  m<=n implies (RAS is_alternative_in m iff for x holds Phi((x+*(m+1,x.m
  ))) = 0. W )
proof
  assume
A1: m<=n;
  thus RAS is_alternative_in m implies for x holds Phi((x+*(m+1,x.m))) = 0.W
  proof
    set a = the Point of RAS;
    assume
A2: RAS is_alternative_in m;
    let x;
    set p = (a,x).W, b = (a,(0.W)).W;
    set p9 = (p+*(m+1,p.m));
    b = a by MIDSP_2:34;
    then
A3: *'(a,p9) = b by A2;
    (a,((x+*(m+1,x.m)))).W = p9 by A1,Th32;
    hence thesis by A3,Th24;
  end;
    assume
A4: for x holds Phi((x+*(m+1,x.m))) = 0.W;
    for a,p,pm st p.m = pm holds *'(a,p+*(m+1,pm)) = a
    proof
      let a,p,pm such that
A5:   p.m = pm;
      set x = W.(a,p), v = W.(a,a);
      set x9 = (x+*(m+1,x.m));
      v = 0.W by MIDSP_2:33;
      then
A6:   Phi(x9) = v by A4;
      W.(a,((p+*(m+1,p.m)))) = x9 by A1,Th31;
      hence thesis by A5,A6,Th23;
    end;
    hence thesis;
end;
