DL0095

matrix_integer_rectangular_index_bound

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

Every actual in-range rectangular row and column has flattened index below rows times columns, including vacuous zero boundaries.

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.

Exact expanded first-order arithmetic statement

forall r w i j. (exists mdr_gap_rect_row. mdr_gap_rect_row + S (i) = (r)) -> (exists mdr_gap_rect_column. mdr_gap_rect_column + S (j) = (w)) -> (exists mdr_gap_rect_flat. mdr_gap_rect_flat + S (i * w + j) = (r * w))

Constructive proof overview

Generated structural guide

Every actual in-range rectangular row and column has flattened index below rows times columns, including vacuous zero boundaries.

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

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

Proof neighborhood

Direct dependencies

mul_le_mul_right Stable theorem; checked-use authorized mul_succ_left Stable theorem; checked-use authorized DL0019 matrix_recursive_lt_add_left lt_of_lt_of_le Stable 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

25 script commands · 4 reading checkpoints · 2 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 (1)
01Fix variables and assumptionsL1–6

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

  1. L1
    intro r
  2. L2
    intro w
  3. L3
    intro i
  4. L4
    intro j
  5. L5
    intro hi
  6. L6
    intro hj
02Establish hrowL7–12

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

  1. L7
    have hrow : exists mdr_gap_rect_row_end. mdr_gap_rect_row_end + ((S i) * w) = (r * w)
  2. L8
    specialize mul_le_mul_right (S i)
  3. L9
    specialize mul_le_mul_right (r)
  4. L10
    specialize mul_le_mul_right (w)
  5. L11
    apply mul_le_mul_right
  6. L12
    exact hi
03Establish heqL13–22

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

  1. L13
    have heq : (S i) * w = i * w + w
  2. L14
    apply mul_succ_left
  3. L15
    rewrite heq at hrow
  4. L16
    specialize lt_of_lt_of_le (i * w + j)
  5. L17
    specialize lt_of_lt_of_le (i * w + w)
  6. L18
    specialize lt_of_lt_of_le (r * w)
  7. L19
    apply lt_of_lt_of_le
  8. L20
    specialize matrix_recursive_lt_add_left (j)
  9. L21
    specialize matrix_recursive_lt_add_left (w)
  10. L22
    specialize matrix_recursive_lt_add_left (i * w)
04Use earlier factsL23–25

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

  1. L23
    apply matrix_recursive_lt_add_left
  2. L24
    exact hj
  3. L25
    exact hrow

Library-wide reading audit

Original exact command ledger · 25 lines
  1. 0001intro r
  2. 0002intro w
  3. 0003intro i
  4. 0004intro j
  5. 0005intro hi
  6. 0006intro hj
  7. 0007have hrow : exists mdr_gap_rect_row_end. mdr_gap_rect_row_end + ((S i) * w) = (r * w)
  8. 0008specialize mul_le_mul_right (S i)
  9. 0009specialize mul_le_mul_right (r)
  10. 0010specialize mul_le_mul_right (w)
  11. 0011apply mul_le_mul_right
  12. 0012exact hi
  13. 0013have heq : (S i) * w = i * w + w
  14. 0014apply mul_succ_left
  15. 0015rewrite heq at hrow
  16. 0016specialize lt_of_lt_of_le (i * w + j)
  17. 0017specialize lt_of_lt_of_le (i * w + w)
  18. 0018specialize lt_of_lt_of_le (r * w)
  19. 0019apply lt_of_lt_of_le
  20. 0020specialize matrix_recursive_lt_add_left (j)
  21. 0021specialize matrix_recursive_lt_add_left (w)
  22. 0022specialize matrix_recursive_lt_add_left (i * w)
  23. 0023apply matrix_recursive_lt_add_left
  24. 0024exact hj
  25. 0025exact hrow