reserve D for non empty set;
reserve m,n,N for Nat;
reserve size for non zero Nat;
reserve f1,f2,f3,f4,f5,f6 for BinominativeFunction of D;
reserve p1,p2,p3,p4,p5,p6,p7 for PartialPredicate of D;
reserve d,v for object;
reserve V,A for set;
reserve z for Element of V;
reserve val for Function;
reserve loc for V-valued Function;
reserve d1 for NonatomicND of V,A;
reserve T for TypeSCNominativeData of V,A;

theorem Th12:
  loc,val,size are_correct_wrt d1 &
  Seg size c= dom loc & loc|Seg size is one-to-one
  implies
  for j,m,n being Nat st 1 <= j <= n <= m <= size holds
  (LocalOverlapSeq(A,loc,val,d1,size).n).(loc/.j) =
   (LocalOverlapSeq(A,loc,val,d1,size).m).(loc/.j)
  proof
    set F = LocalOverlapSeq(A,loc,val,d1,size);
    assume
A1: loc,val,size are_correct_wrt d1;
    assume
A2: Seg size c= dom loc & loc|Seg size is one-to-one;
    let j,m,n be Nat;
    assume that
A3: 1 <= j and
A4: j <= n and
A5: n <= m and
A6: m <= size;
A7: 1 <= n by A3,A4,XXREAL_0:2;
    set lo = loc/.j;
    defpred P[Nat] means n <= $1 <= size implies (F.n).lo = (F.$1).lo;
A8: P[0];
A9: for k being Nat st P[k] holds P[k+1]
    proof
      let k be Nat such that
A10:  P[k] and
A11:  n <= k+1 and
A12:  k+1 <= size;
      per cases by A11,NAT_1:8;
      suppose
A13:    n <= k;
        then
A14:    1 <= k by A7,XXREAL_0:2;
A15:    k+0 < k+1 by XREAL_1:8;
        then
A16:    k < size by A12,XXREAL_0:2;
A17:    len F = size by Def4;
        set D = denaming(V,A,val.(k+1));
        reconsider d2 = F.k as NonatomicND of V,A by A14,A16,A17,Def6;
A18:    dom D = {d where d is NonatomicND of V,A: val.(k+1) in dom d}
        by NOMIN_1:def 18;
A19:    1 <= k+1 by NAT_1:12;
        then val.(k+1) in dom d2 by A1,A12,A14,A16,Th10;
        then d2 in dom D by A18;
        then reconsider Dd2 = D.d2 as TypeSCNominativeData of V,A
        by PARTFUN1:4,NOMIN_1:39;
A20:    F.(k+1) = local_overlapping(V,A,d2,Dd2,loc/.(k+1))
        by A14,A16,A17,Def4;
A21:    j <= k+0 by A4,A13,XXREAL_0:2;
        j <= m by A4,A5,XXREAL_0:2;
        then
A22:    j <= size by A6,XXREAL_0:2;
        lo in dom d2 by A1,A3,A16,A21,Th9;
        hence thesis by A10,A13,A15,A1,A20,A22,A2,Th1,A3,A12,A21,A19,
        NOMIN_5:3,XXREAL_0:2;
      end;
      suppose n = k+1;
        hence thesis;
      end;
    end;
    for k being Nat holds P[k] from NAT_1:sch 2(A8,A9);
    hence thesis by A6,A5;
  end;
