DL001A

matrix_recursive_flattened_index_bound

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

Every in-range row and column has an actual flattened index below the square matrix length.

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 w r s. (exists mdr_gap_flat_row. mdr_gap_flat_row + S (r) = (w)) -> (exists mdr_gap_flat_column. mdr_gap_flat_column + S (s) = (w)) -> (exists mdr_gap_flat_result. mdr_gap_flat_result + S (r * w + s) = (w * w))

Constructive proof overview

Generated structural guide

Every in-range row and column has an actual flattened index below the square matrix length.

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

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

Proof neighborhood

Direct dependencies

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

24 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–5

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

  1. L1
    intro w
  2. L2
    intro r
  3. L3
    intro s
  4. L4
    intro hr
  5. L5
    intro hs
02Establish heqL6–7

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

  1. L6
    have heq : (S r) * w = r * w + w
  2. L7
    apply mul_succ_left
03Establish hrowendL8–17

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

  1. L8
    have hrowend : exists mdr_gap_flat_row_end. mdr_gap_flat_row_end + ((S r) * w) = (w * w)
  2. L9
    specialize mul_le_mul_right (S r)
  3. L10
    specialize mul_le_mul_right (w)
  4. L11
    specialize mul_le_mul_right (w)
  5. L12
    apply mul_le_mul_right
  6. L13
    exact hr
  7. L14
    rewrite heq at hrowend
  8. L15
    specialize lt_of_lt_of_le (r * w + s)
  9. L16
    specialize lt_of_lt_of_le (r * w + w)
  10. L17
    specialize lt_of_lt_of_le (w * w)
04Use earlier factsL18–24

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

  1. L18
    apply lt_of_lt_of_le
  2. L19
    specialize matrix_recursive_lt_add_left (s)
  3. L20
    specialize matrix_recursive_lt_add_left (w)
  4. L21
    specialize matrix_recursive_lt_add_left (r * w)
  5. L22
    apply matrix_recursive_lt_add_left
  6. L23
    exact hs
  7. L24
    exact hrowend

Library-wide reading audit

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