TPTP Problem File: SWX202+1.p

View Solutions - Solve Problem

%------------------------------------------------------------------------------
% File     : SWX202+1 : TPTP v9.3.0. Released v9.3.0.
% Domain   : Software Verification
% Problem  : Faulty property about permutations
% Version  : Especial.
% English  :

% Refs     : [CST26] Claessen et al. (2026), Email to Geoff Sutcliffe
% Source   : [CST26]
% Names    : MergeSort_prop_permutation_wrong2.p [CST26]

% Status   : Theorem
% Rating   : 0.96 v9.3.0
% Syntax   : Number of formulae    :   29 (  21 unt;   0 def)
%            Number of atoms       :   37 (  30 equ)
%            Maximal formula atoms :    2 (   1 avg)
%            Number of connectives :   15 (   7   ~;   0   |;   0   &)
%                                         (   1 <=>;   7  =>;   0  <=;   0 <~>)
%            Maximal formula depth :    7 (   3 avg)
%            Maximal term depth    :    6 (   2 avg)
%            Number of predicates  :    2 (   1 usr;   0 prp; 2-2 aty)
%            Number of functors    :   16 (  16 usr;   2 con; 0-2 aty)
%            Number of variables   :   52 (  50   !;   2   ?)
% SPC      : FOF_THM_RFO_SEQ

% Comments :
%------------------------------------------------------------------------------
fof(axiom_001,axiom,
    ! [X,X2] : proj1pair(pair2(X,X2)) = X ).

fof(axiom_002,axiom,
    ! [X,X2] : proj2pair(pair2(X,X2)) = X2 ).

fof(axiom_003,axiom,
    ! [X,X2] : head(cons(X,X2)) = X ).

fof(axiom_004,axiom,
    ! [X,X2] : tail(cons(X,X2)) = X2 ).

fof(axiom_005,axiom,
    ! [X,X2] : nil != cons(X,X2) ).

fof(axiom_006,axiom,
    ! [X] : proj1S(s(X)) = X ).

fof(axiom_007,axiom,
    ! [X] : z != s(X) ).

fof(axiom_008,axiom,
    ! [Y] : splitAtNat(z,Y) = pair2(nil,Y) ).

fof(axiom_009,axiom,
    ! [Z] : splitAtNat(s(Z),nil) = pair2(nil,nil) ).

fof(axiom_010,axiom,
    ! [Z,X2,X3,Ys1,Zs] :
      ( splitAtNat(Z,X3) = pair2(Ys1,Zs)
     => splitAtNat(s(Z),cons(X2,X3)) = pair2(cons(X2,Ys1),Zs) ) ).

fof(axiom_011,axiom,
    ! [Y] : leqNat(z,Y) ).

fof(axiom_012,axiom,
    ! [Z] : ~ leqNat(s(Z),z) ).

fof(axiom_013,axiom,
    ! [Z,M] :
      ( leqNat(s(Z),s(M))
    <=> leqNat(Z,M) ) ).

fof(axiom_014,axiom,
    ! [Y] : merge(nil,Y) = Y ).

fof(axiom_015,axiom,
    ! [Z,Xs] : merge(cons(Z,Xs),nil) = cons(Z,Xs) ).

fof(axiom_016,axiom,
    ! [Z,Xs,Y2,Ys] :
      ( leqNat(Z,Y2)
     => merge(cons(Z,Xs),cons(Y2,Ys)) = cons(Z,merge(Xs,cons(Y2,Ys))) ) ).

fof(axiom_017,axiom,
    ! [Z,Xs,Y2,Ys] :
      ( ~ leqNat(Z,Y2)
     => merge(cons(Z,Xs),cons(Y2,Ys)) = cons(Y2,merge(cons(Z,Xs),Ys)) ) ).

fof(axiom_018,axiom,
    lengthNat(nil) = z ).

fof(axiom_019,axiom,
    ! [Y,Xs] : lengthNat(cons(Y,Xs)) = s(lengthNat(Xs)) ).

fof(axiom_020,axiom,
    div2(z) = z ).

fof(axiom_021,axiom,
    div2(s(z)) = z ).

fof(axiom_022,axiom,
    ! [N] : div2(s(s(N))) = s(div2(N)) ).

fof(axiom_023,axiom,
    msort(nil) = nil ).

fof(axiom_024,axiom,
    ! [Y] : msort(cons(Y,nil)) = cons(Y,nil) ).

fof(axiom_025,axiom,
    ! [Y,X2,X3,Ys1,Zs] :
      ( splitAtNat(div2(lengthNat(cons(Y,cons(X2,X3)))),cons(Y,cons(X2,X3))) = pair2(Ys1,Zs)
     => msort(cons(Y,cons(X2,X3))) = merge(msort(Ys1),msort(Zs)) ) ).

fof(axiom_026,axiom,
    ! [X] : count(X,nil) = z ).

fof(axiom_027,axiom,
    ! [X,Z,Xs] :
      ( Z = X
     => count(X,cons(Z,Xs)) = s(count(X,Xs)) ) ).

fof(axiom_028,axiom,
    ! [X,Z,Xs] :
      ( Z != X
     => count(X,cons(Z,Xs)) = count(X,Xs) ) ).

fof(goal_029,conjecture,
    ? [Xs,X] :
      ~ ( ~ leqNat(count(X,Xs),s(s(s(s(s(z))))))
       => count(s(X),Xs) = count(X,msort(Xs)) ) ).

%------------------------------------------------------------------------------