TPTP Problem File: ITP065^2.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : ITP065^2 : TPTP v9.0.0. Released v7.5.0.
% Domain : Interactive Theorem Proving
% Problem : Sledgehammer HeapImperative problem prob_1087__5351268_1
% Version : Especial.
% English :
% Refs : [BH+15] Blanchette et al. (2015), Mining the Archive of Formal
% : [Des21] Desharnais (2021), Email to Geoff Sutcliffe
% Source : [Des21]
% Names : HeapImperative/prob_1087__5351268_1 [Des21]
% Status : Theorem
% Rating : 0.00 v8.1.0, 0.25 v7.5.0
% Syntax : Number of formulae : 327 ( 93 unt; 58 typ; 0 def)
% Number of atoms : 788 ( 350 equ; 0 cnn)
% Maximal formula atoms : 13 ( 2 avg)
% Number of connectives : 6579 ( 159 ~; 16 |; 65 &;5837 @)
% ( 0 <=>; 502 =>; 0 <=; 0 <~>)
% Maximal formula depth : 29 ( 11 avg)
% Number of types : 2 ( 1 usr)
% Number of type conns : 457 ( 457 >; 0 *; 0 +; 0 <<)
% Number of symbols : 58 ( 57 usr; 0 con; 1-8 aty)
% Number of variables : 1608 ( 50 ^;1466 !; 22 ?;1608 :)
% ( 70 !>; 0 ?*; 0 @-; 0 @+)
% SPC : TH1_THM_EQU_NAR
% Comments : This file was generated by Sledgehammer 2021-02-23 16:17:21.881
%------------------------------------------------------------------------------
% Could-be-implicit typings (6)
thf(ty_t_Product__Type_Oprod,type,
product_prod: $tType > $tType > $tType ).
thf(ty_t_Multiset_Omultiset,type,
multiset: $tType > $tType ).
thf(ty_t_List_Olist,type,
list: $tType > $tType ).
thf(ty_t_Heap_OTree,type,
tree: $tType > $tType ).
thf(ty_t_Set_Oset,type,
set: $tType > $tType ).
thf(ty_tf_b,type,
b: $tType ).
% Explicit typings (52)
thf(sy_cl_HOL_Otype,type,
type:
!>[A: $tType] : $o ).
thf(sy_cl_Orderings_Oord,type,
ord:
!>[A: $tType] : $o ).
thf(sy_cl_Orderings_Oorder,type,
order:
!>[A: $tType] : $o ).
thf(sy_cl_Orderings_Olinorder,type,
linorder:
!>[A: $tType] : $o ).
thf(sy_cl_Orderings_Opreorder,type,
preorder:
!>[A: $tType] : $o ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Oheapify,type,
heapIm818251801eapify:
!>[A: $tType] : ( ( tree @ A ) > ( tree @ A ) ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Ohs__is__empty,type,
heapIm721255937_empty:
!>[A: $tType] : ( ( tree @ A ) > $o ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Ohs__of__list,type,
heapIm874063447f_list:
!>[A: $tType] : ( ( list @ A ) > ( tree @ A ) ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Oleft,type,
heapIm1271749598e_left:
!>[A: $tType] : ( ( tree @ A ) > ( tree @ A ) ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Oof__list__tree,type,
heapIm1912108042t_tree:
!>[A: $tType] : ( ( list @ A ) > ( tree @ A ) ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_Oright,type,
heapIm1434396069_right:
!>[A: $tType] : ( ( tree @ A ) > ( tree @ A ) ) ).
thf(sy_c_HeapImperative__Mirabelle__oitemzccmr_OsiftDown,type,
heapIm748920189ftDown:
!>[A: $tType] : ( ( tree @ A ) > ( tree @ A ) ) ).
thf(sy_c_Heap_OHeap,type,
heap:
!>[B: $tType,A: $tType] : ( B > ( B > $o ) > ( ( list @ A ) > B ) > ( B > ( multiset @ A ) ) > ( B > ( tree @ A ) ) > ( B > ( product_prod @ A @ B ) ) > $o ) ).
thf(sy_c_Heap_OHeap__axioms,type,
heap_axioms:
!>[B: $tType,A: $tType] : ( ( B > $o ) > ( ( list @ A ) > B ) > ( B > ( multiset @ A ) ) > ( B > ( tree @ A ) ) > ( B > ( product_prod @ A @ B ) ) > $o ) ).
thf(sy_c_Heap_OTree_OE,type,
e:
!>[A: $tType] : ( tree @ A ) ).
thf(sy_c_Heap_OTree_OT,type,
t:
!>[A: $tType] : ( A > ( tree @ A ) > ( tree @ A ) > ( tree @ A ) ) ).
thf(sy_c_Heap_OTree_Ocase__Tree,type,
case_Tree:
!>[B: $tType,A: $tType] : ( B > ( A > ( tree @ A ) > ( tree @ A ) > B ) > ( tree @ A ) > B ) ).
thf(sy_c_Heap_OTree_Opred__Tree,type,
pred_Tree:
!>[A: $tType] : ( ( A > $o ) > ( tree @ A ) > $o ) ).
thf(sy_c_Heap_OTree_Orec__Tree,type,
rec_Tree:
!>[C: $tType,A: $tType] : ( C > ( A > ( tree @ A ) > ( tree @ A ) > C > C > C ) > ( tree @ A ) > C ) ).
thf(sy_c_Heap_Oin__tree,type,
in_tree:
!>[A: $tType] : ( A > ( tree @ A ) > $o ) ).
thf(sy_c_Heap_Ois__heap,type,
is_heap:
!>[A: $tType] : ( ( tree @ A ) > $o ) ).
thf(sy_c_Heap_Omultiset,type,
multiset2:
!>[A: $tType] : ( ( tree @ A ) > ( multiset @ A ) ) ).
thf(sy_c_Heap_Oval,type,
val:
!>[A: $tType] : ( ( tree @ A ) > A ) ).
thf(sy_c_Lattices__Big_Olinorder__class_OMax,type,
lattic929149872er_Max:
!>[A: $tType] : ( ( set @ 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_Oinsert,type,
insert:
!>[A: $tType] : ( A > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_List_Olenlex,type,
lenlex:
!>[A: $tType] : ( ( set @ ( product_prod @ A @ A ) ) > ( set @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) ) ) ).
thf(sy_c_List_Olexord,type,
lexord:
!>[A: $tType] : ( ( set @ ( product_prod @ A @ A ) ) > ( set @ ( product_prod @ ( list @ A ) @ ( list @ 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__ex1,type,
list_ex1:
!>[A: $tType] : ( ( A > $o ) > ( list @ A ) > $o ) ).
thf(sy_c_List_Olistrel,type,
listrel:
!>[A: $tType,B: $tType] : ( ( set @ ( product_prod @ A @ B ) ) > ( set @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) ) ) ).
thf(sy_c_List_Olistrel1,type,
listrel1:
!>[A: $tType] : ( ( set @ ( product_prod @ A @ A ) ) > ( set @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) ) ) ).
thf(sy_c_List_Oproduct__lists,type,
product_lists:
!>[A: $tType] : ( ( list @ ( list @ A ) ) > ( list @ ( list @ A ) ) ) ).
thf(sy_c_List_Osubseqs,type,
subseqs:
!>[A: $tType] : ( ( list @ A ) > ( list @ ( list @ A ) ) ) ).
thf(sy_c_Multiset_Oadd__mset,type,
add_mset:
!>[A: $tType] : ( A > ( multiset @ A ) > ( multiset @ A ) ) ).
thf(sy_c_Multiset_Olinorder__class_Opart,type,
linorder_part:
!>[B: $tType,A: $tType] : ( ( B > A ) > A > ( list @ B ) > ( product_prod @ ( list @ B ) @ ( product_prod @ ( list @ B ) @ ( list @ B ) ) ) ) ).
thf(sy_c_Multiset_Oset__mset,type,
set_mset:
!>[A: $tType] : ( ( multiset @ A ) > ( set @ A ) ) ).
thf(sy_c_Orderings_Oord__class_Oless__eq,type,
ord_less_eq:
!>[A: $tType] : ( A > A > $o ) ).
thf(sy_c_Product__Type_OPair,type,
product_Pair:
!>[A: $tType,B: $tType] : ( A > B > ( product_prod @ A @ B ) ) ).
thf(sy_c_Product__Type_Ointernal__case__prod,type,
produc2004651681e_prod:
!>[A: $tType,B: $tType,C: $tType] : ( ( A > B > C ) > ( product_prod @ A @ B ) > C ) ).
thf(sy_c_Product__Type_Oold_Oprod_Orec__prod,type,
product_rec_prod:
!>[A: $tType,B: $tType,T: $tType] : ( ( A > B > T ) > ( product_prod @ A @ B ) > T ) ).
thf(sy_c_Relation_Oirrefl,type,
irrefl:
!>[A: $tType] : ( ( set @ ( product_prod @ A @ A ) ) > $o ) ).
thf(sy_c_RemoveMax_OCollection,type,
collection:
!>[B: $tType,A: $tType] : ( B > ( B > $o ) > ( ( list @ A ) > B ) > ( B > ( multiset @ A ) ) > $o ) ).
thf(sy_c_RemoveMax_OCollection_Oset,type,
set2:
!>[B: $tType,A: $tType] : ( ( B > ( multiset @ A ) ) > B > ( set @ A ) ) ).
thf(sy_c_RemoveMax_ORemoveMax,type,
removeMax:
!>[B: $tType,A: $tType] : ( B > ( B > $o ) > ( ( list @ A ) > B ) > ( B > ( multiset @ A ) ) > ( B > ( product_prod @ A @ B ) ) > ( B > $o ) > $o ) ).
thf(sy_c_RemoveMax_ORemoveMax_Ossort_H,type,
ssort:
!>[B: $tType,A: $tType] : ( ( B > $o ) > ( B > ( product_prod @ A @ B ) ) > B > ( list @ A ) > ( list @ A ) ) ).
thf(sy_c_RemoveMax_ORemoveMax_Ossort_H__dom,type,
ssort_dom:
!>[B: $tType,A: $tType] : ( ( B > $o ) > ( B > ( product_prod @ A @ B ) ) > ( product_prod @ B @ ( list @ A ) ) > $o ) ).
thf(sy_c_RemoveMax_ORemoveMax__axioms,type,
removeMax_axioms:
!>[B: $tType,A: $tType] : ( ( B > $o ) > ( ( list @ A ) > B ) > ( B > ( multiset @ A ) ) > ( B > ( product_prod @ A @ B ) ) > ( B > $o ) > $o ) ).
thf(sy_c_Set_OCollect,type,
collect:
!>[A: $tType] : ( ( A > $o ) > ( set @ A ) ) ).
thf(sy_c_member,type,
member:
!>[A: $tType] : ( A > ( set @ A ) > $o ) ).
% Relevant facts (255)
thf(fact_0_hs__is__empty__def,axiom,
! [A: $tType] :
( ( heapIm721255937_empty @ A )
= ( ^ [T2: tree @ A] :
( T2
= ( e @ A ) ) ) ) ).
% hs_is_empty_def
thf(fact_1_heapify_Osimps_I1_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( ( heapIm818251801eapify @ A @ ( e @ A ) )
= ( e @ A ) ) ) ).
% heapify.simps(1)
thf(fact_2_siftDown_Osimps_I1_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( ( heapIm748920189ftDown @ A @ ( e @ A ) )
= ( e @ A ) ) ) ).
% siftDown.simps(1)
thf(fact_3_Tree_Osimps_I4_J,axiom,
! [A: $tType,B: $tType,F1: B,F2: A > ( tree @ A ) > ( tree @ A ) > B] :
( ( case_Tree @ B @ A @ F1 @ F2 @ ( e @ A ) )
= F1 ) ).
% Tree.simps(4)
thf(fact_4_siftDown_Ocases,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: tree @ A] :
( ( X
!= ( e @ A ) )
=> ( ! [V: A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( t @ A @ Va @ Vb @ Vc ) ) )
=> ~ ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A,Vd: A,Ve: tree @ A,Vf: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( t @ A @ Vd @ Ve @ Vf ) ) ) ) ) ) ) ) ).
% siftDown.cases
thf(fact_5_removeLeaf_Ocases,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: tree @ A] :
( ! [V: A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( t @ A @ Va @ Vb @ Vc ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A,Vd: A,Ve: tree @ A,Vf: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( t @ A @ Vd @ Ve @ Vf ) ) )
=> ( ! [V: A,Vd: A,Ve: tree @ A,Vf: tree @ A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Vd @ Ve @ Vf ) @ ( t @ A @ Va @ Vb @ Vc ) ) )
=> ( X
= ( e @ A ) ) ) ) ) ) ) ) ).
% removeLeaf.cases
thf(fact_6_removeLeaf_Oinduct,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [P: ( tree @ A ) > $o,A0: tree @ A] :
( ! [V: A] : ( P @ ( t @ A @ V @ ( e @ A ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( P @ ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( e @ A ) ) ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( P @ ( t @ A @ V @ ( e @ A ) @ ( t @ A @ Va @ Vb @ Vc ) ) ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A,Vd: A,Ve: tree @ A,Vf: tree @ A] :
( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( ( P @ ( t @ A @ Va @ Vb @ Vc ) )
=> ( P @ ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( t @ A @ Vd @ Ve @ Vf ) ) ) ) )
=> ( ! [V: A,Vd: A,Ve: tree @ A,Vf: tree @ A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( ( P @ ( t @ A @ Vd @ Ve @ Vf ) )
=> ( ( P @ ( t @ A @ Vd @ Ve @ Vf ) )
=> ( P @ ( t @ A @ V @ ( t @ A @ Vd @ Ve @ Vf ) @ ( t @ A @ Va @ Vb @ Vc ) ) ) ) )
=> ( ( P @ ( e @ A ) )
=> ( P @ A0 ) ) ) ) ) ) ) ) ).
% removeLeaf.induct
thf(fact_7_in__tree_Osimps_I1_J,axiom,
! [A: $tType,V2: A] :
~ ( in_tree @ A @ V2 @ ( e @ A ) ) ).
% in_tree.simps(1)
thf(fact_8_Tree_Osimps_I6_J,axiom,
! [A: $tType,C: $tType,F1: C,F2: A > ( tree @ A ) > ( tree @ A ) > C > C > C] :
( ( rec_Tree @ C @ A @ F1 @ F2 @ ( e @ A ) )
= F1 ) ).
% Tree.simps(6)
thf(fact_9_Heap_Oas__tree__empty,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),T3: B] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( ( ( As_tree @ T3 )
= ( e @ A ) )
= ( Is_empty @ T3 ) ) ) ) ).
% Heap.as_tree_empty
thf(fact_10_Tree_Opred__inject_I1_J,axiom,
! [A: $tType,P: A > $o] : ( pred_Tree @ A @ P @ ( e @ A ) ) ).
% Tree.pred_inject(1)
thf(fact_11_of__list__tree_Osimps_I1_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( ( heapIm1912108042t_tree @ A @ ( nil @ A ) )
= ( e @ A ) ) ) ).
% of_list_tree.simps(1)
thf(fact_12_is__heap_Osimps_I1_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( is_heap @ A @ ( e @ A ) ) ) ).
% is_heap.simps(1)
thf(fact_13_Tree_Oinject,axiom,
! [A: $tType,X21: A,X22: tree @ A,X23: tree @ A,Y21: A,Y22: tree @ A,Y23: tree @ A] :
( ( ( t @ A @ X21 @ X22 @ X23 )
= ( t @ A @ Y21 @ Y22 @ Y23 ) )
= ( ( X21 = Y21 )
& ( X22 = Y22 )
& ( X23 = Y23 ) ) ) ).
% Tree.inject
thf(fact_14_Tree_Opred__inject_I2_J,axiom,
! [A: $tType,P: A > $o,A2: A,Aa: tree @ A,Ab: tree @ A] :
( ( pred_Tree @ A @ P @ ( t @ A @ A2 @ Aa @ Ab ) )
= ( ( P @ A2 )
& ( pred_Tree @ A @ P @ Aa )
& ( pred_Tree @ A @ P @ Ab ) ) ) ).
% Tree.pred_inject(2)
thf(fact_15_Tree_Osimps_I7_J,axiom,
! [C: $tType,A: $tType,F1: C,F2: A > ( tree @ A ) > ( tree @ A ) > C > C > C,X21: A,X22: tree @ A,X23: tree @ A] :
( ( rec_Tree @ C @ A @ F1 @ F2 @ ( t @ A @ X21 @ X22 @ X23 ) )
= ( F2 @ X21 @ X22 @ X23 @ ( rec_Tree @ C @ A @ F1 @ F2 @ X22 ) @ ( rec_Tree @ C @ A @ F1 @ F2 @ X23 ) ) ) ).
% Tree.simps(7)
thf(fact_16_Tree_Osimps_I5_J,axiom,
! [B: $tType,A: $tType,F1: B,F2: A > ( tree @ A ) > ( tree @ A ) > B,X21: A,X22: tree @ A,X23: tree @ A] :
( ( case_Tree @ B @ A @ F1 @ F2 @ ( t @ A @ X21 @ X22 @ X23 ) )
= ( F2 @ X21 @ X22 @ X23 ) ) ).
% Tree.simps(5)
thf(fact_17_in__tree_Osimps_I2_J,axiom,
! [A: $tType,V2: A,V3: A,L: tree @ A,R: tree @ A] :
( ( in_tree @ A @ V2 @ ( t @ A @ V3 @ L @ R ) )
= ( ( V2 = V3 )
| ( in_tree @ A @ V2 @ L )
| ( in_tree @ A @ V2 @ R ) ) ) ).
% in_tree.simps(2)
thf(fact_18_is__heap_Osimps_I2_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A] : ( is_heap @ A @ ( t @ A @ V2 @ ( e @ A ) @ ( e @ A ) ) ) ) ).
% is_heap.simps(2)
thf(fact_19_heapify_Osimps_I2_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,L: tree @ A,R: tree @ A] :
( ( heapIm818251801eapify @ A @ ( t @ A @ V2 @ L @ R ) )
= ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm818251801eapify @ A @ L ) @ ( heapIm818251801eapify @ A @ R ) ) ) ) ) ).
% heapify.simps(2)
thf(fact_20_Heap_Ois__heap__of__list,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),I: list @ A] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( is_heap @ A @ ( As_tree @ ( Of_list @ I ) ) ) ) ) ).
% Heap.is_heap_of_list
thf(fact_21_heapify__heap__is__heap,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A] : ( is_heap @ A @ ( heapIm818251801eapify @ A @ T3 ) ) ) ).
% heapify_heap_is_heap
thf(fact_22_siftDown__in__tree__set,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( ( in_tree @ A )
= ( ^ [V4: A,T2: tree @ A] : ( in_tree @ A @ V4 @ ( heapIm748920189ftDown @ A @ T2 ) ) ) ) ) ).
% siftDown_in_tree_set
thf(fact_23_siftDown__heap__is__heap,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [L: tree @ A,R: tree @ A,T3: tree @ A,V2: A] :
( ( is_heap @ A @ L )
=> ( ( is_heap @ A @ R )
=> ( ( T3
= ( t @ A @ V2 @ L @ R ) )
=> ( is_heap @ A @ ( heapIm748920189ftDown @ A @ T3 ) ) ) ) ) ) ).
% siftDown_heap_is_heap
thf(fact_24_is__heap_Ocases,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: tree @ A] :
( ( X
!= ( e @ A ) )
=> ( ! [V: A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( e @ A ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( e @ A ) @ ( t @ A @ Va @ Vb @ Vc ) ) )
=> ( ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( e @ A ) ) )
=> ~ ! [V: A,Va: A,Vb: tree @ A,Vc: tree @ A,Vd: A,Ve: tree @ A,Vf: tree @ A] :
( X
!= ( t @ A @ V @ ( t @ A @ Va @ Vb @ Vc ) @ ( t @ A @ Vd @ Ve @ Vf ) ) ) ) ) ) ) ) ).
% is_heap.cases
thf(fact_25_Tree_Oexhaust,axiom,
! [A: $tType,Y: tree @ A] :
( ( Y
!= ( e @ A ) )
=> ~ ! [X212: A,X222: tree @ A,X232: tree @ A] :
( Y
!= ( t @ A @ X212 @ X222 @ X232 ) ) ) ).
% Tree.exhaust
thf(fact_26_Tree_Oinduct,axiom,
! [A: $tType,P: ( tree @ A ) > $o,Tree: tree @ A] :
( ( P @ ( e @ A ) )
=> ( ! [X1: A,X2: tree @ A,X3: tree @ A] :
( ( P @ X2 )
=> ( ( P @ X3 )
=> ( P @ ( t @ A @ X1 @ X2 @ X3 ) ) ) )
=> ( P @ Tree ) ) ) ).
% Tree.induct
thf(fact_27_Tree_Odistinct_I1_J,axiom,
! [A: $tType,X21: A,X22: tree @ A,X23: tree @ A] :
( ( e @ A )
!= ( t @ A @ X21 @ X22 @ X23 ) ) ).
% Tree.distinct(1)
thf(fact_28_siftDown_Osimps_I2_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A] :
( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( e @ A ) @ ( e @ A ) ) )
= ( t @ A @ V2 @ ( e @ A ) @ ( e @ A ) ) ) ) ).
% siftDown.simps(2)
thf(fact_29_hs__of__list__def,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ( ( heapIm874063447f_list @ A )
= ( ^ [L2: list @ A] : ( heapIm818251801eapify @ A @ ( heapIm1912108042t_tree @ A @ L2 ) ) ) ) ) ).
% hs_of_list_def
thf(fact_30_siftDown__in__tree,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A] :
( ( T3
!= ( e @ A ) )
=> ( in_tree @ A @ ( val @ A @ ( heapIm748920189ftDown @ A @ T3 ) ) @ T3 ) ) ) ).
% siftDown_in_tree
thf(fact_31_of__list__tree_Osimps_I2_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,Tail: list @ A] :
( ( heapIm1912108042t_tree @ A @ ( cons @ A @ V2 @ Tail ) )
= ( t @ A @ V2 @ ( heapIm1912108042t_tree @ A @ Tail ) @ ( e @ A ) ) ) ) ).
% of_list_tree.simps(2)
thf(fact_32_Heap_Oaxioms_I2_J,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B )] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( heap_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max ) ) ) ).
% Heap.axioms(2)
thf(fact_33_Heap_Oremove__max__is__heap,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),L: B,M: A,L3: B] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( ~ ( Is_empty @ L )
=> ( ( is_heap @ A @ ( As_tree @ L ) )
=> ( ( ( product_Pair @ A @ B @ M @ L3 )
= ( Remove_max @ L ) )
=> ( is_heap @ A @ ( As_tree @ L3 ) ) ) ) ) ) ) ).
% Heap.remove_max_is_heap
thf(fact_34_multiset__heapify,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A] :
( ( multiset2 @ A @ ( heapIm818251801eapify @ A @ T3 ) )
= ( multiset2 @ A @ T3 ) ) ) ).
% multiset_heapify
thf(fact_35_siftDown__Node,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A,V2: A,L: tree @ A,R: tree @ A] :
( ( T3
= ( t @ A @ V2 @ L @ R ) )
=> ? [L4: tree @ A,V5: A,R2: tree @ A] :
( ( ( heapIm748920189ftDown @ A @ T3 )
= ( t @ A @ V5 @ L4 @ R2 ) )
& ( ord_less_eq @ A @ V2 @ V5 ) ) ) ) ).
% siftDown_Node
thf(fact_36_left_Osimps,axiom,
! [A: $tType,V2: A,L: tree @ A,R: tree @ A] :
( ( heapIm1271749598e_left @ A @ ( t @ A @ V2 @ L @ R ) )
= L ) ).
% left.simps
thf(fact_37_right_Osimps,axiom,
! [A: $tType,V2: A,L: tree @ A,R: tree @ A] :
( ( heapIm1434396069_right @ A @ ( t @ A @ V2 @ L @ R ) )
= R ) ).
% right.simps
thf(fact_38_Heap_Omultiset,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),L: B] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( ( Multiset @ L )
= ( multiset2 @ A @ ( As_tree @ L ) ) ) ) ) ).
% Heap.multiset
thf(fact_39_list_Oinject,axiom,
! [A: $tType,X21: A,X22: list @ A,Y21: A,Y22: list @ A] :
( ( ( cons @ A @ X21 @ X22 )
= ( cons @ A @ Y21 @ Y22 ) )
= ( ( X21 = Y21 )
& ( X22 = Y22 ) ) ) ).
% list.inject
thf(fact_40_shuffles_Ocases,axiom,
! [A: $tType,X: product_prod @ ( list @ A ) @ ( list @ A )] :
( ! [Ys: list @ A] :
( X
!= ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( nil @ A ) @ Ys ) )
=> ( ! [Xs: list @ A] :
( X
!= ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs @ ( nil @ A ) ) )
=> ~ ! [X4: A,Xs: list @ A,Y2: A,Ys: list @ A] :
( X
!= ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X4 @ Xs ) @ ( cons @ A @ Y2 @ Ys ) ) ) ) ) ).
% shuffles.cases
thf(fact_41_transpose_Ocases,axiom,
! [A: $tType,X: list @ ( list @ A )] :
( ( X
!= ( nil @ ( list @ A ) ) )
=> ( ! [Xss: list @ ( list @ A )] :
( X
!= ( cons @ ( list @ A ) @ ( nil @ A ) @ Xss ) )
=> ~ ! [X4: A,Xs: list @ A,Xss: list @ ( list @ A )] :
( X
!= ( cons @ ( list @ A ) @ ( cons @ A @ X4 @ Xs ) @ Xss ) ) ) ) ).
% transpose.cases
thf(fact_42_sorted__wrt_Ocases,axiom,
! [A: $tType,X: product_prod @ ( A > A > $o ) @ ( list @ A )] :
( ! [P2: A > A > $o] :
( X
!= ( product_Pair @ ( A > A > $o ) @ ( list @ A ) @ P2 @ ( nil @ A ) ) )
=> ~ ! [P2: A > A > $o,X4: A,Ys: list @ A] :
( X
!= ( product_Pair @ ( A > A > $o ) @ ( list @ A ) @ P2 @ ( cons @ A @ X4 @ Ys ) ) ) ) ).
% sorted_wrt.cases
thf(fact_43_arg__min__list_Ocases,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ B )
=> ! [X: product_prod @ ( A > B ) @ ( list @ A )] :
( ! [F: A > B,X4: A] :
( X
!= ( product_Pair @ ( A > B ) @ ( list @ A ) @ F @ ( cons @ A @ X4 @ ( nil @ A ) ) ) )
=> ( ! [F: A > B,X4: A,Y2: A,Zs: list @ A] :
( X
!= ( product_Pair @ ( A > B ) @ ( list @ A ) @ F @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Zs ) ) ) )
=> ~ ! [A3: A > B] :
( X
!= ( product_Pair @ ( A > B ) @ ( list @ A ) @ A3 @ ( nil @ A ) ) ) ) ) ) ).
% arg_min_list.cases
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,A4: set @ A] :
( ( collect @ A
@ ^ [X5: A] : ( member @ A @ X5 @ A4 ) )
= A4 ) ).
% 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,F3: A > B,G: A > B] :
( ! [X4: A] :
( ( F3 @ X4 )
= ( G @ X4 ) )
=> ( F3 = G ) ) ).
% ext
thf(fact_48_successively_Ocases,axiom,
! [A: $tType,X: product_prod @ ( A > A > $o ) @ ( list @ A )] :
( ! [P2: A > A > $o] :
( X
!= ( product_Pair @ ( A > A > $o ) @ ( list @ A ) @ P2 @ ( nil @ A ) ) )
=> ( ! [P2: A > A > $o,X4: A] :
( X
!= ( product_Pair @ ( A > A > $o ) @ ( list @ A ) @ P2 @ ( cons @ A @ X4 @ ( nil @ A ) ) ) )
=> ~ ! [P2: A > A > $o,X4: A,Y2: A,Xs: list @ A] :
( X
!= ( product_Pair @ ( A > A > $o ) @ ( list @ A ) @ P2 @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Xs ) ) ) ) ) ) ).
% successively.cases
thf(fact_49_map__tailrec__rev_Ocases,axiom,
! [A: $tType,B: $tType,X: product_prod @ ( A > B ) @ ( product_prod @ ( list @ A ) @ ( list @ B ) )] :
( ! [F: A > B,Bs: list @ B] :
( X
!= ( product_Pair @ ( A > B ) @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ F @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( nil @ A ) @ Bs ) ) )
=> ~ ! [F: A > B,A3: A,As: list @ A,Bs: list @ B] :
( X
!= ( product_Pair @ ( A > B ) @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ F @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( cons @ A @ A3 @ As ) @ Bs ) ) ) ) ).
% map_tailrec_rev.cases
thf(fact_50_not__Cons__self2,axiom,
! [A: $tType,X: A,Xs2: list @ A] :
( ( cons @ A @ X @ Xs2 )
!= Xs2 ) ).
% not_Cons_self2
thf(fact_51_strict__sorted_Oinduct,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [P: ( list @ A ) > $o,A0: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X4: A,Ys: list @ A] :
( ( P @ Ys )
=> ( P @ ( cons @ A @ X4 @ Ys ) ) )
=> ( P @ A0 ) ) ) ) ).
% strict_sorted.induct
thf(fact_52_strict__sorted_Ocases,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: list @ A] :
( ( X
!= ( nil @ A ) )
=> ~ ! [X4: A,Ys: list @ A] :
( X
!= ( cons @ A @ X4 @ Ys ) ) ) ) ).
% strict_sorted.cases
thf(fact_53_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] :
( ! [F: A > B,X_1: list @ B] : ( P @ F @ ( nil @ A ) @ X_1 )
=> ( ! [F: A > B,A3: A,As: list @ A,Bs: list @ B] :
( ( P @ F @ As @ ( cons @ B @ ( F @ A3 ) @ Bs ) )
=> ( P @ F @ ( cons @ A @ A3 @ As ) @ Bs ) )
=> ( P @ A0 @ A1 @ A22 ) ) ) ).
% map_tailrec_rev.induct
thf(fact_54_list__nonempty__induct,axiom,
! [A: $tType,Xs2: list @ A,P: ( list @ A ) > $o] :
( ( Xs2
!= ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( P @ Xs )
=> ( P @ ( cons @ A @ X4 @ Xs ) ) ) )
=> ( P @ Xs2 ) ) ) ) ).
% list_nonempty_induct
thf(fact_55_successively_Oinduct,axiom,
! [A: $tType,P: ( A > A > $o ) > ( list @ A ) > $o,A0: A > A > $o,A1: list @ A] :
( ! [P2: A > A > $o] : ( P @ P2 @ ( nil @ A ) )
=> ( ! [P2: A > A > $o,X4: A] : ( P @ P2 @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [P2: A > A > $o,X4: A,Y2: A,Xs: list @ A] :
( ( P @ P2 @ ( cons @ A @ Y2 @ Xs ) )
=> ( P @ P2 @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Xs ) ) ) )
=> ( P @ A0 @ A1 ) ) ) ) ).
% successively.induct
thf(fact_56_arg__min__list_Oinduct,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ B )
=> ! [P: ( A > B ) > ( list @ A ) > $o,A0: A > B,A1: list @ A] :
( ! [F: A > B,X4: A] : ( P @ F @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [F: A > B,X4: A,Y2: A,Zs: list @ A] :
( ( P @ F @ ( cons @ A @ Y2 @ Zs ) )
=> ( P @ F @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Zs ) ) ) )
=> ( ! [A3: A > B] : ( P @ A3 @ ( nil @ A ) )
=> ( P @ A0 @ A1 ) ) ) ) ) ).
% arg_min_list.induct
thf(fact_57_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,Y2: A,Xs: list @ A] :
( ( ( X4 = Y2 )
=> ( P @ ( cons @ A @ X4 @ Xs ) ) )
=> ( ( ( X4 != Y2 )
=> ( P @ ( cons @ A @ Y2 @ Xs ) ) )
=> ( P @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Xs ) ) ) ) )
=> ( P @ A0 ) ) ) ) ).
% remdups_adj.induct
thf(fact_58_sorted__wrt_Oinduct,axiom,
! [A: $tType,P: ( A > A > $o ) > ( list @ A ) > $o,A0: A > A > $o,A1: list @ A] :
( ! [P2: A > A > $o] : ( P @ P2 @ ( nil @ A ) )
=> ( ! [P2: A > A > $o,X4: A,Ys: list @ A] :
( ( P @ P2 @ Ys )
=> ( P @ P2 @ ( cons @ A @ X4 @ Ys ) ) )
=> ( P @ A0 @ A1 ) ) ) ).
% sorted_wrt.induct
thf(fact_59_remdups__adj_Ocases,axiom,
! [A: $tType,X: list @ A] :
( ( X
!= ( nil @ A ) )
=> ( ! [X4: A] :
( X
!= ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ~ ! [X4: A,Y2: A,Xs: list @ A] :
( X
!= ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Xs ) ) ) ) ) ).
% remdups_adj.cases
thf(fact_60_shuffles_Oinduct,axiom,
! [A: $tType,P: ( list @ A ) > ( list @ A ) > $o,A0: list @ A,A1: list @ A] :
( ! [X_1: list @ A] : ( P @ ( nil @ A ) @ X_1 )
=> ( ! [Xs: list @ A] : ( P @ Xs @ ( nil @ A ) )
=> ( ! [X4: A,Xs: list @ A,Y2: A,Ys: list @ A] :
( ( P @ Xs @ ( cons @ A @ Y2 @ Ys ) )
=> ( ( P @ ( cons @ A @ X4 @ Xs ) @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs ) @ ( cons @ A @ Y2 @ Ys ) ) ) )
=> ( P @ A0 @ A1 ) ) ) ) ).
% shuffles.induct
thf(fact_61_min__list_Oinduct,axiom,
! [A: $tType] :
( ( ord @ A )
=> ! [P: ( list @ A ) > $o,A0: list @ A] :
( ! [X4: A,Xs: list @ A] :
( ! [X213: A,X223: list @ A] :
( ( Xs
= ( cons @ A @ X213 @ X223 ) )
=> ( P @ Xs ) )
=> ( P @ ( cons @ A @ X4 @ Xs ) ) )
=> ( ( P @ ( nil @ A ) )
=> ( P @ A0 ) ) ) ) ).
% min_list.induct
thf(fact_62_min__list_Ocases,axiom,
! [A: $tType] :
( ( ord @ A )
=> ! [X: list @ A] :
( ! [X4: A,Xs: list @ A] :
( X
!= ( cons @ A @ X4 @ Xs ) )
=> ( X
= ( nil @ A ) ) ) ) ).
% min_list.cases
thf(fact_63_induct__list012,axiom,
! [A: $tType,P: ( list @ A ) > $o,Xs2: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Y2: A,Zs: list @ A] :
( ( P @ Zs )
=> ( ( P @ ( cons @ A @ Y2 @ Zs ) )
=> ( P @ ( cons @ A @ X4 @ ( cons @ A @ Y2 @ Zs ) ) ) ) )
=> ( P @ Xs2 ) ) ) ) ).
% induct_list012
thf(fact_64_splice_Oinduct,axiom,
! [A: $tType,P: ( list @ A ) > ( list @ A ) > $o,A0: list @ A,A1: list @ A] :
( ! [X_1: list @ A] : ( P @ ( nil @ A ) @ X_1 )
=> ( ! [X4: A,Xs: list @ A,Ys: list @ A] :
( ( P @ Ys @ Xs )
=> ( P @ ( cons @ A @ X4 @ Xs ) @ Ys ) )
=> ( P @ A0 @ A1 ) ) ) ).
% splice.induct
thf(fact_65_list__induct2_H,axiom,
! [A: $tType,B: $tType,P: ( list @ A ) > ( list @ B ) > $o,Xs2: list @ A,Ys2: list @ B] :
( ( P @ ( nil @ A ) @ ( nil @ B ) )
=> ( ! [X4: A,Xs: list @ A] : ( P @ ( cons @ A @ X4 @ Xs ) @ ( nil @ B ) )
=> ( ! [Y2: B,Ys: list @ B] : ( P @ ( nil @ A ) @ ( cons @ B @ Y2 @ Ys ) )
=> ( ! [X4: A,Xs: list @ A,Y2: B,Ys: list @ B] :
( ( P @ Xs @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs ) @ ( cons @ B @ Y2 @ Ys ) ) )
=> ( P @ Xs2 @ Ys2 ) ) ) ) ) ).
% list_induct2'
thf(fact_66_neq__Nil__conv,axiom,
! [A: $tType,Xs2: list @ A] :
( ( Xs2
!= ( nil @ A ) )
= ( ? [Y3: A,Ys3: list @ A] :
( Xs2
= ( cons @ A @ Y3 @ Ys3 ) ) ) ) ).
% neq_Nil_conv
thf(fact_67_list_Oinducts,axiom,
! [A: $tType,P: ( list @ A ) > $o,List: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X1: A,X2: list @ A] :
( ( P @ X2 )
=> ( P @ ( cons @ A @ X1 @ X2 ) ) )
=> ( P @ List ) ) ) ).
% list.inducts
thf(fact_68_list_Oexhaust,axiom,
! [A: $tType,Y: list @ A] :
( ( Y
!= ( nil @ A ) )
=> ~ ! [X212: A,X222: list @ A] :
( Y
!= ( cons @ A @ X212 @ X222 ) ) ) ).
% list.exhaust
thf(fact_69_list_OdiscI,axiom,
! [A: $tType,List: list @ A,X21: A,X22: list @ A] :
( ( List
= ( cons @ A @ X21 @ X22 ) )
=> ( List
!= ( nil @ A ) ) ) ).
% list.discI
thf(fact_70_list_Odistinct_I1_J,axiom,
! [A: $tType,X21: A,X22: list @ A] :
( ( nil @ A )
!= ( cons @ A @ X21 @ X22 ) ) ).
% list.distinct(1)
thf(fact_71_Tree_Opred__mono,axiom,
! [A: $tType,P: A > $o,Pa: A > $o] :
( ( ord_less_eq @ ( A > $o ) @ P @ Pa )
=> ( ord_less_eq @ ( ( tree @ A ) > $o ) @ ( pred_Tree @ A @ P ) @ ( pred_Tree @ A @ Pa ) ) ) ).
% Tree.pred_mono
thf(fact_72_siftDown_Osimps_I5_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [Vd2: A,Ve2: tree @ A,Vf2: tree @ A,Va2: A,Vb2: tree @ A,Vc2: tree @ A,V2: A] :
( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
=> ( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
= ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
=> ( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
= ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) ) ) ) ) ) ) ) ) ).
% siftDown.simps(5)
thf(fact_73_siftDown_Osimps_I6_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [Va2: A,Vb2: tree @ A,Vc2: tree @ A,Vd2: A,Ve2: tree @ A,Vf2: tree @ A,V2: A] :
( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
=> ( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
=> ( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) ) ) ) ) ) ) ).
% siftDown.simps(6)
thf(fact_74_Heap_Oremove__max__val,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),T3: B,M: A,T4: B] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( ~ ( Is_empty @ T3 )
=> ( ( ( product_Pair @ A @ B @ M @ T4 )
= ( Remove_max @ T3 ) )
=> ( M
= ( val @ A @ ( As_tree @ T3 ) ) ) ) ) ) ) ).
% Heap.remove_max_val
thf(fact_75_siftDown_Osimps_I3_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [Va2: A,Vb2: tree @ A,Vc2: tree @ A,V2: A] :
( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( e @ A ) ) )
= ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( e @ A ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( e @ A ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) @ ( e @ A ) ) ) ) ) ) ).
% siftDown.simps(3)
thf(fact_76_siftDown_Osimps_I4_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [Va2: A,Vb2: tree @ A,Vc2: tree @ A,V2: A] :
( ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( e @ A ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ V2 @ ( e @ A ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) )
& ( ~ ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
=> ( ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( e @ A ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( t @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( e @ A ) @ ( heapIm748920189ftDown @ A @ ( t @ A @ V2 @ ( heapIm1271749598e_left @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ ( heapIm1434396069_right @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) ) ) ) ) ).
% siftDown.simps(4)
thf(fact_77_is__heap_Osimps_I5_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,Va2: A,Vb2: tree @ A,Vc2: tree @ A,Vd2: A,Ve2: tree @ A,Vf2: tree @ A] :
( ( is_heap @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) )
= ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) )
& ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) ).
% is_heap.simps(5)
thf(fact_78_is__heap_Osimps_I6_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,Vd2: A,Ve2: tree @ A,Vf2: tree @ A,Va2: A,Vb2: tree @ A,Vc2: tree @ A] :
( ( is_heap @ A @ ( t @ A @ V2 @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) )
& ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Vd2 @ Ve2 @ Vf2 ) ) ) ) ) ).
% is_heap.simps(6)
thf(fact_79_is__heap__max,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,T3: tree @ A] :
( ( in_tree @ A @ V2 @ T3 )
=> ( ( is_heap @ A @ T3 )
=> ( ord_less_eq @ A @ V2 @ ( val @ A @ T3 ) ) ) ) ) ).
% is_heap_max
thf(fact_80_val_Osimps,axiom,
! [A: $tType,V2: A,Uu: tree @ A,Uv: tree @ A] :
( ( val @ A @ ( t @ A @ V2 @ Uu @ Uv ) )
= V2 ) ).
% val.simps
thf(fact_81_is__heap_Osimps_I3_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,Va2: A,Vb2: tree @ A,Vc2: tree @ A] :
( ( is_heap @ A @ ( t @ A @ V2 @ ( e @ A ) @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) )
= ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) ).
% is_heap.simps(3)
thf(fact_82_is__heap_Osimps_I4_J,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [V2: A,Va2: A,Vb2: tree @ A,Vc2: tree @ A] :
( ( is_heap @ A @ ( t @ A @ V2 @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) @ ( e @ A ) ) )
= ( ( ord_less_eq @ A @ ( val @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) @ V2 )
& ( is_heap @ A @ ( t @ A @ Va2 @ Vb2 @ Vc2 ) ) ) ) ) ).
% is_heap.simps(4)
thf(fact_83_siftDown__multiset,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A] :
( ( multiset2 @ A @ ( heapIm748920189ftDown @ A @ T3 ) )
= ( multiset2 @ A @ T3 ) ) ) ).
% siftDown_multiset
thf(fact_84_old_Oprod_Oinject,axiom,
! [A: $tType,B: $tType,A2: A,B2: B,A5: A,B3: B] :
( ( ( product_Pair @ A @ B @ A2 @ B2 )
= ( product_Pair @ A @ B @ A5 @ B3 ) )
= ( ( A2 = A5 )
& ( B2 = B3 ) ) ) ).
% old.prod.inject
thf(fact_85_prod_Oinject,axiom,
! [A: $tType,B: $tType,X12: A,X24: B,Y1: A,Y24: B] :
( ( ( product_Pair @ A @ B @ X12 @ X24 )
= ( product_Pair @ A @ B @ Y1 @ Y24 ) )
= ( ( X12 = Y1 )
& ( X24 = Y24 ) ) ) ).
% prod.inject
thf(fact_86_order__refl,axiom,
! [A: $tType] :
( ( preorder @ A )
=> ! [X: A] : ( ord_less_eq @ A @ X @ X ) ) ).
% order_refl
thf(fact_87_Heap__axioms_Ointro,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Of_list: ( list @ A ) > B,Is_empty: B > $o,Remove_max: B > ( product_prod @ A @ B )] :
( ! [L5: B] :
( ( Multiset @ L5 )
= ( multiset2 @ A @ ( As_tree @ L5 ) ) )
=> ( ! [I2: list @ A] : ( is_heap @ A @ ( As_tree @ ( Of_list @ I2 ) ) )
=> ( ! [T5: B] :
( ( ( As_tree @ T5 )
= ( e @ A ) )
= ( Is_empty @ T5 ) )
=> ( ! [L5: B,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( ( add_mset @ A @ M2 @ ( Multiset @ L4 ) )
= ( Multiset @ L5 ) ) ) )
=> ( ! [L5: B,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( is_heap @ A @ ( As_tree @ L5 ) )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( is_heap @ A @ ( As_tree @ L4 ) ) ) ) )
=> ( ! [T5: B,M2: A,T6: B] :
( ~ ( Is_empty @ T5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ T6 )
= ( Remove_max @ T5 ) )
=> ( M2
= ( val @ A @ ( As_tree @ T5 ) ) ) ) )
=> ( heap_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max ) ) ) ) ) ) ) ) ).
% Heap_axioms.intro
thf(fact_88_Heap__axioms__def,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( heap_axioms @ B @ A )
= ( ^ [Is_empty2: B > $o,Of_list2: ( list @ A ) > B,Multiset2: B > ( multiset @ A ),As_tree2: B > ( tree @ A ),Remove_max2: B > ( product_prod @ A @ B )] :
( ! [L2: B] :
( ( Multiset2 @ L2 )
= ( multiset2 @ A @ ( As_tree2 @ L2 ) ) )
& ! [I3: list @ A] : ( is_heap @ A @ ( As_tree2 @ ( Of_list2 @ I3 ) ) )
& ! [T2: B] :
( ( ( As_tree2 @ T2 )
= ( e @ A ) )
= ( Is_empty2 @ T2 ) )
& ! [L2: B,M3: A,L6: B] :
( ~ ( Is_empty2 @ L2 )
=> ( ( ( product_Pair @ A @ B @ M3 @ L6 )
= ( Remove_max2 @ L2 ) )
=> ( ( add_mset @ A @ M3 @ ( Multiset2 @ L6 ) )
= ( Multiset2 @ L2 ) ) ) )
& ! [L2: B,M3: A,L6: B] :
( ~ ( Is_empty2 @ L2 )
=> ( ( is_heap @ A @ ( As_tree2 @ L2 ) )
=> ( ( ( product_Pair @ A @ B @ M3 @ L6 )
= ( Remove_max2 @ L2 ) )
=> ( is_heap @ A @ ( As_tree2 @ L6 ) ) ) ) )
& ! [T2: B,M3: A,T7: B] :
( ~ ( Is_empty2 @ T2 )
=> ( ( ( product_Pair @ A @ B @ M3 @ T7 )
= ( Remove_max2 @ T2 ) )
=> ( M3
= ( val @ A @ ( As_tree2 @ T2 ) ) ) ) ) ) ) ) ) ).
% Heap_axioms_def
thf(fact_89_subset__eq__mset__impl_Ocases,axiom,
! [A: $tType,X: product_prod @ ( list @ A ) @ ( list @ A )] :
( ! [Ys: list @ A] :
( X
!= ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( nil @ A ) @ Ys ) )
=> ~ ! [X4: A,Xs: list @ A,Ys: list @ A] :
( X
!= ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X4 @ Xs ) @ Ys ) ) ) ).
% subset_eq_mset_impl.cases
thf(fact_90_insert__Nil,axiom,
! [A: $tType,X: A] :
( ( insert @ A @ X @ ( nil @ A ) )
= ( cons @ A @ X @ ( nil @ A ) ) ) ).
% insert_Nil
thf(fact_91_Heap_Ointro,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B )] :
( ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset )
=> ( ( heap_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max ) ) ) ) ).
% Heap.intro
thf(fact_92_add__mset__add__mset__same__iff,axiom,
! [A: $tType,A2: A,A4: multiset @ A,B4: multiset @ A] :
( ( ( add_mset @ A @ A2 @ A4 )
= ( add_mset @ A @ A2 @ B4 ) )
= ( A4 = B4 ) ) ).
% add_mset_add_mset_same_iff
thf(fact_93_multi__self__add__other__not__self,axiom,
! [A: $tType,M4: multiset @ A,X: A] :
( M4
!= ( add_mset @ A @ X @ M4 ) ) ).
% multi_self_add_other_not_self
thf(fact_94_predicate1I,axiom,
! [A: $tType,P: A > $o,Q: A > $o] :
( ! [X4: A] :
( ( P @ X4 )
=> ( Q @ X4 ) )
=> ( ord_less_eq @ ( A > $o ) @ P @ Q ) ) ).
% predicate1I
thf(fact_95_rev__predicate1D,axiom,
! [A: $tType,P: A > $o,X: A,Q: A > $o] :
( ( P @ X )
=> ( ( ord_less_eq @ ( A > $o ) @ P @ Q )
=> ( Q @ X ) ) ) ).
% rev_predicate1D
thf(fact_96_predicate1D,axiom,
! [A: $tType,P: A > $o,Q: A > $o,X: A] :
( ( ord_less_eq @ ( A > $o ) @ P @ Q )
=> ( ( P @ X )
=> ( Q @ X ) ) ) ).
% predicate1D
thf(fact_97_add__eq__conv__ex,axiom,
! [A: $tType,A2: A,M4: multiset @ A,B2: A,N: multiset @ A] :
( ( ( add_mset @ A @ A2 @ M4 )
= ( add_mset @ A @ B2 @ N ) )
= ( ( ( M4 = N )
& ( A2 = B2 ) )
| ? [K: multiset @ A] :
( ( M4
= ( add_mset @ A @ B2 @ K ) )
& ( N
= ( add_mset @ A @ A2 @ K ) ) ) ) ) ).
% add_eq_conv_ex
thf(fact_98_add__mset__commute,axiom,
! [A: $tType,X: A,Y: A,M4: multiset @ A] :
( ( add_mset @ A @ X @ ( add_mset @ A @ Y @ M4 ) )
= ( add_mset @ A @ Y @ ( add_mset @ A @ X @ M4 ) ) ) ).
% add_mset_commute
thf(fact_99_Heap_Oaxioms_I1_J,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B )] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset ) ) ) ).
% Heap.axioms(1)
thf(fact_100_Heap_Oremove__max__multiset_H,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),As_tree: B > ( tree @ A ),Remove_max: B > ( product_prod @ A @ B ),L: B,M: A,L3: B] :
( ( heap @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ As_tree @ Remove_max )
=> ( ~ ( Is_empty @ L )
=> ( ( ( product_Pair @ A @ B @ M @ L3 )
= ( Remove_max @ L ) )
=> ( ( add_mset @ A @ M @ ( Multiset @ L3 ) )
= ( Multiset @ L ) ) ) ) ) ) ).
% Heap.remove_max_multiset'
thf(fact_101_le__funD,axiom,
! [B: $tType,A: $tType] :
( ( ord @ B )
=> ! [F3: A > B,G: A > B,X: A] :
( ( ord_less_eq @ ( A > B ) @ F3 @ G )
=> ( ord_less_eq @ B @ ( F3 @ X ) @ ( G @ X ) ) ) ) ).
% le_funD
thf(fact_102_le__funE,axiom,
! [B: $tType,A: $tType] :
( ( ord @ B )
=> ! [F3: A > B,G: A > B,X: A] :
( ( ord_less_eq @ ( A > B ) @ F3 @ G )
=> ( ord_less_eq @ B @ ( F3 @ X ) @ ( G @ X ) ) ) ) ).
% le_funE
thf(fact_103_le__funI,axiom,
! [B: $tType,A: $tType] :
( ( ord @ B )
=> ! [F3: A > B,G: A > B] :
( ! [X4: A] : ( ord_less_eq @ B @ ( F3 @ X4 ) @ ( G @ X4 ) )
=> ( ord_less_eq @ ( A > B ) @ F3 @ G ) ) ) ).
% le_funI
thf(fact_104_le__fun__def,axiom,
! [B: $tType,A: $tType] :
( ( ord @ B )
=> ( ( ord_less_eq @ ( A > B ) )
= ( ^ [F4: A > B,G2: A > B] :
! [X5: A] : ( ord_less_eq @ B @ ( F4 @ X5 ) @ ( G2 @ X5 ) ) ) ) ) ).
% le_fun_def
thf(fact_105_order__subst1,axiom,
! [A: $tType,B: $tType] :
( ( ( order @ B )
& ( order @ A ) )
=> ! [A2: A,F3: B > A,B2: B,C2: B] :
( ( ord_less_eq @ A @ A2 @ ( F3 @ B2 ) )
=> ( ( ord_less_eq @ B @ B2 @ C2 )
=> ( ! [X4: B,Y2: B] :
( ( ord_less_eq @ B @ X4 @ Y2 )
=> ( ord_less_eq @ A @ ( F3 @ X4 ) @ ( F3 @ Y2 ) ) )
=> ( ord_less_eq @ A @ A2 @ ( F3 @ C2 ) ) ) ) ) ) ).
% order_subst1
thf(fact_106_order__subst2,axiom,
! [A: $tType,C: $tType] :
( ( ( order @ C )
& ( order @ A ) )
=> ! [A2: A,B2: A,F3: A > C,C2: C] :
( ( ord_less_eq @ A @ A2 @ B2 )
=> ( ( ord_less_eq @ C @ ( F3 @ B2 ) @ C2 )
=> ( ! [X4: A,Y2: A] :
( ( ord_less_eq @ A @ X4 @ Y2 )
=> ( ord_less_eq @ C @ ( F3 @ X4 ) @ ( F3 @ Y2 ) ) )
=> ( ord_less_eq @ C @ ( F3 @ A2 ) @ C2 ) ) ) ) ) ).
% order_subst2
thf(fact_107_ord__eq__le__subst,axiom,
! [A: $tType,B: $tType] :
( ( ( ord @ B )
& ( ord @ A ) )
=> ! [A2: A,F3: B > A,B2: B,C2: B] :
( ( A2
= ( F3 @ B2 ) )
=> ( ( ord_less_eq @ B @ B2 @ C2 )
=> ( ! [X4: B,Y2: B] :
( ( ord_less_eq @ B @ X4 @ Y2 )
=> ( ord_less_eq @ A @ ( F3 @ X4 ) @ ( F3 @ Y2 ) ) )
=> ( ord_less_eq @ A @ A2 @ ( F3 @ C2 ) ) ) ) ) ) ).
% ord_eq_le_subst
thf(fact_108_ord__le__eq__subst,axiom,
! [A: $tType,B: $tType] :
( ( ( ord @ B )
& ( ord @ A ) )
=> ! [A2: A,B2: A,F3: A > B,C2: B] :
( ( ord_less_eq @ A @ A2 @ B2 )
=> ( ( ( F3 @ B2 )
= C2 )
=> ( ! [X4: A,Y2: A] :
( ( ord_less_eq @ A @ X4 @ Y2 )
=> ( ord_less_eq @ B @ ( F3 @ X4 ) @ ( F3 @ Y2 ) ) )
=> ( ord_less_eq @ B @ ( F3 @ A2 ) @ C2 ) ) ) ) ) ).
% ord_le_eq_subst
thf(fact_109_eq__iff,axiom,
! [A: $tType] :
( ( order @ A )
=> ( ( ^ [Y4: A,Z: A] : ( Y4 = Z ) )
= ( ^ [X5: A,Y3: A] :
( ( ord_less_eq @ A @ X5 @ Y3 )
& ( ord_less_eq @ A @ Y3 @ X5 ) ) ) ) ) ).
% eq_iff
thf(fact_110_antisym,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [X: A,Y: A] :
( ( ord_less_eq @ A @ X @ Y )
=> ( ( ord_less_eq @ A @ Y @ X )
=> ( X = Y ) ) ) ) ).
% antisym
thf(fact_111_linear,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: A,Y: A] :
( ( ord_less_eq @ A @ X @ Y )
| ( ord_less_eq @ A @ Y @ X ) ) ) ).
% linear
thf(fact_112_eq__refl,axiom,
! [A: $tType] :
( ( preorder @ A )
=> ! [X: A,Y: A] :
( ( X = Y )
=> ( ord_less_eq @ A @ X @ Y ) ) ) ).
% eq_refl
thf(fact_113_le__cases,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: A,Y: A] :
( ~ ( ord_less_eq @ A @ X @ Y )
=> ( ord_less_eq @ A @ Y @ X ) ) ) ).
% le_cases
thf(fact_114_order_Otrans,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [A2: A,B2: A,C2: A] :
( ( ord_less_eq @ A @ A2 @ B2 )
=> ( ( ord_less_eq @ A @ B2 @ C2 )
=> ( ord_less_eq @ A @ A2 @ C2 ) ) ) ) ).
% order.trans
thf(fact_115_le__cases3,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [X: A,Y: A,Z2: A] :
( ( ( ord_less_eq @ A @ X @ Y )
=> ~ ( ord_less_eq @ A @ Y @ Z2 ) )
=> ( ( ( ord_less_eq @ A @ Y @ X )
=> ~ ( ord_less_eq @ A @ X @ Z2 ) )
=> ( ( ( ord_less_eq @ A @ X @ Z2 )
=> ~ ( ord_less_eq @ A @ Z2 @ Y ) )
=> ( ( ( ord_less_eq @ A @ Z2 @ Y )
=> ~ ( ord_less_eq @ A @ Y @ X ) )
=> ( ( ( ord_less_eq @ A @ Y @ Z2 )
=> ~ ( ord_less_eq @ A @ Z2 @ X ) )
=> ~ ( ( ord_less_eq @ A @ Z2 @ X )
=> ~ ( ord_less_eq @ A @ X @ Y ) ) ) ) ) ) ) ) ).
% le_cases3
thf(fact_116_antisym__conv,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [Y: A,X: A] :
( ( ord_less_eq @ A @ Y @ X )
=> ( ( ord_less_eq @ A @ X @ Y )
= ( X = Y ) ) ) ) ).
% antisym_conv
thf(fact_117_order__class_Oorder_Oeq__iff,axiom,
! [A: $tType] :
( ( order @ A )
=> ( ( ^ [Y4: A,Z: A] : ( Y4 = Z ) )
= ( ^ [A6: A,B5: A] :
( ( ord_less_eq @ A @ A6 @ B5 )
& ( ord_less_eq @ A @ B5 @ A6 ) ) ) ) ) ).
% order_class.order.eq_iff
thf(fact_118_ord__eq__le__trans,axiom,
! [A: $tType] :
( ( ord @ A )
=> ! [A2: A,B2: A,C2: A] :
( ( A2 = B2 )
=> ( ( ord_less_eq @ A @ B2 @ C2 )
=> ( ord_less_eq @ A @ A2 @ C2 ) ) ) ) ).
% ord_eq_le_trans
thf(fact_119_ord__le__eq__trans,axiom,
! [A: $tType] :
( ( ord @ A )
=> ! [A2: A,B2: A,C2: A] :
( ( ord_less_eq @ A @ A2 @ B2 )
=> ( ( B2 = C2 )
=> ( ord_less_eq @ A @ A2 @ C2 ) ) ) ) ).
% ord_le_eq_trans
thf(fact_120_order__class_Oorder_Oantisym,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [A2: A,B2: A] :
( ( ord_less_eq @ A @ A2 @ B2 )
=> ( ( ord_less_eq @ A @ B2 @ A2 )
=> ( A2 = B2 ) ) ) ) ).
% order_class.order.antisym
thf(fact_121_order__trans,axiom,
! [A: $tType] :
( ( preorder @ A )
=> ! [X: A,Y: A,Z2: A] :
( ( ord_less_eq @ A @ X @ Y )
=> ( ( ord_less_eq @ A @ Y @ Z2 )
=> ( ord_less_eq @ A @ X @ Z2 ) ) ) ) ).
% order_trans
thf(fact_122_dual__order_Orefl,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [A2: A] : ( ord_less_eq @ A @ A2 @ A2 ) ) ).
% dual_order.refl
thf(fact_123_linorder__wlog,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [P: A > A > $o,A2: A,B2: A] :
( ! [A3: A,B6: A] :
( ( ord_less_eq @ A @ A3 @ B6 )
=> ( P @ A3 @ B6 ) )
=> ( ! [A3: A,B6: A] :
( ( P @ B6 @ A3 )
=> ( P @ A3 @ B6 ) )
=> ( P @ A2 @ B2 ) ) ) ) ).
% linorder_wlog
thf(fact_124_dual__order_Otrans,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [B2: A,A2: A,C2: A] :
( ( ord_less_eq @ A @ B2 @ A2 )
=> ( ( ord_less_eq @ A @ C2 @ B2 )
=> ( ord_less_eq @ A @ C2 @ A2 ) ) ) ) ).
% dual_order.trans
thf(fact_125_dual__order_Oeq__iff,axiom,
! [A: $tType] :
( ( order @ A )
=> ( ( ^ [Y4: A,Z: A] : ( Y4 = Z ) )
= ( ^ [A6: A,B5: A] :
( ( ord_less_eq @ A @ B5 @ A6 )
& ( ord_less_eq @ A @ A6 @ B5 ) ) ) ) ) ).
% dual_order.eq_iff
thf(fact_126_dual__order_Oantisym,axiom,
! [A: $tType] :
( ( order @ A )
=> ! [B2: A,A2: A] :
( ( ord_less_eq @ A @ B2 @ A2 )
=> ( ( ord_less_eq @ A @ A2 @ B2 )
=> ( A2 = B2 ) ) ) ) ).
% dual_order.antisym
thf(fact_127_surj__pair,axiom,
! [A: $tType,B: $tType,P3: product_prod @ A @ B] :
? [X4: A,Y2: B] :
( P3
= ( product_Pair @ A @ B @ X4 @ Y2 ) ) ).
% surj_pair
thf(fact_128_prod__cases,axiom,
! [B: $tType,A: $tType,P: ( product_prod @ A @ B ) > $o,P3: product_prod @ A @ B] :
( ! [A3: A,B6: B] : ( P @ ( product_Pair @ A @ B @ A3 @ B6 ) )
=> ( P @ P3 ) ) ).
% prod_cases
thf(fact_129_Pair__inject,axiom,
! [A: $tType,B: $tType,A2: A,B2: B,A5: A,B3: B] :
( ( ( product_Pair @ A @ B @ A2 @ B2 )
= ( product_Pair @ A @ B @ A5 @ B3 ) )
=> ~ ( ( A2 = A5 )
=> ( B2 != B3 ) ) ) ).
% Pair_inject
thf(fact_130_prod__cases3,axiom,
! [A: $tType,B: $tType,C: $tType,Y: product_prod @ A @ ( product_prod @ B @ C )] :
~ ! [A3: A,B6: B,C3: C] :
( Y
!= ( product_Pair @ A @ ( product_prod @ B @ C ) @ A3 @ ( product_Pair @ B @ C @ B6 @ C3 ) ) ) ).
% prod_cases3
thf(fact_131_prod__cases4,axiom,
! [A: $tType,B: $tType,C: $tType,D: $tType,Y: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ D ) )] :
~ ! [A3: A,B6: B,C3: C,D2: D] :
( Y
!= ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ D ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ D ) @ B6 @ ( product_Pair @ C @ D @ C3 @ D2 ) ) ) ) ).
% prod_cases4
thf(fact_132_prod__cases5,axiom,
! [A: $tType,B: $tType,C: $tType,D: $tType,E: $tType,Y: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) )] :
~ ! [A3: A,B6: B,C3: C,D2: D,E2: E] :
( Y
!= ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ E ) @ C3 @ ( product_Pair @ D @ E @ D2 @ E2 ) ) ) ) ) ).
% prod_cases5
thf(fact_133_prod__cases6,axiom,
! [A: $tType,B: $tType,C: $tType,D: $tType,E: $tType,F5: $tType,Y: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) )] :
~ ! [A3: A,B6: B,C3: C,D2: D,E2: E,F: F5] :
( Y
!= ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) @ C3 @ ( product_Pair @ D @ ( product_prod @ E @ F5 ) @ D2 @ ( product_Pair @ E @ F5 @ E2 @ F ) ) ) ) ) ) ).
% prod_cases6
thf(fact_134_prod__cases7,axiom,
! [A: $tType,B: $tType,C: $tType,D: $tType,E: $tType,F5: $tType,G3: $tType,Y: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) )] :
~ ! [A3: A,B6: B,C3: C,D2: D,E2: E,F: F5,G4: G3] :
( Y
!= ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) @ C3 @ ( product_Pair @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) @ D2 @ ( product_Pair @ E @ ( product_prod @ F5 @ G3 ) @ E2 @ ( product_Pair @ F5 @ G3 @ F @ G4 ) ) ) ) ) ) ) ).
% prod_cases7
thf(fact_135_prod__induct3,axiom,
! [C: $tType,B: $tType,A: $tType,P: ( product_prod @ A @ ( product_prod @ B @ C ) ) > $o,X: product_prod @ A @ ( product_prod @ B @ C )] :
( ! [A3: A,B6: B,C3: C] : ( P @ ( product_Pair @ A @ ( product_prod @ B @ C ) @ A3 @ ( product_Pair @ B @ C @ B6 @ C3 ) ) )
=> ( P @ X ) ) ).
% prod_induct3
thf(fact_136_prod__induct4,axiom,
! [D: $tType,C: $tType,B: $tType,A: $tType,P: ( product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ D ) ) ) > $o,X: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ D ) )] :
( ! [A3: A,B6: B,C3: C,D2: D] : ( P @ ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ D ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ D ) @ B6 @ ( product_Pair @ C @ D @ C3 @ D2 ) ) ) )
=> ( P @ X ) ) ).
% prod_induct4
thf(fact_137_prod__induct5,axiom,
! [E: $tType,D: $tType,C: $tType,B: $tType,A: $tType,P: ( product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) ) ) > $o,X: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) )] :
( ! [A3: A,B6: B,C3: C,D2: D,E2: E] : ( P @ ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ E ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ E ) @ C3 @ ( product_Pair @ D @ E @ D2 @ E2 ) ) ) ) )
=> ( P @ X ) ) ).
% prod_induct5
thf(fact_138_prod__induct6,axiom,
! [F5: $tType,E: $tType,D: $tType,C: $tType,B: $tType,A: $tType,P: ( product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) ) ) > $o,X: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) )] :
( ! [A3: A,B6: B,C3: C,D2: D,E2: E,F: F5] : ( P @ ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ ( product_prod @ E @ F5 ) ) @ C3 @ ( product_Pair @ D @ ( product_prod @ E @ F5 ) @ D2 @ ( product_Pair @ E @ F5 @ E2 @ F ) ) ) ) ) )
=> ( P @ X ) ) ).
% prod_induct6
thf(fact_139_prod__induct7,axiom,
! [G3: $tType,F5: $tType,E: $tType,D: $tType,C: $tType,B: $tType,A: $tType,P: ( product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) ) ) > $o,X: product_prod @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) )] :
( ! [A3: A,B6: B,C3: C,D2: D,E2: E,F: F5,G4: G3] : ( P @ ( product_Pair @ A @ ( product_prod @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) ) @ A3 @ ( product_Pair @ B @ ( product_prod @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) ) @ B6 @ ( product_Pair @ C @ ( product_prod @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) ) @ C3 @ ( product_Pair @ D @ ( product_prod @ E @ ( product_prod @ F5 @ G3 ) ) @ D2 @ ( product_Pair @ E @ ( product_prod @ F5 @ G3 ) @ E2 @ ( product_Pair @ F5 @ G3 @ F @ G4 ) ) ) ) ) ) )
=> ( P @ X ) ) ).
% prod_induct7
thf(fact_140_old_Oprod_Oexhaust,axiom,
! [A: $tType,B: $tType,Y: product_prod @ A @ B] :
~ ! [A3: A,B6: B] :
( Y
!= ( product_Pair @ A @ B @ A3 @ B6 ) ) ).
% old.prod.exhaust
thf(fact_141_old_Oprod_Oinducts,axiom,
! [B: $tType,A: $tType,P: ( product_prod @ A @ B ) > $o,Prod: product_prod @ A @ B] :
( ! [A3: A,B6: B] : ( P @ ( product_Pair @ A @ B @ A3 @ B6 ) )
=> ( P @ Prod ) ) ).
% old.prod.inducts
thf(fact_142_Heap__def,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( heap @ B @ A )
= ( ^ [Empty2: B,Is_empty2: B > $o,Of_list2: ( list @ A ) > B,Multiset2: B > ( multiset @ A ),As_tree2: B > ( tree @ A ),Remove_max2: B > ( product_prod @ A @ B )] :
( ( collection @ B @ A @ Empty2 @ Is_empty2 @ Of_list2 @ Multiset2 )
& ( heap_axioms @ B @ A @ Is_empty2 @ Of_list2 @ Multiset2 @ As_tree2 @ Remove_max2 ) ) ) ) ) ).
% Heap_def
thf(fact_143_old_Oprod_Orec,axiom,
! [A: $tType,T: $tType,B: $tType,F1: A > B > T,A2: A,B2: B] :
( ( product_rec_prod @ A @ B @ T @ F1 @ ( product_Pair @ A @ B @ A2 @ B2 ) )
= ( F1 @ A2 @ B2 ) ) ).
% old.prod.rec
thf(fact_144_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_145_subseqs_Osimps_I1_J,axiom,
! [A: $tType] :
( ( subseqs @ A @ ( nil @ A ) )
= ( cons @ ( list @ A ) @ ( nil @ A ) @ ( nil @ ( list @ A ) ) ) ) ).
% subseqs.simps(1)
thf(fact_146_part__code_I1_J,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [F3: B > A,Pivot: A] :
( ( linorder_part @ B @ A @ F3 @ Pivot @ ( nil @ B ) )
= ( product_Pair @ ( list @ B ) @ ( product_prod @ ( list @ B ) @ ( list @ B ) ) @ ( nil @ B ) @ ( product_Pair @ ( list @ B ) @ ( list @ B ) @ ( nil @ B ) @ ( nil @ B ) ) ) ) ) ).
% part_code(1)
thf(fact_147_listrel_Oinducts,axiom,
! [A: $tType,B: $tType,X12: list @ A,X24: list @ B,R: set @ ( product_prod @ A @ B ),P: ( list @ A ) > ( list @ B ) > $o] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ X12 @ X24 ) @ ( listrel @ A @ B @ R ) )
=> ( ( P @ ( nil @ A ) @ ( nil @ B ) )
=> ( ! [X4: A,Y2: B,Xs: list @ A,Ys: list @ B] :
( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X4 @ Y2 ) @ R )
=> ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs @ Ys ) @ ( listrel @ A @ B @ R ) )
=> ( ( P @ Xs @ Ys )
=> ( P @ ( cons @ A @ X4 @ Xs ) @ ( cons @ B @ Y2 @ Ys ) ) ) ) )
=> ( P @ X12 @ X24 ) ) ) ) ).
% listrel.inducts
thf(fact_148_listrel__mono,axiom,
! [B: $tType,A: $tType,R: set @ ( product_prod @ A @ B ),S: set @ ( product_prod @ A @ B )] :
( ( ord_less_eq @ ( set @ ( product_prod @ A @ B ) ) @ R @ S )
=> ( ord_less_eq @ ( set @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) ) @ ( listrel @ A @ B @ R ) @ ( listrel @ A @ B @ S ) ) ) ).
% listrel_mono
thf(fact_149_listrel_ONil,axiom,
! [B: $tType,A: $tType,R: set @ ( product_prod @ A @ B )] : ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( nil @ A ) @ ( nil @ B ) ) @ ( listrel @ A @ B @ R ) ) ).
% listrel.Nil
thf(fact_150_listrel__Nil1,axiom,
! [A: $tType,B: $tType,Xs2: list @ B,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( nil @ A ) @ Xs2 ) @ ( listrel @ A @ B @ R ) )
=> ( Xs2
= ( nil @ B ) ) ) ).
% listrel_Nil1
thf(fact_151_listrel__Nil2,axiom,
! [B: $tType,A: $tType,Xs2: list @ A,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs2 @ ( nil @ B ) ) @ ( listrel @ A @ B @ R ) )
=> ( Xs2
= ( nil @ A ) ) ) ).
% listrel_Nil2
thf(fact_152_listrel__Cons2,axiom,
! [B: $tType,A: $tType,Xs2: list @ A,Y: B,Ys2: list @ B,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs2 @ ( cons @ B @ Y @ Ys2 ) ) @ ( listrel @ A @ B @ R ) )
=> ~ ! [X4: A,Xs: list @ A] :
( ( Xs2
= ( cons @ A @ X4 @ Xs ) )
=> ( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X4 @ Y ) @ R )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs @ Ys2 ) @ ( listrel @ A @ B @ R ) ) ) ) ) ).
% listrel_Cons2
thf(fact_153_listrel__Cons1,axiom,
! [B: $tType,A: $tType,Y: A,Ys2: list @ A,Xs2: list @ B,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( cons @ A @ Y @ Ys2 ) @ Xs2 ) @ ( listrel @ A @ B @ R ) )
=> ~ ! [Y2: B,Ys: list @ B] :
( ( Xs2
= ( cons @ B @ Y2 @ Ys ) )
=> ( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ Y @ Y2 ) @ R )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Ys2 @ Ys ) @ ( listrel @ A @ B @ R ) ) ) ) ) ).
% listrel_Cons1
thf(fact_154_listrel_OCons,axiom,
! [B: $tType,A: $tType,X: A,Y: B,R: set @ ( product_prod @ A @ B ),Xs2: list @ A,Ys2: list @ B] :
( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X @ Y ) @ R )
=> ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs2 @ Ys2 ) @ ( listrel @ A @ B @ R ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ ( cons @ A @ X @ Xs2 ) @ ( cons @ B @ Y @ Ys2 ) ) @ ( listrel @ A @ B @ R ) ) ) ) ).
% listrel.Cons
thf(fact_155_listrel_Ocases,axiom,
! [B: $tType,A: $tType,A1: list @ A,A22: list @ B,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ A1 @ A22 ) @ ( listrel @ A @ B @ R ) )
=> ( ( ( A1
= ( nil @ A ) )
=> ( A22
!= ( nil @ B ) ) )
=> ~ ! [X4: A,Y2: B,Xs: list @ A] :
( ( A1
= ( cons @ A @ X4 @ Xs ) )
=> ! [Ys: list @ B] :
( ( A22
= ( cons @ B @ Y2 @ Ys ) )
=> ( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X4 @ Y2 ) @ R )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs @ Ys ) @ ( listrel @ A @ B @ R ) ) ) ) ) ) ) ).
% listrel.cases
thf(fact_156_listrel_Osimps,axiom,
! [B: $tType,A: $tType,A1: list @ A,A22: list @ B,R: set @ ( product_prod @ A @ B )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ A1 @ A22 ) @ ( listrel @ A @ B @ R ) )
= ( ( ( A1
= ( nil @ A ) )
& ( A22
= ( nil @ B ) ) )
| ? [X5: A,Y3: B,Xs3: list @ A,Ys3: list @ B] :
( ( A1
= ( cons @ A @ X5 @ Xs3 ) )
& ( A22
= ( cons @ B @ Y3 @ Ys3 ) )
& ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X5 @ Y3 ) @ R )
& ( member @ ( product_prod @ ( list @ A ) @ ( list @ B ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ B ) @ Xs3 @ Ys3 ) @ ( listrel @ A @ B @ R ) ) ) ) ) ).
% listrel.simps
thf(fact_157_internal__case__prod__conv,axiom,
! [B: $tType,A: $tType,C: $tType,C2: B > C > A,A2: B,B2: C] :
( ( produc2004651681e_prod @ B @ C @ A @ C2 @ ( product_Pair @ B @ C @ A2 @ B2 ) )
= ( C2 @ A2 @ B2 ) ) ).
% internal_case_prod_conv
thf(fact_158_list__ex1__simps_I1_J,axiom,
! [A: $tType,P: A > $o] :
~ ( list_ex1 @ A @ P @ ( nil @ A ) ) ).
% list_ex1_simps(1)
thf(fact_159_Collection_Ois__empty__empty,axiom,
! [A: $tType,B: $tType,Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A )] :
( ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset )
=> ( Is_empty @ Empty ) ) ).
% Collection.is_empty_empty
thf(fact_160_Collection_Ois__empty__inj,axiom,
! [A: $tType,B: $tType,Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),E3: B] :
( ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset )
=> ( ( Is_empty @ E3 )
=> ( E3 = Empty ) ) ) ).
% Collection.is_empty_inj
thf(fact_161_subset__antisym,axiom,
! [A: $tType,A4: set @ A,B4: set @ A] :
( ( ord_less_eq @ ( set @ A ) @ A4 @ B4 )
=> ( ( ord_less_eq @ ( set @ A ) @ B4 @ A4 )
=> ( A4 = B4 ) ) ) ).
% subset_antisym
thf(fact_162_subsetI,axiom,
! [A: $tType,A4: set @ A,B4: set @ A] :
( ! [X4: A] :
( ( member @ A @ X4 @ A4 )
=> ( member @ A @ X4 @ B4 ) )
=> ( ord_less_eq @ ( set @ A ) @ A4 @ B4 ) ) ).
% subsetI
thf(fact_163_subrelI,axiom,
! [B: $tType,A: $tType,R: set @ ( product_prod @ A @ B ),S: set @ ( product_prod @ A @ B )] :
( ! [X4: A,Y2: B] :
( ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X4 @ Y2 ) @ R )
=> ( member @ ( product_prod @ A @ B ) @ ( product_Pair @ A @ B @ X4 @ Y2 ) @ S ) )
=> ( ord_less_eq @ ( set @ ( product_prod @ A @ B ) ) @ R @ S ) ) ).
% subrelI
thf(fact_164_in__mono,axiom,
! [A: $tType,A4: set @ A,B4: set @ A,X: A] :
( ( ord_less_eq @ ( set @ A ) @ A4 @ B4 )
=> ( ( member @ A @ X @ A4 )
=> ( member @ A @ X @ B4 ) ) ) ).
% in_mono
thf(fact_165_subsetD,axiom,
! [A: $tType,A4: set @ A,B4: set @ A,C2: A] :
( ( ord_less_eq @ ( set @ A ) @ A4 @ B4 )
=> ( ( member @ A @ C2 @ A4 )
=> ( member @ A @ C2 @ B4 ) ) ) ).
% subsetD
thf(fact_166_equalityE,axiom,
! [A: $tType,A4: set @ A,B4: set @ A] :
( ( A4 = B4 )
=> ~ ( ( ord_less_eq @ ( set @ A ) @ A4 @ B4 )
=> ~ ( ord_less_eq @ ( set @ A ) @ B4 @ A4 ) ) ) ).
% equalityE
thf(fact_167_subset__eq,axiom,
! [A: $tType] :
( ( ord_less_eq @ ( set @ A ) )
= ( ^ [A7: set @ A,B7: set @ A] :
! [X5: A] :
( ( member @ A @ X5 @ A7 )
=> ( member @ A @ X5 @ B7 ) ) ) ) ).
% subset_eq
thf(fact_168_equalityD1,axiom,
! [A: $tType,A4: set @ A,B4: set @ A] :
( ( A4 = B4 )
=> ( ord_less_eq @ ( set @ A ) @ A4 @ B4 ) ) ).
% equalityD1
thf(fact_169_equalityD2,axiom,
! [A: $tType,A4: set @ A,B4: set @ A] :
( ( A4 = B4 )
=> ( ord_less_eq @ ( set @ A ) @ B4 @ A4 ) ) ).
% equalityD2
thf(fact_170_subset__iff,axiom,
! [A: $tType] :
( ( ord_less_eq @ ( set @ A ) )
= ( ^ [A7: set @ A,B7: set @ A] :
! [T2: A] :
( ( member @ A @ T2 @ A7 )
=> ( member @ A @ T2 @ B7 ) ) ) ) ).
% subset_iff
thf(fact_171_subset__refl,axiom,
! [A: $tType,A4: set @ A] : ( ord_less_eq @ ( set @ A ) @ A4 @ A4 ) ).
% subset_refl
thf(fact_172_Collect__mono,axiom,
! [A: $tType,P: A > $o,Q: A > $o] :
( ! [X4: A] :
( ( P @ X4 )
=> ( Q @ X4 ) )
=> ( ord_less_eq @ ( set @ A ) @ ( collect @ A @ P ) @ ( collect @ A @ Q ) ) ) ).
% Collect_mono
thf(fact_173_subset__trans,axiom,
! [A: $tType,A4: set @ A,B4: set @ A,C4: set @ A] :
( ( ord_less_eq @ ( set @ A ) @ A4 @ B4 )
=> ( ( ord_less_eq @ ( set @ A ) @ B4 @ C4 )
=> ( ord_less_eq @ ( set @ A ) @ A4 @ C4 ) ) ) ).
% subset_trans
thf(fact_174_set__eq__subset,axiom,
! [A: $tType] :
( ( ^ [Y4: set @ A,Z: set @ A] : ( Y4 = Z ) )
= ( ^ [A7: set @ A,B7: set @ A] :
( ( ord_less_eq @ ( set @ A ) @ A7 @ B7 )
& ( ord_less_eq @ ( set @ A ) @ B7 @ A7 ) ) ) ) ).
% set_eq_subset
thf(fact_175_Collect__mono__iff,axiom,
! [A: $tType,P: A > $o,Q: A > $o] :
( ( ord_less_eq @ ( set @ A ) @ ( collect @ A @ P ) @ ( collect @ A @ Q ) )
= ( ! [X5: A] :
( ( P @ X5 )
=> ( Q @ X5 ) ) ) ) ).
% Collect_mono_iff
thf(fact_176_lexord__Nil__left,axiom,
! [A: $tType,Y: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( nil @ A ) @ Y ) @ ( lexord @ A @ R ) )
= ( ? [A6: A,X5: list @ A] :
( Y
= ( cons @ A @ A6 @ X5 ) ) ) ) ).
% lexord_Nil_left
thf(fact_177_lexord__cons__cons,axiom,
! [A: $tType,A2: A,X: list @ A,B2: A,Y: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ A2 @ X ) @ ( cons @ A @ B2 @ Y ) ) @ ( lexord @ A @ R ) )
= ( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A2 @ B2 ) @ R )
| ( ( A2 = B2 )
& ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ X @ Y ) @ ( lexord @ A @ R ) ) ) ) ) ).
% lexord_cons_cons
thf(fact_178_heap__top__geq,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [A2: A,T3: tree @ A] :
( ( member @ A @ A2 @ ( set_mset @ A @ ( multiset2 @ A @ T3 ) ) )
=> ( ( is_heap @ A @ T3 )
=> ( ord_less_eq @ A @ A2 @ ( val @ A @ T3 ) ) ) ) ) ).
% heap_top_geq
thf(fact_179_union__single__eq__member,axiom,
! [A: $tType,X: A,M4: multiset @ A,N: multiset @ A] :
( ( ( add_mset @ A @ X @ M4 )
= N )
=> ( member @ A @ X @ ( set_mset @ A @ N ) ) ) ).
% union_single_eq_member
thf(fact_180_insert__noteq__member,axiom,
! [A: $tType,B2: A,B4: multiset @ A,C2: A,C4: multiset @ A] :
( ( ( add_mset @ A @ B2 @ B4 )
= ( add_mset @ A @ C2 @ C4 ) )
=> ( ( B2 != C2 )
=> ( member @ A @ C2 @ ( set_mset @ A @ B4 ) ) ) ) ).
% insert_noteq_member
thf(fact_181_multi__member__split,axiom,
! [A: $tType,X: A,M4: multiset @ A] :
( ( member @ A @ X @ ( set_mset @ A @ M4 ) )
=> ? [A8: multiset @ A] :
( M4
= ( add_mset @ A @ X @ A8 ) ) ) ).
% multi_member_split
thf(fact_182_mset__add,axiom,
! [A: $tType,A2: A,A4: multiset @ A] :
( ( member @ A @ A2 @ ( set_mset @ A @ A4 ) )
=> ~ ! [B8: multiset @ A] :
( A4
!= ( add_mset @ A @ A2 @ B8 ) ) ) ).
% mset_add
thf(fact_183_lexord__linear,axiom,
! [A: $tType,R: set @ ( product_prod @ A @ A ),X: list @ A,Y: list @ A] :
( ! [A3: A,B6: A] :
( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A3 @ B6 ) @ R )
| ( A3 = B6 )
| ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ B6 @ A3 ) @ R ) )
=> ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ X @ Y ) @ ( lexord @ A @ R ) )
| ( X = Y )
| ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Y @ X ) @ ( lexord @ A @ R ) ) ) ) ).
% lexord_linear
thf(fact_184_lexord__irreflexive,axiom,
! [A: $tType,R: set @ ( product_prod @ A @ A ),Xs2: list @ A] :
( ! [X4: A] :
~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X4 @ X4 ) @ R )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Xs2 ) @ ( lexord @ A @ R ) ) ) ).
% lexord_irreflexive
thf(fact_185_lexord__Nil__right,axiom,
! [A: $tType,X: list @ A,R: set @ ( product_prod @ A @ A )] :
~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ X @ ( nil @ A ) ) @ ( lexord @ A @ R ) ) ).
% lexord_Nil_right
thf(fact_186_heap__top__max,axiom,
! [A: $tType] :
( ( linorder @ A )
=> ! [T3: tree @ A] :
( ( T3
!= ( e @ A ) )
=> ( ( is_heap @ A @ T3 )
=> ( ( val @ A @ T3 )
= ( lattic929149872er_Max @ A @ ( set_mset @ A @ ( multiset2 @ A @ T3 ) ) ) ) ) ) ) ).
% heap_top_max
thf(fact_187_Collection_Oset__def,axiom,
! [A: $tType,B: $tType,Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),L: B] :
( ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset )
=> ( ( set2 @ B @ A @ Multiset @ L )
= ( set_mset @ A @ ( Multiset @ L ) ) ) ) ).
% Collection.set_def
thf(fact_188_Cons__listrel1__Cons,axiom,
! [A: $tType,X: A,Xs2: list @ A,Y: A,Ys2: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X @ Xs2 ) @ ( cons @ A @ Y @ Ys2 ) ) @ ( listrel1 @ A @ R ) )
= ( ( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X @ Y ) @ R )
& ( Xs2 = Ys2 ) )
| ( ( X = Y )
& ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) ) ) ) ) ).
% Cons_listrel1_Cons
thf(fact_189_Collection_Oset_Ocong,axiom,
! [A: $tType,B: $tType] :
( ( set2 @ B @ A )
= ( set2 @ B @ A ) ) ).
% Collection.set.cong
thf(fact_190_listrel1I2,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,R: set @ ( product_prod @ A @ A ),X: A] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X @ Xs2 ) @ ( cons @ A @ X @ Ys2 ) ) @ ( listrel1 @ A @ R ) ) ) ).
% listrel1I2
thf(fact_191_not__Nil__listrel1,axiom,
! [A: $tType,Xs2: list @ A,R: set @ ( product_prod @ A @ A )] :
~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( nil @ A ) @ Xs2 ) @ ( listrel1 @ A @ R ) ) ).
% not_Nil_listrel1
thf(fact_192_not__listrel1__Nil,axiom,
! [A: $tType,Xs2: list @ A,R: set @ ( product_prod @ A @ A )] :
~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ ( nil @ A ) ) @ ( listrel1 @ A @ R ) ) ).
% not_listrel1_Nil
thf(fact_193_listrel1__mono,axiom,
! [A: $tType,R: set @ ( product_prod @ A @ A ),S: set @ ( product_prod @ A @ A )] :
( ( ord_less_eq @ ( set @ ( product_prod @ A @ A ) ) @ R @ S )
=> ( ord_less_eq @ ( set @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) ) @ ( listrel1 @ A @ R ) @ ( listrel1 @ A @ S ) ) ) ).
% listrel1_mono
thf(fact_194_Cons__listrel1E2,axiom,
! [A: $tType,Xs2: list @ A,Y: A,Ys2: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ ( cons @ A @ Y @ Ys2 ) ) @ ( listrel1 @ A @ R ) )
=> ( ! [X4: A] :
( ( Xs2
= ( cons @ A @ X4 @ Ys2 ) )
=> ~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X4 @ Y ) @ R ) )
=> ~ ! [Zs: list @ A] :
( ( Xs2
= ( cons @ A @ Y @ Zs ) )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Zs @ Ys2 ) @ ( listrel1 @ A @ R ) ) ) ) ) ).
% Cons_listrel1E2
thf(fact_195_Cons__listrel1E1,axiom,
! [A: $tType,X: A,Xs2: list @ A,Ys2: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X @ Xs2 ) @ Ys2 ) @ ( listrel1 @ A @ R ) )
=> ( ! [Y2: A] :
( ( Ys2
= ( cons @ A @ Y2 @ Xs2 ) )
=> ~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X @ Y2 ) @ R ) )
=> ~ ! [Zs: list @ A] :
( ( Ys2
= ( cons @ A @ X @ Zs ) )
=> ~ ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Zs ) @ ( listrel1 @ A @ R ) ) ) ) ) ).
% Cons_listrel1E1
thf(fact_196_listrel1I1,axiom,
! [A: $tType,X: A,Y: A,R: set @ ( product_prod @ A @ A ),Xs2: list @ A] :
( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X @ Y ) @ R )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( cons @ A @ X @ Xs2 ) @ ( cons @ A @ Y @ Xs2 ) ) @ ( listrel1 @ A @ R ) ) ) ).
% listrel1I1
thf(fact_197_RemoveMax__axioms_Ointro,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Inv: B > $o,Of_list: ( list @ A ) > B,Is_empty: B > $o,Remove_max: B > ( product_prod @ A @ B ),Multiset: B > ( multiset @ A )] :
( ! [X4: list @ A] : ( Inv @ ( Of_list @ X4 ) )
=> ( ! [L5: B,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( Inv @ L5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( M2
= ( lattic929149872er_Max @ A @ ( set2 @ B @ A @ Multiset @ L5 ) ) ) ) ) )
=> ( ! [L5: B,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( Inv @ L5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( ( add_mset @ A @ M2 @ ( Multiset @ L4 ) )
= ( Multiset @ L5 ) ) ) ) )
=> ( ! [L5: B,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( Inv @ L5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( Inv @ L4 ) ) ) )
=> ( removeMax_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv ) ) ) ) ) ) ).
% RemoveMax_axioms.intro
thf(fact_198_RemoveMax__axioms__def,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( removeMax_axioms @ B @ A )
= ( ^ [Is_empty2: B > $o,Of_list2: ( list @ A ) > B,Multiset2: B > ( multiset @ A ),Remove_max2: B > ( product_prod @ A @ B ),Inv2: B > $o] :
( ! [X5: list @ A] : ( Inv2 @ ( Of_list2 @ X5 ) )
& ! [L2: B,M3: A,L6: B] :
( ~ ( Is_empty2 @ L2 )
=> ( ( Inv2 @ L2 )
=> ( ( ( product_Pair @ A @ B @ M3 @ L6 )
= ( Remove_max2 @ L2 ) )
=> ( M3
= ( lattic929149872er_Max @ A @ ( set2 @ B @ A @ Multiset2 @ L2 ) ) ) ) ) )
& ! [L2: B,M3: A,L6: B] :
( ~ ( Is_empty2 @ L2 )
=> ( ( Inv2 @ L2 )
=> ( ( ( product_Pair @ A @ B @ M3 @ L6 )
= ( Remove_max2 @ L2 ) )
=> ( ( add_mset @ A @ M3 @ ( Multiset2 @ L6 ) )
= ( Multiset2 @ L2 ) ) ) ) )
& ! [L2: B,M3: A,L6: B] :
( ~ ( Is_empty2 @ L2 )
=> ( ( Inv2 @ L2 )
=> ( ( ( product_Pair @ A @ B @ M3 @ L6 )
= ( Remove_max2 @ L2 ) )
=> ( Inv2 @ L6 ) ) ) ) ) ) ) ) ).
% RemoveMax_axioms_def
thf(fact_199_snoc__listrel1__snoc__iff,axiom,
! [A: $tType,Xs2: list @ A,X: A,Ys2: list @ A,Y: A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ Xs2 @ ( cons @ A @ X @ ( nil @ A ) ) ) @ ( append @ A @ Ys2 @ ( cons @ A @ Y @ ( nil @ A ) ) ) ) @ ( listrel1 @ A @ R ) )
= ( ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) )
& ( X = Y ) )
| ( ( Xs2 = Ys2 )
& ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X @ Y ) @ R ) ) ) ) ).
% snoc_listrel1_snoc_iff
thf(fact_200_RemoveMax_Oremove__max__max,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,L: B,M: A,L3: B] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ~ ( Is_empty @ L )
=> ( ( Inv @ L )
=> ( ( ( product_Pair @ A @ B @ M @ L3 )
= ( Remove_max @ L ) )
=> ( M
= ( lattic929149872er_Max @ A @ ( set2 @ B @ A @ Multiset @ L ) ) ) ) ) ) ) ) ).
% RemoveMax.remove_max_max
thf(fact_201_append_Oassoc,axiom,
! [A: $tType,A2: list @ A,B2: list @ A,C2: list @ A] :
( ( append @ A @ ( append @ A @ A2 @ B2 ) @ C2 )
= ( append @ A @ A2 @ ( append @ A @ B2 @ C2 ) ) ) ).
% append.assoc
thf(fact_202_append__assoc,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,Zs2: list @ A] :
( ( append @ A @ ( append @ A @ Xs2 @ Ys2 ) @ Zs2 )
= ( append @ A @ Xs2 @ ( append @ A @ Ys2 @ Zs2 ) ) ) ).
% append_assoc
thf(fact_203_append__same__eq,axiom,
! [A: $tType,Ys2: list @ A,Xs2: list @ A,Zs2: list @ A] :
( ( ( append @ A @ Ys2 @ Xs2 )
= ( append @ A @ Zs2 @ Xs2 ) )
= ( Ys2 = Zs2 ) ) ).
% append_same_eq
thf(fact_204_same__append__eq,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,Zs2: list @ A] :
( ( ( append @ A @ Xs2 @ Ys2 )
= ( append @ A @ Xs2 @ Zs2 ) )
= ( Ys2 = Zs2 ) ) ).
% same_append_eq
thf(fact_205_append__Nil2,axiom,
! [A: $tType,Xs2: list @ A] :
( ( append @ A @ Xs2 @ ( nil @ A ) )
= Xs2 ) ).
% append_Nil2
thf(fact_206_append__self__conv,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs2 @ Ys2 )
= Xs2 )
= ( Ys2
= ( nil @ A ) ) ) ).
% append_self_conv
thf(fact_207_self__append__conv,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( Xs2
= ( append @ A @ Xs2 @ Ys2 ) )
= ( Ys2
= ( nil @ A ) ) ) ).
% self_append_conv
thf(fact_208_append__self__conv2,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs2 @ Ys2 )
= Ys2 )
= ( Xs2
= ( nil @ A ) ) ) ).
% append_self_conv2
thf(fact_209_self__append__conv2,axiom,
! [A: $tType,Ys2: list @ A,Xs2: list @ A] :
( ( Ys2
= ( append @ A @ Xs2 @ Ys2 ) )
= ( Xs2
= ( nil @ A ) ) ) ).
% self_append_conv2
thf(fact_210_Nil__is__append__conv,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( ( nil @ A )
= ( append @ A @ Xs2 @ Ys2 ) )
= ( ( Xs2
= ( nil @ A ) )
& ( Ys2
= ( nil @ A ) ) ) ) ).
% Nil_is_append_conv
thf(fact_211_append__is__Nil__conv,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( ( append @ A @ Xs2 @ Ys2 )
= ( nil @ A ) )
= ( ( Xs2
= ( nil @ A ) )
& ( Ys2
= ( nil @ A ) ) ) ) ).
% append_is_Nil_conv
thf(fact_212_append_Oright__neutral,axiom,
! [A: $tType,A2: list @ A] :
( ( append @ A @ A2 @ ( nil @ A ) )
= A2 ) ).
% append.right_neutral
thf(fact_213_append1__eq__conv,axiom,
! [A: $tType,Xs2: list @ A,X: A,Ys2: list @ A,Y: A] :
( ( ( append @ A @ Xs2 @ ( cons @ A @ X @ ( nil @ A ) ) )
= ( append @ A @ Ys2 @ ( cons @ A @ Y @ ( nil @ A ) ) ) )
= ( ( Xs2 = Ys2 )
& ( X = Y ) ) ) ).
% append1_eq_conv
thf(fact_214_RemoveMax_Oaxioms_I2_J,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( removeMax_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv ) ) ) ).
% RemoveMax.axioms(2)
thf(fact_215_lexord__append__leftI,axiom,
! [A: $tType,U: list @ A,V2: list @ A,R: set @ ( product_prod @ A @ A ),X: list @ A] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ U @ V2 ) @ ( lexord @ A @ R ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ X @ U ) @ ( append @ A @ X @ V2 ) ) @ ( lexord @ A @ R ) ) ) ).
% lexord_append_leftI
thf(fact_216_rev__nonempty__induct,axiom,
! [A: $tType,Xs2: list @ A,P: ( list @ A ) > $o] :
( ( Xs2
!= ( nil @ A ) )
=> ( ! [X4: A] : ( P @ ( cons @ A @ X4 @ ( nil @ A ) ) )
=> ( ! [X4: A,Xs: list @ A] :
( ( Xs
!= ( nil @ A ) )
=> ( ( P @ Xs )
=> ( P @ ( append @ A @ Xs @ ( cons @ A @ X4 @ ( nil @ A ) ) ) ) ) )
=> ( P @ Xs2 ) ) ) ) ).
% rev_nonempty_induct
thf(fact_217_append__eq__Cons__conv,axiom,
! [A: $tType,Ys2: list @ A,Zs2: list @ A,X: A,Xs2: list @ A] :
( ( ( append @ A @ Ys2 @ Zs2 )
= ( cons @ A @ X @ Xs2 ) )
= ( ( ( Ys2
= ( nil @ A ) )
& ( Zs2
= ( cons @ A @ X @ Xs2 ) ) )
| ? [Ys4: list @ A] :
( ( Ys2
= ( cons @ A @ X @ Ys4 ) )
& ( ( append @ A @ Ys4 @ Zs2 )
= Xs2 ) ) ) ) ).
% append_eq_Cons_conv
thf(fact_218_Cons__eq__append__conv,axiom,
! [A: $tType,X: A,Xs2: list @ A,Ys2: list @ A,Zs2: list @ A] :
( ( ( cons @ A @ X @ Xs2 )
= ( append @ A @ Ys2 @ Zs2 ) )
= ( ( ( Ys2
= ( nil @ A ) )
& ( ( cons @ A @ X @ Xs2 )
= Zs2 ) )
| ? [Ys4: list @ A] :
( ( ( cons @ A @ X @ Ys4 )
= Ys2 )
& ( Xs2
= ( append @ A @ Ys4 @ Zs2 ) ) ) ) ) ).
% Cons_eq_append_conv
thf(fact_219_rev__exhaust,axiom,
! [A: $tType,Xs2: list @ A] :
( ( Xs2
!= ( nil @ A ) )
=> ~ ! [Ys: list @ A,Y2: A] :
( Xs2
!= ( append @ A @ Ys @ ( cons @ A @ Y2 @ ( nil @ A ) ) ) ) ) ).
% rev_exhaust
thf(fact_220_rev__induct,axiom,
! [A: $tType,P: ( list @ A ) > $o,Xs2: list @ A] :
( ( P @ ( nil @ A ) )
=> ( ! [X4: A,Xs: list @ A] :
( ( P @ Xs )
=> ( P @ ( append @ A @ Xs @ ( cons @ A @ X4 @ ( nil @ A ) ) ) ) )
=> ( P @ Xs2 ) ) ) ).
% rev_induct
thf(fact_221_RemoveMax_Oremove__max__inv,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,L: B,M: A,L3: B] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ~ ( Is_empty @ L )
=> ( ( Inv @ L )
=> ( ( ( product_Pair @ A @ B @ M @ L3 )
= ( Remove_max @ L ) )
=> ( Inv @ L3 ) ) ) ) ) ) ).
% RemoveMax.remove_max_inv
thf(fact_222_RemoveMax_Oof__list__inv,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,X: list @ A] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( Inv @ ( Of_list @ X ) ) ) ) ).
% RemoveMax.of_list_inv
thf(fact_223_RemoveMax_Oaxioms_I1_J,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset ) ) ) ).
% RemoveMax.axioms(1)
thf(fact_224_append__eq__appendI,axiom,
! [A: $tType,Xs2: list @ A,Xs1: list @ A,Zs2: list @ A,Ys2: list @ A,Us: list @ A] :
( ( ( append @ A @ Xs2 @ Xs1 )
= Zs2 )
=> ( ( Ys2
= ( append @ A @ Xs1 @ Us ) )
=> ( ( append @ A @ Xs2 @ Ys2 )
= ( append @ A @ Zs2 @ Us ) ) ) ) ).
% append_eq_appendI
thf(fact_225_append__eq__append__conv2,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,Zs2: list @ A,Ts: list @ A] :
( ( ( append @ A @ Xs2 @ Ys2 )
= ( append @ A @ Zs2 @ Ts ) )
= ( ? [Us2: list @ A] :
( ( ( Xs2
= ( append @ A @ Zs2 @ Us2 ) )
& ( ( append @ A @ Us2 @ Ys2 )
= Ts ) )
| ( ( ( append @ A @ Xs2 @ Us2 )
= Zs2 )
& ( Ys2
= ( append @ A @ Us2 @ Ts ) ) ) ) ) ) ).
% append_eq_append_conv2
thf(fact_226_eq__Nil__appendI,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A] :
( ( Xs2 = Ys2 )
=> ( Xs2
= ( append @ A @ ( nil @ A ) @ Ys2 ) ) ) ).
% eq_Nil_appendI
thf(fact_227_append__Nil,axiom,
! [A: $tType,Ys2: list @ A] :
( ( append @ A @ ( nil @ A ) @ Ys2 )
= Ys2 ) ).
% append_Nil
thf(fact_228_append_Oleft__neutral,axiom,
! [A: $tType,A2: list @ A] :
( ( append @ A @ ( nil @ A ) @ A2 )
= A2 ) ).
% append.left_neutral
thf(fact_229_Cons__eq__appendI,axiom,
! [A: $tType,X: A,Xs1: list @ A,Ys2: list @ A,Xs2: list @ A,Zs2: list @ A] :
( ( ( cons @ A @ X @ Xs1 )
= Ys2 )
=> ( ( Xs2
= ( append @ A @ Xs1 @ Zs2 ) )
=> ( ( cons @ A @ X @ Xs2 )
= ( append @ A @ Ys2 @ Zs2 ) ) ) ) ).
% Cons_eq_appendI
thf(fact_230_append__Cons,axiom,
! [A: $tType,X: A,Xs2: list @ A,Ys2: list @ A] :
( ( append @ A @ ( cons @ A @ X @ Xs2 ) @ Ys2 )
= ( cons @ A @ X @ ( append @ A @ Xs2 @ Ys2 ) ) ) ).
% append_Cons
thf(fact_231_append__listrel1I,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,R: set @ ( product_prod @ A @ A ),Us: list @ A,Vs: list @ A] :
( ( ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) )
& ( Us = Vs ) )
| ( ( Xs2 = Ys2 )
& ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Us @ Vs ) @ ( listrel1 @ A @ R ) ) ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ Xs2 @ Us ) @ ( append @ A @ Ys2 @ Vs ) ) @ ( listrel1 @ A @ R ) ) ) ).
% append_listrel1I
thf(fact_232_RemoveMax_Oremove__max__multiset,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,L: B,M: A,L3: B] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ~ ( Is_empty @ L )
=> ( ( Inv @ L )
=> ( ( ( product_Pair @ A @ B @ M @ L3 )
= ( Remove_max @ L ) )
=> ( ( add_mset @ A @ M @ ( Multiset @ L3 ) )
= ( Multiset @ L ) ) ) ) ) ) ) ).
% RemoveMax.remove_max_multiset
thf(fact_233_lexord__append__leftD,axiom,
! [A: $tType,X: list @ A,U: list @ A,V2: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ X @ U ) @ ( append @ A @ X @ V2 ) ) @ ( lexord @ A @ R ) )
=> ( ! [A3: A] :
~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A3 @ A3 ) @ R )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ U @ V2 ) @ ( lexord @ A @ R ) ) ) ) ).
% lexord_append_leftD
thf(fact_234_lexord__append__rightI,axiom,
! [A: $tType,Y: list @ A,X: list @ A,R: set @ ( product_prod @ A @ A )] :
( ? [B9: A,Z3: list @ A] :
( Y
= ( cons @ A @ B9 @ Z3 ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ X @ ( append @ A @ X @ Y ) ) @ ( lexord @ A @ R ) ) ) ).
% lexord_append_rightI
thf(fact_235_RemoveMax_Ointro,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o] :
( ( collection @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset )
=> ( ( removeMax_axioms @ B @ A @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv ) ) ) ) ).
% RemoveMax.intro
thf(fact_236_RemoveMax__def,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( removeMax @ B @ A )
= ( ^ [Empty2: B,Is_empty2: B > $o,Of_list2: ( list @ A ) > B,Multiset2: B > ( multiset @ A ),Remove_max2: B > ( product_prod @ A @ B ),Inv2: B > $o] :
( ( collection @ B @ A @ Empty2 @ Is_empty2 @ Of_list2 @ Multiset2 )
& ( removeMax_axioms @ B @ A @ Is_empty2 @ Of_list2 @ Multiset2 @ Remove_max2 @ Inv2 ) ) ) ) ) ).
% RemoveMax_def
thf(fact_237_listrel1E,axiom,
! [A: $tType,Xs2: list @ A,Ys2: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) )
=> ~ ! [X4: A,Y2: A] :
( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X4 @ Y2 ) @ R )
=> ! [Us3: list @ A,Vs2: list @ A] :
( ( Xs2
= ( append @ A @ Us3 @ ( cons @ A @ X4 @ Vs2 ) ) )
=> ( Ys2
!= ( append @ A @ Us3 @ ( cons @ A @ Y2 @ Vs2 ) ) ) ) ) ) ).
% listrel1E
thf(fact_238_listrel1I,axiom,
! [A: $tType,X: A,Y: A,R: set @ ( product_prod @ A @ A ),Xs2: list @ A,Us: list @ A,Vs: list @ A,Ys2: list @ A] :
( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ X @ Y ) @ R )
=> ( ( Xs2
= ( append @ A @ Us @ ( cons @ A @ X @ Vs ) ) )
=> ( ( Ys2
= ( append @ A @ Us @ ( cons @ A @ Y @ Vs ) ) )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( listrel1 @ A @ R ) ) ) ) ) ).
% listrel1I
thf(fact_239_lexord__append__left__rightI,axiom,
! [A: $tType,A2: A,B2: A,R: set @ ( product_prod @ A @ A ),U: list @ A,X: list @ A,Y: list @ A] :
( ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A2 @ B2 ) @ R )
=> ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ U @ ( cons @ A @ A2 @ X ) ) @ ( append @ A @ U @ ( cons @ A @ B2 @ Y ) ) ) @ ( lexord @ A @ R ) ) ) ).
% lexord_append_left_rightI
thf(fact_240_RemoveMax_Ossort_H__dom_Oinducts,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,X: product_prod @ B @ ( list @ A ),P: ( product_prod @ B @ ( list @ A ) ) > $o] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ X )
=> ( ! [L5: B,Sl: list @ A] :
( ! [M5: A,L7: B] :
( ~ ( Is_empty @ L5 )
=> ( ( ( product_Pair @ A @ B @ M5 @ L7 )
= ( Remove_max @ L5 ) )
=> ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ ( product_Pair @ B @ ( list @ A ) @ L7 @ ( cons @ A @ M5 @ Sl ) ) ) ) )
=> ( ! [M5: A,L7: B] :
( ~ ( Is_empty @ L5 )
=> ( ( ( product_Pair @ A @ B @ M5 @ L7 )
= ( Remove_max @ L5 ) )
=> ( P @ ( product_Pair @ B @ ( list @ A ) @ L7 @ ( cons @ A @ M5 @ Sl ) ) ) ) )
=> ( P @ ( product_Pair @ B @ ( list @ A ) @ L5 @ Sl ) ) ) )
=> ( P @ X ) ) ) ) ) ).
% RemoveMax.ssort'_dom.inducts
thf(fact_241_RemoveMax_Ossort_H__dom_Ointros,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,L: B,Sl2: list @ A] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ! [M2: A,L4: B] :
( ~ ( Is_empty @ L )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L ) )
=> ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ ( product_Pair @ B @ ( list @ A ) @ L4 @ ( cons @ A @ M2 @ Sl2 ) ) ) ) )
=> ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ ( product_Pair @ B @ ( list @ A ) @ L @ Sl2 ) ) ) ) ) ).
% RemoveMax.ssort'_dom.intros
thf(fact_242_RemoveMax_Ossort_H__dom_Ocong,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( ssort_dom @ B @ A )
= ( ssort_dom @ B @ A ) ) ) ).
% RemoveMax.ssort'_dom.cong
thf(fact_243_RemoveMax_Ossort_H__dom_Ocases,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,A2: product_prod @ B @ ( list @ A )] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ A2 )
=> ~ ! [L5: B,Sl: list @ A] :
( ( A2
= ( product_Pair @ B @ ( list @ A ) @ L5 @ Sl ) )
=> ~ ( ~ ( Is_empty @ L5 )
=> ! [M5: A,L7: B] :
( ( ( product_Pair @ A @ B @ M5 @ L7 )
= ( Remove_max @ L5 ) )
=> ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ ( product_Pair @ B @ ( list @ A ) @ L7 @ ( cons @ A @ M5 @ Sl ) ) ) ) ) ) ) ) ) ).
% RemoveMax.ssort'_dom.cases
thf(fact_244_RemoveMax_Ossort_H__dom_Osimps,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,A2: product_prod @ B @ ( list @ A )] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ A2 )
= ( ? [L2: B,Sl3: list @ A] :
( ( A2
= ( product_Pair @ B @ ( list @ A ) @ L2 @ Sl3 ) )
& ! [X5: A,Y3: B] :
( ~ ( Is_empty @ L2 )
=> ( ( ( product_Pair @ A @ B @ X5 @ Y3 )
= ( Remove_max @ L2 ) )
=> ( ssort_dom @ B @ A @ Is_empty @ Remove_max @ ( product_Pair @ B @ ( list @ A ) @ Y3 @ ( cons @ A @ X5 @ Sl3 ) ) ) ) ) ) ) ) ) ) ).
% RemoveMax.ssort'_dom.simps
thf(fact_245_bind__simps_I2_J,axiom,
! [A: $tType,B: $tType,X: B,Xs2: list @ B,F3: B > ( list @ A )] :
( ( bind @ B @ A @ ( cons @ B @ X @ Xs2 ) @ F3 )
= ( append @ A @ ( F3 @ X ) @ ( bind @ B @ A @ Xs2 @ F3 ) ) ) ).
% bind_simps(2)
thf(fact_246_lexord__same__pref__if__irrefl,axiom,
! [A: $tType,R: set @ ( product_prod @ A @ A ),Xs2: list @ A,Ys2: list @ A,Zs2: list @ A] :
( ( irrefl @ A @ R )
=> ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ Xs2 @ Ys2 ) @ ( append @ A @ Xs2 @ Zs2 ) ) @ ( lexord @ A @ R ) )
= ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Ys2 @ Zs2 ) @ ( lexord @ A @ R ) ) ) ) ).
% lexord_same_pref_if_irrefl
thf(fact_247_bind__simps_I1_J,axiom,
! [B: $tType,A: $tType,F3: B > ( list @ A )] :
( ( bind @ B @ A @ ( nil @ B ) @ F3 )
= ( nil @ A ) ) ).
% bind_simps(1)
thf(fact_248_irrefl__def,axiom,
! [A: $tType] :
( ( irrefl @ A )
= ( ^ [R3: set @ ( product_prod @ A @ A )] :
! [A6: A] :
~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A6 @ A6 ) @ R3 ) ) ) ).
% irrefl_def
thf(fact_249_irreflI,axiom,
! [A: $tType,R4: set @ ( product_prod @ A @ A )] :
( ! [A3: A] :
~ ( member @ ( product_prod @ A @ A ) @ ( product_Pair @ A @ A @ A3 @ A3 ) @ R4 )
=> ( irrefl @ A @ R4 ) ) ).
% irreflI
thf(fact_250_lexord__irrefl,axiom,
! [A: $tType,R4: set @ ( product_prod @ A @ A )] :
( ( irrefl @ A @ R4 )
=> ( irrefl @ ( list @ A ) @ ( lexord @ A @ R4 ) ) ) ).
% lexord_irrefl
thf(fact_251_lenlex__append2,axiom,
! [A: $tType,R4: set @ ( product_prod @ A @ A ),Us: list @ A,Xs2: list @ A,Ys2: list @ A] :
( ( irrefl @ A @ R4 )
=> ( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( append @ A @ Us @ Xs2 ) @ ( append @ A @ Us @ Ys2 ) ) @ ( lenlex @ A @ R4 ) )
= ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ Xs2 @ Ys2 ) @ ( lenlex @ A @ R4 ) ) ) ) ).
% lenlex_append2
thf(fact_252_RemoveMax_Ossort_HInduct,axiom,
! [B: $tType,A: $tType] :
( ( linorder @ A )
=> ! [Empty: B,Is_empty: B > $o,Of_list: ( list @ A ) > B,Multiset: B > ( multiset @ A ),Remove_max: B > ( product_prod @ A @ B ),Inv: B > $o,L: B,P: B > ( list @ A ) > $o,Sl2: list @ A] :
( ( removeMax @ B @ A @ Empty @ Is_empty @ Of_list @ Multiset @ Remove_max @ Inv )
=> ( ( Inv @ L )
=> ( ( P @ L @ Sl2 )
=> ( ! [L5: B,Sl: list @ A,M2: A,L4: B] :
( ~ ( Is_empty @ L5 )
=> ( ( Inv @ L5 )
=> ( ( ( product_Pair @ A @ B @ M2 @ L4 )
= ( Remove_max @ L5 ) )
=> ( ( P @ L5 @ Sl )
=> ( P @ L4 @ ( cons @ A @ M2 @ Sl ) ) ) ) ) )
=> ( P @ Empty @ ( ssort @ B @ A @ Is_empty @ Remove_max @ L @ Sl2 ) ) ) ) ) ) ) ).
% RemoveMax.ssort'Induct
thf(fact_253_Nil__lenlex__iff1,axiom,
! [A: $tType,Ns: list @ A,R: set @ ( product_prod @ A @ A )] :
( ( member @ ( product_prod @ ( list @ A ) @ ( list @ A ) ) @ ( product_Pair @ ( list @ A ) @ ( list @ A ) @ ( nil @ A ) @ Ns ) @ ( lenlex @ A @ R ) )
= ( Ns
!= ( nil @ A ) ) ) ).
% Nil_lenlex_iff1
thf(fact_254_RemoveMax_Ossort_H_Ocong,axiom,
! [A: $tType,B: $tType] :
( ( linorder @ A )
=> ( ( ssort @ B @ A )
= ( ssort @ B @ A ) ) ) ).
% RemoveMax.ssort'.cong
% Type constructors (13)
thf(tcon_fun___Orderings_Opreorder,axiom,
! [A9: $tType,A10: $tType] :
( ( preorder @ A10 )
=> ( preorder @ ( A9 > A10 ) ) ) ).
thf(tcon_fun___Orderings_Oorder,axiom,
! [A9: $tType,A10: $tType] :
( ( order @ A10 )
=> ( order @ ( A9 > A10 ) ) ) ).
thf(tcon_fun___Orderings_Oord,axiom,
! [A9: $tType,A10: $tType] :
( ( ord @ A10 )
=> ( ord @ ( A9 > A10 ) ) ) ).
thf(tcon_Set_Oset___Orderings_Opreorder_1,axiom,
! [A9: $tType] : ( preorder @ ( set @ A9 ) ) ).
thf(tcon_Set_Oset___Orderings_Oorder_2,axiom,
! [A9: $tType] : ( order @ ( set @ A9 ) ) ).
thf(tcon_Set_Oset___Orderings_Oord_3,axiom,
! [A9: $tType] : ( ord @ ( set @ A9 ) ) ).
thf(tcon_HOL_Obool___Orderings_Opreorder_4,axiom,
preorder @ $o ).
thf(tcon_HOL_Obool___Orderings_Olinorder,axiom,
linorder @ $o ).
thf(tcon_HOL_Obool___Orderings_Oorder_5,axiom,
order @ $o ).
thf(tcon_HOL_Obool___Orderings_Oord_6,axiom,
ord @ $o ).
thf(tcon_Multiset_Omultiset___Orderings_Opreorder_7,axiom,
! [A9: $tType] :
( ( preorder @ A9 )
=> ( preorder @ ( multiset @ A9 ) ) ) ).
thf(tcon_Multiset_Omultiset___Orderings_Oorder_8,axiom,
! [A9: $tType] :
( ( preorder @ A9 )
=> ( order @ ( multiset @ A9 ) ) ) ).
thf(tcon_Multiset_Omultiset___Orderings_Oord_9,axiom,
! [A9: $tType] :
( ( preorder @ A9 )
=> ( ord @ ( multiset @ A9 ) ) ) ).
% Conjectures (1)
thf(conj_0,conjecture,
heapIm721255937_empty @ b @ ( e @ b ) ).
%------------------------------------------------------------------------------