MX004C

signed_mul_four_factor_interchange

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

Reorder four actual signed factors by constructing the intermediate product and using checked associativity and commutativity.

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 b c d ab cd ac bd out. (exists sto_ap_four_ab sto_an_four_ab sto_bp_four_ab sto_bn_four_ab sto_cp_four_ab sto_cn_four_ab. (((((a) = 2 * (sto_ap_four_ab) /\ (sto_an_four_ab) = 0) \/ exists ge_signed_half_four_ableft. (((a) = 2 * ge_signed_half_four_ableft + 1 /\ (sto_ap_four_ab) = 0) /\ (sto_an_four_ab) = S ge_signed_half_four_ableft))) /\ ((((((b) = 2 * (sto_bp_four_ab) /\ (sto_bn_four_ab) = 0) \/ exists ge_signed_half_four_abright. (((b) = 2 * ge_signed_half_four_abright + 1 /\ (sto_bp_four_ab) = 0) /\ (sto_bn_four_ab) = S ge_signed_half_four_abright))) /\ ((((((ab) = 2 * (sto_cp_four_ab) /\ (sto_cn_four_ab) = 0) \/ exists ge_signed_half_four_aboutput. (((ab) = 2 * ge_signed_half_four_aboutput + 1 /\ (sto_cp_four_ab) = 0) /\ (sto_cn_four_ab) = S ge_signed_half_four_aboutput))) /\ ((sto_ap_four_ab * sto_bp_four_ab + sto_an_four_ab * sto_bn_four_ab) + sto_cn_four_ab = (sto_ap_four_ab * sto_bn_four_ab + sto_an_four_ab * sto_bp_four_ab) + sto_cp_four_ab))))))) -> (exists sto_ap_four_cd sto_an_four_cd sto_bp_four_cd sto_bn_four_cd sto_cp_four_cd sto_cn_four_cd. (((((c) = 2 * (sto_ap_four_cd) /\ (sto_an_four_cd) = 0) \/ exists ge_signed_half_four_cdleft. (((c) = 2 * ge_signed_half_four_cdleft + 1 /\ (sto_ap_four_cd) = 0) /\ (sto_an_four_cd) = S ge_signed_half_four_cdleft))) /\ ((((((d) = 2 * (sto_bp_four_cd) /\ (sto_bn_four_cd) = 0) \/ exists ge_signed_half_four_cdright. (((d) = 2 * ge_signed_half_four_cdright + 1 /\ (sto_bp_four_cd) = 0) /\ (sto_bn_four_cd) = S ge_signed_half_four_cdright))) /\ ((((((cd) = 2 * (sto_cp_four_cd) /\ (sto_cn_four_cd) = 0) \/ exists ge_signed_half_four_cdoutput. (((cd) = 2 * ge_signed_half_four_cdoutput + 1 /\ (sto_cp_four_cd) = 0) /\ (sto_cn_four_cd) = S ge_signed_half_four_cdoutput))) /\ ((sto_ap_four_cd * sto_bp_four_cd + sto_an_four_cd * sto_bn_four_cd) + sto_cn_four_cd = (sto_ap_four_cd * sto_bn_four_cd + sto_an_four_cd * sto_bp_four_cd) + sto_cp_four_cd))))))) -> (exists sto_ap_four_ac sto_an_four_ac sto_bp_four_ac sto_bn_four_ac sto_cp_four_ac sto_cn_four_ac. (((((a) = 2 * (sto_ap_four_ac) /\ (sto_an_four_ac) = 0) \/ exists ge_signed_half_four_acleft. (((a) = 2 * ge_signed_half_four_acleft + 1 /\ (sto_ap_four_ac) = 0) /\ (sto_an_four_ac) = S ge_signed_half_four_acleft))) /\ ((((((c) = 2 * (sto_bp_four_ac) /\ (sto_bn_four_ac) = 0) \/ exists ge_signed_half_four_acright. (((c) = 2 * ge_signed_half_four_acright + 1 /\ (sto_bp_four_ac) = 0) /\ (sto_bn_four_ac) = S ge_signed_half_four_acright))) /\ ((((((ac) = 2 * (sto_cp_four_ac) /\ (sto_cn_four_ac) = 0) \/ exists ge_signed_half_four_acoutput. (((ac) = 2 * ge_signed_half_four_acoutput + 1 /\ (sto_cp_four_ac) = 0) /\ (sto_cn_four_ac) = S ge_signed_half_four_acoutput))) /\ ((sto_ap_four_ac * sto_bp_four_ac + sto_an_four_ac * sto_bn_four_ac) + sto_cn_four_ac = (sto_ap_four_ac * sto_bn_four_ac + sto_an_four_ac * sto_bp_four_ac) + sto_cp_four_ac))))))) -> (exists sto_ap_four_bd sto_an_four_bd sto_bp_four_bd sto_bn_four_bd sto_cp_four_bd sto_cn_four_bd. (((((b) = 2 * (sto_ap_four_bd) /\ (sto_an_four_bd) = 0) \/ exists ge_signed_half_four_bdleft. (((b) = 2 * ge_signed_half_four_bdleft + 1 /\ (sto_ap_four_bd) = 0) /\ (sto_an_four_bd) = S ge_signed_half_four_bdleft))) /\ ((((((d) = 2 * (sto_bp_four_bd) /\ (sto_bn_four_bd) = 0) \/ exists ge_signed_half_four_bdright. (((d) = 2 * ge_signed_half_four_bdright + 1 /\ (sto_bp_four_bd) = 0) /\ (sto_bn_four_bd) = S ge_signed_half_four_bdright))) /\ ((((((bd) = 2 * (sto_cp_four_bd) /\ (sto_cn_four_bd) = 0) \/ exists ge_signed_half_four_bdoutput. (((bd) = 2 * ge_signed_half_four_bdoutput + 1 /\ (sto_cp_four_bd) = 0) /\ (sto_cn_four_bd) = S ge_signed_half_four_bdoutput))) /\ ((sto_ap_four_bd * sto_bp_four_bd + sto_an_four_bd * sto_bn_four_bd) + sto_cn_four_bd = (sto_ap_four_bd * sto_bn_four_bd + sto_an_four_bd * sto_bp_four_bd) + sto_cp_four_bd))))))) -> (exists sto_ap_four_source sto_an_four_source sto_bp_four_source sto_bn_four_source sto_cp_four_source sto_cn_four_source. (((((ac) = 2 * (sto_ap_four_source) /\ (sto_an_four_source) = 0) \/ exists ge_signed_half_four_sourceleft. (((ac) = 2 * ge_signed_half_four_sourceleft + 1 /\ (sto_ap_four_source) = 0) /\ (sto_an_four_source) = S ge_signed_half_four_sourceleft))) /\ ((((((bd) = 2 * (sto_bp_four_source) /\ (sto_bn_four_source) = 0) \/ exists ge_signed_half_four_sourceright. (((bd) = 2 * ge_signed_half_four_sourceright + 1 /\ (sto_bp_four_source) = 0) /\ (sto_bn_four_source) = S ge_signed_half_four_sourceright))) /\ ((((((out) = 2 * (sto_cp_four_source) /\ (sto_cn_four_source) = 0) \/ exists ge_signed_half_four_sourceoutput. (((out) = 2 * ge_signed_half_four_sourceoutput + 1 /\ (sto_cp_four_source) = 0) /\ (sto_cn_four_source) = S ge_signed_half_four_sourceoutput))) /\ ((sto_ap_four_source * sto_bp_four_source + sto_an_four_source * sto_bn_four_source) + sto_cn_four_source = (sto_ap_four_source * sto_bn_four_source + sto_an_four_source * sto_bp_four_source) + sto_cp_four_source))))))) -> (exists sto_ap_four_target sto_an_four_target sto_bp_four_target sto_bn_four_target sto_cp_four_target sto_cn_four_target. (((((ab) = 2 * (sto_ap_four_target) /\ (sto_an_four_target) = 0) \/ exists ge_signed_half_four_targetleft. (((ab) = 2 * ge_signed_half_four_targetleft + 1 /\ (sto_ap_four_target) = 0) /\ (sto_an_four_target) = S ge_signed_half_four_targetleft))) /\ ((((((cd) = 2 * (sto_bp_four_target) /\ (sto_bn_four_target) = 0) \/ exists ge_signed_half_four_targetright. (((cd) = 2 * ge_signed_half_four_targetright + 1 /\ (sto_bp_four_target) = 0) /\ (sto_bn_four_target) = S ge_signed_half_four_targetright))) /\ ((((((out) = 2 * (sto_cp_four_target) /\ (sto_cn_four_target) = 0) \/ exists ge_signed_half_four_targetoutput. (((out) = 2 * ge_signed_half_four_targetoutput + 1 /\ (sto_cp_four_target) = 0) /\ (sto_cn_four_target) = S ge_signed_half_four_targetoutput))) /\ ((sto_ap_four_target * sto_bp_four_target + sto_an_four_target * sto_bn_four_target) + sto_cn_four_target = (sto_ap_four_target * sto_bn_four_target + sto_an_four_target * sto_bp_four_target) + sto_cp_four_target)))))))

