BT00TA · Bertrand theorem

beta_pascal_row_step_pointwise_functional

Alpha v34 checked-use theorem · independently kernel and Lean verified; not Stable

Pascal successor rows preserve pointwise agreement across encodings.

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

∀ pb. ∀ pc. ∀ qb. ∀ qc. ∀ b. ∀ c. ∀ d. ∀ e. ∀ w. ∀ v. (∀ x. Lt(x,w) → ∃ y. BetaAt(b,c,x,y) ∧ (x = 0 ∧ y = 1 ∨ (∃ z. ∃ n. ∃ m. x = S z ∧ (BetaAt(pb,pc,z,n) ∧ (BetaAt(pb,pc,S z,m) ∧ y = n + m))))) → (∀ x. Lt(x,v) → ∃ y. BetaAt(d,e,x,y) ∧ (x = 0 ∧ y = 1 ∨ (∃ z. ∃ n. ∃ m. x = S z ∧ (BetaAt(qb,qc,z,n) ∧ (BetaAt(qb,qc,S z,m) ∧ y = n + m))))) → (∀ x. ∀ y. ∀ z. Lt(x,w)Lt(x,v)BetaAt(pb,pc,x,y)BetaAt(qb,qc,x,z) → y = z) → ∀ x. ∀ y. ∀ z. Lt(x,w)Lt(x,v)BetaAt(b,c,x,y)BetaAt(d,e,x,z) → y = z

Every 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

16 occurrences

In local proof propositions

12 occurrences

