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 expanded first-order arithmetic statement
forall n p b c. ~(n=0) -> (~((p) = 1) /\ forall pvs_left_permutation_prime pvs_right_permutation_prime. (p) = pvs_left_permutation_prime * pvs_right_permutation_prime -> pvs_left_permutation_prime = 1 \/ pvs_right_permutation_prime = 1) -> (exists pvs_factor_permutation_prime_divisor. (n) = (p) * pvs_factor_permutation_prime_divisor) -> (forall dvi_index_permutation_source. (exists pvs_gap_permutation_sourcedomain. pvs_gap_permutation_sourcedomain + S (dvi_index_permutation_source) = (S n)) -> exists dvi_value_permutation_source. ((((exists ff_h_pvs_permutation_sourceentry. ff_h_pvs_permutation_sourceentry + S (dvi_value_permutation_source) = S ((S (dvi_index_permutation_source)) * c)) /\ exists ff_q_pvs_permutation_sourceentry. b = ff_q_pvs_permutation_sourceentry * S ((S (dvi_index_permutation_source)) * c) + (dvi_value_permutation_source))) /\ ((((~((dvi_index_permutation_source)=0)) /\ (((exists pvs_factor_permutation_sourcegraphdivisor. (n) = (dvi_index_permutation_source) * pvs_factor_permutation_sourcegraphdivisor) /\ ((((~(exists pvs_factor_permutation_sourcegraphtogglefresh_input. (dvi_index_permutation_source) = (p) * pvs_factor_permutation_sourcegraphtogglefresh_input)) /\ ((dvi_value_permutation_source)=(p)*(dvi_index_permutation_source)))) \/ (((((dvi_index_permutation_source)=(p)*(dvi_value_permutation_source)) /\ (~(exists pvs_factor_permutation_sourcegraphtogglefresh_output. (dvi_value_permutation_source) = (p) * pvs_factor_permutation_sourcegraphtogglefresh_output)))) \/ (((exists pvs_factor_permutation_sourcegraphtogglesquare. (dvi_index_permutation_source) = ((p)*(p)) * pvs_factor_permutation_sourcegraphtogglesquare) /\ ((dvi_value_permutation_source)=(dvi_index_permutation_source)))))))))) \/ ((((dvi_index_permutation_source)=0 \/ ~(exists pvs_factor_permutation_sourcegraphnondivisor. (n) = (dvi_index_permutation_source) * pvs_factor_permutation_sourcegraphnondivisor)) /\ ((dvi_value_permutation_source)=(dvi_index_permutation_source))))))) -> (((forall pfp_i_permutation_targetbounded. (exists pfp_gap_permutation_targetboundedindex. pfp_gap_permutation_targetboundedindex + S (pfp_i_permutation_targetbounded) = (S n)) -> exists pfp_a_permutation_targetbounded. (((exists ff_h_pfp_permutation_targetboundedentry. ff_h_pfp_permutation_targetboundedentry + S (pfp_a_permutation_targetbounded) = S ((S (pfp_i_permutation_targetbounded)) * c)) /\ exists ff_q_pfp_permutation_targetboundedentry. b = ff_q_pfp_permutation_targetboundedentry * S ((S (pfp_i_permutation_targetbounded)) * c) + (pfp_a_permutation_targetbounded))) /\ (exists pfp_gap_permutation_targetboundedvalue. pfp_gap_permutation_targetboundedvalue + S (pfp_a_permutation_targetbounded) = (S n))) /\ (((forall pfp_i_permutation_targetinjective pfp_j_permutation_targetinjective pfp_a_permutation_targetinjective. (exists pfp_gap_permutation_targetinjectivefirst. pfp_gap_permutation_targetinjectivefirst + S (pfp_i_permutation_targetinjective) = (S n)) -> (exists pfp_gap_permutation_targetinjectivesecond. pfp_gap_permutation_targetinjectivesecond + S (pfp_j_permutation_targetinjective) = (S n)) -> (((exists ff_h_pfp_permutation_targetinjectiveleft. ff_h_pfp_permutation_targetinjectiveleft + S (pfp_a_permutation_targetinjective) = S ((S (pfp_i_permutation_targetinjective)) * c)) /\ exists ff_q_pfp_permutation_targetinjectiveleft. b = ff_q_pfp_permutation_targetinjectiveleft * S ((S (pfp_i_permutation_targetinjective)) * c) + (pfp_a_permutation_targetinjective))) -> (((exists ff_h_pfp_permutation_targetinjectiveright. ff_h_pfp_permutation_targetinjectiveright + S (pfp_a_permutation_targetinjective) = S ((S (pfp_j_permutation_targetinjective)) * c)) /\ exists ff_q_pfp_permutation_targetinjectiveright. b = ff_q_pfp_permutation_targetinjectiveright * S ((S (pfp_j_permutation_targetinjective)) * c) + (pfp_a_permutation_targetinjective))) -> pfp_i_permutation_targetinjective = pfp_j_permutation_targetinjective) /\ (forall pfp_a_permutation_targetsurjective. (exists pfp_gap_permutation_targetsurjectivevalue. pfp_gap_permutation_targetsurjectivevalue + S (pfp_a_permutation_targetsurjective) = (S n)) -> exists pfp_i_permutation_targetsurjective. (exists pfp_gap_permutation_targetsurjectiveindex. pfp_gap_permutation_targetsurjectiveindex + S (pfp_i_permutation_targetsurjective) = (S n)) /\ (((exists ff_h_pfp_permutation_targetsurjectiveentry. ff_h_pfp_permutation_targetsurjectiveentry + S (pfp_a_permutation_targetsurjective) = S ((S (pfp_i_permutation_targetsurjective)) * c)) /\ exists ff_q_pfp_permutation_targetsurjectiveentry. b = ff_q_pfp_permutation_targetsurjectiveentry * S ((S (pfp_i_permutation_targetsurjective)) * c) + (pfp_a_permutation_targetsurjective))))))))Constructive proof overview
Generated structural guide
The actual S n-entry prime toggle is a bounded, injective and constructively surjective permutation, including all fixed omitted indices.
The unchanged tactic script uses 7 declared prerequisites and contains 99 exact native proof lines.
Alpha v34 checked-use · first admitted v31 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
succ_le_succ Stable theorem; checked-use authorized MC000B divisor_prime_toggle_bounded le_of_succ_le_succ Stable theorem; checked-use authorized MC0009 divisor_prime_toggle_functional MC000A divisor_prime_toggle_symmetric MC000D divisor_prime_toggle_prefix_lookup finite_bounded_injective_surjective Stable theorem; checked-use authorizedDirect 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 (4)
01Fix variables and assumptionsL1–8
02Establish hbL9–11
Establish this local claim before using it. It is not an additional assumption.
- L9
have hb : BoundedPrefix(b,c,S n)Definitions: BoundedPrefix - L10
intro i - L11
intro hi
03Establish hvL12–15
04Separate the logical casesL16–17
05Construct an explicit witnessL18–18
Supply the displayed value, then prove that it has the required property.
- L18
exists x
06Separate the logical casesL19–19
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L19
split
07Use earlier factsL20–29
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L20
exact hv_witness_left - L21
specialize succ_le_succ (x) - L22
specialize succ_le_succ (n) - L23
apply succ_le_succ - L24
specialize divisor_prime_toggle_bounded (n) - L25
specialize divisor_prime_toggle_bounded (p) - L26
specialize divisor_prime_toggle_bounded (i) - L27
specialize divisor_prime_toggle_bounded (x) - L28
apply divisor_prime_toggle_bounded - L29
exact hn
08Use earlier factsL30–36
09Establish hinjL37–46
Establish this local claim before using it. It is not an additional assumption.
10Use earlier factsL47–56
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L47
specialize divisor_prime_toggle_functional (a) - L48
specialize divisor_prime_toggle_functional (i) - L49
specialize divisor_prime_toggle_functional (j) - L50
apply divisor_prime_toggle_functional - L51
exact hp - L52
specialize divisor_prime_toggle_symmetric (n) - L53
specialize divisor_prime_toggle_symmetric (p) - L54
specialize divisor_prime_toggle_symmetric (i) - L55
specialize divisor_prime_toggle_symmetric (a) - L56
apply divisor_prime_toggle_symmetric
11Use earlier factsL57–66
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L57
exact hn - L58
exact hp - L59
exact hpn - L60
specialize divisor_prime_toggle_prefix_lookup (n) - L61
specialize divisor_prime_toggle_prefix_lookup (p) - L62
specialize divisor_prime_toggle_prefix_lookup (b) - L63
specialize divisor_prime_toggle_prefix_lookup (c) - L64
specialize divisor_prime_toggle_prefix_lookup (S n) - L65
specialize divisor_prime_toggle_prefix_lookup (i) - L66
specialize divisor_prime_toggle_prefix_lookup (a)
12Use earlier factsL67–76
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L67
apply divisor_prime_toggle_prefix_lookup - L68
exact hprefix - L69
exact hi - L70
exact hia - L71
specialize divisor_prime_toggle_symmetric (n) - L72
specialize divisor_prime_toggle_symmetric (p) - L73
specialize divisor_prime_toggle_symmetric (j) - L74
specialize divisor_prime_toggle_symmetric (a) - L75
apply divisor_prime_toggle_symmetric - L76
exact hn
13Use earlier factsL77–86
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L77
exact hp - L78
exact hpn - L79
specialize divisor_prime_toggle_prefix_lookup (n) - L80
specialize divisor_prime_toggle_prefix_lookup (p) - L81
specialize divisor_prime_toggle_prefix_lookup (b) - L82
specialize divisor_prime_toggle_prefix_lookup (c) - L83
specialize divisor_prime_toggle_prefix_lookup (S n) - L84
specialize divisor_prime_toggle_prefix_lookup (j) - L85
specialize divisor_prime_toggle_prefix_lookup (a) - L86
apply divisor_prime_toggle_prefix_lookup
14Use earlier factsL87–89
15Separate the logical casesL90–90
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L90
split
16Use earlier factsL91–91
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L91
exact hb
17Separate the logical casesL92–92
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L92
split
18Use earlier factsL93–99
Instantiate or apply named facts and discharge the corresponding proof obligations.
Original exact command ledger · 99 lines
- 0001
intro n - 0002
intro p - 0003
intro b - 0004
intro c - 0005
intro hn - 0006
intro hp - 0007
intro hpn - 0008
intro hprefix - 0009
have hb : forall pfp_i_toggle_permutation_bound. (exists pfp_gap_toggle_permutation_boundindex. pfp_gap_toggle_permutation_boundindex + S (pfp_i_toggle_permutation_bound) = (S n)) -> exists pfp_a_toggle_permutation_bound. (((exists ff_h_pfp_toggle_permutation_boundentry. ff_h_pfp_toggle_permutation_boundentry + S (pfp_a_toggle_permutation_bound) = S ((S (pfp_i_toggle_permutation_bound)) * c)) /\ exists ff_q_pfp_toggle_permutation_boundentry. b = ff_q_pfp_toggle_permutation_boundentry * S ((S (pfp_i_toggle_permutation_bound)) * c) + (pfp_a_toggle_permutation_bound))) /\ (exists pfp_gap_toggle_permutation_boundvalue. pfp_gap_toggle_permutation_boundvalue + S (pfp_a_toggle_permutation_bound) = (S n)) - 0010
intro i - 0011
intro hi - 0012
have hv : exists e. (((((exists ff_h_pvs_toggle_permutation_entry. ff_h_pvs_toggle_permutation_entry + S (e) = S ((S (i)) * c)) /\ exists ff_q_pvs_toggle_permutation_entry. b = ff_q_pvs_toggle_permutation_entry * S ((S (i)) * c) + (e))) /\ ((((~((i)=0)) /\ (((exists pvs_factor_toggle_permutation_graphdivisor. (n) = (i) * pvs_factor_toggle_permutation_graphdivisor) /\ ((((~(exists pvs_factor_toggle_permutation_graphtogglefresh_input. (i) = (p) * pvs_factor_toggle_permutation_graphtogglefresh_input)) /\ ((e)=(p)*(i)))) \/ (((((i)=(p)*(e)) /\ (~(exists pvs_factor_toggle_permutation_graphtogglefresh_output. (e) = (p) * pvs_factor_toggle_permutation_graphtogglefresh_output)))) \/ (((exists pvs_factor_toggle_permutation_graphtogglesquare. (i) = ((p)*(p)) * pvs_factor_toggle_permutation_graphtogglesquare) /\ ((e)=(i)))))))))) \/ ((((i)=0 \/ ~(exists pvs_factor_toggle_permutation_graphnondivisor. (n) = (i) * pvs_factor_toggle_permutation_graphnondivisor)) /\ ((e)=(i))))))) - 0013
specialize hprefix (i) - 0014
apply hprefix - 0015
exact hi - 0016
cases hv - 0017
cases hv_witness - 0018
exists x - 0019
split - 0020
exact hv_witness_left - 0021
specialize succ_le_succ (x) - 0022
specialize succ_le_succ (n) - 0023
apply succ_le_succ - 0024
specialize divisor_prime_toggle_bounded (n) - 0025
specialize divisor_prime_toggle_bounded (p) - 0026
specialize divisor_prime_toggle_bounded (i) - 0027
specialize divisor_prime_toggle_bounded (x) - 0028
apply divisor_prime_toggle_bounded - 0029
exact hn - 0030
exact hp - 0031
exact hpn - 0032
specialize le_of_succ_le_succ (i) - 0033
specialize le_of_succ_le_succ (n) - 0034
apply le_of_succ_le_succ - 0035
exact hi - 0036
exact hv_witness_right - 0037
have hinj : forall pfp_i_toggle_permutation_injective pfp_j_toggle_permutation_injective pfp_a_toggle_permutation_injective. (exists pfp_gap_toggle_permutation_injectivefirst. pfp_gap_toggle_permutation_injectivefirst + S (pfp_i_toggle_permutation_injective) = (S n)) -> (exists pfp_gap_toggle_permutation_injectivesecond. pfp_gap_toggle_permutation_injectivesecond + S (pfp_j_toggle_permutation_injective) = (S n)) -> (((exists ff_h_pfp_toggle_permutation_injectiveleft. ff_h_pfp_toggle_permutation_injectiveleft + S (pfp_a_toggle_permutation_injective) = S ((S (pfp_i_toggle_permutation_injective)) * c)) /\ exists ff_q_pfp_toggle_permutation_injectiveleft. b = ff_q_pfp_toggle_permutation_injectiveleft * S ((S (pfp_i_toggle_permutation_injective)) * c) + (pfp_a_toggle_permutation_injective))) -> (((exists ff_h_pfp_toggle_permutation_injectiveright. ff_h_pfp_toggle_permutation_injectiveright + S (pfp_a_toggle_permutation_injective) = S ((S (pfp_j_toggle_permutation_injective)) * c)) /\ exists ff_q_pfp_toggle_permutation_injectiveright. b = ff_q_pfp_toggle_permutation_injectiveright * S ((S (pfp_j_toggle_permutation_injective)) * c) + (pfp_a_toggle_permutation_injective))) -> pfp_i_toggle_permutation_injective = pfp_j_toggle_permutation_injective - 0038
intro i - 0039
intro j - 0040
intro a - 0041
intro hi - 0042
intro hj - 0043
intro hia - 0044
intro hja - 0045
specialize divisor_prime_toggle_functional (n) - 0046
specialize divisor_prime_toggle_functional (p) - 0047
specialize divisor_prime_toggle_functional (a) - 0048
specialize divisor_prime_toggle_functional (i) - 0049
specialize divisor_prime_toggle_functional (j) - 0050
apply divisor_prime_toggle_functional - 0051
exact hp - 0052
specialize divisor_prime_toggle_symmetric (n) - 0053
specialize divisor_prime_toggle_symmetric (p) - 0054
specialize divisor_prime_toggle_symmetric (i) - 0055
specialize divisor_prime_toggle_symmetric (a) - 0056
apply divisor_prime_toggle_symmetric - 0057
exact hn - 0058
exact hp - 0059
exact hpn - 0060
specialize divisor_prime_toggle_prefix_lookup (n) - 0061
specialize divisor_prime_toggle_prefix_lookup (p) - 0062
specialize divisor_prime_toggle_prefix_lookup (b) - 0063
specialize divisor_prime_toggle_prefix_lookup (c) - 0064
specialize divisor_prime_toggle_prefix_lookup (S n) - 0065
specialize divisor_prime_toggle_prefix_lookup (i) - 0066
specialize divisor_prime_toggle_prefix_lookup (a) - 0067
apply divisor_prime_toggle_prefix_lookup - 0068
exact hprefix - 0069
exact hi - 0070
exact hia - 0071
specialize divisor_prime_toggle_symmetric (n) - 0072
specialize divisor_prime_toggle_symmetric (p) - 0073
specialize divisor_prime_toggle_symmetric (j) - 0074
specialize divisor_prime_toggle_symmetric (a) - 0075
apply divisor_prime_toggle_symmetric - 0076
exact hn - 0077
exact hp - 0078
exact hpn - 0079
specialize divisor_prime_toggle_prefix_lookup (n) - 0080
specialize divisor_prime_toggle_prefix_lookup (p) - 0081
specialize divisor_prime_toggle_prefix_lookup (b) - 0082
specialize divisor_prime_toggle_prefix_lookup (c) - 0083
specialize divisor_prime_toggle_prefix_lookup (S n) - 0084
specialize divisor_prime_toggle_prefix_lookup (j) - 0085
specialize divisor_prime_toggle_prefix_lookup (a) - 0086
apply divisor_prime_toggle_prefix_lookup - 0087
exact hprefix - 0088
exact hj - 0089
exact hja - 0090
split - 0091
exact hb - 0092
split - 0093
exact hinj - 0094
specialize finite_bounded_injective_surjective (S n) - 0095
specialize finite_bounded_injective_surjective (b) - 0096
specialize finite_bounded_injective_surjective (c) - 0097
apply finite_bounded_injective_surjective - 0098
exact hb - 0099
exact hinj