TPTP Problem File: DAT434^1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : DAT434^1 : TPTP v9.3.1. Released v9.3.0.
% Domain : Data Structures
% Problem : Map and append for lists
% Version : Especial.
% English :
% Refs :
% Source : [TPTP]
% Names : 001 [TPTP]
% Status : Theorem
% Rating : 1.00 v9.3.0
% Syntax : Number of formulae : 11 ( 5 unt; 5 typ; 0 def)
% Number of atoms : 5 ( 5 equ; 0 cnn)
% Maximal formula atoms : 1 ( 0 avg)
% Number of connectives : 83 ( 0 ~; 0 |; 1 &; 80 @)
% ( 0 <=>; 2 =>; 0 <=; 0 <~>)
% Maximal formula depth : 12 ( 6 avg)
% Number of types : 1 ( 0 usr)
% Number of type decls : 5 ( 4 !>P; 0 !>D)
% Number of type conns : 12 ( 12 >; 0 *; 0 +; 0 <<)
% Number of symbols : 6 ( 5 usr; 0 con; 1-4 aty)
% Number of variables : 29 ( 0 ^; 24 !; 0 ?; 29 :)
% ( 5 !>; 0 ?*; 0 @-; 0 @+)
% SPC : TH1_THM_EQU_NAR_NDT
% Comments : Originally from HOL Light
%------------------------------------------------------------------------------
thf(list,type,
list: $tType > $tType ).
thf(nil,type,
nil:
!>[A: $tType] : ( list @ A ) ).
thf(cons,type,
cons:
!>[A: $tType] : ( A > ( list @ A ) > ( list @ A ) ) ).
thf('ind_types/list_INDUCT_',axiom,
! [A: $tType,P: ( list @ A ) > $o] :
( ( ( P @ ( nil @ A ) )
& ! [A0: A,A1: list @ A] :
( ( P @ A1 )
=> ( P @ ( cons @ A @ A0 @ A1 ) ) ) )
=> ! [X: list @ A] : ( P @ X ) ) ).
thf(append,type,
append:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) > ( list @ A ) ) ).
thf('lists/APPEND_0',axiom,
! [A: $tType,L: list @ A] :
( ( append @ A @ ( nil @ A ) @ L )
= L ) ).
thf('lists/APPEND_1',axiom,
! [A: $tType,H: A,T: list @ A,L: list @ A] :
( ( append @ A @ ( cons @ A @ H @ T ) @ L )
= ( cons @ A @ H @ ( append @ A @ T @ L ) ) ) ).
thf(map,type,
map:
!>[A: $tType,B: $tType] : ( ( A > B ) > ( list @ A ) > ( list @ B ) ) ).
thf('lists/MAP_0',axiom,
! [A: $tType,B: $tType,F: A > B] :
( ( map @ A @ B @ F @ ( nil @ A ) )
= ( nil @ B ) ) ).
thf('lists/MAP_1',axiom,
! [B: $tType,A: $tType,F: A > B,H: A,T: list @ A] :
( ( map @ A @ B @ F @ ( cons @ A @ H @ T ) )
= ( cons @ B @ ( F @ H ) @ ( map @ A @ B @ F @ T ) ) ) ).
thf('lists/MAP_APPEND_',conjecture,
! [B: $tType,A: $tType,F: A > B,L1: list @ A,L2: list @ A] :
( ( map @ A @ B @ F @ ( append @ A @ L1 @ L2 ) )
= ( append @ B @ ( map @ A @ B @ F @ L1 ) @ ( map @ A @ B @ F @ L2 ) ) ) ).
%------------------------------------------------------------------------------