reserve n,m for Nat,
  r,r1,r2,s,t for Real,
  x,y for set;

theorem Th73:
  for D be non empty set, F be PartFunc of D,REAL, r be Real, X be
set, Z being finite set st Z = dom(F|X) holds FinS(F-r, X) = FinS(F,X) - (card
  Z |->r)
proof
  let D be non empty set, F be PartFunc of D,REAL, r be Real;
  let X be set;
   reconsider rr=r as Element of REAL by XREAL_0:def 1;
  defpred P[Nat] means for X be set, G being finite set st G = dom(
  F|X) & $1= card(G) holds FinS(F-r, X) = FinS(F,X) - (card(G)|->r);
A1: for n st P[n] holds P[n+1]
  proof
    let n;
    assume
A2: P[n];
    let X be set, G be finite set;
    assume
A3: G = dom(F|X);
    set frx = FinS(F-rr,X), fx = FinS(F,X);
A4: dom((F-r)|X) = dom(F-r) /\ X by RELAT_1:61
      .=dom F /\ X by VALUED_1:3
      .=dom(F|X) by RELAT_1:61;
    then
A5: len frx = card G by A3,Th67;
A6: FinS(F-r,X), (F-r)|X are_fiberwise_equipotent by A3,A4,Def13;
    then
A7: rng FinS(F-r,X) = rng((F-r)|X) by CLASSES1:75;
    assume
A8: n+1= card(G);
    then
A9: len fx = n+1 by A3,Th67;
    0+1<=n+1 by NAT_1:13;
    then len frx in dom frx by A8,A5,FINSEQ_3:25;
    then frx.(len frx) in rng frx by FUNCT_1:def 3;
    then consider d be Element of D such that
A10: d in dom((F-r)|X) and
A11: ((F-r)|X).d = frx.(len frx) by A7,PARTFUN1:3;
    set Y = X \ {d}, dx = dom(F|X), dy = dom(F|Y), fry = FinS(F-r,Y), fy =
    FinS(F,Y), n1r = (n+1) |-> rr, nr = n |-> rr;
A12: {d} c= dx by A4,A10,ZFMISC_1:31;
    (F-r).d = frx.(len frx) by A10,A11,FUNCT_1:47;
    then
A13: fx.(len fx) = F.d by A3,A4,A10,Th72;
    len fx = card G by A3,Th67;
    then
A14: fx = fx|n ^ <*F.d*> by A8,A13,RFINSEQ:7;
    fx = fy ^ <*F.d*> by A3,A4,A10,A13,Th70;
    then
A15: fy = fx|n by A14,FINSEQ_1:33;
A16: dom(fy - nr)=Seg len(fy - nr) by FINSEQ_1:def 3;
A17: dy=dom F /\ Y by RELAT_1:61;
A18: dx=dom F /\ X by RELAT_1:61;
A19: dy = dx \ {d}
    proof
      thus dy c= dx \ {d}
      proof
        let y be object;
        assume
A20:    y in dy;
        then y in X \ {d} by A17,XBOOLE_0:def 4;
        then
A21:    not y in {d} by XBOOLE_0:def 5;
        y in dom F by A17,A20,XBOOLE_0:def 4;
        then y in dx by A17,A18,A20,XBOOLE_0:def 4;
        hence thesis by A21,XBOOLE_0:def 5;
      end;
      let y be object;
      assume
A22:  y in dx \{d};
      then
A23:  not y in {d} by XBOOLE_0:def 5;
A24:  y in dx by A22,XBOOLE_0:def 5;
      then y in X by A18,XBOOLE_0:def 4;
      then
A25:  y in Y by A23,XBOOLE_0:def 5;
      y in dom F by A18,A24,XBOOLE_0:def 4;
      hence thesis by A17,A25,XBOOLE_0:def 4;
    end;
    then reconsider dx,dy as finite set by A3;
A26: card dy = card dx - card {d} by A12,A19,CARD_2:44
      .= n+1-1 by A3,A8,CARD_1:30
      .= n;
    then len nr = n & len fy = n by Th67,CARD_1:def 7;
    then
A27: len (fy - nr) = n by FINSEQ_2:72;
    (F-r).d = frx.(len frx) by A10,A11,FUNCT_1:47;
    then
A28: frx = frx|n ^ <*(F-r).d*> by A8,A5,RFINSEQ:7;
    fry^<*(F-r).d*>, (F-r)|X are_fiberwise_equipotent by A3,A4,A10,Th66;
    then fry^<*(F-r).d*>, frx are_fiberwise_equipotent by A6,CLASSES1:76;
    then
    frx|n is non-increasing & fry, frx|n are_fiberwise_equipotent by A28,
