DI0009

divisor_complement_prefix_permutation

The real S n-entry complement code is bounded and injective by its proved involution; constructive finite surjectivity yields a genuine permutation.

Alpha v34 checked-use · first admitted v31 · 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.

The complementary quotient is witnessed by n=d*q at positive divisors. The actual permutation covers indices zero through n, fixing zero and nondivisors. This is the involution foundation for the separate cancellation and full G007 inversion proofs, not an assumed divisor bijection.

Exact theorem in conservative defined notation

∀ n. ∀ b. ∀ c. ¬n = 0 → DivisorComplementPrefix(n,b,c,S n)PermutationPrefix(b,c,S n)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall n b c. ~(n=0) -> (forall dvi_index_permutation_prefix. (exists pvs_gap_permutation_prefixdomain. pvs_gap_permutation_prefixdomain + S (dvi_index_permutation_prefix) = (S n)) -> exists dvi_value_permutation_prefix. ((((exists ff_h_pvs_permutation_prefixentry. ff_h_pvs_permutation_prefixentry + S (dvi_value_permutation_prefix) = S ((S (dvi_index_permutation_prefix)) * c)) /\ exists ff_q_pvs_permutation_prefixentry. b = ff_q_pvs_permutation_prefixentry * S ((S (dvi_index_permutation_prefix)) * c) + (dvi_value_permutation_prefix))) /\ ((((~((dvi_index_permutation_prefix)=0)) /\ ((n)=(dvi_index_permutation_prefix)*(dvi_value_permutation_prefix)))) \/ ((((dvi_index_permutation_prefix)=0 \/ ~(exists pvs_factor_permutation_prefixgraphnondivisor. (n) = (dvi_index_permutation_prefix) * pvs_factor_permutation_prefixgraphnondivisor)) /\ ((dvi_value_permutation_prefix)=(dvi_index_permutation_prefix))))))) -> (((forall pfp_i_permutation_resultbounded. (exists pfp_gap_permutation_resultboundedindex. pfp_gap_permutation_resultboundedindex + S (pfp_i_permutation_resultbounded) = (S n)) -> exists pfp_a_permutation_resultbounded. (((exists ff_h_pfp_permutation_resultboundedentry. ff_h_pfp_permutation_resultboundedentry + S (pfp_a_permutation_resultbounded) = S ((S (pfp_i_permutation_resultbounded)) * c)) /\ exists ff_q_pfp_permutation_resultboundedentry. b = ff_q_pfp_permutation_resultboundedentry * S ((S (pfp_i_permutation_resultbounded)) * c) + (pfp_a_permutation_resultbounded))) /\ (exists pfp_gap_permutation_resultboundedvalue. pfp_gap_permutation_resultboundedvalue + S (pfp_a_permutation_resultbounded) = (S n))) /\ (((forall pfp_i_permutation_resultinjective pfp_j_permutation_resultinjective pfp_a_permutation_resultinjective. (exists pfp_gap_permutation_resultinjectivefirst. pfp_gap_permutation_resultinjectivefirst + S (pfp_i_permutation_resultinjective) = (S n)) -> (exists pfp_gap_permutation_resultinjectivesecond. pfp_gap_permutation_resultinjectivesecond + S (pfp_j_permutation_resultinjective) = (S n)) -> (((exists ff_h_pfp_permutation_resultinjectiveleft. ff_h_pfp_permutation_resultinjectiveleft + S (pfp_a_permutation_resultinjective) = S ((S (pfp_i_permutation_resultinjective)) * c)) /\ exists ff_q_pfp_permutation_resultinjectiveleft. b = ff_q_pfp_permutation_resultinjectiveleft * S ((S (pfp_i_permutation_resultinjective)) * c) + (pfp_a_permutation_resultinjective))) -> (((exists ff_h_pfp_permutation_resultinjectiveright. ff_h_pfp_permutation_resultinjectiveright + S (pfp_a_permutation_resultinjective) = S ((S (pfp_j_permutation_resultinjective)) * c)) /\ exists ff_q_pfp_permutation_resultinjectiveright. b = ff_q_pfp_permutation_resultinjectiveright * S ((S (pfp_j_permutation_resultinjective)) * c) + (pfp_a_permutation_resultinjective))) -> pfp_i_permutation_resultinjective = pfp_j_permutation_resultinjective) /\ (forall pfp_a_permutation_resultsurjective. (exists pfp_gap_permutation_resultsurjectivevalue. pfp_gap_permutation_resultsurjectivevalue + S (pfp_a_permutation_resultsurjective) = (S n)) -> exists pfp_i_permutation_resultsurjective. (exists pfp_gap_permutation_resultsurjectiveindex. pfp_gap_permutation_resultsurjectiveindex + S (pfp_i_permutation_resultsurjective) = (S n)) /\ (((exists ff_h_pfp_permutation_resultsurjectiveentry. ff_h_pfp_permutation_resultsurjectiveentry + S (pfp_a_permutation_resultsurjective) = S ((S (pfp_i_permutation_resultsurjective)) * c)) /\ exists ff_q_pfp_permutation_resultsurjectiveentry. b = ff_q_pfp_permutation_resultsurjectiveentry * S ((S (pfp_i_permutation_resultsurjective)) * c) + (pfp_a_permutation_resultsurjective))))))))

