 reserve A,B,O for Ordinal,
      n,m for Nat,
      a,b,o for object,
      x,y,z for Surreal,
      X,Y,Z for set,
      Inv,I1,I2 for Function;

theorem Th26:
  x is positive & No_inverses_on ||.x.|| c= Inv implies
        inv x = [ Union divL(||.x.||,Inv),Union divR(||.x.||,Inv)]
proof
  set A=born x,Nx=||.x.||;
  assume A1: x is positive & No_inverses_on Nx c= Inv;
  consider S be c=-monotone Function-yielding Sequence such that
A2:  dom S = succ A & No_inverse_op A = S.A and
A3:  for B be Ordinal st B in succ A
         ex SB be ManySortedSet of Positives B st S.B = SB &
           for o be object st o in Positives B holds
             SB.o = [ Union divL(||.o.||,(union rng (S|B))),
                      Union divR(||.o.||,(union rng (S|B)))] by Def11;
  consider SB be ManySortedSet of Positives A such that
A4:  S.A = SB and
A5:  for o be object st o in Positives A holds
             SB.o = [ Union divL(||.o.||,(union rng (S|A))),
                      Union divR(||.o.||,(union rng (S|A)))] by A3,ORDINAL1:6;
  set UA=union rng (S|A);
  x in Day A by SURREAL0:def 18;
  then
A6: x in Positives A by A1,Def10;
  set XX = (L_Nx \/ R_Nx)\{0_No};
A7: XX c= Positives A by A1,Th24;
A8: XX c= L_x \/ R_x by A1,Th20;
  XX c= dom UA
  proof
    let o;
    assume
A9: o in XX;
    then reconsider o as Surreal by SURREAL0:def 16;
    set b = born o;
A10:0_No < o by A7,A9,Def10;
    o in Day b by SURREAL0:def 18;
    then
A11:o in Positives b by A10,Def10;
A12:born o in A by A9,A8,SURREALO:1;
    b in succ A by ORDINAL1:8,A9,A8,SURREALO:1;
    then ex SB be ManySortedSet of Positives b st S.b = SB &
            for o be object st o in Positives b holds
              SB.o = [ Union divL(||.o.||,(union rng (S|b))),
                       Union divR(||.o.||,(union rng (S|b)))] by A3;
    then o in dom (S.b) by A11,PARTFUN1:def 2;
    hence thesis by A12,SURREALR:5;
  end;
  then
A13: dom (UA|XX) = XX by RELAT_1:62;
  XX=dom (No_inverses_on Nx) c= dom Inv by RELAT_1:11,A1,Def13;
  then
A14: dom(Inv|XX)=XX by RELAT_1:62;
  a in XX implies (UA|XX).a = (Inv|XX).a
  proof
    assume
A15: a in XX;
    then reconsider o=a as Surreal by SURREAL0:def 16;
A16: (UA|XX).a = UA.a by A15,FUNCT_1:49;
    set b = born o;
A17: 0_No < o by A7,A15,Def10;
    o in Day b by SURREAL0:def 18;
    then
A18: o in Positives b by A17,Def10;
A19: born o in A by A15,A8,SURREALO:1;
A20: b in succ A by ORDINAL1:8,A15,A8,SURREALO:1;
    then ex SB be ManySortedSet of Positives b st S.b = SB &
    for o be object st o in Positives b holds
    SB.o = [ Union divL(||.o.||,(union rng (S|b))),
    Union divR(||.o.||,(union rng (S|b)))] by A3;
    then
A21: o in dom (S.b) by A18,PARTFUN1:def 2;
    then
A22: UA.o = (union rng S).o by A19,SURREALR:5;
A23: b in dom S by ORDINAL1:8,A15,A8,SURREALO:1, A2;
A24: No_inverse_op b = S.b by A2,A3,Th25,A20;
A25: (Inv|XX).o = Inv.o by A15,FUNCT_1:49;
A26: o in dom No_inverses_on Nx by A15,Def13;
    (No_inverses_on Nx).o = inv o by A15,Def13;
    then [o,inv o] in No_inverses_on Nx by A26,FUNCT_1:1;
    then (Inv|XX).o = inv o by A1,A25,FUNCT_1:1;
    hence thesis by A24,A16,A22,A21,A23,SURREALR:2;
  end;
  then UA|XX = Inv|XX by A13,A14,FUNCT_1:2;
  then divL(Nx,UA) = divL(Nx,Inv) & divR(Nx,UA) = divR(Nx,Inv) by Th17;
  hence thesis by A6,A4,A5,A2;
end;
