DL0045

matrix_rank_selected_square_exists

Every arbitrary selected square submatrix has a complete actual beta code, including dimension zero.

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

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.

This branch proves the finite determinant/rank/span substrate. It does not claim Smith or Hermite normal form, lattice index equals determinant, determinant multiplicativity, lattice reduction, or geometry-of-numbers theorems.

Exact theorem in conservative defined notation

∀ b. ∀ c. ∀ w. ∀ rb. ∀ rc. ∀ cb. ∀ cc. ∀ q. ∃ ub. ∃ uc. ∀ x. Lt(x,q · q) → ∃ y. (∃ z. ∃ n. ∃ m. ∃ k. x = q · z + n ∧ (Lt(n,q) ∧ (BetaAt(rb,rc,z,m) ∧ (BetaAt(cb,cc,n,k)BetaAt(b,c,m · w + k,y))))) ∧ BetaAt(ub,uc,x,y)

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall b c w rb rc cb cc q. exists ub uc. (forall mdr_i_square_exists. (exists mdr_gap_square_existsbound. mdr_gap_square_existsbound + S (mdr_i_square_exists) = (q * q)) -> exists mdr_a_square_exists. (((exists mdr_r_square_existspoint mdr_s_square_existspoint mdr_u_square_existspoint mdr_v_square_existspoint. ((mdr_i_square_exists = (q) * mdr_r_square_existspoint + mdr_s_square_existspoint) /\ ((exists mdr_gap_square_existspointcolumn. mdr_gap_square_existspointcolumn + S (mdr_s_square_existspoint) = (q)) /\ ((((exists ff_h_mdr_square_existspointrow_index. ff_h_mdr_square_existspointrow_index + S (mdr_u_square_existspoint) = S ((S (mdr_r_square_existspoint)) * rc)) /\ exists ff_q_mdr_square_existspointrow_index. rb = ff_q_mdr_square_existspointrow_index * S ((S (mdr_r_square_existspoint)) * rc) + (mdr_u_square_existspoint))) /\ ((((exists ff_h_mdr_square_existspointcolumn_index. ff_h_mdr_square_existspointcolumn_index + S (mdr_v_square_existspoint) = S ((S (mdr_s_square_existspoint)) * cc)) /\ exists ff_q_mdr_square_existspointcolumn_index. cb = ff_q_mdr_square_existspointcolumn_index * S ((S (mdr_s_square_existspoint)) * cc) + (mdr_v_square_existspoint))) /\ (((exists ff_h_mdr_square_existspointsource. ff_h_mdr_square_existspointsource + S (mdr_a_square_exists) = S ((S ((mdr_u_square_existspoint) * (w) + (mdr_v_square_existspoint))) * c)) /\ exists ff_q_mdr_square_existspointsource. b = ff_q_mdr_square_existspointsource * S ((S ((mdr_u_square_existspoint) * (w) + (mdr_v_square_existspoint))) * c) + (mdr_a_square_exists)))))))) /\ (((exists ff_h_mdr_square_existsoutput. ff_h_mdr_square_existsoutput + S (mdr_a_square_exists) = S ((S (mdr_i_square_exists)) * uc)) /\ exists ff_q_mdr_square_existsoutput. ub = ff_q_mdr_square_existsoutput * S ((S (mdr_i_square_exists)) * uc) + (mdr_a_square_exists))))))

Complete tactic proof in conservative notation

All 40 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

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

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

  1. L1
    intro b
  2. L2
    intro c
  3. L3
    intro w
  4. L4
    intro rb
  5. L5
    intro rc
  6. L6
    intro cb
  7. L7
    intro cc
  8. L8
    intro q
02Use earlier factsL9–10

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

  1. L9
    specialize eq_decidable q
  2. L10
    specialize eq_decidable 0
03Separate the logical casesL11–11

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

  1. L11
    cases eq_decidable
04Establish hlengthL12–16

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

  1. L12
    have hlength : q * q = 0
  2. L13
    rewrite eq_decidable_left
  3. L14
    rewrite eq_decidable_left
  4. L15
    apply PA5
  5. L16
    rewrite hlength
05Construct an explicit witnessL17–18

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

  1. L17
    exists 0
  2. L18
    exists 0
