PA00CQ · theorem

beta_sum_pointwise_mod_three_add

Alpha v34 checked-use theorem · independently closed; not Stable

Pointwise x==q+m+s congruence lifts to the four exact Sum endpoints.

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

∀ d. ∀ b. ∀ c. ∀ qb. ∀ qc. ∀ mb. ∀ mc. ∀ sb. ∀ sc. ∀ l. ∀ X. ∀ Q. ∀ M. ∀ E. Sum(b,c,l,X)Sum(qb,qc,l,Q)Sum(mb,mc,l,M)Sum(sb,sc,l,E) → (∀ x. ∀ y. ∀ z. ∀ n. ∀ m. Lt(x,l)BetaAt(b,c,x,y)BetaAt(qb,qc,x,z)BetaAt(mb,mc,x,n)BetaAt(sb,sc,x,m)ModEq(d,y,z + n + m)) → ModEq(d,X,Q + M + E)

Every purple notation token opens its conservative definition. This is a reading surface; the compiler expands the statement before the unchanged kernel checks it.

Definitions used by this theorem

In the theorem statement

11 occurrences

In local proof propositions

17 occurrences

Exact expanded native-PA statement
forall d b c qb qc mb mc sb sc l X Q M E. (exists ff_u_pointmod_source ff_v_pointmod_source. ((((exists ff_h_pointmod_source_start. ff_h_pointmod_source_start + S (0) = S ((S (0)) * ff_v_pointmod_source)) /\ exists ff_q_pointmod_source_start. ff_u_pointmod_source = ff_q_pointmod_source_start * S ((S (0)) * ff_v_pointmod_source) + (0))) /\ ((((exists ff_h_pointmod_source_terminal. ff_h_pointmod_source_terminal + S (X) = S ((S (l)) * ff_v_pointmod_source)) /\ exists ff_q_pointmod_source_terminal. ff_u_pointmod_source = ff_q_pointmod_source_terminal * S ((S (l)) * ff_v_pointmod_source) + (X))) /\ forall ff_i_pointmod_source. (exists ff_lt_pointmod_source_bound. ff_lt_pointmod_source_bound + S ff_i_pointmod_source = l) -> exists ff_a_pointmod_source ff_r_pointmod_source ff_s_pointmod_source. ((((exists ff_h_pointmod_source_summand. ff_h_pointmod_source_summand + S (ff_a_pointmod_source) = S ((S (ff_i_pointmod_source)) * c)) /\ exists ff_q_pointmod_source_summand. b = ff_q_pointmod_source_summand * S ((S (ff_i_pointmod_source)) * c) + (ff_a_pointmod_source))) /\ ((((exists ff_h_pointmod_source_partial. ff_h_pointmod_source_partial + S (ff_r_pointmod_source) = S ((S (ff_i_pointmod_source)) * ff_v_pointmod_source)) /\ exists ff_q_pointmod_source_partial. ff_u_pointmod_source = ff_q_pointmod_source_partial * S ((S (ff_i_pointmod_source)) * ff_v_pointmod_source) + (ff_r_pointmod_source))) /\ ((((exists ff_h_pointmod_source_successor. ff_h_pointmod_source_successor + S (ff_s_pointmod_source) = S ((S (S ff_i_pointmod_source)) * ff_v_pointmod_source)) /\ exists ff_q_pointmod_source_successor. ff_u_pointmod_source = ff_q_pointmod_source_successor * S ((S (S ff_i_pointmod_source)) * ff_v_pointmod_source) + (ff_s_pointmod_source))) /\ ff_s_pointmod_source = ff_r_pointmod_source + ff_a_pointmod_source)))))) -> (exists ff_u_pointmod_quotient ff_v_pointmod_quotient. ((((exists ff_h_pointmod_quotient_start. ff_h_pointmod_quotient_start + S (0) = S ((S (0)) * ff_v_pointmod_quotient)) /\ exists ff_q_pointmod_quotient_start. ff_u_pointmod_quotient = ff_q_pointmod_quotient_start * S ((S (0)) * ff_v_pointmod_quotient) + (0))) /\ ((((exists ff_h_pointmod_quotient_terminal. ff_h_pointmod_quotient_terminal + S (Q) = S ((S (l)) * ff_v_pointmod_quotient)) /\ exists ff_q_pointmod_quotient_terminal. ff_u_pointmod_quotient = ff_q_pointmod_quotient_terminal * S ((S (l)) * ff_v_pointmod_quotient) + (Q))) /\ forall ff_i_pointmod_quotient. (exists ff_lt_pointmod_quotient_bound. ff_lt_pointmod_quotient_bound + S ff_i_pointmod_quotient = l) -> exists ff_a_pointmod_quotient ff_r_pointmod_quotient ff_s_pointmod_quotient. ((((exists ff_h_pointmod_quotient_summand. ff_h_pointmod_quotient_summand + S (ff_a_pointmod_quotient) = S ((S (ff_i_pointmod_quotient)) * qc)) /\ exists ff_q_pointmod_quotient_summand. qb = ff_q_pointmod_quotient_summand * S ((S (ff_i_pointmod_quotient)) * qc) + (ff_a_pointmod_quotient))) /\ ((((exists ff_h_pointmod_quotient_partial. ff_h_pointmod_quotient_partial + S (ff_r_pointmod_quotient) = S ((S (ff_i_pointmod_quotient)) * ff_v_pointmod_quotient)) /\ exists ff_q_pointmod_quotient_partial. ff_u_pointmod_quotient = ff_q_pointmod_quotient_partial * S ((S (ff_i_pointmod_quotient)) * ff_v_pointmod_quotient) + (ff_r_pointmod_quotient))) /\ ((((exists ff_h_pointmod_quotient_successor. ff_h_pointmod_quotient_successor + S (ff_s_pointmod_quotient) = S ((S (S ff_i_pointmod_quotient)) * ff_v_pointmod_quotient)) /\ exists ff_q_pointmod_quotient_successor. ff_u_pointmod_quotient = ff_q_pointmod_quotient_successor * S ((S (S ff_i_pointmod_quotient)) * ff_v_pointmod_quotient) + (ff_s_pointmod_quotient))) /\ ff_s_pointmod_quotient = ff_r_pointmod_quotient + ff_a_pointmod_quotient)))))) -> (exists ff_u_pointmod_magnitude ff_v_pointmod_magnitude. ((((exists ff_h_pointmod_magnitude_start. ff_h_pointmod_magnitude_start + S (0) = S ((S (0)) * ff_v_pointmod_magnitude)) /\ exists ff_q_pointmod_magnitude_start. ff_u_pointmod_magnitude = ff_q_pointmod_magnitude_start * S ((S (0)) * ff_v_pointmod_magnitude) + (0))) /\ ((((exists ff_h_pointmod_magnitude_terminal. ff_h_pointmod_magnitude_terminal + S (M) = S ((S (l)) * ff_v_pointmod_magnitude)) /\ exists ff_q_pointmod_magnitude_terminal. ff_u_pointmod_magnitude = ff_q_pointmod_magnitude_terminal * S ((S (l)) * ff_v_pointmod_magnitude) + (M))) /\ forall ff_i_pointmod_magnitude. (exists ff_lt_pointmod_magnitude_bound. ff_lt_pointmod_magnitude_bound + S ff_i_pointmod_magnitude = l) -> exists ff_a_pointmod_magnitude ff_r_pointmod_magnitude ff_s_pointmod_magnitude. ((((exists ff_h_pointmod_magnitude_summand. ff_h_pointmod_magnitude_summand + S (ff_a_pointmod_magnitude) = S ((S (ff_i_pointmod_magnitude)) * mc)) /\ exists ff_q_pointmod_magnitude_summand. mb = ff_q_pointmod_magnitude_summand * S ((S (ff_i_pointmod_magnitude)) * mc) + (ff_a_pointmod_magnitude))) /\ ((((exists ff_h_pointmod_magnitude_partial. ff_h_pointmod_magnitude_partial + S (ff_r_pointmod_magnitude) = S ((S (ff_i_pointmod_magnitude)) * ff_v_pointmod_magnitude)) /\ exists ff_q_pointmod_magnitude_partial. ff_u_pointmod_magnitude = ff_q_pointmod_magnitude_partial * S ((S (ff_i_pointmod_magnitude)) * ff_v_pointmod_magnitude) + (ff_r_pointmod_magnitude))) /\ ((((exists ff_h_pointmod_magnitude_successor. ff_h_pointmod_magnitude_successor + S (ff_s_pointmod_magnitude) = S ((S (S ff_i_pointmod_magnitude)) * ff_v_pointmod_magnitude)) /\ exists ff_q_pointmod_magnitude_successor. ff_u_pointmod_magnitude = ff_q_pointmod_magnitude_successor * S ((S (S ff_i_pointmod_magnitude)) * ff_v_pointmod_magnitude) + (ff_s_pointmod_magnitude))) /\ ff_s_pointmod_magnitude = ff_r_pointmod_magnitude + ff_a_pointmod_magnitude)))))) -> (exists ff_u_pointmod_sign ff_v_pointmod_sign. ((((exists ff_h_pointmod_sign_start. ff_h_pointmod_sign_start + S (0) = S ((S (0)) * ff_v_pointmod_sign)) /\ exists ff_q_pointmod_sign_start. ff_u_pointmod_sign = ff_q_pointmod_sign_start * S ((S (0)) * ff_v_pointmod_sign) + (0))) /\ ((((exists ff_h_pointmod_sign_terminal. ff_h_pointmod_sign_terminal + S (E) = S ((S (l)) * ff_v_pointmod_sign)) /\ exists ff_q_pointmod_sign_terminal. ff_u_pointmod_sign = ff_q_pointmod_sign_terminal * S ((S (l)) * ff_v_pointmod_sign) + (E))) /\ forall ff_i_pointmod_sign. (exists ff_lt_pointmod_sign_bound. ff_lt_pointmod_sign_bound + S ff_i_pointmod_sign = l) -> exists ff_a_pointmod_sign ff_r_pointmod_sign ff_s_pointmod_sign. ((((exists ff_h_pointmod_sign_summand. ff_h_pointmod_sign_summand + S (ff_a_pointmod_sign) = S ((S (ff_i_pointmod_sign)) * sc)) /\ exists ff_q_pointmod_sign_summand. sb = ff_q_pointmod_sign_summand * S ((S (ff_i_pointmod_sign)) * sc) + (ff_a_pointmod_sign))) /\ ((((exists ff_h_pointmod_sign_partial. ff_h_pointmod_sign_partial + S (ff_r_pointmod_sign) = S ((S (ff_i_pointmod_sign)) * ff_v_pointmod_sign)) /\ exists ff_q_pointmod_sign_partial. ff_u_pointmod_sign = ff_q_pointmod_sign_partial * S ((S (ff_i_pointmod_sign)) * ff_v_pointmod_sign) + (ff_r_pointmod_sign))) /\ ((((exists ff_h_pointmod_sign_successor. ff_h_pointmod_sign_successor + S (ff_s_pointmod_sign) = S ((S (S ff_i_pointmod_sign)) * ff_v_pointmod_sign)) /\ exists ff_q_pointmod_sign_successor. ff_u_pointmod_sign = ff_q_pointmod_sign_successor * S ((S (S ff_i_pointmod_sign)) * ff_v_pointmod_sign) + (ff_s_pointmod_sign))) /\ ff_s_pointmod_sign = ff_r_pointmod_sign + ff_a_pointmod_sign)))))) -> (forall i x q m s. (exists h. h + S i = l) -> (((exists ff_h_pointmod_source_entry. ff_h_pointmod_source_entry + S (x) = S ((S (i)) * c)) /\ exists ff_q_pointmod_source_entry. b = ff_q_pointmod_source_entry * S ((S (i)) * c) + (x))) -> (((exists ff_h_pointmod_quotient_entry. ff_h_pointmod_quotient_entry + S (q) = S ((S (i)) * qc)) /\ exists ff_q_pointmod_quotient_entry. qb = ff_q_pointmod_quotient_entry * S ((S (i)) * qc) + (q))) -> (((exists ff_h_pointmod_magnitude_entry. ff_h_pointmod_magnitude_entry + S (m) = S ((S (i)) * mc)) /\ exists ff_q_pointmod_magnitude_entry. mb = ff_q_pointmod_magnitude_entry * S ((S (i)) * mc) + (m))) -> (((exists ff_h_pointmod_sign_entry. ff_h_pointmod_sign_entry + S (s) = S ((S (i)) * sc)) /\ exists ff_q_pointmod_sign_entry. sb = ff_q_pointmod_sign_entry * S ((S (i)) * sc) + (s))) -> (exists fspm_u_pointmod_entry fspm_v_pointmod_entry. (x) + d * fspm_u_pointmod_entry = (q + m + s) + d * fspm_v_pointmod_entry)) -> (exists fspm_u_pointmod_endpoint fspm_v_pointmod_endpoint. (X) + d * fspm_u_pointmod_endpoint = (Q + M + E) + d * fspm_v_pointmod_endpoint)

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only local propositions introduced by have or suffices are compacted. The untrusted compiler re-expands each one before the original tactic script is replayed; defined notation is never accepted by the kernel. Open the exact replay line beneath every changed command.