Constructive proof overview

Generated structural guide

Reorder four actual signed factors by constructing the intermediate product and using checked associativity and commutativity.

The unchanged tactic script uses 4 declared prerequisites and contains 61 exact native proof lines.

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

Proof neighborhood

Direct dependencies

signed_mul_total Alpha theorem; checked-use authorized signed_mul_associative Alpha theorem; checked-use authorized signed_weighted_scalar_commute Alpha theorem; checked-use authorized signed_mul_commutative Alpha theorem; checked-use authorized

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

61 script commands · 10 reading checkpoints · 4 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.

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–10

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

  1. L1
    intro a
  2. L2
    intro b
  3. L3
    intro c
  4. L4
    intro d
  5. L5
    intro ab
  6. L6
    intro cd
  7. L7
    intro ac
  8. L8
    intro bd
  9. L9
    intro out
  10. L10
    intro hab
02Fix variables and assumptionsL11–14

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

  1. L11
    intro hcd
  2. L12
    intro hac
  3. L13
    intro hbd
  4. L14
    intro hout
03Establish hkL15–18

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

  1. L15
    have hk : ∃ k. SignedMul(c,bd,k)Definitions: SignedMul
  2. L16
    specialize signed_mul_total (c)
  3. L17
    specialize signed_mul_total (bd)
  4. L18
    apply signed_mul_total
