TPTP Problem File: DAT429^1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : DAT429^1 : TPTP v9.2.1. Released v9.2.0.
% Domain : Data Structures
% Problem : Reversal of a red-black-tree is an involution, bad tree
% Version : Especial.
% English :
% Refs : [RRB23] Rothgang et al. (2023), Theorem Proving in Dependently
% : [Rot25] Rothgang (2025), Email to Geoff Sutcliffe
% : [RK+25] Ranalter et al. (2025), The Dependently Typed Higher-O
% Source : [Rot25]
% Names : RedBlackTree/bad_tree.p [Rot25]
% Status : Theorem
% Rating : ? v9.2.0
% Syntax : Number of formulae : 11 ( 1 unt; 10 typ; 0 def)
% Number of atoms : 1 ( 1 equ; 0 cnn)
% Maximal formula atoms : 1 ( 1 avg)
% Number of connectives : 36 ( 0 ~; 0 |; 0 &; 36 @)
% ( 0 <=>; 0 =>; 0 <=; 0 <~>)
% Maximal formula depth : 9 ( 9 avg)
% Number of types : 2 ( 2 usr)
% Number of type decls : 10 ( 3 !>P; 2 !>D)
% Number of type conns : 10 ( 10 >; 0 *; 0 +; 0 <<)
% Number of symbols : 9 ( 8 usr; 3 con; 0-7 aty)
% Number of variables : 15 ( 0 ^; 5 !; 3 ?; 15 :)
% ( 7 !>; 0 ?*; 0 @-; 0 @+)
% SPC : DH1_THM_EQU_NAR
% Comments :
%------------------------------------------------------------------------------
thf(color_type,type,
color: $tType ).
thf(black_type,type,
black: color ).
thf(red_type,type,
red: color ).
thf(nat_type,type,
nat: $tType ).
thf(zero_type,type,
zero: nat ).
thf(suc_type,type,
suc: nat > nat ).
thf(tree_type,type,
tree: $tType > color > nat > $tType ).
thf(leaf_type,type,
leaf:
!>[A: $tType] : ( tree @ A @ black @ zero ) ).
thf(redTree_type,type,
rt:
!>[A: $tType,N: nat] : ( ( tree @ A @ black @ N ) > A > ( tree @ A @ black @ N ) > ( tree @ A @ red @ N ) ) ).
thf(blackTree_type,type,
bt:
!>[A: $tType,N: nat,C1: color,C2: color] : ( ( tree @ A @ C1 @ N ) > A > ( tree @ A @ C2 @ N ) > ( tree @ A @ black @ ( suc @ N ) ) ) ).
thf(bad_tree,conjecture,
! [A: $tType,N: nat,C1: color,C2: color,T: tree @ A @ red @ N] :
? [X: A,T1: tree @ A @ C1 @ N,T2: tree @ A @ C1 @ N] :
( T
= ( rt @ A @ N @ T1 @ X @ T2 ) ) ).
%------------------------------------------------------------------------------