GC0006

crt_pairwise_compatible_prefix_last

The last residue of a compatible successor list is gcd-compatible with each earlier actual decoded pair.

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

Historical partial components only: this chapter proves canonical solutions under successive-merge compatibility and in the pairwise-compatible dominating-last case. G011 is now closed in the separate Alpha-v27 generalized-crt branch for arbitrary pairwise-compatible finite lists, including noncoprime moduli. Full G011 proof · Alpha v27

Exact theorem in conservative defined notation

∀ r. ∀ s. ∀ b. ∀ c. ∀ l. ∀ i. ∀ a. ∀ d. ∀ m. ∀ n. ∀ g. CRTPairwiseCompatiblePrefix(r,s,b,c,S l)Lt(i,l)Beta(r,s,i,a)Beta(r,s,l,d)Beta(b,c,i,m)Beta(b,c,l,n)IsGCD(g,m,n)ModEq(g,a,d)

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

Definition DAG

Actual proof prerequisites

le_succ · checked external prerequisitele_refl · checked external prerequisite
Original expanded first-order statement
forall r s b c l i a d m n g. (forall gcomp_left_index_gcomp_last_source gcomp_right_index_gcomp_last_source gcomp_left_residue_gcomp_last_source gcomp_right_residue_gcomp_last_source gcomp_left_modulus_gcomp_last_source gcomp_right_modulus_gcomp_last_source gcomp_pair_gcd_gcomp_last_source. (exists ff_lt_gcrt_gcomp_last_source_left_bound. ff_lt_gcrt_gcomp_last_source_left_bound + S gcomp_left_index_gcomp_last_source = S l) -> (exists ff_lt_gcrt_gcomp_last_source_right_bound. ff_lt_gcrt_gcomp_last_source_right_bound + S gcomp_right_index_gcomp_last_source = S l) -> (((exists ff_h_gcrt_gcomp_last_source_left_residue. ff_h_gcrt_gcomp_last_source_left_residue + S (gcomp_left_residue_gcomp_last_source) = S ((S (gcomp_left_index_gcomp_last_source)) * s)) /\ exists ff_q_gcrt_gcomp_last_source_left_residue. r = ff_q_gcrt_gcomp_last_source_left_residue * S ((S (gcomp_left_index_gcomp_last_source)) * s) + (gcomp_left_residue_gcomp_last_source))) -> (((exists ff_h_gcrt_gcomp_last_source_right_residue. ff_h_gcrt_gcomp_last_source_right_residue + S (gcomp_right_residue_gcomp_last_source) = S ((S (gcomp_right_index_gcomp_last_source)) * s)) /\ exists ff_q_gcrt_gcomp_last_source_right_residue. r = ff_q_gcrt_gcomp_last_source_right_residue * S ((S (gcomp_right_index_gcomp_last_source)) * s) + (gcomp_right_residue_gcomp_last_source))) -> (((exists ff_h_gcrt_gcomp_last_source_left_modulus. ff_h_gcrt_gcomp_last_source_left_modulus + S (gcomp_left_modulus_gcomp_last_source) = S ((S (gcomp_left_index_gcomp_last_source)) * c)) /\ exists ff_q_gcrt_gcomp_last_source_left_modulus. b = ff_q_gcrt_gcomp_last_source_left_modulus * S ((S (gcomp_left_index_gcomp_last_source)) * c) + (gcomp_left_modulus_gcomp_last_source))) -> (((exists ff_h_gcrt_gcomp_last_source_right_modulus. ff_h_gcrt_gcomp_last_source_right_modulus + S (gcomp_right_modulus_gcomp_last_source) = S ((S (gcomp_right_index_gcomp_last_source)) * c)) /\ exists ff_q_gcrt_gcomp_last_source_right_modulus. b = ff_q_gcrt_gcomp_last_source_right_modulus * S ((S (gcomp_right_index_gcomp_last_source)) * c) + (gcomp_right_modulus_gcomp_last_source))) -> ((((exists hag_left_factor_gcomp_gcomp_last_source_gcd. gcomp_left_modulus_gcomp_last_source = gcomp_pair_gcd_gcomp_last_source * hag_left_factor_gcomp_gcomp_last_source_gcd) /\ (exists hag_right_factor_gcomp_gcomp_last_source_gcd. gcomp_right_modulus_gcomp_last_source = gcomp_pair_gcd_gcomp_last_source * hag_right_factor_gcomp_gcomp_last_source_gcd)) /\ forall hag_divisor_gcomp_gcomp_last_source_gcd. (exists hag_common_left_gcomp_gcomp_last_source_gcd. gcomp_left_modulus_gcomp_last_source = hag_divisor_gcomp_gcomp_last_source_gcd * hag_common_left_gcomp_gcomp_last_source_gcd) -> (exists hag_common_right_gcomp_gcomp_last_source_gcd. gcomp_right_modulus_gcomp_last_source = hag_divisor_gcomp_gcomp_last_source_gcd * hag_common_right_gcomp_gcomp_last_source_gcd) -> exists hag_greatest_factor_gcomp_gcomp_last_source_gcd. gcomp_pair_gcd_gcomp_last_source = hag_divisor_gcomp_gcomp_last_source_gcd * hag_greatest_factor_gcomp_gcomp_last_source_gcd)) -> (exists hgcrt_mod_left_gcrt_gcomp_last_source_result hgcrt_mod_right_gcrt_gcomp_last_source_result. gcomp_left_residue_gcomp_last_source + gcomp_pair_gcd_gcomp_last_source * hgcrt_mod_left_gcrt_gcomp_last_source_result = gcomp_right_residue_gcomp_last_source + gcomp_pair_gcd_gcomp_last_source * hgcrt_mod_right_gcrt_gcomp_last_source_result)) -> (exists ff_lt_gcrt_gcomp_last_old_bound. ff_lt_gcrt_gcomp_last_old_bound + S i = l) -> (((exists ff_h_gcrt_gcomp_last_old_residue. ff_h_gcrt_gcomp_last_old_residue + S (a) = S ((S (i)) * s)) /\ exists ff_q_gcrt_gcomp_last_old_residue. r = ff_q_gcrt_gcomp_last_old_residue * S ((S (i)) * s) + (a))) -> (((exists ff_h_gcrt_gcomp_last_new_residue. ff_h_gcrt_gcomp_last_new_residue + S (d) = S ((S (l)) * s)) /\ exists ff_q_gcrt_gcomp_last_new_residue. r = ff_q_gcrt_gcomp_last_new_residue * S ((S (l)) * s) + (d))) -> (((exists ff_h_gcrt_gcomp_last_old_modulus. ff_h_gcrt_gcomp_last_old_modulus + S (m) = S ((S (i)) * c)) /\ exists ff_q_gcrt_gcomp_last_old_modulus. b = ff_q_gcrt_gcomp_last_old_modulus * S ((S (i)) * c) + (m))) -> (((exists ff_h_gcrt_gcomp_last_new_modulus. ff_h_gcrt_gcomp_last_new_modulus + S (n) = S ((S (l)) * c)) /\ exists ff_q_gcrt_gcomp_last_new_modulus. b = ff_q_gcrt_gcomp_last_new_modulus * S ((S (l)) * c) + (n))) -> ((((exists hag_left_factor_gcomp_last_actual_gcd. m = g * hag_left_factor_gcomp_last_actual_gcd) /\ (exists hag_right_factor_gcomp_last_actual_gcd. n = g * hag_right_factor_gcomp_last_actual_gcd)) /\ forall hag_divisor_gcomp_last_actual_gcd. (exists hag_common_left_gcomp_last_actual_gcd. m = hag_divisor_gcomp_last_actual_gcd * hag_common_left_gcomp_last_actual_gcd) -> (exists hag_common_right_gcomp_last_actual_gcd. n = hag_divisor_gcomp_last_actual_gcd * hag_common_right_gcomp_last_actual_gcd) -> exists hag_greatest_factor_gcomp_last_actual_gcd. g = hag_divisor_gcomp_last_actual_gcd * hag_greatest_factor_gcomp_last_actual_gcd)) -> (exists hgcrt_mod_left_gcrt_gcomp_last_result hgcrt_mod_right_gcrt_gcomp_last_result. a + g * hgcrt_mod_left_gcrt_gcomp_last_result = d + g * hgcrt_mod_right_gcrt_gcomp_last_result)

