TPTP Problem File: SWC518_1.p

View Solutions - Solve Problem

%------------------------------------------------------------------------------
% File     : SWC518_1 : TPTP v9.0.0. Released v9.0.0.
% Domain   : Software Creation
% Problem  : Atelier-B Proof Obligation: PO 0 47 Group s122 Tag s123
% Version  : Especial.
% English  :

% Refs     : [Deh22] Deharbe (2022), Proof Obligations from the B Formal Me
%          : [Deh24] Deharbe (2024), Email to Geoff Sutcliffe
% Source   : [Deh24]
% Names    : 0012-00001-0-47.tptp [Deh24]

% Status   : Theorem
% Rating   : 0.00 v9.0.0
% Syntax   : Number of formulae    :   72 (  12 unt;  34 typ;   0 def)
%            Number of atoms       :  107 (  41 equ)
%            Maximal formula atoms :    9 (   2 avg)
%            Number of connectives :   82 (  11   ~;   9   |;  28   &)
%                                         (  10 <=>;  24  =>;   0  <=;   0 <~>)
%            Maximal formula depth :   12 (   4 avg)
%            Maximal term depth    :    4 (   1 avg)
%            Number of FOOLs       :    3 (   0 fml;   3 var)
%            Number arithmetic     :  125 (  28 atm;  17 fun;  37 num;  43 var)
%            Number of types       :    7 (   4 usr;   2 ari)
%            Number of type conns  :   23 (  13   >;  10   *;   0   +;   0  <<)
%            Number of predicates  :   10 (   4 usr;   2 prp; 0-3 aty)
%            Number of functors    :   41 (  26 usr;  27 con; 0-2 aty)
%            Number of variables   :   56 (  56   !;   0   ?;  56   :)
% SPC      : TX0_THM_EQU_ARI

% Comments : Autogenerated by PPTRANS-TPTP - github.com/CLEARSY/pptranspog
%------------------------------------------------------------------------------
tff(set_0_type,type,
    set_0: $tType ).

tff(mem0_type,type,
    mem0: ( $int * set_0 ) > $o ).

tff(set_1_type,type,
    set_1: $tType ).

tff(mem1_type,type,
    mem1: ( $real * set_1 ) > $o ).

tff(b_division_type,type,
    divB: ( $int * $int ) > $int ).

tff(b_division_def_1,axiom,
    ! [X: $int,Y: $int] :
      ( ( $lesseq(0,X)
        & $less(0,Y) )
     => ( divB(X,Y) = $quotient_f(X,Y) ) ) ).

tff(b_division_def_2,axiom,
    ! [X: $int,Y: $int] :
      ( ( $lesseq(X,0)
        & $less(0,Y) )
     => ( divB(X,Y) = $uminus($quotient_f($uminus(X),Y)) ) ) ).

tff(b_division_def_3,axiom,
    ! [X: $int,Y: $int] :
      ( ( $lesseq(0,X)
        & $less(Y,0) )
     => ( divB(X,Y) = $quotient_f(X,Y) ) ) ).

tff(b_division_def_4,axiom,
    ! [X: $int,Y: $int] :
      ( ( $lesseq(X,0)
        & $less(Y,0) )
     => ( divB(X,Y) = $quotient_f($uminus(X),$uminus(Y)) ) ) ).

tff(exp_type,type,
    exp: ( $int * $int ) > $int ).

tff(exp_def_1,axiom,
    ! [X: $int] : ( exp(X,0) = 1 ) ).

tff(exp_def_2,axiom,
    ! [X: $int,Y: $int] :
      ( $greatereq(Y,1)
     => ( exp(X,Y) = $sum(X,exp(X,$difference(Y,1))) ) ) ).

tff(rexp_type,type,
    rexp: ( $real * $int ) > $real ).

tff(rexp_def_1,axiom,
    ! [X: $real] :
      ( ( X != 0.0 )
     => ( rexp(X,0) = 1.0 ) ) ).

tff(rexp_def_2,axiom,
    ! [X: $real,Y: $int] :
      ( $greatereq(Y,1)
     => ( rexp(X,Y) = $sum(X,rexp(X,$difference(Y,1))) ) ) ).

tff(isum_type,type,
    isum: set_0 > $int ).

