%   ORIGINAL: h4/sorting/PERM__SET__TO__LIST__count__COUNT__LIST
% Assm: HL_TRUTH: T
% Assm: HL_FALSITY: ~F
% Assm: HL_BOOL_CASES: !t. (t <=> T) \/ (t <=> F)
% Assm: HL_EXT: !f g. (!x. f x = g x) ==> f = g
% Assm: h4/bool/TRUTH: T
% Assm: h4/bool/IMP__ANTISYM__AX: !t2 t1. (t1 ==> t2) ==> (t2 ==> t1) ==> (t1 <=> t2)
% Assm: h4/bool/FORALL__SIMP: !t. (!x. t) <=> t
% Assm: h4/bool/IMP__CLAUSES_c1: !t. t ==> T <=> T
% Assm: h4/bool/REFL__CLAUSE: !x. x = x <=> T
% Assm: h4/bool/EQ__SYM__EQ: !y x. x = y <=> y = x
% Assm: h4/bool/EQ__CLAUSES_c1: !t. (t <=> T) <=> t
% Assm: h4/bool/AND__IMP__INTRO: !t3 t2 t1. t1 ==> t2 ==> t3 <=> t1 /\ t2 ==> t3
% Assm: h4/bool/IMP__CONG: !y_27 y x_27 x. (x <=> x_27) /\ (x_27 ==> (y <=> y_27)) ==> (x ==> y <=> x_27 ==> y_27)
% Assm: h4/bool/UNWIND__THM2: !a P. (?x. x = a /\ P x) <=> P a
% Assm: h4/combin/I__THM: !x. h4/combin/I x = x
% Assm: h4/pred__set/IN__COUNT: !n m. h4/bool/IN m (h4/pred__set/count n) <=> h4/prim__rec/_3C m n
% Assm: h4/pred__set/FINITE__COUNT: !n. h4/pred__set/FINITE (h4/pred__set/count n)
% Assm: h4/list/MEM__SET__TO__LIST: !s. h4/pred__set/FINITE s ==> (!x. h4/bool/IN x (h4/list/LIST__TO__SET (h4/list/SET__TO__LIST s)) <=> h4/bool/IN x s)
% Assm: h4/list/ALL__DISTINCT__SET__TO__LIST: !s. h4/pred__set/FINITE s ==> h4/list/ALL__DISTINCT (h4/list/SET__TO__LIST s)
% Assm: h4/list/MEM__GENLIST: !x n f. h4/bool/IN x (h4/list/LIST__TO__SET (h4/list/GENLIST f n)) <=> (?m. h4/prim__rec/_3C m n /\ x = f m)
% Assm: h4/list/ALL__DISTINCT__GENLIST: !n f. h4/list/ALL__DISTINCT (h4/list/GENLIST f n) <=> (!m1 m2. h4/prim__rec/_3C m1 n /\ h4/prim__rec/_3C m2 n /\ f m1 = f m2 ==> m1 = m2)
% Assm: h4/rich__list/COUNT__LIST__GENLIST: !n. h4/rich__list/COUNT__LIST n = h4/list/GENLIST h4/combin/I n
% Assm: h4/sorting/PERM__ALL__DISTINCT: !l2 l1. h4/list/ALL__DISTINCT l1 /\ h4/list/ALL__DISTINCT l2 /\ (!x. h4/bool/IN x (h4/list/LIST__TO__SET l1) <=> h4/bool/IN x (h4/list/LIST__TO__SET l2)) ==> h4/sorting/PERM l1 l2
% Goal: !n. h4/sorting/PERM (h4/list/SET__TO__LIST (h4/pred__set/count n)) (h4/rich__list/COUNT__LIST n)
%   PROCESSED
% Assm [HLu_TRUTH]: T
% Assm [HLu_FALSITY]: ~F
% Assm [HLu_BOOLu_CASES]: !t. (t <=> T) \/ (t <=> F)
% Assm [HLu_EXT]: !f g. (!x. happ f x = happ g x) ==> f = g
% Assm [h4s_bools_TRUTH]: T
% Assm [h4s_bools_IMPu_u_ANTISYMu_u_AX]: !t2 t1. (t1 ==> t2) ==> (t2 ==> t1) ==> (t1 <=> t2)
% Assm [h4s_bools_FORALLu_u_SIMP]: !t. (!x. t) <=> t
% Assm [h4s_bools_IMPu_u_CLAUSESu_c1]: !t. t ==> T <=> T
% Assm [h4s_bools_REFLu_u_CLAUSE]: !x. x = x <=> T
% Assm [h4s_bools_EQu_u_SYMu_u_EQ]: !y x. x = y <=> y = x
% Assm [h4s_bools_EQu_u_CLAUSESu_c1]: !t. (t <=> T) <=> t
% Assm [h4s_bools_ANDu_u_IMPu_u_INTRO]: !t3 t2 t1. t1 ==> t2 ==> t3 <=> t1 /\ t2 ==> t3
% Assm [h4s_bools_IMPu_u_CONG]: !y_27 y x_27 x. (x <=> x_27) /\ (x_27 ==> (y <=> y_27)) ==> (x ==> y <=> x_27 ==> y_27)
% Assm [h4s_bools_UNWINDu_u_THM2]: !a P. (?x. x = a /\ happ P x) <=> happ P a
% Assm [h4s_combins_Iu_u_THM]: !x. happ h4/combin/I x = x
% Assm [h4s_predu_u_sets_INu_u_COUNT]: !n m. h4/bool/IN m (h4/pred__set/count n) <=> h4/prim__rec/_3C m n
% Assm [h4s_predu_u_sets_FINITEu_u_COUNT]: !n. h4/pred__set/FINITE (h4/pred__set/count n)
% Assm [h4s_lists_MEMu_u_SETu_u_TOu_u_LIST]: !s. h4/pred__set/FINITE s ==> (!x. h4/bool/IN x (h4/list/LIST__TO__SET (h4/list/SET__TO__LIST s)) <=> h4/bool/IN x s)
% Assm [h4s_lists_ALLu_u_DISTINCTu_u_SETu_u_TOu_u_LIST]: !s. h4/pred__set/FINITE s ==> h4/list/ALL__DISTINCT (h4/list/SET__TO__LIST s)
% Assm [h4s_lists_MEMu_u_GENLIST]: !x n f. h4/bool/IN x (h4/list/LIST__TO__SET (h4/list/GENLIST f n)) <=> (?m. h4/prim__rec/_3C m n /\ x = happ f m)
% Assm [h4s_lists_ALLu_u_DISTINCTu_u_GENLIST]: !n f. h4/list/ALL__DISTINCT (h4/list/GENLIST f n) <=> (!m1 m2. h4/prim__rec/_3C m1 n /\ h4/prim__rec/_3C m2 n /\ happ f m1 = happ f m2 ==> m1 = m2)
% Assm [h4s_richu_u_lists_COUNTu_u_LISTu_u_GENLIST]: !n. h4/rich__list/COUNT__LIST n = h4/list/GENLIST h4/combin/I n
% Assm [h4s_sortings_PERMu_u_ALLu_u_DISTINCT]: !l2 l1. h4/list/ALL__DISTINCT l1 /\ h4/list/ALL__DISTINCT l2 /\ (!x. h4/bool/IN x (h4/list/LIST__TO__SET l1) <=> h4/bool/IN x (h4/list/LIST__TO__SET l2)) ==> h4/sorting/PERM l1 l2
% Goal: !n. h4/sorting/PERM (h4/list/SET__TO__LIST (h4/pred__set/count n)) (h4/rich__list/COUNT__LIST n)
fof(aHLu_TRUTH, axiom, p(s(t_bool,t))).
fof(aHLu_FALSITY, axiom, ~ (p(s(t_bool,f)))).
fof(aHLu_BOOLu_CASES, axiom, ![V_t]: (s(t_bool,V_t) = s(t_bool,t) | s(t_bool,V_t) = s(t_bool,f))).
fof(aHLu_EXT, axiom, ![TV_Q276356,TV_Q276352]: ![V_f, V_g]: (![V_x]: s(TV_Q276352,happ(s(t_fun(TV_Q276356,TV_Q276352),V_f),s(TV_Q276356,V_x))) = s(TV_Q276352,happ(s(t_fun(TV_Q276356,TV_Q276352),V_g),s(TV_Q276356,V_x))) => s(t_fun(TV_Q276356,TV_Q276352),V_f) = s(t_fun(TV_Q276356,TV_Q276352),V_g))).
fof(ah4s_bools_TRUTH, axiom, p(s(t_bool,t))).
fof(ah4s_bools_IMPu_u_ANTISYMu_u_AX, axiom, ![V_t2, V_t1]: ((p(s(t_bool,V_t1)) => p(s(t_bool,V_t2))) => ((p(s(t_bool,V_t2)) => p(s(t_bool,V_t1))) => s(t_bool,V_t1) = s(t_bool,V_t2)))).
fof(ah4s_bools_FORALLu_u_SIMP, axiom, ![TV_u_27a]: ![V_t]: (![V_x]: p(s(t_bool,V_t)) <=> p(s(t_bool,V_t)))).
fof(ah4s_bools_IMPu_u_CLAUSESu_c1, axiom, ![V_t]: ((p(s(t_bool,V_t)) => p(s(t_bool,t))) <=> p(s(t_bool,t)))).
fof(ah4s_bools_REFLu_u_CLAUSE, axiom, ![TV_u_27a]: ![V_x]: (s(TV_u_27a,V_x) = s(TV_u_27a,V_x) <=> p(s(t_bool,t)))).
fof(ah4s_bools_EQu_u_SYMu_u_EQ, axiom, ![TV_u_27a]: ![V_y, V_x]: (s(TV_u_27a,V_x) = s(TV_u_27a,V_y) <=> s(TV_u_27a,V_y) = s(TV_u_27a,V_x))).
fof(ah4s_bools_EQu_u_CLAUSESu_c1, axiom, ![V_t]: (s(t_bool,V_t) = s(t_bool,t) <=> p(s(t_bool,V_t)))).
fof(ah4s_bools_ANDu_u_IMPu_u_INTRO, axiom, ![V_t3, V_t2, V_t1]: ((p(s(t_bool,V_t1)) => (p(s(t_bool,V_t2)) => p(s(t_bool,V_t3)))) <=> ((p(s(t_bool,V_t1)) & p(s(t_bool,V_t2))) => p(s(t_bool,V_t3))))).
fof(ah4s_bools_IMPu_u_CONG, axiom, ![V_yu_27, V_y, V_xu_27, V_x]: ((s(t_bool,V_x) = s(t_bool,V_xu_27) & (p(s(t_bool,V_xu_27)) => s(t_bool,V_y) = s(t_bool,V_yu_27))) => ((p(s(t_bool,V_x)) => p(s(t_bool,V_y))) <=> (p(s(t_bool,V_xu_27)) => p(s(t_bool,V_yu_27)))))).
fof(ah4s_bools_UNWINDu_u_THM2, axiom, ![TV_u_27a]: ![V_a, V_P]: (?[V_x]: (s(TV_u_27a,V_x) = s(TV_u_27a,V_a) & p(s(t_bool,happ(s(t_fun(TV_u_27a,t_bool),V_P),s(TV_u_27a,V_x))))) <=> p(s(t_bool,happ(s(t_fun(TV_u_27a,t_bool),V_P),s(TV_u_27a,V_a)))))).
fof(ah4s_combins_Iu_u_THM, axiom, ![TV_u_27a]: ![V_x]: s(TV_u_27a,happ(s(t_fun(TV_u_27a,TV_u_27a),h4s_combins_i),s(TV_u_27a,V_x))) = s(TV_u_27a,V_x)).
fof(ah4s_predu_u_sets_INu_u_COUNT, axiom, ![V_n, V_m]: s(t_bool,h4s_bools_in(s(t_h4s_nums_num,V_m),s(t_fun(t_h4s_nums_num,t_bool),h4s_predu_u_sets_count(s(t_h4s_nums_num,V_n))))) = s(t_bool,h4s_primu_u_recs_u_3c(s(t_h4s_nums_num,V_m),s(t_h4s_nums_num,V_n)))).
fof(ah4s_predu_u_sets_FINITEu_u_COUNT, axiom, ![V_n]: p(s(t_bool,h4s_predu_u_sets_finite(s(t_fun(t_h4s_nums_num,t_bool),h4s_predu_u_sets_count(s(t_h4s_nums_num,V_n))))))).
fof(ah4s_lists_MEMu_u_SETu_u_TOu_u_LIST, axiom, ![TV_u_27a]: ![V_s]: (p(s(t_bool,h4s_predu_u_sets_finite(s(t_fun(TV_u_27a,t_bool),V_s)))) => ![V_x]: s(t_bool,h4s_bools_in(s(TV_u_27a,V_x),s(t_fun(TV_u_27a,t_bool),h4s_lists_listu_u_tou_u_set(s(t_h4s_lists_list(TV_u_27a),h4s_lists_setu_u_tou_u_list(s(t_fun(TV_u_27a,t_bool),V_s))))))) = s(t_bool,h4s_bools_in(s(TV_u_27a,V_x),s(t_fun(TV_u_27a,t_bool),V_s))))).
fof(ah4s_lists_ALLu_u_DISTINCTu_u_SETu_u_TOu_u_LIST, axiom, ![TV_u_27a]: ![V_s]: (p(s(t_bool,h4s_predu_u_sets_finite(s(t_fun(TV_u_27a,t_bool),V_s)))) => p(s(t_bool,h4s_lists_allu_u_distinct(s(t_h4s_lists_list(TV_u_27a),h4s_lists_setu_u_tou_u_list(s(t_fun(TV_u_27a,t_bool),V_s)))))))).
fof(ah4s_lists_MEMu_u_GENLIST, axiom, ![TV_u_27a]: ![V_x, V_n, V_f]: (p(s(t_bool,h4s_bools_in(s(TV_u_27a,V_x),s(t_fun(TV_u_27a,t_bool),h4s_lists_listu_u_tou_u_set(s(t_h4s_lists_list(TV_u_27a),h4s_lists_genlist(s(t_fun(t_h4s_nums_num,TV_u_27a),V_f),s(t_h4s_nums_num,V_n)))))))) <=> ?[V_m]: (p(s(t_bool,h4s_primu_u_recs_u_3c(s(t_h4s_nums_num,V_m),s(t_h4s_nums_num,V_n)))) & s(TV_u_27a,V_x) = s(TV_u_27a,happ(s(t_fun(t_h4s_nums_num,TV_u_27a),V_f),s(t_h4s_nums_num,V_m)))))).
fof(ah4s_lists_ALLu_u_DISTINCTu_u_GENLIST, axiom, ![TV_u_27a]: ![V_n, V_f]: (p(s(t_bool,h4s_lists_allu_u_distinct(s(t_h4s_lists_list(TV_u_27a),h4s_lists_genlist(s(t_fun(t_h4s_nums_num,TV_u_27a),V_f),s(t_h4s_nums_num,V_n)))))) <=> ![V_m1, V_m2]: ((p(s(t_bool,h4s_primu_u_recs_u_3c(s(t_h4s_nums_num,V_m1),s(t_h4s_nums_num,V_n)))) & (p(s(t_bool,h4s_primu_u_recs_u_3c(s(t_h4s_nums_num,V_m2),s(t_h4s_nums_num,V_n)))) & s(TV_u_27a,happ(s(t_fun(t_h4s_nums_num,TV_u_27a),V_f),s(t_h4s_nums_num,V_m1))) = s(TV_u_27a,happ(s(t_fun(t_h4s_nums_num,TV_u_27a),V_f),s(t_h4s_nums_num,V_m2))))) => s(t_h4s_nums_num,V_m1) = s(t_h4s_nums_num,V_m2)))).
fof(ah4s_richu_u_lists_COUNTu_u_LISTu_u_GENLIST, axiom, ![V_n]: s(t_h4s_lists_list(t_h4s_nums_num),h4s_richu_u_lists_countu_u_list(s(t_h4s_nums_num,V_n))) = s(t_h4s_lists_list(t_h4s_nums_num),h4s_lists_genlist(s(t_fun(t_h4s_nums_num,t_h4s_nums_num),h4s_combins_i),s(t_h4s_nums_num,V_n)))).
fof(ah4s_sortings_PERMu_u_ALLu_u_DISTINCT, axiom, ![TV_u_27a]: ![V_l2, V_l1]: ((p(s(t_bool,h4s_lists_allu_u_distinct(s(t_h4s_lists_list(TV_u_27a),V_l1)))) & (p(s(t_bool,h4s_lists_allu_u_distinct(s(t_h4s_lists_list(TV_u_27a),V_l2)))) & ![V_x]: s(t_bool,h4s_bools_in(s(TV_u_27a,V_x),s(t_fun(TV_u_27a,t_bool),h4s_lists_listu_u_tou_u_set(s(t_h4s_lists_list(TV_u_27a),V_l1))))) = s(t_bool,h4s_bools_in(s(TV_u_27a,V_x),s(t_fun(TV_u_27a,t_bool),h4s_lists_listu_u_tou_u_set(s(t_h4s_lists_list(TV_u_27a),V_l2))))))) => p(s(t_bool,h4s_sortings_perm(s(t_h4s_lists_list(TV_u_27a),V_l1),s(t_h4s_lists_list(TV_u_27a),V_l2)))))).
fof(ch4s_sortings_PERMu_u_SETu_u_TOu_u_LISTu_u_countu_u_COUNTu_u_LIST, conjecture, ![V_n]: p(s(t_bool,h4s_sortings_perm(s(t_h4s_lists_list(t_h4s_nums_num),h4s_lists_setu_u_tou_u_list(s(t_fun(t_h4s_nums_num,t_bool),h4s_predu_u_sets_count(s(t_h4s_nums_num,V_n))))),s(t_h4s_lists_list(t_h4s_nums_num),h4s_richu_u_lists_countu_u_list(s(t_h4s_nums_num,V_n))))))).