Read the argument

Proof checkpoints

181 script commands · 33 reading checkpoints · 13 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 (7)
01Fix variables and assumptionsL1–9

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

  1. L1
    intro d
  2. L2
    intro b
  3. L3
    intro c
  4. L4
    intro qb
  5. L5
    intro qc
  6. L6
    intro mb
  7. L7
    intro mc
  8. L8
    intro sb
  9. L9
    intro sc
02Induction on lL10–19

Split the argument into the base and successor obligations. The induction hypothesis is available only in the successor branch.

  1. L10
    induction l
  2. L11
    intro X
  3. L12
    intro Q
  4. L13
    intro M
  5. L14
    intro E
  6. L15
    intro hsource
  7. L16
    intro hquotient
  8. L17
    intro hmagnitude
  9. L18
    intro hsign
  10. L19
    intro hpointwise
03Establish hXL20–25

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

  1. L20
    have hX : X = 0
  2. L21
    specialize beta_sum_zero b
  3. L22
    specialize beta_sum_zero c
  4. L23
    specialize beta_sum_zero X
  5. L24
    apply beta_sum_zero
  6. L25
    exact hsource
04Establish hQL26–31

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

  1. L26
    have hQ : Q = 0
  2. L27
    specialize beta_sum_zero qb
  3. L28
    specialize beta_sum_zero qc
  4. L29
    specialize beta_sum_zero Q
  5. L30
    apply beta_sum_zero
  6. L31
    exact hquotient
