Exact expanded PA statement
forall b c l e. (((exists ff_u_b5ccbclo_count_sum ff_v_b5ccbclo_count_sum. ((((exists ff_h_b5ccbclo_count_sum_start. ff_h_b5ccbclo_count_sum_start + S (0) = S ((S (0)) * ff_v_b5ccbclo_count_sum)) /\ exists ff_q_b5ccbclo_count_sum_start. ff_u_b5ccbclo_count_sum = ff_q_b5ccbclo_count_sum_start * S ((S (0)) * ff_v_b5ccbclo_count_sum) + (0))) /\ ((((exists ff_h_b5ccbclo_count_sum_terminal. ff_h_b5ccbclo_count_sum_terminal + S ((S e)) = S ((S ((l))) * ff_v_b5ccbclo_count_sum)) /\ exists ff_q_b5ccbclo_count_sum_terminal. ff_u_b5ccbclo_count_sum = ff_q_b5ccbclo_count_sum_terminal * S ((S ((l))) * ff_v_b5ccbclo_count_sum) + ((S e)))) /\ forall ff_i_b5ccbclo_count_sum. (exists ff_lt_b5ccbclo_count_sum_bound. ff_lt_b5ccbclo_count_sum_bound + S ff_i_b5ccbclo_count_sum = (l)) -> exists ff_a_b5ccbclo_count_sum ff_r_b5ccbclo_count_sum ff_s_b5ccbclo_count_sum. ((((exists ff_h_b5ccbclo_count_sum_summand. ff_h_b5ccbclo_count_sum_summand + S (ff_a_b5ccbclo_count_sum) = S ((S (ff_i_b5ccbclo_count_sum)) * c)) /\ exists ff_q_b5ccbclo_count_sum_summand. b = ff_q_b5ccbclo_count_sum_summand * S ((S (ff_i_b5ccbclo_count_sum)) * c) + (ff_a_b5ccbclo_count_sum))) /\ ((((exists ff_h_b5ccbclo_count_sum_partial. ff_h_b5ccbclo_count_sum_partial + S (ff_r_b5ccbclo_count_sum) = S ((S (ff_i_b5ccbclo_count_sum)) * ff_v_b5ccbclo_count_sum)) /\ exists ff_q_b5ccbclo_count_sum_partial. ff_u_b5ccbclo_count_sum = ff_q_b5ccbclo_count_sum_partial * S ((S (ff_i_b5ccbclo_count_sum)) * ff_v_b5ccbclo_count_sum) + (ff_r_b5ccbclo_count_sum))) /\ ((((exists ff_h_b5ccbclo_count_sum_successor. ff_h_b5ccbclo_count_sum_successor + S (ff_s_b5ccbclo_count_sum) = S ((S (S ff_i_b5ccbclo_count_sum)) * ff_v_b5ccbclo_count_sum)) /\ exists ff_q_b5ccbclo_count_sum_successor. ff_u_b5ccbclo_count_sum = ff_q_b5ccbclo_count_sum_successor * S ((S (S ff_i_b5ccbclo_count_sum)) * ff_v_b5ccbclo_count_sum) + (ff_s_b5ccbclo_count_sum))) /\ ff_s_b5ccbclo_count_sum = ff_r_b5ccbclo_count_sum + ff_a_b5ccbclo_count_sum)))))) /\ (forall ff_i_b5ccbclo_count_bits. (exists ff_lt_b5ccbclo_count_bits_bound. ff_lt_b5ccbclo_count_bits_bound + S ff_i_b5ccbclo_count_bits = (l)) -> exists ff_bit_b5ccbclo_count_bits. ((((exists ff_h_b5ccbclo_count_bits_decoded. ff_h_b5ccbclo_count_bits_decoded + S (ff_bit_b5ccbclo_count_bits) = S ((S (ff_i_b5ccbclo_count_bits)) * c)) /\ exists ff_q_b5ccbclo_count_bits_decoded. b = ff_q_b5ccbclo_count_bits_decoded * S ((S (ff_i_b5ccbclo_count_bits)) * c) + (ff_bit_b5ccbclo_count_bits))) /\ (ff_bit_b5ccbclo_count_bits = 0 \/ ff_bit_b5ccbclo_count_bits = 1))))) -> exists i. (exists bcf_lt_gap_b5ccbclo_bound. bcf_lt_gap_b5ccbclo_bound + S (i) = l) /\ ((((exists fs_h_b5ccbclo_entry. fs_h_b5ccbclo_entry + S (1) = S ((S (i)) * c)) /\ exists fs_q_b5ccbclo_entry. b = fs_q_b5ccbclo_entry * S ((S (i)) * c) + (1))) /\ (exists bcf_le_gap_b5ccbclo_result. bcf_le_gap_b5ccbclo_result + (S e) = S i))Structural proof guide
A positive bit count has a one at an index at least its count.
Direct prerequisites: bit_count_zero, bit_count_succ_decompose, bit_count_bounded, le_succ, le_refl. The authored body proceeds by structural induction (1), case analysis (9), intermediate claims (4), equality transport (6).
Proof neighborhood
Direct dependencies
BT008N bit_count_zero BT008O bit_count_succ_decompose BT008P bit_count_bounded BT0018 le_succ BT000E le_reflDirect dependents
Formal native tactic body
Dependencies are hypotheses of this body receipt. The focused endpoint audits separately check the complete empty-context certificates.
- 0001
intro b - 0002
intro c - 0003
induction l - 0004
intro e - 0005
intro hcount - 0006
have himpossible : S e = 0 - 0007
specialize bit_count_zero b - 0008
specialize bit_count_zero c - 0009
specialize bit_count_zero 0 - 0010
specialize bit_count_zero (S e) - 0011
apply bit_count_zero - 0012
refl - 0013
exact hcount - 0014
exfalso - 0015
apply PA1 - 0016
exact himpossible - 0017
intro e - 0018
intro hcount - 0019
have hdecomp : exists a r. (((exists fs_h_b5ccbclo_last. fs_h_b5ccbclo_last + S (a) = S ((S (l)) * c)) /\ exists fs_q_b5ccbclo_last. b = fs_q_b5ccbclo_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_b5ccbclo_prefix_sum ff_v_b5ccbclo_prefix_sum. ((((exists ff_h_b5ccbclo_prefix_sum_start. ff_h_b5ccbclo_prefix_sum_start + S (0) = S ((S (0)) * ff_v_b5ccbclo_prefix_sum)) /\ exists ff_q_b5ccbclo_prefix_sum_start. ff_u_b5ccbclo_prefix_sum = ff_q_b5ccbclo_prefix_sum_start * S ((S (0)) * ff_v_b5ccbclo_prefix_sum) + (0))) /\ ((((exists ff_h_b5ccbclo_prefix_sum_terminal. ff_h_b5ccbclo_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_b5ccbclo_prefix_sum)) /\ exists ff_q_b5ccbclo_prefix_sum_terminal. ff_u_b5ccbclo_prefix_sum = ff_q_b5ccbclo_prefix_sum_terminal * S ((S (l)) * ff_v_b5ccbclo_prefix_sum) + (r))) /\ forall ff_i_b5ccbclo_prefix_sum. (exists ff_lt_b5ccbclo_prefix_sum_bound. ff_lt_b5ccbclo_prefix_sum_bound + S ff_i_b5ccbclo_prefix_sum = l) -> exists ff_a_b5ccbclo_prefix_sum ff_r_b5ccbclo_prefix_sum ff_s_b5ccbclo_prefix_sum. ((((exists ff_h_b5ccbclo_prefix_sum_summand. ff_h_b5ccbclo_prefix_sum_summand + S (ff_a_b5ccbclo_prefix_sum) = S ((S (ff_i_b5ccbclo_prefix_sum)) * c)) /\ exists ff_q_b5ccbclo_prefix_sum_summand. b = ff_q_b5ccbclo_prefix_sum_summand * S ((S (ff_i_b5ccbclo_prefix_sum)) * c) + (ff_a_b5ccbclo_prefix_sum))) /\ ((((exists ff_h_b5ccbclo_prefix_sum_partial. ff_h_b5ccbclo_prefix_sum_partial + S (ff_r_b5ccbclo_prefix_sum) = S ((S (ff_i_b5ccbclo_prefix_sum)) * ff_v_b5ccbclo_prefix_sum)) /\ exists ff_q_b5ccbclo_prefix_sum_partial. ff_u_b5ccbclo_prefix_sum = ff_q_b5ccbclo_prefix_sum_partial * S ((S (ff_i_b5ccbclo_prefix_sum)) * ff_v_b5ccbclo_prefix_sum) + (ff_r_b5ccbclo_prefix_sum))) /\ ((((exists ff_h_b5ccbclo_prefix_sum_successor. ff_h_b5ccbclo_prefix_sum_successor + S (ff_s_b5ccbclo_prefix_sum) = S ((S (S ff_i_b5ccbclo_prefix_sum)) * ff_v_b5ccbclo_prefix_sum)) /\ exists ff_q_b5ccbclo_prefix_sum_successor. ff_u_b5ccbclo_prefix_sum = ff_q_b5ccbclo_prefix_sum_successor * S ((S (S ff_i_b5ccbclo_prefix_sum)) * ff_v_b5ccbclo_prefix_sum) + (ff_s_b5ccbclo_prefix_sum))) /\ ff_s_b5ccbclo_prefix_sum = ff_r_b5ccbclo_prefix_sum + ff_a_b5ccbclo_prefix_sum)))))) /\ (forall ff_i_b5ccbclo_prefix_bits. (exists ff_lt_b5ccbclo_prefix_bits_bound. ff_lt_b5ccbclo_prefix_bits_bound + S ff_i_b5ccbclo_prefix_bits = l) -> exists ff_bit_b5ccbclo_prefix_bits. ((((exists ff_h_b5ccbclo_prefix_bits_decoded. ff_h_b5ccbclo_prefix_bits_decoded + S (ff_bit_b5ccbclo_prefix_bits) = S ((S (ff_i_b5ccbclo_prefix_bits)) * c)) /\ exists ff_q_b5ccbclo_prefix_bits_decoded. b = ff_q_b5ccbclo_prefix_bits_decoded * S ((S (ff_i_b5ccbclo_prefix_bits)) * c) + (ff_bit_b5ccbclo_prefix_bits))) /\ (ff_bit_b5ccbclo_prefix_bits = 0 \/ ff_bit_b5ccbclo_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ S e = r + a)) - 0020
specialize bit_count_succ_decompose b - 0021
specialize bit_count_succ_decompose c - 0022
specialize bit_count_succ_decompose l - 0023
specialize bit_count_succ_decompose (S l) - 0024
specialize bit_count_succ_decompose (S e) - 0025
apply bit_count_succ_decompose - 0026
refl - 0027
exact hcount - 0028
cases hdecomp - 0029
cases hdecomp_witness - 0030
cases hdecomp_witness_witness - 0031
cases hdecomp_witness_witness_right - 0032
cases hdecomp_witness_witness_right_right - 0033
cases hdecomp_witness_witness_right_right_left - 0034
have hprefix_value : S e = x1 - 0035
rewrite hdecomp_witness_witness_right_right_left_left at hdecomp_witness_witness_right_right_right - 0036
rewrite PA3 at hdecomp_witness_witness_right_right_right - 0037
exact hdecomp_witness_witness_right_right_right - 0038
rewrite <- hprefix_value at hdecomp_witness_witness_right_left - 0039
rewrite <- hprefix_value at hdecomp_witness_witness_right_left - 0040
have hprevious : exists i. (exists bcf_lt_gap_b5ccbclo_previous_bound. bcf_lt_gap_b5ccbclo_previous_bound + S (i) = l) /\ ((((exists fs_h_b5ccbclo_previous_entry. fs_h_b5ccbclo_previous_entry + S (1) = S ((S (i)) * c)) /\ exists fs_q_b5ccbclo_previous_entry. b = fs_q_b5ccbclo_previous_entry * S ((S (i)) * c) + (1))) /\ (exists bcf_le_gap_b5ccbclo_previous_result. bcf_le_gap_b5ccbclo_previous_result + (S e) = S i)) - 0041
specialize IH e - 0042
apply IH - 0043
exact hdecomp_witness_witness_right_left - 0044
cases hprevious - 0045
cases hprevious_witness - 0046
cases hprevious_witness_right - 0047
exists x2 - 0048
split - 0049
specialize le_succ (S x2) - 0050
specialize le_succ l - 0051
apply le_succ - 0052
exact hprevious_witness_left - 0053
split - 0054
exact hprevious_witness_right_left - 0055
exact hprevious_witness_right_right - 0056
exists l - 0057
split - 0058
specialize le_refl (S l) - 0059
exact le_refl - 0060
split - 0061
rewrite hdecomp_witness_witness_right_right_left_right at hdecomp_witness_witness_left - 0062
rewrite hdecomp_witness_witness_right_right_left_right at hdecomp_witness_witness_left - 0063
exact hdecomp_witness_witness_left - 0064
specialize bit_count_bounded b - 0065
specialize bit_count_bounded c - 0066
specialize bit_count_bounded (S l) - 0067
specialize bit_count_bounded (S e) - 0068
apply bit_count_bounded - 0069
exact hcount