reserve a,x,y for object, A,B for set,
  l,m,n for Nat;
reserve X,Y for set, x for object,
  p,q for Function-yielding FinSequence,
  f,g,h for Function;
reserve m,n,k for Nat, R for Relation;
reserve i,j for Nat;
reserve F for Function,
  e,x,y,z for object;

theorem Th106:
  for x, y, a being object, f being Function st f.x = f.y holds f.a
  = (f*((id dom f)+*(x,y))).a
proof
  let x, y, a be object, f be Function;
  assume
A1: f.x = f.y;
  set g1 = (id dom f)+*(x,y);
A2: dom id dom f = dom f;
  per cases;
  suppose
    not x in dom f;
    then id dom f = g1 by Def2;
    hence thesis by RELAT_1:52;
  end;
  suppose
A3: x in dom f;
A4: dom g1 = dom f by A2,Th29;
A5: g1.x = y by A2,A3,Th30;
    thus f.a = (f*((id dom f)+*(x,y))).a
    proof
      per cases;
      suppose
A6:     a in dom f;
        now
          assume a <> x;
          then g1.a = (id dom f).a by Th31
            .= a by A6,FUNCT_1:18;
          hence thesis by A4,A6,FUNCT_1:13;
        end;
        hence thesis by A1,A3,A5,A4,FUNCT_1:13;
      end;
      suppose
A7:     not a in dom f;
        dom (f*g1) c= dom g1 by RELAT_1:25;
        then not a in dom (f*g1) by A4,A7;
        then (f*g1).a = {} by FUNCT_1:def 2;
        hence thesis by A7,FUNCT_1:def 2;
      end;
    end;
  end;
end;
