reserve v for object;
reserve V,A for set;
reserve f for SCBinominativeFunction of V,A;
reserve d for TypeSCNominativeData of V,A;
reserve d1 for NonatomicND of V,A;
reserve a,b,c,z for Element of V;
reserve x,y for object;
reserve p,q,r,s for SCPartialNominativePredicate of V,A;

theorem
  (for d holds a is_a_value_on d) & (for d holds b is_a_value_on d) &
  (for d holds a is_ext_real_on d) & (for d holds b is_ext_real_on d)
  implies
  PP_not(Equality(A,a,b)) = PP_or(less(A,a,b),less(A,b,a))
  proof
    set e = Equality(A,a,b);
    set p = PP_not(e);
    set q = less(A,a,b);
    set r = less(A,b,a);
    set o = PP_or(q,r);
    set L = less(A);
    set E = Equality(A);
    set Da = denaming(V,A,a);
    set Db = denaming(V,A,b);
    assume that
A1: (for d holds a is_a_value_on d) & (for d holds b is_a_value_on d) and
A2: (for d holds a is_ext_real_on d) & (for d holds b is_ext_real_on d);
A3: dom p = dom e by PARTPR_1:def 2;
A4: dom o = {d where d is TypeSCNominativeData of V,A:
    d in dom q & q.d = TRUE or d in dom r & r.d = TRUE
    or d in dom q & q.d = FALSE & d in dom r & r.d = FALSE} by NOMIN_2:16;
A5: dom Da = {d where d is NonatomicND of V,A: a in dom d} by NOMIN_1:def 18;
A6: dom <:Da,Db:> = dom Da /\ dom Db by FUNCT_3:def 7;
A7: dom <:Db,Da:> = dom Db /\ dom Da by FUNCT_3:def 7;
A8: dom e = dom Da /\ dom Db by A1,Th11;
A9: dom q = dom Da /\ dom Db by A1,Th12;
A10: dom r = dom Da /\ dom Db by A1,Th12;
    thus dom p = dom o
    proof
      thus dom p c= dom o
      proof
        let x be object;
        assume
A11:    x in dom p;
        then x in dom Da by A3,A8,XBOOLE_0:def 4;
        then ex da being NonatomicND of V,A st x = da & a in dom da by A5;
        then reconsider x as TypeSCNominativeData of V,A;
A12:    <:Da,Db:>.x = [Da.x,Db.x] by A3,A6,A8,A11,FUNCT_3:def 7;
A13:    <:Db,Da:>.x = [Db.x,Da.x] by A3,A7,A8,A11,FUNCT_3:def 7;
A14:    a is_a_value_on x & b is_a_value_on x by A1;
A15:    q.x = L.(Da.x,Db.x) by A3,A6,A8,A11,A12,FUNCT_1:13;
A16:    r.x = L.(Db.x,Da.x) by A3,A7,A8,A11,A13,FUNCT_1:13;
A17:    a is_ext_real_on x & b is_ext_real_on x by A2;
        per cases;
        suppose Da.x = Db.x;
          then q.x = FALSE & r.x = FALSE by A14,A15,A16,Def12;
          hence thesis by A3,A4,A8,A9,A10,A11;
        end;
        suppose
A18:      Da.x <> Db.x;
          now
            assume q.x <> TRUE & r.x <> TRUE;
            then not Da.x less_pred Db.x & not Db.x less_pred Da.x
            by A14,A15,A16,Def12;
            hence contradiction by A17,A18,Th10;
          end;
          hence thesis by A3,A4,A8,A9,A10,A11;
        end;
      end;
      let x be object;
      assume x in dom o;
      then ex d being TypeSCNominativeData of V,A st
      x = d &
      (d in dom q & q.d = TRUE or d in dom r & r.d = TRUE
      or d in dom q & q.d = FALSE & d in dom r & r.d = FALSE) by A4;
      hence thesis by A1,A3,A8,Th12;
    end;
    let x be object;
    assume
A19: x in dom p;
    then x in dom Da by A3,A8,XBOOLE_0:def 4;
    then consider da being NonatomicND of V,A such that
A20: x = da and a in dom da by A5;
    reconsider x as TypeSCNominativeData of V,A by A20;
A21: x in dom q & x in dom r by A1,A3,A8,A19,Th12;
A22: <:Da,Db:>.x = [Da.x,Db.x] by A3,A6,A8,A19,FUNCT_3:def 7;
A23: <:Db,Da:>.x = [Db.x,Da.x] by A3,A7,A8,A19,FUNCT_3:def 7;
A24: a is_a_value_on x & b is_a_value_on x by A1;
A25: q.x = L.(Da.x,Db.x) by A3,A6,A8,A19,A22,FUNCT_1:13;
A26: r.x = L.(Db.x,Da.x) by A3,A7,A8,A19,A23,FUNCT_1:13;
A27: a is_ext_real_on x & b is_ext_real_on x by A2;
    per cases;
    suppose
A28:  Da.x = Db.x;
      then q.x = FALSE & r.x = FALSE by A24,A25,A26,Def12;
      then
A29:  o.x = FALSE by A21,PARTPR_1:def 4;
      e.x = E.(Da.x,Db.x) by A3,A19,A22,FUNCT_1:12
      .= TRUE by A24,A28,Def9;
      hence thesis by A29,A3,A19,PARTPR_1:def 2;
    end;
    suppose
A30:  Da.x <> Db.x;
      now
        assume q.x <> TRUE & r.x <> TRUE;
        then not Da.x less_pred Db.x & not Db.x less_pred Da.x
        by A24,A25,A26,Def12;
        hence contradiction by A27,A30,Th10;
      end;
      then
A31:  o.x = TRUE by A21,PARTPR_1:def 4;
      e.x = E.(Da.x,Db.x) by A3,A19,A22,FUNCT_1:12
      .= FALSE by A24,A30,Def9;
      hence thesis by A31,A3,A19,PARTPR_1:def 2;
    end;
  end;