Exact expanded native-PA statement
forall pb pc qb qc b c d e w v. (forall bcf_index_bpspf_left. (exists bcf_lt_gap_bpspf_left_bound. bcf_lt_gap_bpspf_left_bound + S (bcf_index_bpspf_left) = w) -> exists bcf_value_bpspf_left. ((((exists bcf_height_bpspf_left_entry. bcf_height_bpspf_left_entry + S (bcf_value_bpspf_left) = S ((S (bcf_index_bpspf_left)) * c)) /\ exists bcf_quotient_bpspf_left_entry. b = bcf_quotient_bpspf_left_entry * S ((S (bcf_index_bpspf_left)) * c) + (bcf_value_bpspf_left))) /\ ((bcf_index_bpspf_left = 0 /\ bcf_value_bpspf_left = 1) \/ exists bcf_predecessor_bpspf_left bcf_left_bpspf_left bcf_right_bpspf_left. bcf_index_bpspf_left = S bcf_predecessor_bpspf_left /\ ((((exists bcf_height_bpspf_left_previous_left. bcf_height_bpspf_left_previous_left + S (bcf_left_bpspf_left) = S ((S (bcf_predecessor_bpspf_left)) * pc)) /\ exists bcf_quotient_bpspf_left_previous_left. pb = bcf_quotient_bpspf_left_previous_left * S ((S (bcf_predecessor_bpspf_left)) * pc) + (bcf_left_bpspf_left))) /\ ((((exists bcf_height_bpspf_left_previous_right. bcf_height_bpspf_left_previous_right + S (bcf_right_bpspf_left) = S ((S (S (bcf_predecessor_bpspf_left))) * pc)) /\ exists bcf_quotient_bpspf_left_previous_right. pb = bcf_quotient_bpspf_left_previous_right * S ((S (S (bcf_predecessor_bpspf_left))) * pc) + (bcf_right_bpspf_left))) /\ bcf_value_bpspf_left = bcf_left_bpspf_left + bcf_right_bpspf_left))))) -> (forall bcf_index_bpspf_right. (exists bcf_lt_gap_bpspf_right_bound. bcf_lt_gap_bpspf_right_bound + S (bcf_index_bpspf_right) = v) -> exists bcf_value_bpspf_right. ((((exists bcf_height_bpspf_right_entry. bcf_height_bpspf_right_entry + S (bcf_value_bpspf_right) = S ((S (bcf_index_bpspf_right)) * e)) /\ exists bcf_quotient_bpspf_right_entry. d = bcf_quotient_bpspf_right_entry * S ((S (bcf_index_bpspf_right)) * e) + (bcf_value_bpspf_right))) /\ ((bcf_index_bpspf_right = 0 /\ bcf_value_bpspf_right = 1) \/ exists bcf_predecessor_bpspf_right bcf_left_bpspf_right bcf_right_bpspf_right. bcf_index_bpspf_right = S bcf_predecessor_bpspf_right /\ ((((exists bcf_height_bpspf_right_previous_left. bcf_height_bpspf_right_previous_left + S (bcf_left_bpspf_right) = S ((S (bcf_predecessor_bpspf_right)) * qc)) /\ exists bcf_quotient_bpspf_right_previous_left. qb = bcf_quotient_bpspf_right_previous_left * S ((S (bcf_predecessor_bpspf_right)) * qc) + (bcf_left_bpspf_right))) /\ ((((exists bcf_height_bpspf_right_previous_right. bcf_height_bpspf_right_previous_right + S (bcf_right_bpspf_right) = S ((S (S (bcf_predecessor_bpspf_right))) * qc)) /\ exists bcf_quotient_bpspf_right_previous_right. qb = bcf_quotient_bpspf_right_previous_right * S ((S (S (bcf_predecessor_bpspf_right))) * qc) + (bcf_right_bpspf_right))) /\ bcf_value_bpspf_right = bcf_left_bpspf_right + bcf_right_bpspf_right))))) -> (forall i x y. (exists bcf_lt_gap_bpspf_previous_left_bound. bcf_lt_gap_bpspf_previous_left_bound + S (i) = w) -> (exists bcf_lt_gap_bpspf_previous_right_bound. bcf_lt_gap_bpspf_previous_right_bound + S (i) = v) -> (((exists bcf_height_bpspf_previous_left_at. bcf_height_bpspf_previous_left_at + S (x) = S ((S (i)) * pc)) /\ exists bcf_quotient_bpspf_previous_left_at. pb = bcf_quotient_bpspf_previous_left_at * S ((S (i)) * pc) + (x))) -> (((exists bcf_height_bpspf_previous_right_at. bcf_height_bpspf_previous_right_at + S (y) = S ((S (i)) * qc)) /\ exists bcf_quotient_bpspf_previous_right_at. qb = bcf_quotient_bpspf_previous_right_at * S ((S (i)) * qc) + (y))) -> x = y) -> (forall i x y. (exists bcf_lt_gap_bpspf_current_left_bound. bcf_lt_gap_bpspf_current_left_bound + S (i) = w) -> (exists bcf_lt_gap_bpspf_current_right_bound. bcf_lt_gap_bpspf_current_right_bound + S (i) = v) -> (((exists bcf_height_bpspf_current_left_at. bcf_height_bpspf_current_left_at + S (x) = S ((S (i)) * c)) /\ exists bcf_quotient_bpspf_current_left_at. b = bcf_quotient_bpspf_current_left_at * S ((S (i)) * c) + (x))) -> (((exists bcf_height_bpspf_current_right_at. bcf_height_bpspf_current_right_at + S (y) = S ((S (i)) * e)) /\ exists bcf_quotient_bpspf_current_right_at. d = bcf_quotient_bpspf_current_right_at * S ((S (i)) * e) + (y))) -> x = y)

Proof neighborhood

Direct theorem prerequisites

Direct 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

164 script commands · 41 reading checkpoints · 16 local claims

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.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (4)
01Fix variables and assumptionsL1–10

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro pb
  2. L2
    intro pc
  3. L3
    intro qb
  4. L4
    intro qc
  5. L5
    intro b
  6. L6
    intro c
  7. L7
    intro d
  8. L8
    intro e
  9. L9
    intro w
  10. L10
    intro v
02Fix variables and assumptionsL11–20

Work with arbitrary variables or the premises of the current implication.

  1. L11
    intro hleft
  2. L12
    intro hright
  3. L13
    intro hagree
  4. L14
    intro i
  5. L15
    intro x
  6. L16
    intro y
  7. L17
    intro hiw
  8. L18
    intro hiv
  9. L19
    intro hxi
  10. L20
    intro hyi
