reserve D for non empty set;
reserve f1,f2,f3,f4 for BinominativeFunction of D;
reserve p,q,r,t,w for PartialPredicate of D;
reserve d,v,v1 for object;
reserve V,A for set;
reserve z for Element of V;
reserve d1 for NonatomicND of V,A;
reserve f for SCBinominativeFunction of V,A;
reserve T for TypeSCNominativeData of V,A;
reserve loc for V-valued Function;
reserve val for Function;
reserve n0 for Nat;

theorem Th6:
  V is non empty & A is_without_nonatomicND_wrt V &
  loc/.1, loc/.2, loc/.3, loc/.4 are_mutually_distinct &
  loc,val are_compatible_wrt_4_locs
  implies
  <* valid_factorial_input(V,A,val,n0),
     factorial_var_init(A,loc,val),
     factorial_inv(A,loc,n0) *> is SFHT of ND(V,A)
  proof
    set i = loc/.1, j = loc/.2, n = loc/.3, s = loc/.4;
    set i1 = val.1, j1 = val.2, n1 = val.3, s1 = val.4;
    set D = ND(V,A);
    set I = valid_factorial_input(V,A,val,n0);
    set F = factorial_var_init(A,loc,val);
    set inv = factorial_inv(A,loc,n0);
    set Di = denaming(V,A,i1);
    set Dj = denaming(V,A,j1);
    set Dn = denaming(V,A,n1);
    set Ds = denaming(V,A,s1);
    set asi = SC_assignment(Di,i);
    set asj = SC_assignment(Dj,j);
    set asn = SC_assignment(Dn,n);
    set ass = SC_assignment(Ds,s);
    set S1 = SC_Psuperpos(inv,Ds,s);
    set R1 = SC_Psuperpos(S1,Dn,n);
    set Q1 = SC_Psuperpos(R1,Dj,j);
    set P1 = SC_Psuperpos(Q1,Di,i);
    assume that
A1: V is non empty and
A2: A is_without_nonatomicND_wrt V and
A3: i,j,n,s are_mutually_distinct and
A4: loc,val are_compatible_wrt_4_locs;
A5: <*Q1,asj,R1*> is SFHT of D by NOMIN_3:29;
A6: <*R1,asn,S1*> is SFHT of D by NOMIN_3:29;
A7: <*S1,ass,inv*> is SFHT of D by NOMIN_3:29;
A8: <*P1,asi,Q1*> is SFHT of D by NOMIN_3:29;
    I ||= P1
    proof
      let d be Element of D;
      assume d in dom I & I.d = TRUE;
      then valid_factorial_input_pred V,A,val,n0,d by Def15;
      then consider d1 being NonatomicND of V,A such that
A9:   d = d1 and
A10:  {i1,j1,n1,s1} c= dom d1 and
A11:  d1.i1 = 0 and
A12:  d1.j1 = 1 and
A13:  d1.n1 = n0 and
A14:  d1.s1 = 1;
A15:  i1 in {i1,j1,n1,s1} by ENUMSET1:def 2;
A16:  j1 in {i1,j1,n1,s1} by ENUMSET1:def 2;
A17:  n1 in {i1,j1,n1,s1} by ENUMSET1:def 2;
A18:  s1 in {i1,j1,n1,s1} by ENUMSET1:def 2;
A20:  dom Di = {d where d is NonatomicND of V,A: i1 in dom d}
      by NOMIN_1:def 18;
A21:  dom Dj = {d where d is NonatomicND of V,A: j1 in dom d}
      by NOMIN_1:def 18;
A22:  dom Dn = {d where d is NonatomicND of V,A: n1 in dom d}
      by NOMIN_1:def 18;
A23:  dom Ds = {d where d is NonatomicND of V,A: s1 in dom d}
      by NOMIN_1:def 18;
A24:  dom P1 = {d where d is TypeSCNominativeData of V,A:
      local_overlapping(V,A,d,Di.d,i) in dom Q1 & d in dom Di}
      by NOMIN_2:def 11;
A25:  dom Q1 = {d where d is TypeSCNominativeData of V,A:
      local_overlapping(V,A,d,Dj.d,j) in dom R1 & d in dom Dj}
      by NOMIN_2:def 11;
A26:  dom R1 = {d where d is TypeSCNominativeData of V,A:
      local_overlapping(V,A,d,Dn.d,n) in dom S1 & d in dom Dn}
      by NOMIN_2:def 11;
A27:  dom S1 = {d where d is TypeSCNominativeData of V,A:
      local_overlapping(V,A,d,Ds.d,s) in dom inv & d in dom Ds}
      by NOMIN_2:def 11;
      reconsider Li = local_overlapping(V,A,d1,Di.d1,i) as NonatomicND of V,A
      by NOMIN_2:9;
      reconsider Lj = local_overlapping(V,A,Li,Dj.Li,j) as NonatomicND of V,A
      by NOMIN_2:9;
      reconsider Ln = local_overlapping(V,A,Lj,Dn.Lj,n) as NonatomicND of V,A
      by NOMIN_2:9;
      reconsider Ls = local_overlapping(V,A,Ln,Ds.Ln,s) as NonatomicND of V,A
      by NOMIN_2:9;
A28:  d1 in dom Di by A10,A15,A20;
      then
A29:  Di.d1 is TypeSCNominativeData of V,A by PARTFUN1:4,NOMIN_1:39;
      then
A30:  dom Li = {i} \/ dom d1 by A1,A2,NOMIN_4:4;
      dom inv = D by Def19;
      then
