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 D E u v l j p q. (exists pfp_gap_unswap_exists_index. pfp_gap_unswap_exists_index + S (j) = (l)) -> (((((forall pfp_i_unswap_exists_prefixpermutationbounded. (exists pfp_gap_unswap_exists_prefixpermutationboundedindex. pfp_gap_unswap_exists_prefixpermutationboundedindex + S (pfp_i_unswap_exists_prefixpermutationbounded) = (l)) -> exists pfp_a_unswap_exists_prefixpermutationbounded. (((exists ff_h_pfp_unswap_exists_prefixpermutationboundedentry. ff_h_pfp_unswap_exists_prefixpermutationboundedentry + S (pfp_a_unswap_exists_prefixpermutationbounded) = S ((S (pfp_i_unswap_exists_prefixpermutationbounded)) * v)) /\ exists ff_q_pfp_unswap_exists_prefixpermutationboundedentry. u = ff_q_pfp_unswap_exists_prefixpermutationboundedentry * S ((S (pfp_i_unswap_exists_prefixpermutationbounded)) * v) + (pfp_a_unswap_exists_prefixpermutationbounded))) /\ (exists pfp_gap_unswap_exists_prefixpermutationboundedvalue. pfp_gap_unswap_exists_prefixpermutationboundedvalue + S (pfp_a_unswap_exists_prefixpermutationbounded) = (l))) /\ (((forall pfp_i_unswap_exists_prefixpermutationinjective pfp_j_unswap_exists_prefixpermutationinjective pfp_a_unswap_exists_prefixpermutationinjective. (exists pfp_gap_unswap_exists_prefixpermutationinjectivefirst. pfp_gap_unswap_exists_prefixpermutationinjectivefirst + S (pfp_i_unswap_exists_prefixpermutationinjective) = (l)) -> (exists pfp_gap_unswap_exists_prefixpermutationinjectivesecond. pfp_gap_unswap_exists_prefixpermutationinjectivesecond + S (pfp_j_unswap_exists_prefixpermutationinjective) = (l)) -> (((exists ff_h_pfp_unswap_exists_prefixpermutationinjectiveleft. ff_h_pfp_unswap_exists_prefixpermutationinjectiveleft + S (pfp_a_unswap_exists_prefixpermutationinjective) = S ((S (pfp_i_unswap_exists_prefixpermutationinjective)) * v)) /\ exists ff_q_pfp_unswap_exists_prefixpermutationinjectiveleft. u = ff_q_pfp_unswap_exists_prefixpermutationinjectiveleft * S ((S (pfp_i_unswap_exists_prefixpermutationinjective)) * v) + (pfp_a_unswap_exists_prefixpermutationinjective))) -> (((exists ff_h_pfp_unswap_exists_prefixpermutationinjectiveright. ff_h_pfp_unswap_exists_prefixpermutationinjectiveright + S (pfp_a_unswap_exists_prefixpermutationinjective) = S ((S (pfp_j_unswap_exists_prefixpermutationinjective)) * v)) /\ exists ff_q_pfp_unswap_exists_prefixpermutationinjectiveright. u = ff_q_pfp_unswap_exists_prefixpermutationinjectiveright * S ((S (pfp_j_unswap_exists_prefixpermutationinjective)) * v) + (pfp_a_unswap_exists_prefixpermutationinjective))) -> pfp_i_unswap_exists_prefixpermutationinjective = pfp_j_unswap_exists_prefixpermutationinjective) /\ (forall pfp_a_unswap_exists_prefixpermutationsurjective. (exists pfp_gap_unswap_exists_prefixpermutationsurjectivevalue. pfp_gap_unswap_exists_prefixpermutationsurjectivevalue + S (pfp_a_unswap_exists_prefixpermutationsurjective) = (l)) -> exists pfp_i_unswap_exists_prefixpermutationsurjective. (exists pfp_gap_unswap_exists_prefixpermutationsurjectiveindex. pfp_gap_unswap_exists_prefixpermutationsurjectiveindex + S (pfp_i_unswap_exists_prefixpermutationsurjective) = (l)) /\ (((exists ff_h_pfp_unswap_exists_prefixpermutationsurjectiveentry. ff_h_pfp_unswap_exists_prefixpermutationsurjectiveentry + S (pfp_a_unswap_exists_prefixpermutationsurjective) = S ((S (pfp_i_unswap_exists_prefixpermutationsurjective)) * v)) /\ exists ff_q_pfp_unswap_exists_prefixpermutationsurjectiveentry. u = ff_q_pfp_unswap_exists_prefixpermutationsurjectiveentry * S ((S (pfp_i_unswap_exists_prefixpermutationsurjective)) * v) + (pfp_a_unswap_exists_prefixpermutationsurjective)))))))) /\ (forall pfp_i_unswap_exists_prefixmatching pfp_j_unswap_exists_prefixmatching pfp_a_unswap_exists_prefixmatching. (exists pfp_gap_unswap_exists_prefixmatchingbound. pfp_gap_unswap_exists_prefixmatchingbound + S (pfp_i_unswap_exists_prefixmatching) = (l)) -> (((exists ff_h_pfp_unswap_exists_prefixmatchingmap. ff_h_pfp_unswap_exists_prefixmatchingmap + S (pfp_j_unswap_exists_prefixmatching) = S ((S (pfp_i_unswap_exists_prefixmatching)) * v)) /\ exists ff_q_pfp_unswap_exists_prefixmatchingmap. u = ff_q_pfp_unswap_exists_prefixmatchingmap * S ((S (pfp_i_unswap_exists_prefixmatching)) * v) + (pfp_j_unswap_exists_prefixmatching))) -> (((exists ff_h_pfp_unswap_exists_prefixmatchingsource. ff_h_pfp_unswap_exists_prefixmatchingsource + S (pfp_a_unswap_exists_prefixmatching) = S ((S (pfp_i_unswap_exists_prefixmatching)) * c)) /\ exists ff_q_pfp_unswap_exists_prefixmatchingsource. b = ff_q_pfp_unswap_exists_prefixmatchingsource * S ((S (pfp_i_unswap_exists_prefixmatching)) * c) + (pfp_a_unswap_exists_prefixmatching))) -> (((exists ff_h_pfp_unswap_exists_prefixmatchingtarget. ff_h_pfp_unswap_exists_prefixmatchingtarget + S (pfp_a_unswap_exists_prefixmatching) = S ((S (pfp_j_unswap_exists_prefixmatching)) * E)) /\ exists ff_q_pfp_unswap_exists_prefixmatchingtarget. D = ff_q_pfp_unswap_exists_prefixmatchingtarget * S ((S (pfp_j_unswap_exists_prefixmatching)) * E) + (pfp_a_unswap_exists_prefixmatching)))))) -> (((exists ff_h_pfp_unswap_exists_last. ff_h_pfp_unswap_exists_last + S (p) = S ((S (l)) * c)) /\ exists ff_q_pfp_unswap_exists_last. b = ff_q_pfp_unswap_exists_last * S ((S (l)) * c) + (p))) -> (((((exists ff_h_pfp_target_swapoldi. ff_h_pfp_target_swapoldi + S (p) = S ((S (j)) * e)) /\ exists ff_q_pfp_target_swapoldi. d = ff_q_pfp_target_swapoldi * S ((S (j)) * e) + (p))) /\ (((((exists ff_h_pfp_target_swapoldlast. ff_h_pfp_target_swapoldlast + S (q) = S ((S (l)) * e)) /\ exists ff_q_pfp_target_swapoldlast. d = ff_q_pfp_target_swapoldlast * S ((S (l)) * e) + (q))) /\ (((((exists ff_h_pfp_target_swapnewi. ff_h_pfp_target_swapnewi + S (q) = S ((S (j)) * E)) /\ exists ff_q_pfp_target_swapnewi. D = ff_q_pfp_target_swapnewi * S ((S (j)) * E) + (q))) /\ (((((exists ff_h_pfp_target_swapnewlast. ff_h_pfp_target_swapnewlast + S (p) = S ((S (l)) * E)) /\ exists ff_q_pfp_target_swapnewlast. D = ff_q_pfp_target_swapnewlast * S ((S (l)) * E) + (p))) /\ (forall pfp_j_target_swap pfp_a_target_swap. (exists pfp_gap_target_swapbound. pfp_gap_target_swapbound + S (pfp_j_target_swap) = (S (l))) -> ~(pfp_j_target_swap = j) -> ~(pfp_j_target_swap = l) -> (((exists ff_h_pfp_target_swapold. ff_h_pfp_target_swapold + S (pfp_a_target_swap) = S ((S (pfp_j_target_swap)) * e)) /\ exists ff_q_pfp_target_swapold. d = ff_q_pfp_target_swapold * S ((S (pfp_j_target_swap)) * e) + (pfp_a_target_swap))) -> (((exists ff_h_pfp_target_swapnew. ff_h_pfp_target_swapnew + S (pfp_a_target_swap) = S ((S (pfp_j_target_swap)) * E)) /\ exists ff_q_pfp_target_swapnew. D = ff_q_pfp_target_swapnew * S ((S (pfp_j_target_swap)) * E) + (pfp_a_target_swap)))))))))))) -> exists U V. (((((forall pfp_i_unswap_exists_resultpermutationbounded. (exists pfp_gap_unswap_exists_resultpermutationboundedindex. pfp_gap_unswap_exists_resultpermutationboundedindex + S (pfp_i_unswap_exists_resultpermutationbounded) = (S l)) -> exists pfp_a_unswap_exists_resultpermutationbounded. (((exists ff_h_pfp_unswap_exists_resultpermutationboundedentry. ff_h_pfp_unswap_exists_resultpermutationboundedentry + S (pfp_a_unswap_exists_resultpermutationbounded) = S ((S (pfp_i_unswap_exists_resultpermutationbounded)) * V)) /\ exists ff_q_pfp_unswap_exists_resultpermutationboundedentry. U = ff_q_pfp_unswap_exists_resultpermutationboundedentry * S ((S (pfp_i_unswap_exists_resultpermutationbounded)) * V) + (pfp_a_unswap_exists_resultpermutationbounded))) /\ (exists pfp_gap_unswap_exists_resultpermutationboundedvalue. pfp_gap_unswap_exists_resultpermutationboundedvalue + S (pfp_a_unswap_exists_resultpermutationbounded) = (S l))) /\ (((forall pfp_i_unswap_exists_resultpermutationinjective pfp_j_unswap_exists_resultpermutationinjective pfp_a_unswap_exists_resultpermutationinjective. (exists pfp_gap_unswap_exists_resultpermutationinjectivefirst. pfp_gap_unswap_exists_resultpermutationinjectivefirst + S (pfp_i_unswap_exists_resultpermutationinjective) = (S l)) -> (exists pfp_gap_unswap_exists_resultpermutationinjectivesecond. pfp_gap_unswap_exists_resultpermutationinjectivesecond + S (pfp_j_unswap_exists_resultpermutationinjective) = (S l)) -> (((exists ff_h_pfp_unswap_exists_resultpermutationinjectiveleft. ff_h_pfp_unswap_exists_resultpermutationinjectiveleft + S (pfp_a_unswap_exists_resultpermutationinjective) = S ((S (pfp_i_unswap_exists_resultpermutationinjective)) * V)) /\ exists ff_q_pfp_unswap_exists_resultpermutationinjectiveleft. U = ff_q_pfp_unswap_exists_resultpermutationinjectiveleft * S ((S (pfp_i_unswap_exists_resultpermutationinjective)) * V) + (pfp_a_unswap_exists_resultpermutationinjective))) -> (((exists ff_h_pfp_unswap_exists_resultpermutationinjectiveright. ff_h_pfp_unswap_exists_resultpermutationinjectiveright + S (pfp_a_unswap_exists_resultpermutationinjective) = S ((S (pfp_j_unswap_exists_resultpermutationinjective)) * V)) /\ exists ff_q_pfp_unswap_exists_resultpermutationinjectiveright. U = ff_q_pfp_unswap_exists_resultpermutationinjectiveright * S ((S (pfp_j_unswap_exists_resultpermutationinjective)) * V) + (pfp_a_unswap_exists_resultpermutationinjective))) -> pfp_i_unswap_exists_resultpermutationinjective = pfp_j_unswap_exists_resultpermutationinjective) /\ (forall pfp_a_unswap_exists_resultpermutationsurjective. (exists pfp_gap_unswap_exists_resultpermutationsurjectivevalue. pfp_gap_unswap_exists_resultpermutationsurjectivevalue + S (pfp_a_unswap_exists_resultpermutationsurjective) = (S l)) -> exists pfp_i_unswap_exists_resultpermutationsurjective. (exists pfp_gap_unswap_exists_resultpermutationsurjectiveindex. pfp_gap_unswap_exists_resultpermutationsurjectiveindex + S (pfp_i_unswap_exists_resultpermutationsurjective) = (S l)) /\ (((exists ff_h_pfp_unswap_exists_resultpermutationsurjectiveentry. ff_h_pfp_unswap_exists_resultpermutationsurjectiveentry + S (pfp_a_unswap_exists_resultpermutationsurjective) = S ((S (pfp_i_unswap_exists_resultpermutationsurjective)) * V)) /\ exists ff_q_pfp_unswap_exists_resultpermutationsurjectiveentry. U = ff_q_pfp_unswap_exists_resultpermutationsurjectiveentry * S ((S (pfp_i_unswap_exists_resultpermutationsurjective)) * V) + (pfp_a_unswap_exists_resultpermutationsurjective)))))))) /\ (forall pfp_i_unswap_exists_resultmatching pfp_j_unswap_exists_resultmatching pfp_a_unswap_exists_resultmatching. (exists pfp_gap_unswap_exists_resultmatchingbound. pfp_gap_unswap_exists_resultmatchingbound + S (pfp_i_unswap_exists_resultmatching) = (S l)) -> (((exists ff_h_pfp_unswap_exists_resultmatchingmap. ff_h_pfp_unswap_exists_resultmatchingmap + S (pfp_j_unswap_exists_resultmatching) = S ((S (pfp_i_unswap_exists_resultmatching)) * V)) /\ exists ff_q_pfp_unswap_exists_resultmatchingmap. U = ff_q_pfp_unswap_exists_resultmatchingmap * S ((S (pfp_i_unswap_exists_resultmatching)) * V) + (pfp_j_unswap_exists_resultmatching))) -> (((exists ff_h_pfp_unswap_exists_resultmatchingsource. ff_h_pfp_unswap_exists_resultmatchingsource + S (pfp_a_unswap_exists_resultmatching) = S ((S (pfp_i_unswap_exists_resultmatching)) * c)) /\ exists ff_q_pfp_unswap_exists_resultmatchingsource. b = ff_q_pfp_unswap_exists_resultmatchingsource * S ((S (pfp_i_unswap_exists_resultmatching)) * c) + (pfp_a_unswap_exists_resultmatching))) -> (((exists ff_h_pfp_unswap_exists_resultmatchingtarget. ff_h_pfp_unswap_exists_resultmatchingtarget + S (pfp_a_unswap_exists_resultmatching) = S ((S (pfp_j_unswap_exists_resultmatching)) * e)) /\ exists ff_q_pfp_unswap_exists_resultmatchingtarget. d = ff_q_pfp_unswap_exists_resultmatchingtarget * S ((S (pfp_j_unswap_exists_resultmatching)) * e) + (pfp_a_unswap_exists_resultmatching))))))Constructive proof overview
Generated structural guide
Use the recursively constructed finite permutation's actual preimage, construct both extended and transposed map codes, and return a full matching bijection into the original unswapped target list.
The unchanged tactic script uses 4 declared prerequisites and contains 117 exact native proof lines.
Alpha v34 checked-use · first admitted v28 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
AF0010 factor_permutation_matched_append beta_prefix_swap_last_from_entries Stable theorem; checked-use authorized AF0013 factor_permutation_swap_bijection AF0017 factor_permutation_matching_unswapDirect 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
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 (3)
01Fix variables and assumptionsL1–10
02Fix variables and assumptionsL11–16
03Establish hrightL17–17
Establish this local claim before using it. It is not an additional assumption.
- L17
have hright : ((exists ff_h_pfp_unswap_exists_target_last. ff_h_pfp_unswap_exists_target_last + S (p) = S ((S (l)) * E)) /\ exists ff_q_pfp_unswap_exists_target_last. D = ff_q_pfp_unswap_exists_target_last * S ((S (l)) * E) + (p))
04Separate the logical casesL18–21
05Use earlier factsL22–22
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L22
exact hs_right_right_right_left
06Establish hfullL23–32
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factor permutation matched append.
- L23
have hfull : ∃ U. ∃ V. PermutationPrefix(U,V,S l) ∧ FactorListMatching(b,c,D,E,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: PermutationPrefixFactorListMatchingLtBetaAt - L24
specialize factor_permutation_matched_append (b) - L25
specialize factor_permutation_matched_append (c) - L26
specialize factor_permutation_matched_append (D) - L27
specialize factor_permutation_matched_append (E) - L28
specialize factor_permutation_matched_append (u) - L29
specialize factor_permutation_matched_append (v) - L30
specialize factor_permutation_matched_append (l) - L31
specialize factor_permutation_matched_append (p) - L32
apply factor_permutation_matched_append
07Use earlier factsL33–35
08Separate the logical casesL36–43
09Establish hpreimageL44–47
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hm left right right.
- L44
have hpreimage : exists i. (exists pfp_gap_unswap_preimage_bound. pfp_gap_unswap_preimage_bound + S (i) = (l)) /\ (((exists ff_h_pfp_unswap_preimage_entry. ff_h_pfp_unswap_preimage_entry + S (j) = S ((S (i)) * v)) /\ exists ff_q_pfp_unswap_preimage_entry. u = ff_q_pfp_unswap_preimage_entry * S ((S (i)) * v) + (j))) - L45
specialize hm_left_right_right (j) - L46
apply hm_left_right_right - L47
exact hj
10Separate the logical casesL48–49
11Establish hmapiL50–55
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hfull witness witness right right.
- L50
have hmapi : ((exists ff_h_pfp_unswap_full_image. ff_h_pfp_unswap_full_image + S (j) = S ((S (x2)) * x1)) /\ exists ff_q_pfp_unswap_full_image. x = ff_q_pfp_unswap_full_image * S ((S (x2)) * x1) + (j)) - L51
specialize hfull_witness_witness_right_right (x2) - L52
specialize hfull_witness_witness_right_right (j) - L53
apply hfull_witness_witness_right_right - L54
exact hpreimage_witness_left - L55
exact hpreimage_witness_right
12Establish hmapnewL56–65
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta prefix swap last from entries.
- L56
- L57
specialize beta_prefix_swap_last_from_entries (x) - L58
specialize beta_prefix_swap_last_from_entries (x1) - L59
specialize beta_prefix_swap_last_from_entries (l) - L60
specialize beta_prefix_swap_last_from_entries (x2) - L61
specialize beta_prefix_swap_last_from_entries (j) - L62
specialize beta_prefix_swap_last_from_entries (l) - L63
apply beta_prefix_swap_last_from_entries - L64
exact hpreimage_witness_left - L65
exact hmapi
13Use earlier factsL66–66
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L66
exact hfull_witness_witness_right_left
14Separate the logical casesL67–70
15Establish hmapswapL71–71
16Separate the logical casesL72–72
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L72
split
17Use earlier factsL73–73
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L73
exact hmapi
18Separate the logical casesL74–74
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L74
split
19Use earlier factsL75–75
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L75
exact hfull_witness_witness_right_left
20Separate the logical casesL76–76
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L76
split
21Use earlier factsL77–77
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L77
exact hmapnew_witness_witness_left
22Separate the logical casesL78–78
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L78
split
23Use earlier factsL79–80
24Construct an explicit witnessL81–82
25Separate the logical casesL83–83
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L83
split
26Use earlier factsL84–93
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L84
specialize factor_permutation_swap_bijection (x) - L85
specialize factor_permutation_swap_bijection (x1) - L86
specialize factor_permutation_swap_bijection (x3) - L87
specialize factor_permutation_swap_bijection (x4) - L88
specialize factor_permutation_swap_bijection (l) - L89
specialize factor_permutation_swap_bijection (x2) - L90
specialize factor_permutation_swap_bijection (j) - L91
specialize factor_permutation_swap_bijection (l) - L92
apply factor_permutation_swap_bijection - L93
exact hpreimage_witness_left
27Use earlier factsL94–103
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L94
exact hfull_witness_witness_left_left - L95
exact hmapswap - L96
specialize factor_permutation_matching_unswap (b) - L97
specialize factor_permutation_matching_unswap (c) - L98
specialize factor_permutation_matching_unswap (d) - L99
specialize factor_permutation_matching_unswap (e) - L100
specialize factor_permutation_matching_unswap (D) - L101
specialize factor_permutation_matching_unswap (E) - L102
specialize factor_permutation_matching_unswap (x) - L103
specialize factor_permutation_matching_unswap (x1)
28Use earlier factsL104–113
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L104
specialize factor_permutation_matching_unswap (x3) - L105
specialize factor_permutation_matching_unswap (x4) - L106
specialize factor_permutation_matching_unswap (l) - L107
specialize factor_permutation_matching_unswap (x2) - L108
specialize factor_permutation_matching_unswap (j) - L109
specialize factor_permutation_matching_unswap (p) - L110
specialize factor_permutation_matching_unswap (q) - L111
apply factor_permutation_matching_unswap - L112
exact hpreimage_witness_left - L113
exact hj
Original exact command ledger · 117 lines
- 0001
intro b - 0002
intro c - 0003
intro d - 0004
intro e - 0005
intro D - 0006
intro E - 0007
intro u - 0008
intro v - 0009
intro l - 0010
intro j - 0011
intro p - 0012
intro q - 0013
intro hj - 0014
intro hm - 0015
intro hleft - 0016
intro hs - 0017
have hright : ((exists ff_h_pfp_unswap_exists_target_last. ff_h_pfp_unswap_exists_target_last + S (p) = S ((S (l)) * E)) /\ exists ff_q_pfp_unswap_exists_target_last. D = ff_q_pfp_unswap_exists_target_last * S ((S (l)) * E) + (p)) - 0018
cases hs - 0019
cases hs_right - 0020
cases hs_right_right - 0021
cases hs_right_right_right - 0022
exact hs_right_right_right_left - 0023
have hfull : exists U V. ((((((forall pfp_i_unswap_full_matchingpermutationbounded. (exists pfp_gap_unswap_full_matchingpermutationboundedindex. pfp_gap_unswap_full_matchingpermutationboundedindex + S (pfp_i_unswap_full_matchingpermutationbounded) = (S l)) -> exists pfp_a_unswap_full_matchingpermutationbounded. (((exists ff_h_pfp_unswap_full_matchingpermutationboundedentry. ff_h_pfp_unswap_full_matchingpermutationboundedentry + S (pfp_a_unswap_full_matchingpermutationbounded) = S ((S (pfp_i_unswap_full_matchingpermutationbounded)) * V)) /\ exists ff_q_pfp_unswap_full_matchingpermutationboundedentry. U = ff_q_pfp_unswap_full_matchingpermutationboundedentry * S ((S (pfp_i_unswap_full_matchingpermutationbounded)) * V) + (pfp_a_unswap_full_matchingpermutationbounded))) /\ (exists pfp_gap_unswap_full_matchingpermutationboundedvalue. pfp_gap_unswap_full_matchingpermutationboundedvalue + S (pfp_a_unswap_full_matchingpermutationbounded) = (S l))) /\ (((forall pfp_i_unswap_full_matchingpermutationinjective pfp_j_unswap_full_matchingpermutationinjective pfp_a_unswap_full_matchingpermutationinjective. (exists pfp_gap_unswap_full_matchingpermutationinjectivefirst. pfp_gap_unswap_full_matchingpermutationinjectivefirst + S (pfp_i_unswap_full_matchingpermutationinjective) = (S l)) -> (exists pfp_gap_unswap_full_matchingpermutationinjectivesecond. pfp_gap_unswap_full_matchingpermutationinjectivesecond + S (pfp_j_unswap_full_matchingpermutationinjective) = (S l)) -> (((exists ff_h_pfp_unswap_full_matchingpermutationinjectiveleft. ff_h_pfp_unswap_full_matchingpermutationinjectiveleft + S (pfp_a_unswap_full_matchingpermutationinjective) = S ((S (pfp_i_unswap_full_matchingpermutationinjective)) * V)) /\ exists ff_q_pfp_unswap_full_matchingpermutationinjectiveleft. U = ff_q_pfp_unswap_full_matchingpermutationinjectiveleft * S ((S (pfp_i_unswap_full_matchingpermutationinjective)) * V) + (pfp_a_unswap_full_matchingpermutationinjective))) -> (((exists ff_h_pfp_unswap_full_matchingpermutationinjectiveright. ff_h_pfp_unswap_full_matchingpermutationinjectiveright + S (pfp_a_unswap_full_matchingpermutationinjective) = S ((S (pfp_j_unswap_full_matchingpermutationinjective)) * V)) /\ exists ff_q_pfp_unswap_full_matchingpermutationinjectiveright. U = ff_q_pfp_unswap_full_matchingpermutationinjectiveright * S ((S (pfp_j_unswap_full_matchingpermutationinjective)) * V) + (pfp_a_unswap_full_matchingpermutationinjective))) -> pfp_i_unswap_full_matchingpermutationinjective = pfp_j_unswap_full_matchingpermutationinjective) /\ (forall pfp_a_unswap_full_matchingpermutationsurjective. (exists pfp_gap_unswap_full_matchingpermutationsurjectivevalue. pfp_gap_unswap_full_matchingpermutationsurjectivevalue + S (pfp_a_unswap_full_matchingpermutationsurjective) = (S l)) -> exists pfp_i_unswap_full_matchingpermutationsurjective. (exists pfp_gap_unswap_full_matchingpermutationsurjectiveindex. pfp_gap_unswap_full_matchingpermutationsurjectiveindex + S (pfp_i_unswap_full_matchingpermutationsurjective) = (S l)) /\ (((exists ff_h_pfp_unswap_full_matchingpermutationsurjectiveentry. ff_h_pfp_unswap_full_matchingpermutationsurjectiveentry + S (pfp_a_unswap_full_matchingpermutationsurjective) = S ((S (pfp_i_unswap_full_matchingpermutationsurjective)) * V)) /\ exists ff_q_pfp_unswap_full_matchingpermutationsurjectiveentry. U = ff_q_pfp_unswap_full_matchingpermutationsurjectiveentry * S ((S (pfp_i_unswap_full_matchingpermutationsurjective)) * V) + (pfp_a_unswap_full_matchingpermutationsurjective)))))))) /\ (forall pfp_i_unswap_full_matchingmatching pfp_j_unswap_full_matchingmatching pfp_a_unswap_full_matchingmatching. (exists pfp_gap_unswap_full_matchingmatchingbound. pfp_gap_unswap_full_matchingmatchingbound + S (pfp_i_unswap_full_matchingmatching) = (S l)) -> (((exists ff_h_pfp_unswap_full_matchingmatchingmap. ff_h_pfp_unswap_full_matchingmatchingmap + S (pfp_j_unswap_full_matchingmatching) = S ((S (pfp_i_unswap_full_matchingmatching)) * V)) /\ exists ff_q_pfp_unswap_full_matchingmatchingmap. U = ff_q_pfp_unswap_full_matchingmatchingmap * S ((S (pfp_i_unswap_full_matchingmatching)) * V) + (pfp_j_unswap_full_matchingmatching))) -> (((exists ff_h_pfp_unswap_full_matchingmatchingsource. ff_h_pfp_unswap_full_matchingmatchingsource + S (pfp_a_unswap_full_matchingmatching) = S ((S (pfp_i_unswap_full_matchingmatching)) * c)) /\ exists ff_q_pfp_unswap_full_matchingmatchingsource. b = ff_q_pfp_unswap_full_matchingmatchingsource * S ((S (pfp_i_unswap_full_matchingmatching)) * c) + (pfp_a_unswap_full_matchingmatching))) -> (((exists ff_h_pfp_unswap_full_matchingmatchingtarget. ff_h_pfp_unswap_full_matchingmatchingtarget + S (pfp_a_unswap_full_matchingmatching) = S ((S (pfp_j_unswap_full_matchingmatching)) * E)) /\ exists ff_q_pfp_unswap_full_matchingmatchingtarget. D = ff_q_pfp_unswap_full_matchingmatchingtarget * S ((S (pfp_j_unswap_full_matchingmatching)) * E) + (pfp_a_unswap_full_matchingmatching)))))) /\ (((((exists ff_h_pfp_unswap_full_extensionlast. ff_h_pfp_unswap_full_extensionlast + S (l) = S ((S (l)) * V)) /\ exists ff_q_pfp_unswap_full_extensionlast. U = ff_q_pfp_unswap_full_extensionlast * S ((S (l)) * V) + (l))) /\ (forall pfp_i_unswap_full_extensionprefix pfp_a_unswap_full_extensionprefix. (exists pfp_gap_unswap_full_extensionprefixbound. pfp_gap_unswap_full_extensionprefixbound + S (pfp_i_unswap_full_extensionprefix) = (l)) -> (((exists ff_h_pfp_unswap_full_extensionprefixold. ff_h_pfp_unswap_full_extensionprefixold + S (pfp_a_unswap_full_extensionprefix) = S ((S (pfp_i_unswap_full_extensionprefix)) * v)) /\ exists ff_q_pfp_unswap_full_extensionprefixold. u = ff_q_pfp_unswap_full_extensionprefixold * S ((S (pfp_i_unswap_full_extensionprefix)) * v) + (pfp_a_unswap_full_extensionprefix))) -> (((exists ff_h_pfp_unswap_full_extensionprefixnew. ff_h_pfp_unswap_full_extensionprefixnew + S (pfp_a_unswap_full_extensionprefix) = S ((S (pfp_i_unswap_full_extensionprefix)) * V)) /\ exists ff_q_pfp_unswap_full_extensionprefixnew. U = ff_q_pfp_unswap_full_extensionprefixnew * S ((S (pfp_i_unswap_full_extensionprefix)) * V) + (pfp_a_unswap_full_extensionprefix))))))) - 0024
specialize factor_permutation_matched_append (b) - 0025
specialize factor_permutation_matched_append (c) - 0026
specialize factor_permutation_matched_append (D) - 0027
specialize factor_permutation_matched_append (E) - 0028
specialize factor_permutation_matched_append (u) - 0029
specialize factor_permutation_matched_append (v) - 0030
specialize factor_permutation_matched_append (l) - 0031
specialize factor_permutation_matched_append (p) - 0032
apply factor_permutation_matched_append - 0033
exact hm - 0034
exact hleft - 0035
exact hright - 0036
cases hfull - 0037
cases hfull_witness - 0038
cases hfull_witness_witness - 0039
cases hfull_witness_witness_left - 0040
cases hfull_witness_witness_right - 0041
cases hm - 0042
cases hm_left - 0043
cases hm_left_right - 0044
have hpreimage : exists i. (exists pfp_gap_unswap_preimage_bound. pfp_gap_unswap_preimage_bound + S (i) = (l)) /\ (((exists ff_h_pfp_unswap_preimage_entry. ff_h_pfp_unswap_preimage_entry + S (j) = S ((S (i)) * v)) /\ exists ff_q_pfp_unswap_preimage_entry. u = ff_q_pfp_unswap_preimage_entry * S ((S (i)) * v) + (j))) - 0045
specialize hm_left_right_right (j) - 0046
apply hm_left_right_right - 0047
exact hj - 0048
cases hpreimage - 0049
cases hpreimage_witness - 0050
have hmapi : ((exists ff_h_pfp_unswap_full_image. ff_h_pfp_unswap_full_image + S (j) = S ((S (x2)) * x1)) /\ exists ff_q_pfp_unswap_full_image. x = ff_q_pfp_unswap_full_image * S ((S (x2)) * x1) + (j)) - 0051
specialize hfull_witness_witness_right_right (x2) - 0052
specialize hfull_witness_witness_right_right (j) - 0053
apply hfull_witness_witness_right_right - 0054
exact hpreimage_witness_left - 0055
exact hpreimage_witness_right - 0056
have hmapnew : exists U V. ((((exists ff_h_pfp_unswap_map_new_selected. ff_h_pfp_unswap_map_new_selected + S (l) = S ((S (x2)) * V)) /\ exists ff_q_pfp_unswap_map_new_selected. U = ff_q_pfp_unswap_map_new_selected * S ((S (x2)) * V) + (l))) /\ (((((exists ff_h_pfp_unswap_map_new_last. ff_h_pfp_unswap_map_new_last + S (j) = S ((S (l)) * V)) /\ exists ff_q_pfp_unswap_map_new_last. U = ff_q_pfp_unswap_map_new_last * S ((S (l)) * V) + (j))) /\ (forall k a. (exists pfp_gap_unswap_map_preserve_bound. pfp_gap_unswap_map_preserve_bound + S (k) = (S l)) -> ~(k = x2) -> ~(k = l) -> (((exists ff_h_pfp_unswap_map_preserve_old. ff_h_pfp_unswap_map_preserve_old + S (a) = S ((S (k)) * x1)) /\ exists ff_q_pfp_unswap_map_preserve_old. x = ff_q_pfp_unswap_map_preserve_old * S ((S (k)) * x1) + (a))) -> (((exists ff_h_pfp_unswap_map_preserve_new. ff_h_pfp_unswap_map_preserve_new + S (a) = S ((S (k)) * V)) /\ exists ff_q_pfp_unswap_map_preserve_new. U = ff_q_pfp_unswap_map_preserve_new * S ((S (k)) * V) + (a))))))) - 0057
specialize beta_prefix_swap_last_from_entries (x) - 0058
specialize beta_prefix_swap_last_from_entries (x1) - 0059
specialize beta_prefix_swap_last_from_entries (l) - 0060
specialize beta_prefix_swap_last_from_entries (x2) - 0061
specialize beta_prefix_swap_last_from_entries (j) - 0062
specialize beta_prefix_swap_last_from_entries (l) - 0063
apply beta_prefix_swap_last_from_entries - 0064
exact hpreimage_witness_left - 0065
exact hmapi - 0066
exact hfull_witness_witness_right_left - 0067
cases hmapnew - 0068
cases hmapnew_witness - 0069
cases hmapnew_witness_witness - 0070
cases hmapnew_witness_witness_right - 0071
have hmapswap : ((((exists ff_h_pfp_unswap_actual_mapoldi. ff_h_pfp_unswap_actual_mapoldi + S (j) = S ((S (x2)) * x1)) /\ exists ff_q_pfp_unswap_actual_mapoldi. x = ff_q_pfp_unswap_actual_mapoldi * S ((S (x2)) * x1) + (j))) /\ (((((exists ff_h_pfp_unswap_actual_mapoldlast. ff_h_pfp_unswap_actual_mapoldlast + S (l) = S ((S (l)) * x1)) /\ exists ff_q_pfp_unswap_actual_mapoldlast. x = ff_q_pfp_unswap_actual_mapoldlast * S ((S (l)) * x1) + (l))) /\ (((((exists ff_h_pfp_unswap_actual_mapnewi. ff_h_pfp_unswap_actual_mapnewi + S (l) = S ((S (x2)) * x4)) /\ exists ff_q_pfp_unswap_actual_mapnewi. x3 = ff_q_pfp_unswap_actual_mapnewi * S ((S (x2)) * x4) + (l))) /\ (((((exists ff_h_pfp_unswap_actual_mapnewlast. ff_h_pfp_unswap_actual_mapnewlast + S (j) = S ((S (l)) * x4)) /\ exists ff_q_pfp_unswap_actual_mapnewlast. x3 = ff_q_pfp_unswap_actual_mapnewlast * S ((S (l)) * x4) + (j))) /\ (forall pfp_j_unswap_actual_map pfp_a_unswap_actual_map. (exists pfp_gap_unswap_actual_mapbound. pfp_gap_unswap_actual_mapbound + S (pfp_j_unswap_actual_map) = (S (l))) -> ~(pfp_j_unswap_actual_map = x2) -> ~(pfp_j_unswap_actual_map = l) -> (((exists ff_h_pfp_unswap_actual_mapold. ff_h_pfp_unswap_actual_mapold + S (pfp_a_unswap_actual_map) = S ((S (pfp_j_unswap_actual_map)) * x1)) /\ exists ff_q_pfp_unswap_actual_mapold. x = ff_q_pfp_unswap_actual_mapold * S ((S (pfp_j_unswap_actual_map)) * x1) + (pfp_a_unswap_actual_map))) -> (((exists ff_h_pfp_unswap_actual_mapnew. ff_h_pfp_unswap_actual_mapnew + S (pfp_a_unswap_actual_map) = S ((S (pfp_j_unswap_actual_map)) * x4)) /\ exists ff_q_pfp_unswap_actual_mapnew. x3 = ff_q_pfp_unswap_actual_mapnew * S ((S (pfp_j_unswap_actual_map)) * x4) + (pfp_a_unswap_actual_map))))))))))) - 0072
split - 0073
exact hmapi - 0074
split - 0075
exact hfull_witness_witness_right_left - 0076
split - 0077
exact hmapnew_witness_witness_left - 0078
split - 0079
exact hmapnew_witness_witness_right_left - 0080
exact hmapnew_witness_witness_right_right - 0081
exists x3 - 0082
exists x4 - 0083
split - 0084
specialize factor_permutation_swap_bijection (x) - 0085
specialize factor_permutation_swap_bijection (x1) - 0086
specialize factor_permutation_swap_bijection (x3) - 0087
specialize factor_permutation_swap_bijection (x4) - 0088
specialize factor_permutation_swap_bijection (l) - 0089
specialize factor_permutation_swap_bijection (x2) - 0090
specialize factor_permutation_swap_bijection (j) - 0091
specialize factor_permutation_swap_bijection (l) - 0092
apply factor_permutation_swap_bijection - 0093
exact hpreimage_witness_left - 0094
exact hfull_witness_witness_left_left - 0095
exact hmapswap - 0096
specialize factor_permutation_matching_unswap (b) - 0097
specialize factor_permutation_matching_unswap (c) - 0098
specialize factor_permutation_matching_unswap (d) - 0099
specialize factor_permutation_matching_unswap (e) - 0100
specialize factor_permutation_matching_unswap (D) - 0101
specialize factor_permutation_matching_unswap (E) - 0102
specialize factor_permutation_matching_unswap (x) - 0103
specialize factor_permutation_matching_unswap (x1) - 0104
specialize factor_permutation_matching_unswap (x3) - 0105
specialize factor_permutation_matching_unswap (x4) - 0106
specialize factor_permutation_matching_unswap (l) - 0107
specialize factor_permutation_matching_unswap (x2) - 0108
specialize factor_permutation_matching_unswap (j) - 0109
specialize factor_permutation_matching_unswap (p) - 0110
specialize factor_permutation_matching_unswap (q) - 0111
apply factor_permutation_matching_unswap - 0112
exact hpreimage_witness_left - 0113
exact hj - 0114
exact hfull_witness_witness_left_left - 0115
exact hfull_witness_witness_left_right - 0116
exact hs - 0117
exact hmapswap