RFINSEQ:1,20;
    then
A29: fry = frx|n by RFINSEQ:23;
    len n1r = n+1 by CARD_1:def 7;
    then
A30: len (fx - n1r) = n+1 by A9,FINSEQ_2:72;
    then
A31: dom (fx - n1r) = Seg(n+1) by FINSEQ_1:def 3;
    dom((F-r)|X) = dom(F-r) /\ X by RELAT_1:61;
    then d in dom(F-r) by A10,XBOOLE_0:def 4;
    then d in dom F by VALUED_1:3;
    then (F-r).d = F.d - r by VALUED_1:3;
    then
A32: <*(F-r).d*> = <*F.d*> - <*r*> by RVSUM_1:29;
A33: n<n+1 by NAT_1:13;
A34: dom fx = Seg len fx by FINSEQ_1:def 3;
    reconsider Fd = <*F.d*>, rr = <*r*> as FinSequence of REAL by RVSUM_1:145;
    len <*F.d*> =1 & len <*r*> = 1 by FINSEQ_1:40;
    then
A35: len (Fd - rr) = 1 by FINSEQ_2:72;
    then
A36: len ((fy - nr)^(<*F.d*> - <*r*>)) = n+1 by A27,FINSEQ_1:22;
    1 in Seg 1 by FINSEQ_1:1;
    then
A37: 1 in dom(<*F.d*> - <*r*>) by A35,FINSEQ_1:def 3;
A38: <*F.d*>.1=F.d & <*r*>.1=r;
A39: now
      let m be Nat;
      assume
A40:  m in dom (fx - n1r);
      per cases;
      suppose
A41:    m=n+1;
        then
A42:    n1r.m = r by FINSEQ_1:4,FUNCOP_1:7;
        ((fy - nr)^(<*F.d*> - <*r*>)).m = (<*F.d*> - <*r*>).(n+1-n) by A27,A36
,A33,A41,FINSEQ_1:24
          .= F.d - r by A38,A37,VALUED_1:13;
        hence
        (fx - n1r).m = ((fy - nr)^(<*F.d*> - <*r*>)).m by A13,A9,A40,A41,A42,
VALUED_1:13;
      end;
      suppose
A43:    m<>n+1;
        m<=n+1 by A31,A40,FINSEQ_1:1;
        then m<n+1 by A43,XXREAL_0:1;
        then
A44:    m<=n by NAT_1:13;
        reconsider s=fx.m as Element of REAL by XREAL_0:def 1;
A45:    n<=n+1 by NAT_1:11;
A46:    n1r.m=r by A31,A40,FUNCOP_1:7;
A47:    1<=m by A31,A40,FINSEQ_1:1;
        then
A48:    m in Seg n by A44,FINSEQ_1:1;
        then
A49:    m in dom(fy - nr) by A27,FINSEQ_1:def 3;
        1<=n by A47,A44,XXREAL_0:2;
        then n in Seg(n+1) by A45,FINSEQ_1:1;
        then
A50:    (fx|n).m = fx.m by A9,A34,A48,RFINSEQ:6;
        ((fy - nr)^(<*F.d*> - <*r*>)).m = (fy - nr).m & nr.m = r by A27,A16,A48
,FINSEQ_1:def 7,FUNCOP_1:7;
        hence ((fy - nr)^(<*F.d*> - <*r*>)).m = s-r by A15,A50,A49,VALUED_1:13
          .=(fx - n1r).m by A40,A46,VALUED_1:13;
      end;
    end;
    fry = fy - nr by A2,A26;
    hence thesis by A8,A28,A29,A32,A30,A36,A39,FINSEQ_2:9;
  end;
A51: P[ 0 ]
  proof
    let X be set, G be finite set;
    assume
A52: G = dom(F|X);
    assume 0=card(G);
    then
A53: dom(F|X) = {} by A52;
    then FinS(F,X) = FinS(F,{}) by Th63
      .= <*>REAL by Th68;
    then
A54: FinS(F,X) - (card(G)|->rr) = <*>REAL by FINSEQ_2:73;
    dom((F-r)|X) = dom(F-r) /\ X by RELAT_1:61
      .=dom F /\ X by VALUED_1:3
      .=dom(F|X) by RELAT_1:61;
    hence FinS(F-r,X) = FinS(F-r,{}) by A53,Th63
      .= FinS(F,X) - (card(G)|->r) by A54,Th68;
  end;
A55: for n holds P[n] from NAT_1:sch 2(A51,A1);
  let G be finite set;
  assume G = dom(F|X);
  hence thesis by A55;
end;
