AF0010

factor_permutation_matched_append

Construct a genuine matching permutation after adjoining the same last factor, retaining the exact prefix-preservation and fresh-index equations.

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

The original division, gcd, cancellation, and factor-existence foundations are exposed through checked wrappers. Unordered uniqueness adds an actual bounded, injective, surjective index map matching repeated prime occurrences. The empty factor list represents one, not zero.

Exact theorem in conservative defined notation

∀ b. ∀ c. ∀ d. ∀ e. ∀ u. ∀ v. ∀ l. ∀ p. PermutationPrefix(u,v,l)FactorListMatching(b,c,d,e,u,v,l)BetaAt(b,c,l,p)BetaAt(d,e,l,p) → ∃ x. ∃ y. PermutationPrefix(x,y,S l)FactorListMatching(b,c,d,e,x,y,S l) ∧ (BetaAt(x,y,l,l) ∧ (∀ z. ∀ n. Lt(z,l)BetaAt(u,v,z,n)BetaAt(x,y,z,n)))

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall b c d e u v l p. (((((forall pfp_i_matched_oldpermutationbounded. (exists pfp_gap_matched_oldpermutationboundedindex. pfp_gap_matched_oldpermutationboundedindex + S (pfp_i_matched_oldpermutationbounded) = (l)) -> exists pfp_a_matched_oldpermutationbounded. (((exists ff_h_pfp_matched_oldpermutationboundedentry. ff_h_pfp_matched_oldpermutationboundedentry + S (pfp_a_matched_oldpermutationbounded) = S ((S (pfp_i_matched_oldpermutationbounded)) * v)) /\ exists ff_q_pfp_matched_oldpermutationboundedentry. u = ff_q_pfp_matched_oldpermutationboundedentry * S ((S (pfp_i_matched_oldpermutationbounded)) * v) + (pfp_a_matched_oldpermutationbounded))) /\ (exists pfp_gap_matched_oldpermutationboundedvalue. pfp_gap_matched_oldpermutationboundedvalue + S (pfp_a_matched_oldpermutationbounded) = (l))) /\ (((forall pfp_i_matched_oldpermutationinjective pfp_j_matched_oldpermutationinjective pfp_a_matched_oldpermutationinjective. (exists pfp_gap_matched_oldpermutationinjectivefirst. pfp_gap_matched_oldpermutationinjectivefirst + S (pfp_i_matched_oldpermutationinjective) = (l)) -> (exists pfp_gap_matched_oldpermutationinjectivesecond. pfp_gap_matched_oldpermutationinjectivesecond + S (pfp_j_matched_oldpermutationinjective) = (l)) -> (((exists ff_h_pfp_matched_oldpermutationinjectiveleft. ff_h_pfp_matched_oldpermutationinjectiveleft + S (pfp_a_matched_oldpermutationinjective) = S ((S (pfp_i_matched_oldpermutationinjective)) * v)) /\ exists ff_q_pfp_matched_oldpermutationinjectiveleft. u = ff_q_pfp_matched_oldpermutationinjectiveleft * S ((S (pfp_i_matched_oldpermutationinjective)) * v) + (pfp_a_matched_oldpermutationinjective))) -> (((exists ff_h_pfp_matched_oldpermutationinjectiveright. ff_h_pfp_matched_oldpermutationinjectiveright + S (pfp_a_matched_oldpermutationinjective) = S ((S (pfp_j_matched_oldpermutationinjective)) * v)) /\ exists ff_q_pfp_matched_oldpermutationinjectiveright. u = ff_q_pfp_matched_oldpermutationinjectiveright * S ((S (pfp_j_matched_oldpermutationinjective)) * v) + (pfp_a_matched_oldpermutationinjective))) -> pfp_i_matched_oldpermutationinjective = pfp_j_matched_oldpermutationinjective) /\ (forall pfp_a_matched_oldpermutationsurjective. (exists pfp_gap_matched_oldpermutationsurjectivevalue. pfp_gap_matched_oldpermutationsurjectivevalue + S (pfp_a_matched_oldpermutationsurjective) = (l)) -> exists pfp_i_matched_oldpermutationsurjective. (exists pfp_gap_matched_oldpermutationsurjectiveindex. pfp_gap_matched_oldpermutationsurjectiveindex + S (pfp_i_matched_oldpermutationsurjective) = (l)) /\ (((exists ff_h_pfp_matched_oldpermutationsurjectiveentry. ff_h_pfp_matched_oldpermutationsurjectiveentry + S (pfp_a_matched_oldpermutationsurjective) = S ((S (pfp_i_matched_oldpermutationsurjective)) * v)) /\ exists ff_q_pfp_matched_oldpermutationsurjectiveentry. u = ff_q_pfp_matched_oldpermutationsurjectiveentry * S ((S (pfp_i_matched_oldpermutationsurjective)) * v) + (pfp_a_matched_oldpermutationsurjective)))))))) /\ (forall pfp_i_matched_oldmatching pfp_j_matched_oldmatching pfp_a_matched_oldmatching. (exists pfp_gap_matched_oldmatchingbound. pfp_gap_matched_oldmatchingbound + S (pfp_i_matched_oldmatching) = (l)) -> (((exists ff_h_pfp_matched_oldmatchingmap. ff_h_pfp_matched_oldmatchingmap + S (pfp_j_matched_oldmatching) = S ((S (pfp_i_matched_oldmatching)) * v)) /\ exists ff_q_pfp_matched_oldmatchingmap. u = ff_q_pfp_matched_oldmatchingmap * S ((S (pfp_i_matched_oldmatching)) * v) + (pfp_j_matched_oldmatching))) -> (((exists ff_h_pfp_matched_oldmatchingsource. ff_h_pfp_matched_oldmatchingsource + S (pfp_a_matched_oldmatching) = S ((S (pfp_i_matched_oldmatching)) * c)) /\ exists ff_q_pfp_matched_oldmatchingsource. b = ff_q_pfp_matched_oldmatchingsource * S ((S (pfp_i_matched_oldmatching)) * c) + (pfp_a_matched_oldmatching))) -> (((exists ff_h_pfp_matched_oldmatchingtarget. ff_h_pfp_matched_oldmatchingtarget + S (pfp_a_matched_oldmatching) = S ((S (pfp_j_matched_oldmatching)) * e)) /\ exists ff_q_pfp_matched_oldmatchingtarget. d = ff_q_pfp_matched_oldmatchingtarget * S ((S (pfp_j_matched_oldmatching)) * e) + (pfp_a_matched_oldmatching)))))) -> (((exists ff_h_pfp_matched_left. ff_h_pfp_matched_left + S (p) = S ((S (l)) * c)) /\ exists ff_q_pfp_matched_left. b = ff_q_pfp_matched_left * S ((S (l)) * c) + (p))) -> (((exists ff_h_pfp_matched_right. ff_h_pfp_matched_right + S (p) = S ((S (l)) * e)) /\ exists ff_q_pfp_matched_right. d = ff_q_pfp_matched_right * S ((S (l)) * e) + (p))) -> exists U V. ((((((forall pfp_i_matched_newpermutationbounded. (exists pfp_gap_matched_newpermutationboundedindex. pfp_gap_matched_newpermutationboundedindex + S (pfp_i_matched_newpermutationbounded) = (S l)) -> exists pfp_a_matched_newpermutationbounded. (((exists ff_h_pfp_matched_newpermutationboundedentry. ff_h_pfp_matched_newpermutationboundedentry + S (pfp_a_matched_newpermutationbounded) = S ((S (pfp_i_matched_newpermutationbounded)) * V)) /\ exists ff_q_pfp_matched_newpermutationboundedentry. U = ff_q_pfp_matched_newpermutationboundedentry * S ((S (pfp_i_matched_newpermutationbounded)) * V) + (pfp_a_matched_newpermutationbounded))) /\ (exists pfp_gap_matched_newpermutationboundedvalue. pfp_gap_matched_newpermutationboundedvalue + S (pfp_a_matched_newpermutationbounded) = (S l))) /\ (((forall pfp_i_matched_newpermutationinjective pfp_j_matched_newpermutationinjective pfp_a_matched_newpermutationinjective. (exists pfp_gap_matched_newpermutationinjectivefirst. pfp_gap_matched_newpermutationinjectivefirst + S (pfp_i_matched_newpermutationinjective) = (S l)) -> (exists pfp_gap_matched_newpermutationinjectivesecond. pfp_gap_matched_newpermutationinjectivesecond + S (pfp_j_matched_newpermutationinjective) = (S l)) -> (((exists ff_h_pfp_matched_newpermutationinjectiveleft. ff_h_pfp_matched_newpermutationinjectiveleft + S (pfp_a_matched_newpermutationinjective) = S ((S (pfp_i_matched_newpermutationinjective)) * V)) /\ exists ff_q_pfp_matched_newpermutationinjectiveleft. U = ff_q_pfp_matched_newpermutationinjectiveleft * S ((S (pfp_i_matched_newpermutationinjective)) * V) + (pfp_a_matched_newpermutationinjective))) -> (((exists ff_h_pfp_matched_newpermutationinjectiveright. ff_h_pfp_matched_newpermutationinjectiveright + S (pfp_a_matched_newpermutationinjective) = S ((S (pfp_j_matched_newpermutationinjective)) * V)) /\ exists ff_q_pfp_matched_newpermutationinjectiveright. U = ff_q_pfp_matched_newpermutationinjectiveright * S ((S (pfp_j_matched_newpermutationinjective)) * V) + (pfp_a_matched_newpermutationinjective))) -> pfp_i_matched_newpermutationinjective = pfp_j_matched_newpermutationinjective) /\ (forall pfp_a_matched_newpermutationsurjective. (exists pfp_gap_matched_newpermutationsurjectivevalue. pfp_gap_matched_newpermutationsurjectivevalue + S (pfp_a_matched_newpermutationsurjective) = (S l)) -> exists pfp_i_matched_newpermutationsurjective. (exists pfp_gap_matched_newpermutationsurjectiveindex. pfp_gap_matched_newpermutationsurjectiveindex + S (pfp_i_matched_newpermutationsurjective) = (S l)) /\ (((exists ff_h_pfp_matched_newpermutationsurjectiveentry. ff_h_pfp_matched_newpermutationsurjectiveentry + S (pfp_a_matched_newpermutationsurjective) = S ((S (pfp_i_matched_newpermutationsurjective)) * V)) /\ exists ff_q_pfp_matched_newpermutationsurjectiveentry. U = ff_q_pfp_matched_newpermutationsurjectiveentry * S ((S (pfp_i_matched_newpermutationsurjective)) * V) + (pfp_a_matched_newpermutationsurjective)))))))) /\ (forall pfp_i_matched_newmatching pfp_j_matched_newmatching pfp_a_matched_newmatching. (exists pfp_gap_matched_newmatchingbound. pfp_gap_matched_newmatchingbound + S (pfp_i_matched_newmatching) = (S l)) -> (((exists ff_h_pfp_matched_newmatchingmap. ff_h_pfp_matched_newmatchingmap + S (pfp_j_matched_newmatching) = S ((S (pfp_i_matched_newmatching)) * V)) /\ exists ff_q_pfp_matched_newmatchingmap. U = ff_q_pfp_matched_newmatchingmap * S ((S (pfp_i_matched_newmatching)) * V) + (pfp_j_matched_newmatching))) -> (((exists ff_h_pfp_matched_newmatchingsource. ff_h_pfp_matched_newmatchingsource + S (pfp_a_matched_newmatching) = S ((S (pfp_i_matched_newmatching)) * c)) /\ exists ff_q_pfp_matched_newmatchingsource. b = ff_q_pfp_matched_newmatchingsource * S ((S (pfp_i_matched_newmatching)) * c) + (pfp_a_matched_newmatching))) -> (((exists ff_h_pfp_matched_newmatchingtarget. ff_h_pfp_matched_newmatchingtarget + S (pfp_a_matched_newmatching) = S ((S (pfp_j_matched_newmatching)) * e)) /\ exists ff_q_pfp_matched_newmatchingtarget. d = ff_q_pfp_matched_newmatchingtarget * S ((S (pfp_j_matched_newmatching)) * e) + (pfp_a_matched_newmatching)))))) /\ (((((exists ff_h_pfp_matched_extensionlast. ff_h_pfp_matched_extensionlast + S (l) = S ((S (l)) * V)) /\ exists ff_q_pfp_matched_extensionlast. U = ff_q_pfp_matched_extensionlast * S ((S (l)) * V) + (l))) /\ (forall pfp_i_matched_extensionprefix pfp_a_matched_extensionprefix. (exists pfp_gap_matched_extensionprefixbound. pfp_gap_matched_extensionprefixbound + S (pfp_i_matched_extensionprefix) = (l)) -> (((exists ff_h_pfp_matched_extensionprefixold. ff_h_pfp_matched_extensionprefixold + S (pfp_a_matched_extensionprefix) = S ((S (pfp_i_matched_extensionprefix)) * v)) /\ exists ff_q_pfp_matched_extensionprefixold. u = ff_q_pfp_matched_extensionprefixold * S ((S (pfp_i_matched_extensionprefix)) * v) + (pfp_a_matched_extensionprefix))) -> (((exists ff_h_pfp_matched_extensionprefixnew. ff_h_pfp_matched_extensionprefixnew + S (pfp_a_matched_extensionprefix) = S ((S (pfp_i_matched_extensionprefix)) * V)) /\ exists ff_q_pfp_matched_extensionprefixnew. U = ff_q_pfp_matched_extensionprefixnew * S ((S (pfp_i_matched_extensionprefix)) * V) + (pfp_a_matched_extensionprefix)))))))