04Separate the logical casesL19–19

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

  1. L19
    cases hk
05Establish hakL20–29

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

  1. L20
    have hak : SignedMul(a,x,out)Definitions: SignedMul
  2. L21
    specialize signed_mul_associative (a)
  3. L22
    specialize signed_mul_associative (c)
  4. L23
    specialize signed_mul_associative (bd)
  5. L24
    specialize signed_mul_associative (ac)
  6. L25
    specialize signed_mul_associative (x)
  7. L26
    specialize signed_mul_associative (out)
  8. L27
    apply signed_mul_associative
  9. L28
    exact hac
  10. L29
    exact hout
06Use earlier factsL30–30

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

  1. L30
    exact hk_witness
07Establish hbkL31–40

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed weighted scalar commute.

  1. L31
    have hbk : SignedMul(b,cd,x)Definitions: SignedMul
  2. L32
    specialize signed_weighted_scalar_commute (b)
  3. L33
    specialize signed_weighted_scalar_commute (d)
  4. L34
    specialize signed_weighted_scalar_commute (c)
  5. L35
    specialize signed_weighted_scalar_commute (bd)
  6. L36
    specialize signed_weighted_scalar_commute (cd)
  7. L37
    specialize signed_weighted_scalar_commute (x)
  8. L38
    apply signed_weighted_scalar_commute
  9. L39
    exact hbd
  10. L40
    exact hcd
08Use earlier factsL41–41

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

  1. L41
    exact hk_witness
09Establish hcbL42–51

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

  1. L42
    have hcb : SignedMul(cd,b,x)Definitions: SignedMul
  2. L43
    specialize signed_mul_commutative (b)
  3. L44
    specialize signed_mul_commutative (cd)
  4. L45
    specialize signed_mul_commutative (x)
  5. L46
    apply signed_mul_commutative
  6. L47
    exact hbk
  7. L48
    specialize signed_mul_commutative (cd)
  8. L49
    specialize signed_mul_commutative (ab)
  9. L50
    specialize signed_mul_commutative (out)
  10. L51
    apply signed_mul_commutative
10Use earlier factsL52–61

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

  1. L52
    specialize signed_weighted_scalar_commute (cd)
  2. L53
    specialize signed_weighted_scalar_commute (b)
  3. L54
    specialize signed_weighted_scalar_commute (a)
  4. L55
    specialize signed_weighted_scalar_commute (x)
  5. L56
    specialize signed_weighted_scalar_commute (ab)
  6. L57
    specialize signed_weighted_scalar_commute (out)
  7. L58
    apply signed_weighted_scalar_commute
  8. L59
    exact hcb
  9. L60
    exact hab
  10. L61
    exact hak

Library-wide reading audit