Complete tactic proof in conservative notation

All 83 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

83 script commands · 17 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.

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 (4)
01Fix variables and assumptionsL1–5

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

  1. L1
    intro n
  2. L2
    intro b
  3. L3
    intro c
  4. L4
    intro hn
  5. L5
    intro hp
02Establish hbL6–8

Establish this local claim before using it. It is not an additional assumption.

  1. L6
    have hb : BoundedPrefix(b,c,S n)Definitions: BoundedPrefix(b,c,S n)Original native command in the exact edition
  2. L7
    intro i
  3. L8
    intro hi
03Establish hvL9–12

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

  1. L9
    have hv : ∃ q. BetaAt(b,c,i,q) ∧ DivisorComplement(n,i,q)Definitions: BetaAt(b,c,i,q)DivisorComplement(n,i,q)Original native command in the exact edition
  2. L10
    specialize hp (i)
  3. L11
    apply hp
  4. L12
    exact hi
04Separate the logical casesL13–14

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

  1. L13
    cases hv
  2. L14
    cases hv_witness
05Construct an explicit witnessL15–15

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

  1. L15
    exists x
06Separate the logical casesL16–16

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

  1. L16
    split
07Use earlier factsL17–26

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

  1. L17
    exact hv_witness_left
  2. L18
    specialize succ_le_succ (x)
  3. L19
    specialize succ_le_succ (n)
  4. L20
    apply succ_le_succ
  5. L21
    specialize divisor_complement_bounded (n)
  6. L22
    specialize divisor_complement_bounded (i)
  7. L23
    specialize divisor_complement_bounded (x)
  8. L24
    apply divisor_complement_bounded
  9. L25
    exact hn
  10. L26
    specialize le_of_succ_le_succ (i)
08Use earlier factsL27–30

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

  1. L27
    specialize le_of_succ_le_succ (n)
  2. L28
    apply le_of_succ_le_succ
  3. L29
    exact hi
  4. L30
    exact hv_witness_right
09Establish hinjL31–40

Establish this local claim before using it. It is not an additional assumption.

  1. L31
    have hinj : InjectivePrefix(b,c,S n)Definitions: InjectivePrefix(b,c,S n)Original native command in the exact edition
  2. L32
    intro i
  3. L33
    intro j
  4. L34
    intro a
  5. L35
    intro hi
  6. L36
    intro hj
  7. L37
    intro hia
  8. L38
    intro hja
  9. L39
    specialize divisor_complement_functional (n)
  10. L40
    specialize divisor_complement_functional (a)
10Use earlier factsL41–50

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

  1. L41
    specialize divisor_complement_functional (i)
  2. L42
    specialize divisor_complement_functional (j)
  3. L43
    apply divisor_complement_functional
  4. L44
    specialize divisor_complement_symmetric (n)
  5. L45
    specialize divisor_complement_symmetric (i)
  6. L46
    specialize divisor_complement_symmetric (a)
  7. L47
    apply divisor_complement_symmetric
  8. L48
    exact hn
  9. L49
    specialize divisor_complement_prefix_lookup (n)
  10. L50
    specialize divisor_complement_prefix_lookup (b)
11Use earlier factsL51–60

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

  1. L51
    specialize divisor_complement_prefix_lookup (c)
  2. L52
    specialize divisor_complement_prefix_lookup (S n)
  3. L53
    specialize divisor_complement_prefix_lookup (i)
  4. L54
    specialize divisor_complement_prefix_lookup (a)
  5. L55
    apply divisor_complement_prefix_lookup
  6. L56
    exact hp
  7. L57
    exact hi
  8. L58
    exact hia
  9. L59
    specialize divisor_complement_symmetric (n)
  10. L60
    specialize divisor_complement_symmetric (j)
12Use earlier factsL61–70

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

  1. L61
    specialize divisor_complement_symmetric (a)
  2. L62
    apply divisor_complement_symmetric
  3. L63
    exact hn
  4. L64
    specialize divisor_complement_prefix_lookup (n)
  5. L65
    specialize divisor_complement_prefix_lookup (b)
  6. L66
    specialize divisor_complement_prefix_lookup (c)
  7. L67
    specialize divisor_complement_prefix_lookup (S n)
  8. L68
    specialize divisor_complement_prefix_lookup (j)
  9. L69
    specialize divisor_complement_prefix_lookup (a)
  10. L70
    apply divisor_complement_prefix_lookup