06Use earlier factsL19–28

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

  1. L19
    specialize matrix_rank_selected_prefix_empty (b)
  2. L20
    specialize matrix_rank_selected_prefix_empty (c)
  3. L21
    specialize matrix_rank_selected_prefix_empty (w)
  4. L22
    specialize matrix_rank_selected_prefix_empty (rb)
  5. L23
    specialize matrix_rank_selected_prefix_empty (rc)
  6. L24
    specialize matrix_rank_selected_prefix_empty (cb)
  7. L25
    specialize matrix_rank_selected_prefix_empty (cc)
  8. L26
    specialize matrix_rank_selected_prefix_empty (q)
  9. L27
    specialize matrix_rank_selected_prefix_empty (0)
  10. L28
    specialize matrix_rank_selected_prefix_empty (0)
07Use earlier factsL29–38

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

  1. L29
    apply matrix_rank_selected_prefix_empty
  2. L30
    specialize matrix_rank_selected_prefix_exists_nonzero (b)
  3. L31
    specialize matrix_rank_selected_prefix_exists_nonzero (c)
  4. L32
    specialize matrix_rank_selected_prefix_exists_nonzero (w)
  5. L33
    specialize matrix_rank_selected_prefix_exists_nonzero (rb)
  6. L34
    specialize matrix_rank_selected_prefix_exists_nonzero (rc)
  7. L35
    specialize matrix_rank_selected_prefix_exists_nonzero (cb)
  8. L36
    specialize matrix_rank_selected_prefix_exists_nonzero (cc)
  9. L37
    specialize matrix_rank_selected_prefix_exists_nonzero (q)
  10. L38
    specialize matrix_rank_selected_prefix_exists_nonzero (q * q)
08Use earlier factsL39–40

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

  1. L39
    apply matrix_rank_selected_prefix_exists_nonzero
  2. L40
    exact eq_decidable_right

Library-wide reading audit

Original defined command ledger · 40 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro w
  4. 0004intro rb
  5. 0005intro rc
  6. 0006intro cb
  7. 0007intro cc
  8. 0008intro q
  9. 0009specialize eq_decidable q
  10. 0010specialize eq_decidable 0
  11. 0011cases eq_decidable
  12. 0012have hlength : q * q = 0
  13. 0013rewrite eq_decidable_left
  14. 0014rewrite eq_decidable_left
  15. 0015apply PA5
  16. 0016rewrite hlength
  17. 0017exists 0
  18. 0018exists 0
  19. 0019specialize matrix_rank_selected_prefix_empty (b)
  20. 0020specialize matrix_rank_selected_prefix_empty (c)
  21. 0021specialize matrix_rank_selected_prefix_empty (w)
  22. 0022specialize matrix_rank_selected_prefix_empty (rb)
  23. 0023specialize matrix_rank_selected_prefix_empty (rc)
  24. 0024specialize matrix_rank_selected_prefix_empty (cb)
  25. 0025specialize matrix_rank_selected_prefix_empty (cc)
  26. 0026specialize matrix_rank_selected_prefix_empty (q)
  27. 0027specialize matrix_rank_selected_prefix_empty (0)
  28. 0028specialize matrix_rank_selected_prefix_empty (0)
  29. 0029apply matrix_rank_selected_prefix_empty
  30. 0030specialize matrix_rank_selected_prefix_exists_nonzero (b)
  31. 0031specialize matrix_rank_selected_prefix_exists_nonzero (c)
  32. 0032specialize matrix_rank_selected_prefix_exists_nonzero (w)
  33. 0033specialize matrix_rank_selected_prefix_exists_nonzero (rb)
  34. 0034specialize matrix_rank_selected_prefix_exists_nonzero (rc)
  35. 0035specialize matrix_rank_selected_prefix_exists_nonzero (cb)
  36. 0036specialize matrix_rank_selected_prefix_exists_nonzero (cc)
  37. 0037specialize matrix_rank_selected_prefix_exists_nonzero (q)
  38. 0038specialize matrix_rank_selected_prefix_exists_nonzero (q * q)
  39. 0039apply matrix_rank_selected_prefix_exists_nonzero
  40. 0040exact eq_decidable_right