03Establish hleft_valueL21–24

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hleft.

  1. L21
    have hleft_value : ∃ bcf_cell_value_bpspf_left_cell. BetaAt(b,c,i,bcf_cell_value_bpspf_left_cell) ∧ (i = 0 ∧ bcf_cell_value_bpspf_left_cell = 1 ∨ (∃ x. ∃ y. ∃ z. i = S x ∧ (BetaAt(pb,pc,x,y) ∧ (BetaAt(pb,pc,S x,z) ∧ bcf_cell_value_bpspf_left_cell = y + z))))Definitions: BetaAt(b,c,i,bcf_cell_value_bpspf_left_cell)BetaAt(pb,pc,x,y)BetaAt(pb,pc,S x,z)Original native command in the exact edition
  2. L22
    specialize hleft i
  3. L23
    apply hleft
  4. L24
    exact hiw
04Separate the logical casesL25–26

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L25
    cases hleft_value
  2. L26
    cases hleft_value_witness
05Establish hright_valueL27–30

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hright.

  1. L27
    have hright_value : ∃ bcf_cell_value_bpspf_right_cell. BetaAt(d,e,i,bcf_cell_value_bpspf_right_cell) ∧ (i = 0 ∧ bcf_cell_value_bpspf_right_cell = 1 ∨ (∃ x. ∃ y. ∃ z. i = S x ∧ (BetaAt(qb,qc,x,y) ∧ (BetaAt(qb,qc,S x,z) ∧ bcf_cell_value_bpspf_right_cell = y + z))))Definitions: BetaAt(d,e,i,bcf_cell_value_bpspf_right_cell)BetaAt(qb,qc,x,y)BetaAt(qb,qc,S x,z)Original native command in the exact edition
  2. L28
    specialize hright i
  3. L29
    apply hright
  4. L30
    exact hiv
06Separate the logical casesL31–32

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L31
    cases hright_value
  2. L32
    cases hright_value_witness
07Establish hx_valueL33–41

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta at unique.

  1. L33
    have hx_value : x = x1
  2. L34
    specialize beta_at_unique b
  3. L35
    specialize beta_at_unique c
  4. L36
    specialize beta_at_unique i
  5. L37
    specialize beta_at_unique x
  6. L38
    specialize beta_at_unique x1
  7. L39
    apply beta_at_unique
  8. L40
    exact hxi
  9. L41
    exact hleft_value_witness_left
08Establish hy_valueL42–50

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta at unique.

  1. L42
    have hy_value : y = x2
  2. L43
    specialize beta_at_unique d
  3. L44
    specialize beta_at_unique e
  4. L45
    specialize beta_at_unique i
  5. L46
    specialize beta_at_unique y
  6. L47
    specialize beta_at_unique x2
  7. L48
    apply beta_at_unique
  8. L49
    exact hyi
  9. L50
    exact hright_value_witness_left
09Separate the logical casesL51–54

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L51
    cases hleft_value_witness_right
  2. L52
    cases hleft_value_witness_right_left
  3. L53
    cases hright_value_witness_right
  4. L54
    cases hright_value_witness_right_left
10Calculate and transport equalitiesL55–55

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L55
    trans x1
11Use earlier factsL56–56

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L56
    exact hx_value
12Calculate and transport equalitiesL57–57

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L57
    trans 1
13Use earlier factsL58–58

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L58
    exact hleft_value_witness_right_left_right
14Calculate and transport equalitiesL59–60

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L59
    trans x2
  2. L60
    symm
15Use earlier factsL61–61

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L61
    exact hright_value_witness_right_left_right
16Calculate and transport equalitiesL62–62

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L62
    symm
17Use earlier factsL63–63

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L63
    exact hy_value
18Separate the logical casesL64–68

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L64
    cases hright_value_witness_right_right
  2. L65
    cases hright_value_witness_right_right_witness
  3. L66
    cases hright_value_witness_right_right_witness_witness
  4. L67
    cases hright_value_witness_right_right_witness_witness_witness
  5. L68
    exfalso