Complete unchanged native tactic proof

All 37 lines are the exact independently kernel-checked original script.

Read the argument

Proof checkpoints

37 script commands · 4 reading checkpoints · 0 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.

01Fix variables and assumptionsL1–10

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

  1. L1
    intro r
  2. L2
    intro s
  3. L3
    intro b
  4. L4
    intro c
  5. L5
    intro l
  6. L6
    intro i
  7. L7
    intro a
  8. L8
    intro d
  9. L9
    intro m
  10. L10
    intro n
02Fix variables and assumptionsL11–18

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

  1. L11
    intro g
  2. L12
    intro hpairs
  3. L13
    intro hi
  4. L14
    intro ha
  5. L15
    intro hd
  6. L16
    intro hm
  7. L17
    intro hn
  8. L18
    intro hg
03Use earlier factsL19–28

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

  1. L19
    specialize hpairs i
  2. L20
    specialize hpairs l
  3. L21
    specialize hpairs a
  4. L22
    specialize hpairs d
  5. L23
    specialize hpairs m
  6. L24
    specialize hpairs n
  7. L25
    specialize hpairs g
  8. L26
    apply hpairs
  9. L27
    specialize le_succ (S i)
  10. L28
    specialize le_succ l
04Use earlier factsL29–37

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

  1. L29
    apply le_succ
  2. L30
    exact hi
  3. L31
    specialize le_refl (S l)
  4. L32
    exact le_refl
  5. L33
    exact ha
  6. L34
    exact hd
  7. L35
    exact hm
  8. L36
    exact hn
  9. L37
    exact hg

Library-wide reading audit

Original defined command ledger · 37 lines
  1. 0001intro r
  2. 0002intro s
  3. 0003intro b
  4. 0004intro c
  5. 0005intro l
  6. 0006intro i
  7. 0007intro a
  8. 0008intro d
  9. 0009intro m
  10. 0010intro n
  11. 0011intro g
  12. 0012intro hpairs
  13. 0013intro hi
  14. 0014intro ha
  15. 0015intro hd
  16. 0016intro hm
  17. 0017intro hn
  18. 0018intro hg
  19. 0019specialize hpairs i
  20. 0020specialize hpairs l
  21. 0021specialize hpairs a
  22. 0022specialize hpairs d
  23. 0023specialize hpairs m
  24. 0024specialize hpairs n
  25. 0025specialize hpairs g
  26. 0026apply hpairs
  27. 0027specialize le_succ (S i)
  28. 0028specialize le_succ l
  29. 0029apply le_succ
  30. 0030exact hi
  31. 0031specialize le_refl (S l)
  32. 0032exact le_refl
  33. 0033exact ha
  34. 0034exact hd
  35. 0035exact hm
  36. 0036exact hn
  37. 0037exact hg