reserve k, l, m, n, i, j for Nat,
  K, N for non empty Subset of NAT,
  Ke, Ne, Me for Subset of NAT,
  X,Y for set;
reserve f for Function of Segm n,Segm k;
reserve x,y for set;

theorem Th43:
  for l st l<k holds card{f where f is Function of Segm(n+1),Segm k: f is
    onto "increasing & f"{f.n}<>{n} & f.n=l}
  = card{f where f is Function of Segm n,Segm k: f is onto "increasing}
proof
  let l such that
A1: l<k;
  set F2={f where f is Function of Segm n,Segm k: f is onto "increasing};
  set F1={f where f is Function of Segm(n+1),Segm k:
    f is onto "increasing & f"{f.n}<>{n}
  & f.n=l};
  now
    per cases;
    suppose
      k=0 & n<>0;
      hence thesis by A1;
    end;
    suppose
A2:   k=0 implies n=0;
      defpred P[object,set,set] means for i,j st Segm i= $2 & Segm j=$3
      ex f be Function of Segm i,Segm j
st f=$1 & f is onto "increasing & (n < i implies f"{f.n}<>{n});
A3:   not n in Segm n;
      set FF2={f where f is Function of Segm n,Segm k: P[f,Segm n,Segm k]};
      set FF1={f where f is Function of (Segm n\/{n}),(Segm k\/{l}):
        P[f,Segm n\/{n},Segm k\/{l}]& rng (f|Segm n) c= Segm k & f.n=l};
A4:   for f be Function of Segm n\/{n},Segm k\/{l} st f.n=l
     holds P[f,Segm n\/{n},Segm k\/{l}] iff P[f|Segm n,Segm n,Segm k]
      proof
        let f9 be Function of Segm n\/{n},Segm k\/{l} such that
A5:     f9.n=l;
        thus P[f9,Segm n\/{n},Segm k\/{l}] implies P[f9|Segm n,Segm n,Segm k]
        proof
          n<=n+1 by NAT_1:13;
          then
A6:       Segm n c= Segm(n+1) by NAT_1:39;
          assume
A7:       P[f9,Segm n\/{n},Segm k\/{l}];
A8:       Segm(n+1)= Segm n\/{n} by AFINSQ_1:2;
          k=k\/{l} by A1,Lm1;
          then consider f be Function of Segm(n+1),Segm k such that
A9:       f=f9 and
A10:      f is onto "increasing and
A11:      n < n+1 implies f"{f.n}<>{n} by A7,A8;
A12:      dom (f|n)=dom f /\ n by RELAT_1:61;
          rng(f|n) c= rng f by RELAT_1:70;
          then
A13:      rng (f|n) c= Segm k by XBOOLE_1:1;
          dom f=n+1 by A1,FUNCT_2:def 1;
          then dom (f|n)=n by A6,A12,XBOOLE_1:28;
          then reconsider fn=f|n as Function of Segm n,Segm k by A13,FUNCT_2:2;
          let i,j such that
A14:      Segm i= Segm n and
A15:      Segm j= Segm k;
          reconsider fi=fn as Function of Segm i,Segm j by A14,A15;
          fi is onto "increasing by A10,A11,A14,A15,Th38,NAT_1:13;
          hence thesis by A9,A14;
        end;
        thus P[f9|Segm n,Segm n,Segm k] implies P[f9,Segm n\/{n},Segm k\/{l}]
        proof
          Segm n\/{n}= Segm(n+1) by AFINSQ_1:2;
          then reconsider f=f9 as Function of n+1,k by A1,Lm1;
          assume P[f9|Segm n,Segm n,Segm k];
          then
A16:      ex fn be Function of Segm n,Segm k
           st fn=f9|n & fn is onto "increasing
          &( n < n implies fn"{fn.n}<>{n});
          let i,j such that
A17:      Segm i= Segm n\/{n} and
A18:      Segm j= Segm k\/{l};
          reconsider f1=f as Function of Segm i,Segm j by A17,A18;
  for f be Function of Segm n,Segm k,
      g be Function of Segm(n+1),Segm k st f is onto
  "increasing & f=g|Segm n & g.n < k holds g is onto "increasing & g"{g.n}<>{n}
                by Th41;
          then
A19:      n < i implies f1"{f1.n}<>{n} by A1,A5,A16;
A20:      Segm(n+1)=i by A17,AFINSQ_1:2;
          k =j by A1,A18,Lm1;
          then f1 is onto "increasing by A1,A5,A16,A20,Th41;
          hence thesis by A19;
        end;
      end;
A21:  Segm k is empty implies Segm n is empty by A2;
A22:  card FF2 = card FF1 from Sch4(A21,A3,A4);
A23:  F2 c=FF2
      proof
        let x be object;
        assume x in F2;
        then
A24:    ex f be Function of Segm n,Segm k st x=f & f is onto "increasing;
        then P[x,n,k];
        hence thesis by A24;
      end;
A25:  F1 c=FF1
      proof
        let x be object;
        assume x in F1;
        then consider f be Function of Segm(n+1),Segm k such that
A26:    f=x and
A27:    f is onto "increasing and
A28:    f"{f.n}<>{n} and
A29:    f.n=l;
A30:    P[f,Segm n\/{n},Segm k\/{l}]
        proof
          let i,j such that
A31:      Segm i= Segm n\/{n} and
A32:      Segm j= Segm k\/{l};
A33:      i=Segm(n+1) by A31,AFINSQ_1:2;
          j=k by A1,A32,Lm1;
          hence thesis by A27,A28,A33;
        end;
A34:    k=k\/{l} by A1,Lm1;
A35:    Segm(n+1)= Segm n\/{n} by AFINSQ_1:2;
        rng (f|Segm n) c= rng f by RELAT_1:70;
        then
        rng (f|Segm n) c= Segm k by XBOOLE_1:1;
        hence thesis by A26,A29,A30,A35,A34;
      end;
A36:  FF2 c= F2
      proof
        let x be object;
        assume x in FF2;
        then consider f be Function of n,k such that
A37:    x=f and
A38:    P[f,n,k];
        ex g be Function of Segm n,Segm k
st g=f & g is onto "increasing & (n < n
        implies g"{g.n}<>{n}) by A38;
        hence thesis by A37;
      end;
      FF1 c=F1
      proof
A39:    Segm(n+1)= Segm n\/{n} by AFINSQ_1:2;
        let x be object;
        assume x in FF1;
        then consider f be Function of (Segm n\/{n}),(Segm k\/{l})such that
A40:    x=f and
A41:    P[f,Segm n\/{n},Segm k\/{l}] and
        rng (f|Segm n) c=k and
A42:    f.n=l;
        k=k\/{l} by A1,Lm1;
        then ex f9 be Function of Segm(n+1),Segm k
st f=f9 & f9 is onto "increasing & (n
        < n+1 implies f9"{f9.n}<>{n}) by A41,A39;
        hence thesis by A40,A42,NAT_1:13;
      end;
      then F1=FF1 by A25;
      hence thesis by A22,A23,A36,XBOOLE_0:def 10;
    end;
  end;
  hence thesis;
end;