tff(isum_def_1,axiom,
    ! [S: set_0] :
      ( ! [X: $int] : ~ mem0(X,S)
     => ( isum(S) = 0 ) ) ).

tff(isum_def_2,axiom,
    ! [S1: set_0,S2: set_0,E: $int,N: $int] :
      ( ( ( isum(S1) = N )
        & ~ mem0(E,S1)
        & ! [X: $int] :
            ( mem0(X,S2)
           => ( ( X = E )
              | mem0(X,S1) ) )
        & ! [X: $int] :
            ( mem0(X,S1)
           => mem0(X,S2) ) )
     => ( isum(S2) = $sum(N,E) ) ) ).

tff(rsum_type,type,
    rsum: set_1 > $real ).

tff(rsum_def_1,axiom,
    ! [S: set_1,X: $real] :
      ( ~ mem1(X,S)
     => ( rsum(S) = 0.0 ) ) ).

tff(rsum_def_2,axiom,
    ! [S1: set_1,S2: set_1,E: $real,N: $real] :
      ( ( ( rsum(S1) = N )
        & ~ mem1(E,S1)
        & ! [X: $real] :
            ( mem1(X,S2)
           => ( ( X = E )
              | mem1(X,S1) ) )
        & ! [X: $real] :
            ( mem1(X,S1)
           => mem1(X,S2) ) )
     => ( rsum(S2) = $sum(N,E) ) ) ).

tff(iprod_type,type,
    iprod: set_0 > $int ).

tff(iprod_def_1,axiom,
    ! [S: set_0,X: $int] :
      ( ~ mem0(X,S)
     => ( iprod(S) = 1 ) ) ).

tff(iprod_def_2,axiom,
    ! [S1: set_0,S2: set_0,E: $int,N: $int] :
      ( ( ( iprod(S1) = N )
        & ~ mem0(E,S1)
        & ! [X: $int] :
            ( mem0(X,S2)
           => ( ( X = E )
              | mem0(X,S1) ) )
        & ! [X: $int] :
            ( ( ( X = E )
              | mem0(X,S1) )
           => mem0(X,S2) ) )
     => ( isum(S2) = $product(N,E) ) ) ).

tff(rprod_type,type,
    rprod: set_1 > $real ).

tff(rprod_def_1,axiom,
    ! [S: set_1,X: $real] :
      ( ~ mem1(X,S)
     => ( rprod(S) = 1.0 ) ) ).

tff(rprod_def_2,axiom,
    ! [S1: set_1,S2: set_1,E: $real,N: $real] :
      ( ( ( rprod(S1) = N )
        & ~ mem1(E,S1)
        & ! [X: $real] :
            ( mem1(X,S2)
           => ( ( X = E )
              | mem1(X,S1) ) )
        & ! [X: $real] :
            ( ( ( X = E )
              | mem1(X,S1) )
           => mem1(X,S2) ) )
     => ( rprod(S2) = $sum(N,E) ) ) ).

tff(min_int_type,type,
    min_int: $int ).

tff(max_int_type,type,
    max_int: $int ).

tff(min_int_axiom,axiom,
    min_int = $uminus(2147483648) ).

tff(max_int_axiom,axiom,
    max_int = 2147483647 ).

%--------------------------------------------------------------------------
%----Global declarations
tff(g_s0_0_type,type,
    g_s0_0: set_0 ).

tff(g_s10_10_type,type,
    g_s10_10: $int ).

tff(g_s11_11_type,type,
    g_s11_11: set_0 ).

tff(g_s12_12_type,type,
    g_s12_12: set_2 ).

tff(g_s1_1_type,type,
    g_s1_1: $int ).

tff(g_s2_2_type,type,
    g_s2_2: $int ).

tff(g_s3_4_type,type,
    g_s3_4: $int ).

tff(g_s4_3_type,type,
    g_s4_3: set_0 ).

tff(g_s5_6_type,type,
    g_s5_6: $int ).

tff(g_s6_5_type,type,
    g_s6_5: set_0 ).

tff(g_s7_8_type,type,
    g_s7_8: $int ).

tff(g_s8_7_type,type,
    g_s8_7: set_0 ).

tff(g_s9_9_type,type,
    g_s9_9: $int ).