13Use earlier factsL71–73

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

  1. L71
    exact hp
  2. L72
    exact hj
  3. L73
    exact hja
14Separate the logical casesL74–74

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

  1. L74
    split
15Use earlier factsL75–75

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

  1. L75
    exact hb
16Separate the logical casesL76–76

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

  1. L76
    split
17Use earlier factsL77–83

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

  1. L77
    exact hinj
  2. L78
    specialize finite_bounded_injective_surjective (S n)
  3. L79
    specialize finite_bounded_injective_surjective (b)
  4. L80
    specialize finite_bounded_injective_surjective (c)
  5. L81
    apply finite_bounded_injective_surjective
  6. L82
    exact hb
  7. L83
    exact hinj

Library-wide reading audit

Original defined command ledger · 83 lines
  1. 0001intro n
  2. 0002intro b
  3. 0003intro c
  4. 0004intro hn
  5. 0005intro hp
  6. 0006have hb : BoundedPrefix(b,c,S n)
  7. 0007intro i
  8. 0008intro hi
  9. 0009have hv : ∃ q. BetaAt(b,c,i,q)DivisorComplement(n,i,q)
  10. 0010specialize hp (i)
  11. 0011apply hp
  12. 0012exact hi
  13. 0013cases hv
  14. 0014cases hv_witness
  15. 0015exists x
  16. 0016split
  17. 0017exact hv_witness_left
  18. 0018specialize succ_le_succ (x)
  19. 0019specialize succ_le_succ (n)
  20. 0020apply succ_le_succ
  21. 0021specialize divisor_complement_bounded (n)
  22. 0022specialize divisor_complement_bounded (i)
  23. 0023specialize divisor_complement_bounded (x)
  24. 0024apply divisor_complement_bounded
  25. 0025exact hn
  26. 0026specialize le_of_succ_le_succ (i)
  27. 0027specialize le_of_succ_le_succ (n)
  28. 0028apply le_of_succ_le_succ
  29. 0029exact hi
  30. 0030exact hv_witness_right
  31. 0031have hinj : InjectivePrefix(b,c,S n)
  32. 0032intro i
  33. 0033intro j
  34. 0034intro a
  35. 0035intro hi
  36. 0036intro hj
  37. 0037intro hia
  38. 0038intro hja
  39. 0039specialize divisor_complement_functional (n)
  40. 0040specialize divisor_complement_functional (a)
  41. 0041specialize divisor_complement_functional (i)
  42. 0042specialize divisor_complement_functional (j)
  43. 0043apply divisor_complement_functional
  44. 0044specialize divisor_complement_symmetric (n)
  45. 0045specialize divisor_complement_symmetric (i)
  46. 0046specialize divisor_complement_symmetric (a)
  47. 0047apply divisor_complement_symmetric
  48. 0048exact hn
  49. 0049specialize divisor_complement_prefix_lookup (n)
  50. 0050specialize divisor_complement_prefix_lookup (b)
  51. 0051specialize divisor_complement_prefix_lookup (c)
  52. 0052specialize divisor_complement_prefix_lookup (S n)
  53. 0053specialize divisor_complement_prefix_lookup (i)
  54. 0054specialize divisor_complement_prefix_lookup (a)
  55. 0055apply divisor_complement_prefix_lookup
  56. 0056exact hp
  57. 0057exact hi
  58. 0058exact hia
  59. 0059specialize divisor_complement_symmetric (n)
  60. 0060specialize divisor_complement_symmetric (j)
  61. 0061specialize divisor_complement_symmetric (a)
  62. 0062apply divisor_complement_symmetric
  63. 0063exact hn
  64. 0064specialize divisor_complement_prefix_lookup (n)
  65. 0065specialize divisor_complement_prefix_lookup (b)
  66. 0066specialize divisor_complement_prefix_lookup (c)
  67. 0067specialize divisor_complement_prefix_lookup (S n)
  68. 0068specialize divisor_complement_prefix_lookup (j)
  69. 0069specialize divisor_complement_prefix_lookup (a)
  70. 0070apply divisor_complement_prefix_lookup
  71. 0071exact hp
  72. 0072exact hj
  73. 0073exact hja
  74. 0074split
  75. 0075exact hb
  76. 0076split
  77. 0077exact hinj
  78. 0078specialize finite_bounded_injective_surjective (S n)
  79. 0079specialize finite_bounded_injective_surjective (b)
  80. 0080specialize finite_bounded_injective_surjective (c)
  81. 0081apply finite_bounded_injective_surjective
  82. 0082exact hb
  83. 0083exact hinj