Complete tactic proof in conservative notation

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

42 script commands · 9 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–10

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

  1. L1
    intro b
  2. L2
    intro c
  3. L3
    intro d
  4. L4
    intro e
  5. L5
    intro u
  6. L6
    intro v
  7. L7
    intro l
  8. L8
    intro p
  9. L9
    intro hm
  10. L10
    intro hleft
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hright
03Separate the logical casesL12–12

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

  1. L12
    cases hm
04Establish hexL13–18

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factor permutation index extend.

  1. L13
    have hex : ∃ U. ∃ V. PermutationPrefix(U,V,S l) ∧ (BetaAt(U,V,l,l) ∧ (∀ x. ∀ y. Lt(x,l) → BetaAt(u,v,x,y) → BetaAt(U,V,x,y)))Definitions: PermutationPrefix(U,V,S l)BetaAt(U,V,l,l)Lt(x,l)BetaAt(u,v,x,y)BetaAt(U,V,x,y)Original native command in the exact edition
  2. L14
    specialize factor_permutation_index_extend (u)
  3. L15
    specialize factor_permutation_index_extend (v)
  4. L16
    specialize factor_permutation_index_extend (l)
  5. L17
    apply factor_permutation_index_extend
  6. L18
    exact hm_left
05Separate the logical casesL19–21

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

  1. L19
    cases hex
  2. L20
    cases hex_witness
  3. L21
    cases hex_witness_witness