05Establish hML32–37

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

  1. L32
    have hM : M = 0
  2. L33
    specialize beta_sum_zero mb
  3. L34
    specialize beta_sum_zero mc
  4. L35
    specialize beta_sum_zero M
  5. L36
    apply beta_sum_zero
  6. L37
    exact hmagnitude
06Establish hEL38–47

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

  1. L38
    have hE : E = 0
  2. L39
    specialize beta_sum_zero sb
  3. L40
    specialize beta_sum_zero sc
  4. L41
    specialize beta_sum_zero E
  5. L42
    apply beta_sum_zero
  6. L43
    exact hsign
  7. L44
    rewrite hX
  8. L45
    rewrite hQ
  9. L46
    rewrite hM
  10. L47
    rewrite hE
07Construct an explicit witnessL48–49

Supply the displayed value, then prove that it has the required property.

  1. L48
    exists 0
  2. L49
    exists 0
08Calculate and transport equalitiesL50–50

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

  1. L50
    norm_num
09Fix variables and assumptionsL51–59

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

  1. L51
    intro X
  2. L52
    intro Q
  3. L53
    intro M
  4. L54
    intro E
  5. L55
    intro hsource
  6. L56
    intro hquotient
  7. L57
    intro hmagnitude
  8. L58
    intro hsign
  9. L59
    intro hpointwise
10Establish hsource_decompL60–66

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

  1. L60
    have hsource_decomp : ∃ a. ∃ r. BetaAt(b,c,l,a) ∧ (Sum(b,c,l,r) ∧ X = r + a)Definitions: BetaAt(b,c,l,a)Sum(b,c,l,r)Original native command in the exact edition
  2. L61
    specialize beta_sum_succ_decompose b
  3. L62
    specialize beta_sum_succ_decompose c
  4. L63
    specialize beta_sum_succ_decompose l
  5. L64
    specialize beta_sum_succ_decompose X
  6. L65
    apply beta_sum_succ_decompose
  7. L66
    exact hsource
11Separate the logical casesL67–70

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

  1. L67
    cases hsource_decomp
  2. L68
    cases hsource_decomp_witness
  3. L69
    cases hsource_decomp_witness_witness
  4. L70
    cases hsource_decomp_witness_witness_right
12Establish hquotient_decompL71–77

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

  1. L71
    have hquotient_decomp : ∃ a. ∃ r. BetaAt(qb,qc,l,a) ∧ (Sum(qb,qc,l,r) ∧ Q = r + a)Definitions: BetaAt(qb,qc,l,a)Sum(qb,qc,l,r)Original native command in the exact edition
  2. L72
    specialize beta_sum_succ_decompose qb
  3. L73
    specialize beta_sum_succ_decompose qc
  4. L74
    specialize beta_sum_succ_decompose l
  5. L75
    specialize beta_sum_succ_decompose Q
  6. L76
    apply beta_sum_succ_decompose
  7. L77
    exact hquotient
13Separate the logical casesL78–81

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

  1. L78
    cases hquotient_decomp
  2. L79
    cases hquotient_decomp_witness
  3. L80
    cases hquotient_decomp_witness_witness
  4. L81
    cases hquotient_decomp_witness_witness_right
14Establish hmagnitude_decompL82–88

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

  1. L82
    have hmagnitude_decomp : ∃ a. ∃ r. BetaAt(mb,mc,l,a) ∧ (Sum(mb,mc,l,r) ∧ M = r + a)Definitions: BetaAt(mb,mc,l,a)Sum(mb,mc,l,r)Original native command in the exact edition
  2. L83
    specialize beta_sum_succ_decompose mb
  3. L84
    specialize beta_sum_succ_decompose mc
  4. L85
    specialize beta_sum_succ_decompose l
  5. L86
    specialize beta_sum_succ_decompose M
  6. L87
    apply beta_sum_succ_decompose
  7. L88
    exact hmagnitude
15Separate the logical casesL89–92

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

  1. L89
    cases hmagnitude_decomp
  2. L90
    cases hmagnitude_decomp_witness
  3. L91
    cases hmagnitude_decomp_witness_witness
  4. L92
    cases hmagnitude_decomp_witness_witness_right
16Establish hsign_decompL93–99

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

  1. L93
    have hsign_decomp : ∃ a. ∃ r. BetaAt(sb,sc,l,a) ∧ (Sum(sb,sc,l,r) ∧ E = r + a)Definitions: BetaAt(sb,sc,l,a)Sum(sb,sc,l,r)Original native command in the exact edition
  2. L94
    specialize beta_sum_succ_decompose sb
  3. L95
    specialize beta_sum_succ_decompose sc
  4. L96
    specialize beta_sum_succ_decompose l
  5. L97
    specialize beta_sum_succ_decompose E
  6. L98
    apply beta_sum_succ_decompose
  7. L99
    exact hsign
17Separate the logical casesL100–103

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

  1. L100
    cases hsign_decomp
  2. L101
    cases hsign_decomp_witness
  3. L102
    cases hsign_decomp_witness_witness
  4. L103
    cases hsign_decomp_witness_witness_right
