reserve C for CategoryStr;
reserve f,f1,f2,f3 for morphism of C;
reserve g1,g2 for morphism of C opp;

theorem Th25:
  for C1,C2 being with_identities CategoryStr
  st the CategoryStr of C1 = the CategoryStr of C2
  holds for f1 being morphism of C1, f2 being morphism of C2 st f1 = f2 holds
  f1 is identity iff f2 is identity
  proof
    let C1,C2 be with_identities CategoryStr;
    assume
A1: the CategoryStr of C1 = the CategoryStr of C2;
    let f1 be morphism of C1;
    let f2 be morphism of C2;
    assume
A2: f1 = f2;
    hereby
      assume
A3:  f1 is identity;
A4:   for f being morphism of C2 st f2 |> f holds f2 (*) f = f
      proof
        let f be morphism of C2;
        assume
A5:    f2 |> f;
        reconsider f3=f as morphism of C1 by A1;
        thus f2 (*) f = (the composition of C2).(f2,f) by A5,Def3
        .= f1 (*) f3 by A5,A2,A1,Def3,Def2
        .= f by A5,A3,Def4,Def2,A1,A2;
      end;
      for f being morphism of C2 st f,f2 are_composable holds f (*) f2 = f
      proof
        let f be morphism of C2;
        assume
A6:    f |> f2;
        reconsider f3=f as morphism of C1 by A1;
        thus f (*) f2 = (the composition of C2).(f,f2) by A6,Def3
        .= f3 (*) f1 by A6,A2,A1,Def3,Def2
        .= f by A6,A3,Def5,Def2,A1,A2;
      end;
      then f2 is right_identity;
      hence f2 is identity by A4,Def4;
    end;
    assume
A7: f2 is identity;
A8: for f being morphism of C1 st f1 |> f holds f1 (*) f = f
    proof
      let f be morphism of C1;
      assume
A9:  f1 |> f;
      reconsider f3=f as morphism of C2 by A1;
      thus f1 (*) f = (the composition of C1).(f1,f) by A9,Def3
      .= f2 (*) f3 by A9,A2,A1,Def3,Def2
      .= f by A9,A7,Def4,Def2,A1,A2;
    end;
    for f being morphism of C1 st f |> f1 holds f (*) f1 = f
    proof
      let f be morphism of C1;
      assume
A10:  f |> f1;
      reconsider f3=f as morphism of C2 by A1;
      thus f (*) f1 = (the composition of C1).(f,f1) by A10,Def3
      .= f3 (*) f2 by A10,A2,A1,Def3,Def2
      .= f by A10,A7,Def5,Def2,A1,A2;
    end;
    then f1 is right_identity;
    hence f1 is identity by A8,Def4;
  end;