19Establish hbadL69–76

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply succ ne zero.

  1. L69
    have hbad : S x3 = 0
  2. L70
    trans i
  3. L71
    symm
  4. L72
    exact hright_value_witness_right_right_witness_witness_witness_left
  5. L73
    exact hleft_value_witness_right_left_left
  6. L74
    specialize succ_ne_zero x3
  7. L75
    apply succ_ne_zero
  8. L76
    exact hbad
20Separate the logical casesL77–85

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L77
    cases hleft_value_witness_right_right
  2. L78
    cases hleft_value_witness_right_right_witness
  3. L79
    cases hleft_value_witness_right_right_witness_witness
  4. L80
    cases hleft_value_witness_right_right_witness_witness_witness
  5. L81
    cases hleft_value_witness_right_right_witness_witness_witness_right
  6. L82
    cases hleft_value_witness_right_right_witness_witness_witness_right_right
  7. L83
    cases hright_value_witness_right
  8. L84
    cases hright_value_witness_right_left
  9. L85
    exfalso
21Establish hbadL86–93

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply succ ne zero.

  1. L86
    have hbad : S x3 = 0
  2. L87
    trans i
  3. L88
    symm
  4. L89
    exact hleft_value_witness_right_right_witness_witness_witness_left
  5. L90
    exact hright_value_witness_right_left_left
  6. L91
    specialize succ_ne_zero x3
  7. L92
    apply succ_ne_zero
  8. L93
    exact hbad
22Separate the logical casesL94–99

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L94
    cases hright_value_witness_right_right
  2. L95
    cases hright_value_witness_right_right_witness
  3. L96
    cases hright_value_witness_right_right_witness_witness
  4. L97
    cases hright_value_witness_right_right_witness_witness_witness
  5. L98
    cases hright_value_witness_right_right_witness_witness_witness_right
  6. L99
    cases hright_value_witness_right_right_witness_witness_witness_right_right
23Establish hsuccL100–104

Establish this local claim before using it. It is not an additional assumption.

  1. L100
    have hsucc : S x3 = S x6
  2. L101
    trans i
  3. L102
    symm
  4. L103
    exact hleft_value_witness_right_right_witness_witness_witness_left
  5. L104
    exact hright_value_witness_right_right_witness_witness_witness_left
24Establish hpredL105–109

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply succ injective.

  1. L105
    have hpred : x3 = x6
  2. L106
    specialize succ_injective x3
  3. L107
    specialize succ_injective x6
  4. L108
    apply succ_injective
  5. L109
    exact hsucc
25Establish hcurrent_wL110–112

Establish this local claim before using it. It is not an additional assumption.

  1. L110
    have hcurrent_w : Lt(S x3,w)Definitions: Lt(S x3,w)Original native command in the exact edition
  2. L111
    rewrite <- hleft_value_witness_right_right_witness_witness_witness_left
  3. L112
    exact hiw
26Establish hcurrent_vL113–115

Establish this local claim before using it. It is not an additional assumption.

  1. L113
    have hcurrent_v : Lt(S x3,v)Definitions: Lt(S x3,v)Original native command in the exact edition
  2. L114
    rewrite <- hleft_value_witness_right_right_witness_witness_witness_left
  3. L115
    exact hiv
27Establish hprevious_wL116–120

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply lt to le.

  1. L116
    have hprevious_w : Lt(x3,w)Definitions: Lt(x3,w)Original native command in the exact edition
  2. L117
    specialize lt_to_le (S x3)
  3. L118
    specialize lt_to_le w
  4. L119
    apply lt_to_le
  5. L120
    exact hcurrent_w
28Establish hprevious_vL121–125

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply lt to le.

  1. L121
    have hprevious_v : Lt(x3,v)Definitions: Lt(x3,v)Original native command in the exact edition
  2. L122
    specialize lt_to_le (S x3)
  3. L123
    specialize lt_to_le v
  4. L124
    apply lt_to_le
  5. L125
    exact hcurrent_v
29Establish hright_previousL126–129