18Establish hprefix_pointwiseL104–113

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

  1. L104
    have hprefix_pointwise : ∀ i. ∀ x. ∀ q. ∀ m. ∀ s. Lt(i,l) → BetaAt(b,c,i,x) → BetaAt(qb,qc,i,q) → BetaAt(mb,mc,i,m) → BetaAt(sb,sc,i,s) → ModEq(d,x,q + m + s)Definitions: Lt(i,l)BetaAt(b,c,i,x)BetaAt(qb,qc,i,q)BetaAt(mb,mc,i,m)BetaAt(sb,sc,i,s)ModEq(d,x,q + m + s)Original native command in the exact edition
  2. L105
    intro i
  3. L106
    intro y
  4. L107
    intro q
  5. L108
    intro m
  6. L109
    intro s
  7. L110
    intro hi
  8. L111
    intro hy
  9. L112
    intro hq
  10. L113
    intro hm
19Fix variables and assumptionsL114–114

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

  1. L114
    intro hs
20Use earlier factsL115–124

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

  1. L115
    specialize hpointwise i
  2. L116
    specialize hpointwise y
  3. L117
    specialize hpointwise q
  4. L118
    specialize hpointwise m
  5. L119
    specialize hpointwise s
  6. L120
    apply hpointwise
  7. L121
    specialize le_succ (S i)
  8. L122
    specialize le_succ l
  9. L123
    apply le_succ
  10. L124
    exact hi
21Use earlier factsL125–128

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

  1. L125
    exact hy
  2. L126
    exact hq
  3. L127
    exact hm
  4. L128
    exact hs
22Establish hprefixL129–138

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

  1. L129
    have hprefix : ModEq(d,x1,x3 + x5 + x7)Definitions: ModEq(d,x1,x3 + x5 + x7)Original native command in the exact edition
  2. L130
    specialize IH x1
  3. L131
    specialize IH x3
  4. L132
    specialize IH x5
  5. L133
    specialize IH x7
  6. L134
    apply IH
  7. L135
    exact hsource_decomp_witness_witness_right_left
  8. L136
    exact hquotient_decomp_witness_witness_right_left
  9. L137
    exact hmagnitude_decomp_witness_witness_right_left
  10. L138
    exact hsign_decomp_witness_witness_right_left
23Use earlier factsL139–139

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

  1. L139
    exact hprefix_pointwise
24Establish hlastL140–149

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

  1. L140
    have hlast : ModEq(d,x,x2 + x4 + x6)Definitions: ModEq(d,x,x2 + x4 + x6)Original native command in the exact edition
  2. L141
    specialize hpointwise l
  3. L142
    specialize hpointwise x
  4. L143
    specialize hpointwise x2
  5. L144
    specialize hpointwise x4
  6. L145
    specialize hpointwise x6
  7. L146
    apply hpointwise
  8. L147
    specialize le_refl (S l)
  9. L148
    exact le_refl
  10. L149
    exact hsource_decomp_witness_witness_left
25Use earlier factsL150–152

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

  1. L150
    exact hquotient_decomp_witness_witness_left
  2. L151
    exact hmagnitude_decomp_witness_witness_left
  3. L152
    exact hsign_decomp_witness_witness_left
26Establish hcombinedL153–161

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

  1. L153
    have hcombined : ModEq(d,x1 + x,x3 + x5 + x7 + (x2 + x4 + x6))Definitions: ModEq(d,x1 + x,x3 + x5 + x7 + (x2 + x4 + x6))Original native command in the exact edition
  2. L154
    specialize mod_eq_add d
  3. L155
    specialize mod_eq_add x1
  4. L156
    specialize mod_eq_add (x3 + x5 + x7)
  5. L157
    specialize mod_eq_add x
  6. L158
    specialize mod_eq_add (x2 + x4 + x6)
  7. L159
    apply mod_eq_add
  8. L160
    exact hprefix
  9. L161
    exact hlast
27Establish hreorderL162–171

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

  1. L162
    have hreorder : (x3 + x5 + x7) + (x2 + x4 + x6) = (x3 + x2) + (x5 + x4) + (x7 + x6)
  2. L163
    simp [add_assoc, add_comm, add_permute_outer]
  3. L164
    congr
  4. L165
    refl
  5. L166
    congr
  6. L167
    refl
  7. L168
    trans (x7 + x4) + (x6 + x2)
  8. L169
    symm
  9. L170
    apply add_assoc
  10. L171
    trans (x4 + x7) + (x6 + x2)
28Calculate and transport equalitiesL172–172

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

  1. L172
    congr
29Use earlier factsL173–173

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

  1. L173
    apply add_comm
30Calculate and transport equalitiesL174–174

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

  1. L174
    refl
31Use earlier factsL175–175

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

  1. L175
    apply add_assoc
32Calculate and transport equalitiesL176–180

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

  1. L176
    rewrite hreorder at hcombined
  2. L177
    rewrite hsource_decomp_witness_witness_right_right
  3. L178
    rewrite hquotient_decomp_witness_witness_right_right
  4. L179
    rewrite hmagnitude_decomp_witness_witness_right_right
  5. L180
    rewrite hsign_decomp_witness_witness_right_right
33Use earlier factsL181–181

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

  1. L181
    exact hcombined

Library-wide reading audit

