reserve a,a1,a2,v,v1,v2,x for object;
reserve V,A for set;
reserve m,n for Nat;
reserve S,S1,S2 for FinSequence;

theorem Th21:
  S1 IsNDRankSeq V,A & S2 IsNDRankSeq V,A implies S1 tolerates S2
  proof
    assume that
A1: S1 IsNDRankSeq V,A and
A2: S2 IsNDRankSeq V,A;
    let x such that
A3: x in dom S1 /\ dom S2;
    defpred P[Nat] means $1 in dom S1 /\ dom S2 implies S1.$1 = S2.$1;
A4: P[0]
    proof
      assume 0 in dom S1 /\ dom S2;
      then 0 in dom S1 by XBOOLE_0:def 4;
      hence thesis by FINSEQ_3:24;
    end;
A5: for n st P[n] holds P[n+1]
    proof
      let n such that
A6:   P[n] and
A7:   n+1 in dom S1 /\ dom S2;
A8:   n+1 in dom S1 by A7,XBOOLE_0:def 4;
A9:   n+1 in dom S2 by A7,XBOOLE_0:def 4;
      per cases;
      suppose n = 0;
        hence S1.(n+1) = S2.(n+1) by A1,A2;
      end;
      suppose n <> 0;
        then
A10:    1 <= n by NAT_1:14;
A11:    n <= n+1 by NAT_1:11;
        n+1 <= len S1 by A8,FINSEQ_3:25;
        then n <= len S1 by A11,XXREAL_0:2;
        then
A12:    n in dom S1 by A10,FINSEQ_3:25;
        n+1 <= len S2 by A9,FINSEQ_3:25;
        then n <= len S2 by A11,XXREAL_0:2;
        then n in dom S2 by A10,FINSEQ_3:25;
        hence S2.(n+1) = NDSS(V,A\/S1.n) by A2,A6,A9,A12,XBOOLE_0:def 4
        .= S1.(n+1) by A1,A8,A12;
      end;
    end;
    for n holds P[n] from NAT_1:sch 2(A4,A5);
    hence thesis by A3;
  end;
