reserve i,j,k,n,m for Nat,
  x,y,z,y1,y2 for object, X,Y,D for set,
  p,q for XFinSequence;
reserve k1,k2 for Nat;
reserve D for non empty set,
  F,G for XFinSequence of D,
  b for BinOp of D,
  d,d1,d2 for Element of D;
reserve F for XFinSequence,
        rF,rF1,rF2 for real-valued XFinSequence,
        r for Real,
        cF,cF1,cF2 for complex-valued XFinSequence,
        c,c1,c2 for Complex;

theorem Th65: ::CARD_FIN:13
for f be Function st
  f.y=x & y in dom f holds {y}\/(f|(dom f\{y}))"{x}=f"{x}
proof
  let f be Function;
  assume that
A1: f.y=x and
A2: y in dom f;
  set d=dom f\{y};
A3: (f|d)"{x} c= f"{x}
  proof
    let x1 be object such that
A4: x1 in (f|d)"{x};
A5: (f|d).x1 in {x} by A4,FUNCT_1:def 7;
A6: x1 in dom (f|d) by A4,FUNCT_1:def 7;
    then dom (f|d)=dom f/\d & f.x1=(f|d).x1 by FUNCT_1:47,RELAT_1:61;
    hence thesis by A6,A5,FUNCT_1:def 7;
  end;
A7: f"{x} c= {y}\/(f|d)"{x}
  proof
    let x1 be object such that
A8: x1 in f"{x};
    x1 in dom f & not x1 in {y} or x1=y by A8,FUNCT_1:def 7,TARSKI:def 1;
    then x1 in dom f & x1 in d & dom (f|d)=dom f/\d or x1=y by RELAT_1:61
,XBOOLE_0:def 5;
    then x1 in dom (f|d) or x1=y by XBOOLE_0:def 4;
    then x1 in dom (f|d) & f.x1=(f|d).x1 & f.x1 in {x} or x1 in {y} by A8,
FUNCT_1:47,def 7,TARSKI:def 1;
    then x1 in (f|d)"{x} or x1 in {y} by FUNCT_1:def 7;
    hence thesis by XBOOLE_0:def 3;
  end;
  {y} c= f"{x}
  proof
    let z be object;
    assume z in {y};
    then
A9: z=y by TARSKI:def 1;
    f.y in {x} by A1,TARSKI:def 1;
    hence thesis by A2,A9,FUNCT_1:def 7;
  end;
  hence thesis by A7,A3,XBOOLE_1:8;
end;