Original defined command ledger · 181 lines
  1. 0001intro d
  2. 0002intro b
  3. 0003intro c
  4. 0004intro qb
  5. 0005intro qc
  6. 0006intro mb
  7. 0007intro mc
  8. 0008intro sb
  9. 0009intro sc
  10. 0010induction l
  11. 0011intro X
  12. 0012intro Q
  13. 0013intro M
  14. 0014intro E
  15. 0015intro hsource
  16. 0016intro hquotient
  17. 0017intro hmagnitude
  18. 0018intro hsign
  19. 0019intro hpointwise
  20. 0020have hX : X = 0
  21. 0021specialize beta_sum_zero b
  22. 0022specialize beta_sum_zero c
  23. 0023specialize beta_sum_zero X
  24. 0024apply beta_sum_zero
  25. 0025exact hsource
  26. 0026have hQ : Q = 0
  27. 0027specialize beta_sum_zero qb
  28. 0028specialize beta_sum_zero qc
  29. 0029specialize beta_sum_zero Q
  30. 0030apply beta_sum_zero
  31. 0031exact hquotient
  32. 0032have hM : M = 0
  33. 0033specialize beta_sum_zero mb
  34. 0034specialize beta_sum_zero mc
  35. 0035specialize beta_sum_zero M
  36. 0036apply beta_sum_zero
  37. 0037exact hmagnitude
  38. 0038have hE : E = 0
  39. 0039specialize beta_sum_zero sb
  40. 0040specialize beta_sum_zero sc
  41. 0041specialize beta_sum_zero E
  42. 0042apply beta_sum_zero
  43. 0043exact hsign
  44. 0044rewrite hX
  45. 0045rewrite hQ
  46. 0046rewrite hM
  47. 0047rewrite hE
  48. 0048exists 0
  49. 0049exists 0
  50. 0050norm_num
  51. 0051intro X
  52. 0052intro Q
  53. 0053intro M
  54. 0054intro E
  55. 0055intro hsource
  56. 0056intro hquotient
  57. 0057intro hmagnitude
  58. 0058intro hsign
  59. 0059intro hpointwise
  60. 0060have hsource_decomp : ∃ a. ∃ r. BetaAt(b,c,l,a) ∧ (Sum(b,c,l,r) ∧ X = r + a)
    Exact native replay linehave hsource_decomp : exists a r. (((exists ff_h_pointmod_source_decomp_entry. ff_h_pointmod_source_decomp_entry + S (a) = S ((S (l)) * c)) /\ exists ff_q_pointmod_source_decomp_entry. b = ff_q_pointmod_source_decomp_entry * S ((S (l)) * c) + (a))) /\ ((exists ff_u_pointmod_source_decomp_prefix ff_v_pointmod_source_decomp_prefix. ((((exists ff_h_pointmod_source_decomp_prefix_start. ff_h_pointmod_source_decomp_prefix_start + S (0) = S ((S (0)) * ff_v_pointmod_source_decomp_prefix)) /\ exists ff_q_pointmod_source_decomp_prefix_start. ff_u_pointmod_source_decomp_prefix = ff_q_pointmod_source_decomp_prefix_start * S ((S (0)) * ff_v_pointmod_source_decomp_prefix) + (0))) /\ ((((exists ff_h_pointmod_source_decomp_prefix_terminal. ff_h_pointmod_source_decomp_prefix_terminal + S (r) = S ((S (l)) * ff_v_pointmod_source_decomp_prefix)) /\ exists ff_q_pointmod_source_decomp_prefix_terminal. ff_u_pointmod_source_decomp_prefix = ff_q_pointmod_source_decomp_prefix_terminal * S ((S (l)) * ff_v_pointmod_source_decomp_prefix) + (r))) /\ forall ff_i_pointmod_source_decomp_prefix. (exists ff_lt_pointmod_source_decomp_prefix_bound. ff_lt_pointmod_source_decomp_prefix_bound + S ff_i_pointmod_source_decomp_prefix = l) -> exists ff_a_pointmod_source_decomp_prefix ff_r_pointmod_source_decomp_prefix ff_s_pointmod_source_decomp_prefix. ((((exists ff_h_pointmod_source_decomp_prefix_summand. ff_h_pointmod_source_decomp_prefix_summand + S (ff_a_pointmod_source_decomp_prefix) = S ((S (ff_i_pointmod_source_decomp_prefix)) * c)) /\ exists ff_q_pointmod_source_decomp_prefix_summand. b = ff_q_pointmod_source_decomp_prefix_summand * S ((S (ff_i_pointmod_source_decomp_prefix)) * c) + (ff_a_pointmod_source_decomp_prefix))) /\ ((((exists ff_h_pointmod_source_decomp_prefix_partial. ff_h_pointmod_source_decomp_prefix_partial + S (ff_r_pointmod_source_decomp_prefix) = S ((S (ff_i_pointmod_source_decomp_prefix)) * ff_v_pointmod_source_decomp_prefix)) /\ exists ff_q_pointmod_source_decomp_prefix_partial. ff_u_pointmod_source_decomp_prefix = ff_q_pointmod_source_decomp_prefix_partial * S ((S (ff_i_pointmod_source_decomp_prefix)) * ff_v_pointmod_source_decomp_prefix) + (ff_r_pointmod_source_decomp_prefix))) /\ ((((exists ff_h_pointmod_source_decomp_prefix_successor. ff_h_pointmod_source_decomp_prefix_successor + S (ff_s_pointmod_source_decomp_prefix) = S ((S (S ff_i_pointmod_source_decomp_prefix)) * ff_v_pointmod_source_decomp_prefix)) /\ exists ff_q_pointmod_source_decomp_prefix_successor. ff_u_pointmod_source_decomp_prefix = ff_q_pointmod_source_decomp_prefix_successor * S ((S (S ff_i_pointmod_source_decomp_prefix)) * ff_v_pointmod_source_decomp_prefix) + (ff_s_pointmod_source_decomp_prefix))) /\ ff_s_pointmod_source_decomp_prefix = ff_r_pointmod_source_decomp_prefix + ff_a_pointmod_source_decomp_prefix)))))) /\ X = r + a)
  61. 0061specialize beta_sum_succ_decompose b
  62. 0062specialize beta_sum_succ_decompose c
  63. 0063specialize beta_sum_succ_decompose l
  64. 0064specialize beta_sum_succ_decompose X
  65. 0065apply beta_sum_succ_decompose
  66. 0066exact hsource
  67. 0067cases hsource_decomp
  68. 0068cases hsource_decomp_witness
  69. 0069cases hsource_decomp_witness_witness
  70. 0070cases hsource_decomp_witness_witness_right
  71. 0071have hquotient_decomp : ∃ a. ∃ r. BetaAt(qb,qc,l,a) ∧ (Sum(qb,qc,l,r) ∧ Q = r + a)
    Exact native replay linehave hquotient_decomp : exists a r. (((exists ff_h_pointmod_quotient_decomp_entry. ff_h_pointmod_quotient_decomp_entry + S (a) = S ((S (l)) * qc)) /\ exists ff_q_pointmod_quotient_decomp_entry. qb = ff_q_pointmod_quotient_decomp_entry * S ((S (l)) * qc) + (a))) /\ ((exists ff_u_pointmod_quotient_decomp_prefix ff_v_pointmod_quotient_decomp_prefix. ((((exists ff_h_pointmod_quotient_decomp_prefix_start. ff_h_pointmod_quotient_decomp_prefix_start + S (0) = S ((S (0)) * ff_v_pointmod_quotient_decomp_prefix)) /\ exists ff_q_pointmod_quotient_decomp_prefix_start. ff_u_pointmod_quotient_decomp_prefix = ff_q_pointmod_quotient_decomp_prefix_start * S ((S (0)) * ff_v_pointmod_quotient_decomp_prefix) + (0))) /\ ((((exists ff_h_pointmod_quotient_decomp_prefix_terminal. ff_h_pointmod_quotient_decomp_prefix_terminal + S (r) = S ((S (l)) * ff_v_pointmod_quotient_decomp_prefix)) /\ exists ff_q_pointmod_quotient_decomp_prefix_terminal. ff_u_pointmod_quotient_decomp_prefix = ff_q_pointmod_quotient_decomp_prefix_terminal * S ((S (l)) * ff_v_pointmod_quotient_decomp_prefix) + (r))) /\ forall ff_i_pointmod_quotient_decomp_prefix. (exists ff_lt_pointmod_quotient_decomp_prefix_bound. ff_lt_pointmod_quotient_decomp_prefix_bound + S ff_i_pointmod_quotient_decomp_prefix = l) -> exists ff_a_pointmod_quotient_decomp_prefix ff_r_pointmod_quotient_decomp_prefix ff_s_pointmod_quotient_decomp_prefix. ((((exists ff_h_pointmod_quotient_decomp_prefix_summand. ff_h_pointmod_quotient_decomp_prefix_summand + S (ff_a_pointmod_quotient_decomp_prefix) = S ((S (ff_i_pointmod_quotient_decomp_prefix)) * qc)) /\ exists ff_q_pointmod_quotient_decomp_prefix_summand. qb = ff_q_pointmod_quotient_decomp_prefix_summand * S ((S (ff_i_pointmod_quotient_decomp_prefix)) * qc) + (ff_a_pointmod_quotient_decomp_prefix))) /\ ((((exists ff_h_pointmod_quotient_decomp_prefix_partial. ff_h_pointmod_quotient_decomp_prefix_partial + S (ff_r_pointmod_quotient_decomp_prefix) = S ((S (ff_i_pointmod_quotient_decomp_prefix)) * ff_v_pointmod_quotient_decomp_prefix)) /\ exists ff_q_pointmod_quotient_decomp_prefix_partial. ff_u_pointmod_quotient_decomp_prefix = ff_q_pointmod_quotient_decomp_prefix_partial * S ((S (ff_i_pointmod_quotient_decomp_prefix)) * ff_v_pointmod_quotient_decomp_prefix) + (ff_r_pointmod_quotient_decomp_prefix))) /\ ((((exists ff_h_pointmod_quotient_decomp_prefix_successor. ff_h_pointmod_quotient_decomp_prefix_successor + S (ff_s_pointmod_quotient_decomp_prefix) = S ((S (S ff_i_pointmod_quotient_decomp_prefix)) * ff_v_pointmod_quotient_decomp_prefix)) /\ exists ff_q_pointmod_quotient_decomp_prefix_successor. ff_u_pointmod_quotient_decomp_prefix = ff_q_pointmod_quotient_decomp_prefix_successor * S ((S (S ff_i_pointmod_quotient_decomp_prefix)) * ff_v_pointmod_quotient_decomp_prefix) + (ff_s_pointmod_quotient_decomp_prefix))) /\ ff_s_pointmod_quotient_decomp_prefix = ff_r_pointmod_quotient_decomp_prefix + ff_a_pointmod_quotient_decomp_prefix)))))) /\ Q = r + a)
  72. 0072specialize beta_sum_succ_decompose qb
  73. 0073specialize beta_sum_succ_decompose qc
  74. 0074specialize beta_sum_succ_decompose l
  75. 0075specialize beta_sum_succ_decompose Q
  76. 0076apply beta_sum_succ_decompose
  77. 0077exact hquotient
  78. 0078cases hquotient_decomp
  79. 0079cases hquotient_decomp_witness
  80. 0080cases hquotient_decomp_witness_witness
  81. 0081cases hquotient_decomp_witness_witness_right
  82. 0082have hmagnitude_decomp : ∃ a. ∃ r. BetaAt(mb,mc,l,a) ∧ (Sum(mb,mc,l,r) ∧ M = r + a)
    Exact native replay linehave hmagnitude_decomp : exists a r. (((exists ff_h_pointmod_magnitude_decomp_entry. ff_h_pointmod_magnitude_decomp_entry + S (a) = S ((S (l)) * mc)) /\ exists ff_q_pointmod_magnitude_decomp_entry. mb = ff_q_pointmod_magnitude_decomp_entry * S ((S (l)) * mc) + (a))) /\ ((exists ff_u_pointmod_magnitude_decomp_prefix ff_v_pointmod_magnitude_decomp_prefix. ((((exists ff_h_pointmod_magnitude_decomp_prefix_start. ff_h_pointmod_magnitude_decomp_prefix_start + S (0) = S ((S (0)) * ff_v_pointmod_magnitude_decomp_prefix)) /\ exists ff_q_pointmod_magnitude_decomp_prefix_start. ff_u_pointmod_magnitude_decomp_prefix = ff_q_pointmod_magnitude_decomp_prefix_start * S ((S (0)) * ff_v_pointmod_magnitude_decomp_prefix) + (0))) /\ ((((exists ff_h_pointmod_magnitude_decomp_prefix_terminal. ff_h_pointmod_magnitude_decomp_prefix_terminal + S (r) = S ((S (l)) * ff_v_pointmod_magnitude_decomp_prefix)) /\ exists ff_q_pointmod_magnitude_decomp_prefix_terminal. ff_u_pointmod_magnitude_decomp_prefix = ff_q_pointmod_magnitude_decomp_prefix_terminal * S ((S (l)) * ff_v_pointmod_magnitude_decomp_prefix) + (r))) /\ forall ff_i_pointmod_magnitude_decomp_prefix. (exists ff_lt_pointmod_magnitude_decomp_prefix_bound. ff_lt_pointmod_magnitude_decomp_prefix_bound + S ff_i_pointmod_magnitude_decomp_prefix = l) -> exists ff_a_pointmod_magnitude_decomp_prefix ff_r_pointmod_magnitude_decomp_prefix ff_s_pointmod_magnitude_decomp_prefix. ((((exists ff_h_pointmod_magnitude_decomp_prefix_summand. ff_h_pointmod_magnitude_decomp_prefix_summand + S (ff_a_pointmod_magnitude_decomp_prefix) = S ((S (ff_i_pointmod_magnitude_decomp_prefix)) * mc)) /\ exists ff_q_pointmod_magnitude_decomp_prefix_summand. mb = ff_q_pointmod_magnitude_decomp_prefix_summand * S ((S (ff_i_pointmod_magnitude_decomp_prefix)) * mc) + (ff_a_pointmod_magnitude_decomp_prefix))) /\ ((((exists ff_h_pointmod_magnitude_decomp_prefix_partial. ff_h_pointmod_magnitude_decomp_prefix_partial + S (ff_r_pointmod_magnitude_decomp_prefix) = S ((S (ff_i_pointmod_magnitude_decomp_prefix)) * ff_v_pointmod_magnitude_decomp_prefix)) /\ exists ff_q_pointmod_magnitude_decomp_prefix_partial. ff_u_pointmod_magnitude_decomp_prefix = ff_q_pointmod_magnitude_decomp_prefix_partial * S ((S (ff_i_pointmod_magnitude_decomp_prefix)) * ff_v_pointmod_magnitude_decomp_prefix) + (ff_r_pointmod_magnitude_decomp_prefix))) /\ ((((exists ff_h_pointmod_magnitude_decomp_prefix_successor. ff_h_pointmod_magnitude_decomp_prefix_successor + S (ff_s_pointmod_magnitude_decomp_prefix) = S ((S (S ff_i_pointmod_magnitude_decomp_prefix)) * ff_v_pointmod_magnitude_decomp_prefix)) /\ exists ff_q_pointmod_magnitude_decomp_prefix_successor. ff_u_pointmod_magnitude_decomp_prefix = ff_q_pointmod_magnitude_decomp_prefix_successor * S ((S (S ff_i_pointmod_magnitude_decomp_prefix)) * ff_v_pointmod_magnitude_decomp_prefix) + (ff_s_pointmod_magnitude_decomp_prefix))) /\ ff_s_pointmod_magnitude_decomp_prefix = ff_r_pointmod_magnitude_decomp_prefix + ff_a_pointmod_magnitude_decomp_prefix)))))) /\ M = r + a)
  83. 0083specialize beta_sum_succ_decompose mb
  84. 0084specialize beta_sum_succ_decompose mc
  85. 0085specialize beta_sum_succ_decompose l
  86. 0086specialize beta_sum_succ_decompose M
  87. 0087apply beta_sum_succ_decompose
  88. 0088exact hmagnitude
  89. 0089cases hmagnitude_decomp
  90. 0090cases hmagnitude_decomp_witness
  91. 0091cases hmagnitude_decomp_witness_witness
  92. 0092cases hmagnitude_decomp_witness_witness_right
  93. 0093have hsign_decomp : ∃ a. ∃ r. BetaAt(sb,sc,l,a) ∧ (Sum(sb,sc,l,r) ∧ E = r + a)
    Exact native replay linehave hsign_decomp : exists a r. (((exists ff_h_pointmod_sign_decomp_entry. ff_h_pointmod_sign_decomp_entry + S (a) = S ((S (l)) * sc)) /\ exists ff_q_pointmod_sign_decomp_entry. sb = ff_q_pointmod_sign_decomp_entry * S ((S (l)) * sc) + (a))) /\ ((exists ff_u_pointmod_sign_decomp_prefix ff_v_pointmod_sign_decomp_prefix. ((((exists ff_h_pointmod_sign_decomp_prefix_start. ff_h_pointmod_sign_decomp_prefix_start + S (0) = S ((S (0)) * ff_v_pointmod_sign_decomp_prefix)) /\ exists ff_q_pointmod_sign_decomp_prefix_start. ff_u_pointmod_sign_decomp_prefix = ff_q_pointmod_sign_decomp_prefix_start * S ((S (0)) * ff_v_pointmod_sign_decomp_prefix) + (0))) /\ ((((exists ff_h_pointmod_sign_decomp_prefix_terminal. ff_h_pointmod_sign_decomp_prefix_terminal + S (r) = S ((S (l)) * ff_v_pointmod_sign_decomp_prefix)) /\ exists ff_q_pointmod_sign_decomp_prefix_terminal. ff_u_pointmod_sign_decomp_prefix = ff_q_pointmod_sign_decomp_prefix_terminal * S ((S (l)) * ff_v_pointmod_sign_decomp_prefix) + (r))) /\ forall ff_i_pointmod_sign_decomp_prefix. (exists ff_lt_pointmod_sign_decomp_prefix_bound. ff_lt_pointmod_sign_decomp_prefix_bound + S ff_i_pointmod_sign_decomp_prefix = l) -> exists ff_a_pointmod_sign_decomp_prefix ff_r_pointmod_sign_decomp_prefix ff_s_pointmod_sign_decomp_prefix. ((((exists ff_h_pointmod_sign_decomp_prefix_summand. ff_h_pointmod_sign_decomp_prefix_summand + S (ff_a_pointmod_sign_decomp_prefix) = S ((S (ff_i_pointmod_sign_decomp_prefix)) * sc)) /\ exists ff_q_pointmod_sign_decomp_prefix_summand. sb = ff_q_pointmod_sign_decomp_prefix_summand * S ((S (ff_i_pointmod_sign_decomp_prefix)) * sc) + (ff_a_pointmod_sign_decomp_prefix))) /\ ((((exists ff_h_pointmod_sign_decomp_prefix_partial. ff_h_pointmod_sign_decomp_prefix_partial + S (ff_r_pointmod_sign_decomp_prefix) = S ((S (ff_i_pointmod_sign_decomp_prefix)) * ff_v_pointmod_sign_decomp_prefix)) /\ exists ff_q_pointmod_sign_decomp_prefix_partial. ff_u_pointmod_sign_decomp_prefix = ff_q_pointmod_sign_decomp_prefix_partial * S ((S (ff_i_pointmod_sign_decomp_prefix)) * ff_v_pointmod_sign_decomp_prefix) + (ff_r_pointmod_sign_decomp_prefix))) /\ ((((exists ff_h_pointmod_sign_decomp_prefix_successor. ff_h_pointmod_sign_decomp_prefix_successor + S (ff_s_pointmod_sign_decomp_prefix) = S ((S (S ff_i_pointmod_sign_decomp_prefix)) * ff_v_pointmod_sign_decomp_prefix)) /\ exists ff_q_pointmod_sign_decomp_prefix_successor. ff_u_pointmod_sign_decomp_prefix = ff_q_pointmod_sign_decomp_prefix_successor * S ((S (S ff_i_pointmod_sign_decomp_prefix)) * ff_v_pointmod_sign_decomp_prefix) + (ff_s_pointmod_sign_decomp_prefix))) /\ ff_s_pointmod_sign_decomp_prefix = ff_r_pointmod_sign_decomp_prefix + ff_a_pointmod_sign_decomp_prefix)))))) /\ E = r + a)
  94. 0094specialize beta_sum_succ_decompose sb
  95. 0095specialize beta_sum_succ_decompose sc
  96. 0096specialize beta_sum_succ_decompose l
  97. 0097specialize beta_sum_succ_decompose E
  98. 0098apply beta_sum_succ_decompose
  99. 0099exact hsign
  100. 0100cases hsign_decomp
  101. 0101cases hsign_decomp_witness
  102. 0102cases hsign_decomp_witness_witness
  103. 0103cases hsign_decomp_witness_witness_right
  104. 0104have hprefix_pointwise : ∀ i. ∀ x. ∀ q. ∀ m. ∀ s. Lt(i,l)BetaAt(b,c,i,x)BetaAt(qb,qc,i,q)BetaAt(mb,mc,i,m)BetaAt(sb,sc,i,s)ModEq(d,x,q + m + s)
    Exact native replay linehave hprefix_pointwise : forall i x q m s. (exists h. h + S i = l) -> (((exists ff_h_pointmod_prefix_source_entry. ff_h_pointmod_prefix_source_entry + S (x) = S ((S (i)) * c)) /\ exists ff_q_pointmod_prefix_source_entry. b = ff_q_pointmod_prefix_source_entry * S ((S (i)) * c) + (x))) -> (((exists ff_h_pointmod_prefix_quotient_entry. ff_h_pointmod_prefix_quotient_entry + S (q) = S ((S (i)) * qc)) /\ exists ff_q_pointmod_prefix_quotient_entry. qb = ff_q_pointmod_prefix_quotient_entry * S ((S (i)) * qc) + (q))) -> (((exists ff_h_pointmod_prefix_magnitude_entry. ff_h_pointmod_prefix_magnitude_entry + S (m) = S ((S (i)) * mc)) /\ exists ff_q_pointmod_prefix_magnitude_entry. mb = ff_q_pointmod_prefix_magnitude_entry * S ((S (i)) * mc) + (m))) -> (((exists ff_h_pointmod_prefix_sign_entry. ff_h_pointmod_prefix_sign_entry + S (s) = S ((S (i)) * sc)) /\ exists ff_q_pointmod_prefix_sign_entry. sb = ff_q_pointmod_prefix_sign_entry * S ((S (i)) * sc) + (s))) -> (exists fspm_u_pointmod_prefix_entry fspm_v_pointmod_prefix_entry. (x) + d * fspm_u_pointmod_prefix_entry = (q + m + s) + d * fspm_v_pointmod_prefix_entry)
  105. 0105intro i
  106. 0106intro y
  107. 0107intro q
  108. 0108intro m
  109. 0109intro s
  110. 0110intro hi
  111. 0111intro hy
  112. 0112intro hq
  113. 0113intro hm
  114. 0114intro hs
  115. 0115specialize hpointwise i
  116. 0116specialize hpointwise y
  117. 0117specialize hpointwise q
  118. 0118specialize hpointwise m
  119. 0119specialize hpointwise s
  120. 0120apply hpointwise
  121. 0121specialize le_succ (S i)
  122. 0122specialize le_succ l
  123. 0123apply le_succ
  124. 0124exact hi
  125. 0125exact hy
  126. 0126exact hq
  127. 0127exact hm
  128. 0128exact hs
  129. 0129have hprefix : ModEq(d,x1,x3 + x5 + x7)
    Exact native replay linehave hprefix : exists fspm_u_pointmod_prefix fspm_v_pointmod_prefix. (x1) + d * fspm_u_pointmod_prefix = (x3 + x5 + x7) + d * fspm_v_pointmod_prefix
  130. 0130specialize IH x1
  131. 0131specialize IH x3
  132. 0132specialize IH x5
  133. 0133specialize IH x7
  134. 0134apply IH
  135. 0135exact hsource_decomp_witness_witness_right_left
  136. 0136exact hquotient_decomp_witness_witness_right_left
  137. 0137exact hmagnitude_decomp_witness_witness_right_left
  138. 0138exact hsign_decomp_witness_witness_right_left
  139. 0139exact hprefix_pointwise
  140. 0140have hlast : ModEq(d,x,x2 + x4 + x6)
    Exact native replay linehave hlast : exists fspm_u_pointmod_last fspm_v_pointmod_last. (x) + d * fspm_u_pointmod_last = (x2 + x4 + x6) + d * fspm_v_pointmod_last
  141. 0141specialize hpointwise l
  142. 0142specialize hpointwise x
  143. 0143specialize hpointwise x2
  144. 0144specialize hpointwise x4
  145. 0145specialize hpointwise x6
  146. 0146apply hpointwise
  147. 0147specialize le_refl (S l)
  148. 0148exact le_refl
  149. 0149exact hsource_decomp_witness_witness_left
  150. 0150exact hquotient_decomp_witness_witness_left
  151. 0151exact hmagnitude_decomp_witness_witness_left
  152. 0152exact hsign_decomp_witness_witness_left
  153. 0153have hcombined : ModEq(d,x1 + x,x3 + x5 + x7 + (x2 + x4 + x6))
    Exact native replay linehave hcombined : exists fspm_u_pointmod_combined fspm_v_pointmod_combined. (x1 + x) + d * fspm_u_pointmod_combined = ((x3 + x5 + x7) + (x2 + x4 + x6)) + d * fspm_v_pointmod_combined
  154. 0154specialize mod_eq_add d
  155. 0155specialize mod_eq_add x1
  156. 0156specialize mod_eq_add (x3 + x5 + x7)
  157. 0157specialize mod_eq_add x
  158. 0158specialize mod_eq_add (x2 + x4 + x6)
  159. 0159apply mod_eq_add
  160. 0160exact hprefix
  161. 0161exact hlast
  162. 0162have hreorder : (x3 + x5 + x7) + (x2 + x4 + x6) = (x3 + x2) + (x5 + x4) + (x7 + x6)
  163. 0163simp [add_assoc, add_comm, add_permute_outer]
  164. 0164congr
  165. 0165refl
  166. 0166congr
  167. 0167refl
  168. 0168trans (x7 + x4) + (x6 + x2)
  169. 0169symm
  170. 0170apply add_assoc
  171. 0171trans (x4 + x7) + (x6 + x2)
  172. 0172congr
  173. 0173apply add_comm
  174. 0174refl
  175. 0175apply add_assoc
  176. 0176rewrite hreorder at hcombined
  177. 0177rewrite hsource_decomp_witness_witness_right_right
  178. 0178rewrite hquotient_decomp_witness_witness_right_right
  179. 0179rewrite hmagnitude_decomp_witness_witness_right_right
  180. 0180rewrite hsign_decomp_witness_witness_right_right
  181. 0181exact hcombined