A31:  Ls in dom inv;
A32:  j1 in dom Li by A10,A16,A30,XBOOLE_0:def 3;
      then
A33:  Li in dom Dj by A21;
      then
A34:  Dj.Li is TypeSCNominativeData of V,A by PARTFUN1:4,NOMIN_1:39;
      then
A35:  dom Lj = {j} \/ dom Li by A1,A2,NOMIN_4:4;
A36:  n1 in dom Li by A10,A17,A30,XBOOLE_0:def 3;
      then
A37:  n1 in dom Lj by A35,XBOOLE_0:def 3;
      then
A38:  Lj in dom Dn by A22;
      then
A39:  Dn.Lj is TypeSCNominativeData of V,A by PARTFUN1:4,NOMIN_1:39;
      then
A40:  dom Ln = {n} \/ dom Lj by A1,A2,NOMIN_4:4;
A41:  s1 in dom Li by A10,A18,A30,XBOOLE_0:def 3;
      then
A42:  s1 in dom Lj by A35,XBOOLE_0:def 3;
      then
A43:  s1 in dom Ln by A40,XBOOLE_0:def 3;
      then
A44:  Ln in dom Ds by A23;
      then
A45:  Ln in dom S1 by A27,A31;
A46:  Lj in dom R1 by A26,A45,A38;
      then
A47:  Li in dom Q1 by A25,A33;
      hence
A48:  d in dom P1 by A9,A24,A28;
A49:  factorial_inv_pred A,loc,n0,Ls
      proof
        take Ls;
        thus Ls = Ls;
A50:    Ds.Ln is TypeSCNominativeData of V,A by A44,PARTFUN1:4,NOMIN_1:39;
        then
A51:    dom Ls = {s} \/ dom Ln by A1,A2,NOMIN_4:4;
        i in {i} by TARSKI:def 1;
        then
A52:    i in dom Li by A30,XBOOLE_0:def 3;
        then
A53:    i in dom Lj by A35,XBOOLE_0:def 3;
        then
A54:    i in dom Ln by A40,XBOOLE_0:def 3;
        then
A55:    i in dom Ls by A51,XBOOLE_0:def 3;
        j in {j} by TARSKI:def 1;
        then
A56:    j in dom Lj by A35,XBOOLE_0:def 3;
        then
A57:    j in dom Ln by A40,XBOOLE_0:def 3;
        then
A58:    j in dom Ls by A51,XBOOLE_0:def 3;
        n in {n} by TARSKI:def 1;
        then
A59:    n in dom Ln by A40,XBOOLE_0:def 3;
        then
A60:    n in dom Ls by A51,XBOOLE_0:def 3;
        s in {s} by TARSKI:def 1;
        then s in dom Ls by A51,XBOOLE_0:def 3;
        hence {i,j,n,s} c= dom Ls by A55,A58,A60,ENUMSET1:def 2;
        thus Ls.j = Ln.j by A1,A2,A3,A50,A57,Th3
        .= Lj.j by A1,A2,A3,A39,A56,Th3
        .= Dj.Li by A1,A34,NOMIN_2:10
        .= denaming(j1,Li) by A33,NOMIN_1:def 18
        .= Li.j1 by A32,NOMIN_1:def 12
        .= 1 by A1,A2,A4,A10,A16,A12,A29,Th3;
        thus Ls.n = Ln.n by A1,A2,A3,A50,A59,Th3
        .= Dn.Lj by A1,A39,NOMIN_2:10
        .= denaming(n1,Lj) by A38,NOMIN_1:def 18
        .= Lj.n1 by A37,NOMIN_1:def 12
        .= Li.n1 by A1,A2,A4,A34,A36,Th3
        .= n0 by A1,A2,A4,A10,A17,A13,A29,Th3;
A61:    Ln.s1 = Lj.s1 by A1,A2,A4,A42,A39,Th3
        .= Li.s1 by A1,A2,A4,A34,A41,Th3
        .= 1 by A1,A2,A4,A10,A18,A14,A29,Th3;
        take 0,1;
        thus Ls.i = Ln.i by A1,A2,A3,A50,A54,Th3
        .= Lj.i by A1,A2,A3,A53,A39,Th3
        .= Li.i by A1,A2,A3,A34,A52,Th3
        .= Di.d1 by A1,A29,NOMIN_2:10
        .= denaming(i1,d1) by A28,NOMIN_1:def 18
        .= 0 by A10,A11,A15,NOMIN_1:def 12;
        thus Ls.s = Ds.Ln by A1,A50,NOMIN_2:10
        .= denaming(s1,Ln) by A44,NOMIN_1:def 18
        .= 1 by A61,A43,NOMIN_1:def 12;
        thus 1 = 0! by NEWTON:12;
      end;
      thus P1.d = Q1.Li by A9,A48,NOMIN_2:35
      .= R1.Lj by A47,NOMIN_2:35
      .= S1.Ln by A46,NOMIN_2:35
      .= inv.Ls by A45,NOMIN_2:35
      .= TRUE by A31,A49,Def19;
    end;
    then
A62: <*I,asi,Q1*> is SFHT of D by A8,NOMIN_3:15;
A63: <*PP_inversion(Q1),asj,R1*> is SFHT of D by NOMIN_4:16;
A64: <*PP_inversion(R1),asn,S1*> is SFHT of D by NOMIN_4:16;
     <*PP_inversion(S1),ass,inv*> is SFHT of D by NOMIN_4:16;
     hence thesis by A62,A5,A6,A7,A63,A64,Th2;
   end;
