AF0010

factor_permutation_matched_append

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

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

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 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)))))))

Constructive proof overview

Generated structural guide

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

The unchanged tactic script uses 2 declared prerequisites and contains 42 exact native proof lines.

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

Proof neighborhood

Direct dependencies

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

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.

Named ingredients (2)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

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: PermutationPrefixLtBetaAt
  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 exact 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 : exists U V. ((((forall pfp_i_append_permutationbounded. (exists pfp_gap_append_permutationboundedindex. pfp_gap_append_permutationboundedindex + S (pfp_i_append_permutationbounded) = (S l)) -> exists pfp_a_append_permutationbounded. (((exists ff_h_pfp_append_permutationboundedentry. ff_h_pfp_append_permutationboundedentry + S (pfp_a_append_permutationbounded) = S ((S (pfp_i_append_permutationbounded)) * V)) /\ exists ff_q_pfp_append_permutationboundedentry. U = ff_q_pfp_append_permutationboundedentry * S ((S (pfp_i_append_permutationbounded)) * V) + (pfp_a_append_permutationbounded))) /\ (exists pfp_gap_append_permutationboundedvalue. pfp_gap_append_permutationboundedvalue + S (pfp_a_append_permutationbounded) = (S l))) /\ (((forall pfp_i_append_permutationinjective pfp_j_append_permutationinjective pfp_a_append_permutationinjective. (exists pfp_gap_append_permutationinjectivefirst. pfp_gap_append_permutationinjectivefirst + S (pfp_i_append_permutationinjective) = (S l)) -> (exists pfp_gap_append_permutationinjectivesecond. pfp_gap_append_permutationinjectivesecond + S (pfp_j_append_permutationinjective) = (S l)) -> (((exists ff_h_pfp_append_permutationinjectiveleft. ff_h_pfp_append_permutationinjectiveleft + S (pfp_a_append_permutationinjective) = S ((S (pfp_i_append_permutationinjective)) * V)) /\ exists ff_q_pfp_append_permutationinjectiveleft. U = ff_q_pfp_append_permutationinjectiveleft * S ((S (pfp_i_append_permutationinjective)) * V) + (pfp_a_append_permutationinjective))) -> (((exists ff_h_pfp_append_permutationinjectiveright. ff_h_pfp_append_permutationinjectiveright + S (pfp_a_append_permutationinjective) = S ((S (pfp_j_append_permutationinjective)) * V)) /\ exists ff_q_pfp_append_permutationinjectiveright. U = ff_q_pfp_append_permutationinjectiveright * S ((S (pfp_j_append_permutationinjective)) * V) + (pfp_a_append_permutationinjective))) -> pfp_i_append_permutationinjective = pfp_j_append_permutationinjective) /\ (forall pfp_a_append_permutationsurjective. (exists pfp_gap_append_permutationsurjectivevalue. pfp_gap_append_permutationsurjectivevalue + S (pfp_a_append_permutationsurjective) = (S l)) -> exists pfp_i_append_permutationsurjective. (exists pfp_gap_append_permutationsurjectiveindex. pfp_gap_append_permutationsurjectiveindex + S (pfp_i_append_permutationsurjective) = (S l)) /\ (((exists ff_h_pfp_append_permutationsurjectiveentry. ff_h_pfp_append_permutationsurjectiveentry + S (pfp_a_append_permutationsurjective) = S ((S (pfp_i_append_permutationsurjective)) * V)) /\ exists ff_q_pfp_append_permutationsurjectiveentry. U = ff_q_pfp_append_permutationsurjectiveentry * S ((S (pfp_i_append_permutationsurjective)) * V) + (pfp_a_append_permutationsurjective)))))))) /\ (((((exists ff_h_pfp_append_permutation_extensionlast. ff_h_pfp_append_permutation_extensionlast + S (l) = S ((S (l)) * V)) /\ exists ff_q_pfp_append_permutation_extensionlast. U = ff_q_pfp_append_permutation_extensionlast * S ((S (l)) * V) + (l))) /\ (forall pfp_i_append_permutation_extensionprefix pfp_a_append_permutation_extensionprefix. (exists pfp_gap_append_permutation_extensionprefixbound. pfp_gap_append_permutation_extensionprefixbound + S (pfp_i_append_permutation_extensionprefix) = (l)) -> (((exists ff_h_pfp_append_permutation_extensionprefixold. ff_h_pfp_append_permutation_extensionprefixold + S (pfp_a_append_permutation_extensionprefix) = S ((S (pfp_i_append_permutation_extensionprefix)) * v)) /\ exists ff_q_pfp_append_permutation_extensionprefixold. u = ff_q_pfp_append_permutation_extensionprefixold * S ((S (pfp_i_append_permutation_extensionprefix)) * v) + (pfp_a_append_permutation_extensionprefix))) -> (((exists ff_h_pfp_append_permutation_extensionprefixnew. ff_h_pfp_append_permutation_extensionprefixnew + S (pfp_a_append_permutation_extensionprefix) = S ((S (pfp_i_append_permutation_extensionprefix)) * V)) /\ exists ff_q_pfp_append_permutation_extensionprefixnew. U = ff_q_pfp_append_permutation_extensionprefixnew * S ((S (pfp_i_append_permutation_extensionprefix)) * V) + (pfp_a_append_permutation_extensionprefix)))))))
  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