Original exact command ledger · 61 lines
  1. 0001intro a
  2. 0002intro b
  3. 0003intro c
  4. 0004intro d
  5. 0005intro ab
  6. 0006intro cd
  7. 0007intro ac
  8. 0008intro bd
  9. 0009intro out
  10. 0010intro hab
  11. 0011intro hcd
  12. 0012intro hac
  13. 0013intro hbd
  14. 0014intro hout
  15. 0015have hk : exists k. (exists sto_ap_four_construct sto_an_four_construct sto_bp_four_construct sto_bn_four_construct sto_cp_four_construct sto_cn_four_construct. (((((c) = 2 * (sto_ap_four_construct) /\ (sto_an_four_construct) = 0) \/ exists ge_signed_half_four_constructleft. (((c) = 2 * ge_signed_half_four_constructleft + 1 /\ (sto_ap_four_construct) = 0) /\ (sto_an_four_construct) = S ge_signed_half_four_constructleft))) /\ ((((((bd) = 2 * (sto_bp_four_construct) /\ (sto_bn_four_construct) = 0) \/ exists ge_signed_half_four_constructright. (((bd) = 2 * ge_signed_half_four_constructright + 1 /\ (sto_bp_four_construct) = 0) /\ (sto_bn_four_construct) = S ge_signed_half_four_constructright))) /\ ((((((k) = 2 * (sto_cp_four_construct) /\ (sto_cn_four_construct) = 0) \/ exists ge_signed_half_four_constructoutput. (((k) = 2 * ge_signed_half_four_constructoutput + 1 /\ (sto_cp_four_construct) = 0) /\ (sto_cn_four_construct) = S ge_signed_half_four_constructoutput))) /\ ((sto_ap_four_construct * sto_bp_four_construct + sto_an_four_construct * sto_bn_four_construct) + sto_cn_four_construct = (sto_ap_four_construct * sto_bn_four_construct + sto_an_four_construct * sto_bp_four_construct) + sto_cp_four_construct)))))))
  16. 0016specialize signed_mul_total (c)
  17. 0017specialize signed_mul_total (bd)
  18. 0018apply signed_mul_total
  19. 0019cases hk
  20. 0020have hak : exists sto_ap_four_first_rebracket sto_an_four_first_rebracket sto_bp_four_first_rebracket sto_bn_four_first_rebracket sto_cp_four_first_rebracket sto_cn_four_first_rebracket. (((((a) = 2 * (sto_ap_four_first_rebracket) /\ (sto_an_four_first_rebracket) = 0) \/ exists ge_signed_half_four_first_rebracketleft. (((a) = 2 * ge_signed_half_four_first_rebracketleft + 1 /\ (sto_ap_four_first_rebracket) = 0) /\ (sto_an_four_first_rebracket) = S ge_signed_half_four_first_rebracketleft))) /\ ((((((x) = 2 * (sto_bp_four_first_rebracket) /\ (sto_bn_four_first_rebracket) = 0) \/ exists ge_signed_half_four_first_rebracketright. (((x) = 2 * ge_signed_half_four_first_rebracketright + 1 /\ (sto_bp_four_first_rebracket) = 0) /\ (sto_bn_four_first_rebracket) = S ge_signed_half_four_first_rebracketright))) /\ ((((((out) = 2 * (sto_cp_four_first_rebracket) /\ (sto_cn_four_first_rebracket) = 0) \/ exists ge_signed_half_four_first_rebracketoutput. (((out) = 2 * ge_signed_half_four_first_rebracketoutput + 1 /\ (sto_cp_four_first_rebracket) = 0) /\ (sto_cn_four_first_rebracket) = S ge_signed_half_four_first_rebracketoutput))) /\ ((sto_ap_four_first_rebracket * sto_bp_four_first_rebracket + sto_an_four_first_rebracket * sto_bn_four_first_rebracket) + sto_cn_four_first_rebracket = (sto_ap_four_first_rebracket * sto_bn_four_first_rebracket + sto_an_four_first_rebracket * sto_bp_four_first_rebracket) + sto_cp_four_first_rebracket))))))
  21. 0021specialize signed_mul_associative (a)
  22. 0022specialize signed_mul_associative (c)
  23. 0023specialize signed_mul_associative (bd)
  24. 0024specialize signed_mul_associative (ac)
  25. 0025specialize signed_mul_associative (x)
  26. 0026specialize signed_mul_associative (out)
  27. 0027apply signed_mul_associative
  28. 0028exact hac
  29. 0029exact hout
  30. 0030exact hk_witness
  31. 0031have hbk : exists sto_ap_four_middle_swap sto_an_four_middle_swap sto_bp_four_middle_swap sto_bn_four_middle_swap sto_cp_four_middle_swap sto_cn_four_middle_swap. (((((b) = 2 * (sto_ap_four_middle_swap) /\ (sto_an_four_middle_swap) = 0) \/ exists ge_signed_half_four_middle_swapleft. (((b) = 2 * ge_signed_half_four_middle_swapleft + 1 /\ (sto_ap_four_middle_swap) = 0) /\ (sto_an_four_middle_swap) = S ge_signed_half_four_middle_swapleft))) /\ ((((((cd) = 2 * (sto_bp_four_middle_swap) /\ (sto_bn_four_middle_swap) = 0) \/ exists ge_signed_half_four_middle_swapright. (((cd) = 2 * ge_signed_half_four_middle_swapright + 1 /\ (sto_bp_four_middle_swap) = 0) /\ (sto_bn_four_middle_swap) = S ge_signed_half_four_middle_swapright))) /\ ((((((x) = 2 * (sto_cp_four_middle_swap) /\ (sto_cn_four_middle_swap) = 0) \/ exists ge_signed_half_four_middle_swapoutput. (((x) = 2 * ge_signed_half_four_middle_swapoutput + 1 /\ (sto_cp_four_middle_swap) = 0) /\ (sto_cn_four_middle_swap) = S ge_signed_half_four_middle_swapoutput))) /\ ((sto_ap_four_middle_swap * sto_bp_four_middle_swap + sto_an_four_middle_swap * sto_bn_four_middle_swap) + sto_cn_four_middle_swap = (sto_ap_four_middle_swap * sto_bn_four_middle_swap + sto_an_four_middle_swap * sto_bp_four_middle_swap) + sto_cp_four_middle_swap))))))
  32. 0032specialize signed_weighted_scalar_commute (b)
  33. 0033specialize signed_weighted_scalar_commute (d)
  34. 0034specialize signed_weighted_scalar_commute (c)
  35. 0035specialize signed_weighted_scalar_commute (bd)
  36. 0036specialize signed_weighted_scalar_commute (cd)
  37. 0037specialize signed_weighted_scalar_commute (x)
  38. 0038apply signed_weighted_scalar_commute
  39. 0039exact hbd
  40. 0040exact hcd
  41. 0041exact hk_witness
  42. 0042have hcb : exists sto_ap_four_middle_commute sto_an_four_middle_commute sto_bp_four_middle_commute sto_bn_four_middle_commute sto_cp_four_middle_commute sto_cn_four_middle_commute. (((((cd) = 2 * (sto_ap_four_middle_commute) /\ (sto_an_four_middle_commute) = 0) \/ exists ge_signed_half_four_middle_commuteleft. (((cd) = 2 * ge_signed_half_four_middle_commuteleft + 1 /\ (sto_ap_four_middle_commute) = 0) /\ (sto_an_four_middle_commute) = S ge_signed_half_four_middle_commuteleft))) /\ ((((((b) = 2 * (sto_bp_four_middle_commute) /\ (sto_bn_four_middle_commute) = 0) \/ exists ge_signed_half_four_middle_commuteright. (((b) = 2 * ge_signed_half_four_middle_commuteright + 1 /\ (sto_bp_four_middle_commute) = 0) /\ (sto_bn_four_middle_commute) = S ge_signed_half_four_middle_commuteright))) /\ ((((((x) = 2 * (sto_cp_four_middle_commute) /\ (sto_cn_four_middle_commute) = 0) \/ exists ge_signed_half_four_middle_commuteoutput. (((x) = 2 * ge_signed_half_four_middle_commuteoutput + 1 /\ (sto_cp_four_middle_commute) = 0) /\ (sto_cn_four_middle_commute) = S ge_signed_half_four_middle_commuteoutput))) /\ ((sto_ap_four_middle_commute * sto_bp_four_middle_commute + sto_an_four_middle_commute * sto_bn_four_middle_commute) + sto_cn_four_middle_commute = (sto_ap_four_middle_commute * sto_bn_four_middle_commute + sto_an_four_middle_commute * sto_bp_four_middle_commute) + sto_cp_four_middle_commute))))))
  43. 0043specialize signed_mul_commutative (b)
  44. 0044specialize signed_mul_commutative (cd)
  45. 0045specialize signed_mul_commutative (x)
  46. 0046apply signed_mul_commutative
  47. 0047exact hbk
  48. 0048specialize signed_mul_commutative (cd)
  49. 0049specialize signed_mul_commutative (ab)
  50. 0050specialize signed_mul_commutative (out)
  51. 0051apply signed_mul_commutative
  52. 0052specialize signed_weighted_scalar_commute (cd)
  53. 0053specialize signed_weighted_scalar_commute (b)
  54. 0054specialize signed_weighted_scalar_commute (a)
  55. 0055specialize signed_weighted_scalar_commute (x)
  56. 0056specialize signed_weighted_scalar_commute (ab)
  57. 0057specialize signed_weighted_scalar_commute (out)
  58. 0058apply signed_weighted_scalar_commute
  59. 0059exact hcb
  60. 0060exact hab
  61. 0061exact hak