Exact expanded first-order arithmetic statement
forall p n b c r. (~((p) = 1) /\ forall pfa_factor_left_trace_bridge_domain pfa_factor_right_trace_bridge_domain. (p) = pfa_factor_left_trace_bridge_domain * pfa_factor_right_trace_bridge_domain -> pfa_factor_left_trace_bridge_domain = 1 \/ pfa_factor_right_trace_bridge_domain = 1) -> (((((exists ff_h_pft_trace_bridge_sourcestart. ff_h_pft_trace_bridge_sourcestart + S (0) = S ((S (0)) * c)) /\ exists ff_q_pft_trace_bridge_sourcestart. b = ff_q_pft_trace_bridge_sourcestart * S ((S (0)) * c) + (0))) /\ (((((exists ff_h_pft_trace_bridge_sourceterminal. ff_h_pft_trace_bridge_sourceterminal + S (r) = S ((S (n)) * c)) /\ exists ff_q_pft_trace_bridge_sourceterminal. b = ff_q_pft_trace_bridge_sourceterminal * S ((S (n)) * c) + (r))) /\ ((forall pff_trace_index_trace_bridge_sourcesteps. (exists pfa_gap_trace_bridge_sourcestepsindex. pfa_gap_trace_bridge_sourcestepsindex + S (pff_trace_index_trace_bridge_sourcesteps) = (n)) -> exists pff_trace_before_trace_bridge_sourcesteps pff_trace_after_trace_bridge_sourcesteps. ((((exists ff_h_pft_trace_bridge_sourcestepsbefore. ff_h_pft_trace_bridge_sourcestepsbefore + S (pff_trace_before_trace_bridge_sourcesteps) = S ((S (pff_trace_index_trace_bridge_sourcesteps)) * c)) /\ exists ff_q_pft_trace_bridge_sourcestepsbefore. b = ff_q_pft_trace_bridge_sourcestepsbefore * S ((S (pff_trace_index_trace_bridge_sourcesteps)) * c) + (pff_trace_before_trace_bridge_sourcesteps))) /\ (((((exists ff_h_pft_trace_bridge_sourcestepsafter. ff_h_pft_trace_bridge_sourcestepsafter + S (pff_trace_after_trace_bridge_sourcesteps) = S ((S (S (pff_trace_index_trace_bridge_sourcesteps))) * c)) /\ exists ff_q_pft_trace_bridge_sourcestepsafter. b = ff_q_pft_trace_bridge_sourcestepsafter * S ((S (S (pff_trace_index_trace_bridge_sourcesteps))) * c) + (pff_trace_after_trace_bridge_sourcesteps))) /\ ((((exists pfa_gap_trace_bridge_sourcestepsadditionleft. pfa_gap_trace_bridge_sourcestepsadditionleft + S (pff_trace_before_trace_bridge_sourcesteps) = (p)) /\ (((exists pfa_gap_trace_bridge_sourcestepsadditionright. pfa_gap_trace_bridge_sourcestepsadditionright + S (1) = (p)) /\ ((((exists pfa_gap_trace_bridge_sourcestepsadditionresultbound. pfa_gap_trace_bridge_sourcestepsadditionresultbound + S (pff_trace_after_trace_bridge_sourcesteps) = (p)) /\ ((exists pfa_offset_left_trace_bridge_sourcestepsadditionresultcongruence pfa_offset_right_trace_bridge_sourcestepsadditionresultcongruence. ((pff_trace_before_trace_bridge_sourcesteps) + (1)) + (p) * pfa_offset_left_trace_bridge_sourcestepsadditionresultcongruence = (pff_trace_after_trace_bridge_sourcesteps) + (p) * pfa_offset_right_trace_bridge_sourcestepsadditionresultcongruence))))))))))))))))))) -> (((exists pfa_gap_trace_bridge_resultbound. pfa_gap_trace_bridge_resultbound + S (r) = (p)) /\ ((exists pfa_offset_left_trace_bridge_resultcongruence pfa_offset_right_trace_bridge_resultcongruence. (n) + (p) * pfa_offset_left_trace_bridge_resultcongruence = (r) + (p) * pfa_offset_right_trace_bridge_resultcongruence))))Constructive proof overview
Generated structural guide
Ordinary induction proves that an actual n-step addition-of-one history has canonical residue n; the relation does not assume this invariant.
The unchanged tactic script uses 8 declared prerequisites and contains 97 exact native proof lines.
Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable
Proof neighborhood
Direct dependencies
beta_at_unique Alpha theorem; checked-use authorized FP0003 prime_field_residue_reflexive FP0002 prime_field_zero_below_prime zero_add Alpha theorem; checked-use authorized le_succ Alpha theorem; checked-use authorized FP0027 prime_field_residue_add prime_two_le Alpha theorem; checked-use authorized FP0004 prime_field_residue_input_equalDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. The literal dependency-closed bundle is checked by original HA and the independently compiled Lean verifier. Public delivery grants no Alpha checked-use authority or 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–2
02Induction on nL3–8
03Separate the logical casesL9–10
04Establish heqL11–20
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta at unique.
05Calculate and transport equalitiesL21–21
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L21
rewrite heq
06Use earlier factsL22–27
Instantiate or apply named facts and discharge the corresponding proof obligations.
07Fix variables and assumptionsL28–32
08Separate the logical casesL33–34
09Establish hsL35–37
10Construct an explicit witnessL38–38
Supply the displayed value, then prove that it has the required property.
- L38
exists 0
11Use earlier factsL39–39
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L39
apply zero_add
12Separate the logical casesL40–43
13Establish heqL44–52
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta at unique.
14Establish hprevL53–53
Establish this local claim before using it. It is not an additional assumption.
- L53
have hprev : FpUnitTrace(p,b,c,n,x)Definitions: FpUnitTrace
15Separate the logical casesL54–54
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L54
split
16Use earlier factsL55–55
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L55
exact htrace_left
17Separate the logical casesL56–56
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L56
split
18Use earlier factsL57–57
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L57
exact hs_witness_witness_left
19Fix variables and assumptionsL58–59
20Use earlier factsL60–65
21Establish hresL66–72
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L66
have hres : ((exists pfa_gap_trace_bridge_old_residuebound. pfa_gap_trace_bridge_old_residuebound + S (x) = (p)) /\ ((exists pfa_offset_left_trace_bridge_old_residuecongruence pfa_offset_right_trace_bridge_old_residuecongruence. (n) + (p) * pfa_offset_left_trace_bridge_old_residuecongruence = (x) + (p) * pfa_offset_right_trace_bridge_old_residuecongruence))) - L67
specialize IH (b) - L68
specialize IH (c) - L69
specialize IH (x) - L70
apply IH - L71
exact hp - L72
exact hprev
22Establish hsumL73–82
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field residue add.
- L73
have hsum : ((exists pfa_gap_trace_bridge_sum_residuebound. pfa_gap_trace_bridge_sum_residuebound + S (x1) = (p)) /\ ((exists pfa_offset_left_trace_bridge_sum_residuecongruence pfa_offset_right_trace_bridge_sum_residuecongruence. (n+1) + (p) * pfa_offset_left_trace_bridge_sum_residuecongruence = (x1) + (p) * pfa_offset_right_trace_bridge_sum_residuecongruence))) - L74
specialize prime_field_residue_add (p) - L75
specialize prime_field_residue_add (n) - L76
specialize prime_field_residue_add (1) - L77
specialize prime_field_residue_add (x) - L78
specialize prime_field_residue_add (1) - L79
specialize prime_field_residue_add (x1) - L80
apply prime_field_residue_add - L81
exact hres - L82
specialize prime_field_residue_reflexive (p)
23Use earlier factsL83–88
24Calculate and transport equalitiesL89–90
25Use earlier factsL91–95
Instantiate or apply named facts and discharge the corresponding proof obligations.
26Calculate and transport equalitiesL96–96
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L96
simp
27Use earlier factsL97–97
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L97
exact hsum
Original exact command ledger · 97 lines
- 0001
intro p - 0002
intro n - 0003
induction n - 0004
intro b - 0005
intro c - 0006
intro r - 0007
intro hp - 0008
intro htrace - 0009
cases htrace - 0010
cases htrace_right - 0011
have heq : r = 0 - 0012
specialize beta_at_unique (b) - 0013
specialize beta_at_unique (c) - 0014
specialize beta_at_unique (0) - 0015
specialize beta_at_unique (r) - 0016
specialize beta_at_unique (0) - 0017
apply beta_at_unique - 0018
exact htrace_right_left - 0019
exact htrace_left - 0020
rewrite heq - 0021
rewrite heq - 0022
specialize prime_field_residue_reflexive (p) - 0023
specialize prime_field_residue_reflexive (0) - 0024
apply prime_field_residue_reflexive - 0025
specialize prime_field_zero_below_prime (p) - 0026
apply prime_field_zero_below_prime - 0027
exact hp - 0028
intro b - 0029
intro c - 0030
intro r - 0031
intro hp - 0032
intro htrace - 0033
cases htrace - 0034
cases htrace_right - 0035
have hs : exists u v. (((((exists ff_h_pft_trace_bridge_last_before. ff_h_pft_trace_bridge_last_before + S (u) = S ((S (n)) * c)) /\ exists ff_q_pft_trace_bridge_last_before. b = ff_q_pft_trace_bridge_last_before * S ((S (n)) * c) + (u))) /\ (((((exists ff_h_pft_trace_bridge_last_after. ff_h_pft_trace_bridge_last_after + S (v) = S ((S (S n)) * c)) /\ exists ff_q_pft_trace_bridge_last_after. b = ff_q_pft_trace_bridge_last_after * S ((S (S n)) * c) + (v))) /\ ((((exists pfa_gap_trace_bridge_last_addleft. pfa_gap_trace_bridge_last_addleft + S (u) = (p)) /\ (((exists pfa_gap_trace_bridge_last_addright. pfa_gap_trace_bridge_last_addright + S (1) = (p)) /\ ((((exists pfa_gap_trace_bridge_last_addresultbound. pfa_gap_trace_bridge_last_addresultbound + S (v) = (p)) /\ ((exists pfa_offset_left_trace_bridge_last_addresultcongruence pfa_offset_right_trace_bridge_last_addresultcongruence. ((u) + (1)) + (p) * pfa_offset_left_trace_bridge_last_addresultcongruence = (v) + (p) * pfa_offset_right_trace_bridge_last_addresultcongruence)))))))))))))) - 0036
specialize htrace_right_right (n) - 0037
apply htrace_right_right - 0038
exists 0 - 0039
apply zero_add - 0040
cases hs - 0041
cases hs_witness - 0042
cases hs_witness_witness - 0043
cases hs_witness_witness_right - 0044
have heq : x1 = r - 0045
specialize beta_at_unique (b) - 0046
specialize beta_at_unique (c) - 0047
specialize beta_at_unique (S n) - 0048
specialize beta_at_unique (x1) - 0049
specialize beta_at_unique (r) - 0050
apply beta_at_unique - 0051
exact hs_witness_witness_right_left - 0052
exact htrace_right_left - 0053
have hprev : ((((exists ff_h_pft_trace_bridge_previousstart. ff_h_pft_trace_bridge_previousstart + S (0) = S ((S (0)) * c)) /\ exists ff_q_pft_trace_bridge_previousstart. b = ff_q_pft_trace_bridge_previousstart * S ((S (0)) * c) + (0))) /\ (((((exists ff_h_pft_trace_bridge_previousterminal. ff_h_pft_trace_bridge_previousterminal + S (x) = S ((S (n)) * c)) /\ exists ff_q_pft_trace_bridge_previousterminal. b = ff_q_pft_trace_bridge_previousterminal * S ((S (n)) * c) + (x))) /\ ((forall pff_trace_index_trace_bridge_previoussteps. (exists pfa_gap_trace_bridge_previousstepsindex. pfa_gap_trace_bridge_previousstepsindex + S (pff_trace_index_trace_bridge_previoussteps) = (n)) -> exists pff_trace_before_trace_bridge_previoussteps pff_trace_after_trace_bridge_previoussteps. ((((exists ff_h_pft_trace_bridge_previousstepsbefore. ff_h_pft_trace_bridge_previousstepsbefore + S (pff_trace_before_trace_bridge_previoussteps) = S ((S (pff_trace_index_trace_bridge_previoussteps)) * c)) /\ exists ff_q_pft_trace_bridge_previousstepsbefore. b = ff_q_pft_trace_bridge_previousstepsbefore * S ((S (pff_trace_index_trace_bridge_previoussteps)) * c) + (pff_trace_before_trace_bridge_previoussteps))) /\ (((((exists ff_h_pft_trace_bridge_previousstepsafter. ff_h_pft_trace_bridge_previousstepsafter + S (pff_trace_after_trace_bridge_previoussteps) = S ((S (S (pff_trace_index_trace_bridge_previoussteps))) * c)) /\ exists ff_q_pft_trace_bridge_previousstepsafter. b = ff_q_pft_trace_bridge_previousstepsafter * S ((S (S (pff_trace_index_trace_bridge_previoussteps))) * c) + (pff_trace_after_trace_bridge_previoussteps))) /\ ((((exists pfa_gap_trace_bridge_previousstepsadditionleft. pfa_gap_trace_bridge_previousstepsadditionleft + S (pff_trace_before_trace_bridge_previoussteps) = (p)) /\ (((exists pfa_gap_trace_bridge_previousstepsadditionright. pfa_gap_trace_bridge_previousstepsadditionright + S (1) = (p)) /\ ((((exists pfa_gap_trace_bridge_previousstepsadditionresultbound. pfa_gap_trace_bridge_previousstepsadditionresultbound + S (pff_trace_after_trace_bridge_previoussteps) = (p)) /\ ((exists pfa_offset_left_trace_bridge_previousstepsadditionresultcongruence pfa_offset_right_trace_bridge_previousstepsadditionresultcongruence. ((pff_trace_before_trace_bridge_previoussteps) + (1)) + (p) * pfa_offset_left_trace_bridge_previousstepsadditionresultcongruence = (pff_trace_after_trace_bridge_previoussteps) + (p) * pfa_offset_right_trace_bridge_previousstepsadditionresultcongruence)))))))))))))))))) - 0054
split - 0055
exact htrace_left - 0056
split - 0057
exact hs_witness_witness_left - 0058
intro i - 0059
intro hi - 0060
specialize htrace_right_right (i) - 0061
apply htrace_right_right - 0062
specialize le_succ (S i) - 0063
specialize le_succ (n) - 0064
apply le_succ - 0065
exact hi - 0066
have hres : ((exists pfa_gap_trace_bridge_old_residuebound. pfa_gap_trace_bridge_old_residuebound + S (x) = (p)) /\ ((exists pfa_offset_left_trace_bridge_old_residuecongruence pfa_offset_right_trace_bridge_old_residuecongruence. (n) + (p) * pfa_offset_left_trace_bridge_old_residuecongruence = (x) + (p) * pfa_offset_right_trace_bridge_old_residuecongruence))) - 0067
specialize IH (b) - 0068
specialize IH (c) - 0069
specialize IH (x) - 0070
apply IH - 0071
exact hp - 0072
exact hprev - 0073
have hsum : ((exists pfa_gap_trace_bridge_sum_residuebound. pfa_gap_trace_bridge_sum_residuebound + S (x1) = (p)) /\ ((exists pfa_offset_left_trace_bridge_sum_residuecongruence pfa_offset_right_trace_bridge_sum_residuecongruence. (n+1) + (p) * pfa_offset_left_trace_bridge_sum_residuecongruence = (x1) + (p) * pfa_offset_right_trace_bridge_sum_residuecongruence))) - 0074
specialize prime_field_residue_add (p) - 0075
specialize prime_field_residue_add (n) - 0076
specialize prime_field_residue_add (1) - 0077
specialize prime_field_residue_add (x) - 0078
specialize prime_field_residue_add (1) - 0079
specialize prime_field_residue_add (x1) - 0080
apply prime_field_residue_add - 0081
exact hres - 0082
specialize prime_field_residue_reflexive (p) - 0083
specialize prime_field_residue_reflexive (1) - 0084
apply prime_field_residue_reflexive - 0085
specialize prime_two_le (p) - 0086
apply prime_two_le - 0087
exact hp - 0088
exact hs_witness_witness_right_right - 0089
rewrite heq at hsum - 0090
rewrite heq at hsum - 0091
specialize prime_field_residue_input_equal (p) - 0092
specialize prime_field_residue_input_equal (S n) - 0093
specialize prime_field_residue_input_equal (n+1) - 0094
specialize prime_field_residue_input_equal (r) - 0095
apply prime_field_residue_input_equal - 0096
simp - 0097
exact hsum