06Construct an explicit witnessL22–23

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

  1. L22
    exists x
  2. L23
    exists x1
07Separate the logical casesL24–25

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

  1. L24
    split
  2. L25
    split
08Use earlier factsL26–35

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

  1. L26
    exact hex_witness_witness_left
  2. L27
    specialize factor_permutation_matching_append (b)
  3. L28
    specialize factor_permutation_matching_append (c)
  4. L29
    specialize factor_permutation_matching_append (d)
  5. L30
    specialize factor_permutation_matching_append (e)
  6. L31
    specialize factor_permutation_matching_append (u)
  7. L32
    specialize factor_permutation_matching_append (v)
  8. L33
    specialize factor_permutation_matching_append (x)
  9. L34
    specialize factor_permutation_matching_append (x1)
  10. L35
    specialize factor_permutation_matching_append (l)
09Use earlier factsL36–42

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

  1. L36
    specialize factor_permutation_matching_append (p)
  2. L37
    apply factor_permutation_matching_append
  3. L38
    exact hm_right
  4. L39
    exact hex_witness_witness_right
  5. L40
    exact hleft
  6. L41
    exact hright
  7. L42
    exact hex_witness_witness_right

Library-wide reading audit

Original defined command ledger · 42 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro d
  4. 0004intro e
  5. 0005intro u
  6. 0006intro v
  7. 0007intro l
  8. 0008intro p
  9. 0009intro hm
  10. 0010intro hleft
  11. 0011intro hright
  12. 0012cases hm
  13. 0013have hex : ∃ U. ∃ V. PermutationPrefix(U,V,S l) ∧ (BetaAt(U,V,l,l) ∧ (∀ x. ∀ y. Lt(x,l)BetaAt(u,v,x,y)BetaAt(U,V,x,y)))
  14. 0014specialize factor_permutation_index_extend (u)
  15. 0015specialize factor_permutation_index_extend (v)
  16. 0016specialize factor_permutation_index_extend (l)
  17. 0017apply factor_permutation_index_extend
  18. 0018exact hm_left
  19. 0019cases hex
  20. 0020cases hex_witness
  21. 0021cases hex_witness_witness
  22. 0022exists x
  23. 0023exists x1
  24. 0024split
  25. 0025split
  26. 0026exact hex_witness_witness_left
  27. 0027specialize factor_permutation_matching_append (b)
  28. 0028specialize factor_permutation_matching_append (c)
  29. 0029specialize factor_permutation_matching_append (d)
  30. 0030specialize factor_permutation_matching_append (e)
  31. 0031specialize factor_permutation_matching_append (u)
  32. 0032specialize factor_permutation_matching_append (v)
  33. 0033specialize factor_permutation_matching_append (x)
  34. 0034specialize factor_permutation_matching_append (x1)
  35. 0035specialize factor_permutation_matching_append (l)
  36. 0036specialize factor_permutation_matching_append (p)
  37. 0037apply factor_permutation_matching_append
  38. 0038exact hm_right
  39. 0039exact hex_witness_witness_right
  40. 0040exact hleft
  41. 0041exact hright
  42. 0042exact hex_witness_witness_right