TPTP Problem File: PUZ163_1.p

View Solutions - Solve Problem

%------------------------------------------------------------------------------
% File     : PUZ163_1 : TPTP v9.3.1. Released v9.3.0.
% Domain   : Puzzles
% Problem  : Marriage puzzle
% Version  : Especial.
% English  :

% Refs     : [Kru09] Kruglov (2009), Email to Geoff Sutcliffe
% Source   : [Kru09]
% Names    : married-puzzle.dfg [Kru09]

% Status   : Satisfiable
% Rating   : 0.00 v9.3.0
% Syntax   : Number of formulae    :   54 (   6 unt;  24 typ;   0 def)
%            Number of atoms       :  144 (  55 equ)
%            Maximal formula atoms :   12 (   4 avg)
%            Number of connectives :  114 (   0   ~;  48   |;  42   &)
%                                         (   0 <=>;  24  =>;   0  <=;   0 <~>)
%            Maximal formula depth :   17 (   6 avg)
%            Maximal term depth    :    2 (   1 avg)
%            Number arithmetic     :   86 (  27 atm;  10 fun;  16 num;  33 var)
%            Number of types       :    3 (   1 usr;   1 ari;   0 dat;   0 cdt)
%            Number of type conns  :    6 (   3   >;   3   *;   0   +;   0  <<)
%            Number of predicates  :    7 (   3 usr;   0 prp; 2-2 aty)
%            Number of functors    :   26 (  20 usr;  24 con; 0-2 aty)
%            Number of variables   :   54 (  54   !;   0   ?;  54   :)
% SPC      : TF0_SAT_EQU_ARI_NDT

% Comments :
%------------------------------------------------------------------------------
%----People and numeric marriage durations
tff(type_person,type,
    person: $tType ).

tff(type_johnstone,type,
    johnstone: person ).

tff(type_parker,type,
    parker: person ).

tff(type_watson,type,
    watson: person ).

tff(type_graves,type,
    graves: person ).

tff(type_shearer,type,
    shearer: person ).

tff(type_russell,type,
    russell: person ).

tff(type_douglas,type,
    douglas: person ).

tff(type_charles,type,
    charles: person ).

tff(type_peter,type,
    peter: person ).

tff(type_everett,type,
    everett: person ).

tff(type_elaine,type,
    elaine: person ).

tff(type_joyce,type,
    joyce: person ).

tff(type_marcia,type,
    marcia: person ).

tff(type_elizabeth,type,
    elizabeth: person ).

tff(type_mildred,type,
    mildred: person ).

%----Numeric partner indicators
tff(type_npjohnstone,type,
    npjohnstone: $int ).

tff(type_npparker,type,
    npparker: $int ).

tff(type_npwatson,type,
    npwatson: $int ).

tff(type_npgraves,type,
    npgraves: $int ).

tff(type_npshearer,type,
    npshearer: $int ).

%----Predicates
tff(type_married,type,
    married: ( person * $int ) > $o ).

tff(type_malecouple,type,
    malecouple: ( person * person ) > $o ).

tff(type_femalecouple,type,
    femalecouple: ( person * person ) > $o ).

