reserve A,B,C,Y,x,y,z for set, U, D for non empty set,
X for non empty Subset of D, d,d1,d2 for Element of D;
reserve P,Q,R for Relation, g for Function, p,q for FinSequence;
reserve f for BinOp of D, i,m,n for Nat;
reserve X for set, f for Function;
reserve U1,U2 for non empty set;

theorem Th21: for R being total Y-defined Relation holds id Y c= R*(R~)
proof
set X=Y; let R be total X-defined Relation; reconsider f=id X as Function;
A1: f={[x,f.x] where x is Element of dom f: x in dom f} by Th20;
now
let z be object;
 assume z in f; then consider x being Element of dom f such that
A2: z=[x,(id X).x] & x in dom (id X) by A1;
x in dom R by A2, PARTFUN1:def 2; then consider y being object such that
A3: [x,y] in R by XTUPLE_0:def 12; [y,x] in R~ by A3, RELAT_1:def 7;
then [x,x] in R*(R~) by A3, RELAT_1:def 8;
hence z in R*(R~) by A2;
end;
hence thesis;
end;
