MX003A

signed_support_incidence_entry_exists

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Every cell is constructively computed from a real signed lookup, a real natural beta image, and decidable equality.

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 expanded first-order arithmetic statement

forall A r s i j. (exists dst_positive_code_entry_source_table dst_positive_scale_entry_source_table dst_negative_code_entry_source_table dst_negative_scale_entry_source_table. (((A) = (((((dst_positive_code_entry_source_table) + (dst_positive_scale_entry_source_table)) * S ((dst_positive_code_entry_source_table) + (dst_positive_scale_entry_source_table)) + ((dst_positive_scale_entry_source_table) + (dst_positive_scale_entry_source_table))) + (((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) * S ((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) + ((dst_negative_scale_entry_source_table) + (dst_negative_scale_entry_source_table)))) * S ((((dst_positive_code_entry_source_table) + (dst_positive_scale_entry_source_table)) * S ((dst_positive_code_entry_source_table) + (dst_positive_scale_entry_source_table)) + ((dst_positive_scale_entry_source_table) + (dst_positive_scale_entry_source_table))) + (((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) * S ((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) + ((dst_negative_scale_entry_source_table) + (dst_negative_scale_entry_source_table)))) + ((((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) * S ((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) + ((dst_negative_scale_entry_source_table) + (dst_negative_scale_entry_source_table))) + (((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) * S ((dst_negative_code_entry_source_table) + (dst_negative_scale_entry_source_table)) + ((dst_negative_scale_entry_source_table) + (dst_negative_scale_entry_source_table)))))) /\ (forall dst_index_entry_source_table. (exists pvs_le_gap_entry_source_tabledomain. pvs_le_gap_entry_source_tabledomain + (dst_index_entry_source_table) = (0)) -> exists dst_positive_entry_source_table dst_negative_entry_source_table dst_value_entry_source_table. ((((exists ff_h_pvs_entry_source_tableentrypositive. ff_h_pvs_entry_source_tableentrypositive + S (dst_positive_entry_source_table) = S ((S (dst_index_entry_source_table)) * dst_positive_scale_entry_source_table)) /\ exists ff_q_pvs_entry_source_tableentrypositive. dst_positive_code_entry_source_table = ff_q_pvs_entry_source_tableentrypositive * S ((S (dst_index_entry_source_table)) * dst_positive_scale_entry_source_table) + (dst_positive_entry_source_table))) /\ (((((exists ff_h_pvs_entry_source_tableentrynegative. ff_h_pvs_entry_source_tableentrynegative + S (dst_negative_entry_source_table) = S ((S (dst_index_entry_source_table)) * dst_negative_scale_entry_source_table)) /\ exists ff_q_pvs_entry_source_tableentrynegative. dst_negative_code_entry_source_table = ff_q_pvs_entry_source_tableentrynegative * S ((S (dst_index_entry_source_table)) * dst_negative_scale_entry_source_table) + (dst_negative_entry_source_table))) /\ (exists ge_balance_positive_entry_source_tableentryvalue ge_balance_negative_entry_source_tableentryvalue. (((((dst_value_entry_source_table) = 2 * (ge_balance_positive_entry_source_tableentryvalue) /\ (ge_balance_negative_entry_source_tableentryvalue) = 0) \/ exists ge_signed_half_entry_source_tableentryvaluedecode. (((dst_value_entry_source_table) = 2 * ge_signed_half_entry_source_tableentryvaluedecode + 1 /\ (ge_balance_positive_entry_source_tableentryvalue) = 0) /\ (ge_balance_negative_entry_source_tableentryvalue) = S ge_signed_half_entry_source_tableentryvaluedecode))) /\ ((dst_positive_entry_source_table) + ge_balance_negative_entry_source_tableentryvalue = (dst_negative_entry_source_table) + ge_balance_positive_entry_source_tableentryvalue))))))))) -> exists z. (exists ssr_entry_value_entry_total ssr_entry_image_entry_total. ((exists dst_positive_code_entry_totalsource dst_positive_scale_entry_totalsource dst_negative_code_entry_totalsource dst_negative_scale_entry_totalsource dst_positive_entry_totalsource dst_negative_entry_totalsource. (((A) = (((((dst_positive_code_entry_totalsource) + (dst_positive_scale_entry_totalsource)) * S ((dst_positive_code_entry_totalsource) + (dst_positive_scale_entry_totalsource)) + ((dst_positive_scale_entry_totalsource) + (dst_positive_scale_entry_totalsource))) + (((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) * S ((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) + ((dst_negative_scale_entry_totalsource) + (dst_negative_scale_entry_totalsource)))) * S ((((dst_positive_code_entry_totalsource) + (dst_positive_scale_entry_totalsource)) * S ((dst_positive_code_entry_totalsource) + (dst_positive_scale_entry_totalsource)) + ((dst_positive_scale_entry_totalsource) + (dst_positive_scale_entry_totalsource))) + (((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) * S ((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) + ((dst_negative_scale_entry_totalsource) + (dst_negative_scale_entry_totalsource)))) + ((((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) * S ((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) + ((dst_negative_scale_entry_totalsource) + (dst_negative_scale_entry_totalsource))) + (((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) * S ((dst_negative_code_entry_totalsource) + (dst_negative_scale_entry_totalsource)) + ((dst_negative_scale_entry_totalsource) + (dst_negative_scale_entry_totalsource)))))) /\ (((((exists ff_h_pvs_entry_totalsourcepositive. ff_h_pvs_entry_totalsourcepositive + S (dst_positive_entry_totalsource) = S ((S (i)) * dst_positive_scale_entry_totalsource)) /\ exists ff_q_pvs_entry_totalsourcepositive. dst_positive_code_entry_totalsource = ff_q_pvs_entry_totalsourcepositive * S ((S (i)) * dst_positive_scale_entry_totalsource) + (dst_positive_entry_totalsource))) /\ (((((exists ff_h_pvs_entry_totalsourcenegative. ff_h_pvs_entry_totalsourcenegative + S (dst_negative_entry_totalsource) = S ((S (i)) * dst_negative_scale_entry_totalsource)) /\ exists ff_q_pvs_entry_totalsourcenegative. dst_negative_code_entry_totalsource = ff_q_pvs_entry_totalsourcenegative * S ((S (i)) * dst_negative_scale_entry_totalsource) + (dst_negative_entry_totalsource))) /\ (exists ge_balance_positive_entry_totalsourcevalue ge_balance_negative_entry_totalsourcevalue. (((((ssr_entry_value_entry_total) = 2 * (ge_balance_positive_entry_totalsourcevalue) /\ (ge_balance_negative_entry_totalsourcevalue) = 0) \/ exists ge_signed_half_entry_totalsourcevaluedecode. (((ssr_entry_value_entry_total) = 2 * ge_signed_half_entry_totalsourcevaluedecode + 1 /\ (ge_balance_positive_entry_totalsourcevalue) = 0) /\ (ge_balance_negative_entry_totalsourcevalue) = S ge_signed_half_entry_totalsourcevaluedecode))) /\ ((dst_positive_entry_totalsource) + ge_balance_negative_entry_totalsourcevalue = (dst_negative_entry_totalsource) + ge_balance_positive_entry_totalsourcevalue))))))))) /\ (((((exists ff_h_pvs_entry_totalmap. ff_h_pvs_entry_totalmap + S (ssr_entry_image_entry_total) = S ((S (i)) * s)) /\ exists ff_q_pvs_entry_totalmap. r = ff_q_pvs_entry_totalmap * S ((S (i)) * s) + (ssr_entry_image_entry_total))) /\ (((((j)=(ssr_entry_image_entry_total)) /\ ((z)=(ssr_entry_value_entry_total)))) \/ (((~((j)=(ssr_entry_image_entry_total))) /\ ((z)=0))))))))

Constructive proof overview

Generated structural guide

Every cell is constructively computed from a real signed lookup, a real natural beta image, and decidable equality.

The unchanged tactic script uses 5 declared prerequisites and contains 48 exact native proof lines.

Alpha v34 checked-use · first admitted v32 · independently kernel and Lean verified; not Stable

Proof neighborhood

Direct dependencies

signed_table_lookup_any Alpha theorem; checked-use authorized beta_at_exists Stable theorem; checked-use authorized eq_decidable Stable theorem; checked-use authorized MX0036 signed_support_incidence_entry_hit MX0037 signed_support_incidence_entry_miss

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

48 script commands · 13 reading checkpoints · 3 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.

Named ingredients (2)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

01Fix variables and assumptionsL1–6

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

  1. L1
    intro A
  2. L2
    intro r
  3. L3
    intro s
  4. L4
    intro i
  5. L5
    intro j
  6. L6
    intro hA
02Establish haL7–12

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed table lookup any.

  1. L7
    have ha : ∃ a. ArithAt(A,i,a)Definitions: ArithAt
  2. L8
    specialize signed_table_lookup_any (0)
  3. L9
    specialize signed_table_lookup_any (A)
  4. L10
    specialize signed_table_lookup_any (i)
  5. L11
    apply signed_table_lookup_any
  6. L12
    exact hA
03Separate the logical casesL13–13

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

  1. L13
    cases ha
04Establish hmL14–18

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

  1. L14
    have hm : exists k. (((exists ff_h_pvs_entry_actual_map. ff_h_pvs_entry_actual_map + S (k) = S ((S (i)) * s)) /\ exists ff_q_pvs_entry_actual_map. r = ff_q_pvs_entry_actual_map * S ((S (i)) * s) + (k)))
  2. L15
    specialize beta_at_exists (r)
  3. L16
    specialize beta_at_exists (s)
  4. L17
    specialize beta_at_exists (i)
  5. L18
    apply beta_at_exists
05Separate the logical casesL19–19

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

  1. L19
    cases hm
06Establish hcL20–23

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

  1. L20
    have hc : j=x1 \/ ~(j=x1)
  2. L21
    specialize eq_decidable (j)
  3. L22
    specialize eq_decidable (x1)
  4. L23
    apply eq_decidable
07Separate the logical casesL24–24

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

  1. L24
    cases hc
08Construct an explicit witnessL25–25

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

  1. L25
    exists x
09Calculate and transport equalitiesL26–27

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

  1. L26
    rewrite hc_left
  2. L27
    rewrite hc_left
10Use earlier factsL28–36

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

  1. L28
    specialize signed_support_incidence_entry_hit (A)
  2. L29
    specialize signed_support_incidence_entry_hit (r)
  3. L30
    specialize signed_support_incidence_entry_hit (s)
  4. L31
    specialize signed_support_incidence_entry_hit (i)
  5. L32
    specialize signed_support_incidence_entry_hit (x1)
  6. L33
    specialize signed_support_incidence_entry_hit (x)
  7. L34
    apply signed_support_incidence_entry_hit
  8. L35
    exact ha_witness
  9. L36
    exact hm_witness
11Construct an explicit witnessL37–37

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

  1. L37
    exists 0
12Use earlier factsL38–47

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

  1. L38
    specialize signed_support_incidence_entry_miss (A)
  2. L39
    specialize signed_support_incidence_entry_miss (r)
  3. L40
    specialize signed_support_incidence_entry_miss (s)
  4. L41
    specialize signed_support_incidence_entry_miss (i)
  5. L42
    specialize signed_support_incidence_entry_miss (j)
  6. L43
    specialize signed_support_incidence_entry_miss (x1)
  7. L44
    specialize signed_support_incidence_entry_miss (x)
  8. L45
    apply signed_support_incidence_entry_miss
  9. L46
    exact ha_witness
  10. L47
    exact hm_witness
13Use earlier factsL48–48

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

  1. L48
    exact hc_right

Library-wide reading audit

Original exact command ledger · 48 lines
  1. 0001intro A
  2. 0002intro r
  3. 0003intro s
  4. 0004intro i
  5. 0005intro j
  6. 0006intro hA
  7. 0007have ha : exists a. (exists dst_positive_code_entry_actual_source dst_positive_scale_entry_actual_source dst_negative_code_entry_actual_source dst_negative_scale_entry_actual_source dst_positive_entry_actual_source dst_negative_entry_actual_source. (((A) = (((((dst_positive_code_entry_actual_source) + (dst_positive_scale_entry_actual_source)) * S ((dst_positive_code_entry_actual_source) + (dst_positive_scale_entry_actual_source)) + ((dst_positive_scale_entry_actual_source) + (dst_positive_scale_entry_actual_source))) + (((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) * S ((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) + ((dst_negative_scale_entry_actual_source) + (dst_negative_scale_entry_actual_source)))) * S ((((dst_positive_code_entry_actual_source) + (dst_positive_scale_entry_actual_source)) * S ((dst_positive_code_entry_actual_source) + (dst_positive_scale_entry_actual_source)) + ((dst_positive_scale_entry_actual_source) + (dst_positive_scale_entry_actual_source))) + (((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) * S ((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) + ((dst_negative_scale_entry_actual_source) + (dst_negative_scale_entry_actual_source)))) + ((((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) * S ((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) + ((dst_negative_scale_entry_actual_source) + (dst_negative_scale_entry_actual_source))) + (((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) * S ((dst_negative_code_entry_actual_source) + (dst_negative_scale_entry_actual_source)) + ((dst_negative_scale_entry_actual_source) + (dst_negative_scale_entry_actual_source)))))) /\ (((((exists ff_h_pvs_entry_actual_sourcepositive. ff_h_pvs_entry_actual_sourcepositive + S (dst_positive_entry_actual_source) = S ((S (i)) * dst_positive_scale_entry_actual_source)) /\ exists ff_q_pvs_entry_actual_sourcepositive. dst_positive_code_entry_actual_source = ff_q_pvs_entry_actual_sourcepositive * S ((S (i)) * dst_positive_scale_entry_actual_source) + (dst_positive_entry_actual_source))) /\ (((((exists ff_h_pvs_entry_actual_sourcenegative. ff_h_pvs_entry_actual_sourcenegative + S (dst_negative_entry_actual_source) = S ((S (i)) * dst_negative_scale_entry_actual_source)) /\ exists ff_q_pvs_entry_actual_sourcenegative. dst_negative_code_entry_actual_source = ff_q_pvs_entry_actual_sourcenegative * S ((S (i)) * dst_negative_scale_entry_actual_source) + (dst_negative_entry_actual_source))) /\ (exists ge_balance_positive_entry_actual_sourcevalue ge_balance_negative_entry_actual_sourcevalue. (((((a) = 2 * (ge_balance_positive_entry_actual_sourcevalue) /\ (ge_balance_negative_entry_actual_sourcevalue) = 0) \/ exists ge_signed_half_entry_actual_sourcevaluedecode. (((a) = 2 * ge_signed_half_entry_actual_sourcevaluedecode + 1 /\ (ge_balance_positive_entry_actual_sourcevalue) = 0) /\ (ge_balance_negative_entry_actual_sourcevalue) = S ge_signed_half_entry_actual_sourcevaluedecode))) /\ ((dst_positive_entry_actual_source) + ge_balance_negative_entry_actual_sourcevalue = (dst_negative_entry_actual_source) + ge_balance_positive_entry_actual_sourcevalue)))))))))
  8. 0008specialize signed_table_lookup_any (0)
  9. 0009specialize signed_table_lookup_any (A)
  10. 0010specialize signed_table_lookup_any (i)
  11. 0011apply signed_table_lookup_any
  12. 0012exact hA
  13. 0013cases ha
  14. 0014have hm : exists k. (((exists ff_h_pvs_entry_actual_map. ff_h_pvs_entry_actual_map + S (k) = S ((S (i)) * s)) /\ exists ff_q_pvs_entry_actual_map. r = ff_q_pvs_entry_actual_map * S ((S (i)) * s) + (k)))
  15. 0015specialize beta_at_exists (r)
  16. 0016specialize beta_at_exists (s)
  17. 0017specialize beta_at_exists (i)
  18. 0018apply beta_at_exists
  19. 0019cases hm
  20. 0020have hc : j=x1 \/ ~(j=x1)
  21. 0021specialize eq_decidable (j)
  22. 0022specialize eq_decidable (x1)
  23. 0023apply eq_decidable
  24. 0024cases hc
  25. 0025exists x
  26. 0026rewrite hc_left
  27. 0027rewrite hc_left
  28. 0028specialize signed_support_incidence_entry_hit (A)
  29. 0029specialize signed_support_incidence_entry_hit (r)
  30. 0030specialize signed_support_incidence_entry_hit (s)
  31. 0031specialize signed_support_incidence_entry_hit (i)
  32. 0032specialize signed_support_incidence_entry_hit (x1)
  33. 0033specialize signed_support_incidence_entry_hit (x)
  34. 0034apply signed_support_incidence_entry_hit
  35. 0035exact ha_witness
  36. 0036exact hm_witness
  37. 0037exists 0
  38. 0038specialize signed_support_incidence_entry_miss (A)
  39. 0039specialize signed_support_incidence_entry_miss (r)
  40. 0040specialize signed_support_incidence_entry_miss (s)
  41. 0041specialize signed_support_incidence_entry_miss (i)
  42. 0042specialize signed_support_incidence_entry_miss (j)
  43. 0043specialize signed_support_incidence_entry_miss (x1)
  44. 0044specialize signed_support_incidence_entry_miss (x)
  45. 0045apply signed_support_incidence_entry_miss
  46. 0046exact ha_witness
  47. 0047exact hm_witness
  48. 0048exact hc_right