%----Each male couples with one of the five female surnames
tff(ax1,axiom,
    ! [C: person] :
      ( malecouple(russell,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax2,axiom,
    ! [C: person] :
      ( malecouple(douglas,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax3,axiom,
    ! [C: person] :
      ( malecouple(charles,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax4,axiom,
    ! [C: person] :
      ( malecouple(peter,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax5,axiom,
    ! [C: person] :
      ( malecouple(everett,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

%----Female couples similarly restricted
tff(ax6,axiom,
    ! [C: person] :
      ( femalecouple(elaine,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax7,axiom,
    ! [C: person] :
      ( femalecouple(joyce,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax8,axiom,
    ! [C: person] :
      ( femalecouple(marcia,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax9,axiom,
    ! [C: person] :
      ( femalecouple(elizabeth,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

tff(ax10,axiom,
    ! [C: person] :
      ( femalecouple(mildred,C)
     => ( ( C = johnstone )
        | ( C = parker )
        | ( C = watson )
        | ( C = graves )
        | ( C = shearer ) ) ) ).

%----Each family name married to its numeric partner
tff(ax11,axiom,
    married(johnstone,npjohnstone) ).

tff(ax12,axiom,
    married(parker,npparker) ).

tff(ax13,axiom,
    married(watson,npwatson) ).

tff(ax14,axiom,
    married(graves,npgraves) ).

tff(ax15,axiom,
    married(shearer,npshearer) ).

%----Each family has exactly one numeric marriage value
tff(ax16,axiom,
    ! [X: $int] :
      ( married(johnstone,X)
     => ( X = npjohnstone ) ) ).

tff(ax17,axiom,
    ! [X: $int] :
      ( married(parker,X)
     => ( X = npparker ) ) ).

tff(ax18,axiom,
    ! [X: $int] :
      ( married(watson,X)
     => ( X = npwatson ) ) ).

tff(ax19,axiom,
    ! [X: $int] :
      ( married(graves,X)
     => ( X = npgraves ) ) ).

tff(ax20,axiom,
    ! [X: $int] :
      ( married(shearer,X)
     => ( X = npshearer ) ) ).

%----Joyce has not been married as long as Charles or the Parkers, but longer 
%----than Douglas or the Johnstones.
tff(ax21,axiom,
    ! [X1: person,X2: person,X3: person,M1: $int,M2: $int,M3: $int,M4: $int,M5: $int] :
      ( ( femalecouple(joyce,X1)
        & malecouple(charles,X2)
        & malecouple(douglas,X3)
        & married(X1,M1)
        & married(X2,M2)
        & married(parker,M3)
        & married(X3,M4)
        & married(johnstone,M5) )
     => ( $lesseq(M1,M2)
        & $lesseq(M1,M3)
        & ( $lesseq(M4,M1)
          | $lesseq(M5,M1) ) ) ) ).

%----Elizabeth married twice as long as Watsons, but only half as long as 
%----Russell
tff(ax22,axiom,
    ! [X1: person,X2: person,M1: $int,M2: $int,M3: $int] :
      ( ( femalecouple(elizabeth,X1)
        & malecouple(russell,X2)
        & married(X1,M1)
        & married(X2,M2)
        & married(watson,M3) )
     => ( $lesseq(M1,$product(2,M3))
        & $greatereq(M1,$product(2,M3))
        & $lesseq($product(2,M1),M2)
        & $greatereq($product(2,M1),M2) ) ) ).

%----The Shearers married 10 years longer than Peter, 10 years less than Marcia
tff(ax23,axiom,
    ! [X1: person,X2: person,M1: $int,M2: $int,M3: $int] :
      ( ( femalecouple(marcia,X1)
        & malecouple(peter,X2)
        & married(X1,M1)
        & married(X2,M2)
        & married(shearer,M3) )
     => ( $lesseq(M3,$sum(10,M2))
        & $greatereq(M3,$sum(10,M2))
        & $lesseq($sum(M3,10),M1)
        & $greatereq($sum(M3,10),M1) ) ) ).

%----Douglas and Mildred couples, 25 years less than Graves
tff(ax24,axiom,
    ! [X: person] :
      ( femalecouple(mildred,X)
     => malecouple(douglas,X) ) ).

tff(ax25,axiom,
    ! [X1: person,M1: $int,M2: $int] :
      ( ( femalecouple(mildred,X1)
        & married(X1,M1)
        & married(graves,M2) )
     => ( $lesseq($sum(M1,25),M2)
        & $greatereq($sum(M1,25),M2) ) ) ).

%----Graves married 30 years (longest)
tff(ax26,axiom,
    married(graves,30) ).

tff(ax27,axiom,
    ! [M1: $int,M2: $int,M3: $int,M4: $int] :
      ( ( married(johnstone,M1)
        & married(parker,M2)
        & married(watson,M3)
        & married(shearer,M4) )
     => ( $lesseq(M1,30)
        & $lesseq(M2,30)
        & $lesseq(M3,30)
        & $lesseq(M4,30) ) ) ).

%----Neither Elaine nor the Johnstones married the shortest time
tff(ax28,axiom,
    ! [M1: $int,M2: $int,M3: $int,M4: $int,M5: $int] :
      ( ( married(johnstone,M1)
        & married(parker,M2)
        & married(watson,M3)
        & married(shearer,M4)
        & married(graves,M5) )
     => ( $less(M2,M1)
        | $less(M3,M1)
        | $less(M4,M1)
        | $less(M5,M1) ) ) ).

tff(ax29,axiom,
    ! [X1: person,M1: $int,M2: $int,M3: $int,M4: $int,M5: $int,M6: $int] :
      ( ( femalecouple(elaine,X1)
        & married(X1,M6)
        & married(johnstone,M1)
        & married(parker,M2)
        & married(watson,M3)
        & married(shearer,M4)
        & married(graves,M5) )
     => ( $less(M1,M6)
        | $less(M2,M6)
        | $less(M3,M6)
        | $less(M4,M6)
        | $less(M5,M6) ) ) ).

%----Everett has been married 25 years
tff(ax30,axiom,
    ! [X1: person] :
      ( malecouple(everett,X1)
     => married(X1,25) ) ).

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