Establish this local claim before using it. It is not an additional assumption.

  1. L126
    have hright_previous : BetaAt(qb,qc,x3,x7)Definitions: BetaAt(qb,qc,x3,x7)Original native command in the exact edition
  2. L127
    rewrite hpred
  3. L128
    rewrite hpred
  4. L129
    exact hright_value_witness_right_right_witness_witness_witness_right_left
30Establish hright_currentL130–133

Establish this local claim before using it. It is not an additional assumption.

  1. L130
    have hright_current : BetaAt(qb,qc,S x3,x8)Definitions: BetaAt(qb,qc,S x3,x8)Original native command in the exact edition
  2. L131
    rewrite hpred
  3. L132
    rewrite hpred
  4. L133
    exact hright_value_witness_right_right_witness_witness_witness_right_right_left
31Establish huL134–142

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hagree.

  1. L134
    have hu : x4 = x7
  2. L135
    specialize hagree x3
  3. L136
    specialize hagree x4
  4. L137
    specialize hagree x7
  5. L138
    apply hagree
  6. L139
    exact hprevious_w
  7. L140
    exact hprevious_v
  8. L141
    exact hleft_value_witness_right_right_witness_witness_witness_right_left
  9. L142
    exact hright_previous
32Establish hvL143–152

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hagree.

  1. L143
    have hv : x5 = x8
  2. L144
    specialize hagree (S x3)
  3. L145
    specialize hagree x5
  4. L146
    specialize hagree x8
  5. L147
    apply hagree
  6. L148
    exact hcurrent_w
  7. L149
    exact hcurrent_v
  8. L150
    exact hleft_value_witness_right_right_witness_witness_witness_right_right_left
  9. L151
    exact hright_current
  10. L152
    trans x1
33Use earlier factsL153–153

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L153
    exact hx_value
34Calculate and transport equalitiesL154–154

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L154
    trans x4 + x5
35Use earlier factsL155–155

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L155
    exact hleft_value_witness_right_right_witness_witness_witness_right_right_right
36Calculate and transport equalitiesL156–157

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L156
    trans x7 + x8
  2. L157
    congr
37Use earlier factsL158–159

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L158
    exact hu
  2. L159
    exact hv
38Calculate and transport equalitiesL160–161

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L160
    trans x2
  2. L161
    symm
39Use earlier factsL162–162

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L162
    exact hright_value_witness_right_right_witness_witness_witness_right_right_right
40Calculate and transport equalitiesL163–163

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L163
    symm
41Use earlier factsL164–164

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L164
    exact hy_value

Library-wide reading audit