tff(mem2_type,type,
    mem2: ( $o * $int * set_2 ) > $o ).

tff(prod_0_type,type,
    prod_0: $tType ).

tff(prod_0_empty,type,
    prod_0_empty: prod_0 ).

tff(prod_0_insert,type,
    prod_0: ( $o * $int ) > prod_0 ).

tff(prod_0_in,type,
    prod_0_in: ( $o * $int * prod_0 ) > $o ).

tff(set_2_type,type,
    set_2: $tType ).

tff(set_2_empty,type,
    set_2_empty: set_2 ).

tff(set_2_insert,type,
    set_2: prod_0 > set_2 ).

%----Defines
tff('Define:B definitions:0',axiom,
    ! [X_3: $int] :
      ( ( $greatereq(X_3,0)
        & $lesseq(X_3,max_int) )
    <=> ( $greatereq(X_3,0)
        & $lesseq(X_3,max_int) ) ) ).

tff('Define:B definitions:1',axiom,
    ! [X_4: $int] :
      ( ( $greatereq(X_4,min_int)
        & $lesseq(X_4,max_int) )
    <=> ( $greatereq(X_4,min_int)
        & $lesseq(X_4,max_int) ) ) ).

tff('Define:ctx:0',axiom,
    ( ! [X_5: $int] :
        ( mem0(X_5,g_s0_0)
      <=> ( ( X_5 = g_s1_1 )
          | ( X_5 = g_s2_2 ) ) )
    & ( g_s1_1 != g_s2_2 ) ) ).

tff('Define:ctx:1',axiom,
    mem0(g_s3_4,g_s4_3) ).

tff('Define:ctx:10',axiom,
    ( $greatereq(g_s10_10,0)
    & $lesseq(g_s10_10,g_s7_8) ) ).

tff('Define:ctx:11',axiom,
    g_s9_9 != g_s10_10 ).

tff('Define:ctx:12',axiom,
    ! [X_6: $int] :
      ( mem0(X_6,g_s11_11)
    <=> ( ( X_6 = g_s9_9 )
        | ( X_6 = g_s10_10 ) ) ) ).

tff('Define:ctx:13',axiom,
    ! [X_7: $int,X_8: $o] :
      ( mem2((X_8),X_7,g_s12_12)
    <=> ( ( ( (X_8)
          <=> $true )
          & ( X_7 = g_s9_9 ) )
        | ( ( (X_8)
          <=> $false )
          & ( X_7 = g_s10_10 ) ) ) ) ).

tff('Define:ctx:14',axiom,
    ! [X_9: $int] :
      ( mem0(X_9,g_s4_3)
    <=> ( $greatereq(X_9,0)
        & $lesseq(X_9,4294967295) ) ) ).

tff('Define:ctx:15',axiom,
    ! [X_10: $int] :
      ( mem0(X_10,g_s6_5)
    <=> ( $greatereq(X_10,0)
        & $lesseq(X_10,65535) ) ) ).

tff('Define:ctx:16',axiom,
    ! [X_11: $int] :
      ( mem0(X_11,g_s8_7)
    <=> ( $greatereq(X_11,0)
        & $lesseq(X_11,255) ) ) ).

tff('Define:ctx:2',axiom,
    mem0(g_s5_6,g_s6_5) ).

tff('Define:ctx:3',axiom,
    mem0(g_s7_8,g_s8_7) ).

tff('Define:ctx:4',axiom,
    mem0(g_s9_9,g_s8_7) ).

tff('Define:ctx:5',axiom,
    mem0(g_s10_10,g_s8_7) ).

tff('Define:ctx:6',axiom,
    g_s3_4 = 4294967295 ).

tff('Define:ctx:7',axiom,
    g_s5_6 = 65535 ).

tff('Define:ctx:8',axiom,
    g_s7_8 = 255 ).

tff('Define:ctx:9',axiom,
    ( $greatereq(g_s9_9,0)
    & $lesseq(g_s9_9,g_s7_8) ) ).

%Global hypotheses
%----Local hypotheses
%----Goal
tff('Goal',conjecture,
    ! [X_45: $int] :
      ( ( X_45 = 587792384 )
     => mem0(X_45,g_s4_3) ) ).

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