Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.
Statement with defined notation
∀ n. ∀ k. ∀ j. ∀ x. ∀ y. k + j = n → Choose(n,k,x) → Choose(n,j,y) → x = yEvery purple notation token opens its conservative definition. Expanding the displayed statement recovers the exact first-order Peano-arithmetic formula checked by the unchanged kernel.
Definitions used by this theorem
In the theorem statement
2 occurrences
In local proof propositions
4 occurrences
Exact expanded native-PA statement
forall n k j x y. k + j = n -> (((exists bcf_lt_gap_bcsym_left_out_of_range. bcf_lt_gap_bcsym_left_out_of_range + S (n) = k) /\ x = 0) \/ ((exists bcf_le_gap_bcsym_left_in_range. bcf_le_gap_bcsym_left_in_range + (k) = n) /\ (exists bcf_row_code_code_bcsym_left bcf_row_code_scale_bcsym_left bcf_row_scale_code_bcsym_left bcf_row_scale_scale_bcsym_left bcf_row_code_bcsym_left bcf_row_scale_bcsym_left. ((forall bcf_row_index_bcsym_left_table. (exists bcf_lt_gap_bcsym_left_table_row_bound. bcf_lt_gap_bcsym_left_table_row_bound + S (bcf_row_index_bcsym_left_table) = S (n)) -> exists bcf_row_code_bcsym_left_table bcf_row_scale_bcsym_left_table. ((((exists bcf_height_bcsym_left_table_decoded_row_code. bcf_height_bcsym_left_table_decoded_row_code + S (bcf_row_code_bcsym_left_table) = S ((S (bcf_row_index_bcsym_left_table)) * bcf_row_code_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_table_decoded_row_code. bcf_row_code_code_bcsym_left = bcf_quotient_bcsym_left_table_decoded_row_code * S ((S (bcf_row_index_bcsym_left_table)) * bcf_row_code_scale_bcsym_left) + (bcf_row_code_bcsym_left_table))) /\ ((((exists bcf_height_bcsym_left_table_decoded_row_scale. bcf_height_bcsym_left_table_decoded_row_scale + S (bcf_row_scale_bcsym_left_table) = S ((S (bcf_row_index_bcsym_left_table)) * bcf_row_scale_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_table_decoded_row_scale. bcf_row_scale_code_bcsym_left = bcf_quotient_bcsym_left_table_decoded_row_scale * S ((S (bcf_row_index_bcsym_left_table)) * bcf_row_scale_scale_bcsym_left) + (bcf_row_scale_bcsym_left_table))) /\ ((bcf_row_index_bcsym_left_table = 0 /\ (forall bcf_index_bcsym_left_table_zero_row. (exists bcf_lt_gap_bcsym_left_table_zero_row_bound. bcf_lt_gap_bcsym_left_table_zero_row_bound + S (bcf_index_bcsym_left_table_zero_row) = S (n)) -> exists bcf_value_bcsym_left_table_zero_row. ((((exists bcf_height_bcsym_left_table_zero_row_entry. bcf_height_bcsym_left_table_zero_row_entry + S (bcf_value_bcsym_left_table_zero_row) = S ((S (bcf_index_bcsym_left_table_zero_row)) * bcf_row_scale_bcsym_left_table)) /\ exists bcf_quotient_bcsym_left_table_zero_row_entry. bcf_row_code_bcsym_left_table = bcf_quotient_bcsym_left_table_zero_row_entry * S ((S (bcf_index_bcsym_left_table_zero_row)) * bcf_row_scale_bcsym_left_table) + (bcf_value_bcsym_left_table_zero_row))) /\ ((bcf_index_bcsym_left_table_zero_row = 0 /\ bcf_value_bcsym_left_table_zero_row = 1) \/ exists bcf_predecessor_bcsym_left_table_zero_row. bcf_index_bcsym_left_table_zero_row = S bcf_predecessor_bcsym_left_table_zero_row /\ bcf_value_bcsym_left_table_zero_row = 0)))) \/ exists bcf_predecessor_bcsym_left_table bcf_previous_code_bcsym_left_table bcf_previous_scale_bcsym_left_table. bcf_row_index_bcsym_left_table = S bcf_predecessor_bcsym_left_table /\ ((((exists bcf_height_bcsym_left_table_decoded_previous_code. bcf_height_bcsym_left_table_decoded_previous_code + S (bcf_previous_code_bcsym_left_table) = S ((S (bcf_predecessor_bcsym_left_table)) * bcf_row_code_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_table_decoded_previous_code. bcf_row_code_code_bcsym_left = bcf_quotient_bcsym_left_table_decoded_previous_code * S ((S (bcf_predecessor_bcsym_left_table)) * bcf_row_code_scale_bcsym_left) + (bcf_previous_code_bcsym_left_table))) /\ ((((exists bcf_height_bcsym_left_table_decoded_previous_scale. bcf_height_bcsym_left_table_decoded_previous_scale + S (bcf_previous_scale_bcsym_left_table) = S ((S (bcf_predecessor_bcsym_left_table)) * bcf_row_scale_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_table_decoded_previous_scale. bcf_row_scale_code_bcsym_left = bcf_quotient_bcsym_left_table_decoded_previous_scale * S ((S (bcf_predecessor_bcsym_left_table)) * bcf_row_scale_scale_bcsym_left) + (bcf_previous_scale_bcsym_left_table))) /\ (forall bcf_index_bcsym_left_table_row_step. (exists bcf_lt_gap_bcsym_left_table_row_step_bound. bcf_lt_gap_bcsym_left_table_row_step_bound + S (bcf_index_bcsym_left_table_row_step) = S (n)) -> exists bcf_value_bcsym_left_table_row_step. ((((exists bcf_height_bcsym_left_table_row_step_entry. bcf_height_bcsym_left_table_row_step_entry + S (bcf_value_bcsym_left_table_row_step) = S ((S (bcf_index_bcsym_left_table_row_step)) * bcf_row_scale_bcsym_left_table)) /\ exists bcf_quotient_bcsym_left_table_row_step_entry. bcf_row_code_bcsym_left_table = bcf_quotient_bcsym_left_table_row_step_entry * S ((S (bcf_index_bcsym_left_table_row_step)) * bcf_row_scale_bcsym_left_table) + (bcf_value_bcsym_left_table_row_step))) /\ ((bcf_index_bcsym_left_table_row_step = 0 /\ bcf_value_bcsym_left_table_row_step = 1) \/ exists bcf_predecessor_bcsym_left_table_row_step bcf_left_bcsym_left_table_row_step bcf_right_bcsym_left_table_row_step. bcf_index_bcsym_left_table_row_step = S bcf_predecessor_bcsym_left_table_row_step /\ ((((exists bcf_height_bcsym_left_table_row_step_previous_left. bcf_height_bcsym_left_table_row_step_previous_left + S (bcf_left_bcsym_left_table_row_step) = S ((S (bcf_predecessor_bcsym_left_table_row_step)) * bcf_previous_scale_bcsym_left_table)) /\ exists bcf_quotient_bcsym_left_table_row_step_previous_left. bcf_previous_code_bcsym_left_table = bcf_quotient_bcsym_left_table_row_step_previous_left * S ((S (bcf_predecessor_bcsym_left_table_row_step)) * bcf_previous_scale_bcsym_left_table) + (bcf_left_bcsym_left_table_row_step))) /\ ((((exists bcf_height_bcsym_left_table_row_step_previous_right. bcf_height_bcsym_left_table_row_step_previous_right + S (bcf_right_bcsym_left_table_row_step) = S ((S (S (bcf_predecessor_bcsym_left_table_row_step))) * bcf_previous_scale_bcsym_left_table)) /\ exists bcf_quotient_bcsym_left_table_row_step_previous_right. bcf_previous_code_bcsym_left_table = bcf_quotient_bcsym_left_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcsym_left_table_row_step))) * bcf_previous_scale_bcsym_left_table) + (bcf_right_bcsym_left_table_row_step))) /\ bcf_value_bcsym_left_table_row_step = bcf_left_bcsym_left_table_row_step + bcf_right_bcsym_left_table_row_step))))))))))) /\ ((((exists bcf_height_bcsym_left_decoded_row_code. bcf_height_bcsym_left_decoded_row_code + S (bcf_row_code_bcsym_left) = S ((S (n)) * bcf_row_code_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_decoded_row_code. bcf_row_code_code_bcsym_left = bcf_quotient_bcsym_left_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcsym_left) + (bcf_row_code_bcsym_left))) /\ ((((exists bcf_height_bcsym_left_decoded_row_scale. bcf_height_bcsym_left_decoded_row_scale + S (bcf_row_scale_bcsym_left) = S ((S (n)) * bcf_row_scale_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_decoded_row_scale. bcf_row_scale_code_bcsym_left = bcf_quotient_bcsym_left_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcsym_left) + (bcf_row_scale_bcsym_left))) /\ (((exists bcf_height_bcsym_left_decoded_value. bcf_height_bcsym_left_decoded_value + S (x) = S ((S (k)) * bcf_row_scale_bcsym_left)) /\ exists bcf_quotient_bcsym_left_decoded_value. bcf_row_code_bcsym_left = bcf_quotient_bcsym_left_decoded_value * S ((S (k)) * bcf_row_scale_bcsym_left) + (x))))))))) -> (((exists bcf_lt_gap_bcsym_right_out_of_range. bcf_lt_gap_bcsym_right_out_of_range + S (n) = j) /\ y = 0) \/ ((exists bcf_le_gap_bcsym_right_in_range. bcf_le_gap_bcsym_right_in_range + (j) = n) /\ (exists bcf_row_code_code_bcsym_right bcf_row_code_scale_bcsym_right bcf_row_scale_code_bcsym_right bcf_row_scale_scale_bcsym_right bcf_row_code_bcsym_right bcf_row_scale_bcsym_right. ((forall bcf_row_index_bcsym_right_table. (exists bcf_lt_gap_bcsym_right_table_row_bound. bcf_lt_gap_bcsym_right_table_row_bound + S (bcf_row_index_bcsym_right_table) = S (n)) -> exists bcf_row_code_bcsym_right_table bcf_row_scale_bcsym_right_table. ((((exists bcf_height_bcsym_right_table_decoded_row_code. bcf_height_bcsym_right_table_decoded_row_code + S (bcf_row_code_bcsym_right_table) = S ((S (bcf_row_index_bcsym_right_table)) * bcf_row_code_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_table_decoded_row_code. bcf_row_code_code_bcsym_right = bcf_quotient_bcsym_right_table_decoded_row_code * S ((S (bcf_row_index_bcsym_right_table)) * bcf_row_code_scale_bcsym_right) + (bcf_row_code_bcsym_right_table))) /\ ((((exists bcf_height_bcsym_right_table_decoded_row_scale. bcf_height_bcsym_right_table_decoded_row_scale + S (bcf_row_scale_bcsym_right_table) = S ((S (bcf_row_index_bcsym_right_table)) * bcf_row_scale_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_table_decoded_row_scale. bcf_row_scale_code_bcsym_right = bcf_quotient_bcsym_right_table_decoded_row_scale * S ((S (bcf_row_index_bcsym_right_table)) * bcf_row_scale_scale_bcsym_right) + (bcf_row_scale_bcsym_right_table))) /\ ((bcf_row_index_bcsym_right_table = 0 /\ (forall bcf_index_bcsym_right_table_zero_row. (exists bcf_lt_gap_bcsym_right_table_zero_row_bound. bcf_lt_gap_bcsym_right_table_zero_row_bound + S (bcf_index_bcsym_right_table_zero_row) = S (n)) -> exists bcf_value_bcsym_right_table_zero_row. ((((exists bcf_height_bcsym_right_table_zero_row_entry. bcf_height_bcsym_right_table_zero_row_entry + S (bcf_value_bcsym_right_table_zero_row) = S ((S (bcf_index_bcsym_right_table_zero_row)) * bcf_row_scale_bcsym_right_table)) /\ exists bcf_quotient_bcsym_right_table_zero_row_entry. bcf_row_code_bcsym_right_table = bcf_quotient_bcsym_right_table_zero_row_entry * S ((S (bcf_index_bcsym_right_table_zero_row)) * bcf_row_scale_bcsym_right_table) + (bcf_value_bcsym_right_table_zero_row))) /\ ((bcf_index_bcsym_right_table_zero_row = 0 /\ bcf_value_bcsym_right_table_zero_row = 1) \/ exists bcf_predecessor_bcsym_right_table_zero_row. bcf_index_bcsym_right_table_zero_row = S bcf_predecessor_bcsym_right_table_zero_row /\ bcf_value_bcsym_right_table_zero_row = 0)))) \/ exists bcf_predecessor_bcsym_right_table bcf_previous_code_bcsym_right_table bcf_previous_scale_bcsym_right_table. bcf_row_index_bcsym_right_table = S bcf_predecessor_bcsym_right_table /\ ((((exists bcf_height_bcsym_right_table_decoded_previous_code. bcf_height_bcsym_right_table_decoded_previous_code + S (bcf_previous_code_bcsym_right_table) = S ((S (bcf_predecessor_bcsym_right_table)) * bcf_row_code_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_table_decoded_previous_code. bcf_row_code_code_bcsym_right = bcf_quotient_bcsym_right_table_decoded_previous_code * S ((S (bcf_predecessor_bcsym_right_table)) * bcf_row_code_scale_bcsym_right) + (bcf_previous_code_bcsym_right_table))) /\ ((((exists bcf_height_bcsym_right_table_decoded_previous_scale. bcf_height_bcsym_right_table_decoded_previous_scale + S (bcf_previous_scale_bcsym_right_table) = S ((S (bcf_predecessor_bcsym_right_table)) * bcf_row_scale_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_table_decoded_previous_scale. bcf_row_scale_code_bcsym_right = bcf_quotient_bcsym_right_table_decoded_previous_scale * S ((S (bcf_predecessor_bcsym_right_table)) * bcf_row_scale_scale_bcsym_right) + (bcf_previous_scale_bcsym_right_table))) /\ (forall bcf_index_bcsym_right_table_row_step. (exists bcf_lt_gap_bcsym_right_table_row_step_bound. bcf_lt_gap_bcsym_right_table_row_step_bound + S (bcf_index_bcsym_right_table_row_step) = S (n)) -> exists bcf_value_bcsym_right_table_row_step. ((((exists bcf_height_bcsym_right_table_row_step_entry. bcf_height_bcsym_right_table_row_step_entry + S (bcf_value_bcsym_right_table_row_step) = S ((S (bcf_index_bcsym_right_table_row_step)) * bcf_row_scale_bcsym_right_table)) /\ exists bcf_quotient_bcsym_right_table_row_step_entry. bcf_row_code_bcsym_right_table = bcf_quotient_bcsym_right_table_row_step_entry * S ((S (bcf_index_bcsym_right_table_row_step)) * bcf_row_scale_bcsym_right_table) + (bcf_value_bcsym_right_table_row_step))) /\ ((bcf_index_bcsym_right_table_row_step = 0 /\ bcf_value_bcsym_right_table_row_step = 1) \/ exists bcf_predecessor_bcsym_right_table_row_step bcf_left_bcsym_right_table_row_step bcf_right_bcsym_right_table_row_step. bcf_index_bcsym_right_table_row_step = S bcf_predecessor_bcsym_right_table_row_step /\ ((((exists bcf_height_bcsym_right_table_row_step_previous_left. bcf_height_bcsym_right_table_row_step_previous_left + S (bcf_left_bcsym_right_table_row_step) = S ((S (bcf_predecessor_bcsym_right_table_row_step)) * bcf_previous_scale_bcsym_right_table)) /\ exists bcf_quotient_bcsym_right_table_row_step_previous_left. bcf_previous_code_bcsym_right_table = bcf_quotient_bcsym_right_table_row_step_previous_left * S ((S (bcf_predecessor_bcsym_right_table_row_step)) * bcf_previous_scale_bcsym_right_table) + (bcf_left_bcsym_right_table_row_step))) /\ ((((exists bcf_height_bcsym_right_table_row_step_previous_right. bcf_height_bcsym_right_table_row_step_previous_right + S (bcf_right_bcsym_right_table_row_step) = S ((S (S (bcf_predecessor_bcsym_right_table_row_step))) * bcf_previous_scale_bcsym_right_table)) /\ exists bcf_quotient_bcsym_right_table_row_step_previous_right. bcf_previous_code_bcsym_right_table = bcf_quotient_bcsym_right_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcsym_right_table_row_step))) * bcf_previous_scale_bcsym_right_table) + (bcf_right_bcsym_right_table_row_step))) /\ bcf_value_bcsym_right_table_row_step = bcf_left_bcsym_right_table_row_step + bcf_right_bcsym_right_table_row_step))))))))))) /\ ((((exists bcf_height_bcsym_right_decoded_row_code. bcf_height_bcsym_right_decoded_row_code + S (bcf_row_code_bcsym_right) = S ((S (n)) * bcf_row_code_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_decoded_row_code. bcf_row_code_code_bcsym_right = bcf_quotient_bcsym_right_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcsym_right) + (bcf_row_code_bcsym_right))) /\ ((((exists bcf_height_bcsym_right_decoded_row_scale. bcf_height_bcsym_right_decoded_row_scale + S (bcf_row_scale_bcsym_right) = S ((S (n)) * bcf_row_scale_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_decoded_row_scale. bcf_row_scale_code_bcsym_right = bcf_quotient_bcsym_right_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcsym_right) + (bcf_row_scale_bcsym_right))) /\ (((exists bcf_height_bcsym_right_decoded_value. bcf_height_bcsym_right_decoded_value + S (y) = S ((S (j)) * bcf_row_scale_bcsym_right)) /\ exists bcf_quotient_bcsym_right_decoded_value. bcf_row_code_bcsym_right = bcf_quotient_bcsym_right_decoded_value * S ((S (j)) * bcf_row_scale_bcsym_right) + (y))))))))) -> x = yProof neighborhood
Direct theorem prerequisites
BT0000 zero_add BT0001 add_succ_left BT0002 add_comm BT00T8 choose_exists BT00TE choose_zero BT00TK choose_self_of_eq BT00TJ choose_succ_succDirect theorem dependents
Definition-aware tactic body
Only local propositions introduced by have or suffices are compacted. Every changed line has an exact-AST conservative-expansion receipt; the kernel still receives the immutable original tactic script.
Read the argument
Proof checkpoints
This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.
Named ingredients (7)
01Induction on nL1–1
Split the argument into the base and successor obligations. The induction hypothesis is available only in the successor branch.
- L1
induction n
02Induction on kL2–2
Split the argument into the base and successor obligations. The induction hypothesis is available only in the successor branch.
- L2
induction k
03Induction on jL3–8
04Establish hxL9–13
05Establish hyL14–23
06Fix variables and assumptionsL24–27
07Use earlier factsL28–28
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L28
specialize zero_add (S j)
08Calculate and transport equalitiesL29–29
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L29
rewrite zero_add at hsum
09Separate the logical casesL30–30
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L30
exfalso
10Use earlier factsL31–32
11Fix variables and assumptionsL33–38
12Use earlier factsL39–40
13Calculate and transport equalitiesL41–41
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L41
rewrite add_succ_left at hsum
14Separate the logical casesL42–42
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L42
exfalso
15Use earlier factsL43–44
16Induction on kL45–51
17Establish hxL52–56
18Establish hjL57–61
19Establish hyL62–71
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply choose self of eq.
20Use earlier factsL72–72
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L72
exact hy
21Induction on jL73–78
22Establish hkL79–81
23Establish hxL82–88
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply choose self of eq.
24Establish hyL89–98
25Fix variables and assumptionsL99–102
26Establish ha_existsL103–106
Establish this local claim before using it. It is not an additional assumption.
- L103
have ha_exists : ∃ a. Choose(n,k,a)Definitions: Choose(n,k,a)Original native command in the exact edition - L104
specialize choose_exists n - L105
specialize choose_exists k - L106
exact choose_exists
27Separate the logical casesL107–107
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L107
cases ha_exists
28Establish hb_existsL108–111
Establish this local claim before using it. It is not an additional assumption.
- L108
have hb_exists : ∃ b. Choose(n,S k,b)Definitions: Choose(n,S k,b)Original native command in the exact edition - L109
specialize choose_exists n - L110
specialize choose_exists (S k) - L111
exact choose_exists
29Separate the logical casesL112–112
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L112
cases hb_exists
30Establish hc_existsL113–116
Establish this local claim before using it. It is not an additional assumption.
- L113
have hc_exists : ∃ c. Choose(n,j,c)Definitions: Choose(n,j,c)Original native command in the exact edition - L114
specialize choose_exists n - L115
specialize choose_exists j - L116
exact choose_exists
31Separate the logical casesL117–117
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L117
cases hc_exists
32Establish hd_existsL118–121
Establish this local claim before using it. It is not an additional assumption.
- L118
have hd_exists : ∃ d. Choose(n,S j,d)Definitions: Choose(n,S j,d)Original native command in the exact edition - L119
specialize choose_exists n - L120
specialize choose_exists (S j) - L121
exact choose_exists
33Separate the logical casesL122–122
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L122
cases hd_exists
34Establish hleft_complementL123–128
35Establish hright_complementL129–135
36Establish hx_sumL136–145
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply choose succ succ.
37Establish hy_sumL146–155
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply choose succ succ.
38Establish hfirstL156–164
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
39Establish hsecondL165–174
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
40Calculate and transport equalitiesL175–177
41Use earlier factsL178–178
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L178
apply add_comm
Original defined command ledger · 178 lines
- 0001
induction n - 0002
induction k - 0003
induction j - 0004
intro x - 0005
intro y - 0006
intro hsum - 0007
intro hleft - 0008
intro hright - 0009
have hx : x = 1 - 0010
specialize choose_zero 0 - 0011
specialize choose_zero x - 0012
apply choose_zero - 0013
exact hleft - 0014
have hy : y = 1 - 0015
specialize choose_zero 0 - 0016
specialize choose_zero y - 0017
apply choose_zero - 0018
exact hright - 0019
trans 1 - 0020
exact hx - 0021
symm - 0022
exact hy - 0023
intro x - 0024
intro y - 0025
intro hsum - 0026
intro hleft - 0027
intro hright - 0028
specialize zero_add (S j) - 0029
rewrite zero_add at hsum - 0030
exfalso - 0031
apply PA1 - 0032
exact hsum - 0033
intro j - 0034
intro x - 0035
intro y - 0036
intro hsum - 0037
intro hleft - 0038
intro hright - 0039
specialize add_succ_left k - 0040
specialize add_succ_left j - 0041
rewrite add_succ_left at hsum - 0042
exfalso - 0043
apply PA1 - 0044
exact hsum - 0045
induction k - 0046
intro j - 0047
intro x - 0048
intro y - 0049
intro hsum - 0050
intro hleft - 0051
intro hright - 0052
have hx : x = 1 - 0053
specialize choose_zero (S n) - 0054
specialize choose_zero x - 0055
apply choose_zero - 0056
exact hleft - 0057
have hj : j = S n - 0058
trans 0 + j - 0059
symm - 0060
apply zero_add - 0061
exact hsum - 0062
have hy : y = 1 - 0063
specialize choose_self_of_eq (S n) - 0064
specialize choose_self_of_eq j - 0065
specialize choose_self_of_eq y - 0066
apply choose_self_of_eq - 0067
exact hj - 0068
exact hright - 0069
trans 1 - 0070
exact hx - 0071
symm - 0072
exact hy - 0073
induction j - 0074
intro x - 0075
intro y - 0076
intro hsum - 0077
intro hleft - 0078
intro hright - 0079
have hk : S k = S n - 0080
rewrite PA3 at hsum - 0081
exact hsum - 0082
have hx : x = 1 - 0083
specialize choose_self_of_eq (S n) - 0084
specialize choose_self_of_eq (S k) - 0085
specialize choose_self_of_eq x - 0086
apply choose_self_of_eq - 0087
exact hk - 0088
exact hleft - 0089
have hy : y = 1 - 0090
specialize choose_zero (S n) - 0091
specialize choose_zero y - 0092
apply choose_zero - 0093
exact hright - 0094
trans 1 - 0095
exact hx - 0096
symm - 0097
exact hy - 0098
intro x - 0099
intro y - 0100
intro hsum - 0101
intro hleft - 0102
intro hright - 0103
have ha_exists : ∃ a. Choose(n,k,a)Exact native replay line
have ha_exists : exists a. (((exists bcf_lt_gap_bcs_previous_left_out_of_range. bcf_lt_gap_bcs_previous_left_out_of_range + S (n) = k) /\ a = 0) \/ ((exists bcf_le_gap_bcs_previous_left_in_range. bcf_le_gap_bcs_previous_left_in_range + (k) = n) /\ (exists bcf_row_code_code_bcs_previous_left bcf_row_code_scale_bcs_previous_left bcf_row_scale_code_bcs_previous_left bcf_row_scale_scale_bcs_previous_left bcf_row_code_bcs_previous_left bcf_row_scale_bcs_previous_left. ((forall bcf_row_index_bcs_previous_left_table. (exists bcf_lt_gap_bcs_previous_left_table_row_bound. bcf_lt_gap_bcs_previous_left_table_row_bound + S (bcf_row_index_bcs_previous_left_table) = S (n)) -> exists bcf_row_code_bcs_previous_left_table bcf_row_scale_bcs_previous_left_table. ((((exists bcf_height_bcs_previous_left_table_decoded_row_code. bcf_height_bcs_previous_left_table_decoded_row_code + S (bcf_row_code_bcs_previous_left_table) = S ((S (bcf_row_index_bcs_previous_left_table)) * bcf_row_code_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_table_decoded_row_code. bcf_row_code_code_bcs_previous_left = bcf_quotient_bcs_previous_left_table_decoded_row_code * S ((S (bcf_row_index_bcs_previous_left_table)) * bcf_row_code_scale_bcs_previous_left) + (bcf_row_code_bcs_previous_left_table))) /\ ((((exists bcf_height_bcs_previous_left_table_decoded_row_scale. bcf_height_bcs_previous_left_table_decoded_row_scale + S (bcf_row_scale_bcs_previous_left_table) = S ((S (bcf_row_index_bcs_previous_left_table)) * bcf_row_scale_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_table_decoded_row_scale. bcf_row_scale_code_bcs_previous_left = bcf_quotient_bcs_previous_left_table_decoded_row_scale * S ((S (bcf_row_index_bcs_previous_left_table)) * bcf_row_scale_scale_bcs_previous_left) + (bcf_row_scale_bcs_previous_left_table))) /\ ((bcf_row_index_bcs_previous_left_table = 0 /\ (forall bcf_index_bcs_previous_left_table_zero_row. (exists bcf_lt_gap_bcs_previous_left_table_zero_row_bound. bcf_lt_gap_bcs_previous_left_table_zero_row_bound + S (bcf_index_bcs_previous_left_table_zero_row) = S (n)) -> exists bcf_value_bcs_previous_left_table_zero_row. ((((exists bcf_height_bcs_previous_left_table_zero_row_entry. bcf_height_bcs_previous_left_table_zero_row_entry + S (bcf_value_bcs_previous_left_table_zero_row) = S ((S (bcf_index_bcs_previous_left_table_zero_row)) * bcf_row_scale_bcs_previous_left_table)) /\ exists bcf_quotient_bcs_previous_left_table_zero_row_entry. bcf_row_code_bcs_previous_left_table = bcf_quotient_bcs_previous_left_table_zero_row_entry * S ((S (bcf_index_bcs_previous_left_table_zero_row)) * bcf_row_scale_bcs_previous_left_table) + (bcf_value_bcs_previous_left_table_zero_row))) /\ ((bcf_index_bcs_previous_left_table_zero_row = 0 /\ bcf_value_bcs_previous_left_table_zero_row = 1) \/ exists bcf_predecessor_bcs_previous_left_table_zero_row. bcf_index_bcs_previous_left_table_zero_row = S bcf_predecessor_bcs_previous_left_table_zero_row /\ bcf_value_bcs_previous_left_table_zero_row = 0)))) \/ exists bcf_predecessor_bcs_previous_left_table bcf_previous_code_bcs_previous_left_table bcf_previous_scale_bcs_previous_left_table. bcf_row_index_bcs_previous_left_table = S bcf_predecessor_bcs_previous_left_table /\ ((((exists bcf_height_bcs_previous_left_table_decoded_previous_code. bcf_height_bcs_previous_left_table_decoded_previous_code + S (bcf_previous_code_bcs_previous_left_table) = S ((S (bcf_predecessor_bcs_previous_left_table)) * bcf_row_code_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_table_decoded_previous_code. bcf_row_code_code_bcs_previous_left = bcf_quotient_bcs_previous_left_table_decoded_previous_code * S ((S (bcf_predecessor_bcs_previous_left_table)) * bcf_row_code_scale_bcs_previous_left) + (bcf_previous_code_bcs_previous_left_table))) /\ ((((exists bcf_height_bcs_previous_left_table_decoded_previous_scale. bcf_height_bcs_previous_left_table_decoded_previous_scale + S (bcf_previous_scale_bcs_previous_left_table) = S ((S (bcf_predecessor_bcs_previous_left_table)) * bcf_row_scale_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_table_decoded_previous_scale. bcf_row_scale_code_bcs_previous_left = bcf_quotient_bcs_previous_left_table_decoded_previous_scale * S ((S (bcf_predecessor_bcs_previous_left_table)) * bcf_row_scale_scale_bcs_previous_left) + (bcf_previous_scale_bcs_previous_left_table))) /\ (forall bcf_index_bcs_previous_left_table_row_step. (exists bcf_lt_gap_bcs_previous_left_table_row_step_bound. bcf_lt_gap_bcs_previous_left_table_row_step_bound + S (bcf_index_bcs_previous_left_table_row_step) = S (n)) -> exists bcf_value_bcs_previous_left_table_row_step. ((((exists bcf_height_bcs_previous_left_table_row_step_entry. bcf_height_bcs_previous_left_table_row_step_entry + S (bcf_value_bcs_previous_left_table_row_step) = S ((S (bcf_index_bcs_previous_left_table_row_step)) * bcf_row_scale_bcs_previous_left_table)) /\ exists bcf_quotient_bcs_previous_left_table_row_step_entry. bcf_row_code_bcs_previous_left_table = bcf_quotient_bcs_previous_left_table_row_step_entry * S ((S (bcf_index_bcs_previous_left_table_row_step)) * bcf_row_scale_bcs_previous_left_table) + (bcf_value_bcs_previous_left_table_row_step))) /\ ((bcf_index_bcs_previous_left_table_row_step = 0 /\ bcf_value_bcs_previous_left_table_row_step = 1) \/ exists bcf_predecessor_bcs_previous_left_table_row_step bcf_left_bcs_previous_left_table_row_step bcf_right_bcs_previous_left_table_row_step. bcf_index_bcs_previous_left_table_row_step = S bcf_predecessor_bcs_previous_left_table_row_step /\ ((((exists bcf_height_bcs_previous_left_table_row_step_previous_left. bcf_height_bcs_previous_left_table_row_step_previous_left + S (bcf_left_bcs_previous_left_table_row_step) = S ((S (bcf_predecessor_bcs_previous_left_table_row_step)) * bcf_previous_scale_bcs_previous_left_table)) /\ exists bcf_quotient_bcs_previous_left_table_row_step_previous_left. bcf_previous_code_bcs_previous_left_table = bcf_quotient_bcs_previous_left_table_row_step_previous_left * S ((S (bcf_predecessor_bcs_previous_left_table_row_step)) * bcf_previous_scale_bcs_previous_left_table) + (bcf_left_bcs_previous_left_table_row_step))) /\ ((((exists bcf_height_bcs_previous_left_table_row_step_previous_right. bcf_height_bcs_previous_left_table_row_step_previous_right + S (bcf_right_bcs_previous_left_table_row_step) = S ((S (S (bcf_predecessor_bcs_previous_left_table_row_step))) * bcf_previous_scale_bcs_previous_left_table)) /\ exists bcf_quotient_bcs_previous_left_table_row_step_previous_right. bcf_previous_code_bcs_previous_left_table = bcf_quotient_bcs_previous_left_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcs_previous_left_table_row_step))) * bcf_previous_scale_bcs_previous_left_table) + (bcf_right_bcs_previous_left_table_row_step))) /\ bcf_value_bcs_previous_left_table_row_step = bcf_left_bcs_previous_left_table_row_step + bcf_right_bcs_previous_left_table_row_step))))))))))) /\ ((((exists bcf_height_bcs_previous_left_decoded_row_code. bcf_height_bcs_previous_left_decoded_row_code + S (bcf_row_code_bcs_previous_left) = S ((S (n)) * bcf_row_code_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_decoded_row_code. bcf_row_code_code_bcs_previous_left = bcf_quotient_bcs_previous_left_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcs_previous_left) + (bcf_row_code_bcs_previous_left))) /\ ((((exists bcf_height_bcs_previous_left_decoded_row_scale. bcf_height_bcs_previous_left_decoded_row_scale + S (bcf_row_scale_bcs_previous_left) = S ((S (n)) * bcf_row_scale_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_decoded_row_scale. bcf_row_scale_code_bcs_previous_left = bcf_quotient_bcs_previous_left_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcs_previous_left) + (bcf_row_scale_bcs_previous_left))) /\ (((exists bcf_height_bcs_previous_left_decoded_value. bcf_height_bcs_previous_left_decoded_value + S (a) = S ((S (k)) * bcf_row_scale_bcs_previous_left)) /\ exists bcf_quotient_bcs_previous_left_decoded_value. bcf_row_code_bcs_previous_left = bcf_quotient_bcs_previous_left_decoded_value * S ((S (k)) * bcf_row_scale_bcs_previous_left) + (a))))))))) - 0104
specialize choose_exists n - 0105
specialize choose_exists k - 0106
exact choose_exists - 0107
cases ha_exists - 0108
have hb_exists : ∃ b. Choose(n,S k,b)Exact native replay line
have hb_exists : exists b. (((exists bcf_lt_gap_bcs_current_left_out_of_range. bcf_lt_gap_bcs_current_left_out_of_range + S (n) = S k) /\ b = 0) \/ ((exists bcf_le_gap_bcs_current_left_in_range. bcf_le_gap_bcs_current_left_in_range + (S k) = n) /\ (exists bcf_row_code_code_bcs_current_left bcf_row_code_scale_bcs_current_left bcf_row_scale_code_bcs_current_left bcf_row_scale_scale_bcs_current_left bcf_row_code_bcs_current_left bcf_row_scale_bcs_current_left. ((forall bcf_row_index_bcs_current_left_table. (exists bcf_lt_gap_bcs_current_left_table_row_bound. bcf_lt_gap_bcs_current_left_table_row_bound + S (bcf_row_index_bcs_current_left_table) = S (n)) -> exists bcf_row_code_bcs_current_left_table bcf_row_scale_bcs_current_left_table. ((((exists bcf_height_bcs_current_left_table_decoded_row_code. bcf_height_bcs_current_left_table_decoded_row_code + S (bcf_row_code_bcs_current_left_table) = S ((S (bcf_row_index_bcs_current_left_table)) * bcf_row_code_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_table_decoded_row_code. bcf_row_code_code_bcs_current_left = bcf_quotient_bcs_current_left_table_decoded_row_code * S ((S (bcf_row_index_bcs_current_left_table)) * bcf_row_code_scale_bcs_current_left) + (bcf_row_code_bcs_current_left_table))) /\ ((((exists bcf_height_bcs_current_left_table_decoded_row_scale. bcf_height_bcs_current_left_table_decoded_row_scale + S (bcf_row_scale_bcs_current_left_table) = S ((S (bcf_row_index_bcs_current_left_table)) * bcf_row_scale_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_table_decoded_row_scale. bcf_row_scale_code_bcs_current_left = bcf_quotient_bcs_current_left_table_decoded_row_scale * S ((S (bcf_row_index_bcs_current_left_table)) * bcf_row_scale_scale_bcs_current_left) + (bcf_row_scale_bcs_current_left_table))) /\ ((bcf_row_index_bcs_current_left_table = 0 /\ (forall bcf_index_bcs_current_left_table_zero_row. (exists bcf_lt_gap_bcs_current_left_table_zero_row_bound. bcf_lt_gap_bcs_current_left_table_zero_row_bound + S (bcf_index_bcs_current_left_table_zero_row) = S (n)) -> exists bcf_value_bcs_current_left_table_zero_row. ((((exists bcf_height_bcs_current_left_table_zero_row_entry. bcf_height_bcs_current_left_table_zero_row_entry + S (bcf_value_bcs_current_left_table_zero_row) = S ((S (bcf_index_bcs_current_left_table_zero_row)) * bcf_row_scale_bcs_current_left_table)) /\ exists bcf_quotient_bcs_current_left_table_zero_row_entry. bcf_row_code_bcs_current_left_table = bcf_quotient_bcs_current_left_table_zero_row_entry * S ((S (bcf_index_bcs_current_left_table_zero_row)) * bcf_row_scale_bcs_current_left_table) + (bcf_value_bcs_current_left_table_zero_row))) /\ ((bcf_index_bcs_current_left_table_zero_row = 0 /\ bcf_value_bcs_current_left_table_zero_row = 1) \/ exists bcf_predecessor_bcs_current_left_table_zero_row. bcf_index_bcs_current_left_table_zero_row = S bcf_predecessor_bcs_current_left_table_zero_row /\ bcf_value_bcs_current_left_table_zero_row = 0)))) \/ exists bcf_predecessor_bcs_current_left_table bcf_previous_code_bcs_current_left_table bcf_previous_scale_bcs_current_left_table. bcf_row_index_bcs_current_left_table = S bcf_predecessor_bcs_current_left_table /\ ((((exists bcf_height_bcs_current_left_table_decoded_previous_code. bcf_height_bcs_current_left_table_decoded_previous_code + S (bcf_previous_code_bcs_current_left_table) = S ((S (bcf_predecessor_bcs_current_left_table)) * bcf_row_code_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_table_decoded_previous_code. bcf_row_code_code_bcs_current_left = bcf_quotient_bcs_current_left_table_decoded_previous_code * S ((S (bcf_predecessor_bcs_current_left_table)) * bcf_row_code_scale_bcs_current_left) + (bcf_previous_code_bcs_current_left_table))) /\ ((((exists bcf_height_bcs_current_left_table_decoded_previous_scale. bcf_height_bcs_current_left_table_decoded_previous_scale + S (bcf_previous_scale_bcs_current_left_table) = S ((S (bcf_predecessor_bcs_current_left_table)) * bcf_row_scale_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_table_decoded_previous_scale. bcf_row_scale_code_bcs_current_left = bcf_quotient_bcs_current_left_table_decoded_previous_scale * S ((S (bcf_predecessor_bcs_current_left_table)) * bcf_row_scale_scale_bcs_current_left) + (bcf_previous_scale_bcs_current_left_table))) /\ (forall bcf_index_bcs_current_left_table_row_step. (exists bcf_lt_gap_bcs_current_left_table_row_step_bound. bcf_lt_gap_bcs_current_left_table_row_step_bound + S (bcf_index_bcs_current_left_table_row_step) = S (n)) -> exists bcf_value_bcs_current_left_table_row_step. ((((exists bcf_height_bcs_current_left_table_row_step_entry. bcf_height_bcs_current_left_table_row_step_entry + S (bcf_value_bcs_current_left_table_row_step) = S ((S (bcf_index_bcs_current_left_table_row_step)) * bcf_row_scale_bcs_current_left_table)) /\ exists bcf_quotient_bcs_current_left_table_row_step_entry. bcf_row_code_bcs_current_left_table = bcf_quotient_bcs_current_left_table_row_step_entry * S ((S (bcf_index_bcs_current_left_table_row_step)) * bcf_row_scale_bcs_current_left_table) + (bcf_value_bcs_current_left_table_row_step))) /\ ((bcf_index_bcs_current_left_table_row_step = 0 /\ bcf_value_bcs_current_left_table_row_step = 1) \/ exists bcf_predecessor_bcs_current_left_table_row_step bcf_left_bcs_current_left_table_row_step bcf_right_bcs_current_left_table_row_step. bcf_index_bcs_current_left_table_row_step = S bcf_predecessor_bcs_current_left_table_row_step /\ ((((exists bcf_height_bcs_current_left_table_row_step_previous_left. bcf_height_bcs_current_left_table_row_step_previous_left + S (bcf_left_bcs_current_left_table_row_step) = S ((S (bcf_predecessor_bcs_current_left_table_row_step)) * bcf_previous_scale_bcs_current_left_table)) /\ exists bcf_quotient_bcs_current_left_table_row_step_previous_left. bcf_previous_code_bcs_current_left_table = bcf_quotient_bcs_current_left_table_row_step_previous_left * S ((S (bcf_predecessor_bcs_current_left_table_row_step)) * bcf_previous_scale_bcs_current_left_table) + (bcf_left_bcs_current_left_table_row_step))) /\ ((((exists bcf_height_bcs_current_left_table_row_step_previous_right. bcf_height_bcs_current_left_table_row_step_previous_right + S (bcf_right_bcs_current_left_table_row_step) = S ((S (S (bcf_predecessor_bcs_current_left_table_row_step))) * bcf_previous_scale_bcs_current_left_table)) /\ exists bcf_quotient_bcs_current_left_table_row_step_previous_right. bcf_previous_code_bcs_current_left_table = bcf_quotient_bcs_current_left_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcs_current_left_table_row_step))) * bcf_previous_scale_bcs_current_left_table) + (bcf_right_bcs_current_left_table_row_step))) /\ bcf_value_bcs_current_left_table_row_step = bcf_left_bcs_current_left_table_row_step + bcf_right_bcs_current_left_table_row_step))))))))))) /\ ((((exists bcf_height_bcs_current_left_decoded_row_code. bcf_height_bcs_current_left_decoded_row_code + S (bcf_row_code_bcs_current_left) = S ((S (n)) * bcf_row_code_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_decoded_row_code. bcf_row_code_code_bcs_current_left = bcf_quotient_bcs_current_left_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcs_current_left) + (bcf_row_code_bcs_current_left))) /\ ((((exists bcf_height_bcs_current_left_decoded_row_scale. bcf_height_bcs_current_left_decoded_row_scale + S (bcf_row_scale_bcs_current_left) = S ((S (n)) * bcf_row_scale_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_decoded_row_scale. bcf_row_scale_code_bcs_current_left = bcf_quotient_bcs_current_left_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcs_current_left) + (bcf_row_scale_bcs_current_left))) /\ (((exists bcf_height_bcs_current_left_decoded_value. bcf_height_bcs_current_left_decoded_value + S (b) = S ((S (S k)) * bcf_row_scale_bcs_current_left)) /\ exists bcf_quotient_bcs_current_left_decoded_value. bcf_row_code_bcs_current_left = bcf_quotient_bcs_current_left_decoded_value * S ((S (S k)) * bcf_row_scale_bcs_current_left) + (b))))))))) - 0109
specialize choose_exists n - 0110
specialize choose_exists (S k) - 0111
exact choose_exists - 0112
cases hb_exists - 0113
have hc_exists : ∃ c. Choose(n,j,c)Exact native replay line
have hc_exists : exists c. (((exists bcf_lt_gap_bcs_previous_right_out_of_range. bcf_lt_gap_bcs_previous_right_out_of_range + S (n) = j) /\ c = 0) \/ ((exists bcf_le_gap_bcs_previous_right_in_range. bcf_le_gap_bcs_previous_right_in_range + (j) = n) /\ (exists bcf_row_code_code_bcs_previous_right bcf_row_code_scale_bcs_previous_right bcf_row_scale_code_bcs_previous_right bcf_row_scale_scale_bcs_previous_right bcf_row_code_bcs_previous_right bcf_row_scale_bcs_previous_right. ((forall bcf_row_index_bcs_previous_right_table. (exists bcf_lt_gap_bcs_previous_right_table_row_bound. bcf_lt_gap_bcs_previous_right_table_row_bound + S (bcf_row_index_bcs_previous_right_table) = S (n)) -> exists bcf_row_code_bcs_previous_right_table bcf_row_scale_bcs_previous_right_table. ((((exists bcf_height_bcs_previous_right_table_decoded_row_code. bcf_height_bcs_previous_right_table_decoded_row_code + S (bcf_row_code_bcs_previous_right_table) = S ((S (bcf_row_index_bcs_previous_right_table)) * bcf_row_code_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_table_decoded_row_code. bcf_row_code_code_bcs_previous_right = bcf_quotient_bcs_previous_right_table_decoded_row_code * S ((S (bcf_row_index_bcs_previous_right_table)) * bcf_row_code_scale_bcs_previous_right) + (bcf_row_code_bcs_previous_right_table))) /\ ((((exists bcf_height_bcs_previous_right_table_decoded_row_scale. bcf_height_bcs_previous_right_table_decoded_row_scale + S (bcf_row_scale_bcs_previous_right_table) = S ((S (bcf_row_index_bcs_previous_right_table)) * bcf_row_scale_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_table_decoded_row_scale. bcf_row_scale_code_bcs_previous_right = bcf_quotient_bcs_previous_right_table_decoded_row_scale * S ((S (bcf_row_index_bcs_previous_right_table)) * bcf_row_scale_scale_bcs_previous_right) + (bcf_row_scale_bcs_previous_right_table))) /\ ((bcf_row_index_bcs_previous_right_table = 0 /\ (forall bcf_index_bcs_previous_right_table_zero_row. (exists bcf_lt_gap_bcs_previous_right_table_zero_row_bound. bcf_lt_gap_bcs_previous_right_table_zero_row_bound + S (bcf_index_bcs_previous_right_table_zero_row) = S (n)) -> exists bcf_value_bcs_previous_right_table_zero_row. ((((exists bcf_height_bcs_previous_right_table_zero_row_entry. bcf_height_bcs_previous_right_table_zero_row_entry + S (bcf_value_bcs_previous_right_table_zero_row) = S ((S (bcf_index_bcs_previous_right_table_zero_row)) * bcf_row_scale_bcs_previous_right_table)) /\ exists bcf_quotient_bcs_previous_right_table_zero_row_entry. bcf_row_code_bcs_previous_right_table = bcf_quotient_bcs_previous_right_table_zero_row_entry * S ((S (bcf_index_bcs_previous_right_table_zero_row)) * bcf_row_scale_bcs_previous_right_table) + (bcf_value_bcs_previous_right_table_zero_row))) /\ ((bcf_index_bcs_previous_right_table_zero_row = 0 /\ bcf_value_bcs_previous_right_table_zero_row = 1) \/ exists bcf_predecessor_bcs_previous_right_table_zero_row. bcf_index_bcs_previous_right_table_zero_row = S bcf_predecessor_bcs_previous_right_table_zero_row /\ bcf_value_bcs_previous_right_table_zero_row = 0)))) \/ exists bcf_predecessor_bcs_previous_right_table bcf_previous_code_bcs_previous_right_table bcf_previous_scale_bcs_previous_right_table. bcf_row_index_bcs_previous_right_table = S bcf_predecessor_bcs_previous_right_table /\ ((((exists bcf_height_bcs_previous_right_table_decoded_previous_code. bcf_height_bcs_previous_right_table_decoded_previous_code + S (bcf_previous_code_bcs_previous_right_table) = S ((S (bcf_predecessor_bcs_previous_right_table)) * bcf_row_code_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_table_decoded_previous_code. bcf_row_code_code_bcs_previous_right = bcf_quotient_bcs_previous_right_table_decoded_previous_code * S ((S (bcf_predecessor_bcs_previous_right_table)) * bcf_row_code_scale_bcs_previous_right) + (bcf_previous_code_bcs_previous_right_table))) /\ ((((exists bcf_height_bcs_previous_right_table_decoded_previous_scale. bcf_height_bcs_previous_right_table_decoded_previous_scale + S (bcf_previous_scale_bcs_previous_right_table) = S ((S (bcf_predecessor_bcs_previous_right_table)) * bcf_row_scale_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_table_decoded_previous_scale. bcf_row_scale_code_bcs_previous_right = bcf_quotient_bcs_previous_right_table_decoded_previous_scale * S ((S (bcf_predecessor_bcs_previous_right_table)) * bcf_row_scale_scale_bcs_previous_right) + (bcf_previous_scale_bcs_previous_right_table))) /\ (forall bcf_index_bcs_previous_right_table_row_step. (exists bcf_lt_gap_bcs_previous_right_table_row_step_bound. bcf_lt_gap_bcs_previous_right_table_row_step_bound + S (bcf_index_bcs_previous_right_table_row_step) = S (n)) -> exists bcf_value_bcs_previous_right_table_row_step. ((((exists bcf_height_bcs_previous_right_table_row_step_entry. bcf_height_bcs_previous_right_table_row_step_entry + S (bcf_value_bcs_previous_right_table_row_step) = S ((S (bcf_index_bcs_previous_right_table_row_step)) * bcf_row_scale_bcs_previous_right_table)) /\ exists bcf_quotient_bcs_previous_right_table_row_step_entry. bcf_row_code_bcs_previous_right_table = bcf_quotient_bcs_previous_right_table_row_step_entry * S ((S (bcf_index_bcs_previous_right_table_row_step)) * bcf_row_scale_bcs_previous_right_table) + (bcf_value_bcs_previous_right_table_row_step))) /\ ((bcf_index_bcs_previous_right_table_row_step = 0 /\ bcf_value_bcs_previous_right_table_row_step = 1) \/ exists bcf_predecessor_bcs_previous_right_table_row_step bcf_left_bcs_previous_right_table_row_step bcf_right_bcs_previous_right_table_row_step. bcf_index_bcs_previous_right_table_row_step = S bcf_predecessor_bcs_previous_right_table_row_step /\ ((((exists bcf_height_bcs_previous_right_table_row_step_previous_left. bcf_height_bcs_previous_right_table_row_step_previous_left + S (bcf_left_bcs_previous_right_table_row_step) = S ((S (bcf_predecessor_bcs_previous_right_table_row_step)) * bcf_previous_scale_bcs_previous_right_table)) /\ exists bcf_quotient_bcs_previous_right_table_row_step_previous_left. bcf_previous_code_bcs_previous_right_table = bcf_quotient_bcs_previous_right_table_row_step_previous_left * S ((S (bcf_predecessor_bcs_previous_right_table_row_step)) * bcf_previous_scale_bcs_previous_right_table) + (bcf_left_bcs_previous_right_table_row_step))) /\ ((((exists bcf_height_bcs_previous_right_table_row_step_previous_right. bcf_height_bcs_previous_right_table_row_step_previous_right + S (bcf_right_bcs_previous_right_table_row_step) = S ((S (S (bcf_predecessor_bcs_previous_right_table_row_step))) * bcf_previous_scale_bcs_previous_right_table)) /\ exists bcf_quotient_bcs_previous_right_table_row_step_previous_right. bcf_previous_code_bcs_previous_right_table = bcf_quotient_bcs_previous_right_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcs_previous_right_table_row_step))) * bcf_previous_scale_bcs_previous_right_table) + (bcf_right_bcs_previous_right_table_row_step))) /\ bcf_value_bcs_previous_right_table_row_step = bcf_left_bcs_previous_right_table_row_step + bcf_right_bcs_previous_right_table_row_step))))))))))) /\ ((((exists bcf_height_bcs_previous_right_decoded_row_code. bcf_height_bcs_previous_right_decoded_row_code + S (bcf_row_code_bcs_previous_right) = S ((S (n)) * bcf_row_code_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_decoded_row_code. bcf_row_code_code_bcs_previous_right = bcf_quotient_bcs_previous_right_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcs_previous_right) + (bcf_row_code_bcs_previous_right))) /\ ((((exists bcf_height_bcs_previous_right_decoded_row_scale. bcf_height_bcs_previous_right_decoded_row_scale + S (bcf_row_scale_bcs_previous_right) = S ((S (n)) * bcf_row_scale_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_decoded_row_scale. bcf_row_scale_code_bcs_previous_right = bcf_quotient_bcs_previous_right_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcs_previous_right) + (bcf_row_scale_bcs_previous_right))) /\ (((exists bcf_height_bcs_previous_right_decoded_value. bcf_height_bcs_previous_right_decoded_value + S (c) = S ((S (j)) * bcf_row_scale_bcs_previous_right)) /\ exists bcf_quotient_bcs_previous_right_decoded_value. bcf_row_code_bcs_previous_right = bcf_quotient_bcs_previous_right_decoded_value * S ((S (j)) * bcf_row_scale_bcs_previous_right) + (c))))))))) - 0114
specialize choose_exists n - 0115
specialize choose_exists j - 0116
exact choose_exists - 0117
cases hc_exists - 0118
have hd_exists : ∃ d. Choose(n,S j,d)Exact native replay line
have hd_exists : exists d. (((exists bcf_lt_gap_bcs_current_right_out_of_range. bcf_lt_gap_bcs_current_right_out_of_range + S (n) = S j) /\ d = 0) \/ ((exists bcf_le_gap_bcs_current_right_in_range. bcf_le_gap_bcs_current_right_in_range + (S j) = n) /\ (exists bcf_row_code_code_bcs_current_right bcf_row_code_scale_bcs_current_right bcf_row_scale_code_bcs_current_right bcf_row_scale_scale_bcs_current_right bcf_row_code_bcs_current_right bcf_row_scale_bcs_current_right. ((forall bcf_row_index_bcs_current_right_table. (exists bcf_lt_gap_bcs_current_right_table_row_bound. bcf_lt_gap_bcs_current_right_table_row_bound + S (bcf_row_index_bcs_current_right_table) = S (n)) -> exists bcf_row_code_bcs_current_right_table bcf_row_scale_bcs_current_right_table. ((((exists bcf_height_bcs_current_right_table_decoded_row_code. bcf_height_bcs_current_right_table_decoded_row_code + S (bcf_row_code_bcs_current_right_table) = S ((S (bcf_row_index_bcs_current_right_table)) * bcf_row_code_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_table_decoded_row_code. bcf_row_code_code_bcs_current_right = bcf_quotient_bcs_current_right_table_decoded_row_code * S ((S (bcf_row_index_bcs_current_right_table)) * bcf_row_code_scale_bcs_current_right) + (bcf_row_code_bcs_current_right_table))) /\ ((((exists bcf_height_bcs_current_right_table_decoded_row_scale. bcf_height_bcs_current_right_table_decoded_row_scale + S (bcf_row_scale_bcs_current_right_table) = S ((S (bcf_row_index_bcs_current_right_table)) * bcf_row_scale_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_table_decoded_row_scale. bcf_row_scale_code_bcs_current_right = bcf_quotient_bcs_current_right_table_decoded_row_scale * S ((S (bcf_row_index_bcs_current_right_table)) * bcf_row_scale_scale_bcs_current_right) + (bcf_row_scale_bcs_current_right_table))) /\ ((bcf_row_index_bcs_current_right_table = 0 /\ (forall bcf_index_bcs_current_right_table_zero_row. (exists bcf_lt_gap_bcs_current_right_table_zero_row_bound. bcf_lt_gap_bcs_current_right_table_zero_row_bound + S (bcf_index_bcs_current_right_table_zero_row) = S (n)) -> exists bcf_value_bcs_current_right_table_zero_row. ((((exists bcf_height_bcs_current_right_table_zero_row_entry. bcf_height_bcs_current_right_table_zero_row_entry + S (bcf_value_bcs_current_right_table_zero_row) = S ((S (bcf_index_bcs_current_right_table_zero_row)) * bcf_row_scale_bcs_current_right_table)) /\ exists bcf_quotient_bcs_current_right_table_zero_row_entry. bcf_row_code_bcs_current_right_table = bcf_quotient_bcs_current_right_table_zero_row_entry * S ((S (bcf_index_bcs_current_right_table_zero_row)) * bcf_row_scale_bcs_current_right_table) + (bcf_value_bcs_current_right_table_zero_row))) /\ ((bcf_index_bcs_current_right_table_zero_row = 0 /\ bcf_value_bcs_current_right_table_zero_row = 1) \/ exists bcf_predecessor_bcs_current_right_table_zero_row. bcf_index_bcs_current_right_table_zero_row = S bcf_predecessor_bcs_current_right_table_zero_row /\ bcf_value_bcs_current_right_table_zero_row = 0)))) \/ exists bcf_predecessor_bcs_current_right_table bcf_previous_code_bcs_current_right_table bcf_previous_scale_bcs_current_right_table. bcf_row_index_bcs_current_right_table = S bcf_predecessor_bcs_current_right_table /\ ((((exists bcf_height_bcs_current_right_table_decoded_previous_code. bcf_height_bcs_current_right_table_decoded_previous_code + S (bcf_previous_code_bcs_current_right_table) = S ((S (bcf_predecessor_bcs_current_right_table)) * bcf_row_code_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_table_decoded_previous_code. bcf_row_code_code_bcs_current_right = bcf_quotient_bcs_current_right_table_decoded_previous_code * S ((S (bcf_predecessor_bcs_current_right_table)) * bcf_row_code_scale_bcs_current_right) + (bcf_previous_code_bcs_current_right_table))) /\ ((((exists bcf_height_bcs_current_right_table_decoded_previous_scale. bcf_height_bcs_current_right_table_decoded_previous_scale + S (bcf_previous_scale_bcs_current_right_table) = S ((S (bcf_predecessor_bcs_current_right_table)) * bcf_row_scale_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_table_decoded_previous_scale. bcf_row_scale_code_bcs_current_right = bcf_quotient_bcs_current_right_table_decoded_previous_scale * S ((S (bcf_predecessor_bcs_current_right_table)) * bcf_row_scale_scale_bcs_current_right) + (bcf_previous_scale_bcs_current_right_table))) /\ (forall bcf_index_bcs_current_right_table_row_step. (exists bcf_lt_gap_bcs_current_right_table_row_step_bound. bcf_lt_gap_bcs_current_right_table_row_step_bound + S (bcf_index_bcs_current_right_table_row_step) = S (n)) -> exists bcf_value_bcs_current_right_table_row_step. ((((exists bcf_height_bcs_current_right_table_row_step_entry. bcf_height_bcs_current_right_table_row_step_entry + S (bcf_value_bcs_current_right_table_row_step) = S ((S (bcf_index_bcs_current_right_table_row_step)) * bcf_row_scale_bcs_current_right_table)) /\ exists bcf_quotient_bcs_current_right_table_row_step_entry. bcf_row_code_bcs_current_right_table = bcf_quotient_bcs_current_right_table_row_step_entry * S ((S (bcf_index_bcs_current_right_table_row_step)) * bcf_row_scale_bcs_current_right_table) + (bcf_value_bcs_current_right_table_row_step))) /\ ((bcf_index_bcs_current_right_table_row_step = 0 /\ bcf_value_bcs_current_right_table_row_step = 1) \/ exists bcf_predecessor_bcs_current_right_table_row_step bcf_left_bcs_current_right_table_row_step bcf_right_bcs_current_right_table_row_step. bcf_index_bcs_current_right_table_row_step = S bcf_predecessor_bcs_current_right_table_row_step /\ ((((exists bcf_height_bcs_current_right_table_row_step_previous_left. bcf_height_bcs_current_right_table_row_step_previous_left + S (bcf_left_bcs_current_right_table_row_step) = S ((S (bcf_predecessor_bcs_current_right_table_row_step)) * bcf_previous_scale_bcs_current_right_table)) /\ exists bcf_quotient_bcs_current_right_table_row_step_previous_left. bcf_previous_code_bcs_current_right_table = bcf_quotient_bcs_current_right_table_row_step_previous_left * S ((S (bcf_predecessor_bcs_current_right_table_row_step)) * bcf_previous_scale_bcs_current_right_table) + (bcf_left_bcs_current_right_table_row_step))) /\ ((((exists bcf_height_bcs_current_right_table_row_step_previous_right. bcf_height_bcs_current_right_table_row_step_previous_right + S (bcf_right_bcs_current_right_table_row_step) = S ((S (S (bcf_predecessor_bcs_current_right_table_row_step))) * bcf_previous_scale_bcs_current_right_table)) /\ exists bcf_quotient_bcs_current_right_table_row_step_previous_right. bcf_previous_code_bcs_current_right_table = bcf_quotient_bcs_current_right_table_row_step_previous_right * S ((S (S (bcf_predecessor_bcs_current_right_table_row_step))) * bcf_previous_scale_bcs_current_right_table) + (bcf_right_bcs_current_right_table_row_step))) /\ bcf_value_bcs_current_right_table_row_step = bcf_left_bcs_current_right_table_row_step + bcf_right_bcs_current_right_table_row_step))))))))))) /\ ((((exists bcf_height_bcs_current_right_decoded_row_code. bcf_height_bcs_current_right_decoded_row_code + S (bcf_row_code_bcs_current_right) = S ((S (n)) * bcf_row_code_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_decoded_row_code. bcf_row_code_code_bcs_current_right = bcf_quotient_bcs_current_right_decoded_row_code * S ((S (n)) * bcf_row_code_scale_bcs_current_right) + (bcf_row_code_bcs_current_right))) /\ ((((exists bcf_height_bcs_current_right_decoded_row_scale. bcf_height_bcs_current_right_decoded_row_scale + S (bcf_row_scale_bcs_current_right) = S ((S (n)) * bcf_row_scale_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_decoded_row_scale. bcf_row_scale_code_bcs_current_right = bcf_quotient_bcs_current_right_decoded_row_scale * S ((S (n)) * bcf_row_scale_scale_bcs_current_right) + (bcf_row_scale_bcs_current_right))) /\ (((exists bcf_height_bcs_current_right_decoded_value. bcf_height_bcs_current_right_decoded_value + S (d) = S ((S (S j)) * bcf_row_scale_bcs_current_right)) /\ exists bcf_quotient_bcs_current_right_decoded_value. bcf_row_code_bcs_current_right = bcf_quotient_bcs_current_right_decoded_value * S ((S (S j)) * bcf_row_scale_bcs_current_right) + (d))))))))) - 0119
specialize choose_exists n - 0120
specialize choose_exists (S j) - 0121
exact choose_exists - 0122
cases hd_exists - 0123
have hleft_complement : S k + j = n - 0124
apply PA2 - 0125
trans S k + S j - 0126
symm - 0127
apply PA4 - 0128
exact hsum - 0129
have hright_complement : k + S j = n - 0130
trans S (k + j) - 0131
apply PA4 - 0132
trans S k + j - 0133
symm - 0134
apply add_succ_left - 0135
exact hleft_complement - 0136
have hx_sum : x = x1 + x2 - 0137
specialize choose_succ_succ n - 0138
specialize choose_succ_succ k - 0139
specialize choose_succ_succ x1 - 0140
specialize choose_succ_succ x2 - 0141
specialize choose_succ_succ x - 0142
apply choose_succ_succ - 0143
exact ha_exists_witness - 0144
exact hb_exists_witness - 0145
exact hleft - 0146
have hy_sum : y = x3 + x4 - 0147
specialize choose_succ_succ n - 0148
specialize choose_succ_succ j - 0149
specialize choose_succ_succ x3 - 0150
specialize choose_succ_succ x4 - 0151
specialize choose_succ_succ y - 0152
apply choose_succ_succ - 0153
exact hc_exists_witness - 0154
exact hd_exists_witness - 0155
exact hright - 0156
have hfirst : x1 = x4 - 0157
specialize IH k - 0158
specialize IH (S j) - 0159
specialize IH x1 - 0160
specialize IH x4 - 0161
apply IH - 0162
exact hright_complement - 0163
exact ha_exists_witness - 0164
exact hd_exists_witness - 0165
have hsecond : x2 = x3 - 0166
specialize IH (S k) - 0167
specialize IH j - 0168
specialize IH x2 - 0169
specialize IH x3 - 0170
apply IH - 0171
exact hleft_complement - 0172
exact hb_exists_witness - 0173
exact hc_exists_witness - 0174
rewrite hx_sum - 0175
rewrite hy_sum - 0176
rewrite hfirst - 0177
rewrite hsecond - 0178
apply add_comm