TPTP Problem File: DAT252^1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : DAT252^1 : TPTP v9.0.0. Released v7.0.0.
% Domain : Data Structures
% Problem : Infinite streams (sequences/lists) 476
% Version : [Bla16] axioms : Especial.
% English :
% Refs : [BH+14] Blanchette et al. (2014), Truly Modular (Co)datatypes
% : [RB15] Reynolds & Blanchette (2015), A Decision Procedure for
% : [Bla16] Blanchette (2016), Email to Geoff Sutcliffe
% Source : [Bla16]
% Names : stream__476.p [Bla16]
% Status : Theorem
% Rating : 1.00 v7.5.0, 0.33 v7.2.0, 0.50 v7.1.0
% Syntax : Number of formulae : 319 ( 154 unt; 60 typ; 0 def)
% Number of atoms : 580 ( 471 equ; 0 cnn)
% Maximal formula atoms : 10 ( 2 avg)
% Number of connectives : 3959 ( 107 ~; 17 |; 73 &;3542 @)
% ( 0 <=>; 220 =>; 0 <=; 0 <~>)
% Maximal formula depth : 27 ( 6 avg)
% Number of types : 3 ( 2 usr)
% Number of type conns : 195 ( 195 >; 0 *; 0 +; 0 <<)
% Number of symbols : 61 ( 58 usr; 5 con; 0-5 aty)
% Number of variables : 1041 ( 22 ^; 905 !; 58 ?;1041 :)
% ( 56 !>; 0 ?*; 0 @-; 0 @+)
% SPC : TH1_THM_EQU_NAR
% Comments : This file was generated by Isabelle (most likely Sledgehammer)
% 2016-07-13 14:42:47.997
%------------------------------------------------------------------------------
%----Could-be-implicit typings (6)
thf(ty_t_Stream__Mirabelle__hbrgyiwlrc_Ostream,type,
stream170649215stream: $tType > $tType ).
thf(ty_t_List_Olist,type,
list: $tType > $tType ).
thf(ty_t_Set_Oset,type,
set: $tType > $tType ).
thf(ty_t_Nat_Onat,type,
nat: $tType ).
thf(ty_t_itself,type,
itself: $tType > $tType ).
thf(ty_tf_a,type,
a: $tType ).
%----Explicit typings (54)
thf(sy_c_BNF__Greatest__Fixpoint_OShift,type,
bNF_Greatest_Shift:
!>[A: $tType] : ( ( set @ ( list @ A ) ) > A > ( set @ ( list @ A ) ) ) ).
thf(sy_c_BNF__Greatest__Fixpoint_OSucc,type,
bNF_Greatest_Succ:
!>[A: $tType] : ( ( set @ ( list @ A ) ) > ( list @ A ) > ( set @ A ) ) ).
thf(sy_c_BNF__Greatest__Fixpoint_Oshift,type,
bNF_Greatest_shift:
!>[A: $tType,B: $tType] : ( ( ( list @ A ) > B ) > A > ( list @ A ) > B ) ).
thf(sy_c_Divides_Odiv__class_Omod,type,
div_mod:
!>[A: $tType] : ( A > A > A ) ).
thf(sy_c_Groups_Ozero__class_Ozero,type,
zero_zero:
!>[A: $tType] : A ).
thf(sy_c_If,type,
if:
!>[A: $tType] : ( $o > A > A > A ) ).
thf(sy_c_Lattices_Osup__class_Osup,type,
sup_sup:
!>[A: $tType] : ( A > A > A ) ).
thf(sy_c_List_Oappend,type,
append:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Obind,type,
bind:
!>[A: $tType,B: $tType] : ( ( list @ A ) > ( A > ( list @ B ) ) > ( list @ B ) ) ).
thf(sy_c_List_Obutlast,type,
butlast:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Ocan__select,type,
can_select:
!>[A: $tType] : ( ( A > $o ) > ( set @ A ) > $o ) ).
thf(sy_c_List_Ogen__length,type,
gen_length:
!>[A: $tType] : ( nat > ( list @ A ) > nat ) ).
thf(sy_c_List_Oinsert,type,
insert:
!>[A: $tType] : ( A > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Olast,type,
last:
!>[A: $tType] : ( ( list @ A ) > A ) ).
thf(sy_c_List_Olist_OCons,type,
cons:
!>[A: $tType] : ( A > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Olist_ONil,type,
nil:
!>[A: $tType] : ( list @ A ) ).
thf(sy_c_List_Olist_Ocase__list,type,
case_list:
!>[B: $tType,A: $tType] : ( B > ( A > ( list @ A ) > B ) > ( list @ A ) > B ) ).
thf(sy_c_List_Olist_Ohd,type,
hd:
!>[A: $tType] : ( ( list @ A ) > A ) ).
thf(sy_c_List_Olist_Oset,type,
set2:
!>[A: $tType] : ( ( list @ A ) > ( set @ A ) ) ).
thf(sy_c_List_Olist_Otl,type,
tl:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Olist__ex1,type,
list_ex1:
!>[A: $tType] : ( ( A > $o ) > ( list @ A ) > $o ) ).
thf(sy_c_List_Omaps,type,
maps:
!>[A: $tType,B: $tType] : ( ( A > ( list @ B ) ) > ( list @ A ) > ( list @ B ) ) ).
thf(sy_c_List_On__lists,type,
n_lists:
!>[A: $tType] : ( nat > ( list @ A ) > ( list @ ( list @ A ) ) ) ).
thf(sy_c_List_Oproduct__lists,type,
product_lists:
!>[A: $tType] : ( ( list @ ( list @ A ) ) > ( list @ ( list @ A ) ) ) ).
thf(sy_c_List_Oremdups__adj,type,
remdups_adj:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Oreplicate,type,
replicate:
!>[A: $tType] : ( nat > A > ( list @ A ) ) ).
thf(sy_c_List_Orotate,type,
rotate:
!>[A: $tType] : ( nat > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Orotate1,type,
rotate1:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Osublists,type,
sublists:
!>[A: $tType] : ( ( list @ A ) > ( list @ ( list @ A ) ) ) ).
thf(sy_c_List_Ounion,type,
union:
!>[A: $tType] : ( ( list @ A ) > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_Nat_OSuc,type,
suc: nat > nat ).
thf(sy_c_Nat_Osize__class_Osize,type,
size_size:
!>[A: $tType] : ( A > nat ) ).
thf(sy_c_Pure_Otype,type,
type:
!>[A: $tType] : ( itself @ A ) ).
thf(sy_c_Set_OCollect,type,
collect:
!>[A: $tType] : ( ( A > $o ) > ( set @ A ) ) ).
thf(sy_c_Set_Othe__elem,type,
the_elem:
!>[A: $tType] : ( ( set @ A ) > A ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ocycle,type,
stream317748790_cycle:
!>[A: $tType] : ( ( list @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Oflat,type,
stream942386729e_flat:
!>[A: $tType] : ( ( stream170649215stream @ ( list @ A ) ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Osdrop,type,
stream135081970_sdrop:
!>[A: $tType] : ( nat > ( stream170649215stream @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Osdrop__while,type,
stream1195056575_while:
!>[A: $tType] : ( ( A > $o ) > ( stream170649215stream @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Oshift,type,
stream1035003186_shift:
!>[A: $tType] : ( ( list @ A ) > ( stream170649215stream @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Osmember,type,
stream1586597341member:
!>[A: $tType] : ( A > ( stream170649215stream @ A ) > $o ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Osnth,type,
stream370371455e_snth:
!>[A: $tType] : ( ( stream170649215stream @ A ) > nat > A ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostake,type,
stream1746350922_stake:
!>[A: $tType] : ( nat > ( stream170649215stream @ A ) > ( list @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_OSCons,type,
stream641971652_SCons:
!>[A: $tType] : ( A > ( stream170649215stream @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Ocase__stream,type,
stream1342653232stream:
!>[A: $tType,B: $tType] : ( ( A > ( stream170649215stream @ A ) > B ) > ( stream170649215stream @ A ) > B ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Opred__stream,type,
stream1153105665stream:
!>[A: $tType] : ( ( A > $o ) > ( stream170649215stream @ A ) > $o ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Oshd,type,
stream_Mirabelle_shd:
!>[A: $tType] : ( ( stream170649215stream @ A ) > A ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Osmap,type,
stream2128578057e_smap:
!>[A: $tType,Aa: $tType] : ( ( A > Aa ) > ( stream170649215stream @ A ) > ( stream170649215stream @ Aa ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Osset,type,
stream30925839e_sset:
!>[A: $tType] : ( ( stream170649215stream @ A ) > ( set @ A ) ) ).
thf(sy_c_Stream__Mirabelle__hbrgyiwlrc_Ostream_Ostl,type,
stream_Mirabelle_stl:
!>[A: $tType] : ( ( stream170649215stream @ A ) > ( stream170649215stream @ A ) ) ).
thf(sy_c_member,type,
member:
!>[A: $tType] : ( A > ( set @ A ) > $o ) ).
thf(sy_v_s,type,
s: stream170649215stream @ ( list @ a ) ).
thf(sy_v_x____,type,
x: a ).
thf(sy_v_xs____,type,
xs: list @ a ).
%----Relevant facts (255)
thf(fact_0__092_060open_062xs_A_092_060in_062_Asset_As_092_060close_062,axiom,
member @ ( list @ a ) @ xs @ ( stream30925839e_sset @ ( list @ a ) @ s ) ).
% \<open>xs \<in> sset s\<close>
thf(fact_1__092_060open_062_092_060forall_062xs_092_060in_062sset_As_O_Axs_A_092_060noteq_062_A_091_093_092_060close_062,axiom,
! [X: list @ a] :
( ( member @ ( list @ a ) @ X @ ( stream30925839e_sset @ ( list @ a ) @ s ) )
=> ( X
!= ( nil @ a ) ) ) ).
% \<open>\<forall>xs\<in>sset s. xs \<noteq> []\<close>
thf(fact_2__092_060open_062x_A_092_060in_062_Aset_Axs_092_060close_062,axiom,
member @ a @ x @ ( set2 @ a @ xs ) ).
% \<open>x \<in> set xs\<close>
thf(fact_3_Stream__Mirabelle__hbrgyiwlrc_Osmember__def,axiom,
! [A: $tType] :
( ( stream1586597341member @ A )
= ( ^ [X2: A,S: stream170649215stream @ A] : ( member @ A @ X2 @ ( stream30925839e_sset @ A @ S ) ) ) ) ).
% Stream_Mirabelle_hbrgyiwlrc.smember_def
thf(fact_4_stream_Opred__cong,axiom,
! [A: $tType,X3: stream170649215stream @ A,Ya: stream170649215stream @ A,P: A > $o,Pa: A > $o] :
( ( X3 = Ya )
=> ( ! [Z: A] :
( ( member @ A @ Z @ ( stream30925839e_sset @ A @ Ya ) )
=> ( ( P @ Z )
= ( Pa @ Z ) ) )
=> ( ( stream1153105665stream @ A @ P @ X3 )
= ( stream1153105665stream @ A @ Pa @ Ya ) ) ) ) ).
% stream.pred_cong
thf(fact_5_stream_Opred__mono__strong,axiom,
! [A: $tType,P: A > $o,X3: stream170649215stream @ A,Pa: A > $o] :
( ( stream1153105665stream @ A @ P @ X3 )
=> ( ! [Z: A] :
( ( member @ A @ Z @ ( stream30925839e_sset @ A @ X3 ) )
=> ( ( P @ Z )
=> ( Pa @ Z ) ) )
=> ( stream1153105665stream @ A @ Pa @ X3 ) ) ) ).
% stream.pred_mono_strong
thf(fact_6_snth__sset,axiom,
! [A: $tType,S2: stream170649215stream @ A,N: nat] : ( member @ A @ ( stream370371455e_snth @ A @ S2 @ N ) @ ( stream30925839e_sset @ A @ S2 ) ) ).
% snth_sset
thf(fact_7_shd__sset,axiom,
! [A: $tType,A2: stream170649215stream @ A] : ( member @ A @ ( stream_Mirabelle_shd @ A @ A2 ) @ ( stream30925839e_sset @ A @ A2 ) ) ).
% shd_sset
thf(fact_8_stl__sset,axiom,
! [A: $tType,X3: A,A2: stream170649215stream @ A] :
( ( member @ A @ X3 @ ( stream30925839e_sset @ A @ ( stream_Mirabelle_stl @ A @ A2 ) ) )
=> ( member @ A @ X3 @ ( stream30925839e_sset @ A @ A2 ) ) ) ).
% stl_sset
thf(fact_9_stream_Omap__cong,axiom,
! [B: $tType,A: $tType,X3: stream170649215stream @ A,Ya: stream170649215stream @ A,F: A > B,G: A > B] :
( ( X3 = Ya )
=> ( ! [Z: A] :
( ( member @ A @ Z @ ( stream30925839e_sset @ A @ Ya ) )
=> ( ( F @ Z )
= ( G @ Z ) ) )
=> ( ( stream2128578057e_smap @ A @ B @ F @ X3 )
= ( stream2128578057e_smap @ A @ B @ G @ Ya ) ) ) ) ).
% stream.map_cong
thf(fact_10_stream_Omap__cong0,axiom,
! [B: $tType,A: $tType,X3: stream170649215stream @ A,F: A > B,G: A > B] :
( ! [Z: A] :
( ( member @ A @ Z @ ( stream30925839e_sset @ A @ X3 ) )
=> ( ( F @ Z )
= ( G @ Z ) ) )
=> ( ( stream2128578057e_smap @ A @ B @ F @ X3 )
= ( stream2128578057e_smap @ A @ B @ G @ X3 ) ) ) ).
% stream.map_cong0
thf(fact_11_stream_Oinj__map__strong,axiom,
! [B: $tType,A: $tType,X3: stream170649215stream @ A,Xa: stream170649215stream @ A,F: A > B,Fa: A > B] :
( ! [Z: A,Za: A] :
( ( member @ A @ Z @ ( stream30925839e_sset @ A @ X3 ) )
=> ( ( member @ A @ Za @ ( stream30925839e_sset @ A @ Xa ) )
=> ( ( ( F @ Z )
= ( Fa @ Za ) )
=> ( Z = Za ) ) ) )
=> ( ( ( stream2128578057e_smap @ A @ B @ F @ X3 )
= ( stream2128578057e_smap @ A @ B @ Fa @ Xa ) )
=> ( X3 = Xa ) ) ) ).
% stream.inj_map_strong
thf(fact_12_stream_Oset__intros_I2_J,axiom,
! [A: $tType,X3: A,A22: stream170649215stream @ A,A1: A] :
( ( member @ A @ X3 @ ( stream30925839e_sset @ A @ A22 ) )
=> ( member @ A @ X3 @ ( stream30925839e_sset @ A @ ( stream641971652_SCons @ A @ A1 @ A22 ) ) ) ) ).
% stream.set_intros(2)
thf(fact_13_stream_Oset__intros_I1_J,axiom,
! [A: $tType,A1: A,A22: stream170649215stream @ A] : ( member @ A @ A1 @ ( stream30925839e_sset @ A @ ( stream641971652_SCons @ A @ A1 @ A22 ) ) ) ).
% stream.set_intros(1)
thf(fact_14_stream_Oset__cases,axiom,
! [A: $tType,E: A,A2: stream170649215stream @ A] :
( ( member @ A @ E @ ( stream30925839e_sset @ A @ A2 ) )
=> ( ! [Z2: stream170649215stream @ A] :
( A2
!= ( stream641971652_SCons @ A @ E @ Z2 ) )
=> ~ ! [Z1: A,Z2: stream170649215stream @ A] :
( ( A2
= ( stream641971652_SCons @ A @ Z1 @ Z2 ) )
=> ~ ( member @ A @ E @ ( stream30925839e_sset @ A @ Z2 ) ) ) ) ) ).
% stream.set_cases
thf(fact_15_stream_Oinject,axiom,
! [A: $tType,X1: A,X22: stream170649215stream @ A,Y1: A,Y2: stream170649215stream @ A] :
( ( ( stream641971652_SCons @ A @ X1 @ X22 )
= ( stream641971652_SCons @ A @ Y1 @ Y2 ) )
= ( ( X1 = Y1 )
& ( X22 = Y2 ) ) ) ).
% stream.inject
thf(fact_16_stream_Omap__sel_I2_J,axiom,
! [B: $tType,A: $tType,F: A > B,A2: stream170649215stream @ A] :
( ( stream_Mirabelle_stl @ B @ ( stream2128578057e_smap @ A @ B @ F @ A2 ) )
= ( stream2128578057e_smap @ A @ B @ F @ ( stream_Mirabelle_stl @ A @ A2 ) ) ) ).
% stream.map_sel(2)
thf(fact_17_stream_Omap__sel_I1_J,axiom,
! [B: $tType,A: $tType,F: A > B,A2: stream170649215stream @ A] :
( ( stream_Mirabelle_shd @ B @ ( stream2128578057e_smap @ A @ B @ F @ A2 ) )
= ( F @ ( stream_Mirabelle_shd @ A @ A2 ) ) ) ).
% stream.map_sel(1)
thf(fact_18_snth__smap,axiom,
! [A: $tType,B: $tType,F: B > A,S2: stream170649215stream @ B,N: nat] :
( ( stream370371455e_snth @ A @ ( stream2128578057e_smap @ B @ A @ F @ S2 ) @ N )
= ( F @ ( stream370371455e_snth @ B @ S2 @ N ) ) ) ).
% snth_smap
thf(fact_19_stream_Opred__inject,axiom,
! [A: $tType,P: A > $o,A2: A,Aa2: stream170649215stream @ A] :
( ( stream1153105665stream @ A @ P @ ( stream641971652_SCons @ A @ A2 @ Aa2 ) )
= ( ( P @ A2 )
& ( stream1153105665stream @ A @ P @ Aa2 ) ) ) ).
% stream.pred_inject
thf(fact_20_smember__code,axiom,
! [A: $tType,X3: A,Y: A,S2: stream170649215stream @ A] :
( ( stream1586597341member @ A @ X3 @ ( stream641971652_SCons @ A @ Y @ S2 ) )
= ( ( X3 != Y )
=> ( stream1586597341member @ A @ X3 @ S2 ) ) ) ).
% smember_code
thf(fact_21_stream_Ocollapse,axiom,
! [A: $tType,Stream: stream170649215stream @ A] :
( ( stream641971652_SCons @ A @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) )
= Stream ) ).
% stream.collapse
thf(fact_22_stream_Osel_I2_J,axiom,
! [A: $tType,X1: A,X22: stream170649215stream @ A] :
( ( stream_Mirabelle_stl @ A @ ( stream641971652_SCons @ A @ X1 @ X22 ) )
= X22 ) ).
% stream.sel(2)
thf(fact_23_stream_Osel_I1_J,axiom,
! [A: $tType,X1: A,X22: stream170649215stream @ A] :
( ( stream_Mirabelle_shd @ A @ ( stream641971652_SCons @ A @ X1 @ X22 ) )
= X1 ) ).
% stream.sel(1)
thf(fact_24_smap__alt,axiom,
! [A: $tType,B: $tType,F: B > A,S2: stream170649215stream @ B,S3: stream170649215stream @ A] :
( ( ( stream2128578057e_smap @ B @ A @ F @ S2 )
= S3 )
= ( ! [N2: nat] :
( ( F @ ( stream370371455e_snth @ B @ S2 @ N2 ) )
= ( stream370371455e_snth @ A @ S3 @ N2 ) ) ) ) ).
% smap_alt
thf(fact_25_smap__ctr,axiom,
! [B: $tType,A: $tType,F: B > A,S2: stream170649215stream @ B,X3: A,S3: stream170649215stream @ A] :
( ( ( stream2128578057e_smap @ B @ A @ F @ S2 )
= ( stream641971652_SCons @ A @ X3 @ S3 ) )
= ( ( ( F @ ( stream_Mirabelle_shd @ B @ S2 ) )
= X3 )
& ( ( stream2128578057e_smap @ B @ A @ F @ ( stream_Mirabelle_stl @ B @ S2 ) )
= S3 ) ) ) ).
% smap_ctr
thf(fact_26_stream_Omap,axiom,
! [B: $tType,A: $tType,F: A > B,X1: A,X22: stream170649215stream @ A] :
( ( stream2128578057e_smap @ A @ B @ F @ ( stream641971652_SCons @ A @ X1 @ X22 ) )
= ( stream641971652_SCons @ B @ ( F @ X1 ) @ ( stream2128578057e_smap @ A @ B @ F @ X22 ) ) ) ).
% stream.map
thf(fact_27_stream_Oexpand,axiom,
! [A: $tType,Stream: stream170649215stream @ A,Stream2: stream170649215stream @ A] :
( ( ( ( stream_Mirabelle_shd @ A @ Stream )
= ( stream_Mirabelle_shd @ A @ Stream2 ) )
& ( ( stream_Mirabelle_stl @ A @ Stream )
= ( stream_Mirabelle_stl @ A @ Stream2 ) ) )
=> ( Stream = Stream2 ) ) ).
% stream.expand
thf(fact_28_stream_Oexhaust,axiom,
! [A: $tType,Y: stream170649215stream @ A] :
~ ! [X12: A,X23: stream170649215stream @ A] :
( Y
!= ( stream641971652_SCons @ A @ X12 @ X23 ) ) ).
% stream.exhaust
thf(fact_29_stream_Ocoinduct,axiom,
! [A: $tType,R: ( stream170649215stream @ A ) > ( stream170649215stream @ A ) > $o,Stream: stream170649215stream @ A,Stream2: stream170649215stream @ A] :
( ( R @ Stream @ Stream2 )
=> ( ! [Stream3: stream170649215stream @ A,Stream4: stream170649215stream @ A] :
( ( R @ Stream3 @ Stream4 )
=> ( ( ( stream_Mirabelle_shd @ A @ Stream3 )
= ( stream_Mirabelle_shd @ A @ Stream4 ) )
& ( R @ ( stream_Mirabelle_stl @ A @ Stream3 ) @ ( stream_Mirabelle_stl @ A @ Stream4 ) ) ) )
=> ( Stream = Stream2 ) ) ) ).
% stream.coinduct
thf(fact_30_stream_Oexhaust__sel,axiom,
! [A: $tType,Stream: stream170649215stream @ A] :
( Stream
= ( stream641971652_SCons @ A @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) ) ) ).
% stream.exhaust_sel
thf(fact_31_stream_Ocoinduct__strong,axiom,
! [A: $tType,R: ( stream170649215stream @ A ) > ( stream170649215stream @ A ) > $o,Stream: stream170649215stream @ A,Stream2: stream170649215stream @ A] :
( ( R @ Stream @ Stream2 )
=> ( ! [Stream3: stream170649215stream @ A,Stream4: stream170649215stream @ A] :
( ( R @ Stream3 @ Stream4 )
=> ( ( ( stream_Mirabelle_shd @ A @ Stream3 )
= ( stream_Mirabelle_shd @ A @ Stream4 ) )
& ( ( R @ ( stream_Mirabelle_stl @ A @ Stream3 ) @ ( stream_Mirabelle_stl @ A @ Stream4 ) )
| ( ( stream_Mirabelle_stl @ A @ Stream3 )
= ( stream_Mirabelle_stl @ A @ Stream4 ) ) ) ) )
=> ( Stream = Stream2 ) ) ) ).
% stream.coinduct_strong
thf(fact_32_sset__induct,axiom,
! [A: $tType,Y: A,S2: stream170649215stream @ A,P: A > ( stream170649215stream @ A ) > $o] :
( ( member @ A @ Y @ ( stream30925839e_sset @ A @ S2 ) )
=> ( ! [S4: stream170649215stream @ A] : ( P @ ( stream_Mirabelle_shd @ A @ S4 ) @ S4 )
=> ( ! [S4: stream170649215stream @ A,Y3: A] :
( ( member @ A @ Y3 @ ( stream30925839e_sset @ A @ ( stream_Mirabelle_stl @ A @ S4 ) ) )
=> ( ( P @ Y3 @ ( stream_Mirabelle_stl @ A @ S4 ) )
=> ( P @ Y3 @ S4 ) ) )
=> ( P @ Y @ S2 ) ) ) ) ).
% sset_induct
thf(fact_33_stream_Oset__induct,axiom,
! [A: $tType,X3: A,A2: stream170649215stream @ A,P: A > ( stream170649215stream @ A ) > $o] :
( ( member @ A @ X3 @ ( stream30925839e_sset @ A @ A2 ) )
=> ( ! [Z1: A,Z2: stream170649215stream @ A] : ( P @ Z1 @ ( stream641971652_SCons @ A @ Z1 @ Z2 ) )
=> ( ! [Z1: A,Z2: stream170649215stream @ A,Xa2: A] :
( ( member @ A @ Xa2 @ ( stream30925839e_sset @ A @ Z2 ) )
=> ( ( P @ Xa2 @ Z2 )
=> ( P @ Xa2 @ ( stream641971652_SCons @ A @ Z1 @ Z2 ) ) ) )
=> ( P @ X3 @ A2 ) ) ) ) ).
% stream.set_induct
thf(fact_34_stream_Osplit__sel,axiom,
! [B: $tType,A: $tType,P: B > $o,F: A > ( stream170649215stream @ A ) > B,Stream: stream170649215stream @ A] :
( ( P @ ( stream1342653232stream @ A @ B @ F @ Stream ) )
= ( ( Stream
= ( stream641971652_SCons @ A @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) ) )
=> ( P @ ( F @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) ) ) ) ) ).
% stream.split_sel
thf(fact_35_stream_Osplit__sel__asm,axiom,
! [B: $tType,A: $tType,P: B > $o,F: A > ( stream170649215stream @ A ) > B,Stream: stream170649215stream @ A] :
( ( P @ ( stream1342653232stream @ A @ B @ F @ Stream ) )
= ( ~ ( ( Stream
= ( stream641971652_SCons @ A @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) ) )
& ~ ( P @ ( F @ ( stream_Mirabelle_shd @ A @ Stream ) @ ( stream_Mirabelle_stl @ A @ Stream ) ) ) ) ) ) ).
% stream.split_sel_asm
thf(fact_36_sset__cycle,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( stream30925839e_sset @ A @ ( stream317748790_cycle @ A @ Xs ) )
= ( set2 @ A @ Xs ) ) ) ).
% sset_cycle
thf(fact_37_stream_Ocase__eq__if,axiom,
! [B: $tType,A: $tType] :
( ( stream1342653232stream @ A @ B )
= ( ^ [F2: A > ( stream170649215stream @ A ) > B,Stream5: stream170649215stream @ A] : ( F2 @ ( stream_Mirabelle_shd @ A @ Stream5 ) @ ( stream_Mirabelle_stl @ A @ Stream5 ) ) ) ) ).
% stream.case_eq_if
thf(fact_38_flat__Cons,axiom,
! [A: $tType,X3: A,Xs: list @ A,Ws: stream170649215stream @ ( list @ A )] :
( ( stream942386729e_flat @ A @ ( stream641971652_SCons @ ( list @ A ) @ ( cons @ A @ X3 @ Xs ) @ Ws ) )
= ( stream641971652_SCons @ A @ X3
@ ( stream942386729e_flat @ A
@ ( if @ ( stream170649215stream @ ( list @ A ) )
@ ( Xs
= ( nil @ A ) )
@ Ws
@ ( stream641971652_SCons @ ( list @ A ) @ Xs @ Ws ) ) ) ) ) ).
% flat_Cons
thf(fact_39_sdrop__simps_I1_J,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream_Mirabelle_shd @ A @ ( stream135081970_sdrop @ A @ N @ S2 ) )
= ( stream370371455e_snth @ A @ S2 @ N ) ) ).
% sdrop_simps(1)
thf(fact_40_sdrop__while_Osimps,axiom,
! [A: $tType] :
( ( stream1195056575_while @ A )
= ( ^ [P2: A > $o,S: stream170649215stream @ A] : ( if @ ( stream170649215stream @ A ) @ ( P2 @ ( stream_Mirabelle_shd @ A @ S ) ) @ ( stream1195056575_while @ A @ P2 @ ( stream_Mirabelle_stl @ A @ S ) ) @ S ) ) ) ).
% sdrop_while.simps
thf(fact_41_flat__Stream,axiom,
! [A: $tType,Xs: list @ A,Ws: stream170649215stream @ ( list @ A )] :
( ( Xs
!= ( nil @ A ) )
=> ( ( stream942386729e_flat @ A @ ( stream641971652_SCons @ ( list @ A ) @ Xs @ Ws ) )
= ( stream1035003186_shift @ A @ Xs @ ( stream942386729e_flat @ A @ Ws ) ) ) ) ).
% flat_Stream
thf(fact_42_flat_Osimps_I2_J,axiom,
! [A: $tType,Ws: stream170649215stream @ ( list @ A )] :
( ( stream_Mirabelle_stl @ A @ ( stream942386729e_flat @ A @ Ws ) )
= ( stream942386729e_flat @ A
@ ( if @ ( stream170649215stream @ ( list @ A ) )
@ ( ( tl @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws ) )
= ( nil @ A ) )
@ ( stream_Mirabelle_stl @ ( list @ A ) @ Ws )
@ ( stream641971652_SCons @ ( list @ A ) @ ( tl @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws ) ) @ ( stream_Mirabelle_stl @ ( list @ A ) @ Ws ) ) ) ) ) ).
% flat.simps(2)
thf(fact_43_list_Oinject,axiom,
! [A: $tType,X21: A,X222: list @ A,Y21: A,Y22: list @ A] :
( ( ( cons @ A @ X21 @ X222 )
= ( cons @ A @ Y21 @ Y22 ) )
= ( ( X21 = Y21 )
& ( X222 = Y22 ) ) ) ).
% list.inject
thf(fact_44_mem__Collect__eq,axiom,
! [A: $tType,A2: A,P: A > $o] :
( ( member @ A @ A2 @ ( collect @ A @ P ) )
= ( P @ A2 ) ) ).
% mem_Collect_eq
thf(fact_45_Collect__mem__eq,axiom,
! [A: $tType,A3: set @ A] :
( ( collect @ A
@ ^ [X2: A] : ( member @ A @ X2 @ A3 ) )
= A3 ) ).
% Collect_mem_eq
thf(fact_46_Collect__cong,axiom,
! [A: $tType,P: A > $o,Q: A > $o] :
( ! [X4: A] :
( ( P @ X4 )
= ( Q @ X4 ) )
=> ( ( collect @ A @ P )
= ( collect @ A @ Q ) ) ) ).
% Collect_cong
thf(fact_47_ext,axiom,
! [B: $tType,A: $tType,F: A > B,G: A > B] :
( ! [X4: A] :
( ( F @ X4 )
= ( G @ X4 ) )
=> ( F = G ) ) ).
% ext
thf(fact_48_shift__left__inj,axiom,
! [A: $tType,Xs: list @ A,S1: stream170649215stream @ A,S22: stream170649215stream @ A] :
( ( ( stream1035003186_shift @ A @ Xs @ S1 )
= ( stream1035003186_shift @ A @ Xs @ S22 ) )
= ( S1 = S22 ) ) ).
% shift_left_inj
thf(fact_49_sdrop__smap,axiom,
! [A: $tType,B: $tType,N: nat,F: B > A,S2: stream170649215stream @ B] :
( ( stream135081970_sdrop @ A @ N @ ( stream2128578057e_smap @ B @ A @ F @ S2 ) )
= ( stream2128578057e_smap @ B @ A @ F @ ( stream135081970_sdrop @ B @ N @ S2 ) ) ) ).
% sdrop_smap
thf(fact_50_shift__simps_I2_J,axiom,
! [A: $tType,Xs: list @ A,S2: stream170649215stream @ A] :
( ( ( Xs
= ( nil @ A ) )
=> ( ( stream_Mirabelle_stl @ A @ ( stream1035003186_shift @ A @ Xs @ S2 ) )
= ( stream_Mirabelle_stl @ A @ S2 ) ) )
& ( ( Xs
!= ( nil @ A ) )
=> ( ( stream_Mirabelle_stl @ A @ ( stream1035003186_shift @ A @ Xs @ S2 ) )
= ( stream1035003186_shift @ A @ ( tl @ A @ Xs ) @ S2 ) ) ) ) ).
% shift_simps(2)
thf(fact_51_Nil__tl,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( nil @ A )
= ( tl @ A @ Xs ) )
= ( ( Xs
= ( nil @ A ) )
| ? [X2: A] :
( Xs
= ( cons @ A @ X2 @ ( nil @ A ) ) ) ) ) ).
% Nil_tl
thf(fact_52_tl__Nil,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( tl @ A @ Xs )
= ( nil @ A ) )
= ( ( Xs
= ( nil @ A ) )
| ? [X2: A] :
( Xs
= ( cons @ A @ X2 @ ( nil @ A ) ) ) ) ) ).
% tl_Nil
thf(fact_53_transpose_Ocases,axiom,
! [A: $tType,X3: list @ ( list @ A )] :
( ( X3
!= ( nil @ ( list @ A ) ) )
=> ( ! [Xss: list @ ( list @ A )] :
( X3
!= ( cons @ ( list @ A ) @ ( nil @ A ) @ Xss ) )
=> ~ ! [X4: A,Xs2: list @ A,Xss: list @ ( list @ A )] :
( X3
!= ( cons @ ( list @ A ) @ ( cons @ A @ X4 @ Xs2 ) @ Xss ) ) ) ) ).
% transpose.cases
thf(fact_54_not__Cons__self2,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( cons @ A @ X3 @ Xs )
!= Xs ) ).
% not_Cons_self2
thf(fact_55_list_Osel_I3_J,axiom,
! [A: $tType,X21: A,X222: list @ A] :
( ( tl @ A @ ( cons @ A @ X21 @ X222 ) )
= X222 ) ).
% list.sel(3)
thf(fact_56_map__tailrec__rev_Oinduct,axiom,
! [A: $tType,B: $tType,P: ( A > B ) > ( list @ A ) > ( list @ B ) > $o,A0: A > B,A1: list @ A,A22: list @ B] :
( ! [F3: A > B,X12: list @ B] : ( P @ F3 @ ( nil @ A ) @ X12 )
=> ( ! [F3: A > B,A4: A,As: list @ A,Bs: list @ B] :
( ( P @ F3 @ As @ ( cons @ B @ ( F3 @ A4 ) @ Bs ) )
=> ( P @ F3 @ ( cons @ A @ A4 @ As ) @ Bs ) )
=> ( P @ A0 @ A1 @ A22 ) ) ) ).
% map_tailrec_rev.induct
thf(fact_57_list__nonempty__induct,axiom,
! [A: $tType,Xs: list @ A,P: ( list @ A ) > $o] :
( ( Xs
!= ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Xs2: list @ A] :
( ( Xs2
!= ( nil @ A ) )
=> ( ( P @ Xs2 )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) ) ) )
=> ( P @ Xs ) ) ) ) ).
% list_nonempty_induct
thf(fact_58_remdups__adj_Oinduct,axiom,
! [A: $tType,P: ( list @ A ) > $o,A0: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Y3: A,Xs2: list @ A] :
( ( ( X4 = Y3 )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) ) )
=> ( ( ( X4 != Y3 )
=> ( P @ ( cons @ A @ Y3 @ Xs2 ) ) )
=> ( P @ ( cons @ A @ X4 @ ( cons @ A @ Y3 @ Xs2 ) ) ) ) )
=> ( P @ A0 ) ) ) ) ).
% remdups_adj.induct
thf(fact_59_remdups__adj_Ocases,axiom,
! [A: $tType,X3: list @ A] :
( ( X3
!= ( nil @ A ) )
=> ( ! [X4: A] :
( X3
!= ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ~ ! [X4: A,Y3: A,Xs2: list @ A] :
( X3
!= ( cons @ A @ X4 @ ( cons @ A @ Y3 @ Xs2 ) ) ) ) ) ).
% remdups_adj.cases
thf(fact_60_splice_Oinduct,axiom,
! [A: $tType,P: ( list @ A ) > ( list @ A ) > $o,A0: list @ A,A1: list @ A] :
( ! [X12: list @ A] : ( P @ ( nil @ A ) @ X12 )
=> ( ! [V: A,Va: list @ A] : ( P @ ( cons @ A @ V @ Va ) @ ( nil @ A ) )
=> ( ! [X4: A,Xs2: list @ A,Y3: A,Ys: list @ A] :
( ( P @ Xs2 @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) @ ( cons @ A @ Y3 @ Ys ) ) )
=> ( P @ A0 @ A1 ) ) ) ) ).
% splice.induct
thf(fact_61_list__induct2_H,axiom,
! [A: $tType,B: $tType,P: ( list @ A ) > ( list @ B ) > $o,Xs: list @ A,Ys2: list @ B] :
( ( P @ ( nil @ A ) @ ( nil @ B ) )
=> ( ! [X4: A,Xs2: list @ A] : ( P @ ( cons @ A @ X4 @ Xs2 ) @ ( nil @ B ) )
=> ( ! [Y3: B,Ys: list @ B] : ( P @ ( nil @ A ) @ ( cons @ B @ Y3 @ Ys ) )
=> ( ! [X4: A,Xs2: list @ A,Y3: B,Ys: list @ B] :
( ( P @ Xs2 @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) @ ( cons @ B @ Y3 @ Ys ) ) )
=> ( P @ Xs @ Ys2 ) ) ) ) ) ).
% list_induct2'
thf(fact_62_neq__Nil__conv,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
= ( ? [Y4: A,Ys3: list @ A] :
( Xs
= ( cons @ A @ Y4 @ Ys3 ) ) ) ) ).
% neq_Nil_conv
thf(fact_63_list_Oinducts,axiom,
! [A: $tType,P: ( list @ A ) > $o,List: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X12: A,X23: list @ A] :
( ( P @ X23 )
=> ( P @ ( cons @ A @ X12 @ X23 ) ) )
=> ( P @ List ) ) ) ).
% list.inducts
thf(fact_64_list_Oexhaust,axiom,
! [A: $tType,Y: list @ A] :
( ( Y
!= ( nil @ A ) )
=> ~ ! [X212: A,X223: list @ A] :
( Y
!= ( cons @ A @ X212 @ X223 ) ) ) ).
% list.exhaust
thf(fact_65_list_OdiscI,axiom,
! [A: $tType,List: list @ A,X21: A,X222: list @ A] :
( ( List
= ( cons @ A @ X21 @ X222 ) )
=> ( List
!= ( nil @ A ) ) ) ).
% list.discI
thf(fact_66_list_Odistinct_I1_J,axiom,
! [A: $tType,X21: A,X222: list @ A] :
( ( nil @ A )
!= ( cons @ A @ X21 @ X222 ) ) ).
% list.distinct(1)
thf(fact_67_list_Oset__cases,axiom,
! [A: $tType,E: A,A2: list @ A] :
( ( member @ A @ E @ ( set2 @ A @ A2 ) )
=> ( ! [Z2: list @ A] :
( A2
!= ( cons @ A @ E @ Z2 ) )
=> ~ ! [Z1: A,Z2: list @ A] :
( ( A2
= ( cons @ A @ Z1 @ Z2 ) )
=> ~ ( member @ A @ E @ ( set2 @ A @ Z2 ) ) ) ) ) ).
% list.set_cases
thf(fact_68_set__ConsD,axiom,
! [A: $tType,Y: A,X3: A,Xs: list @ A] :
( ( member @ A @ Y @ ( set2 @ A @ ( cons @ A @ X3 @ Xs ) ) )
=> ( ( Y = X3 )
| ( member @ A @ Y @ ( set2 @ A @ Xs ) ) ) ) ).
% set_ConsD
thf(fact_69_list_Oset__intros_I1_J,axiom,
! [A: $tType,A1: A,A22: list @ A] : ( member @ A @ A1 @ ( set2 @ A @ ( cons @ A @ A1 @ A22 ) ) ) ).
% list.set_intros(1)
thf(fact_70_list_Oset__intros_I2_J,axiom,
! [A: $tType,X3: A,A22: list @ A,A1: A] :
( ( member @ A @ X3 @ ( set2 @ A @ A22 ) )
=> ( member @ A @ X3 @ ( set2 @ A @ ( cons @ A @ A1 @ A22 ) ) ) ) ).
% list.set_intros(2)
thf(fact_71_list_Osel_I2_J,axiom,
! [A: $tType] :
( ( tl @ A @ ( nil @ A ) )
= ( nil @ A ) ) ).
% list.sel(2)
thf(fact_72_shift_Osimps_I2_J,axiom,
! [A: $tType,X3: A,Xs: list @ A,S2: stream170649215stream @ A] :
( ( stream1035003186_shift @ A @ ( cons @ A @ X3 @ Xs ) @ S2 )
= ( stream641971652_SCons @ A @ X3 @ ( stream1035003186_shift @ A @ Xs @ S2 ) ) ) ).
% shift.simps(2)
thf(fact_73_cycle__decomp,axiom,
! [A: $tType,U: list @ A] :
( ( U
!= ( nil @ A ) )
=> ( ( stream317748790_cycle @ A @ U )
= ( stream1035003186_shift @ A @ U @ ( stream317748790_cycle @ A @ U ) ) ) ) ).
% cycle_decomp
thf(fact_74_list_Oset__sel_I2_J,axiom,
! [A: $tType,A2: list @ A,X3: A] :
( ( A2
!= ( nil @ A ) )
=> ( ( member @ A @ X3 @ ( set2 @ A @ ( tl @ A @ A2 ) ) )
=> ( member @ A @ X3 @ ( set2 @ A @ A2 ) ) ) ) ).
% list.set_sel(2)
thf(fact_75_shift_Osimps_I1_J,axiom,
! [A: $tType,S2: stream170649215stream @ A] :
( ( stream1035003186_shift @ A @ ( nil @ A ) @ S2 )
= S2 ) ).
% shift.simps(1)
thf(fact_76_sdrop__stl,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream135081970_sdrop @ A @ N @ ( stream_Mirabelle_stl @ A @ S2 ) )
= ( stream_Mirabelle_stl @ A @ ( stream135081970_sdrop @ A @ N @ S2 ) ) ) ).
% sdrop_stl
thf(fact_77_sdrop__while__SCons,axiom,
! [A: $tType,P: A > $o,A2: A,S2: stream170649215stream @ A] :
( ( ( P @ A2 )
=> ( ( stream1195056575_while @ A @ P @ ( stream641971652_SCons @ A @ A2 @ S2 ) )
= ( stream1195056575_while @ A @ P @ S2 ) ) )
& ( ~ ( P @ A2 )
=> ( ( stream1195056575_while @ A @ P @ ( stream641971652_SCons @ A @ A2 @ S2 ) )
= ( stream641971652_SCons @ A @ A2 @ S2 ) ) ) ) ).
% sdrop_while_SCons
thf(fact_78_stream_Ocase,axiom,
! [B: $tType,A: $tType,F: A > ( stream170649215stream @ A ) > B,X1: A,X22: stream170649215stream @ A] :
( ( stream1342653232stream @ A @ B @ F @ ( stream641971652_SCons @ A @ X1 @ X22 ) )
= ( F @ X1 @ X22 ) ) ).
% stream.case
thf(fact_79_flat__unfold,axiom,
! [A: $tType,Ws: stream170649215stream @ ( list @ A )] :
( ( ( stream_Mirabelle_shd @ ( list @ A ) @ Ws )
!= ( nil @ A ) )
=> ( ( stream942386729e_flat @ A @ Ws )
= ( stream1035003186_shift @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws ) @ ( stream942386729e_flat @ A @ ( stream_Mirabelle_stl @ ( list @ A ) @ Ws ) ) ) ) ) ).
% flat_unfold
thf(fact_80_flat_Ocode,axiom,
! [A: $tType] :
( ( stream942386729e_flat @ A )
= ( ^ [Ws2: stream170649215stream @ ( list @ A )] :
( stream641971652_SCons @ A @ ( hd @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws2 ) )
@ ( stream942386729e_flat @ A
@ ( if @ ( stream170649215stream @ ( list @ A ) )
@ ( ( tl @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws2 ) )
= ( nil @ A ) )
@ ( stream_Mirabelle_stl @ ( list @ A ) @ Ws2 )
@ ( stream641971652_SCons @ ( list @ A ) @ ( tl @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws2 ) ) @ ( stream_Mirabelle_stl @ ( list @ A ) @ Ws2 ) ) ) ) ) ) ) ).
% flat.code
thf(fact_81_the__elem__set,axiom,
! [A: $tType,X3: A] :
( ( the_elem @ A @ ( set2 @ A @ ( cons @ A @ X3 @ ( nil @ A ) ) ) )
= X3 ) ).
% the_elem_set
thf(fact_82_not__in__set__insert,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ~ ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
=> ( ( insert @ A @ X3 @ Xs )
= ( cons @ A @ X3 @ Xs ) ) ) ).
% not_in_set_insert
thf(fact_83_insert__Nil,axiom,
! [A: $tType,X3: A] :
( ( insert @ A @ X3 @ ( nil @ A ) )
= ( cons @ A @ X3 @ ( nil @ A ) ) ) ).
% insert_Nil
thf(fact_84_list__ex1__simps_I1_J,axiom,
! [A: $tType,P: A > $o] :
~ ( list_ex1 @ A @ P @ ( nil @ A ) ) ).
% list_ex1_simps(1)
thf(fact_85_shift__simps_I1_J,axiom,
! [A: $tType,Xs: list @ A,S2: stream170649215stream @ A] :
( ( ( Xs
= ( nil @ A ) )
=> ( ( stream_Mirabelle_shd @ A @ ( stream1035003186_shift @ A @ Xs @ S2 ) )
= ( stream_Mirabelle_shd @ A @ S2 ) ) )
& ( ( Xs
!= ( nil @ A ) )
=> ( ( stream_Mirabelle_shd @ A @ ( stream1035003186_shift @ A @ Xs @ S2 ) )
= ( hd @ A @ Xs ) ) ) ) ).
% shift_simps(1)
thf(fact_86_cycle__Cons,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( stream317748790_cycle @ A @ ( cons @ A @ X3 @ Xs ) )
= ( stream641971652_SCons @ A @ X3 @ ( stream317748790_cycle @ A @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) ) ) ) ).
% cycle_Cons
thf(fact_87_hd__Cons__tl,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( cons @ A @ ( hd @ A @ Xs ) @ ( tl @ A @ Xs ) )
= Xs ) ) ).
% hd_Cons_tl
thf(fact_88_same__append__eq,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A,Zs: list @ A] :
( ( ( append @ A @ Xs @ Ys2 )
= ( append @ A @ Xs @ Zs ) )
= ( Ys2 = Zs ) ) ).
% same_append_eq
thf(fact_89_append__same__eq,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A,Zs: list @ A] :
( ( ( append @ A @ Ys2 @ Xs )
= ( append @ A @ Zs @ Xs ) )
= ( Ys2 = Zs ) ) ).
% append_same_eq
thf(fact_90_append__assoc,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A,Zs: list @ A] :
( ( append @ A @ ( append @ A @ Xs @ Ys2 ) @ Zs )
= ( append @ A @ Xs @ ( append @ A @ Ys2 @ Zs ) ) ) ).
% append_assoc
thf(fact_91_append__Nil2,axiom,
! [A: $tType,Xs: list @ A] :
( ( append @ A @ Xs @ ( nil @ A ) )
= Xs ) ).
% append_Nil2
thf(fact_92_append__self__conv,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs @ Ys2 )
= Xs )
= ( Ys2
= ( nil @ A ) ) ) ).
% append_self_conv
thf(fact_93_self__append__conv,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( Xs
= ( append @ A @ Xs @ Ys2 ) )
= ( Ys2
= ( nil @ A ) ) ) ).
% self_append_conv
thf(fact_94_append__self__conv2,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs @ Ys2 )
= Ys2 )
= ( Xs
= ( nil @ A ) ) ) ).
% append_self_conv2
thf(fact_95_self__append__conv2,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A] :
( ( Ys2
= ( append @ A @ Xs @ Ys2 ) )
= ( Xs
= ( nil @ A ) ) ) ).
% self_append_conv2
thf(fact_96_Nil__is__append__conv,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( nil @ A )
= ( append @ A @ Xs @ Ys2 ) )
= ( ( Xs
= ( nil @ A ) )
& ( Ys2
= ( nil @ A ) ) ) ) ).
% Nil_is_append_conv
thf(fact_97_append__is__Nil__conv,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs @ Ys2 )
= ( nil @ A ) )
= ( ( Xs
= ( nil @ A ) )
& ( Ys2
= ( nil @ A ) ) ) ) ).
% append_is_Nil_conv
thf(fact_98_shift__append,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A,S2: stream170649215stream @ A] :
( ( stream1035003186_shift @ A @ ( append @ A @ Xs @ Ys2 ) @ S2 )
= ( stream1035003186_shift @ A @ Xs @ ( stream1035003186_shift @ A @ Ys2 @ S2 ) ) ) ).
% shift_append
thf(fact_99_in__set__insert,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
=> ( ( insert @ A @ X3 @ Xs )
= Xs ) ) ).
% in_set_insert
thf(fact_100_append1__eq__conv,axiom,
! [A: $tType,Xs: list @ A,X3: A,Ys2: list @ A,Y: A] :
( ( ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) )
= ( append @ A @ Ys2 @ ( cons @ A @ Y @ ( nil @ A ) ) ) )
= ( ( Xs = Ys2 )
& ( X3 = Y ) ) ) ).
% append1_eq_conv
thf(fact_101_tl__append2,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( tl @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( append @ A @ ( tl @ A @ Xs ) @ Ys2 ) ) ) ).
% tl_append2
thf(fact_102_hd__append2,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( hd @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( hd @ A @ Xs ) ) ) ).
% hd_append2
thf(fact_103_list_Ocollapse,axiom,
! [A: $tType,List: list @ A] :
( ( List
!= ( nil @ A ) )
=> ( ( cons @ A @ ( hd @ A @ List ) @ ( tl @ A @ List ) )
= List ) ) ).
% list.collapse
thf(fact_104_hd__append,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( Xs
= ( nil @ A ) )
=> ( ( hd @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( hd @ A @ Ys2 ) ) )
& ( ( Xs
!= ( nil @ A ) )
=> ( ( hd @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( hd @ A @ Xs ) ) ) ) ).
% hd_append
thf(fact_105_longest__common__prefix,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
? [Ps: list @ A,Xs3: list @ A,Ys4: list @ A] :
( ( Xs
= ( append @ A @ Ps @ Xs3 ) )
& ( Ys2
= ( append @ A @ Ps @ Ys4 ) )
& ( ( Xs3
= ( nil @ A ) )
| ( Ys4
= ( nil @ A ) )
| ( ( hd @ A @ Xs3 )
!= ( hd @ A @ Ys4 ) ) ) ) ).
% longest_common_prefix
thf(fact_106_append__eq__append__conv2,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A,Zs: list @ A,Ts: list @ A] :
( ( ( append @ A @ Xs @ Ys2 )
= ( append @ A @ Zs @ Ts ) )
= ( ? [Us: list @ A] :
( ( ( Xs
= ( append @ A @ Zs @ Us ) )
& ( ( append @ A @ Us @ Ys2 )
= Ts ) )
| ( ( ( append @ A @ Xs @ Us )
= Zs )
& ( Ys2
= ( append @ A @ Us @ Ts ) ) ) ) ) ) ).
% append_eq_append_conv2
thf(fact_107_append__eq__appendI,axiom,
! [A: $tType,Xs: list @ A,Xs1: list @ A,Zs: list @ A,Ys2: list @ A,Us2: list @ A] :
( ( ( append @ A @ Xs @ Xs1 )
= Zs )
=> ( ( Ys2
= ( append @ A @ Xs1 @ Us2 ) )
=> ( ( append @ A @ Xs @ Ys2 )
= ( append @ A @ Zs @ Us2 ) ) ) ) ).
% append_eq_appendI
thf(fact_108_Cons__eq__appendI,axiom,
! [A: $tType,X3: A,Xs1: list @ A,Ys2: list @ A,Xs: list @ A,Zs: list @ A] :
( ( ( cons @ A @ X3 @ Xs1 )
= Ys2 )
=> ( ( Xs
= ( append @ A @ Xs1 @ Zs ) )
=> ( ( cons @ A @ X3 @ Xs )
= ( append @ A @ Ys2 @ Zs ) ) ) ) ).
% Cons_eq_appendI
thf(fact_109_append__Cons,axiom,
! [A: $tType,X3: A,Xs: list @ A,Ys2: list @ A] :
( ( append @ A @ ( cons @ A @ X3 @ Xs ) @ Ys2 )
= ( cons @ A @ X3 @ ( append @ A @ Xs @ Ys2 ) ) ) ).
% append_Cons
thf(fact_110_eq__Nil__appendI,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( Xs = Ys2 )
=> ( Xs
= ( append @ A @ ( nil @ A ) @ Ys2 ) ) ) ).
% eq_Nil_appendI
thf(fact_111_append__Nil,axiom,
! [A: $tType,Ys2: list @ A] :
( ( append @ A @ ( nil @ A ) @ Ys2 )
= Ys2 ) ).
% append_Nil
thf(fact_112_list_Osel_I1_J,axiom,
! [A: $tType,X21: A,X222: list @ A] :
( ( hd @ A @ ( cons @ A @ X21 @ X222 ) )
= X21 ) ).
% list.sel(1)
thf(fact_113_rev__nonempty__induct,axiom,
! [A: $tType,Xs: list @ A,P: ( list @ A ) > $o] :
( ( Xs
!= ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Xs2: list @ A] :
( ( Xs2
!= ( nil @ A ) )
=> ( ( P @ Xs2 )
=> ( P @ ( append @ A @ Xs2 @ ( cons @ A @ X4 @ ( nil @ A ) ) ) ) ) )
=> ( P @ Xs ) ) ) ) ).
% rev_nonempty_induct
thf(fact_114_append__eq__Cons__conv,axiom,
! [A: $tType,Ys2: list @ A,Zs: list @ A,X3: A,Xs: list @ A] :
( ( ( append @ A @ Ys2 @ Zs )
= ( cons @ A @ X3 @ Xs ) )
= ( ( ( Ys2
= ( nil @ A ) )
& ( Zs
= ( cons @ A @ X3 @ Xs ) ) )
| ? [Ys5: list @ A] :
( ( Ys2
= ( cons @ A @ X3 @ Ys5 ) )
& ( ( append @ A @ Ys5 @ Zs )
= Xs ) ) ) ) ).
% append_eq_Cons_conv
thf(fact_115_Cons__eq__append__conv,axiom,
! [A: $tType,X3: A,Xs: list @ A,Ys2: list @ A,Zs: list @ A] :
( ( ( cons @ A @ X3 @ Xs )
= ( append @ A @ Ys2 @ Zs ) )
= ( ( ( Ys2
= ( nil @ A ) )
& ( ( cons @ A @ X3 @ Xs )
= Zs ) )
| ? [Ys5: list @ A] :
( ( ( cons @ A @ X3 @ Ys5 )
= Ys2 )
& ( Xs
= ( append @ A @ Ys5 @ Zs ) ) ) ) ) ).
% Cons_eq_append_conv
thf(fact_116_rev__exhaust,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ~ ! [Ys: list @ A,Y3: A] :
( Xs
!= ( append @ A @ Ys @ ( cons @ A @ Y3 @ ( nil @ A ) ) ) ) ) ).
% rev_exhaust
thf(fact_117_rev__induct,axiom,
! [A: $tType,P: ( list @ A ) > $o,Xs: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X4: A,Xs2: list @ A] :
( ( P @ Xs2 )
=> ( P @ ( append @ A @ Xs2 @ ( cons @ A @ X4 @ ( nil @ A ) ) ) ) )
=> ( P @ Xs ) ) ) ).
% rev_induct
thf(fact_118_split__list__first__prop__iff,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ( ? [X2: A] :
( ( member @ A @ X2 @ ( set2 @ A @ Xs ) )
& ( P @ X2 ) ) )
= ( ? [Ys3: list @ A,X2: A] :
( ? [Zs2: list @ A] :
( Xs
= ( append @ A @ Ys3 @ ( cons @ A @ X2 @ Zs2 ) ) )
& ( P @ X2 )
& ! [Y4: A] :
( ( member @ A @ Y4 @ ( set2 @ A @ Ys3 ) )
=> ~ ( P @ Y4 ) ) ) ) ) ).
% split_list_first_prop_iff
thf(fact_119_split__list__last__prop__iff,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ( ? [X2: A] :
( ( member @ A @ X2 @ ( set2 @ A @ Xs ) )
& ( P @ X2 ) ) )
= ( ? [Ys3: list @ A,X2: A,Zs2: list @ A] :
( ( Xs
= ( append @ A @ Ys3 @ ( cons @ A @ X2 @ Zs2 ) ) )
& ( P @ X2 )
& ! [Y4: A] :
( ( member @ A @ Y4 @ ( set2 @ A @ Zs2 ) )
=> ~ ( P @ Y4 ) ) ) ) ) ).
% split_list_last_prop_iff
thf(fact_120_in__set__conv__decomp__first,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
= ( ? [Ys3: list @ A,Zs2: list @ A] :
( ( Xs
= ( append @ A @ Ys3 @ ( cons @ A @ X3 @ Zs2 ) ) )
& ~ ( member @ A @ X3 @ ( set2 @ A @ Ys3 ) ) ) ) ) ).
% in_set_conv_decomp_first
thf(fact_121_in__set__conv__decomp__last,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
= ( ? [Ys3: list @ A,Zs2: list @ A] :
( ( Xs
= ( append @ A @ Ys3 @ ( cons @ A @ X3 @ Zs2 ) ) )
& ~ ( member @ A @ X3 @ ( set2 @ A @ Zs2 ) ) ) ) ) ).
% in_set_conv_decomp_last
thf(fact_122_split__list__first__propE,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ~ ! [Ys: list @ A,X4: A] :
( ? [Zs3: list @ A] :
( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
=> ( ( P @ X4 )
=> ~ ! [Xa3: A] :
( ( member @ A @ Xa3 @ ( set2 @ A @ Ys ) )
=> ~ ( P @ Xa3 ) ) ) ) ) ).
% split_list_first_propE
thf(fact_123_split__list__last__propE,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ~ ! [Ys: list @ A,X4: A,Zs3: list @ A] :
( ( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
=> ( ( P @ X4 )
=> ~ ! [Xa3: A] :
( ( member @ A @ Xa3 @ ( set2 @ A @ Zs3 ) )
=> ~ ( P @ Xa3 ) ) ) ) ) ).
% split_list_last_propE
thf(fact_124_split__list__first__prop,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ? [Ys: list @ A,X4: A] :
( ? [Zs3: list @ A] :
( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
& ( P @ X4 )
& ! [Xa3: A] :
( ( member @ A @ Xa3 @ ( set2 @ A @ Ys ) )
=> ~ ( P @ Xa3 ) ) ) ) ).
% split_list_first_prop
thf(fact_125_split__list__last__prop,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ? [Ys: list @ A,X4: A,Zs3: list @ A] :
( ( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
& ( P @ X4 )
& ! [Xa3: A] :
( ( member @ A @ Xa3 @ ( set2 @ A @ Zs3 ) )
=> ~ ( P @ Xa3 ) ) ) ) ).
% split_list_last_prop
thf(fact_126_in__set__conv__decomp,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
= ( ? [Ys3: list @ A,Zs2: list @ A] :
( Xs
= ( append @ A @ Ys3 @ ( cons @ A @ X3 @ Zs2 ) ) ) ) ) ).
% in_set_conv_decomp
thf(fact_127_split__list__propE,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ~ ! [Ys: list @ A,X4: A] :
( ? [Zs3: list @ A] :
( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
=> ~ ( P @ X4 ) ) ) ).
% split_list_propE
thf(fact_128_split__list__first,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
=> ? [Ys: list @ A,Zs3: list @ A] :
( ( Xs
= ( append @ A @ Ys @ ( cons @ A @ X3 @ Zs3 ) ) )
& ~ ( member @ A @ X3 @ ( set2 @ A @ Ys ) ) ) ) ).
% split_list_first
thf(fact_129_split__list__prop,axiom,
! [A: $tType,Xs: list @ A,P: A > $o] :
( ? [X: A] :
( ( member @ A @ X @ ( set2 @ A @ Xs ) )
& ( P @ X ) )
=> ? [Ys: list @ A,X4: A] :
( ? [Zs3: list @ A] :
( Xs
= ( append @ A @ Ys @ ( cons @ A @ X4 @ Zs3 ) ) )
& ( P @ X4 ) ) ) ).
% split_list_prop
thf(fact_130_split__list__last,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
=> ? [Ys: list @ A,Zs3: list @ A] :
( ( Xs
= ( append @ A @ Ys @ ( cons @ A @ X3 @ Zs3 ) ) )
& ~ ( member @ A @ X3 @ ( set2 @ A @ Zs3 ) ) ) ) ).
% split_list_last
thf(fact_131_split__list,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ Xs ) )
=> ? [Ys: list @ A,Zs3: list @ A] :
( Xs
= ( append @ A @ Ys @ ( cons @ A @ X3 @ Zs3 ) ) ) ) ).
% split_list
thf(fact_132_list_Oset__sel_I1_J,axiom,
! [A: $tType,A2: list @ A] :
( ( A2
!= ( nil @ A ) )
=> ( member @ A @ ( hd @ A @ A2 ) @ ( set2 @ A @ A2 ) ) ) ).
% list.set_sel(1)
thf(fact_133_hd__in__set,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( member @ A @ ( hd @ A @ Xs ) @ ( set2 @ A @ Xs ) ) ) ).
% hd_in_set
thf(fact_134_list_Oexpand,axiom,
! [A: $tType,List: list @ A,List2: list @ A] :
( ( ( List
= ( nil @ A ) )
= ( List2
= ( nil @ A ) ) )
=> ( ( ( List
!= ( nil @ A ) )
=> ( ( List2
!= ( nil @ A ) )
=> ( ( ( hd @ A @ List )
= ( hd @ A @ List2 ) )
& ( ( tl @ A @ List )
= ( tl @ A @ List2 ) ) ) ) )
=> ( List = List2 ) ) ) ).
% list.expand
thf(fact_135_cycle_Osimps_I1_J,axiom,
! [A: $tType,Xs: list @ A] :
( ( stream_Mirabelle_shd @ A @ ( stream317748790_cycle @ A @ Xs ) )
= ( hd @ A @ Xs ) ) ).
% cycle.simps(1)
thf(fact_136_cycle_Ocode,axiom,
! [A: $tType] :
( ( stream317748790_cycle @ A )
= ( ^ [Xs4: list @ A] : ( stream641971652_SCons @ A @ ( hd @ A @ Xs4 ) @ ( stream317748790_cycle @ A @ ( append @ A @ ( tl @ A @ Xs4 ) @ ( cons @ A @ ( hd @ A @ Xs4 ) @ ( nil @ A ) ) ) ) ) ) ) ).
% cycle.code
thf(fact_137_cycle_Osimps_I2_J,axiom,
! [A: $tType,Xs: list @ A] :
( ( stream_Mirabelle_stl @ A @ ( stream317748790_cycle @ A @ Xs ) )
= ( stream317748790_cycle @ A @ ( append @ A @ ( tl @ A @ Xs ) @ ( cons @ A @ ( hd @ A @ Xs ) @ ( nil @ A ) ) ) ) ) ).
% cycle.simps(2)
thf(fact_138_cycle__rotated,axiom,
! [A: $tType,V2: list @ A,U: list @ A,S2: stream170649215stream @ A] :
( ( V2
!= ( nil @ A ) )
=> ( ( ( stream317748790_cycle @ A @ U )
= ( stream1035003186_shift @ A @ V2 @ S2 ) )
=> ( ( stream317748790_cycle @ A @ ( append @ A @ ( tl @ A @ U ) @ ( cons @ A @ ( hd @ A @ U ) @ ( nil @ A ) ) ) )
= ( stream1035003186_shift @ A @ ( tl @ A @ V2 ) @ S2 ) ) ) ) ).
% cycle_rotated
thf(fact_139_list__ex1__iff,axiom,
! [A: $tType] :
( ( list_ex1 @ A )
= ( ^ [P2: A > $o,Xs4: list @ A] :
? [X2: A] :
( ( member @ A @ X2 @ ( set2 @ A @ Xs4 ) )
& ( P2 @ X2 )
& ! [Y4: A] :
( ( ( member @ A @ Y4 @ ( set2 @ A @ Xs4 ) )
& ( P2 @ Y4 ) )
=> ( Y4 = X2 ) ) ) ) ) ).
% list_ex1_iff
thf(fact_140_list_Oexhaust__sel,axiom,
! [A: $tType,List: list @ A] :
( ( List
!= ( nil @ A ) )
=> ( List
= ( cons @ A @ ( hd @ A @ List ) @ ( tl @ A @ List ) ) ) ) ).
% list.exhaust_sel
thf(fact_141_List_Oinsert__def,axiom,
! [A: $tType] :
( ( insert @ A )
= ( ^ [X2: A,Xs4: list @ A] : ( if @ ( list @ A ) @ ( member @ A @ X2 @ ( set2 @ A @ Xs4 ) ) @ Xs4 @ ( cons @ A @ X2 @ Xs4 ) ) ) ) ).
% List.insert_def
thf(fact_142_flat_Osimps_I1_J,axiom,
! [A: $tType,Ws: stream170649215stream @ ( list @ A )] :
( ( stream_Mirabelle_shd @ A @ ( stream942386729e_flat @ A @ Ws ) )
= ( hd @ A @ ( stream_Mirabelle_shd @ ( list @ A ) @ Ws ) ) ) ).
% flat.simps(1)
thf(fact_143_can__select__set__list__ex1,axiom,
! [A: $tType,P: A > $o,A3: list @ A] :
( ( can_select @ A @ P @ ( set2 @ A @ A3 ) )
= ( list_ex1 @ A @ P @ A3 ) ) ).
% can_select_set_list_ex1
thf(fact_144_rotate1__hd__tl,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( rotate1 @ A @ Xs )
= ( append @ A @ ( tl @ A @ Xs ) @ ( cons @ A @ ( hd @ A @ Xs ) @ ( nil @ A ) ) ) ) ) ).
% rotate1_hd_tl
thf(fact_145_sublists_Osimps_I1_J,axiom,
! [A: $tType] :
( ( sublists @ A @ ( nil @ A ) )
= ( cons @ ( list @ A ) @ ( nil @ A ) @ ( nil @ ( list @ A ) ) ) ) ).
% sublists.simps(1)
thf(fact_146_list_Osplit__sel__asm,axiom,
! [B: $tType,A: $tType,P: B > $o,F1: B,F22: A > ( list @ A ) > B,List: list @ A] :
( ( P @ ( case_list @ B @ A @ F1 @ F22 @ List ) )
= ( ~ ( ( ( List
= ( nil @ A ) )
& ~ ( P @ F1 ) )
| ( ( List
= ( cons @ A @ ( hd @ A @ List ) @ ( tl @ A @ List ) ) )
& ~ ( P @ ( F22 @ ( hd @ A @ List ) @ ( tl @ A @ List ) ) ) ) ) ) ) ).
% list.split_sel_asm
thf(fact_147_list_Osplit__sel,axiom,
! [B: $tType,A: $tType,P: B > $o,F1: B,F22: A > ( list @ A ) > B,List: list @ A] :
( ( P @ ( case_list @ B @ A @ F1 @ F22 @ List ) )
= ( ( ( List
= ( nil @ A ) )
=> ( P @ F1 ) )
& ( ( List
= ( cons @ A @ ( hd @ A @ List ) @ ( tl @ A @ List ) ) )
=> ( P @ ( F22 @ ( hd @ A @ List ) @ ( tl @ A @ List ) ) ) ) ) ) ).
% list.split_sel
thf(fact_148_product__lists_Osimps_I1_J,axiom,
! [A: $tType] :
( ( product_lists @ A @ ( nil @ ( list @ A ) ) )
= ( cons @ ( list @ A ) @ ( nil @ A ) @ ( nil @ ( list @ A ) ) ) ) ).
% product_lists.simps(1)
thf(fact_149_rotate1__is__Nil__conv,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( rotate1 @ A @ Xs )
= ( nil @ A ) )
= ( Xs
= ( nil @ A ) ) ) ).
% rotate1_is_Nil_conv
thf(fact_150_set__rotate1,axiom,
! [A: $tType,Xs: list @ A] :
( ( set2 @ A @ ( rotate1 @ A @ Xs ) )
= ( set2 @ A @ Xs ) ) ).
% set_rotate1
thf(fact_151_can__select__def,axiom,
! [A: $tType] :
( ( can_select @ A )
= ( ^ [P2: A > $o,A5: set @ A] :
? [X2: A] :
( ( member @ A @ X2 @ A5 )
& ( P2 @ X2 )
& ! [Y4: A] :
( ( ( member @ A @ Y4 @ A5 )
& ( P2 @ Y4 ) )
=> ( Y4 = X2 ) ) ) ) ) ).
% can_select_def
thf(fact_152_rotate1_Osimps_I1_J,axiom,
! [A: $tType] :
( ( rotate1 @ A @ ( nil @ A ) )
= ( nil @ A ) ) ).
% rotate1.simps(1)
thf(fact_153_list_Osimps_I5_J,axiom,
! [B: $tType,A: $tType,F1: B,F22: A > ( list @ A ) > B,X21: A,X222: list @ A] :
( ( case_list @ B @ A @ F1 @ F22 @ ( cons @ A @ X21 @ X222 ) )
= ( F22 @ X21 @ X222 ) ) ).
% list.simps(5)
thf(fact_154_list_Osimps_I4_J,axiom,
! [A: $tType,B: $tType,F1: B,F22: A > ( list @ A ) > B] :
( ( case_list @ B @ A @ F1 @ F22 @ ( nil @ A ) )
= F1 ) ).
% list.simps(4)
thf(fact_155_rotate1_Osimps_I2_J,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( rotate1 @ A @ ( cons @ A @ X3 @ Xs ) )
= ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) ) ).
% rotate1.simps(2)
thf(fact_156_list_Ocase__eq__if,axiom,
! [A: $tType,B: $tType] :
( ( case_list @ B @ A )
= ( ^ [F12: B,F23: A > ( list @ A ) > B,List3: list @ A] :
( if @ B
@ ( List3
= ( nil @ A ) )
@ F12
@ ( F23 @ ( hd @ A @ List3 ) @ ( tl @ A @ List3 ) ) ) ) ) ).
% list.case_eq_if
thf(fact_157_bind__simps_I2_J,axiom,
! [A: $tType,B: $tType,X3: B,Xs: list @ B,F: B > ( list @ A )] :
( ( bind @ B @ A @ ( cons @ B @ X3 @ Xs ) @ F )
= ( append @ A @ ( F @ X3 ) @ ( bind @ B @ A @ Xs @ F ) ) ) ).
% bind_simps(2)
thf(fact_158_maps__simps_I1_J,axiom,
! [A: $tType,B: $tType,F: B > ( list @ A ),X3: B,Xs: list @ B] :
( ( maps @ B @ A @ F @ ( cons @ B @ X3 @ Xs ) )
= ( append @ A @ ( F @ X3 ) @ ( maps @ B @ A @ F @ Xs ) ) ) ).
% maps_simps(1)
thf(fact_159_remdups__adj__append,axiom,
! [A: $tType,Xs_1: list @ A,X3: A,Xs_2: list @ A] :
( ( remdups_adj @ A @ ( append @ A @ Xs_1 @ ( cons @ A @ X3 @ Xs_2 ) ) )
= ( append @ A @ ( remdups_adj @ A @ ( append @ A @ Xs_1 @ ( cons @ A @ X3 @ ( nil @ A ) ) ) ) @ ( tl @ A @ ( remdups_adj @ A @ ( cons @ A @ X3 @ Xs_2 ) ) ) ) ) ).
% remdups_adj_append
thf(fact_160_remdups__adj__Nil__iff,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( remdups_adj @ A @ Xs )
= ( nil @ A ) )
= ( Xs
= ( nil @ A ) ) ) ).
% remdups_adj_Nil_iff
thf(fact_161_remdups__adj__set,axiom,
! [A: $tType,Xs: list @ A] :
( ( set2 @ A @ ( remdups_adj @ A @ Xs ) )
= ( set2 @ A @ Xs ) ) ).
% remdups_adj_set
thf(fact_162_hd__remdups__adj,axiom,
! [A: $tType,Xs: list @ A] :
( ( hd @ A @ ( remdups_adj @ A @ Xs ) )
= ( hd @ A @ Xs ) ) ).
% hd_remdups_adj
thf(fact_163_bind__simps_I1_J,axiom,
! [B: $tType,A: $tType,F: B > ( list @ A )] :
( ( bind @ B @ A @ ( nil @ B ) @ F )
= ( nil @ A ) ) ).
% bind_simps(1)
thf(fact_164_remdups__adj__Cons__alt,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( cons @ A @ X3 @ ( tl @ A @ ( remdups_adj @ A @ ( cons @ A @ X3 @ Xs ) ) ) )
= ( remdups_adj @ A @ ( cons @ A @ X3 @ Xs ) ) ) ).
% remdups_adj_Cons_alt
thf(fact_165_remdups__adj_Osimps_I3_J,axiom,
! [A: $tType,X3: A,Y: A,Xs: list @ A] :
( ( ( X3 = Y )
=> ( ( remdups_adj @ A @ ( cons @ A @ X3 @ ( cons @ A @ Y @ Xs ) ) )
= ( remdups_adj @ A @ ( cons @ A @ X3 @ Xs ) ) ) )
& ( ( X3 != Y )
=> ( ( remdups_adj @ A @ ( cons @ A @ X3 @ ( cons @ A @ Y @ Xs ) ) )
= ( cons @ A @ X3 @ ( remdups_adj @ A @ ( cons @ A @ Y @ Xs ) ) ) ) ) ) ).
% remdups_adj.simps(3)
thf(fact_166_remdups__adj_Osimps_I1_J,axiom,
! [A: $tType] :
( ( remdups_adj @ A @ ( nil @ A ) )
= ( nil @ A ) ) ).
% remdups_adj.simps(1)
thf(fact_167_list__bind__cong,axiom,
! [B: $tType,A: $tType,Xs: list @ A,Ys2: list @ A,F: A > ( list @ B ),G: A > ( list @ B )] :
( ( Xs = Ys2 )
=> ( ! [X4: A] :
( ( member @ A @ X4 @ ( set2 @ A @ Xs ) )
=> ( ( F @ X4 )
= ( G @ X4 ) ) )
=> ( ( bind @ A @ B @ Xs @ F )
= ( bind @ A @ B @ Ys2 @ G ) ) ) ) ).
% list_bind_cong
thf(fact_168_remdups__adj_Oelims,axiom,
! [A: $tType,X3: list @ A,Y: list @ A] :
( ( ( remdups_adj @ A @ X3 )
= Y )
=> ( ( ( X3
= ( nil @ A ) )
=> ( Y
!= ( nil @ A ) ) )
=> ( ! [X4: A] :
( ( X3
= ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( Y
!= ( cons @ A @ X4 @ ( nil @ A ) ) ) )
=> ~ ! [X4: A,Y3: A,Xs2: list @ A] :
( ( X3
= ( cons @ A @ X4 @ ( cons @ A @ Y3 @ Xs2 ) ) )
=> ~ ( ( ( X4 = Y3 )
=> ( Y
= ( remdups_adj @ A @ ( cons @ A @ X4 @ Xs2 ) ) ) )
& ( ( X4 != Y3 )
=> ( Y
= ( cons @ A @ X4 @ ( remdups_adj @ A @ ( cons @ A @ Y3 @ Xs2 ) ) ) ) ) ) ) ) ) ) ).
% remdups_adj.elims
thf(fact_169_remdups__adj_Osimps_I2_J,axiom,
! [A: $tType,X3: A] :
( ( remdups_adj @ A @ ( cons @ A @ X3 @ ( nil @ A ) ) )
= ( cons @ A @ X3 @ ( nil @ A ) ) ) ).
% remdups_adj.simps(2)
thf(fact_170_maps__simps_I2_J,axiom,
! [B: $tType,A: $tType,F: B > ( list @ A )] :
( ( maps @ B @ A @ F @ ( nil @ B ) )
= ( nil @ A ) ) ).
% maps_simps(2)
thf(fact_171_remdups__adj__append__two,axiom,
! [A: $tType,Xs: list @ A,X3: A,Y: A] :
( ( remdups_adj @ A @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( cons @ A @ Y @ ( nil @ A ) ) ) ) )
= ( append @ A @ ( remdups_adj @ A @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) ) @ ( if @ ( list @ A ) @ ( X3 = Y ) @ ( nil @ A ) @ ( cons @ A @ Y @ ( nil @ A ) ) ) ) ) ).
% remdups_adj_append_two
thf(fact_172_butlast__snoc,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( butlast @ A @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) )
= Xs ) ).
% butlast_snoc
thf(fact_173_last__snoc,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( last @ A @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) )
= X3 ) ).
% last_snoc
thf(fact_174_sdrop__cycle__eq,axiom,
! [A: $tType,U: list @ A] :
( ( U
!= ( nil @ A ) )
=> ( ( stream135081970_sdrop @ A @ ( size_size @ ( list @ A ) @ U ) @ ( stream317748790_cycle @ A @ U ) )
= ( stream317748790_cycle @ A @ U ) ) ) ).
% sdrop_cycle_eq
thf(fact_175_append__eq__append__conv,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A,Us2: list @ A,Vs: list @ A] :
( ( ( ( size_size @ ( list @ A ) @ Xs )
= ( size_size @ ( list @ A ) @ Ys2 ) )
| ( ( size_size @ ( list @ A ) @ Us2 )
= ( size_size @ ( list @ A ) @ Vs ) ) )
=> ( ( ( append @ A @ Xs @ Us2 )
= ( append @ A @ Ys2 @ Vs ) )
= ( ( Xs = Ys2 )
& ( Us2 = Vs ) ) ) ) ).
% append_eq_append_conv
thf(fact_176_length__rotate1,axiom,
! [A: $tType,Xs: list @ A] :
( ( size_size @ ( list @ A ) @ ( rotate1 @ A @ Xs ) )
= ( size_size @ ( list @ A ) @ Xs ) ) ).
% length_rotate1
thf(fact_177_last__appendR,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A] :
( ( Ys2
!= ( nil @ A ) )
=> ( ( last @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( last @ A @ Ys2 ) ) ) ).
% last_appendR
thf(fact_178_last__appendL,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A] :
( ( Ys2
= ( nil @ A ) )
=> ( ( last @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( last @ A @ Xs ) ) ) ).
% last_appendL
thf(fact_179_append__butlast__last__id,axiom,
! [A: $tType,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( append @ A @ ( butlast @ A @ Xs ) @ ( cons @ A @ ( last @ A @ Xs ) @ ( nil @ A ) ) )
= Xs ) ) ).
% append_butlast_last_id
thf(fact_180_snoc__eq__iff__butlast,axiom,
! [A: $tType,Xs: list @ A,X3: A,Ys2: list @ A] :
( ( ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) )
= Ys2 )
= ( ( Ys2
!= ( nil @ A ) )
& ( ( butlast @ A @ Ys2 )
= Xs )
& ( ( last @ A @ Ys2 )
= X3 ) ) ) ).
% snoc_eq_iff_butlast
thf(fact_181_Ex__list__of__length,axiom,
! [A: $tType,N: nat] :
? [Xs2: list @ A] :
( ( size_size @ ( list @ A ) @ Xs2 )
= N ) ).
% Ex_list_of_length
thf(fact_182_neq__if__length__neq,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( ( size_size @ ( list @ A ) @ Xs )
!= ( size_size @ ( list @ A ) @ Ys2 ) )
=> ( Xs != Ys2 ) ) ).
% neq_if_length_neq
thf(fact_183_butlast__tl,axiom,
! [A: $tType,Xs: list @ A] :
( ( butlast @ A @ ( tl @ A @ Xs ) )
= ( tl @ A @ ( butlast @ A @ Xs ) ) ) ).
% butlast_tl
thf(fact_184_in__set__butlastD,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( member @ A @ X3 @ ( set2 @ A @ ( butlast @ A @ Xs ) ) )
=> ( member @ A @ X3 @ ( set2 @ A @ Xs ) ) ) ).
% in_set_butlastD
thf(fact_185_butlast_Osimps_I1_J,axiom,
! [A: $tType] :
( ( butlast @ A @ ( nil @ A ) )
= ( nil @ A ) ) ).
% butlast.simps(1)
thf(fact_186_in__set__product__lists__length,axiom,
! [A: $tType,Xs: list @ A,Xss2: list @ ( list @ A )] :
( ( member @ ( list @ A ) @ Xs @ ( set2 @ ( list @ A ) @ ( product_lists @ A @ Xss2 ) ) )
=> ( ( size_size @ ( list @ A ) @ Xs )
= ( size_size @ ( list @ ( list @ A ) ) @ Xss2 ) ) ) ).
% in_set_product_lists_length
thf(fact_187_list__induct2,axiom,
! [A: $tType,B: $tType,Xs: list @ A,Ys2: list @ B,P: ( list @ A ) > ( list @ B ) > $o] :
( ( ( size_size @ ( list @ A ) @ Xs )
= ( size_size @ ( list @ B ) @ Ys2 ) )
=> ( ( P @ ( nil @ A ) @ ( nil @ B ) )
=> ( ! [X4: A,Xs2: list @ A,Y3: B,Ys: list @ B] :
( ( ( size_size @ ( list @ A ) @ Xs2 )
= ( size_size @ ( list @ B ) @ Ys ) )
=> ( ( P @ Xs2 @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) @ ( cons @ B @ Y3 @ Ys ) ) ) )
=> ( P @ Xs @ Ys2 ) ) ) ) ).
% list_induct2
thf(fact_188_list__induct3,axiom,
! [B: $tType,A: $tType,C: $tType,Xs: list @ A,Ys2: list @ B,Zs: list @ C,P: ( list @ A ) > ( list @ B ) > ( list @ C ) > $o] :
( ( ( size_size @ ( list @ A ) @ Xs )
= ( size_size @ ( list @ B ) @ Ys2 ) )
=> ( ( ( size_size @ ( list @ B ) @ Ys2 )
= ( size_size @ ( list @ C ) @ Zs ) )
=> ( ( P @ ( nil @ A ) @ ( nil @ B ) @ ( nil @ C ) )
=> ( ! [X4: A,Xs2: list @ A,Y3: B,Ys: list @ B,Z: C,Zs3: list @ C] :
( ( ( size_size @ ( list @ A ) @ Xs2 )
= ( size_size @ ( list @ B ) @ Ys ) )
=> ( ( ( size_size @ ( list @ B ) @ Ys )
= ( size_size @ ( list @ C ) @ Zs3 ) )
=> ( ( P @ Xs2 @ Ys @ Zs3 )
=> ( P @ ( cons @ A @ X4 @ Xs2 ) @ ( cons @ B @ Y3 @ Ys ) @ ( cons @ C @ Z @ Zs3 ) ) ) ) )
=> ( P @ Xs @ Ys2 @ Zs ) ) ) ) ) ).
% list_induct3
thf(fact_189_butlast_Osimps_I2_J,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( ( Xs
= ( nil @ A ) )
=> ( ( butlast @ A @ ( cons @ A @ X3 @ Xs ) )
= ( nil @ A ) ) )
& ( ( Xs
!= ( nil @ A ) )
=> ( ( butlast @ A @ ( cons @ A @ X3 @ Xs ) )
= ( cons @ A @ X3 @ ( butlast @ A @ Xs ) ) ) ) ) ).
% butlast.simps(2)
thf(fact_190_last_Osimps,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( ( Xs
= ( nil @ A ) )
=> ( ( last @ A @ ( cons @ A @ X3 @ Xs ) )
= X3 ) )
& ( ( Xs
!= ( nil @ A ) )
=> ( ( last @ A @ ( cons @ A @ X3 @ Xs ) )
= ( last @ A @ Xs ) ) ) ) ).
% last.simps
thf(fact_191_last__ConsL,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( Xs
= ( nil @ A ) )
=> ( ( last @ A @ ( cons @ A @ X3 @ Xs ) )
= X3 ) ) ).
% last_ConsL
thf(fact_192_last__ConsR,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( last @ A @ ( cons @ A @ X3 @ Xs ) )
= ( last @ A @ Xs ) ) ) ).
% last_ConsR
thf(fact_193_last__in__set,axiom,
! [A: $tType,As2: list @ A] :
( ( As2
!= ( nil @ A ) )
=> ( member @ A @ ( last @ A @ As2 ) @ ( set2 @ A @ As2 ) ) ) ).
% last_in_set
thf(fact_194_longest__common__suffix,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
? [Ss: list @ A,Xs3: list @ A,Ys4: list @ A] :
( ( Xs
= ( append @ A @ Xs3 @ Ss ) )
& ( Ys2
= ( append @ A @ Ys4 @ Ss ) )
& ( ( Xs3
= ( nil @ A ) )
| ( Ys4
= ( nil @ A ) )
| ( ( last @ A @ Xs3 )
!= ( last @ A @ Ys4 ) ) ) ) ).
% longest_common_suffix
thf(fact_195_butlast__append,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A] :
( ( ( Ys2
= ( nil @ A ) )
=> ( ( butlast @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( butlast @ A @ Xs ) ) )
& ( ( Ys2
!= ( nil @ A ) )
=> ( ( butlast @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( append @ A @ Xs @ ( butlast @ A @ Ys2 ) ) ) ) ) ).
% butlast_append
thf(fact_196_last__append,axiom,
! [A: $tType,Ys2: list @ A,Xs: list @ A] :
( ( ( Ys2
= ( nil @ A ) )
=> ( ( last @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( last @ A @ Xs ) ) )
& ( ( Ys2
!= ( nil @ A ) )
=> ( ( last @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( last @ A @ Ys2 ) ) ) ) ).
% last_append
thf(fact_197_in__set__butlast__appendI,axiom,
! [A: $tType,X3: A,Xs: list @ A,Ys2: list @ A] :
( ( ( member @ A @ X3 @ ( set2 @ A @ ( butlast @ A @ Xs ) ) )
| ( member @ A @ X3 @ ( set2 @ A @ ( butlast @ A @ Ys2 ) ) ) )
=> ( member @ A @ X3 @ ( set2 @ A @ ( butlast @ A @ ( append @ A @ Xs @ Ys2 ) ) ) ) ) ).
% in_set_butlast_appendI
thf(fact_198_last__tl,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( Xs
= ( nil @ A ) )
| ( ( tl @ A @ Xs )
!= ( nil @ A ) ) )
=> ( ( last @ A @ ( tl @ A @ Xs ) )
= ( last @ A @ Xs ) ) ) ).
% last_tl
thf(fact_199_stake__cycle__eq,axiom,
! [A: $tType,U: list @ A] :
( ( U
!= ( nil @ A ) )
=> ( ( stream1746350922_stake @ A @ ( size_size @ ( list @ A ) @ U ) @ ( stream317748790_cycle @ A @ U ) )
= U ) ) ).
% stake_cycle_eq
thf(fact_200_remdups__adj__singleton,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( ( remdups_adj @ A @ Xs )
= ( cons @ A @ X3 @ ( nil @ A ) ) )
=> ( Xs
= ( replicate @ A @ ( size_size @ ( list @ A ) @ Xs ) @ X3 ) ) ) ).
% remdups_adj_singleton
thf(fact_201_sset__shift,axiom,
! [A: $tType,Xs: list @ A,S2: stream170649215stream @ A] :
( ( stream30925839e_sset @ A @ ( stream1035003186_shift @ A @ Xs @ S2 ) )
= ( sup_sup @ ( set @ A ) @ ( set2 @ A @ Xs ) @ ( stream30925839e_sset @ A @ S2 ) ) ) ).
% sset_shift
thf(fact_202_length__replicate,axiom,
! [A: $tType,N: nat,X3: A] :
( ( size_size @ ( list @ A ) @ ( replicate @ A @ N @ X3 ) )
= N ) ).
% length_replicate
thf(fact_203_length__stake,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( size_size @ ( list @ A ) @ ( stream1746350922_stake @ A @ N @ S2 ) )
= N ) ).
% length_stake
thf(fact_204_set__append,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( set2 @ A @ ( append @ A @ Xs @ Ys2 ) )
= ( sup_sup @ ( set @ A ) @ ( set2 @ A @ Xs ) @ ( set2 @ A @ Ys2 ) ) ) ).
% set_append
thf(fact_205_append__replicate__commute,axiom,
! [A: $tType,N: nat,X3: A,K: nat] :
( ( append @ A @ ( replicate @ A @ N @ X3 ) @ ( replicate @ A @ K @ X3 ) )
= ( append @ A @ ( replicate @ A @ K @ X3 ) @ ( replicate @ A @ N @ X3 ) ) ) ).
% append_replicate_commute
thf(fact_206_replicate__eqI,axiom,
! [A: $tType,Xs: list @ A,N: nat,X3: A] :
( ( ( size_size @ ( list @ A ) @ Xs )
= N )
=> ( ! [Y3: A] :
( ( member @ A @ Y3 @ ( set2 @ A @ Xs ) )
=> ( Y3 = X3 ) )
=> ( Xs
= ( replicate @ A @ N @ X3 ) ) ) ) ).
% replicate_eqI
thf(fact_207_replicate__length__same,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ! [X4: A] :
( ( member @ A @ X4 @ ( set2 @ A @ Xs ) )
=> ( X4 = X3 ) )
=> ( ( replicate @ A @ ( size_size @ ( list @ A ) @ Xs ) @ X3 )
= Xs ) ) ).
% replicate_length_same
thf(fact_208_replicate__app__Cons__same,axiom,
! [A: $tType,N: nat,X3: A,Xs: list @ A] :
( ( append @ A @ ( replicate @ A @ N @ X3 ) @ ( cons @ A @ X3 @ Xs ) )
= ( cons @ A @ X3 @ ( append @ A @ ( replicate @ A @ N @ X3 ) @ Xs ) ) ) ).
% replicate_app_Cons_same
thf(fact_209_replicate__append__same,axiom,
! [A: $tType,I: nat,X3: A] :
( ( append @ A @ ( replicate @ A @ I @ X3 ) @ ( cons @ A @ X3 @ ( nil @ A ) ) )
= ( cons @ A @ X3 @ ( replicate @ A @ I @ X3 ) ) ) ).
% replicate_append_same
thf(fact_210_stake__sdrop,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream1035003186_shift @ A @ ( stream1746350922_stake @ A @ N @ S2 ) @ ( stream135081970_sdrop @ A @ N @ S2 ) )
= S2 ) ).
% stake_sdrop
thf(fact_211_set__union,axiom,
! [A: $tType,Xs: list @ A,Ys2: list @ A] :
( ( set2 @ A @ ( union @ A @ Xs @ Ys2 ) )
= ( sup_sup @ ( set @ A ) @ ( set2 @ A @ Xs ) @ ( set2 @ A @ Ys2 ) ) ) ).
% set_union
thf(fact_212_id__stake__snth__sdrop,axiom,
! [A: $tType,S2: stream170649215stream @ A,I: nat] :
( S2
= ( stream1035003186_shift @ A @ ( stream1746350922_stake @ A @ I @ S2 ) @ ( stream641971652_SCons @ A @ ( stream370371455e_snth @ A @ S2 @ I ) @ ( stream135081970_sdrop @ A @ ( suc @ I ) @ S2 ) ) ) ) ).
% id_stake_snth_sdrop
thf(fact_213_sdrop__simps_I2_J,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream_Mirabelle_stl @ A @ ( stream135081970_sdrop @ A @ N @ S2 ) )
= ( stream135081970_sdrop @ A @ ( suc @ N ) @ S2 ) ) ).
% sdrop_simps(2)
thf(fact_214_replicate__Suc,axiom,
! [A: $tType,N: nat,X3: A] :
( ( replicate @ A @ ( suc @ N ) @ X3 )
= ( cons @ A @ X3 @ ( replicate @ A @ N @ X3 ) ) ) ).
% replicate_Suc
thf(fact_215_Suc__length__conv,axiom,
! [A: $tType,N: nat,Xs: list @ A] :
( ( ( suc @ N )
= ( size_size @ ( list @ A ) @ Xs ) )
= ( ? [Y4: A,Ys3: list @ A] :
( ( Xs
= ( cons @ A @ Y4 @ Ys3 ) )
& ( ( size_size @ ( list @ A ) @ Ys3 )
= N ) ) ) ) ).
% Suc_length_conv
thf(fact_216_length__Suc__conv,axiom,
! [A: $tType,Xs: list @ A,N: nat] :
( ( ( size_size @ ( list @ A ) @ Xs )
= ( suc @ N ) )
= ( ? [Y4: A,Ys3: list @ A] :
( ( Xs
= ( cons @ A @ Y4 @ Ys3 ) )
& ( ( size_size @ ( list @ A ) @ Ys3 )
= N ) ) ) ) ).
% length_Suc_conv
thf(fact_217_snth__Stream,axiom,
! [A: $tType,X3: A,S2: stream170649215stream @ A,I: nat] :
( ( stream370371455e_snth @ A @ ( stream641971652_SCons @ A @ X3 @ S2 ) @ ( suc @ I ) )
= ( stream370371455e_snth @ A @ S2 @ I ) ) ).
% snth_Stream
thf(fact_218_snth_Osimps_I2_J,axiom,
! [A: $tType,S2: stream170649215stream @ A,N: nat] :
( ( stream370371455e_snth @ A @ S2 @ ( suc @ N ) )
= ( stream370371455e_snth @ A @ ( stream_Mirabelle_stl @ A @ S2 ) @ N ) ) ).
% snth.simps(2)
thf(fact_219_sdrop_Osimps_I2_J,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream135081970_sdrop @ A @ ( suc @ N ) @ S2 )
= ( stream135081970_sdrop @ A @ N @ ( stream_Mirabelle_stl @ A @ S2 ) ) ) ).
% sdrop.simps(2)
thf(fact_220_stake_Osimps_I2_J,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream1746350922_stake @ A @ ( suc @ N ) @ S2 )
= ( cons @ A @ ( stream_Mirabelle_shd @ A @ S2 ) @ ( stream1746350922_stake @ A @ N @ ( stream_Mirabelle_stl @ A @ S2 ) ) ) ) ).
% stake.simps(2)
thf(fact_221_stake__Suc,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( stream1746350922_stake @ A @ ( suc @ N ) @ S2 )
= ( append @ A @ ( stream1746350922_stake @ A @ N @ S2 ) @ ( cons @ A @ ( stream370371455e_snth @ A @ S2 @ N ) @ ( nil @ A ) ) ) ) ).
% stake_Suc
thf(fact_222_length__append__singleton,axiom,
! [A: $tType,Xs: list @ A,X3: A] :
( ( size_size @ ( list @ A ) @ ( append @ A @ Xs @ ( cons @ A @ X3 @ ( nil @ A ) ) ) )
= ( suc @ ( size_size @ ( list @ A ) @ Xs ) ) ) ).
% length_append_singleton
thf(fact_223_length__Cons,axiom,
! [A: $tType,X3: A,Xs: list @ A] :
( ( size_size @ ( list @ A ) @ ( cons @ A @ X3 @ Xs ) )
= ( suc @ ( size_size @ ( list @ A ) @ Xs ) ) ) ).
% length_Cons
thf(fact_224_BNF__Greatest__Fixpoint_Oshift__def,axiom,
! [B: $tType,A: $tType] :
( ( bNF_Greatest_shift @ A @ B )
= ( ^ [Lab: ( list @ A ) > B,K2: A,Kl: list @ A] : ( Lab @ ( cons @ A @ K2 @ Kl ) ) ) ) ).
% BNF_Greatest_Fixpoint.shift_def
thf(fact_225_SuccI,axiom,
! [A: $tType,Kl2: list @ A,K: A,Kl3: set @ ( list @ A )] :
( ( member @ ( list @ A ) @ ( append @ A @ Kl2 @ ( cons @ A @ K @ ( nil @ A ) ) ) @ Kl3 )
=> ( member @ A @ K @ ( bNF_Greatest_Succ @ A @ Kl3 @ Kl2 ) ) ) ).
% SuccI
thf(fact_226_SuccD,axiom,
! [A: $tType,K: A,Kl3: set @ ( list @ A ),Kl2: list @ A] :
( ( member @ A @ K @ ( bNF_Greatest_Succ @ A @ Kl3 @ Kl2 ) )
=> ( member @ ( list @ A ) @ ( append @ A @ Kl2 @ ( cons @ A @ K @ ( nil @ A ) ) ) @ Kl3 ) ) ).
% SuccD
thf(fact_227_empty__Shift,axiom,
! [A: $tType,Kl3: set @ ( list @ A ),K: A] :
( ( member @ ( list @ A ) @ ( nil @ A ) @ Kl3 )
=> ( ( member @ A @ K @ ( bNF_Greatest_Succ @ A @ Kl3 @ ( nil @ A ) ) )
=> ( member @ ( list @ A ) @ ( nil @ A ) @ ( bNF_Greatest_Shift @ A @ Kl3 @ K ) ) ) ) ).
% empty_Shift
thf(fact_228_Succ__Shift,axiom,
! [A: $tType,Kl3: set @ ( list @ A ),K: A,Kl2: list @ A] :
( ( bNF_Greatest_Succ @ A @ ( bNF_Greatest_Shift @ A @ Kl3 @ K ) @ Kl2 )
= ( bNF_Greatest_Succ @ A @ Kl3 @ ( cons @ A @ K @ Kl2 ) ) ) ).
% Succ_Shift
thf(fact_229_ShiftD,axiom,
! [A: $tType,Kl2: list @ A,Kl3: set @ ( list @ A ),K: A] :
( ( member @ ( list @ A ) @ Kl2 @ ( bNF_Greatest_Shift @ A @ Kl3 @ K ) )
=> ( member @ ( list @ A ) @ ( cons @ A @ K @ Kl2 ) @ Kl3 ) ) ).
% ShiftD
thf(fact_230_gen__length__code_I2_J,axiom,
! [B: $tType,N: nat,X3: B,Xs: list @ B] :
( ( gen_length @ B @ N @ ( cons @ B @ X3 @ Xs ) )
= ( gen_length @ B @ ( suc @ N ) @ Xs ) ) ).
% gen_length_code(2)
thf(fact_231_length__n__lists__elem,axiom,
! [A: $tType,Ys2: list @ A,N: nat,Xs: list @ A] :
( ( member @ ( list @ A ) @ Ys2 @ ( set2 @ ( list @ A ) @ ( n_lists @ A @ N @ Xs ) ) )
=> ( ( size_size @ ( list @ A ) @ Ys2 )
= N ) ) ).
% length_n_lists_elem
thf(fact_232_gen__length__code_I1_J,axiom,
! [A: $tType,N: nat] :
( ( gen_length @ A @ N @ ( nil @ A ) )
= N ) ).
% gen_length_code(1)
thf(fact_233_n__lists__Nil,axiom,
! [A: $tType,N: nat] :
( ( ( N
= ( zero_zero @ nat ) )
=> ( ( n_lists @ A @ N @ ( nil @ A ) )
= ( cons @ ( list @ A ) @ ( nil @ A ) @ ( nil @ ( list @ A ) ) ) ) )
& ( ( N
!= ( zero_zero @ nat ) )
=> ( ( n_lists @ A @ N @ ( nil @ A ) )
= ( nil @ ( list @ A ) ) ) ) ) ).
% n_lists_Nil
thf(fact_234_n__lists_Osimps_I1_J,axiom,
! [A: $tType,Xs: list @ A] :
( ( n_lists @ A @ ( zero_zero @ nat ) @ Xs )
= ( cons @ ( list @ A ) @ ( nil @ A ) @ ( nil @ ( list @ A ) ) ) ) ).
% n_lists.simps(1)
thf(fact_235_replicate__eq__replicate,axiom,
! [A: $tType,M: nat,X3: A,N: nat,Y: A] :
( ( ( replicate @ A @ M @ X3 )
= ( replicate @ A @ N @ Y ) )
= ( ( M = N )
& ( ( M
!= ( zero_zero @ nat ) )
=> ( X3 = Y ) ) ) ) ).
% replicate_eq_replicate
thf(fact_236_length__0__conv,axiom,
! [A: $tType,Xs: list @ A] :
( ( ( size_size @ ( list @ A ) @ Xs )
= ( zero_zero @ nat ) )
= ( Xs
= ( nil @ A ) ) ) ).
% length_0_conv
thf(fact_237_empty__replicate,axiom,
! [A: $tType,N: nat,X3: A] :
( ( ( nil @ A )
= ( replicate @ A @ N @ X3 ) )
= ( N
= ( zero_zero @ nat ) ) ) ).
% empty_replicate
thf(fact_238_replicate__empty,axiom,
! [A: $tType,N: nat,X3: A] :
( ( ( replicate @ A @ N @ X3 )
= ( nil @ A ) )
= ( N
= ( zero_zero @ nat ) ) ) ).
% replicate_empty
thf(fact_239_Ball__set__replicate,axiom,
! [A: $tType,N: nat,A2: A,P: A > $o] :
( ( ! [X2: A] :
( ( member @ A @ X2 @ ( set2 @ A @ ( replicate @ A @ N @ A2 ) ) )
=> ( P @ X2 ) ) )
= ( ( P @ A2 )
| ( N
= ( zero_zero @ nat ) ) ) ) ).
% Ball_set_replicate
thf(fact_240_Bex__set__replicate,axiom,
! [A: $tType,N: nat,A2: A,P: A > $o] :
( ( ? [X2: A] :
( ( member @ A @ X2 @ ( set2 @ A @ ( replicate @ A @ N @ A2 ) ) )
& ( P @ X2 ) ) )
= ( ( P @ A2 )
& ( N
!= ( zero_zero @ nat ) ) ) ) ).
% Bex_set_replicate
thf(fact_241_in__set__replicate,axiom,
! [A: $tType,X3: A,N: nat,Y: A] :
( ( member @ A @ X3 @ ( set2 @ A @ ( replicate @ A @ N @ Y ) ) )
= ( ( X3 = Y )
& ( N
!= ( zero_zero @ nat ) ) ) ) ).
% in_set_replicate
thf(fact_242_stake__invert__Nil,axiom,
! [A: $tType,N: nat,S2: stream170649215stream @ A] :
( ( ( stream1746350922_stake @ A @ N @ S2 )
= ( nil @ A ) )
= ( N
= ( zero_zero @ nat ) ) ) ).
% stake_invert_Nil
thf(fact_243_hd__replicate,axiom,
! [A: $tType,N: nat,X3: A] :
( ( N
!= ( zero_zero @ nat ) )
=> ( ( hd @ A @ ( replicate @ A @ N @ X3 ) )
= X3 ) ) ).
% hd_replicate
thf(fact_244_last__replicate,axiom,
! [A: $tType,N: nat,X3: A] :
( ( N
!= ( zero_zero @ nat ) )
=> ( ( last @ A @ ( replicate @ A @ N @ X3 ) )
= X3 ) ) ).
% last_replicate
thf(fact_245_length__code,axiom,
! [A: $tType] :
( ( size_size @ ( list @ A ) )
= ( gen_length @ A @ ( zero_zero @ nat ) ) ) ).
% length_code
thf(fact_246_stake_Osimps_I1_J,axiom,
! [A: $tType,S2: stream170649215stream @ A] :
( ( stream1746350922_stake @ A @ ( zero_zero @ nat ) @ S2 )
= ( nil @ A ) ) ).
% stake.simps(1)
thf(fact_247_snth_Osimps_I1_J,axiom,
! [A: $tType,S2: stream170649215stream @ A] :
( ( stream370371455e_snth @ A @ S2 @ ( zero_zero @ nat ) )
= ( stream_Mirabelle_shd @ A @ S2 ) ) ).
% snth.simps(1)
thf(fact_248_sdrop_Osimps_I1_J,axiom,
! [A: $tType,S2: stream170649215stream @ A] :
( ( stream135081970_sdrop @ A @ ( zero_zero @ nat ) @ S2 )
= S2 ) ).
% sdrop.simps(1)
thf(fact_249_list_Osize_I3_J,axiom,
! [A: $tType] :
( ( size_size @ ( list @ A ) @ ( nil @ A ) )
= ( zero_zero @ nat ) ) ).
% list.size(3)
thf(fact_250_replicate__0,axiom,
! [A: $tType,X3: A] :
( ( replicate @ A @ ( zero_zero @ nat ) @ X3 )
= ( nil @ A ) ) ).
% replicate_0
thf(fact_251_remdups__adj__replicate,axiom,
! [A: $tType,N: nat,X3: A] :
( ( ( N
= ( zero_zero @ nat ) )
=> ( ( remdups_adj @ A @ ( replicate @ A @ N @ X3 ) )
= ( nil @ A ) ) )
& ( ( N
!= ( zero_zero @ nat ) )
=> ( ( remdups_adj @ A @ ( replicate @ A @ N @ X3 ) )
= ( cons @ A @ X3 @ ( nil @ A ) ) ) ) ) ).
% remdups_adj_replicate
thf(fact_252_Nitpick_Osize__list__simp_I2_J,axiom,
! [A: $tType] :
( ( size_size @ ( list @ A ) )
= ( ^ [Xs4: list @ A] :
( if @ nat
@ ( Xs4
= ( nil @ A ) )
@ ( zero_zero @ nat )
@ ( suc @ ( size_size @ ( list @ A ) @ ( tl @ A @ Xs4 ) ) ) ) ) ) ).
% Nitpick.size_list_simp(2)
thf(fact_253_sdrop__cycle__eq__mod__0,axiom,
! [A: $tType,U: list @ A,N: nat] :
( ( U
!= ( nil @ A ) )
=> ( ( ( div_mod @ nat @ N @ ( size_size @ ( list @ A ) @ U ) )
= ( zero_zero @ nat ) )
=> ( ( stream135081970_sdrop @ A @ N @ ( stream317748790_cycle @ A @ U ) )
= ( stream317748790_cycle @ A @ U ) ) ) ) ).
% sdrop_cycle_eq_mod_0
thf(fact_254_sdrop__cycle,axiom,
! [A: $tType,U: list @ A,N: nat] :
( ( U
!= ( nil @ A ) )
=> ( ( stream135081970_sdrop @ A @ N @ ( stream317748790_cycle @ A @ U ) )
= ( stream317748790_cycle @ A @ ( rotate @ A @ ( div_mod @ nat @ N @ ( size_size @ ( list @ A ) @ U ) ) @ U ) ) ) ) ).
% sdrop_cycle
%----Helper facts (3)
thf(help_If_3_1_T,axiom,
! [P: $o] :
( ( P = $true )
| ( P = $false ) ) ).
thf(help_If_2_1_T,axiom,
! [A: $tType,X3: A,Y: A] :
( ( if @ A @ $false @ X3 @ Y )
= Y ) ).
thf(help_If_1_1_T,axiom,
! [A: $tType,X3: A,Y: A] :
( ( if @ A @ $true @ X3 @ Y )
= X3 ) ).
%----Conjectures (1)
thf(conj_0,conjecture,
member @ a @ x @ ( stream30925839e_sset @ a @ ( stream942386729e_flat @ a @ s ) ) ).
%------------------------------------------------------------------------------