reserve x for set,
  i,j,k,n for Nat,
  K for Field;

theorem Th3:
  for f being one-to-one Function st dom f = Seg 2 & rng f = Seg 2
  holds f = id Seg 2 or f = Rev id Seg 2
proof
  let f be one-to-one Function;
A1: dom idseq 2 = Seg 2 by RELAT_1:45;
  assume that
A2: dom f = Seg 2 and
A3: rng f = Seg 2;
A4: 1 in dom f by A2;
  then f.1 in rng f by FUNCT_1:3;
  then
A5: f.1 = 1 or f.1 = 2 by A3,FINSEQ_1:2,TARSKI:def 2;
A6: 2 in dom f by A2;
  then f.2 in rng f by FUNCT_1:3;
  then
A7: f.2 = 2 or f.2 = 1 by A3,FINSEQ_1:2,TARSKI:def 2;
  per cases by A4,A5,A6,A7,FUNCT_1:def 4;
  suppose
A8: f.1 = 1 & f.2 = 2;
    for x being object st x in Seg 2 holds f.x = x
    proof
      let x be object;
      assume x in Seg 2;
      then x = 1 or x = 2 by FINSEQ_1:2,TARSKI:def 2;
      hence thesis by A8;
    end;
    hence thesis by A2,FUNCT_1:17;
  end;
  suppose
A9: f.1 = 2 & f.2 = 1;
A10: for x being object st x in Seg 2 holds f.x = (Rev id Seg 2).x
    proof
      let x be object;
      assume x in Seg 2;
      then x = 1 or x = 2 by FINSEQ_1:2,TARSKI:def 2;
      hence thesis by A9,Th2;
    end;
    dom f = dom Rev id Seg 2 by A1,A2,FINSEQ_5:57;
    hence thesis by A2,A10,FUNCT_1:2;
  end;
end;