Original defined command ledger · 164 lines
  1. 0001intro pb
  2. 0002intro pc
  3. 0003intro qb
  4. 0004intro qc
  5. 0005intro b
  6. 0006intro c
  7. 0007intro d
  8. 0008intro e
  9. 0009intro w
  10. 0010intro v
  11. 0011intro hleft
  12. 0012intro hright
  13. 0013intro hagree
  14. 0014intro i
  15. 0015intro x
  16. 0016intro y
  17. 0017intro hiw
  18. 0018intro hiv
  19. 0019intro hxi
  20. 0020intro hyi
  21. 0021have hleft_value : ∃ bcf_cell_value_bpspf_left_cell. BetaAt(b,c,i,bcf_cell_value_bpspf_left_cell) ∧ (i = 0 ∧ bcf_cell_value_bpspf_left_cell = 1 ∨ (∃ x. ∃ y. ∃ z. i = S x ∧ (BetaAt(pb,pc,x,y) ∧ (BetaAt(pb,pc,S x,z) ∧ bcf_cell_value_bpspf_left_cell = y + z))))
    Exact native replay linehave hleft_value : exists bcf_cell_value_bpspf_left_cell. ((((exists bcf_height_bpspf_left_cell_entry. bcf_height_bpspf_left_cell_entry + S (bcf_cell_value_bpspf_left_cell) = S ((S (i)) * c)) /\ exists bcf_quotient_bpspf_left_cell_entry. b = bcf_quotient_bpspf_left_cell_entry * S ((S (i)) * c) + (bcf_cell_value_bpspf_left_cell))) /\ ((i = 0 /\ bcf_cell_value_bpspf_left_cell = 1) \/ exists bcf_cell_predecessor_bpspf_left_cell bcf_cell_left_bpspf_left_cell bcf_cell_right_bpspf_left_cell. i = S bcf_cell_predecessor_bpspf_left_cell /\ ((((exists bcf_height_bpspf_left_cell_previous_left. bcf_height_bpspf_left_cell_previous_left + S (bcf_cell_left_bpspf_left_cell) = S ((S (bcf_cell_predecessor_bpspf_left_cell)) * pc)) /\ exists bcf_quotient_bpspf_left_cell_previous_left. pb = bcf_quotient_bpspf_left_cell_previous_left * S ((S (bcf_cell_predecessor_bpspf_left_cell)) * pc) + (bcf_cell_left_bpspf_left_cell))) /\ ((((exists bcf_height_bpspf_left_cell_previous_right. bcf_height_bpspf_left_cell_previous_right + S (bcf_cell_right_bpspf_left_cell) = S ((S (S (bcf_cell_predecessor_bpspf_left_cell))) * pc)) /\ exists bcf_quotient_bpspf_left_cell_previous_right. pb = bcf_quotient_bpspf_left_cell_previous_right * S ((S (S (bcf_cell_predecessor_bpspf_left_cell))) * pc) + (bcf_cell_right_bpspf_left_cell))) /\ bcf_cell_value_bpspf_left_cell = bcf_cell_left_bpspf_left_cell + bcf_cell_right_bpspf_left_cell))))
  22. 0022specialize hleft i
  23. 0023apply hleft
  24. 0024exact hiw
  25. 0025cases hleft_value
  26. 0026cases hleft_value_witness
  27. 0027have hright_value : ∃ bcf_cell_value_bpspf_right_cell. BetaAt(d,e,i,bcf_cell_value_bpspf_right_cell) ∧ (i = 0 ∧ bcf_cell_value_bpspf_right_cell = 1 ∨ (∃ x. ∃ y. ∃ z. i = S x ∧ (BetaAt(qb,qc,x,y) ∧ (BetaAt(qb,qc,S x,z) ∧ bcf_cell_value_bpspf_right_cell = y + z))))
    Exact native replay linehave hright_value : exists bcf_cell_value_bpspf_right_cell. ((((exists bcf_height_bpspf_right_cell_entry. bcf_height_bpspf_right_cell_entry + S (bcf_cell_value_bpspf_right_cell) = S ((S (i)) * e)) /\ exists bcf_quotient_bpspf_right_cell_entry. d = bcf_quotient_bpspf_right_cell_entry * S ((S (i)) * e) + (bcf_cell_value_bpspf_right_cell))) /\ ((i = 0 /\ bcf_cell_value_bpspf_right_cell = 1) \/ exists bcf_cell_predecessor_bpspf_right_cell bcf_cell_left_bpspf_right_cell bcf_cell_right_bpspf_right_cell. i = S bcf_cell_predecessor_bpspf_right_cell /\ ((((exists bcf_height_bpspf_right_cell_previous_left. bcf_height_bpspf_right_cell_previous_left + S (bcf_cell_left_bpspf_right_cell) = S ((S (bcf_cell_predecessor_bpspf_right_cell)) * qc)) /\ exists bcf_quotient_bpspf_right_cell_previous_left. qb = bcf_quotient_bpspf_right_cell_previous_left * S ((S (bcf_cell_predecessor_bpspf_right_cell)) * qc) + (bcf_cell_left_bpspf_right_cell))) /\ ((((exists bcf_height_bpspf_right_cell_previous_right. bcf_height_bpspf_right_cell_previous_right + S (bcf_cell_right_bpspf_right_cell) = S ((S (S (bcf_cell_predecessor_bpspf_right_cell))) * qc)) /\ exists bcf_quotient_bpspf_right_cell_previous_right. qb = bcf_quotient_bpspf_right_cell_previous_right * S ((S (S (bcf_cell_predecessor_bpspf_right_cell))) * qc) + (bcf_cell_right_bpspf_right_cell))) /\ bcf_cell_value_bpspf_right_cell = bcf_cell_left_bpspf_right_cell + bcf_cell_right_bpspf_right_cell))))
  28. 0028specialize hright i
  29. 0029apply hright
  30. 0030exact hiv
  31. 0031cases hright_value
  32. 0032cases hright_value_witness
  33. 0033have hx_value : x = x1
  34. 0034specialize beta_at_unique b
  35. 0035specialize beta_at_unique c
  36. 0036specialize beta_at_unique i
  37. 0037specialize beta_at_unique x
  38. 0038specialize beta_at_unique x1
  39. 0039apply beta_at_unique
  40. 0040exact hxi
  41. 0041exact hleft_value_witness_left
  42. 0042have hy_value : y = x2
  43. 0043specialize beta_at_unique d
  44. 0044specialize beta_at_unique e
  45. 0045specialize beta_at_unique i
  46. 0046specialize beta_at_unique y
  47. 0047specialize beta_at_unique x2
  48. 0048apply beta_at_unique
  49. 0049exact hyi
  50. 0050exact hright_value_witness_left
  51. 0051cases hleft_value_witness_right
  52. 0052cases hleft_value_witness_right_left
  53. 0053cases hright_value_witness_right
  54. 0054cases hright_value_witness_right_left
  55. 0055trans x1
  56. 0056exact hx_value
  57. 0057trans 1
  58. 0058exact hleft_value_witness_right_left_right
  59. 0059trans x2
  60. 0060symm
  61. 0061exact hright_value_witness_right_left_right
  62. 0062symm
  63. 0063exact hy_value
  64. 0064cases hright_value_witness_right_right
  65. 0065cases hright_value_witness_right_right_witness
  66. 0066cases hright_value_witness_right_right_witness_witness
  67. 0067cases hright_value_witness_right_right_witness_witness_witness
  68. 0068exfalso
  69. 0069have hbad : S x3 = 0
  70. 0070trans i
  71. 0071symm
  72. 0072exact hright_value_witness_right_right_witness_witness_witness_left
  73. 0073exact hleft_value_witness_right_left_left
  74. 0074specialize succ_ne_zero x3
  75. 0075apply succ_ne_zero
  76. 0076exact hbad
  77. 0077cases hleft_value_witness_right_right
  78. 0078cases hleft_value_witness_right_right_witness
  79. 0079cases hleft_value_witness_right_right_witness_witness
  80. 0080cases hleft_value_witness_right_right_witness_witness_witness
  81. 0081cases hleft_value_witness_right_right_witness_witness_witness_right
  82. 0082cases hleft_value_witness_right_right_witness_witness_witness_right_right
  83. 0083cases hright_value_witness_right
  84. 0084cases hright_value_witness_right_left
  85. 0085exfalso
  86. 0086have hbad : S x3 = 0
  87. 0087trans i
  88. 0088symm
  89. 0089exact hleft_value_witness_right_right_witness_witness_witness_left
  90. 0090exact hright_value_witness_right_left_left
  91. 0091specialize succ_ne_zero x3
  92. 0092apply succ_ne_zero
  93. 0093exact hbad
  94. 0094cases hright_value_witness_right_right
  95. 0095cases hright_value_witness_right_right_witness
  96. 0096cases hright_value_witness_right_right_witness_witness
  97. 0097cases hright_value_witness_right_right_witness_witness_witness
  98. 0098cases hright_value_witness_right_right_witness_witness_witness_right
  99. 0099cases hright_value_witness_right_right_witness_witness_witness_right_right
  100. 0100have hsucc : S x3 = S x6
  101. 0101trans i
  102. 0102symm
  103. 0103exact hleft_value_witness_right_right_witness_witness_witness_left
  104. 0104exact hright_value_witness_right_right_witness_witness_witness_left
  105. 0105have hpred : x3 = x6
  106. 0106specialize succ_injective x3
  107. 0107specialize succ_injective x6
  108. 0108apply succ_injective
  109. 0109exact hsucc
  110. 0110have hcurrent_w : Lt(S x3,w)
    Exact native replay linehave hcurrent_w : exists bcf_lt_gap_bpspf_current_w. bcf_lt_gap_bpspf_current_w + S (S x3) = w
  111. 0111rewrite <- hleft_value_witness_right_right_witness_witness_witness_left
  112. 0112exact hiw
  113. 0113have hcurrent_v : Lt(S x3,v)
    Exact native replay linehave hcurrent_v : exists bcf_lt_gap_bpspf_current_v. bcf_lt_gap_bpspf_current_v + S (S x3) = v
  114. 0114rewrite <- hleft_value_witness_right_right_witness_witness_witness_left
  115. 0115exact hiv
  116. 0116have hprevious_w : Lt(x3,w)
    Exact native replay linehave hprevious_w : exists bcf_lt_gap_bpspf_previous_w. bcf_lt_gap_bpspf_previous_w + S (x3) = w
  117. 0117specialize lt_to_le (S x3)
  118. 0118specialize lt_to_le w
  119. 0119apply lt_to_le
  120. 0120exact hcurrent_w
  121. 0121have hprevious_v : Lt(x3,v)
    Exact native replay linehave hprevious_v : exists bcf_lt_gap_bpspf_previous_v. bcf_lt_gap_bpspf_previous_v + S (x3) = v
  122. 0122specialize lt_to_le (S x3)
  123. 0123specialize lt_to_le v
  124. 0124apply lt_to_le
  125. 0125exact hcurrent_v
  126. 0126have hright_previous : BetaAt(qb,qc,x3,x7)
    Exact native replay linehave hright_previous : ((exists bcf_height_bpspf_aligned_previous. bcf_height_bpspf_aligned_previous + S (x7) = S ((S (x3)) * qc)) /\ exists bcf_quotient_bpspf_aligned_previous. qb = bcf_quotient_bpspf_aligned_previous * S ((S (x3)) * qc) + (x7))
  127. 0127rewrite hpred
  128. 0128rewrite hpred
  129. 0129exact hright_value_witness_right_right_witness_witness_witness_right_left
  130. 0130have hright_current : BetaAt(qb,qc,S x3,x8)
    Exact native replay linehave hright_current : ((exists bcf_height_bpspf_aligned_current. bcf_height_bpspf_aligned_current + S (x8) = S ((S (S x3)) * qc)) /\ exists bcf_quotient_bpspf_aligned_current. qb = bcf_quotient_bpspf_aligned_current * S ((S (S x3)) * qc) + (x8))
  131. 0131rewrite hpred
  132. 0132rewrite hpred
  133. 0133exact hright_value_witness_right_right_witness_witness_witness_right_right_left
  134. 0134have hu : x4 = x7
  135. 0135specialize hagree x3
  136. 0136specialize hagree x4
  137. 0137specialize hagree x7
  138. 0138apply hagree
  139. 0139exact hprevious_w
  140. 0140exact hprevious_v
  141. 0141exact hleft_value_witness_right_right_witness_witness_witness_right_left
  142. 0142exact hright_previous
  143. 0143have hv : x5 = x8
  144. 0144specialize hagree (S x3)
  145. 0145specialize hagree x5
  146. 0146specialize hagree x8
  147. 0147apply hagree
  148. 0148exact hcurrent_w
  149. 0149exact hcurrent_v
  150. 0150exact hleft_value_witness_right_right_witness_witness_witness_right_right_left
  151. 0151exact hright_current
  152. 0152trans x1
  153. 0153exact hx_value
  154. 0154trans x4 + x5
  155. 0155exact hleft_value_witness_right_right_witness_witness_witness_right_right_right
  156. 0156trans x7 + x8
  157. 0157congr
  158. 0158exact hu
  159. 0159exact hv
  160. 0160trans x2
  161. 0161symm
  162. 0162exact hright_value_witness_right_right_witness_witness_witness_right_right_right
  163. 0163symm
  164. 0164exact hy_value